Skip to content

Instantly share code, notes, and snippets.

View fuzzysteve's full-sized avatar
💭
Building shit

Steve Anderson / Steve Ronuken fuzzysteve

💭
Building shit
View GitHub Profile
@fuzzysteve
fuzzysteve / query.sql
Created March 7, 2016 15:56
SQLite query to produce a list of everything in a market group (recursively). Needs at least 3.8
WITH RECURSIVE child_groups(marketGroupID) AS ( Values(4) union select invMarketGroups.marketGroupID from invMarketGroups, child_groups where invMarketGroups.parentGroupID=child_groups.marketGroupID) select typename from child_groups join invTypes on invTypes.marketGroupID=child_groups.marketGroupID order by typename
@fuzzysteve
fuzzysteve / gist:03f00f46c50a881ffdb4
Created January 1, 2016 20:59
basic emdr reader
#!/usr/bin/env pythonimport zlib
# This can be replaced with the built-in json module, if desired.
import simplejson
import datetime
from datetime import datetime
import gevent
from gevent.pool import Pool
from gevent import monkey; gevent.monkey.patch_all()
import zmq.green as zmq
import zlib
@fuzzysteve
fuzzysteve / Forge-Sell.py
Created August 29, 2015 17:56
A little python script to stuff memcache and redis with price data from the Forge.
from sqlalchemy import create_engine
import redis
import time
import requests
import datetime
import memcache
def RateLimited(maxPerSecond):
minInterval = 1.0 / float(maxPerSecond)
@fuzzysteve
fuzzysteve / evemailuploader.py
Created August 17, 2015 19:51
evemail uploader to gmail
import base64
from email.mime.text import MIMEText
import mimetypes
import httplib2
import os
import ConfigParser
import re
import datetime
from email import utils
@fuzzysteve
fuzzysteve / gist:5b14e9a2a829fccdba26
Created August 15, 2015 23:37
public crest downloader
import argparse
import textwrap
import wx
from wx.lib.pubsub import pub
import os
import csv
import requests
import grequests
import time
import locale
@fuzzysteve
fuzzysteve / wright.py
Created July 29, 2015 00:05
Wright script, with exclusions. Takes multiple arguments. number of candidates, ballot file, optional list of exclusions.
from collections import defaultdict
import sys
# --------
# - Read in the BLT file
# --------
fname = sys.argv[2]
fp = open(fname, "r")
@fuzzysteve
fuzzysteve / gist:28cef236c66ff388b732
Created May 29, 2015 18:35
new load prices for excel
Sub LoadPrices()
Dim oHttp As Object
Dim jsonText As String
Dim jsonObj As Dictionary
Dim jsonRows As Collection
Dim jsonRow As Dictionary
Dim costInex As Collection
Dim ws As Worksheet
Dim currentRow As Long
Dim startColumn As Long
@fuzzysteve
fuzzysteve / gist:820cd2573d87a1d20d87
Created February 18, 2015 11:56
Google sheets stuff, using CREST
/*
Doesn't currently do anything other than dump some region information into the log.
Uses https://github.com/googlesamples/apps-script-oauth2
Details for the setup of that are on the page. short version:
Add the library MswhXl8fVhTFUH_Q3UOJbXvxhMjh3Sh48 to your sheet code. Resources -> libraries
get the project key from file-> project properties
@fuzzysteve
fuzzysteve / gist:909b6a868b168e070866
Last active August 29, 2015 14:12
load system volume
function loadSystemVolume(typeid,systemID,sellbuy,cachebuster){
if (typeof systemID == 'undefined'){
systemID=30000142;
}
if (typeof typeid == 'undefined'){
throw 'need typeids';
}
if (typeof cachebuster == 'undefined'){
cachebuster=1;
}
@fuzzysteve
fuzzysteve / gist:78c8952afc3d70d5f388
Created November 20, 2014 17:06
An initial draft of a handler for Crest. Market data only at the moment.
<?php
namespace FuzzyCrest;
use FuzzyCrest;
class CrestHandler
{
private $useragent="Fuzzwork Market agent 1.0";
private $expiry=0;