- sign up with name and email
- show currently available tournament(s) and registered TD
- accept payment via venmo (required to make somebody commit)
- chat (to say you're late etc.)
- list players who have showed up and if they've paid
- show if players are planning on coming but having paid
- integrate with swarm(foursquare) (plans + checkins)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
example_map= ( | |
('n.given_name', 'first'), | |
('n.family_name', 'last'), | |
('tel.value', 'tel'), | |
('tel.type', 'teltype') | |
) | |
def transform(source, map_, reverse=False): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thumbFromVideo: function(embed, quality) { | |
console.log('thumb for video', embed); | |
embed = embed.trim(); // who knows why | |
var hash, u; | |
if (embed.search(/https?:\/\/abc\.go\.com/) >= 0) { | |
hash = embed.match(/https?:\/\/abc\.go\.com\/embed\/([^\/\?"]*)/).pop(); | |
return 'http://static.east.abc.go.com/service/image/ratio/id/' + hash + '/dim/160.1x1.jpg'; | |
} else if (embed.indexOf('<') >= 0) { | |
hash = $(embed).attr('src').match(/embed\/(.*)$/)[1]; | |
} else if (embed.search(/^https?:\/\/(www\.)?youtube.com/) >= 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.before :each do | |
embedly_api_response = [double('embedly', original_url: 'http://quirky.com', | |
images: [], media: double('media', html: nil), | |
description: nil, app_links: [], title: nil, | |
provider_name: nil)] | |
allow_any_instance_of(Embedly::API).to receive(:extract) | |
.and_return(embedly_api_response) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import create_engine, Column, Integer, String | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import sessionmaker | |
from tornado.options import options | |
def get_engine(memo=[]): | |
if len(memo) == 0: | |
memo.append( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2, numpy as np | |
FIELD_CORNERS = ( | |
(153, 36), (456, 37), | |
(74, 461), (518, 460) | |
) | |
def get_ball_template(): | |
template = np.zeros((22, 22), dtype=np.uint8) | |
cv2.circle(template, (11, 11), 11, 255, -1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fog, board; | |
var createFog = function() { | |
var canvas = document.createElement('canvas'); | |
canvas.width = board.width; | |
canvas.height = board.height; | |
var context = canvas.getContext('2d'); | |
context.fill('black', 0, 0, board.width, board.height); | |
fog = canvas; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.web | |
import tornado.options | |
import logging | |
class IndexHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.finish('oh yeah, i got it') | |
def main(): | |
tornado.options.parse_command_line() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
type TypeA = 'TypeA'; | |
type TypeB = 'TypeB'; | |
interface WithA { | |
propertyA: TypeA | |
} | |
interface WithAB { |