code: def launch_job(job_name, cmd=None,
                 code_dir=None, excludes='*.ipynb .git .ipynb_checkpoints', dependencies=tuple(),
                 queue='john', image='codalab/python', memory='18g',
                 debug=False, tail=False):
      
      print 'Remember to set up SSH tunnel and LOG IN through the command line before calling this.'
  
      def execute(cmd):
          return shell(cmd, verbose=True, debug=debug)
  
      if code_dir:
          execute('cl up -n code -w {} {} -x {}'.format(worksheet, code_dir, excludes))
  
      options = '-v -n {} -w {} --request-queue {} --request-docker-image {} --request-memory {}'.format(
          job_name, worksheet, queue, image, memory)
      dep_str = ' '.join(['{0}:{0}'.format(dep) for dep in dependencies])
      cmd = "cl run {} {} '{}'".format(options, dep_str, cmd)
      if tail:
          cmd += ' -t'
      execute(cmd)
docs: Launch a job on CodaLab (optionally upload code that the job depends on).
  
      Args:
          job_name: name of the job
          cmd: command to execute
          code_dir: path to code folder. If None, no code is uploaded.
          excludes: file types to exclude from the upload
          dependencies: list of other bundles that we depend on
          debug: if True, prints SSH commands, but does not execute them
          tail: show the streaming output returned by CodaLab once it launches the job