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
from collections import Counter | |
import re, praw | |
print "Fetching unimportant words..." | |
import nltk | |
nltk.download('stopwords') | |
from nltk.corpus import stopwords | |
c = Counter() | |
r = praw.Reddit(user_agent='praw') | |
username = 'username' | |
print "Logging in as",username |
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
// Quadtree.js usage looks like: | |
var markers = []; // some array of google map markers | |
quadTree = new QuadTree(markers); | |
console.log("Built quadtree with size "+markers.length); | |
var bounds = map.getBounds(); | |
console.log("New Bounds"+bounds.toString()); | |
// find all points within the viewport bounding rectangle, | |
// or whatever rectangle you supply | |
var foundPoints = quadTree.queryRectangle(bounds); |
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
public class CameraSurface extends SurfaceView implements Callback { | |
private Camera mCamera; | |
private SurfaceHolder mHolder; | |
private Context c; | |
private static final String CNAME = ScanActivity.class.getName(); | |
private PreviewCallback cb; | |
public CameraPreview(Context context, PreviewCallback cb) { | |
super(context); | |
this.c = context; |
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 heapq | |
import itertools | |
nums = set(range(1,10)) | |
class Node: | |
def __init__(self, grid): | |
self.children = [] | |
self.grid = grid | |
self.answered = 0 | |
for i in self.grid: |
NewerOlder