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
# The data | |
> db.minmax.find() | |
{ "_id" : ObjectId("4e7e1814f836a6cd3f414909"), "ichi" : 13046, "ni" : 28664, "san" : 16392 } | |
{ "_id" : ObjectId("4e7e1814f836a6cd3f41490a"), "ichi" : 21565, "ni" : 6487, "san" : 23549 } | |
{ "_id" : ObjectId("4e7e1814f836a6cd3f41490b"), "ichi" : 21904, "ni" : 29534, "san" : 15345 } | |
{ "_id" : ObjectId("4e7e1814f836a6cd3f41490c"), "ichi" : 22511, "ni" : 4158, "san" : 32184 } | |
{ "_id" : ObjectId("4e7e1814f836a6cd3f41490d"), "ichi" : 16347, "ni" : 22774, "san" : 3930 } | |
{ "_id" : ObjectId("4e7e1814f836a6cd3f41490e"), "ichi" : 26574, "ni" : 2486, "san" : 17466 } | |
{ "_id" : ObjectId("4e7e1814f836a6cd3f41490f"), "ichi" : 29113, "ni" : 16052, "san" : 17271 } | |
{ "_id" : ObjectId("4e7e1814f836a6cd3f414910"), "ichi" : 25451, "ni" : 3725, "san" : 24723 } |
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
>>> num = "15558675309" | |
>>> [num[0:x] for x in range(1, len(num))] | |
['1', '15', '155', '1555', '15558', '155586', '1555867', '15558675', '155586753', '1555867530'] | |
>>> [num[x:] for x in range(1, len(num))] | |
['5558675309', '558675309', '58675309', '8675309', '675309', '75309', '5309', '309', '09', '9'] |
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 | |
timezones_account_one= { | |
'United States of America': { | |
'Alaska': { | |
'America/Adak': 'Adak, Alaska, USA', | |
'America/Anchorage': 'Anchorage, Alaska, USA', | |
}, | |
'Idaho': { | |
'America/Los_Angeles': 'Coeur\'d Alene, Idaho, USA', |
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 hashlib | |
>>> import humanhash | |
>>> mysupersecrethash = hashlib.md5('mysupersecretpassword').hexdigest() | |
>>> mysupersecrethash | |
'117a520adbd19eff51100215aa7a7fbf' | |
>>> humanhash.humanize(mysupersecrethash) | |
'diet-johnny-green-bacon' |
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 zmq | |
import uuid | |
import random | |
context = zmq.Context() | |
recv = context.socket(zmq.SUB) | |
recv.setsockopt(zmq.SUBSCRIBE, '') | |
recv.connect('epgm://eth0;224.0.0.1:5555') |
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
remote refid st t when poll reach delay offset jitter | |
============================================================================== | |
+66.96.96.29 18.26.4.105 2 u 115 128 377 123.790 3.285 12.293 | |
+208.87.104.40 206.246.122.250 2 u 48 128 377 113.327 3.790 5.833 | |
-2600:3c00::e:d0 209.51.161.238 2 u 126 128 377 199.939 -17.237 27.844 | |
*173.244.211.10 204.42.158.152 2 u 54 128 377 41.247 3.867 21.763 | |
x127.127.28.0 .GPS. 0 l 9 16 377 0.000 -10614. 37.478 | |
127.127.28.1 .GPS1. 0 l - 64 0 0.000 0.000 0.000 |
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 select | |
import time | |
import zmq | |
import socket | |
context = zmq.Context() | |
dealer = context.socket(zmq.DEALER) | |
dealer.connect('tcp://localhost:5570') |
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 time | |
import zmq | |
import socket | |
context = zmq.Context() | |
dealer = context.socket(zmq.DEALER) | |
dealer.connect('tcp://localhost:5570') |
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
sspencer@bigboote:~$ cat /usr/bin/nano | |
#!/bin/sh | |
echo "Use VIM newb." | |
sspencer@bigboote:~$ :) |
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
entry_points={ | |
'console_scripts': [ | |
'whachuptu = whachuptu.__main__:run', | |
], | |
} | |
""" | |
(whachuptu)sspencer@bigboote:~/Projects/whachuptu$ python -m whachuptu asdf | |
['/home/sspencer/Projects/whachuptu/whachuptu/__main__.py', 'asdf'] | |
yay! |
OlderNewer