#Title
Authors Affiliations
Suggested figures limit: 2 figures (please follow figure preparation guidelines from Nature Biotech, (http://www.nature.com/nbt/authors/submit/index.html#figures).
##Summary Sentence (suggested limit 30 words)
| import random | |
| guess = sorted([random.randrange(1,60) for z in range(0,5)]) | |
| filename = 'my-entry.txt' | |
| with open(filename, 'w') as f: | |
| f.write(', '.join([str(x) for x in guess])) | |
| f.write('\n') |
| import collections | |
| import synapseclient | |
| from synapseclient.utils import id_of | |
| syn = synapseclient.Synapse() | |
| syn.login() | |
| def copy_acl(source_entity, destination_entities, overwrite_existing=False): | |
| acl = syn._getACL(source_entity) | |
| for key in ['id','url','etag','creationDate']: |
| ## A script to read participant data out of Synapse and | |
| ## (help) clean it up. | |
| ## | |
| ## J. Christopher Bare | |
| ## chris.bare@sagebase.org | |
| ## Oct. 24, 2013 | |
| ############################################################ | |
| ## read evaluations | |
| ev1 <- synGetEvaluation(1917695) |
#Title
Authors Affiliations
Suggested figures limit: 2 figures (please follow figure preparation guidelines from Nature Biotech, (http://www.nature.com/nbt/authors/submit/index.html#figures).
##Summary Sentence (suggested limit 30 words)
##Background Why is this an important question and why is it interesting for the participants?
##Registration
${{jointeam?teamId={team[id]}&showProfileForm=true&isMemberMessage=You have successfully joined the {name}}}
##Data description What data types and how many samples are provided. The Data Description page has more details.
| import os | |
| import synapseclient | |
| syn = synapseclient.Synapse() | |
| syn.login() # insert credentials here, unless you have a cached API key. | |
| ## ADChallenge_WorkingGroup (syn2343636) Files » ADNI » Genetics » GWAS | |
| folder_id = 'syn2362101' | |
| ## Get all children of the parent folder |
| ############################################################ | |
| ## Find lost stuff in a git repository ## | |
| ## ## | |
| ## run in the root of your git repo ## | |
| ## Usage: python grep_git_objects.py <target> ## | |
| ############################################################ | |
| import os | |
| import sys | |
| import subprocess |
| import synapseclient | |
| from synapseclient import Synapse, File, Folder, Project | |
| import os | |
| def upload_recursive(directory, parent): | |
| for item in os.listdir(directory): | |
| if os.path.isdir(os.path.join(directory,item)): | |
| print "%s/" % os.path.basename(item) | |
| folder = syn.store(Folder(os.path.basename(item), parent=parent)) | |
| upload_recursive(directory=os.path.join(directory, item), parent=folder) |
| import synapseclient | |
| from synapseclient import File, Project, Folder | |
| syn = synapseclient.login() | |
| ## get latest 100 revisions of a wikipedia article | |
| url = "http://en.wikipedia.org/w/api.php?action=query&titles=Crimea&prop=revisions&rvprop=ids|timestamp|flags|content&rvlimit=100&format=json" | |
| response = requests.get(url) | |
| crimea = response.json() |
| import os | |
| import shutil | |
| import synapseclient | |
| from synapseclient import Project, Folder, Entity, File | |
| syn = synapseclient.login() | |
| def download(entity, directory=None, verbose=False, indent=0): | |
| """ |