Skip to content

Instantly share code, notes, and snippets.

View Dispader's full-sized avatar
:electron:
Present Company Excluded, LLC

Jake Gage Dispader

:electron:
Present Company Excluded, LLC
View GitHub Profile
@Dispader
Dispader / .bashrc
Created February 12, 2014 18:00
some personally convenient .bashrc entries
##
## Here There Be Tygers
##
# "The less effort, the faster and more powerful you will be." —Bruce Lee
#
LESS="--no-init --quit-if-one-screen --LONG-PROMPT"
alias ls='ls --color=always'
alias lh='ls --color=always -lasth | less -R'
@Dispader
Dispader / github-talk-extras.md
Created February 26, 2014 16:51
"extras" from a talk on GitHub
def score(dice)
score = 0
roll_count = dice.inject(Hash.new(0)) { |roll, count|
roll[count] += 1; roll
}
roll_count.each { |roll, count|
if count >= 3
@Dispader
Dispader / output.rb
Created April 27, 2014 21:04
error while attempting to add networking to .kitchen.yml
(~/Development/exploratio/chef/test-jenkins-ci-testkichen) master {dispader}04:00pm] bundle exec kitchen list
/home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:109:in `convert_legacy_driver_format_at!': undefined method `rmerge' for nil:NilClass (NoMethodError)
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:98:in `block in convert_legacy_driver_format!'
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:97:in `each'
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:97:in `convert_legacy_driver_format!'
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/data_munger.rb:35:in `initialize'
from /home/jake/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/test-kitchen-1.2.1/lib/kitchen/config.rb:78:in `new'
fro
class DiceSet
attr_accessor :values
def roll(dice)
self.values = []
dice.times { self.values << ( 1 + rand(6) ) }
end
end
@Dispader
Dispader / proxy.rb
Last active August 29, 2015 14:01
final
class Proxy
attr_reader :messages
def initialize(target_object)
@object = target_object
@messages = []
end
def called?(name)
import numpy
import pandas
import statsmodels.api as sm
def custom_heuristic(file_path):
'''
You are given a list of Titantic passengers and their associating
information. More information about the data can be seen at the link below:
http://www.kaggle.com/c/titanic-gettingStarted/data
@Dispader
Dispader / .bashrc-exerpt
Created June 10, 2014 19:31
git prompt
# "Hide in your shell, 'cause the world is out to bleed you for a ride." —Roger Hodgson
#
# ${BEAT} is undefined, so we can pretend to read this.
#
if [ "$USER" != "root" ]; then
export PS1='\[\033[1;37m\](\w)\[\033[0m\]${BEAT}\[\033[4m\]$(__git_ps1 " %s ")\[\033[0m\]${BEAT}\[\033[36m\]{\h}\[\033[0m\]${BEAT}\[\033[7m\]\D{%I:%M%P}\[\033[0m\]${BEAT}] ';
fi
if [ "$USER" == "root" ]; then
export PS1="\[\033[1;37m\](\w)\[\033[0m\]${BEAT}\[\033[36m\]{\h}\[\033[0m\]${BEAT}\[\033[7m\]\D{%I:%M%P}\[\033[0m\]${BEAT}# ";
fi
@Dispader
Dispader / gradplanner-exerpt.log
Created June 12, 2014 19:11
error running Grad Planner on my local instance
ERROR 12 Jun 2014 14:08:17,392 GPlannerDropDowns - GPlannerDropDowns: Could not load What If Degrees
java.lang.Exception: SQL Error in finding WhatIfDegree by instId
at edu.umn.web.gradplanner.model.common.WhatIfDegreeHome.findByInstId(WhatIfDegreeHome.java:69)
at edu.umn.web.gradplanner.GPlannerDropDowns.loadWhatIfDegrees(GPlannerDropDowns.java:223)
at edu.umn.web.gradplanner.GPlannerDropDowns.initialize(GPlannerDropDowns.java:130)
at edu.umn.web.gradplanner.GPlannerApplicationManagerListener.initApp(GPlannerApplicationManagerListener.java:115)
at edu.umn.web.gradplanner.GPlannerApplicationManagerListener.managerStarted(GPlannerApplicationManagerListener.java:75)
at edu.umn.web.pillar.service.manager.ServiceManagerFacade.addManagerListener(ServiceManagerFacade.java:96)
at edu.umn.web.pillar.service.manager.ServiceManagerClient.registerManagerListener(ServiceManagerClient.java:114)
at edu.umn.web.gradplanner.GPlannerApplicationContextListener.initializeApplication(GPlannerApplicationContextListener.j
@Dispader
Dispader / link-groovy-emacs.bash
Created October 18, 2014 18:35
demonstration of ${VARIABLE#-PATTERN}