Skip to content

Instantly share code, notes, and snippets.

@andychase
andychase / keybase.md
Created September 6, 2020 00:03
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

import sys
import csv
from collections import Counter
def get_themes(themes, themes_db):
for theme in themes:
percent = themes_db[theme] / len(list(themes_db.elements()))
yield f"{int(percent*100)}%", f"{theme.capitalize()}"
@andychase
andychase / cs_476_data_script.r
Last active April 5, 2017 21:26
cs_476_data_script.r
library(readr)
data <- read_csv("data.csv",
col_types = cols(date = col_datetime(format = "%FT%T")))
# costs <- read_csv("Cloud Provider Costs - Sheet1.csv")
normz <- function(column) { ( column - mean(column) ) / sd(column) }
# data <- merge(data, costs)
data[,c("nginx")] <- normz(getElement(data,"nginx"))
data[,c("sha256sum")] <- normz(getElement(data,"sha256sum"))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andychase
andychase / py_earth_data.ipynb
Last active November 13, 2015 23:25
import earthdata idea
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andychase
andychase / minecraft_poster.js
Created October 3, 2015 22:22
Minecraft Users Online Skype Bot
// Minecraft Server status poster
// License: MIT
// Andy Chase
// Note: You MUST disable CSP on your web client for this to work
// Configuration
// -----------------------------------------------
// Change this (capture from a /message request in the skype web client)
var regToken = "registrationToken=?";
@andychase
andychase / biprealistic.mediawiki
Last active September 7, 2015 07:38
[BIP/Draft] BIP Realistic Acceptance Process Drinking Game

  Title: BIP Realistic Acceptance Process Drinking Game
  Author: Andy Chase 
  Status: Draft 
  Type: Process 
  Created: 2015-09-06

Abstract

@andychase
andychase / bipacceptanceprocess.mediawiki
Last active December 7, 2015 10:33
[BIP/Draft] Committee-based BIP Acceptance Process [Dev]

  Title: Committee-based BIP Acceptance Process
  Author: Andy Chase 
  Status: Draft 
  Type: Process 
  Created: 2015-08-31

Abstract

@andychase
andychase / spin_up_node.sh
Created August 25, 2015 04:21
Tesing Bitcoin XT Part 2
# Route port in range to 8333
for i in $(seq 40000 41000)
do echo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport $i -j REDIRECT --to-port 8333 &&
echo -n "."
done
# Create bitcoin data volume
docker run --name=bitcoind-data -v /bitcoin busybox chown 1000:1000 /bitcoin
# Spin up Bitcoin XT node
docker run --volumes-from=bitcoind-data --name=bitcoind-node -d \
@andychase
andychase / Dockerfile
Last active August 29, 2015 14:27
Faking XT Nodes for fun
# Use the Ubuntu Linux distro as the base for this image
FROM ubuntu
# Install necessary build tools
RUN apt-get update && apt-get upgrade --yes && apt-get install build-essential clang git --yes
# Download and install PseudoNode
RUN cd /root && git clone https://github.com/basil00/PseudoNode.git && cd ./PseudoNode && make
# These two commands enable port 8333 to be routed and start the node by default
EXPOSE 8333
CMD ["bash", "-c", "cd /root/PseudoNode && ./pseudonode --stealth --coin=bitcoin-xt"]