przemoc

Poland

przemoc.net

Age: 27

Realist and pragmatist. Strong-willed and strong-minded. Sometimes taciturn, sometimes loquacious. FLOSS enthusiast but still using Windows. Stuck in the endless process of becoming a Linux wizard.

Feb
23
awarded Yearling
Feb
23
awarded Yearling
Feb
11
comment How to create a timeline with LaTeX?
@PatrickT: Any improvements in the answers are always welcomed, so obviously I cannot mind. :)
Feb
11
awarded Necromancer
Feb
3
awarded Good Answer
Dec
31
awarded Yearling
Dec
30
awarded Popular Question
Dec
19
awarded Enlightened
Dec
19
awarded Nice Answer
Dec
19
awarded Scholar
Dec
19
accepted "[somebody]'s theme" vs "[somebody] theme" — Saxon genitive dillema
Dec
17
awarded Supporter
Dec
17
awarded Student
Dec
17
asked "[somebody]'s theme" vs "[somebody] theme" — Saxon genitive dillema
Dec
12
revised In Python, how to convert array of bits to array of bytes?
Simplified grouping bits into bytes.
Dec
12
comment In Python, how to convert array of bits to array of bytes?
This is what you get, when you become dormant language user... The whole zip(*[itertools.islice(bits, i, None, 8) for i in range(0,8)]) can be obviously simplified into zip(*(iter(bits),) * 8). I'll fix it in the answer too.
Dec
12
comment In Python, how to convert array of bits to array of bytes?
In case of bits array that uses values different than 0 and 1, fix byte[b] accordingly, e.g. use [0,1][byte[b]>0] instead.
Dec
12
revised In Python, how to convert array of bits to array of bytes?
Explained better what provided code expects.
Dec
12
answered In Python, how to convert array of bits to array of bytes?
Dec
4
comment The best way to ensure only 1 copy of bash script is running?
@CarlosP: No. Under the hood flock uses simply flock(2) syscall and it doesn't provide such information nor it even should. If you want to unreliably check, whether there is a lock present (or lack thereof), i.e. without holding it, then you have to try to acquire it in a non-blocking way (exlock_now) and release it immediately (unlock) if you succeeded. If you think that you need to check the lock presence without changing its state, then you're possibly using wrong tools to solve your problems.
1 2 3 4 5