Created
January 1, 2016 22:58
-
-
Save j6k4m8/fd34b5e0052793f2f869 to your computer and use it in GitHub Desktop.
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
import ndio.remote.OCPMeta as ndlims | |
import ndio.remote.OCP as OCP | |
oo = OCP() | |
ndl = ndlims() | |
secret = ????? | |
species = { | |
'Mouse': 'M. musculus', | |
'Drosophila': 'D. melanogaster', | |
'Rat': 'R. rattus', | |
'Zebrafish': 'D. rerio', | |
'Worm': 'C. elegans' | |
} | |
tokens = oo.get_public_tokens() | |
for t in tokens: | |
info = ndl.get_metadata(t) | |
if 'species' in info: | |
target_species = species[info['species']] \ | |
if info['species'] in species else info['species'] | |
ndl.set_metadata(t, { | |
"secret": secret, | |
"species": target_species | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment