DETAILED PROFILE - Script Authors
433426
def show
      script_listing = Script::Listing.find(params[:listing_id])
      @script_url = script_listing.urls.friendly.find(params[:id])
    end
606890
def authors():
    
    fmt_re = re.compile(r'([^<]+) <([^>]+)>')
    authors = local('git shortlog -s -e -n | cut -f 2-', capture=True)
    with open('AUTHORS', 'w') as fh:
        fh.write('Project contributors\n')
        fh.write('====================\n\n')
        for line in authors.splitlines():
            match = fmt_re.match(line)
            name, email = match.groups()
            if email in env.ignored_authors:
                continue
            fh.write(' * ')
            fh.write(line)
            fh.write('\n')
768759
def author(self) -> Developer:
        
        return Developer(self._c_object.author.name,
                         self._c_object.author.email)
1296522
def profile(ctx, filepath, calltree=False):
    

    filepath = pathlib.Path(filepath)
    if not filepath.is_file():
        report.error(ctx, "profile", f"no such script {filepath!s}")
    else:
        if calltree:
            report.info(ctx, "profile", f"profiling script {filepath!s} calltree")
            ctx.run(
                (
                    f"python -m cProfile -o .profile.cprof {filepath!s}"
                    " && pyprof2calltree -k -i .profile.cprof"
                    " && rm -rf .profile.cprof"
                )
            )
        else:
            report.info(ctx, "profile", f"profiling script {filepath!s}")
            ctx.run(f"vprof -c cmhp {filepath!s}")
658740
function authorsLog() {
			// Generate list of authors/contributors since last tag/release
			if (!options.authors) {
				if (options.authorsRequired) {
					throw new Error('Invalid "options.authors": "' + options.authors + '" ("options.authorsRequired": '
							+ options.authorsRequired + '"');
				}
				return;
			}
			var athrsPath = path.join(options.distDir, options.authors);
			athrsRtn = cmd('git --no-pager shortlog -sen HEAD > ' + athrsPath, null, false, athrsPath,
					options.authorsSkipLineRegExp)
					|| '';
			utils.validateFile(athrsPath, rollCall);
		}
1255773
def reference_creator_surnames(self, index):
        """"""
        # TODO Not true, ex: ISBN 978-1-4398-3778-8. Return all creator types?
        # Academic books published as a collection of chapters contributed by
        # different authors have editors but not authors at the level of the
        # book (as opposed to the level of a chapter).
        creators = self.reference_data(index)["creators"]
        creator_types = [x["creatorType"] for x in creators]
        # 'name' (not split) might be used instead of 'firstName' and 'lastName'.
        try:
            if "author" in creator_types:
                return [x["lastName"] for x in creators if x["creatorType"] == "author"]
            else:
                return [x["lastName"] for x in creators]
        except KeyError:
            return []
137198
def import_authors(self, tree):
        
        self.write_out(self.style.STEP('- Importing authors\n'))

        post_authors = set()
        for item in tree.findall('channel/item'):
            post_type = item.find('{%s}post_type' % WP_NS).text
            if post_type == 'post':
                post_authors.add(item.find(
                    '{http://purl.org/dc/elements/1.1/}creator').text)

        self.write_out('> %i authors found.\n' % len(post_authors))

        authors = {}
        for post_author in post_authors:
            if self.default_author:
                authors[post_author] = self.default_author
            else:
                authors[post_author] = self.migrate_author(
                    post_author.replace(' ', '-'))
        return authors
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
1329327
def creator(entry, config):
        """"""
        script = render(config.script, model=config.model, env=config.env, item=config.item)

        temp = tempfile.NamedTemporaryFile(prefix="script-", suffix=".py", mode='w+t', delete=False)
        temp.writelines(script)
        temp.close()

        language = 'python' if 'type' not in entry else entry['type']
        template_file = os.path.join(os.path.dirname(__file__), 'templates/%s-script.sh.j2' % language)

        with open(template_file) as handle:
            template = handle.read()
            config.script = render(template, script=temp.name)

        return Script(config)
1210794
def write_script(self, script_name, contents, mode="t", blockers=()):
        """"""
        self.delete_blockers(  # clean up old .py/.pyw w/o a script
            [os.path.join(self.script_dir, x) for x in blockers]
        )
        log.info("Installing %s script to %s", script_name, self.script_dir)
        target = os.path.join(self.script_dir, script_name)
        self.add_output(target)

        if self.dry_run:
            return

        mask = current_umask()
        ensure_directory(target)
        if os.path.exists(target):
            os.unlink(target)
        with open(target, "w" + mode) as f:
            f.write(contents)
        chmod(target, 0o777 - mask)
252313
def get_authors():
    """"""
    authors = []
    authorfile = os.path.join('doc', 'authors.txt')
    with codecs.open(authorfile, 'r', 'utf-8') as f:
        for line in f:
            line = line.strip()
            if line and not line.startswith(u'#'):
                authors.append(line)
    return u", ".join(authors)
352862
def get_author(self, **kwargs):
        """"""
        qualifier = kwargs.get('qualifier', '')
        children = kwargs.get('children', [])
        creator_type_per = False
        author_name = None
        # Find the creator type in children.
        for child in children:
            if child.tag == 'type' and child.content == 'per':
                creator_type_per = True
            # Get the author name.
            elif child.tag == 'name':
                author_name = child.content
        if qualifier == 'aut' and creator_type_per and author_name:
            return author_name

        return None
242793
def destroy
      @script_listing = Script::Listing.find(params[:listing_id])
      @script_url = @script_listing.urls.find(params[:id])
      @script_url.destroy
      redirect_to script_listing_urls_path, notice: 'Author was successfully destroyed.'
    end
898956
function isLifeCycleScript (prefix, name, scripts) {
  const re = new RegExp("^" + prefix)
  const root = name.slice(prefix.length)
  return Boolean(name.match(re) && (scripts[root] || BUILTINS.includes(root)))
}
583356
def get_authors(apikey, username, password):
    
    authenticate(username, password)
    return [author_structure(author)
            for author in Author.objects.filter(is_staff=True)]
92710
function runScripts() {
  var scripts = [];
  var types = ["text/ecmascript-6", "text/6to5", "text/babel", "module"];
  var index = 0;

  /**
   * Transform and execute script. Ensures correct load order.
   */

  var exec = function exec() {
    var param = scripts[index];
    if (param instanceof Array) {
      transform.run.apply(transform, param);
      index++;
      exec();
    }
  };

  /**
   * Load, transform, and execute all scripts.
   */

  var run = function run(script, i) {
    var opts = {};

    if (script.src) {
      transform.load(script.src, function (param) {
        scripts[i] = param;
        exec();
      }, opts, true);
    } else {
      opts.filename = "embedded";
      scripts[i] = [script.innerHTML, opts];
    }
  };

  // Collect scripts with Babel `types`.

  var _scripts = global.document.getElementsByTagName("script");

  for (var i = 0; i < _scripts.length; ++i) {
    var _script = _scripts[i];
    if (types.indexOf(_script.type) >= 0) scripts.push(_script);
  }

  for (i in scripts) {
    run(scripts[i], i);
  }

  exec();
}
515327
def check_author_info(package_info, *args):
    
    reason = "Author name or email missing"
    result = False

    if package_info.get('author') not in BAD_VALUES or package_info.get('author_email') not in BAD_VALUES:
        result = True

    return result, reason, HAS_AUTHOR_INFO