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 json | |
import os | |
import sqlite3 | |
import sys | |
def dict_factory(cursor, row): | |
d = {} | |
for idx, col in enumerate(cursor.description): | |
d[col[0]] = row[idx] |
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
""" | |
PoC for address verification via USPS API | |
Docs: https://www.usps.com/business/web-tools-apis/address-information-api.htm#_Toc487629493 | |
""" | |
import argparse | |
from bs4 import BeautifulSoup | |
import requests | |
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 small module for getting the prices of bitcoin and litecoin from https://preev.com | |
Works for both Python 2 and 3. Easily importable and requires only a simple call. | |
''' | |
try: | |
from urllib import urlopen | |
except ImportError: | |
# py 3 | |
from urllib.request import urlopen | |
import json |
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
''' | |
Copyright 2016 Sean Beck | |
MIT license | |
A simple script that provides a function to send an email via Mailgun. | |
This requires obtaining an API key from Mailgun. | |
You must also supply the function with the domain name associated with your account. | |
Mailgun will generate one for you, so just use that if you do not have your own domain. | |
''' | |
import requests |
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 time | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
url = 'http://www.supremenewyork.com/shop/jackets/silk-bomber/navy' | |
driver = webdriver.Firefox() | |
driver.get(url) | |
add = driver.find_element_by_name('commit') |
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
Servo serv; | |
int pos = 0; | |
void setup() { | |
serv.attach(D0); | |
Spark.function("setpos", setPos); | |
Spark.variable("getpos", &pos, INT); | |
} | |
void loop() { |
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
''' | |
Easy Mac | |
Copyright (2015) Sean Beck | |
Licensed under Creative Commons Attribution-ShareAlike 4.0 International | |
See: https://creativecommons.org/licenses/by-sa/4.0/ | |
Easily change your MAC address on Linux using `ifconfig` | |
''' | |
#!/usr/bin/python2.7 |
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
args={...} | |
function gen_attribute(array) | |
local a=math.random(0,#array-2) | |
return math.random(array[a],array[a+1]) | |
end | |
function get_body_size(caste,time) |
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
''' | |
something something docstring | |
''' | |
from Crypto.Hash import SHA | |
BLOCK_SIZE = SHA.digest_size | |
O_CONST = 0x5c | |
I_CONST = 0x36 |
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 time | |
from subprocess import Popen | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
import requests | |
from bs4 import BeautifulSoup | |
URL = 'http://www.silverpriceoz.com/silver-price-per-ounce/' |
NewerOlder