Skip to content

Instantly share code, notes, and snippets.

View lost-theory's full-sized avatar

Steven Kryskalla lost-theory

View GitHub Profile
@lost-theory
lost-theory / keybase.md
Created March 29, 2020 21:25
keybase.md

Keybase proof

I hereby claim:

  • I am lost-theory on github.
  • I am stevek (https://keybase.io/stevek) on keybase.
  • I have a public key whose fingerprint is D95C DED5 B2FE 16BF 8D7C 2CAF F3AE 0B74 973D 230D

To claim this, I am signing this object:

@lost-theory
lost-theory / 01_walkthrough.md
Last active April 2, 2016 20:10
Conda app local development on OSX and deploying to Heroku

Downloaded Miniconda installer from here:

http://conda.pydata.org/miniconda.html

In a terminal:

$ sh ./Downloads/Miniconda-latest-MacOSX-x86_64.sh
Enter (read license agreement)
yes (accept license agreement)

Enter (use default installation location)

'''
http://stackoverflow.com/questions/31632461/can-mechanize-support-ajax-filling-out-forms-via-javascript/
'''
import urllib.parse, urllib.request
URL = "https://interactive.web.insurance.ca.gov/survey/survey?type=homeownerSurvey&event=HOMEOWNERS"
LOCATIONS = '''
ALAMEDA ALAMEDA
@lost-theory
lost-theory / minimal.sh
Created July 24, 2015 21:04
minimal python package
$ find . -type f -name "*.py"
./setup.py
./mypkg/__init__.py
./mypkg/config.py
./mypkg/shapes/__init__.py
./mypkg/shapes/square.py
$ find . -type f -name "*.py" | xargs head -n999
==> ./setup.py <==
from setuptools import setup, find_packages
import yaml
tree = yaml.load('''
---
- folder1
- folder2:
- subfolder1:
- deepfolder1
- subolder2
- folder3
import os
from flask import Flask, Blueprint, g
api = Blueprint('api', __name__)
class Server(object):
def __init__(self, data):
self.data = data
@lost-theory
lost-theory / keybase.md
Created December 15, 2014 09:57
github identity proof for keybase.io

Keybase proof

I hereby claim:

  • I am lost-theory on github.
  • I am stevek (https://keybase.io/stevek) on keybase.
  • I have a public key whose fingerprint is 5393 7141 0A78 7E8A C2B2 6FBC C662 4F35 8456 52AB

To claim this, I am signing this object:

>>> orange_vit_c = "78 mg, 130%"
>>> orange_vit_c = (78, 130) #mg, %
>>> tablet_vit_c = (250, 416)
>>> 250/78.0
3.2051282051282053
>>> 416/130.
3.2
>>> drink_vit_c = (None, 1500)
>>> rda_vit_c = (90, 100)
>>> #i've eaten 1500 + (416*3) percentage points of Vitamin C
from datetime import datetime
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import Redis
from rq_scheduler import Scheduler
from rq_scheduler.utils import to_unix
class CustomRQScheduler(Scheduler):
@lost-theory
lost-theory / notes.md
Last active October 8, 2016 17:56
DevOps Master Class & Opbeat Launch, 2014-09-26