Skip to content

Instantly share code, notes, and snippets.

View ddgromit's full-sized avatar

Derek Dahmer ddgromit

  • Alchemy
  • San Francisco, CA
View GitHub Profile
@ddgromit
ddgromit / fisheryates.coffee
Created March 8, 2011 01:56
CoffeeScript Implementation of the Fisher-Yates array sorting algorithm
# Adapted from the javascript implementation at http://sedition.com/perl/javascript-fy.html
# Randomizes the order of elements in the passed in array in place.
fisherYates = (arr) ->
i = arr.length;
if i == 0 then return false
while --i
j = Math.floor(Math.random() * (i+1))
tempi = arr[i]
@ddgromit
ddgromit / render_partial.py
Created July 19, 2011 17:53
Django Template Tag to Render Partial
# Source: http://freeasinbeard.org/post/107743420/render-partial-in-django
# Author: Martin Häger
from django import template
register = template.Library()
class PartialNode(template.Node):
def __init__(self, partial, params):
self.partial = partial
Site Terms and Conditions of Use
1. User’s Acknowledgment and Acceptance of Terms
Ticket Evolution INC ("Us" or "We") provides the Ticket Evolution site and various related services (collectively, the "site") to you, the user, subject to your compliance with all the terms, conditions, and notices contained or referenced herein (the "Terms of Use"), as well as any other written agreement between us and you. In addition, when using particular services or materials on this site, users shall be subject to any posted rules applicable to such services or materials that may contain terms and conditions in addition to those in these Terms of Use. All such guidelines or rules are hereby incorporated by reference into these Terms of Use.
These Terms of Use are effective as of 10/14/2010. We expressly reserve the right to change these Terms of Use from time to time without notice to you. You acknowledge and agree that it is your responsibility to review this site and these Terms of Use from time to time and to famili
@ddgromit
ddgromit / gist:6811976
Created October 3, 2013 15:43
Apprentice Talk Resources
@ddgromit
ddgromit / gist:6819739
Created October 4, 2013 01:35
First Classification submission using average miles per year and a RBF Support Vector Classifier
"""
Define the problem: Car is a good buy (0) or bad buy (1)
Type of problem: Classification problem
"""
# Plot values to see what features actually contribute to car values (histograms, scatter plots)
# Drop outliers in training data
# Clean some columns, e.g. year bought -> number of years owned
### IMPORT MODULES
@ddgromit
ddgromit / gist:8365897
Created January 11, 2014 01:43
Octocat demo
HEADING 1: Octocat
HEADING 2: Official GitHub mascot
PARAGRAPH:
I'm part octopus and part cat and the official mascot of GitHub.
You can find all sorts of variations of me here.
PARAGRAPH LINKS
brightnessValue,meteringMode,focalLengthIn35mm,sceneCaptureType,exposureMode,resolutionUnit,make,software,assetUrl,isoSpeed,exposureTime,shutterSpeed,depth,latitude,fNumber,sensingMode,longitude,apertureValue,focalLength,model,altitude,exposureProgram,pixelWidth,dateTime,flash,orientation,pixelHeight,whiteBalance,longitudeRef,latitudeRef
3.518518,3,30,0,0,2,Apple,7.1,assets-library://asset/asset.JPG?id=2353780B-568E-4F6D-BFE3-4C60A098BA84&ext=JPG,50,0.03333334,4.907122,8,0,2.2,2,0,2.275007,4.12,iPhone 5s,0,2,3264,2014-04-04T11:03:37-0400,0,1,2448,0,,
-3.714095,5,30,0,0,2,Apple,7.1,assets-library://asset/asset.JPG?id=5EFD0CCD-E011-4201-A9F2-316547C97ADC&ext=JPG,1250,0.06666667,3.9071,8,40.71878,2.2,2,73.9955,2.275007,4.12,iPhone 5s,10.62021,2,3264,2014-04-04T01:09:06-0400,16,6,2448,0,W,N
0.2780367,5,30,0,0,2,Apple,7.1,assets-library://asset/asset.JPG?id=33D21B75-566A-4804-B054-2EEBFD4F2316&ext=JPG,320,0.06666667,3.9071,8,40.78474,2.2,2,73.97797,2.275007,4.12,iPhone 5s,27.42979,2,3264,2014-04-03T21:44:34-0400,0

Keybase proof

I hereby claim:

  • I am ddgromit on github.
  • I am derekdahmer (https://keybase.io/derekdahmer) on keybase.
  • I have a public key whose fingerprint is 7BE5 043B 44AC 3A92 DC1E 3133 D313 537C 3662 57EE

To claim this, I am signing this object:

// NOT WHAT WE'RE GOING TO DO
<LoadingContainer
errors={this.state.loading}
loading={this.state.loading}
component={TemperatureDisplay}
temperature={this.state.temperature}
anotherVariable={another}
etc={etc} />