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
prefix foaf: <http://xmlns.com/foaf/0.1/> | |
select distinct ?person ?givenName ?surname | |
where { | |
?person a foaf:Person; | |
foaf:givenName ?givenName; | |
foaf:surname ?surname . | |
} | |
LIMIT 200 |
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
def nested_map(f, maybe_iterable): | |
if hasattr(maybe_iterable, '__iter__'): | |
return [nested_map(f, x) for x in maybe_iterable] | |
else: | |
return f(maybe_iterable) |
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> | |
int main() { | |
while (1) { | |
void *ptr; | |
ptr = malloc(10); | |
} | |
} |
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
val words = List("Victoria", "Coren", "is", "barking", "up", "the", "wrong", "tree", "with", "this", "iPad", "example") | |
val longestWord = (x: List[String]) => x.sort(_.length > _.length).head | |
println(longestWord(words)) |
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
try: | |
data = get_from_database() | |
except ConnectionException: | |
return None | |
else: | |
return data |
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
$ curl -I http://4.mshcdn.com/wp-content/uploads/2011/01/iPad-One-Year-Anniversary-Infographic.jpg | |
HTTP/1.1 200 OK | |
Date: Thu, 27 Jan 2011 11:06:38 GMT | |
Server: Apache | |
Last-Modified: Wed, 26 Jan 2011 22:24:14 GMT | |
ETag: "12581b0-310eb-49ac74afb5f80" | |
Accept-Ranges: bytes | |
Content-Length: 200939 | |
Content-Type: image/jpeg | |
Cache-Control: private, max-age=259200 |
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
{ | |
"items": [ | |
{ | |
"properties": { | |
"name": [ | |
"Swingline\\u00ae 747\\u00ae Classic Desktop Staplers" | |
], | |
"photo": [ | |
"http://www.staples-3p.com/s7/is/image/Staples/s0021414_sc7?$std$" | |
], |
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
val src = Source.fromFile("/Users/tom/google_export.txt") | |
val data = src.getLines().map(_.split("\t")).toList | |
val ie_pre_9 = data.filter(_(0).toFloat < 9) | |
val ie_pre_9_shit_screens = ie_pre_9.filter(_(1).split("x")(0).toInt < 1024) | |
ie_pre_9_shit_screens.foldLeft(0)((x: Int, y: Array[String]) => x + y(2).toInt) |
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
select gil_wiki, count(*) from globalimagelinks where gil_to in (select img_name from image where img_user = 642738) group by gil_wiki; | |
+-------------------+----------+ | |
| gil_wiki | count(*) | | |
+-------------------+----------+ | |
| afwiki | 1 | | |
| arwiki | 5 | | |
| arzwiki | 1 | | |
| azwiki | 1 | | |
| bgwiki | 2 | | |
| cawiki | 4 | |
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 tommorris on github. | |
* I am tommorris (https://keybase.io/tommorris) on keybase. | |
* I have a public key whose fingerprint is 8CD9 EC2D 0876 1B61 A0FC 090F 9C11 DBDE E42D 0DB0 | |
To claim this, I am signing this object: |
OlderNewer