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/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
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/env python | |
# | |
# Scott Hendrickson | |
# 2012-03-18 | |
# | |
import sys | |
import re | |
import urllib | |
import httplib2 |
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 os, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
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
# a bit of a hack | |
# by Cormac Relf - cormacrelf.com - @cormacrelf | |
# Opens the url on the clipboard in Safari | |
# by opening Google Chrome with an x-callback-url | |
# that takes you to the same url in Safari. | |
# I guess you could just open it in googlechrome:// | |
import webbrowser |
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 urllib | |
import tarfile | |
import shutil | |
import console | |
import os | |
class Installer(object): | |
name = None | |
version = None | |
firstLetter = None |
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 urllib2 | |
import json | |
data = urllib2.urlopen("http://api.bitcoincharts.com/v1/weighted_prices.json") | |
def convert_to_bitcoin(amount, currency): | |
bitcoins = json.loads(data.read()) | |
converted = float(bitcoins[currency]["24h"]) * amount | |
print converted |
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
_ =r"""A(W//2,*M(3*G | |
*G*V(2*J%P),G,J,G)+((M((J-T) | |
*V((G-S)%P),S,T,G)if(S@(G,J))if(W% | |
2@(S,T)))if(W@(S,T);H=2**256;import&hash | |
lib&as&h,os,re,binas cii&as&k;J$:int(k.b2 | |
a_hex(W),16);C$:C(W// 58) +[W%58]if(W@[];X | |
=h.new("ripemd1 60 ");Y$:h.sha256(W). | |
digest();I$d=32: I(W//256,d-1)+bytes | |
([W%256])if(d>0@b""; U$:J(k.a2b_base6 | |
4(W));f=J(os.urandom (64))% (H-U(b"AUVRIxlQ |
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
from __future__ import print_function, division | |
""" | |
Example of how calculations on the secp256k1 curve work. | |
secp256k1 is the name of the elliptic curve used by bitcoin | |
see http://bitcoin.stackexchange.com/questions/25382 | |
""" | |
## the prime modules used in the elliptic curve coordinate calculations | |
p = 2**256 - 2**32 - 977 |
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
""" | |
Bitcoin spray: distribute BTC from a coinbase.com account into many addresses | |
generated by a deterministic wallet (an electrum wallet). | |
1.0 BTC -> | |
0.01 BTC | |
0.01 BTC | |
0.01 BTC | |
etc.. |
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/env python | |
""" | |
burn-btc: create a bitcoin burn address | |
By James C. Stroud | |
This program requries base58 (https://pypi.python.org/pypi/base58/0.2.1). | |
Call the program with a template burn address as the only argument:: |
OlderNewer