I hereby claim:
- I am jchysk on github.
- I am jchysk (https://keybase.io/jchysk) on keybase.
- I have a public key whose fingerprint is 4697 5E88 C723 4E13 57E0 E88D BC7F C851 B93C C464
To claim this, I am signing this object:
#!/bin/bash | |
for f in *.jpeg; do convert ./"$f" ./"${f%.jpeg}.pdf"; done | |
for f in *.pdf; do gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -sOutputFile="${f%.pdf}.compressed.pdf" "$f"; done |
""" | |
from helpers import generate_RSA, encrypt_RSA, generate_password, decrypt_RSA, generate_AES, decrypt_AES, pad | |
priv, pub = generate_RSA() | |
encrypted = encrypt_RSA(pub, generate_password()) | |
key, iv, encryptor = generate_AES() | |
aes_encrypted = encryptor.encrypt(pad("this is a very long string " * 25)) | |
decrypt_AES(key, iv, aes_encrypted) | |
""" | |
BS = 16 |
def pub_to_e_n(key): | |
""" | |
Converts a .pub public key to an exponent and n value | |
:param key: String. Public key | |
:return: e as Int | |
:return: n as Long | |
""" | |
import base64 | |
import struct | |
/** | |
* Framework independent function to load CSS | |
* @param path To the CSS file | |
* @returns {HTMLElement} | |
*/ | |
function loadStyleSheet(path) { | |
var head = document.getElementsByTagName( 'head' )[0], // reference to document.head for appending/ removing link nodes | |
link = document.createElement( 'link' ); // create the link node | |
link.setAttribute( 'id', 'cssLKLoad'); // set ID to check if already loaded | |
link.setAttribute( 'href', path ); |
SUITS = ["clubs", "diamonds", "hearts", "spades"] | |
class Card(object): | |
one_to_fifty_two = None | |
number = None | |
suit = None | |
positions = None | |
def __init__(self, number, suit, value): |
""" | |
Pick a random winner | |
""" | |
if __name__ == '__main__': | |
import sys | |
entries = sys.argv[1] | |
import requests | |
# Grab the latest hash | |
latest_hash = requests.get("https://blockchain.info/q/latesthash") |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
""" | |
Takes a csv of email addresses and gives back a csv of the email addresses that have a resolvable domain. | |
""" | |
domains = list() | |
checked = [] | |
checked_bad = [] | |
import socket |
# Docker controller | |
# example usage | |
# fab local_os restart_env | |
from fabric.api import * | |
def _vagrant(): | |
env.user = "vagrant" |
#Daut's edited secretary problem | |
#function which randomizes a list | |
def randomize_rankings(sec): | |
import random | |
random.shuffle(sec) | |
return sec | |
#function which returns a secretary based on Daut's algorithm | |
def chooseSecretary(sec): |