This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
fa = open(sys.argv[1], 'rt') | |
fb = open(sys.argv[2], 'rt') | |
keywords = {} | |
for line in fa.readlines(): | |
keyword = line.strip() | |
keywords[keyword] = 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header#header { | |
.navbar-inner { | |
padding-right: 0; | |
padding-left: 0; | |
-webkit-border-radius: 0; | |
-moz-border-radius: 0; | |
border-radius: 0; | |
} | |
.container { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for line in file.readlines(): | |
parts = line.split(':') | |
print parts[-2], parts[-1] | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
f2_ids = set() | |
f2 = open('file2.txt', 'rt') | |
f2_reader = csv.reader(f2) | |
for row in f2_reader: | |
f2_ids.add(row[0]) | |
f1 = open('file1.txt', 'rt') | |
for line in f1.readlines(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EEEEEEEEEEEEEEEE | |
====================================================================== | |
ERROR: Failure: InvalidRequestError (Table 'charge_subscription' is already defined for this MetaData instance. Specify 'extend_existing=True' to redefine options and columns on an existing Table object.) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "C:\GitHub\billy\env\lib\site-packages\nose-1.3.0-py2.7.egg\nose\loader.py", line 413, in loadTestsFromName | |
addr.filename, addr.module) | |
File "C:\GitHub\billy\env\lib\site-packages\nose-1.3.0-py2.7.egg\nose\importer.py", line 47, in importFromPath | |
return self.importFromDir(dir_path, fqname) | |
File "C:\GitHub\billy\env\lib\site-packages\nose-1.3.0-py2.7.egg\nose\importer.py", line 94, in importFromDir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EEEEEEEEEEEEEEE | |
====================================================================== | |
ERROR: Failure: ImportError (cannot import name sample_customer_2) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "C:\GitHub\billy\env\lib\site-packages\nose-1.3.0-py2.7.egg\nose\loader.py", line 413, in loadTestsFromName | |
addr.filename, addr.module) | |
File "C:\GitHub\billy\env\lib\site-packages\nose-1.3.0-py2.7.egg\nose\importer.py", line 47, in importFromPath | |
return self.importFromDir(dir_path, fqname) | |
File "C:\GitHub\billy\env\lib\site-packages\nose-1.3.0-py2.7.egg\nose\importer.py", line 94, in importFromDir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
begin = datetime.time(11, 48) | |
end = datetime.time(12, 15) | |
#timedelta = end - begin | |
#print timedelta | |
timedelta = datetime.timedelta(seconds=26) | |
def time_add(t, delta): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FILES=$(git diff HEAD^ HEAD --name-only --diff-filter=ACM | grep -e '\.py$') | |
for f in $FILES | |
do | |
# auto pep8 correction | |
autopep8 --in-place --ignore=E309,E501,W293 $f | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import winsound | |
import time | |
# Base tune | |
D_BASE = 264 | |
# How long a meter is | |
METRE = 500 | |
DO = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import sys | |
import ast | |
import textwrap | |
def parse_setup(setup_filename): | |
"""Parse setup.py and return args and keywords args to its setup | |
function call |
OlderNewer