Sets the home folder of all flot javascript files
321940
public static void setFlotHome(String flotHome) {
        if (flotHome == null || flotHome.trim().isEmpty()) {
            System.clearProperty(SYSTEM_PROPERTY_FLOT_HOME);
        } else {
            final String propValue = flotHome.endsWith("/") ? flotHome.substring(0, flotHome.length() - 1) : flotHome;
            System.setProperty(SYSTEM_PROPERTY_FLOT_HOME, propValue);
        }
    }
218833
function setGlobalLibDirectory (argv, config) {
  const libDir =
      argv.l ||
      argv.libDir ||
      (config.libDir && fileUtils.lookupConfRequirePath(config.libDir)) ||
      process.env.DEEPSTREAM_LIBRARY_DIRECTORY
  global.deepstreamLibDir = libDir
}
249334
def placeFiles(ftp, path):
    """"""
    for name in os.listdir(path):
        if name != "config.py" and name != "config.pyc" and name != "templates" and name != "content":
            localpath = os.path.join(path, name)
            if os.path.isfile(localpath):
                print("STOR", name, localpath)
                ftp.storbinary('STOR ' + name, open(localpath, 'rb'))
            elif os.path.isdir(localpath):
                print("MKD", name)

                try:
                    ftp.mkd(name)

                # ignore "directory already exists"
                except error_perm as e:
                    if not e.args[0].startswith('550'):
                        raise

                print("CWD", name)
                ftp.cwd(name)
                placeFiles(ftp, localpath)
                print("CWD", "..")
                ftp.cwd("..")
376698
function populateStack(stack, rootPath, files, callback) {
  stack.unshift(...files
    .filter(file => file.stats.isDirectory())
    .map(file => path.join(rootPath, file.path)));
  async.nextTick(callback, null, files);
}
1201274
function init() {
    try {
        keepOrganized().then((AllFiles) => {
            console.log('Marked Reference Links');
            console.log('Created Directory Tree');
            console.log('Setting up watchers...');
            let watcher = new Watcher(AllFiles);
            console.log('Watching for file changes...');
            watcher.on('update', () => {
                console.log('Updating dirTree...')
                keepOrganized().then((AllFiles) => {
                    console.log('Updated dirTree.');
                    watcher.update(AllFiles);
                })
            })
        })
    } catch (err) {
        console.error(err);
    }
}
1349545
public static function setScanDir()
    {
        if (!getenv("BARTLETT_SCAN_DIR")) {
            $home = defined('PHP_WINDOWS_VERSION_BUILD') ? 'USERPROFILE' : 'HOME';
            $dirs = array(
                realpath('.'),
                getenv($home) . DIRECTORY_SEPARATOR . '.config',
                DIRECTORY_SEPARATOR . 'etc',
            );
            putenv("BARTLETT_SCAN_DIR=" . implode(PATH_SEPARATOR, $dirs));
        }
    }
299974
function (parent) {
	var elems = fs.readdirSync( parent ),
		d = {
			files : [],
			folders : []
		};

	// get files and folders paths
	elems.forEach( function (elem) {
		var el = parent + '/' + elem;
		if (!isDir( el )) {
			d.files.push( el );
		} else if (!fs.existsSync( el + '.json')) {
			// add folder only if has no namesake json
			d.folders.push( el );
		}
	});

	return d;
}
590930
def __set_workdir(self):
        """"""
        fname = self.get_current_filename()
        if fname is not None:
            directory = osp.dirname(osp.abspath(fname))
            self.open_dir.emit(directory)
1357369
function setfs( $paths ) {
		if ( ! is_array($paths) )
			$paths = explode( "\n", $paths );

		$paths = array_filter( array_map( 'trim', $paths ) );

		foreach ( $paths as $path ) {
			// Allow for comments
			if ( '#' == $path[0] )
				continue;

			// Directories
			if ( '/' == $path[ strlen($path) -1 ] )
				$this->mkdir( $path );
			else // Files (with dummy content for now)
				$this->put_contents( $path, 'This is a test file' );
		}

	}
1200504
function init( $paths = '', $home_dir = '/' ) {
		$this->fs = new MockFS_Directory_Node( '/' );
		$this->fs_map = array(
			'/' => $this->fs,
		);
		$this->cache = array(); // Used by find_folder() and friends
		$this->cwd = isset( $this->fs_map[ $home_dir ] ) ? $this->fs_map[ $home_dir ] : '/';
		$this->setfs( $paths );
	}
893132
def set_recent_files(self, recent_files):
        """"""
        for recent_file in recent_files[:]:
            if not os.path.isfile(recent_file):
                recent_files.remove(recent_file)
        try:
            self.CONF[WORKSPACE].set('main', 'recent_files',
                                     list(OrderedDict.fromkeys(recent_files)))
        except EnvironmentError:
            pass
765653
function main () {
  var taskList = _(arguments).toArray().flatten(true).value()
  gulp.task('default', taskList)
  return this
}
1319169
function lint(files) {
  return gulp.src(files)
    .pipe($.plumber())
    .pipe($.eslint())
    .pipe($.eslint.format())
    .pipe($.eslint.failOnError())
    .pipe($.jscs())
    .pipe($.jscs.reporter())
    .pipe($.jscs.reporter('fail'))
    .on('error', onError);
}
468946
function lint(applyFixes) {
    logInfo("Lint TypeScript source files");

    const tsDir = path.resolve(TS_TARGETDIR);
    const cwdLength = tsDir.length - TS_TARGETDIR.length;
    const tsSuffix = ".ts";
    const dtsSuffix = ".d.ts";
    const lintConfigFile = path.resolve("./build/tslint.json");
    const lintOptions = {
        formatter: "verbose",
        fix: applyFixes
    };

    lintFolders(tsDir);

    function lintFolders(parent) {
        fse.readdirSync(parent).forEach((file, index) => {
            let curPath = path.join(parent, file);
            if (!fse.lstatSync(curPath).isDirectory()) {
                if ((file.substr(-tsSuffix.length) === tsSuffix) &&
                    !(file.substr(-dtsSuffix.length) === dtsSuffix)) {
                    lintFile(curPath.substr(cwdLength));
                }
            } else {
                lintFolders(curPath);
            }
        });
    }

    function lintFile(file) {
        const contents = fse.readFileSync(file, "utf-8");
        const linter = new tslint.Linter(lintOptions);
        const configuration = tslint.Configuration.findConfiguration(lintConfigFile).results;
        linter.lint(file, contents, configuration);
        const result = linter.getResult();

        // For debugging, use console.log(result);
        result.errorCount > 0 && console.log(result.output);
    }
}
256140
function (snippets, options) {
    if (typeof snippets === 'string') {
      var glob = lazy.glob();
      var files = glob.sync(snippets, options);
      files.forEach(function (fp) {
        var key = fp.split('.').join('\\.');
        this.set(key, {path: fp});
      }.bind(this));
    }
    return this;
  }
645516
def setSr(self, fs):
        """"""
        self.tracePlot.setSr(fs)
        self.stimPlot.setSr(fs)
1332164
def get_home_dir():
    """"""
    _home_dir = os.environ.get('MXNET_HOME', os.path.join('~', '.mxnet'))
    # expand ~ to actual path
    _home_dir = os.path.expanduser(_home_dir)
    return _home_dir