Skip to content

Instantly share code, notes, and snippets.

Benjamin Eckel bhelx

Block or report user

Report or block bhelx

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
@bhelx
bhelx / montyhall.py
Last active Aug 29, 2015
Simulation to prove answer to monty hall problem
View montyhall.py
import numpy as np
# returns a numpy array of n doors with the prize range 0-2
def simulate_prizedoors(n):
return np.random.random_integers(0, 2, size=n)
# returns a numpy array of n contestant guesses with range 0-2
def simulate_guesses(n):
return np.random.random_integers(0, 2, size=n)
@bhelx
bhelx / cedric.txt
Created Feb 5, 2014
Cedric Richmond on H.R. 3361
View cedric.txt
February 5, 2014
Dear Mr. bhelx,
Thank you for contacting me regarding H.R. 3361, the Uniting and
Strengthening America by Fulfilling Rights and Ending Eavesdropping,
Dragnet-collection, and On-line Monitoring (USA Freedom) Act. I
appreciate hearing from you on this issue. I am certainly concerned
@bhelx
bhelx / face_extract.rb
Last active Dec 30, 2015
recursively walk directory and extract faces
View face_extract.rb
require "opencv"
require "fileutils"
include OpenCV
detector = CvHaarClassifierCascade::load("./haarcascade_frontalface_alt.xml")
input_dir = ARGV[0]
output_dir = ARGV[1] || 'output'
FileUtils.mkdir_p(output_dir)
@bhelx
bhelx / safe_store.rb
Last active Dec 27, 2015
Securely store and retrieve a file from an external drive
View safe_store.rb
# This script allows securely storing and retrieving a file to USB drive using rbnacl
#
# Usage:
#
# 1) Generate a private key:
#
# ruby safe_store.rb --generate-key -k /Volumes/SAFEUSB/my_private_key.key
#
# 2) Write the ciphertext file to your drive (mine is named PATRIOT).
# This will write a file at /Volumes/PATRIOT/plain.txt.ctxt:
View doge.txt
:::::::::::::::---:::///:///:::::///::::::--........................................................
::::::::::::::::::::///:://::--:://++/:::---....................................----................
:::::::::::::::::/::::::::------:/++o+/::--..................................-:///++/-..............
::::::::::::::://:::-------..---:/++ooo+/:-.................................-:/+++ooso-.............
::::::::::::::::::-------....--::/++ooo+++:-.............................--:/+++++ossso-............
:::::::::::------------.....--::///++ooo+++/:---........................-://++++++ooosso-...........
::----------..------......---::/++++/////////////:::::----------.....-://+oso++ooooossss/...........
----......------------------:///+////:::////////////////////////////://++osoooooosssssoso:..........
......--------------::::///:/::::::::::///////////////////////////+oo++oossooossyyyyysooo+..........
-------::::::://////++++//:::::::::::///////++/++/////////////////++ooosyyoo+osyhhhhysooso-.........
@bhelx
bhelx / cedric_on_guns.txt
Created Sep 30, 2013
cedric richmond on gun regulations
View cedric_on_guns.txt
Dear Mr. bhelx,
Thank you for contacting me regarding gun regulations.
If it were a country, New Orleans, which is in the 2nd District, would
rank second in the world in terms of gun murders. Something has to be
@bhelx
bhelx / cedric_on_syria.txt
Last active Dec 23, 2015
September 12, 2013 cedric richmond response on Syria attack
View cedric_on_syria.txt
September 12, 2013
Dear Mr. Eckel,
Thank you for contacting me regarding the recent developments in Syria.
The use of chemical weapons by the Assad regime on unarmed civilians
demands strong action. It is critical that President Obama outline the
@bhelx
bhelx / cedric_on_amash_ammendment.txt
Last active Dec 23, 2015
September 13, 2013 - cedric richmond response on nsa and the amash-conyers ammendment
View cedric_on_amash_ammendment.txt
September 13, 2013
Dear Mr. Eckel,
Thank you for contacting me about the recent developments regarding the
National Security Administration (NSA) and its intelligence gathering
practices pursuant to the Foreign Intelligence Surveillance Act (FISA).
As you may know, a number of classified FISA documents were published
@bhelx
bhelx / books.md
Last active Dec 21, 2015
Trying to reduce my library. Most of these books I got in college. My plan is to give them away.
View books.md

Java (some textbooks)

  • Java: The Good Parts
  • Java: Concurrency in Practice (feat. Paul Christmann)
  • Java Generics and Collections
  • Java Web Services Up and Running
  • Data structures and other Objects using java
  • Spring MVC and Web Flow
  • Big java (second edition)
  • Effective Java (good java book)
You can’t perform that action at this time.