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
# From http://ars.userfriendly.org/cartoons/?id=20080727 | |
import os, random | |
def screen_clear(): | |
# for mac and linux(here, os.name is 'posix') | |
os.system('clear') if os.name == 'posix' else os.system('cls') | |
# Diamond, Heart, Club, Spades, in this order. | |
suits_map = { "D": True, "H": True, "C": False, "S": False, } |
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
import logging | |
import socks # use pysocks | |
import asyncio | |
from datetime import datetime | |
from itertools import cycle | |
logging.basicConfig(level=logging.INFO) | |
socks_router_loop = cycle(( # simple round-robin router to socks proxies | |
('127.2.0.0', 9050, None, None), # address, port, username, password | |
# ('127.3.0.0', 9050, "proxy", "passwordpassword"), |
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
from decimal import Decimal, getcontext | |
import math | |
from itertools import cycle | |
ctx = getcontext() | |
ctx.prec = 256 | |
LI_PRECISION = 300 | |
# Constant from: http://www.plouffe.fr/simon/constants/gamma.txt | |
euler_mascheroni = Decimal( | |
'.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495146314472498070824809605040144865428362241739976449235362535003337429373377376739427925952582470949160087352039481656708532331517766115286211995015079847937450857057400299213547861466940296043254215190587755352') |
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
I was drawn to programming, science, technology and science fiction | |
ever since I was a little kid. I can't say it's because I wanted to | |
make the world a better place. Not really. I was simply drawn to it | |
because I was drawn to it. Writing programs was fun. Figuring out how | |
nature works was fascinating. Science fiction felt like a grand | |
adventure. | |
Then I started a software company and poured every ounce of energy | |
into it. It failed. That hurt, but that part is ok. I made a lot of | |
mistakes and learned from them. This experience made me much, much |
NewerOlder