I hereby claim:
- I am dpick on github.
- I am davidpick (https://keybase.io/davidpick) on keybase.
- I have a public key whose fingerprint is 6960 FDA3 4FEA BD3A 8244 7F84 66E0 8334 4DE3 1424
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(with-resource [c (consumer config)] | |
shutdown | |
(doseq [message (messages c "topic")] | |
(process-message message))) |
java.net.SocketException: Connection reset | |
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) | |
at java.net.SocketOutputStream.write(SocketOutputStream.java:153) | |
at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:181) | |
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:115) | |
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:122) | |
at org.apache.http.entity.StringEntity.writeTo(StringEntity.java:170) | |
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:89) | |
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108) | |
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:117) |
require 'rubygems' | |
require 'open-uri' | |
require 'hpricot' | |
movie = tt0379786 | |
0.upto(5) do |page| | |
@url = "http://www.imdb.com/title/#{movie}/usercomments?start=#{page * 10}" | |
open(@url) { |f| @response = f.read } |
require 'rubygems' | |
require 'sinatra' | |
require 'pony' | |
get '/' do | |
Pony.mail(:to => 'pickdp@rose-hulman.edu', | |
:from => ENV['SENDGRID_USERNAME'], | |
:subject => 'xyzpqrst', | |
:body => 'test', | |
:via => :smtp, :via_options => { |
factorial = Hash.new do |h,k| | |
if k > 1 | |
h[k] = h[k-1] * k | |
else | |
h[k] = 1 | |
end | |
end |
Dir.glob("vendor/*").each { |gem| $LOAD_PATH.unshift "#{gem}/lib" } |
# Print the vaportrail of a ruby file in a git repo, i.e., | |
# the complexity level at each commit. | |
# | |
# Requires: >= bash ?.? | |
# >= git 1.7.1 | |
# >= ruby 1.9.2 | |
# >= flog 2.5.0 | |
# >= gruff 0.3.6 | |
# |
key_length = key_length_guess(ciphertext) | |
dot_values, shift_values = [ ], [ ] | |
1.upto(key_length).each do |start_letter| | |
letter_frequency_array = ciphertext.every_nth_letter(key_length, start_letter).letter_frequencies | |
dot_values << letter_frequency_array.dot_product(ENGLISH_FREQUENCIES) | |
1.upto(ENGLISH_FREQUENCIES.size - 1).each do |i| |
user.restaurants << Restaurant.new(:name => params[:name]) unless user.restaurants.inject { |bool, rest| bool ||= true if rest.name == params[:name] } |