<s> from bottle import get , post , request <EOL> from codalab . lib import spec_util <EOL> from codalab . server . authenticated_plugin import AuthenticatedPlugin <EOL> @ get ( '<STR_LIT>' , apply = AuthenticatedPlugin ( ) ) <EOL> def stream_file ( ) : <EOL> return open ( __file__ , '<STR_LIT:rb>' ) <EOL> @ post ( '<STR_LIT>' % spec_util . UUID_STR ) <EOL> def post_json ( uuid ) : <EOL> print ( request . json ) <EOL> response = { '<STR_LIT:test>' : '<STR_LIT>' , '<STR_LIT>' : <NUM_LIT:5> } <EOL> return response <EOL> @ post ( '<STR_LIT>' ) <EOL> def post_file ( ) : <EOL> data = request [ '<STR_LIT>' ] <EOL> return '<STR_LIT>' <EOL> @ get ( '<STR_LIT>' , apply = AuthenticatedPlugin ( ) ) <EOL> def oauth_protected ( ) : <EOL> return "<STR_LIT>" % request . user . user_name </s>
