Skip to content

Instantly share code, notes, and snippets.

@rweir
rweir / file.py
Last active August 29, 2015 14:08 — forked from vvikramjhu/file.py
counta = 0
countb = 0
countc = 0
with open( "a.txt", 'a') as a:
with open( "b.txt", 'a') as b:
with open( "c.txt", 'a') as c:
# Iterate over readlines from myFile.xml and parse data
if ( counta == 300000 ):
with open( "a1.txt" , 'a') as a1:
a1.write()...
### Keybase proof
I hereby claim:
* I am rweir on github.
* I am rweir (https://keybase.io/rweir) on keybase.
* I have a public key whose fingerprint is 8ADA 1F85 D173 90E6 9DBB 5F0F 06FF B0CF BD77 0C81
To claim this, I am signing this object:
@rweir
rweir / gist:1051000
Created June 28, 2011 12:06
The XY problem
12:06 < Minkben> what's the equivalent of socket.SO_REUSEADDR on twisted?
12:06 < bob2> are you /sure/ you want that?
12:07 < Minkben> I am developing it atm, and if I force close the server it still is bound to the host/post for a while, so I can't restart it
12:07 < bob2> force close?
12:07 < Minkben> ctrl + z
12:08 < bob2> oh, windows
12:08 < Minkben> no, debian linux
12:08 < TheSheep> that doesn't force close
12:08 < bob2> ctrl-z doesn't kill anything on unix, it suspends
12:08 < Minkben> oh, that explains alot
@rweir
rweir / Output
Created June 22, 2011 05:14 — forked from Senix/Output
Traceback (most recent call last):
File "/home/look/workspace/slug_lancer/src/down.py", line 11, in <module>
os.system('wget http://www.sluggy.com/images/comics/'+mage+lett+imagetype)
TypeError: cannot concatenate 'str' and 'int' objects