Skip to content

Instantly share code, notes, and snippets.

View SteveHere's full-sized avatar
💭
Looking for work

Steve SteveHere

💭
Looking for work
View GitHub Profile
@SteveHere
SteveHere / It's_an_RIAA_world_after_all.py
Last active July 4, 2022 02:47
Small game about copyright (It's an RIAA world after all)
# 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, }
@SteveHere
SteveHere / proxy_socks2http.py
Last active October 30, 2023 03:25 — forked from zengxs/proxy_socks2http.py
Prettification + update to current asyncio syntax (Python 3.11+)
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"),
@SteveHere
SteveHere / logarithmic_integral.py
Last active July 27, 2020 01:51
Simple logarithmic integral
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')
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