Prepend the given parameter with ``export``
425505
def export_file(file_path):
    """"""

    if not os.path.isfile(file_path):
        return error("Referenced file does not exist: '{}'.".format(file_path))

    return "export {}".format(file_path)
723836
def prepend(line, path):
    
    if isinstance(line, str):
        line = line.encode('utf-8')
    if not line.endswith(b'\n'):
        line += b'\n'
    temp = tempfile.NamedTemporaryFile('wb')
    temp_name = temp.name # We really only need a random path-safe name
    temp.close()
    with open(temp_name, 'wb') as temp:
        temp.write(line)
        with open(path, 'rb') as r:
            temp.write(r.read())
    # Now replace the original with the modified version
    shutil.move(temp_name, path)
271224
function addParamsToData(IOD, IODOpts, form) {
	form.append('apiKey', IOD.apiKey)

	_.each(exports.prepareParams(IODOpts.params), function(paramVal, paramName) {
		_.each(T.maybeToArray(paramVal), function(val) {
			form.append(paramName, val)
		})
	})
}
738236
function ExportDeclaration(node, parent, scope, formatter) {
  formatter.hasLocalExports = true;

  var source = node.source ? node.source.value : null;
  var exports = formatter.metadata.exports;

  // export function foo() {}
  // export var foo = "bar";
  var declar = this.get("declaration");
  if (declar.isStatement()) {
    var bindings = declar.getBindingIdentifiers();

    for (var name in bindings) {
      var binding = bindings[name];
      formatter._addExport(name, binding);

      exports.exported.push(name);
      exports.specifiers.push({
        kind: "local",
        local: name,
        exported: this.isExportDefaultDeclaration() ? "default" : name
      });
    }
  }

  if (this.isExportNamedDeclaration() && node.specifiers) {
    var _arr2 = node.specifiers;

    for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
      var specifier = _arr2[_i2];
      var exported = specifier.exported.name;
      exports.exported.push(exported);

      // export foo from "bar";
      if (t.isExportDefaultSpecifier(specifier)) {
        exports.specifiers.push({
          kind: "external",
          local: exported,
          exported: exported,
          source: source
        });
      }

      // export * as foo from "bar";
      if (t.isExportNamespaceSpecifier(specifier)) {
        exports.specifiers.push({
          kind: "external-namespace",
          exported: exported,
          source: source
        });
      }

      var local = specifier.local;
      if (!local) continue;

      formatter._addExport(local.name, specifier.exported);

      // export { foo } from "bar";
      // export { foo as bar } from "bar";
      if (source) {
        exports.specifiers.push({
          kind: "external",
          local: local.name,
          exported: exported,
          source: source
        });
      }

      // export { foo };
      // export { foo as bar };
      if (!source) {
        exports.specifiers.push({
          kind: "local",
          local: local.name,
          exported: exported
        });
      }
    }
  }

  // export * from "bar";
  if (this.isExportAllDeclaration()) {
    exports.specifiers.push({
      kind: "external-all",
      source: source
    });
  }

  if (!t.isExportDefaultDeclaration(node) && !declar.isTypeAlias()) {
    var onlyDefault = node.specifiers && node.specifiers.length === 1 && t.isSpecifierDefault(node.specifiers[0]);
    if (!onlyDefault) {
      formatter.hasNonDefaultExports = true;
    }
  }
}
1095669
private function prepareOptions()
    {
        $metadata = $this->metadata();

        // Can be override from the outside.
        if (!$this->exportIdent()) {
            $exportIdent = $this->exportIdent() ? : $this->metadata()->get('admin.default_export');
            if (!$exportIdent) {
                throw new Exception(sprintf(
                    'No export ident defined for "%s" in %s',
                    $this->objType(),
                    get_class($this)
                ));
            }

            $this->setExportIdent($exportIdent);
        }

        $export = $metadata->get('admin.export.'.$this->exportIdent());
        if (!$export) {
            throw new Exception(sprintf(
                'No export data defined for "%s" at "%s" in %s',
                $this->objType(),
                $this->exportIdent(),
                get_class($this)
            ));
        }

        if (is_string($export)) {
            $export = $metadata->get('admin.lists.'.$export);
            if (!$export) {
                throw new Exception(sprintf(
                    'No export data defined for "%s" in %s',
                    $this->objType(),
                    get_class($this)
                ));
            }
        }

        if (!isset($export['properties'])) {
            throw new Exception(sprintf(
                'No properties defined to export "%s" in %s',
                $this->objType(),
                get_class($this)
            ));
        }

        if (isset($export['exporter_options'])) {
            $opts = $export['exporter_options'];
            if (isset($opts['convert_br_to_newlines'])) {
                $this->setConvertBrToNewlines($opts['convert_br_to_newlines']);
            }
            if (isset($opts['strip_tags'])) {
                $this->setStripTags($opts['strip_tags']);
            }
            if (isset($opts['filename'])) {
                $this->setFilename($opts['filename']);
            }
        }

        // Default filename.
        // Filename is not a requirement
        if (!$this->filename()) {
            $ts = new DateTime('now');
            $filename = str_replace('/', '.', strtolower($this->objType())).'-export-'.$ts->format('Ymd.His').'.csv';
            $this->setFilename($filename);
        }

        // Properties to be exported
        // They will defined the file header and the rows.
        $this->setProperties($export['properties']);

        // Unnecessary for collection config.
        unset($export['properties']);
        unset($export['exporter_options']);

        // The rest is just collection config
        $this->setCollectionConfig($export);

        return $this;
    }
241763
function extend(target = {}, ...args) {
  let i = 0;
  const length = args.length;
  let options;
  let name;
  let src;
  let copy;
  if (!target) {
    target = exports.isArray(args[0]) ? [] : {};
  }
  for (; i < length; i++) {
    options = args[i];
    if (!options) {
      continue;
    }
    for (name in options) {
      src = target[name];
      copy = options[name];
      if (src && src === copy) {
        continue;
      }
      if (exports.isArray(copy)) {
        target[name] = extend([], copy);
      } else if (exports.isObject(copy)) {
        target[name] = extend(src && exports.isObject(src) ? src : {}, copy);
      } else {
        target[name] = copy;
      }
    }
  }
  return target;
}
116828
public static function postProcessing(Compiler $compiler, array $params, $prepend, $append, $content)
    {
        $params = $compiler->getCompiledParams($params);

        $out = $content . Compiler::PHP_OPEN . $prepend . "\n" . '$tmp = ob_get_clean();';
        if ($params['trim'] !== 'false' && $params['trim'] !== 0) {
            $out .= "\n" . '$tmp = trim($tmp);';
        }
        if ($params['cat'] === 'true' || $params['cat'] === 1) {
            $out .= "\n" . '$tmp = $this->readVar(\'dwoo.capture.\'.' . $params['name'] . ') . $tmp;';
        }
        if ($params['assign'] !== 'null') {
            $out .= "\n" . '$this->scope[' . $params['assign'] . '] = $tmp;';
        }

        return $out . "\n" . '$this->globals[\'capture\'][' . $params['name'] . '] = $tmp;' . $append . Compiler::PHP_CLOSE;
    }
437594
def Preprocess(self, data):
    """"""
    # Add whitespace to line continuations.
    data = data.replace(":\\", ": \\")

    # Strip comments manually because sudoers has multiple meanings for '#'.
    data = SudoersFieldParser.COMMENTS_RE.sub("", data)
    return data
840891
function Preprocessor(config, logger) {
  const log = logger.create('preprocessor.gzip');

  return (content, file, done) => {
    const originalSize = content.length;
    // const contentBuffer = Buffer.isBuffer(content) ? content : Buffer.from(content);

    zlib.gzip(content, (err, gzippedContent) => {
      if (err) {
        log.error(err);
        done(err);
        return;
      }

      // eslint-disable-next-line no-param-reassign
      file.encodings.gzip = gzippedContent;

      log.info(`compressed ${file.originalPath} [${util.bytesToSize(originalSize)} -> ${util.bytesToSize(gzippedContent.length)}]`);
      done(null, content);
    });
  };
}
474494
def add_export(exports='/etc/exports', path=None, hosts=None, options=None):
    '''
    
    '''
    if options is None:
        options = []
    if not isinstance(hosts, six.string_types):
        # Lists, etc would silently mangle /etc/exports
        raise TypeError('hosts argument must be a string')
    edict = list_exports(exports)
    if path not in edict:
        edict[path] = []
    new = {'hosts': hosts, 'options': options}
    edict[path].append(new)
    _write_exports(exports, edict)

    return new
728319
public void prepend(Object... aChunk) {
        for (int i = aChunk.length - 1; i >= 0; i--) {
            if (aChunk[i] instanceof String) {
                this.prepend((String) aChunk[i]);
            } else if (aChunk[i] instanceof SourceNode) {
                this.prepend((SourceNode) aChunk[i]);
            } else {
                throw new IllegalArgumentException();
            }
        }
    }
319716
def put_parameter(Name,
                  Value,
                  Description=None,
                  Type='String',
                  KeyId=None,
                  Overwrite=False,
                  AllowedPattern=None,
                  region=None,
                  key=None,
                  keyid=None,
                  profile=None):
    '''
    
    '''
    conn = __utils__['boto3.get_connection']('ssm', region=region, key=key, keyid=keyid, profile=profile)
    if Type not in ('String', 'StringList', 'SecureString'):
        raise AssertionError('Type needs to be String|StringList|SecureString')
    if Type == 'SecureString' and not KeyId:
        raise AssertionError('Require KeyId with SecureString')

    boto_args = {}
    if Description:
        boto_args['Description'] = Description
    if KeyId:
        boto_args['KeyId'] = KeyId
    if AllowedPattern:
        boto_args['AllowedPattern'] = AllowedPattern

    try:
        resp = conn.put_parameter(Name=Name, Value=Value, Type=Type, Overwrite=Overwrite, **boto_args)
    except conn.exceptions.ParameterAlreadyExists:
        log.warning("The parameter already exists."
                    " To overwrite this value, set the Overwrite option in the request to True")
        return False
    return resp['Version']
1185239
def prepend(self, frame_p):
        
        return lib.zmsg_prepend(self._as_parameter_, byref(zframe_p.from_param(frame_p)))
1202635
async function exportCustomSelectorsToMjsFile(to, customSelectors) {
	const mjsContents = Object.keys(customSelectors).reduce((mjsLines, name) => {
		mjsLines.push(`\t'${escapeForJS(name)}': '${escapeForJS(customSelectors[name])}'`);

		return mjsLines;
	}, []).join(',\n');
	const mjs = `export const customSelectors = {\n${mjsContents}\n};\n`;

	await writeFile(to, mjs);
}
153428
function wrap(body, extKeys) {
    const wrapper = [
        '(function (exports, require, module, __filename, __dirname',
        ') { ',
        '\n});'
    ];

    extKeys = extKeys ? `, ${extKeys}` : '';

    return wrapper[0] + extKeys + wrapper[1] + body + wrapper[2];
}
937884
def _put_template(params):
    
    f = open(_render(params['template']), 'r')
    template = f.read()

    run(_write_to(_render(template), _render(params['destination'])))
732421
def append(args):
    
    p = OptionParser(append.__doc__)
    p.add_option("--prepend", help="Prepend string to read names")
    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    bamfile, = args
    prepend = opts.prepend

    icmd = "samtools view -h {0}".format(bamfile)
    bamfile = bamfile.rsplit(".", 1)[0] + ".append.bam"
    ocmd = "samtools view -b -@ 64 - -o {0}".format(bamfile)
    p = Popen(ocmd, stdin=PIPE)
    for row in popen(icmd):
        if row[0] == '@':
            print(row.strip(), file=p.stdin)
        else:
            s = SamLine(row)
            if prepend:
                s.qname = prepend + "_" + s.qname
            else:
                s.update_readname()
            print(s, file=p.stdin)