This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'alchemy_api' | |
require 'json' | |
require 'pry' | |
AlchemyAPI.key = "bfc9f1c85f548d2ee9272e49ad3866f0e663cef1" | |
file = File.open("json.txt") | |
c = file.read | |
c = c.scan(/[[:print:]]/).join |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'watir-webdriver' | |
client = Selenium::WebDriver::Remote::Http::Default.new | |
client.timeout = 3000 # seconds – default is 60 | |
b = Watir::Browser.new :firefox, :http_client => client | |
b.goto 'http://www.android-permissions.org/' | |
#put your directory here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'watir-webdriver' | |
b = Watir::Browser.start 'http://www.android-permissions.org/' | |
#put your directory here | |
entries = Dir.entries("/Users/Jonathan/Desktop/a") | |
entries.each do |entry| | |
b.goto("http://www.android-permissions.org/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.nav-mobile.clearfix | |
/ touching this button shows search bar | |
.navbarbutton.searchbtn.left{:onclick => "$('#search-box,#mobile-search').toggle(500);"} | |
%img{:src => asset_path("btn-search-mobile.png")} | |
%a.navbartitle{:href => "/"} | |
#nav-tab-bar | |
.tab-bar-left-cap | |
.tab-bar-center | |
#tab-bar-items | |
%a.item{:href => "/"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Renames all .html.erb files to .html.haml" | |
task :haml do | |
print "looking for erb views..\n" | |
files = `find ./app/views -name *.html.erb` | |
files.each_line do |file| | |
file.strip! | |
print "parsing file: #{file}\n" | |
`mv #{file} #{file.gsub(/\.erb$/, ".haml")}` | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
/* | |
Author: Cynthia Stamelos | |
Date: 1/28/13 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t.c: In function ‘function2’: | |
#include <stdio.h> | |
int main() | |
{ | |
function1(1); | |
function2(); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'watir-webdriver' | |
b = Watir::Browser.new | |
b.goto 'facebook.com' | |
b.text_field(:id => 'email').set '' | |
b.text_field(:id => 'pass').set '' | |
b.button(:value => 'Log In').click | |
while(true) do | |
b.text_field(:name => 'xhpc_message').click | |
b.text_field(:name => 'xhpc_message_text').set '@northwestern ski trip' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
02 This is a turkey: | |
03 | |
04 ,+*^^*+___+++_ | |
05 ,*^^^^ ) | |
06 _+* ^**+_ | |
07 +^ _ _++*+_+++_, ) | |
08 _+^^*+_ ( ,+*^ ^ \+_ ) | |
09 { ) ( ,( ,_+--+--, ^) ^\ | |
10 { (@) } f ,( ,+-^ __*_*_ ^^\_ ^\ ) | |
11 {:;-/ (_+*-+^^^^^+*+*<_ _++_)_ ) ) / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_covar_all.pl: ($count, $mean_f1,$std_f1, $mean_f2, $std_f2) = ExecStockSQL("ROW",$sql); | |
get_covar_all.pl: ($covar{$s1}{$s2}) = ExecStockSQL("ROW",$sql); | |
get_covar.pl: ($count, $mean_f1,$std_f1, $mean_f2, $std_f2) = ExecStockSQL("ROW",$sql); | |
get_covar.pl: ($covar{$s1}{$s2}) = ExecStockSQL("ROW",$sql); | |
get_data_for_predict.pl:my $data = ExecStockSQL("TEXT",$sql); | |
get_data_for_strat.pl:my $data = ExecStockSQL("TEXT",$sql); | |
get_data.pl:my $data = ExecStockSQL("TEXT",$sql); | |
get_info_beta.pl: $beta = ExecStockSQL("ROW",$sql2); | |
get_info_cvb.pl: ($n,$mean,$std,$min,$max) = ExecStockSQL("ROW",$sql); | |
get_info_cvb.pl: #$beta = ExecStockSQL("ROW",$sql2); |