karchie / arc-sync Goto Github PK
View Code? Open in Web Editor NEWScripts for synchronizing a local cache with an XNAT project
Scripts for synchronizing a local cache with an XNAT project
Who can write this program in the fewest lines of code in the language of your choice*? arc-sync -h xnat.host.org -u user -p pass -m MR -proj MY_PROJ -l /my/local/archive - Get list of MR sessions in MY_PROJ. - Compare list of sessions with existing directories in /my/local/archive. - Download sessions that aren't listed as directories in /my/local/archive to /my/local/archive Everyone needs to try, submissions due on Monday and will be reviewed at lab meeting. I can do it in 10 lines, and I'm a crappy programmer. Whoever gets it done in fewest lines of code gets a $100 bonus. Anyone who makes their code sync specific sequence types gets extra kudos. -Dan * The language of your choice must be Perl, Python, or shell. Possibly something else if you prove Avi can run it without instruction. I'm guessing Perl is most compact but feel free to prove me wrong.
arc-sync$ ./arc-sync.py -h http://XXX.edu --proj YYY -u ZZZ -p "XXX"
Traceback (most recent call last):
File "./arc-sync.py", line 8, in <module>
map(lambda e: z.ZipFile(sio.StringIO(get('%(URI)s/scans/ALL/files?format=zip' % e)), 'r').extractall(opts['-l']), filter(lamb
ents' % opts))['ResultSet']['Result']))
File "./arc-sync.py", line 8, in <lambda>
map(lambda e: z.ZipFile(sio.StringIO(get('%(URI)s/scans/ALL/files?format=zip' % e)), 'r').extractall(opts['-l']), filter(lamb
ents' % opts))['ResultSet']['Result']))
KeyError: '-l'
most likely the script is too dated to talk to any recentish XNAT server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.