Python – TechEulerUnOrdered Linked list – Prepend, Append, Insert At, Reverse, Remove, SearchUse of __slots__ in Python ClassUsage of Underscores before and after function name in Python Warning: Cannot modify header information – headers already sent by (output started at /home/manikandancsea/public_html/index.php:4) in /home/manikandancsea/public_html/wp-includes/feed-rss2.php on line 8http://www.techeuler.com A Tech blog for nerds Thu, 28 Jul 2016 […]
Author: Mani Kandan
UnOrdered Linked list – Prepend, Append, Insert At, Reverse, Remove, Search
In order to implement an unordered linked list we need to construct linked list which contains Node class, a building block for constructing linked list class Node(object): def __init__(self, item): self.data = item self.next = None def setNext(self, newnext): self.next = newnext def getNext(self): return self.next def setData(self, item): self.data = item def getData(self): return […]
Use of __slots__ in Python Class
__slots__ Slots are predominantly used for avoiding dynamically created attributes. It is used to save memory spaces in objects. Instead of dynamically created objects at any time, there is a static structure that does not allow to after the initial creation. You would want to use __slots__ if you are going to instantiate a […]
Ubuntu was used to detect Gravitational waves at LIGO's experiment
Posted by: admin 6 days, 3 hours ago (Comments) Laser Interferometer Gravitational-Wave Observatory (LIGO) is a large-scale physics experiment to detect gravitational waves. LIGO is a joint project between scientists at MIT, Caltech, and many other colleges and universities. Scientists involved in the project and the analysis of the data for gravitational-wave astronomy are organised by the LIGO […]
Usage of Underscores before and after function name in Python
Posted by: admin 2 days, 21 hours ago (Comments) We often find underscore(s) before and after the function name in python while reading the source code. Do you know why and where it has to be used? I’ll impart the use of underscore in Python’s function name. There are three possibilities of underscore occurred in function name, one […]
Django: Run Multiple Update Queries Faster with Database transaction
Posted by: admin 3 days, 22 hours ago (Comments) Django’s default behaviour is to run autocommit mode. Each query is immediately committed to the database unless a transaction is active. Django provides a single API to control database transactions. atomic allows us to create a block of code or a function within which the atomicity of the database is guaranteed. If […]
Zkomp – Light weight command line archiver
Posted by: admin 3 weeks, 3 days ago (Comments) Zkomp is a light weight command line archive manager for all Linux distros. Create archives. Extract files from archive. How to use ? Zkomp is very ease to use. Download the zkomp Extract it and goto zkomp folder run ./zkomp –help usage: ./zkomp [OPTIONS] OPTIONS: -s –source: Input […]
Mezzanine: Adding recent post in home page
Posted by: admin 2 weeks, 3 days ago (Comments) Mezzanine is a powerful, consistent, and flexible content management platform. Built using the Django framework, Mezzanine provides a simple yet highly extensible architecture that encourages diving in and hacking on the code. To display the recent post in home page, Just copy and paste the below code in […]