i
int64
0
599
src_path
stringlengths
12
12
pyc_path
stringlengths
13
13
input
stringlengths
363
29.3k
expected
stringlengths
82
9.32k
provenance
dict
license
dict
csn_repo
stringclasses
117 values
csn_func
stringlengths
2
53
n_instr
int64
19
1.62k
has_annotation
bool
2 classes
100
src/00100.py
pyc/00100.pyc
CODE <module>() RESUME 0 LOAD_CONST (None,) LOAD_CONST <code run> MAKE_FUNCTION defaults STORE_NAME run RETURN_CONST None END CODE run(entry_point, drivers, loop) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + setup LOAD_FAST entry_point LOAD_FAST drivers CALL 2 STORE_FAST program LOAD_FAST program ...
def run(entry_point, drivers, loop=None): """pass""" program = setup(entry_point, drivers) dispose = program.run() if loop == None: loop = asyncio.get_event_loop() loop.run_forever() dispose()
{ "repo": "MainRo/cyclotron-aio", "repo_url": "https://github.com/MainRo/cyclotron-aio", "file_path": "cyclotron_aio/runner.py", "commit_sha": "4401076aafe4a72de1d3c4ad6bb7ffa648506f7e", "func_name": "run", "line_start": 4, "line_end": 14, "permalink": "https://github.com/MainRo/cyclotron-aio/blob/44010...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.txt", "blob_sha": "de282d266f4bc12cd4812434bbf2c5d7286a6790", "resolved_at_commit": "4401076aafe4a72de1d3c4ad6bb7ffa648506f7e", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
MainRo/cyclotron-aio
run
38
false
101
src/00101.py
pyc/00101.pyc
CODE <module>() RESUME 0 LOAD_CONST <code compare_schemas> MAKE_FUNCTION 0 STORE_NAME compare_schemas RETURN_CONST None END CODE compare_schemas(one, two) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + _normalize_string_type LOAD_FAST one CALL 1 STORE_FAST one LOAD_GLOBAL NULL + _normalize_string_type ...
def compare_schemas(one, two): """pass""" one = _normalize_string_type(one) two = _normalize_string_type(two) _assert_same_types(one, two) if isinstance(one, list): return _compare_lists(one, two) elif isinstance(one, dict): return _compare_dicts(one, two) elif isinstance(one...
{ "repo": "beregond/jsonmodels", "repo_url": "https://github.com/beregond/jsonmodels", "file_path": "jsonmodels/utilities.py", "commit_sha": "97a1a6b90a49490fc5a6078f49027055d2e13541", "func_name": "compare_schemas", "line_start": 60, "line_end": 90, "permalink": "https://github.com/beregond/jsonmodels/...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "d44fbca8c86abd5c24be086cce252bcd7ffceea9", "resolved_at_commit": "97a1a6b90a49490fc5a6078f49027055d2e13541", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
beregond/jsonmodels
compare_schemas
73
false
102
src/00102.py
pyc/00102.pyc
CODE <module>() RESUME 0 LOAD_CONST <code is_ecma_regex> MAKE_FUNCTION 0 STORE_NAME is_ecma_regex RETURN_CONST None END CODE is_ecma_regex(regex) DOC 'pass' RESUME 0 LOAD_FAST regex LOAD_ATTR NULL|self + split LOAD_CONST '/' CALL 1 STORE_FAST parts LOAD_GLOBAL NULL + len LOAD_FAST parts CA...
def is_ecma_regex(regex): """pass""" parts = regex.split('/') if len(parts) == 1: return False if len(parts) < 3: raise ValueError("Given regex isn't ECMA regex nor Python regex.") parts.pop() parts.append('') raw_regex = '/'.join(parts) if raw_regex.startswith('/') and r...
{ "repo": "beregond/jsonmodels", "repo_url": "https://github.com/beregond/jsonmodels", "file_path": "jsonmodels/utilities.py", "commit_sha": "97a1a6b90a49490fc5a6078f49027055d2e13541", "func_name": "is_ecma_regex", "line_start": 93, "line_end": 112, "permalink": "https://github.com/beregond/jsonmodels/b...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "d44fbca8c86abd5c24be086cce252bcd7ffceea9", "resolved_at_commit": "97a1a6b90a49490fc5a6078f49027055d2e13541", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
beregond/jsonmodels
is_ecma_regex
61
false
103
src/00103.py
pyc/00103.pyc
CODE <module>() RESUME 0 LOAD_CONST <code convert_ecma_regex_to_python> MAKE_FUNCTION 0 STORE_NAME convert_ecma_regex_to_python RETURN_CONST None END CODE convert_ecma_regex_to_python(value) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + is_ecma_regex LOAD_FAST value CALL 1 POP_JUMP_IF_TRUE L1 LOAD_GLOB...
def convert_ecma_regex_to_python(value): """pass""" if not is_ecma_regex(value): return PythonRegex(value, []) parts = value.split('/') flags = parts.pop() try: result_flags = [ECMA_TO_PYTHON_FLAGS[f] for f in flags] except KeyError: raise ValueError('Wrong flags "{}".'.f...
{ "repo": "beregond/jsonmodels", "repo_url": "https://github.com/beregond/jsonmodels", "file_path": "jsonmodels/utilities.py", "commit_sha": "97a1a6b90a49490fc5a6078f49027055d2e13541", "func_name": "convert_ecma_regex_to_python", "line_start": 115, "line_end": 136, "permalink": "https://github.com/bereg...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "d44fbca8c86abd5c24be086cce252bcd7ffceea9", "resolved_at_commit": "97a1a6b90a49490fc5a6078f49027055d2e13541", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
beregond/jsonmodels
convert_ecma_regex_to_python
93
false
104
src/00104.py
pyc/00104.pyc
CODE <module>() RESUME 0 BUILD_LIST 0 BUILD_TUPLE 1 LOAD_CONST <code convert_python_regex_to_ecma> MAKE_FUNCTION defaults STORE_NAME convert_python_regex_to_ecma RETURN_CONST None END CODE convert_python_regex_to_ecma(value, flags) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + is_ecma_regex LOAD_FAST val...
def convert_python_regex_to_ecma(value, flags=[]): """pass""" if is_ecma_regex(value): return value result_flags = [PYTHON_TO_ECMA_FLAGS[f] for f in flags] result_flags = ''.join(result_flags) return '/{value}/{flags}'.format(value=value, flags=result_flags)
{ "repo": "beregond/jsonmodels", "repo_url": "https://github.com/beregond/jsonmodels", "file_path": "jsonmodels/utilities.py", "commit_sha": "97a1a6b90a49490fc5a6078f49027055d2e13541", "func_name": "convert_python_regex_to_ecma", "line_start": 139, "line_end": 156, "permalink": "https://github.com/bereg...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "d44fbca8c86abd5c24be086cce252bcd7ffceea9", "resolved_at_commit": "97a1a6b90a49490fc5a6078f49027055d2e13541", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
beregond/jsonmodels
convert_python_regex_to_ecma
58
false
105
src/00105.py
pyc/00105.pyc
CODE <module>() RESUME 0 LOAD_CONST <code populate> MAKE_FUNCTION 0 STORE_NAME populate RETURN_CONST None END CODE populate(self, **values) DOC 'pass' RESUME 0 LOAD_FAST values LOAD_ATTR NULL|self + copy CALL 0 STORE_FAST values LOAD_GLOBAL NULL + list LOAD_FAST self LOAD_ATTR NULL|self + it...
def populate(self, **values): """pass""" values = values.copy() fields = list(self.iterate_with_name()) for _, structure_name, field in fields: if structure_name in values: field.__set__(self, values.pop(structure_name)) for name, _, field in fields: if name in values: ...
{ "repo": "beregond/jsonmodels", "repo_url": "https://github.com/beregond/jsonmodels", "file_path": "jsonmodels/models.py", "commit_sha": "97a1a6b90a49490fc5a6078f49027055d2e13541", "func_name": "Base.populate", "line_start": 36, "line_end": 45, "permalink": "https://github.com/beregond/jsonmodels/blob/...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "d44fbca8c86abd5c24be086cce252bcd7ffceea9", "resolved_at_commit": "97a1a6b90a49490fc5a6078f49027055d2e13541", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
beregond/jsonmodels
Base.populate
73
false
106
src/00106.py
pyc/00106.pyc
CODE <module>() RESUME 0 LOAD_CONST <code get_field> MAKE_FUNCTION 0 STORE_NAME get_field RETURN_CONST None END CODE get_field(self, field_name) DOC 'pass' RESUME 0 LOAD_FAST self GET_ITER L1: FOR_ITER L3 UNPACK_SEQUENCE 2 STORE_FAST attr_name STORE_FAST field LOAD_FAST field_name LOAD_FAS...
def get_field(self, field_name): """pass""" for attr_name, field in self: if field_name == attr_name: return field raise errors.FieldNotFound('Field not found', field_name)
{ "repo": "beregond/jsonmodels", "repo_url": "https://github.com/beregond/jsonmodels", "file_path": "jsonmodels/models.py", "commit_sha": "97a1a6b90a49490fc5a6078f49027055d2e13541", "func_name": "Base.get_field", "line_start": 47, "line_end": 53, "permalink": "https://github.com/beregond/jsonmodels/blob...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "d44fbca8c86abd5c24be086cce252bcd7ffceea9", "resolved_at_commit": "97a1a6b90a49490fc5a6078f49027055d2e13541", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
beregond/jsonmodels
Base.get_field
35
false
107
src/00107.py
pyc/00107.pyc
CODE <module>() RESUME 0 LOAD_CONST (False,) LOAD_CONST <code write> MAKE_FUNCTION defaults STORE_NAME write RETURN_CONST None END CODE write(self, rows, keyed) DOC 'pass' RETURN_GENERATOR POP_TOP L1: RESUME 0 LOAD_FAST rows GET_ITER L2: FOR_ITER L13 STORE_FAST row LOAD_FAST row STORE_FA...
def write(self, rows, keyed=False): """pass""" for row in rows: keyed_row = row if not keyed: keyed_row = dict(zip(self.__schema.field_names, row)) keyed_row = self.__convert_row(keyed_row) if self.__check_existing(keyed_row): for wr in self.__insert(): ...
{ "repo": "frictionlessdata/tableschema-sql-py", "repo_url": "https://github.com/frictionlessdata/tableschema-sql-py", "file_path": "tableschema_sql/writer.py", "commit_sha": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "func_name": "Writer.write", "line_start": 32, "line_end": 52, "permalink": "https://...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "64bf820e0e354b97c4f1ae56cb8ddfe00755c702", "resolved_at_commit": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
frictionlessdata/tableschema-sql-py
Writer.write
134
false
108
src/00108.py
pyc/00108.pyc
CODE <module>() RESUME 0 LOAD_CONST <code __prepare_bloom> MAKE_FUNCTION 0 STORE_NAME __prepare_bloom RETURN_CONST None END CODE __prepare_bloom(self) DOC 'pass' RESUME 0 LOAD_GLOBAL pybloom_live LOAD_ATTR NULL|self + ScalableBloomFilter CALL 0 LOAD_FAST self STORE_ATTR __bloom LOAD_FAST self ...
def __prepare_bloom(self): """pass""" self.__bloom = pybloom_live.ScalableBloomFilter() columns = [getattr(self.__table.c, key) for key in self.__update_keys] keys = select(columns).execution_options(stream_results=True).execute() for key in keys: self.__bloom.add(tuple(key))
{ "repo": "frictionlessdata/tableschema-sql-py", "repo_url": "https://github.com/frictionlessdata/tableschema-sql-py", "file_path": "tableschema_sql/writer.py", "commit_sha": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "func_name": "Writer.__prepare_bloom", "line_start": 56, "line_end": 63, "permalink":...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "64bf820e0e354b97c4f1ae56cb8ddfe00755c702", "resolved_at_commit": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
frictionlessdata/tableschema-sql-py
Writer.__prepare_bloom
73
false
109
src/00109.py
pyc/00109.pyc
CODE <module>() RESUME 0 LOAD_CONST <code __insert> MAKE_FUNCTION 0 STORE_NAME __insert RETURN_CONST None END CODE __insert(self) DOC 'pass' RETURN_GENERATOR POP_TOP L1: RESUME 0 LOAD_GLOBAL NULL + len LOAD_FAST self LOAD_ATTR __buffer CALL 1 LOAD_CONST 0 COMPARE_OP > EXTENDED_ARG 1 PO...
def __insert(self): """pass""" if len(self.__buffer) > 0: statement = self.__table.insert() if self.__autoincrement: statement = statement.returning(getattr(self.__table.c, self.__autoincrement)) statement = statement.values(self.__buffer) res = statement.exec...
{ "repo": "frictionlessdata/tableschema-sql-py", "repo_url": "https://github.com/frictionlessdata/tableschema-sql-py", "file_path": "tableschema_sql/writer.py", "commit_sha": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "func_name": "Writer.__insert", "line_start": 65, "line_end": 84, "permalink": "https...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "64bf820e0e354b97c4f1ae56cb8ddfe00755c702", "resolved_at_commit": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
frictionlessdata/tableschema-sql-py
Writer.__insert
109
false
110
src/00110.py
pyc/00110.pyc
CODE <module>() RESUME 0 LOAD_CONST <code __update> MAKE_FUNCTION 0 STORE_NAME __update RETURN_CONST None END CODE __update(self, row) DOC 'pass' RESUME 0 LOAD_FAST self LOAD_ATTR __table LOAD_ATTR NULL|self + update CALL 0 LOAD_ATTR NULL|self + values LOAD_FAST row CALL 1 STORE_FAST expr ...
def __update(self, row): """pass""" expr = self.__table.update().values(row) for key in self.__update_keys: expr = expr.where(getattr(self.__table.c, key) == row[key]) if self.__autoincrement: expr = expr.returning(getattr(self.__table.c, self.__autoincrement)) res = expr.execute() ...
{ "repo": "frictionlessdata/tableschema-sql-py", "repo_url": "https://github.com/frictionlessdata/tableschema-sql-py", "file_path": "tableschema_sql/writer.py", "commit_sha": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "func_name": "Writer.__update", "line_start": 86, "line_end": 101, "permalink": "http...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "64bf820e0e354b97c4f1ae56cb8ddfe00755c702", "resolved_at_commit": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
frictionlessdata/tableschema-sql-py
Writer.__update
84
false
111
src/00111.py
pyc/00111.pyc
CODE <module>() RESUME 0 LOAD_CONST <code __check_existing> MAKE_FUNCTION 0 STORE_NAME __check_existing RETURN_CONST None END CODE __check_existing(self, row) DOC 'pass' MAKE_CELL row RESUME 0 LOAD_FAST self LOAD_ATTR __update_keys POP_JUMP_IF_NONE L2 LOAD_GLOBAL NULL + tuple LOAD_CLOSURE row ...
def __check_existing(self, row): """pass""" if self.__update_keys is not None: key = tuple((row[key] for key in self.__update_keys)) if key in self.__bloom: return True self.__bloom.add(key) return False return False
{ "repo": "frictionlessdata/tableschema-sql-py", "repo_url": "https://github.com/frictionlessdata/tableschema-sql-py", "file_path": "tableschema_sql/writer.py", "commit_sha": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "func_name": "Writer.__check_existing", "line_start": 103, "line_end": 112, "permalin...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "64bf820e0e354b97c4f1ae56cb8ddfe00755c702", "resolved_at_commit": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
frictionlessdata/tableschema-sql-py
Writer.__check_existing
66
false
112
src/00112.py
pyc/00112.pyc
CODE <module>() RESUME 0 LOAD_CONST <code buckets> MAKE_FUNCTION 0 STORE_NAME buckets RETURN_CONST None END CODE buckets(self) DOC 'pass' RESUME 0 BUILD_LIST 0 STORE_FAST buckets LOAD_FAST self LOAD_ATTR __metadata LOAD_ATTR sorted_tables GET_ITER L1: FOR_ITER L3 STORE_FAST table LOAD_FA...
def buckets(self): """pass""" buckets = [] for table in self.__metadata.sorted_tables: bucket = self.__mapper.restore_bucket(table.name) if bucket is not None: buckets.append(bucket) return buckets
{ "repo": "frictionlessdata/tableschema-sql-py", "repo_url": "https://github.com/frictionlessdata/tableschema-sql-py", "file_path": "tableschema_sql/storage.py", "commit_sha": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "func_name": "Storage.buckets", "line_start": 57, "line_end": 65, "permalink": "http...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "64bf820e0e354b97c4f1ae56cb8ddfe00755c702", "resolved_at_commit": "81ca4b564f6dac5fe3adc6553b353826190df6f8", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
frictionlessdata/tableschema-sql-py
Storage.buckets
40
false
113
src/00113.py
pyc/00113.pyc
CODE <module>() RESUME 0 LOAD_CONST (0,) LOAD_CONST <code open_hierarchy> MAKE_FUNCTION defaults STORE_NAME open_hierarchy RETURN_CONST None END CODE open_hierarchy(self, path, relative_to_object_id, object_id, create_file_type) DOC 'pass' RESUME 0 NOP L1: LOAD_FAST self LOAD_ATTR process LOAD_A...
def open_hierarchy(self, path, relative_to_object_id, object_id, create_file_type=0): """pass""" try: return self.process.OpenHierarchy(path, relative_to_object_id, '', create_file_type) except Exception as e: print(e) print('Could not Open Hierarchy')
{ "repo": "varunsrin/one-py", "repo_url": "https://github.com/varunsrin/one-py", "file_path": "onepy/onmanager.py", "commit_sha": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "func_name": "ONProcess.open_hierarchy", "line_start": 53, "line_end": 65, "permalink": "https://github.com/varunsrin/one-py/blob/...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "140c12b628ebdc9a0aa9b30c4cbab2078708deb6", "resolved_at_commit": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
varunsrin/one-py
ONProcess.open_hierarchy
59
false
114
src/00114.py
pyc/00114.pyc
CODE <module>() RESUME 0 LOAD_CONST (0,) LOAD_CONST <code create_new_page> MAKE_FUNCTION defaults STORE_NAME create_new_page RETURN_CONST None END CODE create_new_page(self, section_id, new_page_style) DOC 'pass' RESUME 0 NOP L1: LOAD_FAST self LOAD_ATTR process LOAD_ATTR NULL|self + CreateNewPa...
def create_new_page(self, section_id, new_page_style=0): """pass""" try: self.process.CreateNewPage(section_id, '', new_page_style) except Exception as e: print(e) print('Unable to create the page')
{ "repo": "varunsrin/one-py", "repo_url": "https://github.com/varunsrin/one-py", "file_path": "onepy/onmanager.py", "commit_sha": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "func_name": "ONProcess.create_new_page", "line_start": 75, "line_end": 86, "permalink": "https://github.com/varunsrin/one-py/blob...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "140c12b628ebdc9a0aa9b30c4cbab2078708deb6", "resolved_at_commit": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
varunsrin/one-py
ONProcess.create_new_page
59
false
115
src/00115.py
pyc/00115.pyc
CODE <module>() RESUME 0 LOAD_CONST (0,) LOAD_CONST <code get_page_content> MAKE_FUNCTION defaults STORE_NAME get_page_content RETURN_CONST None END CODE get_page_content(self, page_id, page_info) DOC 'pass' RESUME 0 NOP L1: LOAD_FAST self LOAD_ATTR process LOAD_ATTR NULL|self + GetPageContent ...
def get_page_content(self, page_id, page_info=0): """pass""" try: return self.process.GetPageContent(page_id, '', page_info) except Exception as e: print(e) print('Could not get Page Content')
{ "repo": "varunsrin/one-py", "repo_url": "https://github.com/varunsrin/one-py", "file_path": "onepy/onmanager.py", "commit_sha": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "func_name": "ONProcess.get_page_content", "line_start": 95, "line_end": 107, "permalink": "https://github.com/varunsrin/one-py/bl...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "140c12b628ebdc9a0aa9b30c4cbab2078708deb6", "resolved_at_commit": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
varunsrin/one-py
ONProcess.get_page_content
58
false
116
src/00116.py
pyc/00116.pyc
CODE <module>() DOC '' RESUME 0 LOAD_CONST ('',) LOAD_CONST <code publish> MAKE_FUNCTION defaults STORE_NAME publish RETURN_CONST None END CODE publish(self, hierarchy_id, target_file_path, publish_format, clsid_of_exporter) DOC 'pass' RESUME 0 NOP L1: LOAD_FAST self LOAD_ATTR process LOAD_ATT...
def publish(self, hierarchy_id, target_file_path, publish_format, clsid_of_exporter=''): """pass""" try: self.process.Publish(hierarchy_id, target_file_path, publish_format, clsid_of_exporter) except Exception as e: print(e) print('Could not Publish')
{ "repo": "varunsrin/one-py", "repo_url": "https://github.com/varunsrin/one-py", "file_path": "onepy/onmanager.py", "commit_sha": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "func_name": "ONProcess.publish", "line_start": 141, "line_end": 156, "permalink": "https://github.com/varunsrin/one-py/blob/8fcf0...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "140c12b628ebdc9a0aa9b30c4cbab2078708deb6", "resolved_at_commit": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
varunsrin/one-py
ONProcess.publish
61
false
117
src/00117.py
pyc/00117.pyc
CODE <module>() RESUME 0 LOAD_CONST (0,) LOAD_CONST <code get_special_location> MAKE_FUNCTION defaults STORE_NAME get_special_location RETURN_CONST None END CODE get_special_location(self, special_location) DOC 'pass' RESUME 0 NOP L1: LOAD_FAST self LOAD_ATTR process LOAD_ATTR NULL|self + GetSpe...
def get_special_location(self, special_location=0): """pass""" try: return self.process.GetSpecialLocation(special_location) except Exception as e: print(e) print('Could not retreive special location')
{ "repo": "varunsrin/one-py", "repo_url": "https://github.com/varunsrin/one-py", "file_path": "onepy/onmanager.py", "commit_sha": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "func_name": "ONProcess.get_special_location", "line_start": 179, "line_end": 190, "permalink": "https://github.com/varunsrin/one-...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "140c12b628ebdc9a0aa9b30c4cbab2078708deb6", "resolved_at_commit": "8fcf021bcf776a1802a69f50dfd180daf83536ff", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
varunsrin/one-py
ONProcess.get_special_location
56
false
118
src/00118.py
pyc/00118.pyc
CODE <module>() RESUME 0 LOAD_CONST <code memory> MAKE_FUNCTION 0 STORE_NAME memory RETURN_CONST None END CODE memory() DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + dict CALL 0 STORE_FAST mem_info LOAD_GLOBAL psutil LOAD_ATTR NULL|self + virtual_memory CALL 0 LOAD_ATTR NULL|self + _asdict CALL 0...
def memory(): """pass""" mem_info = dict() for k, v in psutil.virtual_memory()._asdict().items(): mem_info[k] = int(v) return mem_info
{ "repo": "GGiecold/Cluster_Ensembles", "repo_url": "https://github.com/GGiecold/Cluster_Ensembles", "file_path": "src/Cluster_Ensembles/Cluster_Ensembles.py", "commit_sha": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "func_name": "memory", "line_start": 69, "line_end": 83, "permalink": "https://github....
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "01041c4f2c7998e57025e9bdbeafbfc2d4e6f8f5", "resolved_at_commit": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
GGiecold/Cluster_Ensembles
memory
37
false
119
src/00119.py
pyc/00119.pyc
CODE <module>() RESUME 0 LOAD_CONST <code get_chunk_size> MAKE_FUNCTION 0 STORE_NAME get_chunk_size RETURN_CONST None END CODE get_chunk_size(N, n) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + memory CALL 0 LOAD_CONST 'free' BINARY_SUBSCR STORE_FAST mem_free LOAD_FAST mem_free LOAD_CONST 60000000 ...
def get_chunk_size(N, n): """pass""" mem_free = memory()['free'] if mem_free > 60000000: chunk_size = int((mem_free - 10000000) * 1000 / (4 * n * N)) return chunk_size elif mem_free > 40000000: chunk_size = int((mem_free - 7000000) * 1000 / (4 * n * N)) return chunk_size ...
{ "repo": "GGiecold/Cluster_Ensembles", "repo_url": "https://github.com/GGiecold/Cluster_Ensembles", "file_path": "src/Cluster_Ensembles/Cluster_Ensembles.py", "commit_sha": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "func_name": "get_chunk_size", "line_start": 86, "line_end": 127, "permalink": "https:...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "01041c4f2c7998e57025e9bdbeafbfc2d4e6f8f5", "resolved_at_commit": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
GGiecold/Cluster_Ensembles
get_chunk_size
151
false
120
src/00120.py
pyc/00120.pyc
CODE <module>() RESUME 0 LOAD_CONST <code get_compression_filter> MAKE_FUNCTION 0 STORE_NAME get_compression_filter RETURN_CONST None END CODE get_compression_filter(byte_counts) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + isinstance LOAD_FAST byte_counts LOAD_GLOBAL numbers LOAD_ATTR Integral CALL 2...
def get_compression_filter(byte_counts): """pass""" assert isinstance(byte_counts, numbers.Integral) and byte_counts > 0 if 2 * byte_counts > 1000 * memory()['free']: try: FILTERS = tables.filters(complevel=5, complib='blosc', shuffle=True, least_significant_digit=6) except table...
{ "repo": "GGiecold/Cluster_Ensembles", "repo_url": "https://github.com/GGiecold/Cluster_Ensembles", "file_path": "src/Cluster_Ensembles/Cluster_Ensembles.py", "commit_sha": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "func_name": "get_compression_filter", "line_start": 130, "line_end": 157, "permalink"...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "01041c4f2c7998e57025e9bdbeafbfc2d4e6f8f5", "resolved_at_commit": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
GGiecold/Cluster_Ensembles
get_compression_filter
83
false
121
src/00121.py
pyc/00121.pyc
CODE <module>() RESUME 0 LOAD_CONST <code build_hypergraph_adjacency> MAKE_FUNCTION 0 STORE_NAME build_hypergraph_adjacency RETURN_CONST None END CODE build_hypergraph_adjacency(cluster_runs) DOC 'pass' RESUME 0 LOAD_FAST cluster_runs LOAD_ATTR shape LOAD_CONST 0 BINARY_SUBSCR STORE_FAST N_runs ...
def build_hypergraph_adjacency(cluster_runs): """pass""" N_runs = cluster_runs.shape[0] hypergraph_adjacency = create_membership_matrix(cluster_runs[0]) for i in range(1, N_runs): hypergraph_adjacency = scipy.sparse.vstack([hypergraph_adjacency, create_membership_matrix(cluster_runs[i])], format...
{ "repo": "GGiecold/Cluster_Ensembles", "repo_url": "https://github.com/GGiecold/Cluster_Ensembles", "file_path": "src/Cluster_Ensembles/Cluster_Ensembles.py", "commit_sha": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "func_name": "build_hypergraph_adjacency", "line_start": 160, "line_end": 183, "permal...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "01041c4f2c7998e57025e9bdbeafbfc2d4e6f8f5", "resolved_at_commit": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
GGiecold/Cluster_Ensembles
build_hypergraph_adjacency
48
false
122
src/00122.py
pyc/00122.pyc
CODE <module>() RESUME 0 LOAD_CONST <code store_hypergraph_adjacency> MAKE_FUNCTION 0 STORE_NAME store_hypergraph_adjacency RETURN_CONST None END CODE store_hypergraph_adjacency(hypergraph_adjacency, hdf5_file_name) DOC 'pass' RESUME 0 LOAD_FAST hypergraph_adjacency LOAD_ATTR __class__ LOAD_GLOBAL s...
def store_hypergraph_adjacency(hypergraph_adjacency, hdf5_file_name): """pass""" assert hypergraph_adjacency.__class__ == scipy.sparse.csr.csr_matrix byte_counts = hypergraph_adjacency.data.nbytes + hypergraph_adjacency.indices.nbytes + hypergraph_adjacency.indptr.nbytes FILTERS = get_compression_filter...
{ "repo": "GGiecold/Cluster_Ensembles", "repo_url": "https://github.com/GGiecold/Cluster_Ensembles", "file_path": "src/Cluster_Ensembles/Cluster_Ensembles.py", "commit_sha": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "func_name": "store_hypergraph_adjacency", "line_start": 186, "line_end": 215, "permal...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "01041c4f2c7998e57025e9bdbeafbfc2d4e6f8f5", "resolved_at_commit": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
GGiecold/Cluster_Ensembles
store_hypergraph_adjacency
148
false
123
src/00123.py
pyc/00123.pyc
CODE <module>() RESUME 0 LOAD_CONST <code load_hypergraph_adjacency> MAKE_FUNCTION 0 STORE_NAME load_hypergraph_adjacency RETURN_CONST None END CODE load_hypergraph_adjacency(hdf5_file_name) DOC 'pass' RESUME 0 LOAD_GLOBAL tables LOAD_ATTR NULL|self + open_file LOAD_FAST hdf5_file_name LOAD_CONST ...
def load_hypergraph_adjacency(hdf5_file_name): """pass""" with tables.open_file(hdf5_file_name, 'r+') as fileh: pars = [] for par in ('data', 'indices', 'indptr', 'shape'): pars.append(getattr(fileh.root.consensus_group, par).read()) hypergraph_adjacency = scipy.sparse.csr_matrix...
{ "repo": "GGiecold/Cluster_Ensembles", "repo_url": "https://github.com/GGiecold/Cluster_Ensembles", "file_path": "src/Cluster_Ensembles/Cluster_Ensembles.py", "commit_sha": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "func_name": "load_hypergraph_adjacency", "line_start": 218, "line_end": 237, "permali...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "01041c4f2c7998e57025e9bdbeafbfc2d4e6f8f5", "resolved_at_commit": "d1b1ce9f541fc937ac7c677e964520e0e9163dc7", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
GGiecold/Cluster_Ensembles
load_hypergraph_adjacency
83
false
124
src/00124.py
pyc/00124.pyc
CODE <module>() RESUME 0 LOAD_CONST <code obfuscate> MAKE_FUNCTION 0 STORE_NAME obfuscate RETURN_CONST None END CODE obfuscate(p, action) DOC 'pass' RESUME 0 LOAD_CONST 'ru7sll3uQrGtDPcIW3okutpFLo6YYtd5bWSpbZJIopYQ0Du0a1WlhvJOaZEH' STORE_FAST key LOAD_GLOBAL NULL + list CALL 0 STORE_FAST s LOA...
def obfuscate(p, action): """pass""" key = 'ru7sll3uQrGtDPcIW3okutpFLo6YYtd5bWSpbZJIopYQ0Du0a1WlhvJOaZEH' s = list() if action == 'store': if PY2: for i in range(len(p)): kc = key[i % len(key)] ec = chr((ord(p[i]) + ord(kc)) % 256) s.ap...
{ "repo": "9b/google-alerts", "repo_url": "https://github.com/9b/google-alerts", "file_path": "google_alerts/__init__.py", "commit_sha": "69a502cbcccf1bcafe963ed40d286441b0117e04", "func_name": "obfuscate", "line_start": 58, "line_end": 85, "permalink": "https://github.com/9b/google-alerts/blob/69a502cb...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "3307de0f7e64d46fb789a590b78f2baea5021dac", "resolved_at_commit": "69a502cbcccf1bcafe963ed40d286441b0117e04", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
9b/google-alerts
obfuscate
142
false
125
src/00125.py
pyc/00125.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _config_bootstrap> MAKE_FUNCTION 0 STORE_NAME _config_bootstrap RETURN_CONST None END CODE _config_bootstrap(self) DOC 'pass' RESUME 0 LOAD_GLOBAL os LOAD_ATTR path LOAD_ATTR NULL|self + exists LOAD_GLOBAL CONFIG_PATH CALL 1 POP_JUMP_IF_TRUE L1 LOAD_...
def _config_bootstrap(self): """pass""" if not os.path.exists(CONFIG_PATH): os.makedirs(CONFIG_PATH) if not os.path.exists(CONFIG_FILE): json.dump(CONFIG_DEFAULTS, open(CONFIG_FILE, 'w'), indent=4, separators=(',', ': ')) config = CONFIG_DEFAULTS if self._email and self._password: ...
{ "repo": "9b/google-alerts", "repo_url": "https://github.com/9b/google-alerts", "file_path": "google_alerts/__init__.py", "commit_sha": "69a502cbcccf1bcafe963ed40d286441b0117e04", "func_name": "GoogleAlerts._config_bootstrap", "line_start": 133, "line_end": 162, "permalink": "https://github.com/9b/goog...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "3307de0f7e64d46fb789a590b78f2baea5021dac", "resolved_at_commit": "69a502cbcccf1bcafe963ed40d286441b0117e04", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
9b/google-alerts
GoogleAlerts._config_bootstrap
138
false
126
src/00126.py
pyc/00126.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _session_check> MAKE_FUNCTION 0 STORE_NAME _session_check RETURN_CONST None END CODE _session_check(self) DOC 'pass' RESUME 0 LOAD_GLOBAL os LOAD_ATTR path LOAD_ATTR NULL|self + exists LOAD_GLOBAL SESSION_FILE CALL 1 POP_JUMP_IF_TRUE L1 LOAD_FAST sel...
def _session_check(self): """pass""" if not os.path.exists(SESSION_FILE): self._log.debug('Session file does not exist') return False with open(SESSION_FILE, 'rb') as f: cookies = requests.utils.cookiejar_from_dict(pickle.load(f)) self._session.cookies = cookies self....
{ "repo": "9b/google-alerts", "repo_url": "https://github.com/9b/google-alerts", "file_path": "google_alerts/__init__.py", "commit_sha": "69a502cbcccf1bcafe963ed40d286441b0117e04", "func_name": "GoogleAlerts._session_check", "line_start": 164, "line_end": 187, "permalink": "https://github.com/9b/google-...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "3307de0f7e64d46fb789a590b78f2baea5021dac", "resolved_at_commit": "69a502cbcccf1bcafe963ed40d286441b0117e04", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
9b/google-alerts
GoogleAlerts._session_check
109
false
127
src/00127.py
pyc/00127.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _logger> MAKE_FUNCTION 0 STORE_NAME _logger RETURN_CONST None END CODE _logger(self) DOC 'pass' RESUME 0 LOAD_GLOBAL logging LOAD_ATTR NULL|self + getLogger LOAD_FAST self LOAD_ATTR NAME CALL 1 STORE_FAST logger LOAD_FAST logger LOAD_ATTR NULL|self...
def _logger(self): """pass""" logger = logging.getLogger(self.NAME) logger.setLevel(self.LOG_LEVEL) shandler = logging.StreamHandler(sys.stdout) fmt = '\x1b[1;32m%(levelname)-5s %(module)s:%(funcName)s():' fmt += '%(lineno)d %(asctime)s\x1b[0m| %(message)s' shandler.setFormatter(logging.Form...
{ "repo": "9b/google-alerts", "repo_url": "https://github.com/9b/google-alerts", "file_path": "google_alerts/__init__.py", "commit_sha": "69a502cbcccf1bcafe963ed40d286441b0117e04", "func_name": "GoogleAlerts._logger", "line_start": 189, "line_end": 201, "permalink": "https://github.com/9b/google-alerts/...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "3307de0f7e64d46fb789a590b78f2baea5021dac", "resolved_at_commit": "69a502cbcccf1bcafe963ed40d286441b0117e04", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
9b/google-alerts
GoogleAlerts._logger
49
false
128
src/00128.py
pyc/00128.pyc
CODE <module>() RESUME 0 LOAD_CONST <code set_log_level> MAKE_FUNCTION 0 STORE_NAME set_log_level RETURN_CONST None END CODE set_log_level(self, level) DOC 'pass' RESUME 0 LOAD_FAST level LOAD_CONST 'info' COMPARE_OP == POP_JUMP_IF_FALSE L1 LOAD_GLOBAL logging LOAD_ATTR INFO STORE_FAST level...
def set_log_level(self, level): """pass""" if level == 'info': level = logging.INFO if level == 'debug': level = logging.DEBUG if level == 'error': level = logging.ERROR self._log.setLevel(level)
{ "repo": "9b/google-alerts", "repo_url": "https://github.com/9b/google-alerts", "file_path": "google_alerts/__init__.py", "commit_sha": "69a502cbcccf1bcafe963ed40d286441b0117e04", "func_name": "GoogleAlerts.set_log_level", "line_start": 203, "line_end": 211, "permalink": "https://github.com/9b/google-a...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "3307de0f7e64d46fb789a590b78f2baea5021dac", "resolved_at_commit": "69a502cbcccf1bcafe963ed40d286441b0117e04", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
9b/google-alerts
GoogleAlerts.set_log_level
41
false
129
src/00129.py
pyc/00129.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _process_state> MAKE_FUNCTION 0 STORE_NAME _process_state RETURN_CONST None END CODE _process_state(self) DOC 'pass' RESUME 0 LOAD_FAST self LOAD_ATTR _log LOAD_ATTR NULL|self + debug LOAD_CONST 'Capturing state from the request' CALL 1 POP_TOP LOAD_...
def _process_state(self): """pass""" self._log.debug('Capturing state from the request') response = self._session.get(url=self.ALERTS_URL, headers=self.HEADERS) soup = BeautifulSoup(response.content, 'html.parser') for i in soup.findAll('script'): if i.text.find('window.STATE') == -1: ...
{ "repo": "9b/google-alerts", "repo_url": "https://github.com/9b/google-alerts", "file_path": "google_alerts/__init__.py", "commit_sha": "69a502cbcccf1bcafe963ed40d286441b0117e04", "func_name": "GoogleAlerts._process_state", "line_start": 213, "line_end": 230, "permalink": "https://github.com/9b/google-...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "3307de0f7e64d46fb789a590b78f2baea5021dac", "resolved_at_commit": "69a502cbcccf1bcafe963ed40d286441b0117e04", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
9b/google-alerts
GoogleAlerts._process_state
83
false
130
src/00130.py
pyc/00130.pyc
CODE <module>() RESUME 0 LOAD_CONST <code search_packages_info> MAKE_FUNCTION 0 STORE_NAME search_packages_info RETURN_CONST None END CODE search_packages_info(query) DOC 'pass' RETURN_GENERATOR POP_TOP L1: RESUME 0 BUILD_MAP 0 STORE_FAST installed LOAD_GLOBAL pkg_resources LOAD_ATTR working_s...
def search_packages_info(query): """pass""" installed = {} for p in pkg_resources.working_set: installed[canonicalize_name(p.project_name)] = p query_names = [canonicalize_name(name) for name in query] for dist in [installed[pkg] for pkg in query_names if pkg in installed]: package =...
{ "repo": "r1chardj0n3s/pip-check-reqs", "repo_url": "https://github.com/r1chardj0n3s/pip-check-reqs", "file_path": "pip_check_reqs/common.py", "commit_sha": "2f9bfe821d122dca1877c51f288b8a8b31877f79", "func_name": "search_packages_info", "line_start": 161, "line_end": 198, "permalink": "https://github....
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "e9db8af2f3a9dc6dda5c6eea1f3de9c5cd492226", "resolved_at_commit": "2f9bfe821d122dca1877c51f288b8a8b31877f79", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
r1chardj0n3s/pip-check-reqs
search_packages_info
351
false
131
src/00131.py
pyc/00131.pyc
CODE <module>() RESUME 0 LOAD_CONST <code process_view> MAKE_FUNCTION 0 STORE_NAME process_view RETURN_CONST None END CODE process_view(self, request, view_func, view_args, view_kwargs) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + list LOAD_GLOBAL VIEW_METHOD_DATA LOAD_ATTR NULL|self + keys CALL 0 CAL...
def process_view(self, request, view_func, view_args, view_kwargs): """pass""" view_keys = list(VIEW_METHOD_DATA.keys()) for key in view_keys: del VIEW_METHOD_DATA[key] self.view_data = {} try: cbv = view_func.view_class except AttributeError: cbv = False if cbv: ...
{ "repo": "loftylabs/django-developer-panel", "repo_url": "https://github.com/loftylabs/django-developer-panel", "file_path": "djdev_panel/middleware.py", "commit_sha": "52fd2666a158b197fdd643d3c2c4d9bbc5ba230a", "func_name": "DebugMiddleware.process_view", "line_start": 141, "line_end": 171, "permalink...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "0cf992c180fa5d53c1c2775959c3140064c57371", "resolved_at_commit": "52fd2666a158b197fdd643d3c2c4d9bbc5ba230a", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
loftylabs/django-developer-panel
DebugMiddleware.process_view
148
false
132
src/00132.py
pyc/00132.pyc
CODE <module>() RESUME 0 LOAD_CONST <code process_response> MAKE_FUNCTION 0 STORE_NAME process_response RETURN_CONST None END CODE process_response(self, request, response) DOC 'pass' RESUME 0 LOAD_GLOBAL settings LOAD_ATTR DEBUG POP_JUMP_IF_TRUE L1 LOAD_FAST response RETURN_VALUE L1: LOAD_FAS...
def process_response(self, request, response): """pass""" if not settings.DEBUG: return response content_encoding = response.get('Content-Encoding', '') content_type = response.get('Content-Type', '').split(';')[0] if any((getattr(response, 'streaming', False), 'gzip' in content_encoding, co...
{ "repo": "loftylabs/django-developer-panel", "repo_url": "https://github.com/loftylabs/django-developer-panel", "file_path": "djdev_panel/middleware.py", "commit_sha": "52fd2666a158b197fdd643d3c2c4d9bbc5ba230a", "func_name": "DebugMiddleware.process_response", "line_start": 191, "line_end": 217, "perma...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "0cf992c180fa5d53c1c2775959c3140064c57371", "resolved_at_commit": "52fd2666a158b197fdd643d3c2c4d9bbc5ba230a", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
loftylabs/django-developer-panel
DebugMiddleware.process_response
116
false
133
src/00133.py
pyc/00133.pyc
CODE <module>() RESUME 0 LOAD_CONST <code get_job_class> MAKE_FUNCTION 0 STORE_NAME get_job_class RETURN_CONST None END CODE get_job_class(klass_str) DOC 'pass' RESUME 0 LOAD_FAST klass_str LOAD_ATTR NULL|self + rsplit LOAD_CONST '.' LOAD_CONST 1 CALL 2 UNPACK_SEQUENCE 2 STORE_FAST mod_name ...
def get_job_class(klass_str): """pass""" mod_name, klass_name = klass_str.rsplit('.', 1) try: mod = importlib.import_module(mod_name) except ImportError as e: logger.error("Error importing job module %s: '%s'", mod_name, e) return try: klass = getattr(mod, klass_name)...
{ "repo": "codeinthehole/django-cacheback", "repo_url": "https://github.com/codeinthehole/django-cacheback", "file_path": "cacheback/utils.py", "commit_sha": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "func_name": "get_job_class", "line_start": 32, "line_end": 47, "permalink": "https://github.com/codei...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "050aadbf82160a360fe1543e6b8c7b862173d28d", "resolved_at_commit": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
codeinthehole/django-cacheback
get_job_class
96
false
134
src/00134.py
pyc/00134.pyc
CODE <module>() RESUME 0 LOAD_CONST <code get> MAKE_FUNCTION 0 STORE_NAME get RETURN_CONST None END CODE get(self, *raw_args, **raw_kwargs) DOC 'pass' RESUME 0 PUSH_NULL LOAD_FAST self LOAD_ATTR prepare_args LOAD_FAST raw_args CALL_FUNCTION_EX 0 STORE_FAST args PUSH_NULL LOAD_FAST self L...
def get(self, *raw_args, **raw_kwargs): """pass""" args = self.prepare_args(*raw_args) kwargs = self.prepare_kwargs(**raw_kwargs) key = self.key(*args, **kwargs) item = self.cache.get(key) call = Call(args=raw_args, kwargs=raw_kwargs) if item is None: if self.should_missing_item_be_f...
{ "repo": "codeinthehole/django-cacheback", "repo_url": "https://github.com/codeinthehole/django-cacheback", "file_path": "cacheback/base.py", "commit_sha": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "func_name": "Job.get", "line_start": 133, "line_end": 212, "permalink": "https://github.com/codeintheh...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "050aadbf82160a360fe1543e6b8c7b862173d28d", "resolved_at_commit": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
codeinthehole/django-cacheback
Job.get
247
false
135
src/00135.py
pyc/00135.pyc
CODE <module>() RESUME 0 LOAD_CONST <code invalidate> MAKE_FUNCTION 0 STORE_NAME invalidate RETURN_CONST None END CODE invalidate(self, *raw_args, **raw_kwargs) DOC 'pass' RESUME 0 PUSH_NULL LOAD_FAST self LOAD_ATTR prepare_args LOAD_FAST raw_args CALL_FUNCTION_EX 0 STORE_FAST args PUSH_NULL...
def invalidate(self, *raw_args, **raw_kwargs): """pass""" args = self.prepare_args(*raw_args) kwargs = self.prepare_kwargs(**raw_kwargs) key = self.key(*args, **kwargs) item = self.cache.get(key) if item is not None: expiry, data = item self.store(key, self.timeout(*args, **kwarg...
{ "repo": "codeinthehole/django-cacheback", "repo_url": "https://github.com/codeinthehole/django-cacheback", "file_path": "cacheback/base.py", "commit_sha": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "func_name": "Job.invalidate", "line_start": 214, "line_end": 226, "permalink": "https://github.com/cod...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "050aadbf82160a360fe1543e6b8c7b862173d28d", "resolved_at_commit": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
codeinthehole/django-cacheback
Job.invalidate
72
false
136
src/00136.py
pyc/00136.pyc
CODE <module>() RESUME 0 LOAD_CONST <code delete> MAKE_FUNCTION 0 STORE_NAME delete RETURN_CONST None END CODE delete(self, *raw_args, **raw_kwargs) DOC 'pass' RESUME 0 PUSH_NULL LOAD_FAST self LOAD_ATTR prepare_args LOAD_FAST raw_args CALL_FUNCTION_EX 0 STORE_FAST args PUSH_NULL LOAD_FAST...
def delete(self, *raw_args, **raw_kwargs): """pass""" args = self.prepare_args(*raw_args) kwargs = self.prepare_kwargs(**raw_kwargs) key = self.key(*args, **kwargs) item = self.cache.get(key) if item is not None: self.cache.delete(key)
{ "repo": "codeinthehole/django-cacheback", "repo_url": "https://github.com/codeinthehole/django-cacheback", "file_path": "cacheback/base.py", "commit_sha": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "func_name": "Job.delete", "line_start": 228, "line_end": 237, "permalink": "https://github.com/codeint...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "050aadbf82160a360fe1543e6b8c7b862173d28d", "resolved_at_commit": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
codeinthehole/django-cacheback
Job.delete
51
false
137
src/00137.py
pyc/00137.pyc
CODE <module>() RESUME 0 LOAD_CONST <code raw_get> MAKE_FUNCTION 0 STORE_NAME raw_get RETURN_CONST None END CODE raw_get(self, *raw_args, **raw_kwargs) DOC 'pass' RESUME 0 PUSH_NULL LOAD_FAST self LOAD_ATTR prepare_args LOAD_FAST raw_args CALL_FUNCTION_EX 0 STORE_FAST args PUSH_NULL LOAD_F...
def raw_get(self, *raw_args, **raw_kwargs): """pass""" args = self.prepare_args(*raw_args) kwargs = self.prepare_kwargs(**raw_kwargs) key = self.key(*args, **kwargs) return self.cache.get(key)
{ "repo": "codeinthehole/django-cacheback", "repo_url": "https://github.com/codeinthehole/django-cacheback", "file_path": "cacheback/base.py", "commit_sha": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "func_name": "Job.raw_get", "line_start": 239, "line_end": 250, "permalink": "https://github.com/codein...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "050aadbf82160a360fe1543e6b8c7b862173d28d", "resolved_at_commit": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
codeinthehole/django-cacheback
Job.raw_get
40
false
138
src/00138.py
pyc/00138.pyc
CODE <module>() RESUME 0 LOAD_CONST <code set> MAKE_FUNCTION 0 STORE_NAME set RETURN_CONST None END CODE set(self, *raw_args, **raw_kwargs) DOC 'pass' RESUME 0 LOAD_FAST self LOAD_ATTR set_data_kwarg LOAD_FAST raw_kwargs CONTAINS_OP 0 POP_JUMP_IF_FALSE L1 LOAD_FAST raw_kwargs LOAD_ATTR NULL|...
def set(self, *raw_args, **raw_kwargs): """pass""" if self.set_data_kwarg in raw_kwargs: data = raw_kwargs.pop(self.set_data_kwarg) else: raw_args = list(raw_args) data = raw_args.pop() args = self.prepare_args(*raw_args) kwargs = self.prepare_kwargs(**raw_kwargs) key = s...
{ "repo": "codeinthehole/django-cacheback", "repo_url": "https://github.com/codeinthehole/django-cacheback", "file_path": "cacheback/base.py", "commit_sha": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "func_name": "Job.set", "line_start": 252, "line_end": 272, "permalink": "https://github.com/codeintheh...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "050aadbf82160a360fe1543e6b8c7b862173d28d", "resolved_at_commit": "0c79a524a28ca2fada98ed58c26c544f07a58e14", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
codeinthehole/django-cacheback
Job.set
84
false
139
src/00139.py
pyc/00139.pyc
CODE <module>() RESUME 0 LOAD_CONST <code angle> MAKE_FUNCTION 0 STORE_NAME angle RETURN_CONST None END CODE angle(v1, v2) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + unit_vector LOAD_FAST v1 CALL 1 STORE_FAST v1_u LOAD_GLOBAL NULL + unit_vector LOAD_FAST v2 CALL 1 STORE_FAST v2_u LOAD_GLOBAL...
def angle(v1, v2): """pass""" v1_u = unit_vector(v1) v2_u = unit_vector(v2) return np.arccos(np.clip(np.dot(v1_u, v2_u), -1.0, 1.0))
{ "repo": "bartromgens/geojsoncontour", "repo_url": "https://github.com/bartromgens/geojsoncontour", "file_path": "geojsoncontour/utilities/multipoly.py", "commit_sha": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "func_name": "angle", "line_start": 39, "line_end": 43, "permalink": "https://github.com/ba...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "13e6c1dafbe752362c0a18ec09ad528718ba4b89", "resolved_at_commit": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
bartromgens/geojsoncontour
angle
32
false
140
src/00140.py
pyc/00140.pyc
CODE <module>() RESUME 0 LOAD_CONST <code keep_high_angle> MAKE_FUNCTION 0 STORE_NAME keep_high_angle RETURN_CONST None END CODE keep_high_angle(vertices, min_angle_deg) DOC 'pass' RESUME 0 BUILD_LIST 0 STORE_FAST accepted LOAD_FAST vertices STORE_FAST v LOAD_FAST v LOAD_CONST 1 BINARY_SUBSC...
def keep_high_angle(vertices, min_angle_deg): """pass""" accepted = [] v = vertices v1 = v[1] - v[0] accepted.append((v[0][0], v[0][1])) for i in range(1, len(v) - 2): v2 = v[i + 1] - v[i - 1] diff_angle = np.fabs(angle(v1, v2) * 180.0 / np.pi) if diff_angle > min_angle_d...
{ "repo": "bartromgens/geojsoncontour", "repo_url": "https://github.com/bartromgens/geojsoncontour", "file_path": "geojsoncontour/utilities/multipoly.py", "commit_sha": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "func_name": "keep_high_angle", "line_start": 46, "line_end": 59, "permalink": "https://git...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "13e6c1dafbe752362c0a18ec09ad528718ba4b89", "resolved_at_commit": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
bartromgens/geojsoncontour
keep_high_angle
131
false
141
src/00141.py
pyc/00141.pyc
CODE <module>() RESUME 0 LOAD_CONST <code set_contourf_properties> MAKE_FUNCTION 0 STORE_NAME set_contourf_properties RETURN_CONST None END CODE set_contourf_properties(stroke_width, fcolor, fill_opacity, contour_levels, contourf_idx, unit) DOC 'pass' RESUME 0 LOAD_FAST fcolor LOAD_FAST stroke_width ...
def set_contourf_properties(stroke_width, fcolor, fill_opacity, contour_levels, contourf_idx, unit): """pass""" return {'stroke': fcolor, 'stroke-width': stroke_width, 'stroke-opacity': 1, 'fill': fcolor, 'fill-opacity': fill_opacity, 'title': '%.2f' % contour_levels[contourf_idx] + ' ' + unit}
{ "repo": "bartromgens/geojsoncontour", "repo_url": "https://github.com/bartromgens/geojsoncontour", "file_path": "geojsoncontour/utilities/multipoly.py", "commit_sha": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "func_name": "set_contourf_properties", "line_start": 62, "line_end": 71, "permalink": "htt...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "13e6c1dafbe752362c0a18ec09ad528718ba4b89", "resolved_at_commit": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
bartromgens/geojsoncontour
set_contourf_properties
27
false
142
src/00142.py
pyc/00142.pyc
CODE <module>() RESUME 0 LOAD_CONST (None, None, 5, '', 1, None, False, True) LOAD_CONST <code contour_to_geojson> MAKE_FUNCTION defaults STORE_NAME contour_to_geojson RETURN_CONST None END CODE contour_to_geojson(contour, geojson_filepath, min_angle_deg, ndigits, unit, stroke_width, geojson_properties, str...
def contour_to_geojson(contour, geojson_filepath=None, min_angle_deg=None, ndigits=5, unit='', stroke_width=1, geojson_properties=None, strdump=False, serialize=True): """pass""" collections = contour.collections contour_index = 0 line_features = [] for collection in collections: color = col...
{ "repo": "bartromgens/geojsoncontour", "repo_url": "https://github.com/bartromgens/geojsoncontour", "file_path": "geojsoncontour/contour.py", "commit_sha": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "func_name": "contour_to_geojson", "line_start": 11, "line_end": 40, "permalink": "https://github.com/b...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "13e6c1dafbe752362c0a18ec09ad528718ba4b89", "resolved_at_commit": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
bartromgens/geojsoncontour
contour_to_geojson
131
false
143
src/00143.py
pyc/00143.pyc
CODE <module>() RESUME 0 LOAD_CONST (None, None, 5, '', 1, 0.9, None, False, True) LOAD_CONST <code contourf_to_geojson_overlap> MAKE_FUNCTION defaults STORE_NAME contourf_to_geojson_overlap RETURN_CONST None END CODE contourf_to_geojson_overlap(contourf, geojson_filepath, min_angle_deg, ndigits, unit, stro...
def contourf_to_geojson_overlap(contourf, geojson_filepath=None, min_angle_deg=None, ndigits=5, unit='', stroke_width=1, fill_opacity=0.9, geojson_properties=None, strdump=False, serialize=True): """pass""" polygon_features = [] contourf_idx = 0 for collection in contourf.collections: color = co...
{ "repo": "bartromgens/geojsoncontour", "repo_url": "https://github.com/bartromgens/geojsoncontour", "file_path": "geojsoncontour/contour.py", "commit_sha": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "func_name": "contourf_to_geojson_overlap", "line_start": 43, "line_end": 65, "permalink": "https://git...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "13e6c1dafbe752362c0a18ec09ad528718ba4b89", "resolved_at_commit": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
bartromgens/geojsoncontour
contourf_to_geojson_overlap
126
false
144
src/00144.py
pyc/00144.pyc
CODE <module>() RESUME 0 LOAD_CONST (None, None, 5, '', 1, 0.9, None, False, True) LOAD_CONST <code contourf_to_geojson> MAKE_FUNCTION defaults STORE_NAME contourf_to_geojson RETURN_CONST None END CODE contourf_to_geojson(contourf, geojson_filepath, min_angle_deg, ndigits, unit, stroke_width, fill_opacity, ...
def contourf_to_geojson(contourf, geojson_filepath=None, min_angle_deg=None, ndigits=5, unit='', stroke_width=1, fill_opacity=0.9, geojson_properties=None, strdump=False, serialize=True): """pass""" polygon_features = [] mps = [] contourf_idx = 0 for coll in contourf.collections: color = col...
{ "repo": "bartromgens/geojsoncontour", "repo_url": "https://github.com/bartromgens/geojsoncontour", "file_path": "geojsoncontour/contour.py", "commit_sha": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "func_name": "contourf_to_geojson", "line_start": 68, "line_end": 103, "permalink": "https://github.com...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.md", "blob_sha": "13e6c1dafbe752362c0a18ec09ad528718ba4b89", "resolved_at_commit": "79e30718fa0c1d96a2459eb1f45d06d699d240ed", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
bartromgens/geojsoncontour
contourf_to_geojson
193
false
145
src/00145.py
pyc/00145.pyc
CODE <module>() RESUME 0 LOAD_CONST <code get_authorize_callback> MAKE_FUNCTION 0 STORE_NAME get_authorize_callback RETURN_CONST None END CODE get_authorize_callback(endpoint, provider_id) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + config_value LOAD_CONST 'BLUEPRINT_NAME' CALL 1 STORE_FAST endpoint_pr...
def get_authorize_callback(endpoint, provider_id): """pass""" endpoint_prefix = config_value('BLUEPRINT_NAME') url = url_for(endpoint_prefix + '.' + endpoint, provider_id=provider_id) return request.url_root[:-1] + url
{ "repo": "mattupstate/flask-social", "repo_url": "https://github.com/mattupstate/flask-social", "file_path": "flask_social/utils.py", "commit_sha": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "func_name": "get_authorize_callback", "line_start": 30, "line_end": 37, "permalink": "https://github.com/mattu...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "2b1a4f0b9c203602ddb36d0d6ba3939d49e86e11", "resolved_at_commit": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
mattupstate/flask-social
get_authorize_callback
32
false
146
src/00146.py
pyc/00146.pyc
CODE <module>() RESUME 0 LOAD_CONST <code delete_connection> MAKE_FUNCTION 0 STORE_NAME delete_connection RETURN_CONST None END CODE delete_connection(self, **kwargs) DOC 'pass' RESUME 0 PUSH_NULL LOAD_FAST self LOAD_ATTR find_connection LOAD_CONST () BUILD_MAP 0 LOAD_FAST kwargs DICT_MERGE ...
def delete_connection(self, **kwargs): """pass""" conn = self.find_connection(**kwargs) if not conn: return False self.delete(conn) return True
{ "repo": "mattupstate/flask-social", "repo_url": "https://github.com/mattupstate/flask-social", "file_path": "flask_social/datastore.py", "commit_sha": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "func_name": "ConnectionDatastore.delete_connection", "line_start": 35, "line_end": 41, "permalink": "https...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "2b1a4f0b9c203602ddb36d0d6ba3939d49e86e11", "resolved_at_commit": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
mattupstate/flask-social
ConnectionDatastore.delete_connection
29
false
147
src/00147.py
pyc/00147.pyc
CODE <module>() RESUME 0 LOAD_CONST <code delete_connections> MAKE_FUNCTION 0 STORE_NAME delete_connections RETURN_CONST None END CODE delete_connections(self, **kwargs) DOC 'pass' RESUME 0 LOAD_CONST False STORE_FAST rv PUSH_NULL LOAD_FAST self LOAD_ATTR find_connections LOAD_CONST () BUILD...
def delete_connections(self, **kwargs): """pass""" rv = False for c in self.find_connections(**kwargs): self.delete(c) rv = True return rv
{ "repo": "mattupstate/flask-social", "repo_url": "https://github.com/mattupstate/flask-social", "file_path": "flask_social/datastore.py", "commit_sha": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "func_name": "ConnectionDatastore.delete_connections", "line_start": 43, "line_end": 49, "permalink": "http...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "2b1a4f0b9c203602ddb36d0d6ba3939d49e86e11", "resolved_at_commit": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
mattupstate/flask-social
ConnectionDatastore.delete_connections
36
false
148
src/00148.py
pyc/00148.pyc
CODE <module>() RESUME 0 LOAD_CONST <code login> MAKE_FUNCTION 0 STORE_NAME login RETURN_CONST None END CODE login(provider_id) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + get_provider_or_404 LOAD_FAST provider_id CALL 1 STORE_FAST provider LOAD_GLOBAL NULL + get_authorize_callback LOAD_CONST 'logi...
def login(provider_id): """pass""" provider = get_provider_or_404(provider_id) callback_url = get_authorize_callback('login', provider_id) post_login = request.form.get('next', get_post_login_redirect()) session[config_value('POST_OAUTH_LOGIN_SESSION_KEY')] = post_login return provider.authorize...
{ "repo": "mattupstate/flask-social", "repo_url": "https://github.com/mattupstate/flask-social", "file_path": "flask_social/views.py", "commit_sha": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "func_name": "login", "line_start": 44, "line_end": 50, "permalink": "https://github.com/mattupstate/flask-soci...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "2b1a4f0b9c203602ddb36d0d6ba3939d49e86e11", "resolved_at_commit": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
mattupstate/flask-social
login
38
false
149
src/00149.py
pyc/00149.pyc
CODE <module>() RESUME 0 LOAD_CONST <code connect> MAKE_FUNCTION 0 STORE_NAME connect RETURN_CONST None END CODE connect(provider_id) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + get_provider_or_404 LOAD_FAST provider_id CALL 1 STORE_FAST provider LOAD_GLOBAL NULL + get_authorize_callback LOAD_CONST...
def connect(provider_id): """pass""" provider = get_provider_or_404(provider_id) callback_url = get_authorize_callback('connect', provider_id) allow_view = get_url(config_value('CONNECT_ALLOW_VIEW')) pc = request.form.get('next', allow_view) session[config_value('POST_OAUTH_CONNECT_SESSION_KEY')...
{ "repo": "mattupstate/flask-social", "repo_url": "https://github.com/mattupstate/flask-social", "file_path": "flask_social/views.py", "commit_sha": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "func_name": "connect", "line_start": 54, "line_end": 61, "permalink": "https://github.com/mattupstate/flask-so...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "2b1a4f0b9c203602ddb36d0d6ba3939d49e86e11", "resolved_at_commit": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
mattupstate/flask-social
connect
43
false
150
src/00150.py
pyc/00150.pyc
CODE <module>() RESUME 0 LOAD_CONST <code remove_all_connections> MAKE_FUNCTION 0 STORE_NAME remove_all_connections RETURN_CONST None END CODE remove_all_connections(provider_id) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + get_provider_or_404 LOAD_FAST provider_id CALL 1 STORE_FAST provider LOAD_GLOB...
def remove_all_connections(provider_id): """pass""" provider = get_provider_or_404(provider_id) ctx = dict(provider=provider.name, user=current_user) deleted = _datastore.delete_connections(user_id=current_user.get_id(), provider_id=provider_id) if deleted: after_this_request(_commit) ...
{ "repo": "mattupstate/flask-social", "repo_url": "https://github.com/mattupstate/flask-social", "file_path": "flask_social/views.py", "commit_sha": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "func_name": "remove_all_connections", "line_start": 73, "line_end": 93, "permalink": "https://github.com/mattu...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "2b1a4f0b9c203602ddb36d0d6ba3939d49e86e11", "resolved_at_commit": "36f5790c8fb6d4d9a5120d099419ba30fd73e897", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
mattupstate/flask-social
remove_all_connections
73
false
151
src/00151.py
pyc/00151.pyc
CODE <module>() DOC 'application/octet-stream' RESUME 0 LOAD_CONST ('application/octet-stream',) LOAD_CONST <code guess> MAKE_FUNCTION defaults STORE_NAME guess RETURN_CONST None END CODE guess(filename, fallback) DOC 'pass' RESUME 0 LOAD_GLOBAL mimetypes LOAD_ATTR NULL|self + guess_type LOAD_FA...
def guess(filename, fallback='application/octet-stream'): """pass""" guessed, encoding = mimetypes.guess_type(filename, strict=False) if guessed is None: return (fallback, encoding) return (guessed, encoding)
{ "repo": "eugene-eeo/mailthon", "repo_url": "https://github.com/eugene-eeo/mailthon", "file_path": "mailthon/helpers.py", "commit_sha": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "func_name": "guess", "line_start": 23, "line_end": 35, "permalink": "https://github.com/eugene-eeo/mailthon/blob/e3d5aef62...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "e0b61cb524463175763b04a9ce80ff82c59a1564", "resolved_at_commit": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
eugene-eeo/mailthon
guess
32
false
152
src/00152.py
pyc/00152.pyc
CODE <module>() RESUME 0 LOAD_CONST <code format_addresses> MAKE_FUNCTION 0 STORE_NAME format_addresses RETURN_CONST None END CODE format_addresses(addrs) DOC 'pass' RESUME 0 LOAD_CONST ', ' LOAD_ATTR NULL|self + join LOAD_CONST <code format_addresses.<locals>.<genexpr>> MAKE_FUNCTION 0 LOAD_FAS...
def format_addresses(addrs): """pass""" return ', '.join((formataddr(item) if isinstance(item, tuple) else item for item in addrs))
{ "repo": "eugene-eeo/mailthon", "repo_url": "https://github.com/eugene-eeo/mailthon", "file_path": "mailthon/helpers.py", "commit_sha": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "func_name": "format_addresses", "line_start": 38, "line_end": 47, "permalink": "https://github.com/eugene-eeo/mailthon/blo...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "e0b61cb524463175763b04a9ce80ff82c59a1564", "resolved_at_commit": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
eugene-eeo/mailthon
format_addresses
52
false
153
src/00153.py
pyc/00153.pyc
CODE <module>() DOC 'utf-8' RESUME 0 LOAD_CONST ('utf-8',) LOAD_CONST <code stringify_address> MAKE_FUNCTION defaults STORE_NAME stringify_address RETURN_CONST None END CODE stringify_address(addr, encoding) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + isinstance LOAD_FAST addr LOAD_GLOBAL bytes_type ...
def stringify_address(addr, encoding='utf-8'): """pass""" if isinstance(addr, bytes_type): return addr try: addr = addr.encode('ascii') except UnicodeEncodeError: if '@' in addr: localpart, domain = addr.split('@', 1) addr = b'@'.join([localpart.encode(enc...
{ "repo": "eugene-eeo/mailthon", "repo_url": "https://github.com/eugene-eeo/mailthon", "file_path": "mailthon/helpers.py", "commit_sha": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "func_name": "stringify_address", "line_start": 50, "line_end": 73, "permalink": "https://github.com/eugene-eeo/mailthon/bl...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "e0b61cb524463175763b04a9ce80ff82c59a1564", "resolved_at_commit": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
eugene-eeo/mailthon
stringify_address
83
false
154
src/00154.py
pyc/00154.pyc
CODE <module>() RESUME 0 LOAD_CONST (None, (), (), (), None, None, 'utf8', ()) LOAD_CONST <code email> MAKE_FUNCTION defaults STORE_NAME email RETURN_CONST None END CODE email(sender, receivers, cc, bcc, subject, content, encoding, attachments) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + HTML LOAD_FAST c...
def email(sender=None, receivers=(), cc=(), bcc=(), subject=None, content=None, encoding='utf8', attachments=()): """pass""" enclosure = [HTML(content, encoding)] enclosure.extend((Attachment(k) for k in attachments)) return Collection(*enclosure, headers=[headers.subject(subject), headers.sender(sender...
{ "repo": "eugene-eeo/mailthon", "repo_url": "https://github.com/eugene-eeo/mailthon", "file_path": "mailthon/api.py", "commit_sha": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "func_name": "email", "line_start": 18, "line_end": 43, "permalink": "https://github.com/eugene-eeo/mailthon/blob/e3d5aef62505a...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "e0b61cb524463175763b04a9ce80ff82c59a1564", "resolved_at_commit": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
eugene-eeo/mailthon
email
83
false
155
src/00155.py
pyc/00155.pyc
CODE <module>() RESUME 0 LOAD_CONST (587, (None, None), False, None) LOAD_CONST <code postman> MAKE_FUNCTION defaults STORE_NAME postman RETURN_CONST None END CODE postman(host, port, auth, force_tls, options) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + Postman LOAD_CONST () LOAD_FAST host LOAD_FAST ...
def postman(host, port=587, auth=(None, None), force_tls=False, options=None): """pass""" return Postman(host=host, port=port, middlewares=[middleware.tls(force=force_tls), middleware.auth(*auth)], **options)
{ "repo": "eugene-eeo/mailthon", "repo_url": "https://github.com/eugene-eeo/mailthon", "file_path": "mailthon/api.py", "commit_sha": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "func_name": "postman", "line_start": 46, "line_end": 68, "permalink": "https://github.com/eugene-eeo/mailthon/blob/e3d5aef6250...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "e0b61cb524463175763b04a9ce80ff82c59a1564", "resolved_at_commit": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
eugene-eeo/mailthon
postman
31
false
156
src/00156.py
pyc/00156.pyc
CODE <module>() RESUME 0 LOAD_CONST <code mime> MAKE_FUNCTION 0 STORE_NAME mime RETURN_CONST None END CODE mime(self) DOC 'pass' RESUME 0 LOAD_FAST self LOAD_ATTR NULL|self + mime_object CALL 0 STORE_FAST mime LOAD_FAST self LOAD_ATTR headers LOAD_ATTR NULL|self + prepare LOAD_FAST mime ...
def mime(self): """pass""" mime = self.mime_object() self.headers.prepare(mime) return mime
{ "repo": "eugene-eeo/mailthon", "repo_url": "https://github.com/eugene-eeo/mailthon", "file_path": "mailthon/enclosure.py", "commit_sha": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "func_name": "Enclosure.mime", "line_start": 56, "line_end": 64, "permalink": "https://github.com/eugene-eeo/mailthon/blo...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "e0b61cb524463175763b04a9ce80ff82c59a1564", "resolved_at_commit": "e3d5aef62505acb4edbc33e3378a04951c3199cb", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
eugene-eeo/mailthon
Enclosure.mime
22
false
157
src/00157.py
pyc/00157.pyc
CODE <module>() RESUME 0 LOAD_CONST <code get_existing_model> MAKE_FUNCTION 0 STORE_NAME get_existing_model RETURN_CONST None END CODE get_existing_model(model_name) DOC 'pass' RESUME 0 NOP L1: LOAD_GLOBAL engine LOAD_ATTR NULL|self + get_document_cls LOAD_FAST model_name CALL 1 STORE_FAST mod...
def get_existing_model(model_name): """pass""" try: model_cls = engine.get_document_cls(model_name) log.debug('Model `{}` already exists. Using existing one'.format(model_name)) return model_cls except ValueError: log.debug('Model `{}` does not exist'.format(model_name))
{ "repo": "ramses-tech/ramses", "repo_url": "https://github.com/ramses-tech/ramses", "file_path": "ramses/models.py", "commit_sha": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "func_name": "get_existing_model", "line_start": 45, "line_end": 56, "permalink": "https://github.com/ramses-tech/ramses/blob/ea...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "e06d2081865a766a8668acc12878f98b27fc9ea0", "resolved_at_commit": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
ramses-tech/ramses
get_existing_model
54
false
158
src/00158.py
pyc/00158.pyc
CODE <module>() RESUME 0 LOAD_CONST <code prepare_relationship> MAKE_FUNCTION 0 STORE_NAME prepare_relationship RETURN_CONST None END CODE prepare_relationship(config, model_name, raml_resource) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + get_existing_model LOAD_FAST model_name CALL 1 POP_JUMP_IF_NOT_N...
def prepare_relationship(config, model_name, raml_resource): """pass""" if get_existing_model(model_name) is None: plural_route = '/' + pluralize(model_name.lower()) route = '/' + model_name.lower() for res in raml_resource.root.resources: if res.method.upper() != 'POST': ...
{ "repo": "ramses-tech/ramses", "repo_url": "https://github.com/ramses-tech/ramses", "file_path": "ramses/models.py", "commit_sha": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "func_name": "prepare_relationship", "line_start": 59, "line_end": 82, "permalink": "https://github.com/ramses-tech/ramses/blob/...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "e06d2081865a766a8668acc12878f98b27fc9ea0", "resolved_at_commit": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
ramses-tech/ramses
prepare_relationship
79
false
159
src/00159.py
pyc/00159.pyc
CODE <module>() RESUME 0 LOAD_CONST (True,) LOAD_CONST <code generate_model_cls> MAKE_FUNCTION defaults STORE_NAME generate_model_cls RETURN_CONST None END CODE generate_model_cls(config, schema, model_name, raml_resource, es_based) DOC 'pass' RESUME 0 LOAD_CONST 0 LOAD_CONST ('AuthModelMethodsMixin...
def generate_model_cls(config, schema, model_name, raml_resource, es_based=True): """pass""" from nefertari.authentication.models import AuthModelMethodsMixin base_cls = engine.ESBaseDocument if es_based else engine.BaseDocument model_name = str(model_name) metaclass = type(base_cls) auth_model ...
{ "repo": "ramses-tech/ramses", "repo_url": "https://github.com/ramses-tech/ramses", "file_path": "ramses/models.py", "commit_sha": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "func_name": "generate_model_cls", "line_start": 85, "line_end": 169, "permalink": "https://github.com/ramses-tech/ramses/blob/e...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "e06d2081865a766a8668acc12878f98b27fc9ea0", "resolved_at_commit": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
ramses-tech/ramses
generate_model_cls
318
false
160
src/00160.py
pyc/00160.pyc
CODE <module>() RESUME 0 LOAD_CONST <code setup_data_model> MAKE_FUNCTION 0 STORE_NAME setup_data_model RETURN_CONST None END CODE setup_data_model(config, raml_resource, model_name) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + get_existing_model LOAD_FAST model_name CALL 1 STORE_FAST model_cls LOAD_G...
def setup_data_model(config, raml_resource, model_name): """pass""" model_cls = get_existing_model(model_name) schema = resource_schema(raml_resource) if not schema: raise Exception('Missing schema for model `{}`'.format(model_name)) if model_cls is not None: return (model_cls, schem...
{ "repo": "ramses-tech/ramses", "repo_url": "https://github.com/ramses-tech/ramses", "file_path": "ramses/models.py", "commit_sha": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "func_name": "setup_data_model", "line_start": 172, "line_end": 198, "permalink": "https://github.com/ramses-tech/ramses/blob/ea...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "e06d2081865a766a8668acc12878f98b27fc9ea0", "resolved_at_commit": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
ramses-tech/ramses
setup_data_model
55
false
161
src/00161.py
pyc/00161.pyc
CODE <module>() RESUME 0 LOAD_CONST <code handle_model_generation> MAKE_FUNCTION 0 STORE_NAME handle_model_generation RETURN_CONST None END CODE handle_model_generation(config, raml_resource) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + generate_model_name LOAD_FAST raml_resource CALL 1 STORE_FAST model...
def handle_model_generation(config, raml_resource): """pass""" model_name = generate_model_name(raml_resource) try: return setup_data_model(config, raml_resource, model_name) except ValueError as ex: raise ValueError('{}: {}'.format(model_name, str(ex)))
{ "repo": "ramses-tech/ramses", "repo_url": "https://github.com/ramses-tech/ramses", "file_path": "ramses/models.py", "commit_sha": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "func_name": "handle_model_generation", "line_start": 201, "line_end": 211, "permalink": "https://github.com/ramses-tech/ramses/...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "e06d2081865a766a8668acc12878f98b27fc9ea0", "resolved_at_commit": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
ramses-tech/ramses
handle_model_generation
55
false
162
src/00162.py
pyc/00162.pyc
CODE <module>() RESUME 0 LOAD_CONST <code setup_model_event_subscribers> MAKE_FUNCTION 0 STORE_NAME setup_model_event_subscribers RETURN_CONST None END CODE setup_model_event_subscribers(config, model_cls, schema) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + get_events_map CALL 0 STORE_FAST events_map L...
def setup_model_event_subscribers(config, model_cls, schema): """pass""" events_map = get_events_map() model_events = schema.get('_event_handlers', {}) event_kwargs = {'model': model_cls} for event_tag, subscribers in model_events.items(): type_, action = event_tag.split('_') event_o...
{ "repo": "ramses-tech/ramses", "repo_url": "https://github.com/ramses-tech/ramses", "file_path": "ramses/models.py", "commit_sha": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "func_name": "setup_model_event_subscribers", "line_start": 214, "line_end": 235, "permalink": "https://github.com/ramses-tech/r...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "e06d2081865a766a8668acc12878f98b27fc9ea0", "resolved_at_commit": "ea2e1e896325b7256cdf5902309e05fd98e0c14c", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
ramses-tech/ramses
setup_model_event_subscribers
81
false
163
src/00163.py
pyc/00163.pyc
CODE <module>() RESUME 0 LOAD_CONST <code setup> MAKE_FUNCTION 0 STORE_NAME setup RETURN_CONST None END CODE setup(app) DOC 'pass' RESUME 0 LOAD_CONST 0 LOAD_CONST None IMPORT_NAME sphinxcontrib_django.docstrings STORE_FAST sphinxcontrib_django LOAD_CONST 0 LOAD_CONST None IMPORT_NAME sphinx...
def setup(app): """pass""" import sphinxcontrib_django.docstrings import sphinxcontrib_django.roles sphinxcontrib_django.docstrings.setup(app) sphinxcontrib_django.roles.setup(app)
{ "repo": "edoburu/sphinxcontrib-django", "repo_url": "https://github.com/edoburu/sphinxcontrib-django", "file_path": "sphinxcontrib_django/__init__.py", "commit_sha": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "func_name": "setup", "line_start": 8, "line_end": 20, "permalink": "https://github.com/edob...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", "resolved_at_commit": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
edoburu/sphinxcontrib-django
setup
31
false
164
src/00164.py
pyc/00164.pyc
CODE <module>() RESUME 0 LOAD_CONST <code patch_django_for_autodoc> MAKE_FUNCTION 0 STORE_NAME patch_django_for_autodoc RETURN_CONST None END CODE patch_django_for_autodoc() DOC 'pass' RESUME 0 LOAD_CONST <code patch_django_for_autodoc.<locals>.<lambda>> MAKE_FUNCTION 0 LOAD_GLOBAL ManagerDescriptor...
def patch_django_for_autodoc(): """pass""" ManagerDescriptor.__get__ = lambda self, *args, **kwargs: self.manager models.QuerySet.__repr__ = lambda self: self.__class__.__name__
{ "repo": "edoburu/sphinxcontrib-django", "repo_url": "https://github.com/edoburu/sphinxcontrib-django", "file_path": "sphinxcontrib_django/patches.py", "commit_sha": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "func_name": "patch_django_for_autodoc", "line_start": 5, "line_end": 14, "permalink": "https...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", "resolved_at_commit": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
edoburu/sphinxcontrib-django
patch_django_for_autodoc
33
false
165
src/00165.py
pyc/00165.pyc
CODE <module>() RESUME 0 LOAD_CONST <code setup> MAKE_FUNCTION 0 STORE_NAME setup RETURN_CONST None END CODE setup(app) DOC 'pass' RESUME 0 LOAD_CONST 1 LOAD_CONST ('patch_django_for_autodoc',) IMPORT_NAME patches IMPORT_FROM patch_django_for_autodoc STORE_FAST patch_django_for_autodoc POP_TOP...
def setup(app): """pass""" from .patches import patch_django_for_autodoc patch_django_for_autodoc() app.connect('autodoc-process-docstring', improve_model_docstring) app.connect('autodoc-skip-member', autodoc_skip)
{ "repo": "edoburu/sphinxcontrib-django", "repo_url": "https://github.com/edoburu/sphinxcontrib-django", "file_path": "sphinxcontrib_django/docstrings.py", "commit_sha": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "func_name": "setup", "line_start": 43, "line_end": 59, "permalink": "https://github.com/e...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", "resolved_at_commit": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
edoburu/sphinxcontrib-django
setup
33
false
166
src/00166.py
pyc/00166.pyc
CODE <module>() RESUME 0 LOAD_CONST <code autodoc_skip> MAKE_FUNCTION 0 STORE_NAME autodoc_skip RETURN_CONST None END CODE autodoc_skip(app, what, name, obj, skip, options) DOC 'pass' RESUME 0 LOAD_FAST name LOAD_GLOBAL config LOAD_ATTR EXCLUDE_MEMBERS CONTAINS_OP 0 POP_JUMP_IF_FALSE L1 RETURN...
def autodoc_skip(app, what, name, obj, skip, options): """pass""" if name in config.EXCLUDE_MEMBERS: return True if name in config.INCLUDE_MEMBERS: return False return skip
{ "repo": "edoburu/sphinxcontrib-django", "repo_url": "https://github.com/edoburu/sphinxcontrib-django", "file_path": "sphinxcontrib_django/docstrings.py", "commit_sha": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "func_name": "autodoc_skip", "line_start": 62, "line_end": 85, "permalink": "https://githu...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", "resolved_at_commit": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
edoburu/sphinxcontrib-django
autodoc_skip
26
false
167
src/00167.py
pyc/00167.pyc
CODE <module>() RESUME 0 LOAD_CONST <code improve_model_docstring> MAKE_FUNCTION 0 STORE_NAME improve_model_docstring RETURN_CONST None END CODE improve_model_docstring(app, what, name, obj, options, lines) DOC 'pass' RESUME 0 LOAD_FAST what LOAD_CONST 'class' COMPARE_OP == POP_JUMP_IF_FALSE L1 ...
def improve_model_docstring(app, what, name, obj, options, lines): """pass""" if what == 'class': _improve_class_docs(app, obj, lines) elif what == 'attribute': _improve_attribute_docs(obj, name, lines) elif what == 'method': _improve_method_docs(obj, name, lines) return line...
{ "repo": "edoburu/sphinxcontrib-django", "repo_url": "https://github.com/edoburu/sphinxcontrib-django", "file_path": "sphinxcontrib_django/docstrings.py", "commit_sha": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "func_name": "improve_model_docstring", "line_start": 88, "line_end": 110, "permalink": "h...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", "resolved_at_commit": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
edoburu/sphinxcontrib-django
improve_model_docstring
49
false
168
src/00168.py
pyc/00168.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _improve_class_docs> MAKE_FUNCTION 0 STORE_NAME _improve_class_docs RETURN_CONST None END CODE _improve_class_docs(app, cls, lines) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + issubclass LOAD_FAST cls LOAD_GLOBAL models LOAD_ATTR Model CALL 2 POP_JUMP_IF_FA...
def _improve_class_docs(app, cls, lines): """pass""" if issubclass(cls, models.Model): _add_model_fields_as_params(app, cls, lines) elif issubclass(cls, forms.Form): _add_form_fields(cls, lines)
{ "repo": "edoburu/sphinxcontrib-django", "repo_url": "https://github.com/edoburu/sphinxcontrib-django", "file_path": "sphinxcontrib_django/docstrings.py", "commit_sha": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "func_name": "_improve_class_docs", "line_start": 113, "line_end": 118, "permalink": "http...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", "resolved_at_commit": "5116ac7f1510a76b1ff58cf7f8d2fab7d8bbe2a9", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
edoburu/sphinxcontrib-django
_improve_class_docs
38
false
169
src/00169.py
pyc/00169.pyc
CODE <module>() DOC 'return' RESUME 0 LOAD_CONST 'return' LOAD_NAME List LOAD_NAME str BINARY_SUBSCR BUILD_TUPLE 2 LOAD_CONST <code attr_names> MAKE_FUNCTION annotations STORE_NAME attr_names RETURN_CONST None END CODE attr_names(cls) DOC 'pass' RESUME 0 LOAD_FAST cls LOAD_ATTR NULL|self +...
def attr_names(cls) -> List[str]: """pass""" return [k for k, v in cls.attr_types().items()]
{ "repo": "ramazanpolat/prodict", "repo_url": "https://github.com/ramazanpolat/prodict", "file_path": "prodict/__init__.py", "commit_sha": "e67e34738af1542f3b6c91c0e838f5be9a84aad4", "func_name": "Prodict.attr_names", "line_start": 49, "line_end": 54, "permalink": "https://github.com/ramazanpolat/prodic...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE.txt", "blob_sha": "315bcf8632a1628c359127c58351df4a368fc318", "resolved_at_commit": "e67e34738af1542f3b6c91c0e838f5be9a84aad4", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
ramazanpolat/prodict
Prodict.attr_names
51
true
170
src/00170.py
pyc/00170.pyc
CODE <module>() RESUME 0 LOAD_CONST (10, False) LOAD_CONST <code elliptic_fourier_descriptors> MAKE_FUNCTION defaults STORE_NAME elliptic_fourier_descriptors RETURN_CONST None END CODE elliptic_fourier_descriptors(contour, order, normalize) DOC 'pass' RESUME 0 LOAD_GLOBAL np LOAD_ATTR NULL|self + di...
def elliptic_fourier_descriptors(contour, order=10, normalize=False): """pass""" dxy = np.diff(contour, axis=0) dt = np.sqrt((dxy ** 2).sum(axis=1)) t = np.concatenate([[0.0], np.cumsum(dt)]) T = t[-1] phi = 2 * np.pi * t / T coeffs = np.zeros((order, 4)) for n in _range(1, order + 1): ...
{ "repo": "hbldh/pyefd", "repo_url": "https://github.com/hbldh/pyefd", "file_path": "pyefd.py", "commit_sha": "5c4e880fd6e70e8077fc8c0be4eec9df5b9ee596", "func_name": "elliptic_fourier_descriptors", "line_start": 37, "line_end": 70, "permalink": "https://github.com/hbldh/pyefd/blob/5c4e880fd6e70e8077fc8...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "fbd4c1d6b3d6fd381e05513e2bca2512e19fad40", "resolved_at_commit": "5c4e880fd6e70e8077fc8c0be4eec9df5b9ee596", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
hbldh/pyefd
elliptic_fourier_descriptors
216
false
171
src/00171.py
pyc/00171.pyc
CODE <module>() RESUME 0 LOAD_CONST (True,) LOAD_CONST <code normalize_efd> MAKE_FUNCTION defaults STORE_NAME normalize_efd RETURN_CONST None END CODE normalize_efd(coeffs, size_invariant) DOC 'pass' RESUME 0 LOAD_CONST 0.5 LOAD_GLOBAL np LOAD_ATTR NULL|self + arctan2 LOAD_CONST 2 LOAD_FAST co...
def normalize_efd(coeffs, size_invariant=True): """pass""" theta_1 = 0.5 * np.arctan2(2 * (coeffs[0, 0] * coeffs[0, 1] + coeffs[0, 2] * coeffs[0, 3]), coeffs[0, 0] ** 2 - coeffs[0, 1] ** 2 + coeffs[0, 2] ** 2 - coeffs[0, 3] ** 2) for n in _range(1, coeffs.shape[0] + 1): coeffs[n - 1, :] = np.dot(np....
{ "repo": "hbldh/pyefd", "repo_url": "https://github.com/hbldh/pyefd", "file_path": "pyefd.py", "commit_sha": "5c4e880fd6e70e8077fc8c0be4eec9df5b9ee596", "func_name": "normalize_efd", "line_start": 73, "line_end": 113, "permalink": "https://github.com/hbldh/pyefd/blob/5c4e880fd6e70e8077fc8c0be4eec9df5b9...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "fbd4c1d6b3d6fd381e05513e2bca2512e19fad40", "resolved_at_commit": "5c4e880fd6e70e8077fc8c0be4eec9df5b9ee596", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
hbldh/pyefd
normalize_efd
264
false
172
src/00172.py
pyc/00172.pyc
CODE <module>() RESUME 0 LOAD_CONST <code calculate_dc_coefficients> MAKE_FUNCTION 0 STORE_NAME calculate_dc_coefficients RETURN_CONST None END CODE calculate_dc_coefficients(contour) DOC 'pass' RESUME 0 LOAD_GLOBAL np LOAD_ATTR NULL|self + diff LOAD_FAST contour LOAD_CONST 0 KW_NAMES ('axis',) ...
def calculate_dc_coefficients(contour): """pass""" dxy = np.diff(contour, axis=0) dt = np.sqrt((dxy ** 2).sum(axis=1)) t = np.concatenate([[0.0], np.cumsum(dt)]) T = t[-1] xi = np.cumsum(dxy[:, 0]) - dxy[:, 0] / dt * t[1:] A0 = 1 / T * np.sum(dxy[:, 0] / (2 * dt) * np.diff(t ** 2) + xi * dt)...
{ "repo": "hbldh/pyefd", "repo_url": "https://github.com/hbldh/pyefd", "file_path": "pyefd.py", "commit_sha": "5c4e880fd6e70e8077fc8c0be4eec9df5b9ee596", "func_name": "calculate_dc_coefficients", "line_start": 116, "line_end": 136, "permalink": "https://github.com/hbldh/pyefd/blob/5c4e880fd6e70e8077fc8c...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "fbd4c1d6b3d6fd381e05513e2bca2512e19fad40", "resolved_at_commit": "5c4e880fd6e70e8077fc8c0be4eec9df5b9ee596", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
hbldh/pyefd
calculate_dc_coefficients
167
false
173
src/00173.py
pyc/00173.pyc
CODE <module>() RESUME 0 LOAD_CONST ((0.0, 0.0), None, None, 300) LOAD_CONST <code plot_efd> MAKE_FUNCTION defaults STORE_NAME plot_efd RETURN_CONST None END CODE plot_efd(coeffs, locus, image, contour, n) DOC 'pass' RESUME 0 NOP L1: LOAD_CONST 0 LOAD_CONST None IMPORT_NAME matplotlib.pyplot I...
def plot_efd(coeffs, locus=(0.0, 0.0), image=None, contour=None, n=300): """pass""" try: import matplotlib.pyplot as plt except ImportError: print('Cannot plot: matplotlib was not installed.') return N = coeffs.shape[0] N_half = int(np.ceil(N / 2)) n_rows = 2 t = np.l...
{ "repo": "hbldh/pyefd", "repo_url": "https://github.com/hbldh/pyefd", "file_path": "pyefd.py", "commit_sha": "5c4e880fd6e70e8077fc8c0be4eec9df5b9ee596", "func_name": "plot_efd", "line_start": 139, "line_end": 179, "permalink": "https://github.com/hbldh/pyefd/blob/5c4e880fd6e70e8077fc8c0be4eec9df5b9ee59...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "fbd4c1d6b3d6fd381e05513e2bca2512e19fad40", "resolved_at_commit": "5c4e880fd6e70e8077fc8c0be4eec9df5b9ee596", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
hbldh/pyefd
plot_efd
258
false
174
src/00174.py
pyc/00174.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _errcheck> MAKE_FUNCTION 0 STORE_NAME _errcheck RETURN_CONST None END CODE _errcheck(result, func, arguments) DOC 'pass' RESUME 0 LOAD_FAST result LOAD_CONST 0 COMPARE_OP != POP_JUMP_IF_FALSE L1 LOAD_GLOBAL NULL + XdoException LOAD_CONST 'Function {0} ...
def _errcheck(result, func, arguments): """pass""" if result != 0: raise XdoException('Function {0} returned error code {1}'.format(func.__name__, result)) return None
{ "repo": "rshk/python-libxdo", "repo_url": "https://github.com/rshk/python-libxdo", "file_path": "xdo/xdo.py", "commit_sha": "84cafa5943b005bc423edd28203a5266b3579ac3", "func_name": "_errcheck", "line_start": 37, "line_end": 51, "permalink": "https://github.com/rshk/python-libxdo/blob/84cafa5943b005bc4...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "ae69751d652be6a4077b1ed659c5e7eb7e4412d9", "resolved_at_commit": "84cafa5943b005bc423edd28203a5266b3579ac3", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
rshk/python-libxdo
_errcheck
25
false
175
src/00175.py
pyc/00175.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _gen_input_mask> MAKE_FUNCTION 0 STORE_NAME _gen_input_mask RETURN_CONST None END CODE _gen_input_mask(mask) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + input_mask LOAD_GLOBAL NULL + bool LOAD_FAST mask LOAD_GLOBAL MOD_Shift BINARY_OP & CALL 1 LOAD_GLOBAL...
def _gen_input_mask(mask): """pass""" return input_mask(shift=bool(mask & MOD_Shift), lock=bool(mask & MOD_Lock), control=bool(mask & MOD_Control), mod1=bool(mask & MOD_Mod1), mod2=bool(mask & MOD_Mod2), mod3=bool(mask & MOD_Mod3), mod4=bool(mask & MOD_Mod4), mod5=bool(mask & MOD_Mod5))
{ "repo": "rshk/python-libxdo", "repo_url": "https://github.com/rshk/python-libxdo", "file_path": "xdo/__init__.py", "commit_sha": "84cafa5943b005bc423edd28203a5266b3579ac3", "func_name": "_gen_input_mask", "line_start": 43, "line_end": 53, "permalink": "https://github.com/rshk/python-libxdo/blob/84cafa...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "ae69751d652be6a4077b1ed659c5e7eb7e4412d9", "resolved_at_commit": "84cafa5943b005bc423edd28203a5266b3579ac3", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
rshk/python-libxdo
_gen_input_mask
54
false
176
src/00176.py
pyc/00176.pyc
CODE <module>() RESUME 0 LOAD_CONST (0,) LOAD_CONST <code move_mouse> MAKE_FUNCTION defaults STORE_NAME move_mouse RETURN_CONST None END CODE move_mouse(self, x, y, screen) DOC 'pass' RESUME 0 LOAD_GLOBAL ctypes LOAD_ATTR NULL|self + c_int LOAD_FAST x CALL 1 STORE_FAST x LOAD_GLOBAL ctypes ...
def move_mouse(self, x, y, screen=0): """pass""" x = ctypes.c_int(x) y = ctypes.c_int(y) screen = ctypes.c_int(screen) _libxdo.xdo_move_mouse(self._xdo, x, y, screen)
{ "repo": "rshk/python-libxdo", "repo_url": "https://github.com/rshk/python-libxdo", "file_path": "xdo/__init__.py", "commit_sha": "84cafa5943b005bc423edd28203a5266b3579ac3", "func_name": "Xdo.move_mouse", "line_start": 83, "line_end": 110, "permalink": "https://github.com/rshk/python-libxdo/blob/84cafa...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "ae69751d652be6a4077b1ed659c5e7eb7e4412d9", "resolved_at_commit": "84cafa5943b005bc423edd28203a5266b3579ac3", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
rshk/python-libxdo
Xdo.move_mouse
36
false
177
src/00177.py
pyc/00177.pyc
CODE <module>() RESUME 0 LOAD_CONST <code move_mouse_relative_to_window> MAKE_FUNCTION 0 STORE_NAME move_mouse_relative_to_window RETURN_CONST None END CODE move_mouse_relative_to_window(self, window, x, y) DOC 'pass' RESUME 0 LOAD_GLOBAL _libxdo LOAD_ATTR NULL|self + xdo_move_mouse_relative_to_window...
def move_mouse_relative_to_window(self, window, x, y): """pass""" _libxdo.xdo_move_mouse_relative_to_window(self._xdo, ctypes.c_ulong(window), x, y)
{ "repo": "rshk/python-libxdo", "repo_url": "https://github.com/rshk/python-libxdo", "file_path": "xdo/__init__.py", "commit_sha": "84cafa5943b005bc423edd28203a5266b3579ac3", "func_name": "Xdo.move_mouse_relative_to_window", "line_start": 112, "line_end": 121, "permalink": "https://github.com/rshk/pytho...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "ae69751d652be6a4077b1ed659c5e7eb7e4412d9", "resolved_at_commit": "84cafa5943b005bc423edd28203a5266b3579ac3", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
rshk/python-libxdo
Xdo.move_mouse_relative_to_window
23
false
178
src/00178.py
pyc/00178.pyc
CODE <module>() RESUME 0 LOAD_CONST <code move_mouse_relative> MAKE_FUNCTION 0 STORE_NAME move_mouse_relative RETURN_CONST None END CODE move_mouse_relative(self, x, y) DOC 'pass' RESUME 0 LOAD_GLOBAL _libxdo LOAD_ATTR NULL|self + xdo_move_mouse_relative LOAD_FAST self LOAD_ATTR _xdo LOAD_FAST x...
def move_mouse_relative(self, x, y): """pass""" _libxdo.xdo_move_mouse_relative(self._xdo, x, y)
{ "repo": "rshk/python-libxdo", "repo_url": "https://github.com/rshk/python-libxdo", "file_path": "xdo/__init__.py", "commit_sha": "84cafa5943b005bc423edd28203a5266b3579ac3", "func_name": "Xdo.move_mouse_relative", "line_start": 123, "line_end": 130, "permalink": "https://github.com/rshk/python-libxdo/b...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "ae69751d652be6a4077b1ed659c5e7eb7e4412d9", "resolved_at_commit": "84cafa5943b005bc423edd28203a5266b3579ac3", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
rshk/python-libxdo
Xdo.move_mouse_relative
19
false
179
src/00179.py
pyc/00179.pyc
CODE <module>() RESUME 0 LOAD_CONST <code mouse_down> MAKE_FUNCTION 0 STORE_NAME mouse_down RETURN_CONST None END CODE mouse_down(self, window, button) DOC 'pass' RESUME 0 LOAD_GLOBAL _libxdo LOAD_ATTR NULL|self + xdo_mouse_down LOAD_FAST self LOAD_ATTR _xdo LOAD_GLOBAL ctypes LOAD_ATTR NULL|s...
def mouse_down(self, window, button): """pass""" _libxdo.xdo_mouse_down(self._xdo, ctypes.c_ulong(window), ctypes.c_int(button))
{ "repo": "rshk/python-libxdo", "repo_url": "https://github.com/rshk/python-libxdo", "file_path": "xdo/__init__.py", "commit_sha": "84cafa5943b005bc423edd28203a5266b3579ac3", "func_name": "Xdo.mouse_down", "line_start": 132, "line_end": 144, "permalink": "https://github.com/rshk/python-libxdo/blob/84caf...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE", "blob_sha": "ae69751d652be6a4077b1ed659c5e7eb7e4412d9", "resolved_at_commit": "84cafa5943b005bc423edd28203a5266b3579ac3", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
rshk/python-libxdo
Xdo.mouse_down
25
false
180
src/00180.py
pyc/00180.pyc
CODE <module>() RESUME 0 LOAD_CONST <code strip_punctuation_space> MAKE_FUNCTION 0 STORE_NAME strip_punctuation_space RETURN_CONST None END CODE strip_punctuation_space(value) DOC 'pass' RESUME 0 LOAD_CONST <code strip_punctuation_space.<locals>.strip_punctuation> MAKE_FUNCTION 0 STORE_FAST strip_pu...
def strip_punctuation_space(value): """pass""" def strip_punctuation(string): replacement_list = ((' .', '.'), (' :', ':'), ('( ', '('), (' )', ')')) for match, replacement in replacement_list: string = string.replace(match, replacement) return string if value == None: ...
{ "repo": "elifesciences/elife-tools", "repo_url": "https://github.com/elifesciences/elife-tools", "file_path": "elifetools/utils.py", "commit_sha": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "func_name": "strip_punctuation_space", "line_start": 47, "line_end": 63, "permalink": "https://github.com/elif...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "eb9744c950b19d74af698e79b30fb7157babffbc", "resolved_at_commit": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
elifesciences/elife-tools
strip_punctuation_space
83
false
181
src/00181.py
pyc/00181.pyc
CODE <module>() DOC '.' RESUME 0 LOAD_CONST ('.',) LOAD_CONST <code join_sentences> MAKE_FUNCTION defaults STORE_NAME join_sentences RETURN_CONST None END CODE join_sentences(string1, string2, glue) DOC 'pass' RESUME 0 LOAD_FAST string1 POP_JUMP_IF_FALSE L1 LOAD_FAST string1 LOAD_CONST '' CO...
def join_sentences(string1, string2, glue='.'): """pass""" if not string1 or string1 == '': return string2 if not string2 or string2 == '': return string1 new_string = string1.rstrip() if not new_string.endswith(glue): new_string += glue new_string += ' ' + string2.lstrip...
{ "repo": "elifesciences/elife-tools", "repo_url": "https://github.com/elifesciences/elife-tools", "file_path": "elifetools/utils.py", "commit_sha": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "func_name": "join_sentences", "line_start": 65, "line_end": 76, "permalink": "https://github.com/elifesciences...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "eb9744c950b19d74af698e79b30fb7157babffbc", "resolved_at_commit": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
elifesciences/elife-tools
join_sentences
56
false
182
src/00182.py
pyc/00182.pyc
CODE <module>() RESUME 0 LOAD_CONST (3735928559,) LOAD_CONST <code coerce_to_int> MAKE_FUNCTION defaults STORE_NAME coerce_to_int RETURN_CONST None END CODE coerce_to_int(val, default) DOC 'pass' RESUME 0 NOP L1: LOAD_GLOBAL NULL + int LOAD_FAST val CALL 1 L2: RETURN_VALUE L3: PUSH_EXC_INFO ...
def coerce_to_int(val, default=3735928559): """pass""" try: return int(val) except (TypeError, ValueError): if default != 3735928559: return default return val
{ "repo": "elifesciences/elife-tools", "repo_url": "https://github.com/elifesciences/elife-tools", "file_path": "elifetools/utils.py", "commit_sha": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "func_name": "coerce_to_int", "line_start": 78, "line_end": 85, "permalink": "https://github.com/elifesciences/...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "eb9744c950b19d74af698e79b30fb7157babffbc", "resolved_at_commit": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
elifesciences/elife-tools
coerce_to_int
51
false
183
src/00183.py
pyc/00183.pyc
CODE <module>() RESUME 0 LOAD_CONST <code nullify> MAKE_FUNCTION 0 STORE_NAME nullify RETURN_CONST None END CODE nullify(function) DOC 'pass' MAKE_CELL function RESUME 0 LOAD_CLOSURE function BUILD_TUPLE 1 LOAD_CONST <code nullify.<locals>.wrapper> MAKE_FUNCTION closure STORE_FAST wrapper LO...
def nullify(function): """pass""" def wrapper(*args, **kwargs): value = function(*args, **kwargs) if type(value) == list and len(value) == 0: return None return value return wrapper
{ "repo": "elifesciences/elife-tools", "repo_url": "https://github.com/elifesciences/elife-tools", "file_path": "elifetools/utils.py", "commit_sha": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "func_name": "nullify", "line_start": 88, "line_end": 95, "permalink": "https://github.com/elifesciences/elife-...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "eb9744c950b19d74af698e79b30fb7157babffbc", "resolved_at_commit": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
elifesciences/elife-tools
nullify
46
false
184
src/00184.py
pyc/00184.pyc
CODE <module>() RESUME 0 LOAD_CONST <code strippen> MAKE_FUNCTION 0 STORE_NAME strippen RETURN_CONST None END CODE strippen(function) DOC 'pass' MAKE_CELL function RESUME 0 LOAD_CLOSURE function BUILD_TUPLE 1 LOAD_CONST <code strippen.<locals>.wrapper> MAKE_FUNCTION closure STORE_FAST wrapper ...
def strippen(function): """pass""" def wrapper(*args, **kwargs): return strip_strings(function(*args, **kwargs)) return wrapper
{ "repo": "elifesciences/elife-tools", "repo_url": "https://github.com/elifesciences/elife-tools", "file_path": "elifetools/utils.py", "commit_sha": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "func_name": "strippen", "line_start": 97, "line_end": 101, "permalink": "https://github.com/elifesciences/elif...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "eb9744c950b19d74af698e79b30fb7157babffbc", "resolved_at_commit": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
elifesciences/elife-tools
strippen
32
false
185
src/00185.py
pyc/00185.pyc
CODE <module>() RESUME 0 LOAD_CONST <code inten> MAKE_FUNCTION 0 STORE_NAME inten RETURN_CONST None END CODE inten(function) DOC 'pass' MAKE_CELL function RESUME 0 LOAD_CLOSURE function BUILD_TUPLE 1 LOAD_CONST <code inten.<locals>.wrapper> MAKE_FUNCTION closure STORE_FAST wrapper LOAD_FAST ...
def inten(function): """pass""" def wrapper(*args, **kwargs): return coerce_to_int(function(*args, **kwargs)) return wrapper
{ "repo": "elifesciences/elife-tools", "repo_url": "https://github.com/elifesciences/elife-tools", "file_path": "elifetools/utils.py", "commit_sha": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "func_name": "inten", "line_start": 103, "line_end": 107, "permalink": "https://github.com/elifesciences/elife-...
{ "spdx": "MIT", "name": "MIT License", "file": "LICENSE", "blob_sha": "eb9744c950b19d74af698e79b30fb7157babffbc", "resolved_at_commit": "4b9e38cbe485c61a4ed7cbd8970c6b318334fd86", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
elifesciences/elife-tools
inten
32
false
186
src/00186.py
pyc/00186.pyc
CODE <module>() RESUME 0 LOAD_CONST (None,) LOAD_CONST <code connect> MAKE_FUNCTION defaults STORE_NAME connect RETURN_CONST None END CODE connect(url, max_retries, **kwargs) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + AvaticaClient LOAD_FAST url LOAD_FAST max_retries KW_NAMES ('max_retries',) CALL...
def connect(url, max_retries=None, **kwargs): """pass""" client = AvaticaClient(url, max_retries=max_retries) client.connect() return Connection(client, **kwargs)
{ "repo": "lalinsky/python-phoenixdb", "repo_url": "https://github.com/lalinsky/python-phoenixdb", "file_path": "phoenixdb/__init__.py", "commit_sha": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "func_name": "connect", "line_start": 44, "line_end": 67, "permalink": "https://github.com/lalinsky/python-ph...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "d645695673349e3947e8e5ae42332d0ac3164cd7", "resolved_at_commit": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
lalinsky/python-phoenixdb
connect
29
false
187
src/00187.py
pyc/00187.pyc
CODE <module>() RESUME 0 LOAD_CONST <code connect> MAKE_FUNCTION 0 STORE_NAME connect RETURN_CONST None END CODE connect(self) DOC 'pass' RESUME 0 LOAD_GLOBAL logger LOAD_ATTR NULL|self + debug LOAD_CONST 'Opening connection to %s:%s' LOAD_FAST self LOAD_ATTR url LOAD_ATTR hostname LOAD_FAST...
def connect(self): """pass""" logger.debug('Opening connection to %s:%s', self.url.hostname, self.url.port) try: self.connection = httplib.HTTPConnection(self.url.hostname, self.url.port) self.connection.connect() except (httplib.HTTPException, socket.error) as e: raise errors.In...
{ "repo": "lalinsky/python-phoenixdb", "repo_url": "https://github.com/lalinsky/python-phoenixdb", "file_path": "phoenixdb/avatica/client.py", "commit_sha": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "func_name": "AvaticaClient.connect", "line_start": 151, "line_end": 158, "permalink": "https://github....
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "d645695673349e3947e8e5ae42332d0ac3164cd7", "resolved_at_commit": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
lalinsky/python-phoenixdb
AvaticaClient.connect
73
false
188
src/00188.py
pyc/00188.pyc
CODE <module>() RESUME 0 LOAD_CONST <code close> MAKE_FUNCTION 0 STORE_NAME close RETURN_CONST None END CODE close(self) DOC 'pass' RESUME 0 LOAD_FAST self LOAD_ATTR connection POP_JUMP_IF_NONE L3 LOAD_GLOBAL logger LOAD_ATTR NULL|self + debug LOAD_CONST 'Closing connection to %s:%s' LOAD_FA...
def close(self): """pass""" if self.connection is not None: logger.debug('Closing connection to %s:%s', self.url.hostname, self.url.port) try: self.connection.close() except httplib.HTTPException: logger.warning('Error while closing connection', exc_info=True) ...
{ "repo": "lalinsky/python-phoenixdb", "repo_url": "https://github.com/lalinsky/python-phoenixdb", "file_path": "phoenixdb/avatica/client.py", "commit_sha": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "func_name": "AvaticaClient.close", "line_start": 160, "line_end": 168, "permalink": "https://github.co...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "d645695673349e3947e8e5ae42332d0ac3164cd7", "resolved_at_commit": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
lalinsky/python-phoenixdb
AvaticaClient.close
64
false
189
src/00189.py
pyc/00189.pyc
CODE <module>() RESUME 0 LOAD_CONST (None,) LOAD_CONST <code connection_sync> MAKE_FUNCTION defaults STORE_NAME connection_sync RETURN_CONST None END CODE connection_sync(self, connection_id, connProps) DOC 'pass' RESUME 0 LOAD_FAST connProps POP_JUMP_IF_NOT_NONE L1 BUILD_MAP 0 STORE_FAST connPr...
def connection_sync(self, connection_id, connProps=None): """pass""" if connProps is None: connProps = {} request = requests_pb2.ConnectionSyncRequest() request.connection_id = connection_id request.conn_props.auto_commit = connProps.get('autoCommit', False) request.conn_props.has_auto_c...
{ "repo": "lalinsky/python-phoenixdb", "repo_url": "https://github.com/lalinsky/python-phoenixdb", "file_path": "phoenixdb/avatica/client.py", "commit_sha": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "func_name": "AvaticaClient.connection_sync", "line_start": 286, "line_end": 314, "permalink": "https:/...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "d645695673349e3947e8e5ae42332d0ac3164cd7", "resolved_at_commit": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
lalinsky/python-phoenixdb
AvaticaClient.connection_sync
88
false
190
src/00190.py
pyc/00190.pyc
CODE <module>() RESUME 0 LOAD_CONST (None,) LOAD_CONST <code open_connection> MAKE_FUNCTION defaults STORE_NAME open_connection RETURN_CONST None END CODE open_connection(self, connection_id, info) DOC 'pass' RESUME 0 LOAD_GLOBAL requests_pb2 LOAD_ATTR NULL|self + OpenConnectionRequest CALL 0 ST...
def open_connection(self, connection_id, info=None): """pass""" request = requests_pb2.OpenConnectionRequest() request.connection_id = connection_id if info is not None: for k, v in info.items(): request.info[k] = v response_data = self._apply(request) response = responses_pb...
{ "repo": "lalinsky/python-phoenixdb", "repo_url": "https://github.com/lalinsky/python-phoenixdb", "file_path": "phoenixdb/avatica/client.py", "commit_sha": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "func_name": "AvaticaClient.open_connection", "line_start": 316, "line_end": 331, "permalink": "https:/...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "d645695673349e3947e8e5ae42332d0ac3164cd7", "resolved_at_commit": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
lalinsky/python-phoenixdb
AvaticaClient.open_connection
53
false
191
src/00191.py
pyc/00191.pyc
CODE <module>() RESUME 0 LOAD_CONST <code close_connection> MAKE_FUNCTION 0 STORE_NAME close_connection RETURN_CONST None END CODE close_connection(self, connection_id) DOC 'pass' RESUME 0 LOAD_GLOBAL requests_pb2 LOAD_ATTR NULL|self + CloseConnectionRequest CALL 0 STORE_FAST request LOAD_FAST c...
def close_connection(self, connection_id): """pass""" request = requests_pb2.CloseConnectionRequest() request.connection_id = connection_id self._apply(request)
{ "repo": "lalinsky/python-phoenixdb", "repo_url": "https://github.com/lalinsky/python-phoenixdb", "file_path": "phoenixdb/avatica/client.py", "commit_sha": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "func_name": "AvaticaClient.close_connection", "line_start": 333, "line_end": 341, "permalink": "https:...
{ "spdx": "Apache-2.0", "name": "Apache License 2.0", "file": "LICENSE", "blob_sha": "d645695673349e3947e8e5ae42332d0ac3164cd7", "resolved_at_commit": "1bb34488dd530ca65f91b29ef16aa7b71f26b806", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
lalinsky/python-phoenixdb
AvaticaClient.close_connection
23
false
192
src/00192.py
pyc/00192.pyc
CODE <module>() RESUME 0 LOAD_CONST <code fit> MAKE_FUNCTION 0 STORE_NAME fit RETURN_CONST None END CODE fit(self, X, y) DOC 'pass' RESUME 0 LOAD_FAST X LOAD_FAST self STORE_ATTR X LOAD_FAST y LOAD_FAST self STORE_ATTR y LOAD_GLOBAL NULL + hasattr LOAD_FAST self LOAD_ATTR gamma LOAD_CO...
def fit(self, X, y): """pass""" self.X = X self.y = y if hasattr(self.gamma, '__iter__'): self.gamma = self._optimize_gamma(self.gamma) return self
{ "repo": "wdm0006/sklearn-extensions", "repo_url": "https://github.com/wdm0006/sklearn-extensions", "file_path": "sklearn_extensions/kernel_regression/kr.py", "commit_sha": "329f3efdb8c3c3a367b264f7c76c76411a784530", "func_name": "KernelRegression.fit", "line_start": 46, "line_end": 68, "permalink": "h...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE.md", "blob_sha": "d3350961fd4640e0b5a181e46b26b67a1af719be", "resolved_at_commit": "329f3efdb8c3c3a367b264f7c76c76411a784530", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
wdm0006/sklearn-extensions
KernelRegression.fit
32
false
193
src/00193.py
pyc/00193.pyc
CODE <module>() RESUME 0 LOAD_CONST <code predict> MAKE_FUNCTION 0 STORE_NAME predict RETURN_CONST None END CODE predict(self, X) DOC 'pass' RESUME 0 LOAD_GLOBAL NULL + pairwise_kernels LOAD_FAST self LOAD_ATTR X LOAD_FAST X LOAD_FAST self LOAD_ATTR kernel LOAD_FAST self LOAD_ATTR gamma ...
def predict(self, X): """pass""" K = pairwise_kernels(self.X, X, metric=self.kernel, gamma=self.gamma) return (K * self.y[:, None]).sum(axis=0) / K.sum(axis=0)
{ "repo": "wdm0006/sklearn-extensions", "repo_url": "https://github.com/wdm0006/sklearn-extensions", "file_path": "sklearn_extensions/kernel_regression/kr.py", "commit_sha": "329f3efdb8c3c3a367b264f7c76c76411a784530", "func_name": "KernelRegression.predict", "line_start": 70, "line_end": 84, "permalink"...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE.md", "blob_sha": "d3350961fd4640e0b5a181e46b26b67a1af719be", "resolved_at_commit": "329f3efdb8c3c3a367b264f7c76c76411a784530", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
wdm0006/sklearn-extensions
KernelRegression.predict
42
false
194
src/00194.py
pyc/00194.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _compute_hidden_activations> MAKE_FUNCTION 0 STORE_NAME _compute_hidden_activations RETURN_CONST None END CODE _compute_hidden_activations(self, X) DOC 'pass' RESUME 0 LOAD_FAST self LOAD_ATTR NULL|self + _compute_input_activations LOAD_FAST X CALL 1 POP...
def _compute_hidden_activations(self, X): """pass""" self._compute_input_activations(X) acts = self.input_activations_ if callable(self.activation_func): args_dict = self.activation_args if self.activation_args else {} X_new = self.activation_func(acts, **args_dict) else: fun...
{ "repo": "wdm0006/sklearn-extensions", "repo_url": "https://github.com/wdm0006/sklearn-extensions", "file_path": "sklearn_extensions/extreme_learning_machines/random_layer.py", "commit_sha": "329f3efdb8c3c3a367b264f7c76c76411a784530", "func_name": "BaseRandomLayer._compute_hidden_activations", "line_start"...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE.md", "blob_sha": "d3350961fd4640e0b5a181e46b26b67a1af719be", "resolved_at_commit": "329f3efdb8c3c3a367b264f7c76c76411a784530", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
wdm0006/sklearn-extensions
BaseRandomLayer._compute_hidden_activations
66
false
195
src/00195.py
pyc/00195.pyc
CODE <module>() RESUME 0 LOAD_CONST (None,) LOAD_CONST <code transform> MAKE_FUNCTION defaults STORE_NAME transform RETURN_CONST None END CODE transform(self, X, y) DOC 'pass' RESUME 0 LOAD_FAST self LOAD_ATTR components_ POP_JUMP_IF_NOT_NONE L1 LOAD_GLOBAL NULL + ValueError LOAD_CONST 'No com...
def transform(self, X, y=None): """pass""" if self.components_ is None: raise ValueError('No components initialized') return self._compute_hidden_activations(X)
{ "repo": "wdm0006/sklearn-extensions", "repo_url": "https://github.com/wdm0006/sklearn-extensions", "file_path": "sklearn_extensions/extreme_learning_machines/random_layer.py", "commit_sha": "329f3efdb8c3c3a367b264f7c76c76411a784530", "func_name": "BaseRandomLayer.transform", "line_start": 114, "line_end...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE.md", "blob_sha": "d3350961fd4640e0b5a181e46b26b67a1af719be", "resolved_at_commit": "329f3efdb8c3c3a367b264f7c76c76411a784530", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
wdm0006/sklearn-extensions
BaseRandomLayer.transform
24
false
196
src/00196.py
pyc/00196.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _compute_radii> MAKE_FUNCTION 0 STORE_NAME _compute_radii RETURN_CONST None END CODE _compute_radii(self) DOC 'pass' RESUME 0 LOAD_FAST self LOAD_ATTR NULL|self + _get_user_components LOAD_CONST 'radii' CALL 1 STORE_FAST radii LOAD_FAST radii POP_JUM...
def _compute_radii(self): """pass""" radii = self._get_user_components('radii') if radii is None: centers = self.components_['centers'] n_centers = centers.shape[0] max_dist = np.max(pairwise_distances(centers)) radii = np.ones(n_centers) * max_dist / sqrt(2.0 * n_centers) ...
{ "repo": "wdm0006/sklearn-extensions", "repo_url": "https://github.com/wdm0006/sklearn-extensions", "file_path": "sklearn_extensions/extreme_learning_machines/random_layer.py", "commit_sha": "329f3efdb8c3c3a367b264f7c76c76411a784530", "func_name": "RandomLayer._compute_radii", "line_start": 280, "line_en...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE.md", "blob_sha": "d3350961fd4640e0b5a181e46b26b67a1af719be", "resolved_at_commit": "329f3efdb8c3c3a367b264f7c76c76411a784530", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
wdm0006/sklearn-extensions
RandomLayer._compute_radii
54
false
197
src/00197.py
pyc/00197.pyc
CODE <module>() RESUME 0 LOAD_CONST <code _compute_centers> MAKE_FUNCTION 0 STORE_NAME _compute_centers RETURN_CONST None END CODE _compute_centers(self, X, sparse, rs) DOC 'pass' MAKE_CELL max_dtype MAKE_CELL min_dtype RESUME 0 LOAD_FAST self LOAD_ATTR NULL|self + _get_user_components LOAD_CONS...
def _compute_centers(self, X, sparse, rs): """pass""" centers = self._get_user_components('centers') if centers is None: n_features = X.shape[1] if sparse: fxr = range(n_features) cols = [X.getcol(i) for i in fxr] min_dtype = X.dtype.type(10000000000.0) ...
{ "repo": "wdm0006/sklearn-extensions", "repo_url": "https://github.com/wdm0006/sklearn-extensions", "file_path": "sklearn_extensions/extreme_learning_machines/random_layer.py", "commit_sha": "329f3efdb8c3c3a367b264f7c76c76411a784530", "func_name": "RandomLayer._compute_centers", "line_start": 296, "line_...
{ "spdx": "BSD-3-Clause", "name": "BSD 3-Clause \"New\" or \"Revised\" License", "file": "LICENSE.md", "blob_sha": "d3350961fd4640e0b5a181e46b26b67a1af719be", "resolved_at_commit": "329f3efdb8c3c3a367b264f7c76c76411a784530", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
wdm0006/sklearn-extensions
RandomLayer._compute_centers
167
false
198
src/00198.py
pyc/00198.pyc
CODE <module>() RESUME 0 LOAD_CONST <code compat_serializer_check_is_valid> MAKE_FUNCTION 0 STORE_NAME compat_serializer_check_is_valid RETURN_CONST None END CODE compat_serializer_check_is_valid(serializer) DOC 'pass' RESUME 0 LOAD_GLOBAL DRFVLIST LOAD_CONST 0 BINARY_SUBSCR LOAD_CONST 3 COMPARE...
def compat_serializer_check_is_valid(serializer): """pass""" if DRFVLIST[0] >= 3: serializer.is_valid(raise_exception=True) elif not serializer.is_valid(): serializers.ValidationError('The serializer raises a validation error')
{ "repo": "raphaelgyory/django-rest-messaging", "repo_url": "https://github.com/raphaelgyory/django-rest-messaging", "file_path": "rest_messaging/compat.py", "commit_sha": "c9d5405fed7db2d79ec5c93c721a8fe42ea86958", "func_name": "compat_serializer_check_is_valid", "line_start": 23, "line_end": 29, "perm...
{ "spdx": "ISC", "name": "ISC License", "file": "LICENSE", "blob_sha": "3e0e440cd482259a10e1b71c29daf559ae9ab65f", "resolved_at_commit": "c9d5405fed7db2d79ec5c93c721a8fe42ea86958", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
raphaelgyory/django-rest-messaging
compat_serializer_check_is_valid
36
false
199
src/00199.py
pyc/00199.pyc
CODE <module>() RESUME 0 LOAD_CONST <code compat_serializer_attr> MAKE_FUNCTION 0 STORE_NAME compat_serializer_attr RETURN_CONST None END CODE compat_serializer_attr(serializer, obj) DOC 'pass' RESUME 0 LOAD_GLOBAL DRFVLIST LOAD_CONST 0 BINARY_SUBSCR LOAD_CONST 3 COMPARE_OP == POP_JUMP_IF_FALS...
def compat_serializer_attr(serializer, obj): """pass""" if DRFVLIST[0] == 3 and DRFVLIST[1] == 1: for i in serializer.instance: if i.id == obj.id: return i else: return obj
{ "repo": "raphaelgyory/django-rest-messaging", "repo_url": "https://github.com/raphaelgyory/django-rest-messaging", "file_path": "rest_messaging/compat.py", "commit_sha": "c9d5405fed7db2d79ec5c93c721a8fe42ea86958", "func_name": "compat_serializer_attr", "line_start": 40, "line_end": 50, "permalink": "h...
{ "spdx": "ISC", "name": "ISC License", "file": "LICENSE", "blob_sha": "3e0e440cd482259a10e1b71c29daf559ae9ab65f", "resolved_at_commit": "c9d5405fed7db2d79ec5c93c721a8fe42ea86958", "resolved_via": "GitHub GET /repos/{repo}/license?ref={sha}" }
raphaelgyory/django-rest-messaging
compat_serializer_attr
46
false