Skip to content

Instantly share code, notes, and snippets.

Edward Weng wengzilla

Block or report user

Report or block wengzilla

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View random_walk.rb
class RandomWalk
attr_accessor :outcome, :step_count
def initialize(upper_bound, lower_bound, step_size, win_probability)
@step_count = 0
@current_position = 0
@upper_bound = upper_bound
@lower_bound = lower_bound
@step_size = step_size

Keybase proof

I hereby claim:

  • I am wengzilla on github.
  • I am wengzilla ( on keybase.
  • I have a public key whose fingerprint is B3F1 4DE7 9F5D ADC7 94DE CAF0 B707 8861 2240 530D

To claim this, I am signing this object:

View links.txt
wengzilla /
Created Aug 7, 2014
Bug-free version of
public class Concordance {
public static void main(String[] args) {
In in = new In(args[0]);
String[] words = in.readAllStrings();
// String[] words = StdIn.readAll().split("\\s+");
// Not sure this is the intended behavior, I believe it's supposed to do the splitting on the input file.
ST<String, SET<Integer>> st = new ST<String, SET<Integer>>();
for (int i = 0; i < words.length; i++)
wengzilla / template.html
Created Mar 22, 2014
Templating AngularJS App
View template.html
<html ng-app="TemplateApp">
<script src=""></script>
<script src=""></script>
<div ng-controller="TemplateController">
<div id="templateInputs">
View gist:8570574
package main
import (
wengzilla / wheel_of_fortune.rb
Created Jan 6, 2014
Wheel of Fortune analysis of Bonus Round answers.
View wheel_of_fortune.rb
require 'nokogiri'
require 'open-uri'
class Analyzer
attr_accessor :frequency_table
def initialize
@frequency_table =
wengzilla / gist:7000289
Created Oct 15, 2013
Ruby script to download SSL certificates for Windows machines.
View gist:7000289
# Script written by Fletcher Nichol (fnichol)
require 'net/http'
# create a path to the file "C:\RailsInstaller\cacert.pem"
cacert_file = File.join(%w{c: RailsInstaller cacert.pem})
Net::HTTP.start("") do |http|
resp = http.get("/ca/cacert.pem")
if resp.code == "200"
wengzilla / du.ino
Created Sep 15, 2013
Arduino file for dino 0.10.0 gem.
View du.ino
#include <Servo.h>
bool debug = false;
int index = 0;
char messageBuffer[12];
char cmd[3];
char pin[3];
char val[4];
View shipping.rb
require 'yaml'
file_data = YAML.load_file('shipping.yaml')
class ShippingData
def initialize(attr={})
@sd_data = attr
You can’t perform that action at this time.