Skip to content

Instantly share code, notes, and snippets.

View atomictom's full-sized avatar

Thomas Manning atomictom

  • Google
  • Dublin, Ireland
View GitHub Profile

Keybase proof

I hereby claim:

  • I am atomictom on github.
  • I am atomictom (https://keybase.io/atomictom) on keybase.
  • I have a public key whose fingerprint is ABF1 8947 B280 6045 EE7F 3255 3F61 3807 B9F9 BC1B

To claim this, I am signing this object:

import java.util.Scanner;
import java.util.Map;
import java.util.HashMap;
// Format of formulas: [(](shorthand|longhand)[count][)][count]
//
// shorthand is case sensitive and is the symbol notation (e.g. C for Carbon, Co for Cobalt and Hg for Lead)
// longhand is the full element name and is not case sensitive (e.g. Carbon, CARBON, CaRBoN, lead)
// If a count is left out, it's implicitly '1', else you can put a count after a shorthand or longhand element
// You can group element with parenthesis and apply counts to the groups. (e.g. C2(HO)2)
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#define NUM_THREADS 2
#define PRIME_LIMIT ((int)1e9)
#!/usr/bin/python
import pygame, pygame.camera
from pygame.camera import Camera
from pygame.locals import *
pygame.init()
pygame.camera.init()
class CameraDisplay(object):
def __init__(self, size=(640, 480)):
#!/usr/bin/python
import json
from collections import Counter
json_data = open('reddits.json')
data = json.load(json_data)
stop_words = set(['a', 'about', 'above', 'across', 'after', 'afterwards', 'again', 'against', 'all', 'almost', 'alone', 'along', 'already', 'also', 'although', 'always', 'am', 'among', 'amongst', 'amoungst', 'amount', 'an', 'and', 'another', 'any', 'anyhow', 'anyone', 'anything', 'anyway', 'anywhere', 'are', 'around', 'as', 'at', 'back', 'be', 'became', 'because', 'become', 'becomes', 'becoming', 'been', 'before', 'beforehand', 'behind', 'being', 'below', 'beside', 'besides', 'between', 'beyond', 'bill', 'both', 'bottom', 'but', 'by', 'call', 'can', 'cannot', 'cant', 'co', 'computer', 'con', 'could', 'couldnt', 'cry', 'de', 'describe', 'detail', 'did', 'do', 'done', 'down', 'due', 'during', 'each', 'eg', 'eight', 'either', 'eleven', 'else', 'elsewhere', 'empty', 'enough', 'etc', 'even', 'ever', 'every', 'everyone', 'everything', 'everywhere', 'except', 'few', 'fifteen', 'fifty', 'fill',
import time
import math
import pymavlink
import droneapi.lib
from pymavlink import mavutil
from droneapi.lib import VehicleMode
DEBUG = True
GPS_3D_FIX = 3
import time
import math
import pymavlink
import droneapi.lib
from pymavlink import mavutil
from droneapi.lib import VehicleMode
DEBUG = True
GPS_3D_FIX = 3
#!/usr/bin/python
import os
import sys
class Node(object):
def __init__(self):
self.is_word = False
self.children = {}
#!/usr/bin/python
import os
import sys
class Node(object):
def __init__(self):
self.is_word = False
self.children = {}
import Text.Parsec
import Text.ParserCombinators.Parsec (GenParser)
import Control.Applicative ((<$>), (*>), (<*>), (<*))
type UnaryOp = Integer -> Integer
type BinOp = Integer -> Integer -> Integer
data Expr = Binary BinOp Expr Expr
| Unary UnaryOp Expr
| Num Integer