krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: August 2014
http://krosinski.blogspot.com/2014_08_01_archive.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Sunday, August 31, 2014. Possible I/O Errors while starting a new process from a daemon script (Popen). I recently had a problem with one of my document processing application crashing after trying to revive malfunctioned workers, with an:. OSError: [Errno 5] Input/output error. Inspecting multiprocessing/forking.py :. Win32': # some not importent stuff class Popen(object): def init (self, process obj): sys.stdout&#...
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: August 2012
http://krosinski.blogspot.com/2012_08_01_archive.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Thursday, August 30, 2012. Extracting data from excel spreadsheets (xls) using xlrd. So what do you usually say when somebody asks you to extract some data from an excel spreadsheet for additional processing? I believe something like: "- beep- , can't you convert it to CSV? Censored). Usually converting a spreadsheet to CSV is THE way to go. Sudo pip install xlrd. Now for an example:. Import xlrd #open the spreadsheet w...
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: Python code readability - PEP 8
http://krosinski.blogspot.com/2013/01/python-code-readability-pep-8.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Thursday, January 31, 2013. Python code readability - PEP 8. The thing I would like to talk about is PEP 8. Also known as the Style Guide for Python Code. As you may know, the proposed name convention differs a bit from other high level programming languages (like Java, whitch its known for UlitimateLongAndDescriptiveClassName. Naming convetion, along with other funny things like evenLongerAndMoreSpohisticatedMethodNames.
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: June 2012
http://krosinski.blogspot.com/2012_06_01_archive.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Thursday, June 28, 2012. Generating sounds using the Open Sound System audio interface. Recently I started implementing a tool for learning music scales. I've done some research and found a way of utilising /dev/dsp. In python. If you don't know what is that device file responsible I'll give you a hint. Make sure you have your speakers on, and type in:. Module you could try the following:. Check the Shanonn's Law. 10 ti...
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: January 2014
http://krosinski.blogspot.com/2014_01_01_archive.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Saturday, January 25, 2014. Python list, set and dict comprehentions 2.7. Python supports list comprehension since v2.0. These expressions truly revolutionized python, making various functions much simpler and more readable. Let's see some basic LC in action:. X for x in "test"]. T', 'e', 's', 't']. Now often there is a need to generate a set. In a similar way, so I often see such code:. Set([x for x in "test"]). The on...
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: January 2013
http://krosinski.blogspot.com/2013_01_01_archive.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Thursday, January 31, 2013. Python code readability - PEP 8. The thing I would like to talk about is PEP 8. Also known as the Style Guide for Python Code. As you may know, the proposed name convention differs a bit from other high level programming languages (like Java, whitch its known for UlitimateLongAndDescriptiveClassName. Naming convetion, along with other funny things like evenLongerAndMoreSpohisticatedMethodNames.
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: May 2012
http://krosinski.blogspot.com/2012_05_01_archive.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Wednesday, May 30, 2012. Heterogeneous system administration issues. I know heterogeneous environments became popular lately, but hey - let's talk about the drawbacks of such systems. So for example let us visualise a process that is dependant on Windows. That run on three separate machines. For example, it took me some time to get familiar with using Darwin's. Entry is an overkill. And proceeds with his task. Howev...
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: July 2012
http://krosinski.blogspot.com/2012_07_01_archive.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Tuesday, July 31, 2012. Potential problems with custom primary keys in django ORM. I had a strange situation lately that encouraged me to do some research about how django really handles primary keys. Functions, which makes it easier to filter data (no need for subselects). But let's look at this situation:. Name = models.CharField(primary key=True, max length=100). Dude(name='John', * some fields).save(). Dudeobjects&#...
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: A few words on boolean casting/mapping in python
http://krosinski.blogspot.com/2013/12/a-few-words-on-boolean-castingmapping.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Monday, December 9, 2013. A few words on boolean casting/mapping in python. So I thought I'd write a few words about truth value testing in python. It's quite common to if some object. Conditionals, and I believe that programmers are not always aware of what actually happens when such a line is being evaluated, and tend to perceive it only as len(some object) 0. If it's a collection or some object is not None. In case o...
krosinski.blogspot.com
My thoughts on computers, programming, ancient spell scrolls and other magic devices...: A non-production function decorator
http://krosinski.blogspot.com/2013/02/a-non-production-function-decorator.html
My thoughts on computers, programming, ancient spell scrolls and other magic devices. Thursday, February 14, 2013. A non-production function decorator. As most developers know, not every piece of code is meant to be run on a production server. Instead of using a lot of "ifs". Here and there I suggest implementing a framework specific "non production". Decorator. A simple django-specific implementation could look like this:. Now all you have to do is to apply it to your dev/test only functions:.
SOCIAL ENGAGEMENT