Gets list of scripts from server
974469
public function get_scripts()
    {
        if (!$this->list) {

            if (!$this->sieve)
                return $this->_set_error(self::ERROR_INTERNAL);

            $list = $this->sieve->listScripts($active);

            if (is_a($list, 'PEAR_Error')) {
                return $this->_set_error(self::ERROR_OTHER);
            }

            $this->list   = $list;
            $this->active = $active;
        }

        return $this->list;
    }
439373
def cache_script(script, text, opts={}):
    """"""
    global script_cache
    if script not in script_cache:
        update_script_cache(script, text, opts)
        pass
    return script
620189
function getScript(url) {
		
		var script = scripts[url.name || url];
		if (script) { return script; }
		
		if (typeof url == 'object') {
			for (var key in url) {
				if (url[key]) {
					script = { name: key, url: url[key] };
				}
			}
		} else {


			var els = url.split("/"),
				 name = els[els.length -1],
				 i = name.indexOf("?");
				 
			script = {
				name: i != -1 ? name.substring(0, i) : name, 
				url: url 
			}; 
		}
		
		scripts[script.name] = script;
		return script;
	}
900577
def get_script_str(self, reset=True):
        """"""
        s = "\n".join(l for l in self._lines)
        if reset:
            self.reset()
        return s
8488
function loadScripts(scripts, loadedCallback) {
    var srcs = [], property, count, i, src,
        countDown = function () {
          count -= 1;
          if (!count) {
            loadedCallback();
          }
        };

    for (property in scripts) {
      if (!(property in window)) {
        srcs.push(scripts[property]);
      }
    }

    count = srcs.length;
    if (!count) {
      loadedCallback();
    }

    for (i = 0; i < srcs.length; i += 1) {
      src = srcs[i];
      loadScript(src, countDown);
    }
  }
442791
@Override
	public List<String> getScripts() {
		final String sourceMethod = "getScripts"; //$NON-NLS-1$
		if (isTraceLogging) {
			log.entering(RequestedModuleNames.class.getName(), sourceMethod);
			log.exiting(RequestedModuleNames.class.getName(), sourceMethod, scripts);
		}
		return scripts;
	}
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
1222594
function extractScriptNames() {
  console.log("Extracting script file names from index.html");

  var regexScriptName = /<script src="(.*?)"><\/script>/g;
  var scriptSection = regexScriptSection.exec(indexFile)[1];

  // extract script names
  var names = []; 
  var match;
  while ((match = regexScriptName.exec(scriptSection)) != null) {
    var script = match[1];
    names.push(script);
  }
    
  return names;
}
537733
def load_scripts():
    ''''''
    # Add scrypture package package to the path before importing
    # so everything can import everything else regardless of package
    scrypture_dir = os.path.realpath(
                         os.path.abspath(
                           os.path.split(
                             inspect.getfile( inspect.currentframe() ))[0]))

    if scrypture_dir not in sys.path:
        sys.path.insert(0, scrypture_dir)

    # Load list of registered scripts
    registered_scripts = app.config['REGISTERED_SCRIPTS']

    for script in registered_scripts:
        try:
            s = import_module('.'+script,
                package=os.path.split(app.config['SCRIPTS_DIR'])[-1])
            s.package = s.__name__.split('.')[1]
            #remove package from script name:
            script_name = script.split('.')[-1]
            registered_modules[script_name] = s
        except Exception as e:
            logging.warning('Could not import ' + \
                            str(script)+': '+str(e.message))
            logging.debug(str(traceback.format_exc()))
            continue
433426
def show
      script_listing = Script::Listing.find(params[:listing_id])
      @script_url = script_listing.urls.friendly.find(params[:id])
    end
524191
def list():
    '''
    
    '''
    kbs = []
    ret = _pshell_json('Get-HotFix | Select HotFixID')
    for item in ret:
        kbs.append(item['HotFixID'])
    return kbs
443130
def list_servers(backend, socket=DEFAULT_SOCKET_URL, objectify=False):
    '''
    
    '''
    ha_conn = _get_conn(socket)
    ha_cmd = haproxy.cmds.listServers(backend=backend)
    return ha_conn.sendCmd(ha_cmd, objectify=objectify)
804335
def script(self):
        
        script_item = [subtag for subtag in self.subtags if subtag.type == 'script']

        return script_item[0] if len(script_item) > 0 else None
286904
def Scripts(unicode_dir=_UNICODE_DIR):
  

  scripts = {}

  def DoLine(codes, fields):
    """Process single Scripts.txt line, updating scripts."""
    (_, name) = fields
    scripts.setdefault(name, []).extend(codes)

  ReadUnicodeTable(unicode_dir+"/Scripts.txt", 2, DoLine)
  return scripts
557191
def script_input(module_name):
    ''''''
    if module_name not in registered_modules:
        return page_not_found(module_name)
    form = registered_modules[module_name].WebAPI()
    return render_template('script_index.html',
                           form=form,
                           scripts=registered_modules,
                           module_name=module_name)
1254213
@GET
    @Path("{dbName}/scripts")
    public List<ScriptInfo> scripts(@PathParam("dbName") String dbName) {
        Migration migration = locator.getService(Migration.class, dbName);
        if (migration == null)
            throw new NotFoundException();
        return migration.allScript();
    }
679029
def get_help_commands(server_prefix):
    

    datapacks = []

    _dir = os.path.realpath(
        os.path.join(os.getcwd(), os.path.dirname(__file__)))
    for module_name in os.listdir("{}/../".format(_dir)):
        if not module_name.startswith("_") and not module_name.startswith("!"):
            help_command = "`{}help {}`".format(server_prefix, module_name)
            datapacks.append((module_name, help_command, True))

    return datapacks