Skip to content

Instantly share code, notes, and snippets.

View yuletide's full-sized avatar
🤘

Alex Yule yuletide

🤘
View GitHub Profile
@SethTisue
SethTisue / scalawags-22.md
Last active August 29, 2015 14:07
Scalawags #22: Heather Miller in a Pickle
@yuletide
yuletide / howtocontribute.md
Created December 16, 2011 19:08
How to Contribute
  1. Fork it.
  2. Create a branch (git checkout -b my_markup)
  3. Commit your changes (git commit -am "Added Snarkdown")
  4. Push to the branch (git push origin my_markup)
  5. Create an Issue with a link to your branch
  6. Enjoy a refreshing Diet Coke and wait
@boundsj
boundsj / create_template_postgis.sh
Created March 13, 2012 14:24
Create the postgis template on a mac that had postgis installed from brew
# path taken from brew install notes
POSTGIS_SQL_PATH=/usr/local/share/postgis
# Creating the template spatial database.
createdb -E UTF8 template_postgis
createlang -d template_postgis plpgsql # Adding PLPGSQL language support.
# Allows non-superusers the ability to create from this template
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';"
anonymous
anonymous / income_df
Created June 14, 2012 22:43
income_df
all_tracts = lapply(income, function(county)
lapply(county$tracts, function(tract) as.data.frame(c(county[1:3],tract))))
all_tracts_temp = lapply(all_tracts, function(county) as.data.frame(do.call(rbind, county)))
income_df = as.data.frame(do.call(rbind, all_tracts_temp))
summary(income_df)
ff = as.numeric(income_df$medianIncome)
ff = as.numeric(as.character(income_df$medianIncome))
income_df$medianIncome = as.numeric(as.character(income_df$medianIncome))
@omarish
omarish / gist:3080200
Created July 10, 2012 00:42
Priceonomics Puzzles

Priceonomics Programming Puzzle, Summer 2012

We love solving puzzles at Priceonomics. We also like meeting people who like to solve puzzles. Here are two interesting puzzles we've faced at some point in the past months that we'd like to share with you.

If you have any questions, contact omar@priceonomics.com.


Puzzle 1: Heatwave

@tmcw
tmcw / index.html
Created July 12, 2012 18:58
markers.js and clustr
<!DOCTYPE html>
<html>
<head>
<title>crime clusters</title>
<script
src='http://mapbox-js.s3.amazonaws.com/mapbox.js/v0.5.5/mapbox.js'></script>
<script type='text/javascript'
src='http://mapbox.com/clustr/dist/clustr.min.js'></script>
<style>
body { margin:0;font: 14px/20px 'Helvetica', 'Helvetica Neue'; background:#eee; }
@pwfff
pwfff / helpers.py
Created October 10, 2012 16:45
coursera neural networks assignment 1 sample code (ported from octave)
import scipy.io
UNWANTED_KEYS = ('__globals__', '__header__', '__version__')
def load_dataset(path):
data = scipy.io.loadmat(path)
for key in UNWANTED_KEYS:
del data[key]
@guilespi
guilespi / questions by category.sql
Created October 31, 2012 01:42
How many language questions are in each difficulty category
DECLARE @tagname varchar(20) = ##language:string##
select DifficultyGroup, Count(1) Total,
avg(cast(ResponseTime as bigint)) as Average,
stdev(cast(ResponseTime as bigint)) as StandardDev
from
(SELECT
Questions.CreationDate,
Questions.Title,
Tags.TagName,
@guilespi
guilespi / response times by language.sql
Created October 31, 2012 01:46
StackOverflow response times by language, easy questions
select TagName,
avg(cast(ResponseTime as bigint)) as Average,
stdev(cast(ResponseTime as bigint)) as StandardDev
from
(SELECT
Questions.CreationDate,
Questions.Title,
Tags.TagName,
Answers.CreationDate as ResponseDate,
datediff(minute, Questions.CreationDate,
@migurski
migurski / README.md
Last active December 14, 2015 18:38
GL-Solar, Rainbow Road edition