return all distinct subdivisions of the data
327539
function findSubdivisions( filename ){

  // load configuration variables
  const config = require('pelias-config').generate(require('../schema')).imports.whosonfirst;
  const sqliteDir = path.join(config.datapath, 'sqlite');
  let targetWofIds = Array.isArray(config.importPlace) ? config.importPlace: [config.importPlace];

  // connect to sql db
  let db = new Sqlite3( path.join( sqliteDir, filename ), { readonly: true } );

  // convert ids to integers and remove any which fail to convert
  let cleanIds = targetWofIds.map(id => parseInt(id, 10)).filter(id => !isNaN(id));

  // placefilter is used to select only records targeted by the 'importPlace' config option
  // note: if no 'importPlace' ids are provided then we process all ids which aren't 0
  let placefilter = (cleanIds.length > 0) ? sql.placefilter : '!= 0';

  // query db
  // note: we need to use replace instead of using bound params in order to
  // be able to query an array of values using IN.
  let query = sql.subdiv.replace(/@placefilter/g, placefilter).replace(/@wofids/g, cleanIds.join(','));
  return db.prepare(query).all().map( row => row.subdivision.toLowerCase());
}
557372
def all(cls, otp=False, ccid=False, u2f=False):
        """"""
        modes = set([
            cls.OTP,
            cls.CCID,
            cls.OTP_CCID,
            cls.U2F,
            cls.OTP_U2F,
            cls.U2F_CCID,
            cls.OTP_U2F_CCID
        ])

        if otp:
            modes.difference_update(set([
                cls.CCID,
                cls.U2F,
                cls.U2F_CCID
            ]))

        if ccid:
            modes.difference_update(set([
                cls.OTP,
                cls.U2F,
                cls.OTP_U2F
            ]))

        if u2f:
            modes.difference_update(set([
                cls.OTP,
                cls.CCID,
                cls.OTP_CCID
            ]))

        return modes
1242237
def groupcountdistinctvalues(table, key, value):
    """"""
    
    s1 = cut(table, key, value)
    s2 = distinct(s1)
    s3 = aggregate(s2, key, len)
    return s3
456371
def getClassDirectSubs(self, aURI):
        
        aURI = aURI
        qres = self.rdflib_graph.query("""SELECT DISTINCT ?x
                 WHERE {
                     { ?x rdfs:subClassOf <%s> }
                     FILTER (!isBlank(?x))
                 }
                 """ % (aURI))
        return list(qres)
764882
def getAllNodeUids(self):
        '''
            
        '''
        ret = set()

        for child in self:
            ret.update(child.getAllNodeUids())

        return ret
867956
def get_sub_array_ids(self):
        """"""

        # Initialise empty list
        _scheduling_block_ids = []
        _sub_array_ids = []

        for blocks_id in self.get_sched_block_instance_ids():
            _scheduling_block_ids.append(blocks_id)
        block_details = self.get_block_details(_scheduling_block_ids)
        for details in block_details:
            _sub_array_ids.append(details['sub_array_id'])
        _sub_array_ids = sorted(list(set(_sub_array_ids)))
        return _sub_array_ids
415279
def featuretypes(self):
        
        c = self.conn.cursor()
        c.execute(
            '''
            SELECT DISTINCT featuretype from features
            ''')
        for i, in c:
            yield i
704186
function getAll()
    {
        foreach ($this->__columns as $k=>$v) {
            $a[$k] = $v;
        }
        return $a;
    }
591120
@Override
    public ListT<W,T> distinct() {

        return (ListT<W,T>) FoldableTransformerSeq.super.distinct();
    }
530839
def get_all_outgoings(chebi_ids):
    ''''''
    all_outgoings = [get_outgoings(chebi_id) for chebi_id in chebi_ids]
    return [x for sublist in all_outgoings for x in sublist]
1257421
public List<DataSlice> getPersistentData() {
    List<DataSlice> slices = new ArrayList<DataSlice>(1);
    slices.add(new DataSlice(schema.toByteArray()));
    return slices;
  }
66672
def _partition_all_internal(s, sep):
    
    parts = list(s.partition(sep))

    # if sep found
    if parts[1] == sep:
        new_parts = partition_all(parts[2], sep)
        parts.pop()
        parts.extend(new_parts)
        return [p for p in parts if p]
    else:
        if parts[0]:
            return [parts[0]]
        else:
            return []
325986
def get_all_parent_edges(self):
        """"""
        all_parent_edges = set()
        for parent in self.parents:
            all_parent_edges.add((self.item_id, parent.item_id))
            all_parent_edges |= parent.get_all_parent_edges()
        return all_parent_edges
559650
private List<Location> getAllSubLocations(Location location) {
		List<Location> flatSubLocations = new ArrayList<Location>();
		for (Location l : location.getSubLocations()) {
			if (l.isComplex()) {
				flatSubLocations.addAll(getAllSubLocations(l));
			}
			else {
				flatSubLocations.add(l);
			}
		}
		return flatSubLocations;
	}
1360015
def distinct_value_fractions(self):
        
        return pd.DataFrame([c.dcount() / float(self.size()) for c in self.columns()],
                            index=[c.name() for c in self.columns()], columns=["fraction"])
432830
def rows(self):
        """"""
        for t in self.terms:

            for row in t.rows:
                term, value = row  # Value can either be a string, or a dict

                if isinstance(value, dict):  # Dict is for properties, which might be arg-children
                    term, args, remain = self._args(term, value)
                    yield term, args

                    # 'remain' is all of the children that didn't have an arg-child column -- the
                    # section didn't have a column heder for that ther.
                    for k, v in remain.items():
                        yield term.split('.')[-1] + '.' + k, v
                else:
                    yield row
153338
def get_all_child_edges(self):
        """"""
        all_child_edges = set()
        for parent in self.children:
            all_child_edges.add((parent.item_id, self.item_id))
            all_child_edges |= parent.get_all_child_edges()
        return all_child_edges