Skip to content

Instantly share code, notes, and snippets.

View TimonPeng's full-sized avatar
🔥
Passion

Timon Peng TimonPeng

🔥
Passion
View GitHub Profile
#!/usr/bin/env python
#coding=utf-8
import threading
import time, random, sys
class Counter:
def __init__(self):
self.lock = threading.Lock()
self.value = 0
@TimonPeng
TimonPeng / make_png_to_icon.py
Created August 20, 2016 13:16
Generate .ico files.
#!/usr/bin/env python
#coding=utf-8
# pip install Pillow
# http://pillow.readthedocs.io/
from PIL import Image
filename = r'logo.png'
import redis
import json
import requests
import time
r = redis.StrictRedis(password="PASSWORD HERE")
ethToWei = 1000000000000000000
def sendTx(fromAddr, to, wei):