The underlying GICS table provides codes and descriptions
        identifying the current status or disposition of a grant project.

        >>> GICS().action('action_code', 'A')
772254
def action(self, column=None, value=None, **kwargs):
        
        return self._resolve_call('GIC_ACTION', column, value, **kwargs)
417146
def take_action(self, alert, action, text, **kwargs):
        """"""

        BASE_URL = '{}/projects/{}'.format(GITLAB_URL, quote(GITLAB_PROJECT_ID, safe=''))

        if action == 'createIssue':
            if 'issue_iid' not in alert.attributes:
                url = BASE_URL + '/issues?title=' + alert.text
                r = requests.post(url, headers=self.headers)

                alert.attributes['issue_iid'] = r.json().get('iid', None)
                alert.attributes['gitlabUrl'] = '<a href="{}" target="_blank">Issue #{}</a>'.format(
                    r.json().get('web_url', None),
                    r.json().get('iid', None)
                )

        elif action == 'updateIssue':
            if 'issue_iid' in alert.attributes:
                issue_iid = alert.attributes['issue_iid']
                body = 'Update: ' + alert.text
                url = BASE_URL + '/issues/{}/discussions?body={}'.format(issue_iid, body)
                r = requests.post(url, headers=self.headers)

        return alert, action, text
964557
def view(self, request, application, label, roles, actions):
        
        if application.content_type.model == 'applicant':
            if not application.applicant.email_verified:
                application.applicant.email_verified = True
                application.applicant.save()
        for action in actions:
            if action in request.POST:
                return action
        link, is_secret = base.get_email_link(application)
        return render(
            template_name='kgapplications/project_aed_introduction.html',
            context={
                'actions': actions,
                'application': application, 'roles': roles,
                'link': link, 'is_secret': is_secret,
            },
            request=request)
66071
@Whitelisted
    public List<Action> getStaticAnalysisActions() {
        if (isPluginInstalled("analysis-core")) {
            return new StaticAnalysisUtilities().getActions(build);
        } else {
            return Collections.emptyList();
        }
    }
292340
def do_action_for_many(self, context, request):
        
        savepoint = transaction.savepoint()
        workflow = getToolByName(context, 'portal_workflow')
        site_path = request['PATH_INFO'].replace("/@@API/doActionFor_many", "")

        obj_paths = json.loads(request.get('f', '[]'))
        action = request.get('action', '')
        if not action:
            raise BadRequest("No action specified in request")

        ret = {
            "url": router.url_for("doActionFor_many", force_external=True),
            "success": True,
            "error": False,
        }

        for obj_path in obj_paths:
            if not obj_path.startswith("/"):
                obj_path = "/" + obj_path
            obj = context.restrictedTraverse(str(site_path + obj_path))
            if obj_path.startswith(site_path):
                obj_path = obj_path[len(site_path):]
            try:
                workflow.doActionFor(obj, action)
                obj.reindexObject()
            except Exception as e:
                savepoint.rollback()
                msg = "Cannot execute '{0}' on {1} ({2})".format(
                    action, obj, e.message)
                msg = msg.replace("${action_id}", action)
                raise BadRequest(msg)
        return ret
800135
def action_analyze(sources,
                   endpoint=None,
                   print_opts=False,
                   verbose=False,
                   extra=False,
                   raw=False):
    
    for x in sources:
        click.secho("Parsing %s..." % str(x), fg='white')

    if extra:
        hide_base_schemas = False
        hide_implicit_types = False
        hide_implicit_preds = False
    else:
        hide_base_schemas = True
        hide_implicit_types = True
        hide_implicit_preds = True

    if raw:
        o = Ontospy(uri_or_path=sources, verbose=verbose, build_all=False)
        s = o.serialize()
        print(s)
        return
    elif endpoint:
        g = Ontospy(
            sparql_endpoint=sources[0],
            verbose=verbose,
            hide_base_schemas=hide_base_schemas,
            hide_implicit_types=hide_implicit_types,
            hide_implicit_preds=hide_implicit_preds)
        printDebug("Extracting classes info")
        g.build_classes()
        printDebug("..done")
        printDebug("Extracting properties info")
        g.build_properties()
        printDebug("..done")
    else:
        g = Ontospy(
            uri_or_path=sources,
            verbose=verbose,
            hide_base_schemas=hide_base_schemas,
            hide_implicit_types=hide_implicit_types,
            hide_implicit_preds=hide_implicit_preds)

    shellPrintOverview(g, print_opts)
402059
function unsupportedAction(res, statusCode, data) {

  return res.status(data
    ? statusCode
    : status.UNSUPPORTED_ACTION).json(data || statusCode || {
    message: 'Unsupported Action'
  });
}
577039
def get_actions(self, request, view):
        
        metadata = OrderedDict()
        actions = self.get_resource_actions(view)

        resource = view.get_object()
        for action_name, action in actions.items():
            if action_name == 'update':
                view.request = clone_request(request, 'PUT')
            else:
                view.action = action_name

            data = ActionSerializer(action, action_name, request, view, resource)
            metadata[action_name] = data.serialize()
            if not metadata[action_name]['enabled']:
                continue
            fields = self.get_action_fields(view, action_name, resource)
            if not fields:
                metadata[action_name]['type'] = 'button'
            else:
                metadata[action_name]['type'] = 'form'
                metadata[action_name]['fields'] = fields

            view.action = None
            view.request = request

        return metadata
158501
def assistance(self, column=None, value=None, **kwargs):
        
        return self._resolve_call('GIC_ASST_PGM', column, value, **kwargs)
704975
def view(self, request, application, label, roles, actions):
        
        if 'ajax' in request.POST:
            resp = self.handle_ajax(request, application)
            return HttpResponse(
                json.dumps(resp), content_type="application/json")

        form_models = {
            'common': forms.CommonApplicationForm,
            'new': forms.NewProjectApplicationForm,
            'existing': forms.ExistingProjectApplicationForm,
        }

        project_forms = {}

        for key, form in six.iteritems(form_models):
            project_forms[key] = form(
                request.POST or None, instance=application)

        if application.project is not None:
            project_forms["common"].initial = {'application_type': 'U'}
        elif application.name != "":
            project_forms["common"].initial = {'application_type': 'P'}

        if 'application_type' in request.POST:
            at = request.POST['application_type']
            valid = True
            if at == 'U':
                # existing project
                if project_forms['common'].is_valid():
                    project_forms['common'].save(commit=False)
                else:
                    valid = False
                if project_forms['existing'].is_valid():
                    project_forms['existing'].save(commit=False)
                else:
                    valid = False

            elif at == 'P':
                # new project
                if project_forms['common'].is_valid():
                    project_forms['common'].save(commit=False)
                else:
                    valid = False
                if project_forms['new'].is_valid():
                    project_forms['new'].save(commit=False)
                else:
                    valid = False
                application.institute = application.applicant.institute

            else:
                return HttpResponseBadRequest("<h1>Bad Request</h1>")

            # reset hidden forms
            if at != 'U':
                # existing project form was not displayed
                project_forms["existing"] = (
                    form_models["existing"](instance=application))
                application.project = None
            if at != 'P':
                # new project form was not displayed
                project_forms["new"] = form_models["new"](instance=application)
                application.name = ""
                application.institute = None
                application.description = None
                application.additional_req = None
                application.machine_categories = []
                application.pid = None

            # save the values
            application.save()

            if project_forms['new'].is_valid() and at == 'P':
                project_forms["new"].save_m2m()

            # we still need to process cancel and prev even if form were
            # invalid
            if 'cancel' in request.POST:
                return "cancel"
            if 'prev' in request.POST:
                return 'prev'

            # if forms were valid, jump to next state
            if valid:
                for action in actions:
                    if action in request.POST:
                        return action
                return HttpResponseBadRequest("<h1>Bad Request</h1>")
        else:
            # we still need to process cancel, prev even if application type
            # not given
            if 'cancel' in request.POST:
                return "cancel"
            if 'prev' in request.POST:
                return 'prev'

        # lookup the project based on the form data
        project_id = project_forms['existing']['project'].value()
        project = None
        if project_id:
            try:
                project = Project.objects.get(pk=project_id)
            except Project.DoesNotExist:
                pass

        # render the response
        return render(
            template_name='kgapplications/project_aed_project.html',
            context={
                'forms': project_forms,
                'project': project,
                'actions': actions,
                'roles': roles,
                'application': application,
            },
            request=request)
336138
def model_actions(self):
        
        observations = self.get('rollout:observations')
        model_action = self.model.action(observations)
        return model_action
498493
def actions(self, req_action):
    """"""
    if FLAGS.sc2_log_actions:
      for action in req_action.actions:
        sys.stderr.write(str(action))
        sys.stderr.flush()

    return self._client.send(action=req_action)
1133702
def model_action_q(self):
        
        q = self.get('model:q')
        actions = self.get('rollout:actions')
        return q.gather(1, actions.unsqueeze(1)).squeeze(1)
609609
def post_gist(content, description='', filename='file', auth=False):
    """"""
    post_data = json.dumps({
      "description": description,
      "public": True,
      "files": {
        filename: {
          "content": content
        }
      }
    }).encode('utf-8')

    headers = make_auth_header() if auth else {}
    response = requests.post("https://api.github.com/gists", data=post_data, headers=headers)
    response.raise_for_status()
    response_data = json.loads(response.text)
    return response_data['html_url']
804786
def action(args):
    
    log.info('loading reference package')

    pkg = refpkg.Refpkg(args.refpkg, create=False)

    with open(pkg.file_abspath('seq_info'), 'rU') as seq_info:
        seqinfo = list(csv.DictReader(seq_info))
        snames = [row['seqname'] for row in seqinfo]

    if args.seq_names:
        print('\n'.join(snames))
    elif args.tally:
        tally_taxa(pkg)
    elif args.lengths:
        print_lengths(pkg)
    else:
        print('number of sequences:', len(snames))
        print('package components\n', '\n'.join(sorted(pkg.file_keys())))
161735
def _link_to_action_mentions(self, actionmention_filename):
        """"""
        parser = GenewaysActionMentionParser(actionmention_filename)
        self.action_mentions = parser.action_mentions

        for action_mention in self.action_mentions:
            hiid = action_mention.hiid
            if hiid not in self.hiid_to_action_index:
                m1 = 'Parsed action mention has hiid %d, which does not exist'
                m2 = ' in table of action hiids'
                raise Exception((m1 + m2) % hiid)
            else:
                idx = self.hiid_to_action_index[hiid]
                self.actions[idx].action_mentions.append(action_mention)
654634
def _get_action(self, action_meta):
        '''
        
        '''
        conf = {
            'fun': list(action_meta.keys())[0],
            'arg': [],
            'kwargs': {},
        }
        if not len(conf['fun'].split('.')) - 1:
            conf['salt.int.intfunc'] = True

        action_meta = action_meta[conf['fun']]
        info = action_meta.get('info', 'Action for {}'.format(conf['fun']))
        for arg in action_meta.get('args') or []:
            if not isinstance(arg, dict):
                conf['arg'].append(arg)
            else:
                conf['kwargs'].update(arg)

        return info, action_meta.get('output'), conf