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 / gist:9695750
Created March 21, 2014 20:33
Refinery levels by security status.
+------------------------+----------+----------+
| reprocessingEfficiency | count(*) | Security |
+------------------------+----------+----------+
| 0.5 | 2708 | high |
| 0.4 | 1 | high |
| 0.35 | 26 | high |
| 0.32 | 95 | high |
| 0.3 | 155 | high |
| 0.25 | 10 | high |
| 0.5 | 1476 | low |
@fuzzysteve
fuzzysteve / gist:10647593
Last active August 14, 2017 23:48
skill levels - Eve online
Style 1 : 1 row per type. multiple skills in each row.
select typeid, max(skill1) skill1,max(skill1level) skill1level,max(skill2) skill2,max(skill2level) skill2level,max(skill3) skill3,max(skill3level) skill3level,max(skill4) skill4,max(skill4level) skill4level,max(skill5) skill5,max(skill5level) skill5level,max(skill6) skill6,max(skill6level) skill6level from
(
select typeid,coalesce(valueint,valuefloat,0) skill1,0 skill1level,0 skill2,0 skill2level,0 skill3,0 skill3level,0 skill4,0 skill4level,0 skill5,0 skill5level,0 skill6,0 skill6level from dgmTypeAttributes where attributeID=182
union
select typeid,0 skill1,0 skill1level,coalesce(valueint,valuefloat,0) skill2,0 skill2level,0 skill3,0 skill3level,0 skill4,0 skill4level,0 skill5,0 skill5level,0 skill6,0 skill6level from dgmTypeAttributes where attributeID=183
union
select typeid,0 skill1,0 skill1level,0 skill2,0 skill2level,coalesce(valueint,valuefloat,0) skill3,0 skill3level,0 skill4,0 skill4level,0 skill5,0 skill5level,0 skill6,0 skill6level from
<?php
$ch = curl_init();
$url="http://public-crest-sisi.testeveonline.com/industry/systems/";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$result = curl_exec($ch);
if ($result===false) {
@fuzzysteve
fuzzysteve / decryptorEffects
Created July 28, 2014 03:06
Decryptor effects by blueprint
SELECT it2.typename,
it2.typeid,
coalesce(dta2.valueInt,dta2.valueFloat) multiplier,
coalesce(dta3.valueInt,dta3.valueFloat) me,
coalesce(dta4.valueInt,dta4.valueFloat) te,
coalesce(dta5.valueInt,dta5.valueFloat) runs
FROM invTypes
JOIN industryActivityMaterials iam ON (iam.materialtypeid=invTypes.typeid and iam.activityid=8 and groupid=716)
JOIN industryActivityProducts iap ON (iam.typeid=iap.typeid)
JOIN dgmTypeAttributes dta on (dta.typeid=invTypes.typeid and dta.attributeID=1115)
@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;
@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: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: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 / 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: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