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 'net/ftp' | |
Net::FTP.open('ftp.ncbi.nlm.nih.gov') do |ftp| | |
ftp.passive = true | |
ftp.login | |
ftp.chdir('/pubchem/Compound/CURRENT-Full/SDF') | |
files = ftp.list('*') | |
total = 0 | |
sdf_files = files.select { |f| f.match(/\.sdf\.gz$/) } | |
sdf_files.each_with_index do |file, index| |
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 "json" | |
require "sqlite3" | |
require "fileutils" | |
notebook_name = "Snippets.qvnotebook" | |
notebook_uuid = SecureRandom.uuid | |
FileUtils::mkdir_p(notebook_name) | |
notebook_meta = { | |
name: "Imported from Dash", | |
uuid: notebook_uuid |
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
[{"name":"Winnifred Legros","email":"[email protected]","company":"Howell-Rempel","credit_card_number":"1212-1221-1121-1234","color":"mint green"},{"name":"Sincere Fritsch","email":"[email protected]","company":"Bahringer and Sons","credit_card_number":"1228-1221-1221-1431","color":"lavender"},{"name":"Anya Ruecker","email":"[email protected]","company":"Sporer and Sons","credit_card_number":"1212-1221-1121-1234","color":"violet"},{"name":"Cicero Funk","email":"[email protected]","company":"Feeney, Auer and Schuster","credit_card_number":"1211-1221-1234-2201","color":"lavender"},{"name":"Alessandro Mertz","email":"[email protected]","company":"Schowalter and Sons","credit_card_number":"1211-1221-1234-2201","color":"salmon" |
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
[{"name":"Winnifred Legros","email":"[email protected]","company":"Howell-Rempel","credit_card_number":"1212-1221-1121-1234","color":"mint green"},{"name":"Sincere Fritsch","email":"[email protected]","company":"Bahringer and Sons","credit_card_number":"1228-1221-1221-1431","color":"lavender"},{"name":"Anya Ruecker","email":"[email protected]","company":"Sporer and Sons","credit_card_number":"1212-1221-1121-1234","color":"violet"},{"name":"Cicero Funk","email":"[email protected]","company":"Feeney, Auer and Schuster","credit_card_number":"1211-1221-1234-2201","color":"lavender"},{"name":"Alessandro Mertz","email":"[email protected]","company":"Schowalter and Sons","credit_card_number":"1211-1221-1234-2201","color":"salmon"}] |
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
Fake Name | Fake Email | Fake Company | Fake Credit Card | Fake Favorite Color | |
---|---|---|---|---|---|
Dena Auer | [email protected] | Ward Group | 1211-1221-1234-2201 | purple | |
Rosalyn Jast | [email protected] | Wyman, Hartmann and Bradtke | 1228-1221-1221-1431 | grey | |
Lavada Klein | [email protected] | Thompson Inc | 1228-1221-1221-1431 | salmon | |
Hailee Green | [email protected] | Feest-Hilpert | 1212-1221-1121-1234 | silver | |
Lula Orn | [email protected] | Bartell, Batz and Bosco | 1234-2121-1221-1211 | blue | |
Eloisa Sauer | [email protected] | Lemke-Robel | 1228-1221-1221-1431 | green | |
Mose Dietrich MD | [email protected] | Wuckert Group | 1212-1221-1121-1234 | plum | |
Elijah Cronin | [email protected] | Schroeder and Sons | 1228-1221-1221-1431 | black | |
Icie McLaughlin | [email protected] | Kozey, Hudson and Carter | 1228-1221-1221-1431 | red |
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
Name | Street | City | State | Zip | ||
---|---|---|---|---|---|---|
Haleigh Koelpin | [email protected] | 34073 Faustino Light | Kochstad | Arizona | 96968-3886 | |
Demond Roberts I | [email protected] | 19972 Schaden Extension | West Annabelstad | Michigan | 85342-1191 | |
Danial Buckridge | [email protected] | 6470 Raegan Expressway | Zboncakstad | Kentucky | 58653 | |
Eliseo Feil II | [email protected] | 26890 Robert Summit | Stanport | Wisconsin | 73088-9082 | |
Brant Torp V | [email protected] | 3645 Brooklyn Glens | Kreigerport | Maine | 81575-6434 | |
Elody Marquardt | [email protected] | 768 Mariane Burgs | West Henrifort | Texas | 70741 | |
Melissa Kulas | [email protected] | 50130 Buster Pines | Streichhaven | Hawaii | 16828 | |
Noble Howe III | [email protected] | 382 Stephon Island | West Shayna | Rhode Island | 65108-4692 | |
Chesley Collins | [email protected] | 2587 Carter Extension | Maryberg | Arizona | 17601-3109 |
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
### Keybase proof | |
I hereby claim: | |
* I am cpetersen on github. | |
* I am cpetersen (https://keybase.io/cpetersen) on keybase. | |
* I have a public key whose fingerprint is 57A4 66F6 482D 4152 D008 B5A2 1DC7 758F 29F6 DD77 | |
To claim this, I am signing this object: |
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
module Enumerable | |
def sum | |
self.inject(0){|accum, i| accum + i } | |
end | |
def mean | |
self.sum/self.length.to_f | |
end | |
def sample_variance |
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 FileUtils | |
directory = File.join(ENV['HOME'], "ware_backups") | |
FileUtils.mkdir_p(directory) | |
wares = [] | |
Ware.in_groups do |ware| | |
if(ware.promo_image.present? && ware.replication_permissions["central"] == "origin") | |
wares << ware | |
File.open(File.join(directory, "#{ware.id}.json"), "w") { |file| file.write ware.as_json } |
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
# http://unicorn.bogomips.org/SIGNALS.html | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
rails_root = ENV['RAILS_ROOT'] || "/u/apps/cilantro/current" | |
God.watch do |w| | |
w.name = "unicorn" | |
w.interval = 30.seconds # default | |
# unicorn needs to be run from the rails root |
NewerOlder