This file contains hidden or 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
| time ./scripts/cassamine.py > record.txt | |
| Traceback (most recent call last): | |
| File "./scripts/cassamine.py", line 32, in <module> | |
| main() | |
| File "./scripts/cassamine.py", line 24, in main | |
| 'sha1': gen_hash(word, 'sha1'), }) | |
| File "/usr/local/lib/python2.6/dist-packages/pycassa/columnfamily.py", line 755, in insert | |
| write_consistency_level=write_consistency_level) | |
| File "/usr/local/lib/python2.6/dist-packages/pycassa/columnfamily.py", line 773, in batch_insert | |
| batch.send() |
This file contains hidden or 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
| #!/utilisateur/bin/frython | |
| @privé | |
| le debut class (ma variable) | |
| le debut init(moi) | |
| imprime 'Bonjour Monde' | |
| le fin | |
| le fin |
This file contains hidden or 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/python2.6 | |
| import datetime | |
| dates = [ | |
| datetime.date(2011, 01, 01), | |
| datetime.date(2011, 01, 11), | |
| datetime.date(2011, 01, 15), | |
| datetime.date(2011, 01, 25), | |
| datetime.date(2011, 01, 30), |
This file contains hidden or 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
| /* dijkstra.q: Dijkstra's shortest path algorithm 10-21-01 AG */ | |
| import bag, dict, graph; | |
| public dijkstra G S T; | |
| private search G S T ST, search2 G S T ND ST; | |
| private queue DIST, head Q, rmhead Q, change Q N D1 D2; |
This file contains hidden or 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/python2.6 | |
| import random | |
| # yields a random customer id | |
| def random_generator(percentage): | |
| for customer in xrange(1000000): | |
| if random.randrange(0, 100, 1) < percentage: | |
| yield customer |
This file contains hidden or 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/python2.6 | |
| import random | |
| values = range(0, 1000000) | |
| customers = [] | |
| unpaid_customers = [] | |
| # generate a bunch of random values between 0 - 1000 | |
| for value in values: |
This file contains hidden or 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/python2.6 | |
| import random | |
| values = range(0, 1000000) | |
| customers = [] | |
| unpaid_customers = [] | |
| # generate a bunch of random values between 0 - 1000 | |
| for value in values: |
This file contains hidden or 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/python2.6 | |
| import random | |
| values = range(0, 10000) | |
| customers = [] | |
| unpaid_customers = [] | |
| # generate a bunch of random values between 0 - 1000 | |
| for value in values: |
This file contains hidden or 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
| Hi gisty! |
This file contains hidden or 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/python2.6 | |
| from setuptools import setup | |
| setup( | |
| name='gisty', | |
| version='0.1', | |
| description='Upload your code to gist.github.com based on https://gist.github.com/763188', | |
| keywords='Gist Github', | |
| package_dir = {'': 'src'}, |