Skip to content

Instantly share code, notes, and snippets.

View anglinb's full-sized avatar

Brian Anglin anglinb

View GitHub Profile

Keybase proof

I hereby claim:

  • I am anglinb on github.
  • I am anglinb (https://keybase.io/anglinb) on keybase.
  • I have a public key ASANvyEtKHgMNa99qq4mFpshHFhMZKmw4SNLq9dsVXPbeAo

To claim this, I am signing this object:

@anglinb
anglinb / sample.py
Created February 14, 2017 18:54
Testing the usefulness and error for different distributions and pvalues
import copy
import random
import pdb, traceback, sys
def main():
distrobutions = [0, 0.25, 0.5, 1.0]
sample_size = 1000
samples = [[] for x in xrange(0, len(distrobutions))]
@anglinb
anglinb / sample.py
Created February 14, 2017 18:54
Testing the usefulness and error for different distributions and pvalues
import copy
import random
import pdb, traceback, sys
def main():
distrobutions = [0, 0.25, 0.5, 1.0]
sample_size = 1000
samples = [[] for x in xrange(0, len(distrobutions))]
@anglinb
anglinb / queens.py
Last active April 28, 2016 21:07
N-Queens Problem
import copy
BOARD_SIZE = 8
def can_place(board, x, y):
"""
x - - - <-
- - x -
- * - -
- - - -
@anglinb
anglinb / docs.md
Created April 26, 2016 05:39
Eats API Documentation

USC Eats API Documentation

##Endpoints

###/restaurantst Pull a list of all restaurants

curl -X "GET" "https://uscdata.org/eats/v1/restaurants"

package com.company;
import com.google.gson.*;
import org.bson.types.ObjectId;
import java.lang.reflect.Type;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
@anglinb
anglinb / README.md
Last active November 13, 2015 07:56
Menu Return Json

Menus are basically menu-days that point back to a given restaurant and have a specific day associated with them.

They will be accessed from /restaurant/abc...e109/menus You'll be able to pass a parameter to filter by date.

@anglinb
anglinb / menus.json
Last active November 4, 2015 06:16
Get Restaurants
{
"_items": [
{
"_updated": "Tue, 03 Nov 2015 02:19:52 GMT",
"restaurant_id": "56380cad09838807c3e5d056",
"lunch": [
{
"section_header": "Grill",
"section_items": [
"Hamburger",

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@anglinb
anglinb / invite.json
Created May 26, 2015 18:37
Invite Card
[
{
"card_item": {
"hashed_phone": "31c2e035132bea5859fbbc1db6357adc669e6a21b3b23ac65f8e3e40e38a6c10",
"id": 2
},
"card_item_id": 2,
"card_type": "Invite"
},