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
### Add these to your .bashrc | |
function new_prompt(){ | |
if [ -r bin/activate ]; then | |
. bin/activate | |
elif check_pyenv ; then | |
: | |
elif [ "$(type -t deactivate)" = "function" ]; then | |
deactivate | |
fi | |
} |
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 python3 | |
# -*- mode: python -*- | |
import random | |
import argparse | |
import sys | |
from string import ascii_letters | |
from string import digits | |
from string import punctuation | |
import os |
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 | |
from setuptools import setup | |
import os | |
import sys | |
if sys.version_info >= (3, 0): | |
from functools import reduce | |
class SetupError(Exception): |
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
# -*- mode: python -*- | |
macro TOTAL_TOKEN_COUNT: 11000000 # replace this with your token amount | |
macro sale_ongoing(): sload(1) | |
macro tokens_claimed(): sload(msg.sender) | |
def init(): | |
sstore(0, msg.sender) # stores the address to send money to after crowdsale | |
sstore(1, 1) |
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 serpent | |
from ethereum import tester as t | |
code = '''\ | |
def foo(x, flag): | |
with prefix = 0: | |
if flag == "double": | |
prefix = 0x6ffa1caa*2**248 | |
else: | |
prefix = 0x70cd69ae*2**248 |
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
# -*- mode: python -*- | |
def foo(x, flag): | |
with prefix = 0: | |
if flag == "double": | |
prefix = "\x6f\xfa\x1c\xaa" | |
else: | |
prefix = "\x70\xcd\x69\xae" | |
delegate_calldata = alloc(36) | |
with out = alloc(32): | |
mstore(ref(delegate_calldata), prefix / 2**248) |
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/python2 | |
import serpent | |
import socket | |
import sys | |
import json | |
coinbase = '0x5437fb967926e559c08dcfcb39eb3a224fecadae' | |
data = json.dumps({ | |
'jsonrpc': '2.0', |