View solidity_ast.py
#!/usr/bin/env python
from __future__ import print_function
import sys
import json
import subprocess
def hydrate(ast):
if isinstance(ast, dict):
if 'nodeType' in ast:
nodeType = globals().get(ast['nodeType'], Node)
View etherscrape.py
#!/usr/bin/env python
from __future__ import print_function
import os
import requests
import codecs
from bs4 import BeautifulSoup
ETHERSCAN_URL = 'https://etherscan.io/'
View output-example.json
[
{
"body": [
{
"access": [
"public"
],
"name": "name",
"type": "string",
"value": "'Mainstreet Token'"
View topological_sort.py
def topological_sort(source):
"""perform topo sort on elements.
:arg source: list of ``(name, [list of dependancies])`` pairs
:returns: list of names, with dependancies listed first
"""
pending = [(name, set(deps)) for name, deps in source.items()] # copy deps so we can modify set in-place
emitted = []
while pending:
View lisp.py
import re
import sys
def parse_any(symbols):
while len(symbols):
if symbols[0] == '(':
return parse_list(symbols[1:])
if symbols[0] == "'":
symbols, inner = parse_any(symbols[1:])
return symbols, ['quote', inner]
View ethpipe.sol
pragma solidity ^0.4.13;
/*
EthPipe creates cryptographically secure off-chain financial channels.
Copyright (C) 2017 Harry Roberts
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
View sqrt.py
# -*- coding: utf-8 -*-
from z3 import *
SOLVER = Solver()
# √x
Y = Real("Y")
X = Y * Y
SOLVER.add(Y > 0.0)
View titleindex.py
#!/usr/bin/env python
from __future__ import print_function
import json
import re
from base64 import b32encode
from hashlib import sha1
RE_SPLIT = re.compile('[\.]')
View check-ssl-domains.sh
#!/usr/bin/env bash
check_domain () {
local DOMAIN=$1
local LOCATION=`curl -vq -o /dev/null http://$DOMAIN/ &> /dev/stdout | grep Location:`
curl -vq -o /dev/null https://$DOMAIN/ &> /dev/null
echo -n "$DOMAIN "
OK=$?