This file contains 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
# Round 29: Last hurrah before we're officially old. | |
Hello Hackers. | |
Thank you NYU for hosting the meetup. That was our first time at NYU and the space was great. | |
## Projects | |
### Gabe Ghearing |
This file contains 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
# Round 30: Things We Say | |
Hello Hackers. | |
Thank you to The Ladders for hosting the meetup. It was our second time there and we love the space. They're hiring, and there are a few hacker school alums over there so we know it's a great place for hackers to earn some dough. Reach out to John Connolly if you're interested: jeconnol@gmail.com | |
## Projects | |
### Gabe Ghearing | |
This file contains 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
>>> q1 = 2.91 | |
>>> q5 = q1 + (q1 * .67) | |
>>> q5 | |
4.8597 | |
>>> distance = q5 - q1 | |
>>> halfway = distance / 2 | |
>>> step = halfway / 2 | |
>>> q1 + step + step + step + step == q5 | |
True | |
>>> step |
This file contains 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
#!/usr/bin/env ruby | |
class Solver | |
B = " " | |
attr_reader :sudoku_board | |
def initialize | |
@sudoku_board = [[B, 4, B, B, B, 5, B, 1, B], | |
[B, B, B, B, 1, B, 6, B, 9], | |
[6, B, 1, 9, 3, B, B, B, 4], |
This file contains 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
#!/usr/bin/env python | |
### To use, first install gevent and then requests | |
### | |
### $ pip install gevent requests | |
from gevent import monkey; monkey.patch_all() ### gevent first | |
import gevent | |
import json |
This file contains 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
#!/usr/bin/env python | |
""" | |
This script is a python implementation of Danish Munir's perl urdu-segmenter. | |
http://www.cs.cmu.edu/afs/cs/user/lsl/Nice/Urdu-MT/code/Tools/Sentence_Segmenter/urdu-segmenter.pl | |
""" | |
import sys | |
import re | |
from optparse import OptionParser |
This file contains 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 nltk.data | |
>>> splitter = nltk.data.load('tokenizers/punkt/english.pickle') | |
>>> splitter.tokenize('I think Washington D.C. is neato') | |
['I think Washington D.C.', 'is neato'] | |
>>> splitter.tokenize('I think Washington D. C. is neato') | |
['I think Washington D. C. is neato'] |
This file contains 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
#!/usr/bin/env python | |
from BeautifulSoup import BeautifulSoup | |
import urllib | |
class MozillaOpener(urllib.FancyURLopener): | |
version = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3' | |
urllib._urlopener = MozillaOpener() |
This file contains 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
#!/usr/bin/perl -w -CD | |
binmode STDOUT, ":utf8"; | |
binmode STDIN, ":utf8"; | |
no warnings; | |
#-----Description------------------------------------------------------ | |
# | |
# Program:urdu-segmenter.pl | |
# Written by: Danish Munir |
This file contains 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
def addLike(self, uid=None, post_id=None): | |
""" | |
Facebook API call. See http://developers.facebook.com/documentation.php?v=1.0&method=stream.addLike | |
""" | |
args = {} | |
if uid is not None: args['uid'] = uid | |
if post_id is not None: args['post_id'] = post_id | |
return self('addLike', args) | |
def removeLike(self, uid=None, post_id=None): |
OlderNewer