Generate a job title, http://www.cubefigures.com/job.html
510504
def job():
	""
	j1 = random.choice(phrases.jobs1)
	j2 = random.choice(phrases.jobs2)
	j3 = random.choice(phrases.jobs3)
	return '%s %s %s' % (j1, j2, j3)
779205
public function generateJobs()
    {
        $destinationRoot = $this->cwd
            . $this->schema['paths']['job']
            . '/' . ucwords($this->schema['name']);

        if(!is_dir($destinationRoot)) {
            mkdir($destinationRoot, 0777, true);
        }

        foreach($this->schema['job'] as $action => $instructions) {
            $source = $this->source . '/Job.html';

            $destination = $destinationRoot . '/' . ucwords($action) . '.php';

            $this->schema['job_action'] = strtolower($action);
            $this->schema['job_instructions'] = $instructions;

            $this->copy($source, $destination);
        }
    }
693158
protected function _prepareForm()
    {
        $job = $this->getJob();
        $form = new Varien_Data_Form(
            array(
                'id'     => 'edit_form',
                'action' => $this->getData('action'),
                'method' => 'post'
            )
        );

        $fieldset = $form->addFieldset('base_fieldset', array('legend' => $this->__('General')));
        $this->_addElementTypes($fieldset);

        $fieldset->addField(
            'job_code',
            'text',
            array(
                'name'     => 'job_code',
                'label'    => $this->__('Job code'),
                'title'    => $this->__('Job code'),
                'class'    => '',
                'required' => true,
                'disabled' => $job->getJobCode() ? true : false,
            )
        );

        $fieldset->addField(
            'name',
            'text',
            array(
                'name'               => 'name',
                'label'              => $this->__('Name'),
                'title'              => $this->__('Name'),
                'class'              => '',
                'required'           => false,
                'after_element_html' => $this->getOriginalValueSnippet($job, 'name'),
            )
        );

        $fieldset->addField(
            'short_description',
            'textarea',
            array(
                'name'               => 'short_description',
                'label'              => $this->__('Short description'),
                'title'              => $this->__('Short description'),
                'class'              => '',
                'required'           => false,
                'after_element_html' => $this->getOriginalValueSnippet($job, 'short_description'),
            )
        );

        $fieldset->addField(
            'description',
            'textarea',
            array(
                'name'               => 'description',
                'label'              => $this->__('Description'),
                'title'              => $this->__('Description'),
                'class'              => '',
                'required'           => false,
                'after_element_html' => $this->getOriginalValueSnippet($job, 'description'),
            )
        );

        $fieldset->addField(
            'run_model',
            'text',
            array(
                'name'               => 'run_model',
                'label'              => $this->__('Run model'),
                'title'              => $this->__('Run model'),
                'class'              => '',
                'required'           => true,
                'note'               => $this->__('e.g. "aoe_scheduler/task_heartbeat::run"'),
                'after_element_html' => $this->getOriginalValueSnippet($job, 'run/model'),
            )
        );

        $fieldset->addField(
            'is_active',
            'select',
            array(
                'name'               => 'is_active',
                'label'              => $this->__('Status'),
                'title'              => $this->__('Status'),
                'required'           => true,
                'options'            => array(
                    0 => $this->__('Disabled'),
                    1 => $this->__('Enabled')
                ),
                'after_element_html' => $this->getOriginalValueSnippetFlag($job, 'is_active', 'Enabled', 'Disabled'),
            )
        );

        $fieldset = $form->addFieldset('cron_fieldset', array('legend' => $this->__('Scheduling')));
        $this->_addElementTypes($fieldset);

        $fieldset->addField(
            'schedule_config_path',
            'text',
            array(
                'name'               => 'schedule_config_path',
                'label'              => $this->__('Cron configuration path'),
                'title'              => $this->__('Cron configuration path'),
                'class'              => '',
                'required'           => false,
                'note'               => $this->__(
                    'Path to system configuration containing the cron configuration for this job. (e.g. system/cron/scheduler_cron_expr_heartbeat) This configuration - if set - has a higher priority over the cron expression configured with the job directly.'
                ),
                'after_element_html' => $this->getOriginalValueSnippet($job, 'schedule/config_path'),
            )
        );

        $fieldset->addField(
            'schedule_cron_expr',
            'text',
            array(
                'name'               => 'schedule_cron_expr',
                'label'              => $this->__('Cron expression'),
                'title'              => $this->__('Cron expression'),
                'required'           => false,
                'note'               => $this->__('e.g "*/5 * * * *" or "always"'),
                'after_element_html' => $this->getOriginalValueSnippet($job, 'schedule/cron_expr'),
            )
        );

        $fieldset = $form->addFieldset('parameter_fieldset', array('legend' => $this->__('Extras')));
        $this->_addElementTypes($fieldset);

        $fieldset->addField(
            'parameters',
            'textarea',
            array(
                'name'               => 'parameters',
                'label'              => $this->__('Parameters'),
                'title'              => $this->__('Parameters'),
                'class'              => 'textarea',
                'required'           => false,
                'note'               => $this->__('These parameters will be passed to the model. It is up to the model to specify the format of these parameters (e.g. json/xml/...'),
                'after_element_html' => $this->getOriginalValueSnippet($job, 'parameters'),
            )
        );

        $fieldset->addField(
            'groups',
            'textarea',
            array(
                'name'               => 'groups',
                'label'              => $this->__('Groups'),
                'title'              => $this->__('Groups'),
                'class'              => 'textarea',
                'required'           => false,
                'note'               => $this->__('Comma-separated list of groups (tags) that can be used with the include/exclude command line options of scheduler.php'),
                'after_element_html' => $this->getOriginalValueSnippet($job, 'groups'),
            )
        );

        $fieldset = $form->addFieldset('dependency_fieldset', array('legend' => $this->__('Dependencies')));
        $this->_addElementTypes($fieldset);

        $fieldset->addField(
            'on_success',
            'textarea',
            array(
                'name'               => 'on_success',
                'label'              => $this->__('Run jobs on success'),
                'title'              => $this->__('Run jobs on success'),
                'class'              => 'textarea',
                'required'           => false,
                'note'               => $this->__('Comma-separated list of job codes that will be scheduled after the current cron job has completed successfully.')
            )
        );

        $this->setForm($form);

        return parent::_prepareForm();
    }
50568
def generate_badge_svg(title, value, color='#007ec6'):
    
    (title_length, value_length) = get_text_length(title, value)
    return '''<svg xmlns="http://www.w3.org/2000/svg"
     width="{width}" height="20">
        <linearGradient id="b" x2="0" y2="100%">
            <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
            <stop offset="1" stop-opacity=".1"/>
        </linearGradient>
        <mask id="a" width="{width}" height="20">
            <rect width="{width}" height="20" rx="3"
            fill="#fff"/>
        </mask>
        <g mask="url(#a)">
            <path fill="#555" d="M0 0h{title_width}v20H0z" />
            <path fill="{color}"
            d="M{title_width} 0h{value_width}v20H{title_width}z"
            />
            <path fill="url(#b)" d="M0 0h{width}v20H0z" />
        </g>
        <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,
        Verdana,Geneva,sans-serif" font-size="11">
            <text x="{title_position}" y="15" fill="#010101"
            fill-opacity=".3">
                {title}
            </text>
            <text x="{title_position}" y="14">
                {title}
            </text>
            <text x="{value_position}"
            y="15" fill="#010101" fill-opacity=".3">
                {value}
            </text>
            <text x="{value_position}" y="14">
                {value}
            </text>
        </g>
    </svg>'''.format(
        title_width=title_length + 11,
        value_width=value_length + 11,
        width=title_length + value_length + 22,
        title_position=title_length / 2 + 6,
        value_position=title_length + value_length / 2 + 16,
        title=title,
        value=value,
        color=color,
    )
990658
function (jobName, customParams, callback) {
      [jobName, customParams, callback] = doArgs(arguments, ['string', ['object', {}], 'function']);

      doRequest({
        urlPattern: [LAST_BUILD, jobName]
      }, customParams, callback);
    }
561448
def job_info(self, **kwargs):
        
        search = ";".join(["%s : %s"%(k, str(kwargs[k])) for k in kwargs])
        params = {"owner_wsid": self.userid, "owner_pw": self.password,
                "conditions": search, "includeSystem": False}
        r = self._send_request("GetJobs", params=params)
        results = []
        for n in minidom.parseString(r.text).getElementsByTagName("CJJob"):
            results.append({})
            for e in n.childNodes:
                if e.nodeType != e.TEXT_NODE:
                    results[-1][e.tagName] = e.firstChild.data
        return results
164021
protected function job(): void
    {
        while (true) {

            $medals = $this->retrieve([
                'corporation_id' => $this->getCorporationId(),
            ]);

            if ($medals->isCachedLoad()) return;

            collect($medals)->each(function ($medal) {

                CorporationMedal::firstOrNew([
                    'corporation_id' => $this->getCorporationId(),
                    'medal_id'       => $medal->medal_id,
                ])->fill([
                    'title'       => $medal->title,
                    'description' => $medal->description,
                    'creator_id'  => $medal->creator_id,
                    'created_at'  => carbon($medal->created_at),
                ])->save();

            });

            if (! $this->nextPage($medals->pages))
                break;
        }
    }
773828
def new_job(self, task, inputdata, launcher_name="Unknown", debug=False):
        
        bjobid = uuid.uuid4()
        self._waiting_jobs.append(str(bjobid))
        self._client.new_job(task, inputdata,
                             (lambda result, grade, problems, tests, custom, archive, stdout, stderr:
                              self._callback(bjobid, result, grade, problems, tests, custom, archive, stdout, stderr)),
                             launcher_name, debug)
        return bjobid
74941
def create(self, name, data):
        
        return self._update('/job-binary-internals/%s' %
                            urlparse.quote(name.encode('utf-8')), data,
                            'job_binary_internal', dump_json=False)
494093
def _serialiseExistingJob(self, jobGraph, jobStore, returnValues):
        
        self._serialiseJobGraph(jobGraph, jobStore, returnValues, False)
        #Drop the completed command, if not dropped already
        jobGraph.command = None
        #Merge any children (follow-ons) created in the initial serialisation
        #with children (follow-ons) created in the subsequent scale-up.
        assert len(jobGraph.stack) >= 4
        combinedChildren = jobGraph.stack[-1] + jobGraph.stack[-3]
        combinedFollowOns = jobGraph.stack[-2] + jobGraph.stack[-4]
        jobGraph.stack = jobGraph.stack[:-4]
        if len(combinedFollowOns) > 0:
            jobGraph.stack.append(combinedFollowOns)
        if len(combinedChildren) > 0:
            jobGraph.stack.append(combinedChildren)
1371913
function (jobName, customParams, callback) {
      [jobName, customParams, callback] = doArgs(arguments, ['string', ['object', {}], 'function']);

      doRequest({
        urlPattern: [LAST_COMPLETED_BUILD, jobName]
      }, customParams, callback);
    }
213571
function (jobName, customParams, callback) {
      [jobName, customParams, callback] = doArgs(arguments, ['string', ['object', {}], 'function']);

      const self = this;

      doRequest({
        method: 'POST',
        urlPattern: [JOB_DISABLE, jobName],
        noparse: true
      }, customParams, function (error, data) {
        if (error) {
          callback(error, data);
          return;
        }
        self.job_info(jobName, customParams, callback);
      });
    }
131915
function createJob(feed) {

  // Job skeleton
  var job = {
    id: 'Job[' + uuid.v4() + ']',
    original: feed,
    time: {
      start: 0,
      end: 0
    },
    state: {
      retrying: false,
      failing: false
    },
    req: {
      retries: 0,
      data: {}
    },
    res: {
      data: null
    }
  };

  // Handling polymorphism
  if (types.check(feed, 'string')) {
    job.req.url = feed;
    feed = {};
  }
  else {

    // Parsing url if needed
    if (feed.url)
      if (types.check(feed.url, 'object'))
        job.req.url = nodeUrl.format(extend(feed.url, {protocol: 'http'}));
      else
        job.req.url = feed.url;
    else if (feed.host || feed.hostname)
      job.req.url = nodeUrl.format(extend(feed, {protocol: 'http'}));
  }

  // Request properties
  job.req.data = feed.data || {};

  [
    'auth',
    'artoo',
    'body',
    'bodyType',
    'cheerio',
    'cookies',
    'encoding',
    'headers',
    'method',
    'phantomPage',
    'proxy',
    'timeout'
  ].forEach(function(p) {
    if (feed[p]) {

      // Solving object proxy
      if (p === 'proxy' && types.check(feed[p], 'object'))
        job.req[p] = nodeUrl.format(extend(feed[p], {protocol: 'http'}));

      job.req[p] = feed[p];
    }
  });

  return job;
}
398004
def create_job(self, phases, name=None, input=None):
        
        log.debug('CreateJob')
        path = '/%s/jobs' % self.account
        body = {"phases": phases}
        if name:
            body["name"] = name
        if input:
            body["input"] = input
        headers = {"Content-Type": "application/json"}
        res, content = self._request(path,
                                     "POST",
                                     body=json.dumps(body),
                                     headers=headers)
        if res["status"] != '201':
            raise errors.MantaAPIError(res, content)
        location = res["location"]
        assert res["location"]
        job_id = res["location"].rsplit('/', 1)[-1]
        return job_id
808694
def _make_title(self):
        """"""
        # Draw the game title.
        title = pygame.Surface((self.game_width, self.origin[1]), pygame.SRCALPHA)
        title.fill((0, 0, 0, 0))
        label = self.font.render(self.NAME, True, (119, 110, 101))
        title.blit(label, (self.BORDER, (90 - label.get_height()) / 2))
        # Draw the label for the objective.
        label = load_font(self.FONT_NAME, 18).render(
            'Join the numbers and get to the %d tile!' % self.WIN_TILE, True, (119, 110, 101))
        title.blit(label, (self.BORDER, self.origin[1] - label.get_height() - self.BORDER))

        # Draw the new game button and calculate its hitbox.
        x1, y1 = self.WIDTH - self.BORDER - 100, self.origin[1] - self.BORDER - 28
        w, h = 100, 30
        pygame.draw.rect(title, (238, 228, 218), (x1, y1, w, h))
        label = load_font(self.FONT_NAME, 18).render('New Game', True, (119, 110, 101))
        w1, h1 = label.get_size()
        title.blit(label, (x1 + (w - w1) / 2, y1 + (h - h1) / 2))

        # Return the title section and its hitbox.
        return title, (x1, y1, x1 + w, y1 + h)
785294
def create_job(self):
        
        my_user_agent = None
        try:
            my_user_agent = pkg_resources.require('netort')[0].version
        except pkg_resources.DistributionNotFound:
            my_user_agent = 'DistributionNotFound'
        finally:
            headers = {
                "User-Agent": "Uploader/{uploader_ua}, {upward_ua}".format(
                    upward_ua=self.meta.get('user_agent', ''),
                    uploader_ua=my_user_agent
                )
            }
        req = requests.Request(
            'POST',
            "{api_address}{path}".format(
                api_address=self.api_address,
                path=self.create_job_path
            ),
            headers=headers
        )
        req.data = {
            'test_start': self.job.test_start
        }
        prepared_req = req.prepare()
        logger.debug('Prepared create_job request:\n%s', pretty_print(prepared_req))

        response = send_chunk(self.session, prepared_req)
        logger.debug('Luna create job status: %s', response.status_code)
        logger.debug('Answ data: %s', response.content)
        job_id = response.content.decode('utf-8') if isinstance(response.content, bytes) else response.content
        if not job_id:
            self.failed.set()
            raise ValueError('Luna returned answer without jobid: %s', response.content)
        else:
            logger.info('Luna job created: %s', job_id)
            return job_id
1360562
public R setJobTitle(String jobTitle) {
        mBodyMap.put(BoxUser.FIELD_JOB_TITLE, jobTitle);
        return (R) this;
    }