Gets the Plan Scripts API client.

        Returns:
            PlanScripts:
177596
def plan_scripts(self):
        
        if not self.__plan_scripts:
            self.__plan_scripts = PlanScripts(self.__connection)
        return self.__plan_scripts
1237648
def get_script(name=None):  # noqa: E501
    

    if(not hasAccess()):
        return redirectUnauthorized()

    driver = LoadedDrivers.getDefaultBaseDriver()
    return Response(status=200, body=driver.readScript(name))
896925
def Get(self):
    """"""

    args = client_pb2.ApiGetClientArgs(client_id=self.client_id)
    result = self._context.SendRequest("GetClient", args)
    return Client(data=result, context=self._context)
178075
def get_clients(self, limit=None, offset=None):
        
        data = {}
        if limit:
            data['limit'] = limit
        if offset:
            data['offset'] = offset
        result = self._request('GET', '/clients', data=json.dumps(data))
        return result.json()
239014
def get_clients(self):
        
        public = self.channels['public']
        private = self.channels['private']
        return dict(public.items() + private.items())
325266
def _get_script(self):
        
        if settings.repeat:
            repeat_fuck = '{} --repeat {}--force-command {}'.format(
                get_alias(),
                '--debug ' if settings.debug else '',
                shell.quote(self.script))
            return shell.or_(self.script, repeat_fuck)
        else:
            return self.script
1303363
protected function getScript()
    {
        $apiUrl = trim($this->getTemplateVariable('api_url'));
        $apiKey = trim($this->getTemplateVariable('api_key'));

        $delivery = $this->getTemplateVariable('delivery');
        if (!$delivery) {
            $delivery = 'script';
        }
        $response = $this->getTemplateVariable('response');

        $failedValue = ($delivery === 'script' && $response === 'json') ?
            '{} /* sourcepoint failed */' : '<!--sourcepoint-failed-->';
        $cacheKey = sprintf('wblib:sourcepoint:script:%s:%s', $delivery, $response);

        if (empty($apiUrl) || empty($apiKey)) {
            return ['data' => ['script' => $failedValue]];
        }

        $cachedScript = $this->cacheStore->get($cacheKey);
        if (false !== $cachedScript) {
            return ['data' => ['script' => $cachedScript]];
        }

        $scriptEndpoint = sprintf('%sscript/detection?delivery=%s', $apiUrl, $delivery);
        $script = null;

        try {
            $curl = curl_init();
            curl_setopt($curl, CURLOPT_URL, $scriptEndpoint);
            curl_setopt($curl, CURLOPT_HTTPHEADER, [sprintf('Authorization: Token %s', $apiKey)]);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);
            curl_setopt($curl, CURLOPT_TIMEOUT, 1);

            $script = trim(curl_exec($curl));
            $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

            curl_close($curl);

            if ((200 <= $httpCode) && ($httpCode < 400)) {
                if ($delivery === 'script' && $response === 'json') {
                    $el = new SimpleXmlElement($script);
                    $attributes = (array) $el->attributes();
                    $attributesArr = $attributes['@attributes'];
                    $script = json_encode($attributesArr);
                    $this->cacheStore->put($cacheKey, $script, $this->cacheTtl);
                } else {
                    // This can be a number of different formats
                    // URL: https://analytics.sourcepoint.com/doc/index#get-script-as-tag-on-page
                    // e.g.: <script async="async" data-client-id="YOUR_CLIENT_ID" type="text/javascript" src="//d3ujids68p6xmq.cloudfront.net/abw.js"></script>
                    // e.g.: <script data-client-id="YOUR_CLIENT_ID" type="text/javascript">function detect() {};</script>
                    // e.g.: function detect() {};
                    $this->cacheStore->put($cacheKey, $script, $this->cacheTtl);
                }
            } else {
                $this->Logger->error(sprintf('Received an HTTP error code: %s', $httpCode));
                $script = $failedValue;
                $this->cacheStore->put($cacheKey, $failedValue, $this->failedCacheTtl);
            }
        } catch (\Exception $e) {
            $this->Logger->error(sprintf('CURL to [%s] failed with: %s', $scriptEndpoint, $e->getMessage()));
            $this->cacheStore->put($cacheKey, $failedValue, $this->failedCacheTtl);
        }

        return ['data' => ['script' => $script]];
    }
703990
def get_client(self, provider):
        ""
        if self.client_class is not None:
            return self.client_class(provider)
        return get_client(provider)
177971
def get_api_client(cls):
    """"""
    config = cloudsmith_api.Configuration()
    client = cls()
    client.config = config
    client.api_client.rest_client = RestClient()

    user_agent = getattr(config, "user_agent", None)
    if user_agent:
        client.api_client.user_agent = user_agent

    headers = getattr(config, "headers", None)
    if headers:
        for k, v in six.iteritems(headers):
            client.api_client.set_default_header(k, v)

    return client
309191
def get_policy(self):
        
        if not self._policy:
            self._policy = self.policy_class(self._maps, self._clients)
        return self._policy
524031
def get_client(self):
        
        backend_class = import_string(current_app.config.get('CACHE_BACKEND'))
        backend = backend_class(**current_app.config.get('CACHE_BACKEND_OPTIONS'))
        return backend
719654
def get_scripts(self):
        
        ret = list()
        for d in self.allpaths:
            scripts = filter(lambda x: x.startswith(self.prefix), os.listdir(d))
            scripts.sort(reverse=(not self.sort_ascending))
            ret = ret + [os.path.join(d, x) for x in scripts]

        return(ret)
344192
def script_request_list_send(self, target_system, target_component, force_mavlink1=False):
                '''
                

                '''
                return self.send(self.script_request_list_encode(target_system, target_component), force_mavlink1=force_mavlink1)
1357719
def user_agent(self):
        
        version = ""
        project_root = os.path.dirname(os.path.abspath(__file__))
        with open(os.path.join(project_root, 'VERSION')) as version_file:
            version = version_file.read().strip()

        return "Python Snow Api Client (Version %s)" % version
1111400
def _get_scripts(self, scripts_path_rel, files_deployment, script_type, project_path):
        

        scripts_dict = {}
        if scripts_path_rel:

            self._logger.debug('Getting scripts with {0} definitions'.format(script_type))
            scripts_dict = pgpm.lib.utils.misc.collect_scripts_from_sources(scripts_path_rel, files_deployment,
                                                                            project_path, False, self._logger)
            if len(scripts_dict) == 0:
                self._logger.debug('No {0} definitions were found in {1} folder'.format(script_type, scripts_path_rel))
        else:
            self._logger.debug('No {0} folder was specified'.format(script_type))

        return scripts_dict
916874
def get_receive(self, script_list):
        """"""
        events = defaultdict(set)
        for script in script_list:
            if self.script_start_type(script) == self.HAT_WHEN_I_RECEIVE:
                event = script.blocks[0].args[0].lower()
                events[event].add(script)
        return events
874012
def get_script(script_name):
    '''
    '''
    install_dir = get_installdir()
    script_path = "%s/build/scripts/%s" %(install_dir,script_name)
    if os.path.exists(script_path):
        return script_path
    else:
        bot.error("Script %s is not included in singularity-python!" %script_path)
        return None