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
| { | |
| doi: "10.1038/481241e", | |
| authors: [ | |
| {first: "Atsushi", last: "Takahashi", full: "Atsushi Takahashi", email:"[email protected]"}, | |
| {first: "Hisashi", last: "Tokita", full: "Hisashi Tokita", email:"[email protected]"}, | |
| {first: "Kenzo", last: "Takahashi", full: "Kenzo Takahashi", email:"[email protected]"} | |
| ], | |
| article_type: {code: "rhighlts", name: "Research Highlights"}, | |
| article_type_primaries: [ | |
| {code: "res", name: "Research"}, |
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
| SELECT (count(?s) as ?c) | |
| WHERE { | |
| ?s ?p <http://purl.org/ontology/po/Version> . | |
| } |
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 kivy.app import app | |
| from kivy.uix.widget import Widget | |
| class MyPaintWidget(Widget): | |
| """docstring for MyPaintWidget""" | |
| pass | |
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 random | |
| print random.randrange(1,200,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
| // add a function as an element of a dictionary | |
| >>> {1: lambda: len('ciao')} | |
| >>> {1: <function <lambda> at 0x101d530>} | |
| // get element with specified key | |
| >>> {1: lambda: len('ciao')}[1] | |
| >>> <function <lambda> at 0x101d5f0> | |
| >>> a = {1: lambda: len('ciao')}[1] | |
| >>> a | |
| >>> <function <lambda> at 0x101d670> |
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
| # will listen on port 8000 | |
| # http://127.0.0.1:8000 | |
| python -m SimpleHTTPServer |
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
| NSURL *url = [ [ NSURL alloc ] initWithString: @"http://www.cnn.com" ]; | |
| [[UIApplication sharedApplication] openURL:url]; |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <title>Your Website</title> | |
| </head> | |
| <body> |
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
| ;; it requires srfi-1 (lists), for fold-right. | |
| (define (alist-group-keys alist) | |
| (let ((create-cons-cell-or-append-to-existing | |
| (lambda (current acum) | |
| (let* ((key (car current)) | |
| (value (cdr current)) | |
| (cell (assoc key acum))) | |
| (if cell ; Key already seen, append current value to the list | |
| (begin | |
| (set-cdr! cell (cons value (cdr cell))) |
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
| mylist = range(150) | |
| nestedlist = [mylist[start:start + 20] for start in range(0, len(mylist), 20)] |
NewerOlder