Skip to content

Instantly share code, notes, and snippets.

View sgammon's full-sized avatar
:shipit:
f*ck it, ship it

Sam Gammon sgammon

:shipit:
f*ck it, ship it
View GitHub Profile
<places xmlns="http://where.yahooapis.com/v1/schema.rng" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:start="0" yahoo:count="1" yahoo:total="4">
<place yahoo:uri="http://where.yahooapis.com/v1/place/55805667" xml:lang="en-US">
<woeid>55805667</woeid>
<placeTypeName code="11">Zip Code</placeTypeName>
<name>95811</name>
<country type="Country" code="US">United States</country>
application: judes-login-test
runtime: python
version: 1
api_version: 1
handlers:
- url: /.*
script: main.py
login: required
@sgammon
sgammon / object_sort.py
Created March 25, 2011 21:33
Write an algorithm to sort these objects in ascending order, by the property "score".
import random
import hashlib
class SearchResult(object):
key = None
score = None
def __init__(self):
self.score = round(random.random(),2)*5
h = hashlib.md5()
h.update(str(self.score))
from sampletext import finn, stopwords
from nltk.stem.porter import PorterStemmer
from nltk.tokenize.punkt import PunktLanguageVars
import string
index_mappings = {}
for word in [w.replace('.','') for w in filter(lambda xstring: xstring not in stopwords and xstring.replace('.', '').isalnum(), (PunktLanguageVars().word_tokenize(finn.lower())))]:
k = (PorterStemmer().stem(word), word)
if k in index_mappings:
import pipeline
from pipeline import common
from google.appengine.ext import db
from google.appengine.api import mail
from google.appengine.api import xmpp
###### Models ######
class User(db.Model):
@sgammon
sgammon / gist:1005254
Created June 2, 2011 20:38
fatcatmap
__ _ _
/ _| | | | |
| |_ __ _| |_ ___ __ _| |_ _ __ ___ __ _ _ __
| _/ _` | __| / __/ _` | __| | '_ ` _ \ / _` | '_ \
| || (_| | |_ | (_| (_| | |_ | | | | | | (_| | |_) |
|_| \__,_|\__| \___\__,_|\__| |_| |_| |_|\__,_| .__/
<^..^> | | BETA
|_|
==========================================================================

FatCatMap Labs

##Change Log

Thu, June 02 2011 version tag 1-alpha

  • The platform is nearing a place where it can be used. Along with the new version tag:
  • some git spring cleaning
  • including some new FCM graphics

FatCatMap Labs - Development Documentation

##File Directory

  • Collaborating.md - tips and tutorials about how to collaborate on the codebase and not bump elbows with other devs
  • Deployment.md - directions about how to deploy to staging and production infrastructure
  • Installation.md - directions about how to set up a dev environment and fatcatmap dependencies
  • Codebase.md - plain-english description of how the codebase works and interconnects
@sgammon
sgammon / __init__.py
Created June 7, 2011 20:09
Providence/Clarity Init
#
# =====================================================
# |==| PROVIDENCE/CLARITY DATA ANALYSIS PLATFORM |==|
# |==| ----------------------------------- |==|
# |==| Author: Sam Gammon <sg@samgammon.com> |==|
# |==| Version: 0.1 DEV |==|
# |==| ------------------------------------------- |==|
# |==| COPYRIGHT (c) 2010. ALL RIGHTS RESERVED |==|
# =====================================================
#
@sgammon
sgammon / Tyler's Page.html
Created June 17, 2011 00:49
A page for tyler to practice on
<html>
<head>
<title>Tyler's cool page</title>
<meta name='author' value='sam gammon <sg@samgammon.com>' />
<style type='text/css'>
h1
{