I hereby claim:
- I am ethanal on github.
- I am ethanal (https://keybase.io/ethanal) on keybase.
- I have a public key whose fingerprint is 178B 38FA 151F C237 625D 55B0 944F E97D 33AB DB60
To claim this, I am signing this object:
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |
import org.apache.poi.ss.usermodel.Sheet; | |
import org.apache.poi.ss.usermodel.Workbook; |
\documentclass[11pt]{article} | |
\usepackage[letterpaper]{geometry} | |
\geometry{top=0.5in, bottom=0.5in, left=0.7in, right=0.7in} | |
\usepackage{courier} | |
\usepackage{listings} | |
\usepackage{fancyhdr} | |
\pagestyle{fancy} |
import os | |
import sys | |
import platform | |
def _style(code): | |
def wrapper(string): | |
if os.isatty(sys.stdout.fileno()) and platform.system() != "Windows": | |
return "\033[{:02}m{}\033[00m".format(code, string) | |
return string |
import functools | |
from time import time | |
from .text_styles import * | |
class ProfileItem(object): | |
def __init__(self, name, elapsed, stats): | |
self.name = name | |
self.elapsed = elapsed |
I hereby claim:
To claim this, I am signing this object:
def invert(b): | |
return "".join(str(int(not int(c))) for c in b) | |
def encode_float(f): | |
b = bin(abs(int(round(f * 1e5))))[2:] | |
b = ("0" * (32 - len(b))) + b | |
if f < 0: | |
b = invert(b) |
def baseconv(v1, a1, a2): | |
if v1 == a1[0]: return a2[0] | |
v2 = "" | |
n1 = {c: i for i, c in enumerate(a1)} | |
b1 = len(a1) | |
b2 = len(a2) | |
d1 = 0 | |
for i, c in enumerate(v1): | |
d1 += n1[c] * pow(b1, len(v1) - i - 1) |
import cStringIO as StringIO | |
from random import randint | |
import sys | |
from PIL import Image | |
import wand.image | |
input_filepath = sys.argv[1] | |
img = Image.open(input_filepath) |
print([(i%3==0)*"Fizz"+(i%5==0)*"Buzz" or i for i in range(100)]) |