Skip to content

Instantly share code, notes, and snippets.

View charlesreid1's full-sized avatar
💭
🍒 🍍 🍓 🍊 🍌

Chaz Reid charlesreid1

💭
🍒 🍍 🍓 🍊 🍌
View GitHub Profile
@charlesreid1
charlesreid1 / zappa_deployer.json
Created October 16, 2021 01:13 — forked from caseydm/zappa_deployer.json
Zappa IAM Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:PutRolePolicy"
],
"Resource": [
@charlesreid1
charlesreid1 / gendoc.sh
Created January 1, 2019 23:13 — forked from kegsay/gendoc.sh
Generate static docs for a Go package
#!/bin/bash
set -u
DOC_DIR=godoc
PKG=github.com/matrix-org/go-neb
# Run a godoc server which we will scrape. Clobber the GOPATH to include
# only our dependencies.
GOPATH=$(pwd):$(pwd)/vendor godoc -http=localhost:6060 &
DOC_PID=$!
@charlesreid1
charlesreid1 / git-forget-blob.sh
Last active May 7, 2018 20:18 — forked from nachoparker/git-forget-blob.sh
Completely remove a file from a git repository with git-forget-blob
#!/bin/bash
# Completely remove a file from a git repository history
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage:
# git-forget-blob file_to_forget
#
# Notes:
@charlesreid1
charlesreid1 / _service.md
Created February 4, 2018 02:41 — forked from naholyr/_service.md
Sample /etc/init.d script

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)
@charlesreid1
charlesreid1 / pubwatcher.py
Created November 28, 2017 12:48 — forked from minrk/pubwatcher.py
Watch IOPub traffic from IPython engines
import os
import sys
import json
import zmq
from IPython.zmq.session import Session
from IPython.parallel.util import disambiguate_url
from IPython.utils.path import get_ipython_dir
def main(connection_file):
"""
Simple web server that listens for Github webhooks to implement push-to-deploy
with Pelican static sites
Settings are loaded from a json file except for SECRET which should be an
environment variable
Example `deployer.json`
{

NOTE: This how-to was written for the Census API at http://thedataweb.rm.census.gov/ -- it has since been moved to http://api.census.gov/

Mike Stucka, our contact at the Macon Telegraph, sent us a link to the Census's official API which is launching next month. You can skip ahead to the site - http://www.census.gov/developers/ - and get an API key, but also read my notes after using this yesterday:

  1. The datasets

--- The 2010 Census Summary comes from everyone filling out census forms, and you can get stats at state level down to a super-detailed block level. Info from this includes population, age, gender, race, home ownership, members of a household, and various combinations of that. Full list: http://www.census.gov/developers/data/sf1.xml

--- The 2006-2010 American Community Survey is a longer form given to fewer households over 5 years (so its numbers are incompatible with the 2010 Census). You can get stats down only to the block group level. In addition to the standard census stats, you get: educa

== Chess Games and Positions in Neo4j
:neo4j-version: 2.0.0
:author: Wes Freeman
:twitter: @wefreema
:tags: chess
The goal is to load a bunch of chess games into Neo4j for further analysis. Scores listed are Stockfish's take on a position after a 25 move horizon (but this number can be deepened as the graph is filled out or as more processing is done). Positions can also be loaded as alternative moves (not connected to a game) based on suggestions from Stockfish. The positions are recorded as link:http://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation[FEN], a human-readable/compressed chess board state notation.
=== Schema diagram