We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains hidden or 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
city_id x y | |
a 2 2 | |
b 1 8 | |
c 4 9 | |
d 5 4 | |
e 6 7 | |
f 7 9 | |
g 7 2 | |
h 9 4 | |
i 9 7 |
This file contains hidden or 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
<button id="myid">I am a button!</button> | |
$(document).ready(function() { | |
$('#myid').click(function() { | |
// this gets called when you click button#myid | |
}); |
This file contains hidden or 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
import scala.tools.nsc._ | |
import io._ | |
object MkTree { | |
object Compiler extends Global(new Settings()) { | |
new Run() // have to initialize the compiler | |
def parse(code: String) = { | |
val bfs = new util.BatchSourceFile("<parse>", code) | |
val unit = new CompilationUnit(new util.ScriptSourceFile(bfs, code.toArray, 0)) |
This file contains hidden or 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
def sign(request: String): String = { | |
val mac = Mac.getInstance("HmacSHA512") | |
mac.init(new SecretKeySpec(Base64.decodeBase64(encodedSecret), "HmacSHA512")) | |
Base64.encodeBase64String(mac.doFinal(request.getBytes)) | |
} | |
val nonce = System.nanoTime() / 1000000 | |
val req = url("https://mtgox.com/api/1/generic/bitcoin/address") <:< Map( | |
"User-Agent" -> "useragentname", | |
"Rest-Key" -> apikey, |
This file contains hidden or 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
{ | |
"available": 5852, | |
"user_id": "1646", | |
"level": 2, | |
"itemsseen": 45, | |
"state": "up", | |
"leftover": { | |
"bags": 1, | |
"tops": 2, | |
"shoes": 1, |
This file contains hidden or 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
Protocol.new :title => "bacterial transformation" do | |
plasmid = Storage.get "demo:isolated-plasmid" | |
vial = Container.new(:centrifuge_15ml) | |
.add(5.uL, :from => plasmid) | |
.cool(277.kelvin, :for => 10.minutes) | |
tube = Container.new(:culture_tube).add(0.5.mL, Chemical.find(:media, :lysogeny_media)) |
This file contains hidden or 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
from random import randint | |
def search(ringSetA, ringB, ops_count = 0): | |
""" | |
Determines whether two rings are homomorphic in approximately linear time. | |
Essentially does a prefix search over two randomly-cut rings to shrink the search | |
space (i.e., possible shifts) as quickly as possible. | |
match: 4 4 6 2 2 1 ("ring B") | |
This file contains hidden or 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
def foo(): | |
mydata = a list of interesting whatever | |
return { | |
"aggdata": [ | |
{ | |
"date": x["date"], | |
"colA": x["something"], | |
.... | |
} for x in mydata | |
] |
This file contains hidden or 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
ActiveRecord::Schema.define(:version => 20110620010115) do | |
create_table "users", :force => true do |t| | |
t.datetime "created_at" | |
t.datetime "updated_at" | |
end | |
end |