function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def add_collaborator_to_license_view( self, repo, collaborator, view, db_privileges=[]): # check that all repo names, usernames, and privileges passed aren't # sql injections self._check_for_injections(repo) self._check_for_injections(collaborator) for privilege in db...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def create_license_view(self, repo_base, repo, table, view_sql, license_id): view_name = table.lower() + "_license_view_"+str(license_id) res = self.create_view(repo, view_name, view_sql) return res
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def get_view_sql(self, repo_base, repo, table, view_params, license_id): # create view based on license license = LicenseManager.find_license_by_id(license_id) pii_def = license.pii_def if license.pii_removed: # remove columns query = ('SELECT column_name FROM i...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def list_tables(self, repo): self._check_for_injections(repo) all_repos = self.list_repos() if repo not in all_repos: raise LookupError('Invalid repository name: %s' % (repo)) query = ('SELECT table_name FROM information_schema.tables ' 'WHERE table_schema...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def list_table_permissions(self, repo, table): query = ("select privilege_type from " "information_schema.role_table_grants where table_schema=%s " "and table_name=%s and grantee=%s") params = (repo, table, self.user) res = self.execute_sql(query, params) ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def list_views(self, repo): self._check_for_injections(repo) all_repos = self.list_repos() if repo not in all_repos: raise LookupError('Invalid repository name: %s' % (repo)) query = ('SELECT table_name FROM information_schema.tables ' 'WHERE table_schema =...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def describe_view(self, repo, view, detail=False): query = ("SELECT %s " "FROM information_schema.columns " "WHERE table_schema = %s and table_name = %s;") params = None if detail: params = (AsIs('*'), repo, view) else: params = ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def clone_table(self, repo, table, new_table): self._validate_table_name(table) self._validate_table_name(new_table) query = 'CREATE TABLE %s.%s AS SELECT * FROM %s.%s' params = (AsIs(repo), AsIs(new_table), AsIs(repo), AsIs(table)) res = self.execute_sql(query, params) ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def explain_query(self, query): """ returns the number of rows, the cost (in time) to execute, and the width (bytes) of rows outputted """ # if it's a select query, return a different set of defaults select_query = bool((query.split()[0]).lower() == 'select') if ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def select_table_query(self, repo_base, repo, table): dh_table_name = '%s.%s.%s' % (repo_base, repo, table) query = 'SELECT * FROM %s;' % (dh_table_name) return query
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def user_exists(self, username): query = "SELECT 1 FROM pg_roles WHERE rolname=%s" params = (username,) result = self.execute_sql(query, params) return (result['row_count'] > 0)
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def create_user(self, username, password, create_db=True): self._check_for_injections(username) query = ('CREATE ROLE %s WITH LOGIN ' 'NOCREATEDB NOCREATEROLE NOCREATEUSER PASSWORD %s') params = (AsIs(username), password) self.execute_sql(query, params) # Don't...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def remove_user(self, username): self._check_for_injections(username) query = 'DROP ROLE %s;' params = (AsIs(username),) return self.execute_sql(query, params)
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def list_all_users(self): query = 'SELECT usename FROM pg_catalog.pg_user WHERE usename != %s' params = (self.user,) res = self.execute_sql(query, params) user_tuples = res['tuples'] all_users_list = [] for user_tuple in user_tuples: all_users_list.append(use...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def remove_database(self, database, revoke_collaborators=True): self._check_for_injections(database) # remove collaborator access to the database if revoke_collaborators: all_users = self.list_all_users() for user in all_users: query = "REVOKE ALL ON DAT...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def list_collaborators(self, repo): query = 'SELECT unnest(nspacl) FROM pg_namespace WHERE nspname=%s;' params = (repo, ) res = self.execute_sql(query, params) # postgres privileges # r -- SELECT ("read") # w -- UPDATE ("write") # a -- INSERT ("append") #...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def has_repo_db_privilege(self, login, repo, privilege): """ returns True or False for whether the use has privileges for the repo (schema) """ query = 'SELECT has_schema_privilege(%s, %s, %s);' params = (login, repo, privilege) res = self.execute_sql(query, param...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def has_column_privilege(self, login, table, column, privilege): query = 'SELECT has_column_privilege(%s, %s, %s, %s);' params = (login, table, column, privilege) res = self.execute_sql(query, params) return res['tuples'][0][0]
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def export_view(self, view_name, file_path, file_format='CSV', delimiter=',', header=True): words = view_name.split('.') for word in words[:-1]: self._check_for_injections(word) self._validate_table_name(words[-1]) self._check_for_injections(file_format) ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def import_file(self, table_name, file_path, file_format='CSV', delimiter=',', header=True, encoding='ISO-8859-1', quote_character='"'): header_option = 'HEADER' if header else '' words = table_name.split('.') for word in words[:-1]: self._ch...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def import_file_w_dbtruck(self, table_name, file_path): # dbtruck is not tested for safety. At all. It's currently disabled # in the project RogerTangos 2015-12-09 from dbtruck.dbtruck import import_datafiles # from dbtruck.util import get_logger from dbtruck.exporters.pg import ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def create_license_schema(self): public_role = settings.PUBLIC_ROLE schema = settings.LICENSE_SCHEMA self._check_for_injections(public_role) self._check_for_injections(schema) query = 'CREATE SCHEMA IF NOT EXISTS %s AUTHORIZATION %s' params = (AsIs(schema), AsIs(public_ro...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def create_license_link_table(self): schema = settings.LICENSE_LINK_SCHEMA table = settings.LICENSE_LINK_TABLE public_role = settings.PUBLIC_ROLE self._check_for_injections(schema) self._validate_table_name(table) self._check_for_injections(public_role) query = ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def create_license_link(self, repo_base, repo, license_id): ''' Creates a new license ''' # check if link already exists query = ('SELECT license_link_id, repo_base, repo, license_id ' 'FROM %s.%s where ' 'repo_base = %s and repo = %s and licens...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def find_license_links_by_repo(self, repo_base, repo): query = ('SELECT license_link_id, repo_base, repo, license_id ' 'FROM %s.%s where repo_base = %s and repo = %s;') params = ( AsIs(settings.LICENSE_SCHEMA), AsIs(settings.LICENSE_LINK_TABLE), ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def find_license_by_id(self, license_id): query = ( 'SELECT license_id, license_name, pii_def, ' 'pii_anonymized, pii_removed ' 'FROM %s.%s where license_id= %s;') params = ( AsIs(settings.LICENSE_SCHEMA), AsIs(settings.LICE...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def create_security_policy_schema(self): public_role = settings.PUBLIC_ROLE schema = settings.POLICY_SCHEMA self._check_for_injections(public_role) self._check_for_injections(schema) query = 'CREATE SCHEMA IF NOT EXISTS %s AUTHORIZATION %s' params = (AsIs(schema), AsIs(p...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def create_security_policy(self, policy, policy_type, grantee, grantor, repo_base, repo, table): ''' Creates a new security policy in the policy table if the policy does not yet exist. ''' # disallow semicolons in policy. This helps prevent the pol...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def find_security_policies(self, repo_base, repo=None, table=None, policy_id=None, policy=None, policy_type=None, grantee=None, grantor=None): ''' Returns a list of all security polices that match the inputs specied by the user. ...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def update_security_policy(self, policy_id, new_policy, new_policy_type, new_grantee): ''' Updates an existing security policy based on the inputs specified by the user. ''' query = ('UPDATE dh_public.policy ' 'SET policy = %s, poli...
datahuborg/datahub
[ 210, 60, 210, 43, 1380229308 ]
def __init__(self, id, type, file_id): if id is None: self.id = DBFileType.id_counter DBFileType.id_counter += 1 else: self.id = id self.type = to_utf8(type) self.file_id = file_id
SoftwareIntrospectionLab/MininGit
[ 15, 17, 15, 14, 1286235438 ]
def __init__(self): self.db = None
SoftwareIntrospectionLab/MininGit
[ 15, 17, 15, 14, 1286235438 ]
def __create_table(self, cnn): cursor = cnn.cursor() if isinstance(self.db, SqliteDatabase): import sqlite3.dbapi2
SoftwareIntrospectionLab/MininGit
[ 15, 17, 15, 14, 1286235438 ]
def __create_indices(self, cnn): cursor = cnn.cursor() if isinstance(self.db, MysqlDatabase): import MySQLdb
SoftwareIntrospectionLab/MininGit
[ 15, 17, 15, 14, 1286235438 ]
def __get_files_for_repository(self, repo_id, cursor): query = "SELECT ft.file_id from file_types ft, files f " + \ "WHERE f.id = ft.file_id and f.repository_id = ?" cursor.execute(statement(query, self.db.place_holder), (repo_id,)) files = [res[0] for res in cursor.fetchall()] ...
SoftwareIntrospectionLab/MininGit
[ 15, 17, 15, 14, 1286235438 ]
def run(self, repo, uri, db): self.db = db path = uri_to_filename(uri) if path is not None: repo_uri = repo.get_uri_for_path(path) else: repo_uri = uri
SoftwareIntrospectionLab/MininGit
[ 15, 17, 15, 14, 1286235438 ]
def backout(self, repo, uri, db): update_statement = """delete from file_types where file_id in (select id from files f where f.repository_id = ?)""" self._do_backout(repo, uri, db, update_statement)
SoftwareIntrospectionLab/MininGit
[ 15, 17, 15, 14, 1286235438 ]
def __init__(self, file): core.AVContainer.__init__(self) self.sequence_header_offset = 0 self.mpeg_version = 2 self.get_time = None self.audio = [] self.video = [] self.start = None self.__seek_size__ = None self.__sample_size__ = None sel...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def framerate_aspect(self, file): """ read framerate and aspect ratio """ file.seek(self.sequence_header_offset + 7, 0) v = struct.unpack('>B', file.read(1))[0] try: fps = FRAME_RATE[v & 0xf] except IndexError: fps = None if v >> 4 ...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def bitrate(self, file): """ read the bitrate (most of the time broken) """ file.seek(self.sequence_header_offset + 8, 0) t, b = struct.unpack('>HB', file.read(3)) vrate = t << 2 | b >> 6 return vrate * 400
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def ReadSCRMpeg2(buffer): """ read SCR (timestamp) for MPEG2 at the buffer beginning (6 Bytes) """ if len(buffer) < 6: return None highbit = (byte2int(buffer) & 0x20) >> 5 low4Bytes = ((int(byte2int(buffer)) & 0x18) >> 3) << 30 low4Bytes |= (byte2int...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def ReadSCRMpeg1(buffer): """ read SCR (timestamp) for MPEG1 at the buffer beginning (5 Bytes) """ if len(buffer) < 5: return None highbit = (byte2int(buffer) >> 3) & 0x01 low4Bytes = ((int(byte2int(buffer)) >> 1) & 0x03) << 30 low4Bytes |= indexbyte...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def ReadPTS(buffer): """ read PTS (PES timestamp) at the buffer beginning (5 Bytes) """ high = ((byte2int(buffer) & 0xF) >> 1) med = (indexbytes(buffer, 1) << 7) + (indexbytes(buffer, 2) >> 1) low = (indexbytes(buffer, 3) << 7) + (indexbytes(buffer, 4) >> 1) retur...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def isMPEG(self, file, force=False): """ This MPEG starts with a sequence of 0x00 followed by a PACK Header http://dvd.sourceforge.net/dvdinfo/packhdr.html """ file.seek(0, 0) buffer = file.read(10000) offset = 0 # seek until the 0 byte stop while...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def _find_timer_(buffer): """ Return position of timer in buffer or None if not found. This function is valid for 'normal' mpeg files """ pos = buffer.find('\x00\x00\x01%s' % chr(PACK_PKT)) if pos == -1: return None return pos + 4
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def ReadPESHeader(self, offset, buffer, id=0): """ Parse a PES header. Since it starts with 0x00 0x00 0x01 like 'normal' mpegs, this function will return (0, None) when it is no PES header or (packet length, timestamp position (maybe None)) http://dvd.sourceforge.net/dvd...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def _find_timer_PES_(self, buffer): """ Return position of timer in buffer or -1 if not found. This function is valid for PES files """ pos = buffer.find('\x00\x00\x01') offset = 0 if pos == -1 or offset + 1000 >= len(buffer): return None retp...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def isES(self, file): file.seek(0, 0) try: header = struct.unpack('>LL', file.read(8)) except (struct.error, IOError): return False if header[0] != 0x1B3: return False # Is an mpeg video elementary stream self.mime = 'video/mpeg' ...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def isTS(self, file): file.seek(0, 0) buffer = file.read(TS_PACKET_LENGTH * 2) c = 0 while c + TS_PACKET_LENGTH < len(buffer): if indexbytes(buffer, c) == indexbytes(buffer, c + TS_PACKET_LENGTH) == TS_SYNC: break c += 1 else: ...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def get_endpos(self): """ get the last timestamp of the mpeg, return -1 if this is not possible """ if not hasattr(self, 'filename') or not hasattr(self, 'start'): return None length = os.stat(self.filename)[stat.ST_SIZE] if length < self.__sample_size__: ...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def seek(self, end_time): """ Return the byte position in the file where the time position is 'pos' seconds. Return 0 if this is not possible """ if not hasattr(self, 'filename') or not hasattr(self, 'start'): return 0 file = open(self.filename) seek_...
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def detect_version(): """Emit GIPS' software version. May be overridden for testing purposes. To override version.py, put a desired version string in the environment variable GIPS_OVERRIDE_VERSION.""" return os.environ.get('GIPS_OVERRIDE_VERSION', version.__version__)
Applied-GeoSolutions/gips
[ 17, 5, 17, 97, 1441029399 ]
def main(): G = nx.DiGraph() # G eh um grafo direcionado # gera o grafo apartir de suas arestas G.add_weighted_edges_from([(1,2,2.0),(1,3,1.0),(2,3,3.0),(2,4,3.0),(3,5,1.0),(4,6,2.0),(5,4,2.0),(5,6,5.0)]) for i in G.edges(): # print i[0], i[1] G[i[0]][i[1]]["color"] = "black" # G[1]...
caioau/caioau-personal
[ 9, 1, 9, 5, 1460423339 ]
def __init__(self, rpc_error): super(JSONRPCException, self).__init__('msg: %r code: %r' % (rpc_error['message'], rpc_error['code'])) self.error = rpc_error
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def __init__(self, service_url=None, service_port=None, btc_conf_file=None, timeout=HTTP_TIMEOUT, _connection=None): """Low-level JSON-RPC proxy Unlike Proxy no conversion is done from the raw JSON objects. ...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def __getattr__(self, name): if name.startswith('__') and name.endswith('__'): # Python internal stuff raise AttributeError # Create a callable to do the actual call f = lambda *args: self._call(name, *args) # Make debuggers show <function bitcoin.rpc.name> rath...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def _get_response(self): http_response = self.__conn.getresponse() if http_response is None: raise JSONRPCException({ 'code': -342, 'message': 'missing HTTP response from server'}) return json.loads(http_response.read().decode('utf8'), parse...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def __init__(self, service_url=None, service_port=None, btc_conf_file=None, timeout=HTTP_TIMEOUT, **kwargs): """Create a proxy to a bitcoin RPC service Unlike RawProxy data is passed as objects, rather than JSON...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def getbalance(self, account='*', minconf=1): """Get the balance account - The selected account. Defaults to "*" for entire wallet. It may be the default account using "". minconf - Only include transactions confirmed at least this many times. (default=1) """ r = self._call('get...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def getblockhash(self, height): """Return hash of block in best-block-chain at height. Raises IndexError if height is not valid. """ try: return lx(self._call('getblockhash', height)) except JSONRPCException as ex: raise IndexError('%s.getblockhash(): %s ...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def getnewaddress(self, account=None): """Return a new Bitcoin address for receiving payments. If account is not None, it is added to the address book so payments received with the address will be credited to account. """ r = None if account is not None: r = ...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def getrawmempool(self, verbose=False): """Return the mempool""" if verbose: return self._call('getrawmempool', verbose) else: r = self._call('getrawmempool') r = [lx(txid) for txid in r] return r
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def gettransaction(self, txid): """Get detailed information about in-wallet transaction txid Raises IndexError if transaction not found in the wallet. FIXME: Returned data types are not yet converted. """ try: r = self._call('gettransaction', b2lx(txid)) exc...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def listunspent(self, minconf=0, maxconf=9999999, addrs=None): """Return unspent transaction outputs in wallet Outputs will have between minconf and maxconf (inclusive) confirmations, optionally filtered to only include txouts paid to addresses in addrs. """ r = None ...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def sendrawtransaction(self, tx): """Submit transaction to local node and network.""" hextx = hexlify(tx.serialize()) r = self._call('sendrawtransaction', hextx) return lx(r)
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def signrawtransaction(self, tx, *args): """Sign inputs for transaction FIXME: implement options """ hextx = hexlify(tx.serialize()) r = self._call('signrawtransaction', hextx, *args) r['tx'] = CTransaction.deserialize(unhexlify(r['hex'])) del r['hex'] re...
petertodd/timelock
[ 115, 22, 115, 1, 1401794890 ]
def test_bigrams_should_return_correct_score(self): # We need this list comprehension because we need to save the word list # in mongo (thus, it needs to be json serializable). Also, a list is # what will be available to the worker in real situations. tokens = [w for w in ...
NAMD/pypln.backend
[ 63, 17, 63, 7, 1334771826 ]
def bits_set(x): bits = 0 for i in range(0,8): if (x & (1<<i))>0: bits += 1 return bits
kit-cel/gr-dab
[ 36, 12, 36, 18, 1494320572 ]
def __init__(self, request, paths, session, target, overwrite, **kwargs): super(CopyFiles, self).__init__(request=request, **kwargs) self.paths = paths self.session = session self.target = target self.overwrite = overwrite
LTD-Beget/sprutio
[ 463, 85, 463, 54, 1450265808 ]
def __init__(self, **kwargs): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __base__(cls): """Get base class."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __eq__(self, other): """Equal."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __ne__(self, other): """Equal."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __hash__(self): """Hash."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __setattr__(self, name, value): """Prevent mutability."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __repr__(self): # pragma: no cover """Representation."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, *args, **kwargs): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __iter__(self): """Iterator."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __len__(self): """Length."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __getitem__(self, key): """Get item: `namespace['key']`.""" return self._d[key]
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __hash__(self): """Hash."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __repr__(self): # pragma: no cover """Representation."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, *args, **kwargs): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, *args, **kwargs): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__( self, tag, ids, classes, attributes, nth, selectors, relation, rel_type, contains, lang, flags
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, name, prefix): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, attribute, prefix, pattern, xml_type_pattern): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, text): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, a, n, b, of_type, last, selectors): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, languages): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __iter__(self): """Iterator."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __len__(self): # pragma: no cover """Length."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __getitem__(self, index): # pragma: no cover """Get item."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __init__(self, selectors=tuple(), is_not=False, is_html=False): """Initialize."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __iter__(self): """Iterator."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __len__(self): """Length."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def __getitem__(self, index): """Get item."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def _pickle(p): return p.__base__(), tuple([getattr(p, s) for s in p.__slots__[:-1]])
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]
def pickle_register(obj): """Allow object to be pickled."""
SickGear/SickGear
[ 574, 83, 574, 2, 1415773777 ]