Skip to content

Instantly share code, notes, and snippets.

View stormy's full-sized avatar

Stormy Shippy stormy

View GitHub Profile

Keybase proof

I hereby claim:

  • I am stormy on github.
  • I am stormy (https://keybase.io/stormy) on keybase.
  • I have a public key ASA2bXhw8SiHTTYOjSg9IBrPkVmjg2AdfbYIF-OlHACn5wo

To claim this, I am signing this object:

maxCpuPerUnitPrice = 0
optimalInstanceType = null
For each instance_type in (Availability Zone, Region) {
cpuPerUnitPrice = instance.cpuCores/instance.spotPrice
if (maxCpuPerUnitPrice < cpuPerUnitPrice) {
optimalInstanceType = instance_type;
}
}
@stormy
stormy / index.html
Created October 27, 2011 22:56
Quora Circle
<!DOCTYPE html>
<html>
<head>
<title>Introduction to D3</title>
<script type="text/javascript" src="https://raw.github.com/mbostock/d3/master/d3.js"></script>
<script type="text/javascript" src="https://raw.github.com/mbostock/d3/master/d3.time.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<style type="text/css">
<!-- body {-->
<!--padding: 50px;-->
@stormy
stormy / QuoraStats_output.txt
Created July 11, 2011 10:20
Example QuoraStats.rb output
***User Overview***
Username: Stormy-Shippy
User URL: http://www.quora.com/Stormy-Shippy/
User BIO:
***Answer Stats***
Total Answers: 30
Total Votes: 166
Avg Votes: 5.53333333333333
Stand Dev: 8.18535277187245
@stormy
stormy / effect_check_ruby.rb
Created June 29, 2011 07:07
Effect Check API using Ruby and HTTParty
require 'httparty'
class EffectCheck
include HTTParty
base_uri 'http://effectcheck.com/'
basic_auth 'your_username', 'your_password'
end
effect_score = EffectCheck.post('/RestApi/score', :body => {:Category => "Generic", :Content => "your_content"})
effect_emotion_words = EffectCheck.post('/RestApi/EmotionWords', :body => {:Category => "Generic", :Content => "your_content"})