:param file_path: 
        :param column_index: 
        :param parent_table:
        :param column_in_one2many_table:
433220
def import_one_to_many(self, file_path, column_index, parent_table, column_in_one2many_table):
        
        chunks = pd.read_table(
            file_path,
            usecols=[column_index],
            header=None,
            comment='#',
            index_col=False,
            chunksize=1000000,
            dtype=self.get_dtypes(parent_table.model)
        )

        for chunk in chunks:
            child_values = []
            parent_id_values = []

            chunk.dropna(inplace=True)
            chunk.index += 1

            for parent_id, values in chunk.iterrows():
                entry = values[column_index]
                if not isinstance(entry, str):
                    entry = str(entry)
                for value in entry.split("|"):
                    parent_id_values.append(parent_id)
                    child_values.append(value.strip())

            parent_id_column_name = parent_table.name + '__id'
            o2m_table_name = defaults.TABLE_PREFIX + parent_table.name + '__' + column_in_one2many_table

            pd.DataFrame({
                parent_id_column_name: parent_id_values,
                column_in_one2many_table: child_values
            }).to_sql(name=o2m_table_name, if_exists='append', con=self.engine, index=False)
507559
private void indexDirectory(String path) throws Exception {
        fr.pilato.elasticsearch.crawler.fs.beans.Path pathObject = new fr.pilato.elasticsearch.crawler.fs.beans.Path();
        // The real and complete path
        pathObject.setReal(path);
        String rootdir = path.substring(0, path.lastIndexOf(File.separator));
        // Encoded version of the parent dir
        pathObject.setRoot(SignTool.sign(rootdir));
        // The virtual URL (not including the initial root dir)
        pathObject.setVirtual(computeVirtualPathName(stats.getRootPath(), path));

        indexDirectory(SignTool.sign(path), pathObject);
    }
1298925
def image_path_from_index(self, index):
        
        assert self.image_set_index is not None, "Dataset not initialized"
        name = self.image_set_index[index]
        image_file = os.path.join(self.image_dir, 'images', name)
        assert os.path.isfile(image_file), 'Path does not exist: {}'.format(image_file)
        return image_file
107620
def index(**params)
      params.stringify_keys!
      path = nest_path_within_parent(plural_resource_path, params)
      api_request(:get, path, params: params)
    end
1191623
def column_spec_path(cls, project, location, dataset, table_spec, column_spec):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}",
            project=project,
            location=location,
            dataset=dataset,
            table_spec=table_spec,
            column_spec=column_spec,
        )
41072
private void initFileDirTables(Path path) throws IOException {
    FileStatus[] stats = fs.listStatus(path);
    if (stats != null) {
      for (FileStatus stat : stats) {
        if (stat.isDir()) {
          dirs.add(stat.getPath().toString());
          initFileDirTables(stat.getPath());
        } else {
          Path filePath = stat.getPath();
          if (filePath.getName().startsWith(StructureGenerator.FILE_NAME_PREFIX)) {
            files.add(filePath.toString());
          }
        }
      }
    }
  }
1032513
def load_parameter_file(file_path, name = ''):
    
    if not os.path.exists(file_path):
        raise ValueError("{} doest not exist".format(file_path))
    if os.path.isdir(file_path):
        return ParameterNode(name, directory_path = file_path)
    data = _load_yaml_file(file_path)
    return _parse_child(name, data, file_path)
84662
def get_parent_path(index=2):  # type: (int) -> str
    
    try:
        path = _caller_path(index)
    except RuntimeError:
        path = os.getcwd()
    path = os.path.abspath(os.path.join(path, os.pardir))
    return path
221502
def file_field_sub(col_name, file_info, options)
      fields_for("file_info[#{col_name}]", file_info) do |f|
        f.file_field(:uploaded_data, {:size=>20}.merge(options))
      end
    end
574795
def path_upper(
        cls, object_id, limit_depth=1000000, db_session=None, *args, **kwargs
    ):
        
        tablename = cls.model.__table__.name
        raw_q = """
            WITH RECURSIVE subtree AS (
                    SELECT res.*, 1 as depth FROM {tablename} res
                    WHERE res.resource_id = :resource_id
                  UNION ALL
                    SELECT res_u.*, depth+1 as depth
                    FROM {tablename} res_u, subtree st
                    WHERE res_u.resource_id = st.parent_id
            )
            SELECT * FROM subtree WHERE depth<=:depth;
        """.format(
            tablename=tablename
        )
        db_session = get_db_session(db_session)
        q = (
            db_session.query(cls.model)
            .from_statement(sa.text(raw_q))
            .params(resource_id=object_id, depth=limit_depth)
        )
        return q
813789
def visit_file(self, item, parent):
        
        if item.sent_to_remote:
            self._add_report_item(item.path, item.remote_id, item.size, item.get_hash_value())
1045690
private void setFkWhere(Where<MetadataReference, Void> where, long fileId,
			Long parentId) throws SQLException {

		where.eq(MetadataReference.COLUMN_FILE_ID, fileId);
		if (parentId == null) {
			where.and().isNull(MetadataReference.COLUMN_PARENT_ID);
		} else {
			where.and().eq(MetadataReference.COLUMN_PARENT_ID, parentId);
		}

	}
526340
def _load_significant_pathways_file(path_to_file):
    
    feature_pathway_df = pd.read_table(
        path_to_file, header=0,
        usecols=["feature", "side", "pathway"])
    feature_pathway_df = feature_pathway_df.sort_values(
        by=["feature", "side"])
    return feature_pathway_df
123323
def _set_join(self, query=None):
        
        if not query:
            query = self._query

        foreign_key = '%s.%s' % (self._related.get_table(), self._second_key)

        query.join(self._parent.get_table(), self.get_qualified_parent_key_name(), '=', foreign_key)
690190
def add_index(self, mode, blob_id, path):
        
        self.command_exec(['update-index', '--add', '--cacheinfo', mode, blob_id, path])
986958
def index(self, row, column, parent):
        

        if not self.hasIndex(row, column, parent):
            return QtCore.QModelIndex()

        if not parent.isValid():
            parentItem = self.root
        else:
            # So, here we go from QModelIndex to the actual object .. ?
            parentItem = parent.internalPointer()

        # the only place where a child item is queried
        childItem = parentItem.getChild(row)
        if childItem:
            # return self.createIndex(row, column)
            return self.createIndex(row, column, childItem)
            """
            # .. that one does not work for PySide 5.12+
            TypeError: 'PySide2.QtCore.QAbstractItemModel.createIndex' called with wrong argument types:
            PySide2.QtCore.QAbstractItemModel.createIndex(int, int, ServerListItem)
            Supported signatures:
            PySide2.QtCore.QAbstractItemModel.createIndex(int, int, quintptr = 0)
            PySide2.QtCore.QAbstractItemModel.createIndex(int, int, void = nullptr)
            """
        else:
            return QtCore.QModelIndex()
527762
def setFilepaths(self, filepaths):
        
        self.setFilepath(os.path.pathsep.join(filepaths))