Get a copy of the population state table.
160939
def get_population(self, untracked: bool=False) -> pd.DataFrame:
        """"""
        return self.population.get_population(untracked)
650466
def get(self, table_name):
        """"""
        assert table_name in self.tabs, \
            "Table not avaiable. Avaiable tables: {}".format(
                ", ".join(self.tabs.keys())
            )
        return self.tabs[table_name]
897820
def readPopulations(inputFileName):
    
    populations = {}
    with open(inputFileName, "r") as inputFile:
        for line in inputFile:
            row = line.rstrip("\r\n").split("\t")

            # Getting the informations
            famID = row[0]
            indID = row[1]
            pop = row[2]

            # Check if we already saw this sample
            if (famID, indID) in populations:
                if pop != populations[(famID, indID)]:
                    msg = ("{} {}: sample has multiple population ({} and "
                           "{})".format(famID, indID, pop,
                                        populations[(famID, indID)]))
                    raise ProgramError(msg)

            # Save the population
            populations[(famID, indID)] = pop

    return populations
16708
def _copy(self):
        """"""
        s_copy = self.__class__()
        s_copy._setbytes_unsafe(self._datastore.getbyteslice(0, self._datastore.bytelength),
                                self.len, self._offset)
        return s_copy
1071627
@Override
  public Table getTable(String dbname, String name) throws MetaException, TException, NoSuchObjectException {
    return deepCopy(get_table(dbname, name));
  }
1046389
def data(self, index, role=Qt.DisplayRole):
        """"""
        if not index.isValid() or not 0 <= index.row() < len(self._rows):
            return to_qvariant()
        row = index.row()
        column = index.column()

        name, state = self.row(row)

        if role == Qt.DisplayRole or role == Qt.EditRole:
            if column == 0:
                return to_qvariant(name)
        elif role == Qt.CheckStateRole:
            if column == 0:
                if state:
                    return Qt.Checked
                else:
                    return Qt.Unchecked
            if column == 1:
                return to_qvariant(state)
        return to_qvariant()
223079
def _mapped_populations(mdl1, mdl2):
    
    return_vect = np.zeros(mdl1.n_states_)
    for i in range(mdl1.n_states_):
        try:
            #there has to be a better way to do this
            mdl1_unmapped = mdl1.inverse_transform([i])[0][0]
            mdl2_mapped = mdl2.mapping_[mdl1_unmapped]
            return_vect[i] =  mdl2.populations_[mdl2_mapped]
        except:
            pass
    return return_vect
484305
def table(self):
        """"""
        dimensions = max_dimensions(self.table_data, self.padding_left, self.padding_right)[:3]
        return flatten(self.gen_table(*dimensions))
1209761
def state_nums():
  
  st_nums = {}
  fname = pkg_resources.resource_filename(__name__, 'resources/States.csv')
  with open(fname, 'rU') as csvfile:
    reader = csv.reader(csvfile, delimiter = ',')
    i = 0
    for row in reader:
      st_nums[row[0]] = i
      i = i + 1
  return st_nums
590914
def _get_table(self):
        
        data = get_inner_data(self.report)
        labels = data.keys()
        row = [
            data[key]
            for key in labels
        ]
        return list(labels), [row]
213141
def to_table_data(self):
        

        self._validate_source_data()

        for table_key, json_records in six.iteritems(self._buffer):
            headers = sorted(six.viewkeys(json_records))

            self._loader.inc_table_count()
            self._table_key = table_key

            yield TableData(
                self._make_table_name(),
                headers,
                zip(*[json_records.get(header) for header in headers]),
                dp_extractor=self._loader.dp_extractor,
                type_hints=self._extract_type_hints(headers),
            )
933300
def copy(self):
		'''
			
		'''
		return fsm(
			alphabet = self.alphabet,
			states   = self.states,
			initial  = self.initial,
			finals   = self.finals,
			map      = self.map,
		)
989189
def bqsr_table(data):
    
    in_file = dd.get_align_bam(data)
    out_file = "%s-recal-table.txt" % utils.splitext_plus(in_file)[0]
    if not utils.file_uptodate(out_file, in_file):
        with file_transaction(data, out_file) as tx_out_file:
            assoc_files = dd.get_variation_resources(data)
            known = "-k %s" % (assoc_files.get("dbsnp")) if "dbsnp" in assoc_files else ""
            license = license_export(data)
            cores = dd.get_num_cores(data)
            ref_file = dd.get_ref_file(data)
            cmd = ("{license}sentieon driver -t {cores} -r {ref_file} "
                   "-i {in_file} --algo QualCal {known} {tx_out_file}")
            do.run(cmd.format(**locals()), "Sentieon QualCal generate table")
    return out_file
105582
def _repr_data_resource_(self):
        
        if config.get_option("display.html.table_schema"):
            data = self.head(config.get_option('display.max_rows'))
            payload = json.loads(data.to_json(orient='table'),
                                 object_pairs_hook=collections.OrderedDict)
            return payload
836177
def get_district_estimates_by_state(
        self, api, table, variable, estimate, state
    ):
        
        state = Division.objects.get(level=self.STATE_LEVEL, code=state)
        district_data = api.get(
            ("NAME", estimate),
            {
                "for": "congressional district:*",
                "in": "state:{}".format(state.code),
            },
            year=int(table.year),
        )
        for datum in district_data:
            self.write_district_estimate(table, variable, estimate, datum)
360692
private Table recv_get_table() throws MetaException, NoSuchObjectException, TException {
    ThriftHiveMetastore.get_table_result result = new ThriftHiveMetastore.get_table_result();
    receiveBase(result, "get_table");
    if (result.isSetSuccess()) {
      return result.getSuccess();
    }
    if (result.getO1() != null) {
      throw result.getO1();
    }
    if (result.getO2() != null) {
      throw result.getO2();
    }
    throw new TApplicationException(5, "get_table failed: unknown result");
  }
670140
def to_table_data(self):
        

        self._validate_source_data()

        for table_key, json_records in six.iteritems(self._buffer):
            self._loader.inc_table_count()
            self._table_key = table_key

            yield TableData(
                self._make_table_name(),
                ["key", "value"],
                [record for record in json_records.items()],
                dp_extractor=self._loader.dp_extractor,
                type_hints=self._extract_type_hints(),
            )