index int64 | statement_id int64 | statement string | lineno int64 | end_lineno int64 | comprehension_types list | metadata dict |
|---|---|---|---|---|---|---|
347 | 1 | combined = '|'.join('(^%s$)' % flatpat for flatpat in combined) | 409 | 409 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 2 | rules = [(target, getargs) for (_, _, target, getargs) in some] | 411 | 411 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 3 | url = ''.join([f(query.pop(n)) if n else f for (n,f) in builder]) | 420 | 420 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 4 | return dict((name, []) for name in self.__hook_names) | 612 | 612 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 5 | return [hook(*args, **kwargs) for hook in self._hooks[__name][:]] | 637 | 637 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 6 | segments = [p for p in prefix.split('/') if p] | 657 | 657 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 7 | return FormsDict((c.key, c.value) for c in cookies) | 1,044 | 1,044 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 8 | return [ip.strip() for ip in proxy.split(',')] | 1,336 | 1,336 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 9 | copy._headers = dict((k, v[:]) for (k, v) in self._headers.items()) | 1,460 | 1,460 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 10 | headers = [h for h in headers if h[0] not in bad_headers] | 1,547 | 1,547 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 11 | out += [(name, val) for (name, vals) in headers for val in vals] | 1,548 | 1,548 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 12 | out = [
(k, v.encode('utf8').decode('latin1')
if isinstance(v, unicode) else v) for (k, v) in out] | 1,553 | 1,555 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 13 | self.dict = dict((k, [v]) for (k, v) in dict(*a, **k).items()) | 1,797 | 1,797 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 14 | return (v[-1] for v in self.dict.values()) | 1,808 | 1,808 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 15 | return ((k, v[-1]) for k, v in self.dict.items()) | 1,809 | 1,809 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 16 | return ((k, v) for k, vl in self.dict.items() for v in vl) | 1,811 | 1,811 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 17 | return [v[-1] for v in self.dict.values()] | 1,818 | 1,818 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 18 | return [(k, v[-1]) for k, v in self.dict.items()] | 1,819 | 1,819 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 19 | return (v[-1] for v in self.dict.itervalues()) | 1,821 | 1,821 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 20 | return ((k, v[-1]) for k, v in self.dict.iteritems()) | 1,823 | 1,823 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 21 | return ((k, v) for k, vl in self.dict.iteritems() for v in vl) | 1,825 | 1,825 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 22 | return [(k, v) for k, vl in self.dict.iteritems() for v in vl] | 1,827 | 1,827 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 23 | for name in [_hkey(n) for n in names]:
if name in self.dict:
del self.dict[name] | 1,928 | 1,930 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 24 | return [x for x in self] | 1,982 | 1,982 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 25 | ranges = [r.split('-', 1) for r in header[6:].split(',') if '-' in r] | 2,419 | 2,419 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 26 | return not sum(0 if x==y else 1 for x, y in zip(a, b)) and len(a) == len(b) | 2,447 | 2,447 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 27 | args = ', '.join(['%s=%s'%(k,repr(v)) for k, v in self.options.items()]) | 2,594 | 2,594 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 28 | self.lookup = [os.path.abspath(x) for x in lookup] if lookup else [] | 3,092 | 3,092 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 29 | patterns = [re.compile(p%pattern_vars) for p in patterns] | 3,331 | 3,331 | [
"ListComp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
347 | 30 | _HTTP_STATUS_LINES = dict((k, '%d %s'%(k,v)) for (k,v) in HTTP_CODES.items()) | 3,507 | 3,507 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
349 | 0 | self.assertItemsEqual([item["name"] for item in comp1Res], ["testComponent1", "testComponent1"]) | 77 | 77 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 1 | self.assertItemsEqual([item["worker_name"] for item in comp1Res], ["testWorker1", "testWorker2"]) | 78 | 78 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 2 | self.assertItemsEqual([item["state"] for item in comp1Res], ["Running", "Running"]) | 79 | 79 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 3 | self.assertItemsEqual([item["poll_interval"] for item in comp1Res], [60, 60]) | 80 | 80 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 4 | self.assertItemsEqual([item["update_threshold"] for item in comp1Res], [600, 600]) | 81 | 81 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 5 | self.assertItemsEqual([item["name"] for item in comp2Res], ["testComponent2"]) | 83 | 83 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 6 | self.assertItemsEqual([item["worker_name"] for item in comp2Res], ["testWorker21"]) | 84 | 84 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 7 | self.assertItemsEqual([item["state"] for item in comp2Res], ["Running"]) | 85 | 85 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 8 | self.assertItemsEqual([item["poll_interval"] for item in comp2Res], [30]) | 86 | 86 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 9 | self.assertItemsEqual([item["update_threshold"] for item in comp2Res], [300]) | 87 | 87 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 10 | self.assertItemsEqual([item["outcome"] for item in hb1], [None, None]) | 114 | 114 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
349 | 11 | self.assertItemsEqual([item["error_message"] for item in hb1], [None, None]) | 115 | 115 | [
"ListComp"
] | {
"hexsha": "f700ea04bf267c3ec13cb8c096e3f4f44d7fe2b7",
"max_stars_repo_name": "khurtado/WMCore",
"max_stars_repo_path": "test/python/WMCore_t/Agent_t/Heartbeat_t.py",
"lang": "Python"
} |
358 | 0 | devices = [dev for dev in devices if not self.xpub_by_id(dev.id_)] | 512 | 512 | [
"ListComp"
] | {
"hexsha": "f700f07327077fff3b3292329ec22f08ef94b3ab",
"max_stars_repo_name": "david4neblio/electrum-mona",
"max_stars_repo_path": "electrum_mona/plugin.py",
"lang": "Python"
} |
358 | 1 | descriptions = [str(info.label) + ' (%s)'%(_("initialized") if info.initialized else _("wiped")) for info in infos] | 557 | 557 | [
"ListComp"
] | {
"hexsha": "f700f07327077fff3b3292329ec22f08ef94b3ab",
"max_stars_repo_name": "david4neblio/electrum-mona",
"max_stars_repo_path": "electrum_mona/plugin.py",
"lang": "Python"
} |
358 | 2 | pairs = [(dev.path, dev.id_) for dev in devices] | 613 | 613 | [
"ListComp"
] | {
"hexsha": "f700f07327077fff3b3292329ec22f08ef94b3ab",
"max_stars_repo_name": "david4neblio/electrum-mona",
"max_stars_repo_path": "electrum_mona/plugin.py",
"lang": "Python"
} |
367 | 0 | assert all(n == "div" for n in rects["name"]) | 30 | 30 | [
"GeneratorExp"
] | {
"hexsha": "f700f3f235ce44f72728af90479dc63e15aa97b8",
"max_stars_repo_name": "edyounis/distributed",
"max_stars_repo_path": "distributed/diagnostics/tests/test_task_stream.py",
"lang": "Python"
} |
367 | 1 | assert all(d > 0 for d in rects["duration"]) | 31 | 31 | [
"GeneratorExp"
] | {
"hexsha": "f700f3f235ce44f72728af90479dc63e15aa97b8",
"max_stars_repo_name": "edyounis/distributed",
"max_stars_repo_path": "distributed/diagnostics/tests/test_task_stream.py",
"lang": "Python"
} |
367 | 2 | assert all(len(L) == 3 for L in rects.values()) | 38 | 38 | [
"GeneratorExp"
] | {
"hexsha": "f700f3f235ce44f72728af90479dc63e15aa97b8",
"max_stars_repo_name": "edyounis/distributed",
"max_stars_repo_path": "distributed/diagnostics/tests/test_task_stream.py",
"lang": "Python"
} |
368 | 0 | labels_set = {label.name for label in labels} if labels is not None else {} | 245 | 245 | [
"SetComp"
] | {
"hexsha": "f700f4bd539b8bf548a33cc2116e009d6b138a96",
"max_stars_repo_name": "vraoresearch/openvino_training_extensions",
"max_stars_repo_path": "ote_sdk/ote_sdk/entities/dataset_item.py",
"lang": "Python"
} |
368 | 1 | shape_labels = [
label for label in shape_labels if label.name in labels_set
] | 256 | 258 | [
"ListComp"
] | {
"hexsha": "f700f4bd539b8bf548a33cc2116e009d6b138a96",
"max_stars_repo_name": "vraoresearch/openvino_training_extensions",
"max_stars_repo_path": "ote_sdk/ote_sdk/entities/dataset_item.py",
"lang": "Python"
} |
368 | 2 | validated_annotations = [
Annotation(
shape=annotation.shape.normalize_wrt_roi_shape(roi_as_box),
labels=annotation.get_labels(),
)
for annotation in annotations
if ShapeFactory().shape_produces_valid_crop(
shape=annotation.... | 280 | 291 | [
"ListComp"
] | {
"hexsha": "f700f4bd539b8bf548a33cc2116e009d6b138a96",
"max_stars_repo_name": "vraoresearch/openvino_training_extensions",
"max_stars_repo_path": "ote_sdk/ote_sdk/entities/dataset_item.py",
"lang": "Python"
} |
368 | 3 | scored_label_set = set(
itertools.chain(
*[annotation.get_labels(include_empty) for annotation in annotations]
)
) | 332 | 336 | [
"ListComp"
] | {
"hexsha": "f700f4bd539b8bf548a33cc2116e009d6b138a96",
"max_stars_repo_name": "vraoresearch/openvino_training_extensions",
"max_stars_repo_path": "ote_sdk/ote_sdk/entities/dataset_item.py",
"lang": "Python"
} |
368 | 4 | label_set = {scored_label.get_label() for scored_label in scored_label_set} | 337 | 337 | [
"SetComp"
] | {
"hexsha": "f700f4bd539b8bf548a33cc2116e009d6b138a96",
"max_stars_repo_name": "vraoresearch/openvino_training_extensions",
"max_stars_repo_path": "ote_sdk/ote_sdk/entities/dataset_item.py",
"lang": "Python"
} |
368 | 5 | return [label for label in label_set if label in labels] | 341 | 341 | [
"ListComp"
] | {
"hexsha": "f700f4bd539b8bf548a33cc2116e009d6b138a96",
"max_stars_repo_name": "vraoresearch/openvino_training_extensions",
"max_stars_repo_path": "ote_sdk/ote_sdk/entities/dataset_item.py",
"lang": "Python"
} |
368 | 6 | return [
meta
for meta in self.metadata
if meta.data.name == name and meta.model == model
] | 436 | 440 | [
"ListComp"
] | {
"hexsha": "f700f4bd539b8bf548a33cc2116e009d6b138a96",
"max_stars_repo_name": "vraoresearch/openvino_training_extensions",
"max_stars_repo_path": "ote_sdk/ote_sdk/entities/dataset_item.py",
"lang": "Python"
} |
371 | 0 | newNums = [nums + [i] for i in candidates] | 25 | 25 | [
"ListComp"
] | {
"hexsha": "f700f64d326367612e46eead5f8b7101bfc54b8e",
"max_stars_repo_name": "phenix3443/leetcode",
"max_stars_repo_path": "39-combination-sum/solution.py",
"lang": "Python"
} |
371 | 1 | return [list(nums) for nums in result] | 35 | 35 | [
"ListComp"
] | {
"hexsha": "f700f64d326367612e46eead5f8b7101bfc54b8e",
"max_stars_repo_name": "phenix3443/leetcode",
"max_stars_repo_path": "39-combination-sum/solution.py",
"lang": "Python"
} |
371 | 2 | return [list(nums) for nums in result] | 59 | 59 | [
"ListComp"
] | {
"hexsha": "f700f64d326367612e46eead5f8b7101bfc54b8e",
"max_stars_repo_name": "phenix3443/leetcode",
"max_stars_repo_path": "39-combination-sum/solution.py",
"lang": "Python"
} |
373 | 0 | ri_calculation = any([keywords.get(ri_kw, False) for ri_kw in KEYWORDS["ri"]]) | 145 | 145 | [
"ListComp"
] | {
"hexsha": "f700f699c24a7decc3d4d0de8d4c7caa6080333a",
"max_stars_repo_name": "kexul/QCEngine",
"max_stars_repo_path": "qcengine/programs/turbomole/runner.py",
"lang": "Python"
} |
374 | 0 | datetimes = [instant.next_datetime() for instant in self._schedule.instants()] | 33 | 33 | [
"ListComp"
] | {
"hexsha": "f700f6f6992552d2b05a043e6c989920e50c2f1a",
"max_stars_repo_name": "StefanoFrazzetto/symbiotic",
"max_stars_repo_path": "symbiotic/actions.py",
"lang": "Python"
} |
378 | 0 | return_x = [self._get_transform(o, self.x_tfms) for o in batch_x] | 54 | 54 | [
"ListComp"
] | {
"hexsha": "f700f8db77ef5e63af48fd81de77ff3b4c152594",
"max_stars_repo_name": "huylb314/AVIAD_AVIJST",
"max_stars_repo_path": "avijst/tensorflow/data.py",
"lang": "Python"
} |
378 | 1 | return_y = [self._get_transform(o, self.y_tfms) for o in batch_y] | 56 | 56 | [
"ListComp"
] | {
"hexsha": "f700f8db77ef5e63af48fd81de77ff3b4c152594",
"max_stars_repo_name": "huylb314/AVIAD_AVIJST",
"max_stars_repo_path": "avijst/tensorflow/data.py",
"lang": "Python"
} |
392 | 0 | self.dataset.prefetch([i for s in batches for i in s]) | 365 | 365 | [
"ListComp"
] | {
"hexsha": "f701031bd231b0e34d374a632472743d709b8fc1",
"max_stars_repo_name": "ofirpress/shortformer",
"max_stars_repo_path": "fairseq/data/iterators.py",
"lang": "Python"
} |
392 | 1 | itr = [x for x in itertools.chain(*itertools.zip_longest(*all_itrs)) if x is not None] | 474 | 474 | [
"ListComp"
] | {
"hexsha": "f701031bd231b0e34d374a632472743d709b8fc1",
"max_stars_repo_name": "ofirpress/shortformer",
"max_stars_repo_path": "fairseq/data/iterators.py",
"lang": "Python"
} |
392 | 2 | itr = [itr[i:i+batch_size] for i in range(0, len(itr), batch_size)] | 475 | 475 | [
"ListComp"
] | {
"hexsha": "f701031bd231b0e34d374a632472743d709b8fc1",
"max_stars_repo_name": "ofirpress/shortformer",
"max_stars_repo_path": "fairseq/data/iterators.py",
"lang": "Python"
} |
392 | 3 | to_add = [[e] for e in range(sharded_len-to_add, sharded_len)] | 480 | 480 | [
"ListComp"
] | {
"hexsha": "f701031bd231b0e34d374a632472743d709b8fc1",
"max_stars_repo_name": "ofirpress/shortformer",
"max_stars_repo_path": "fairseq/data/iterators.py",
"lang": "Python"
} |
393 | 0 | ndx_ind = [int(elem) for elem in ndx_ind] | 19 | 19 | [
"ListComp"
] | {
"hexsha": "f70103317a07a6f7d5eeac3ff180b3d79a0fc6b7",
"max_stars_repo_name": "fio2003/GPA_star",
"max_stars_repo_path": "gen_ndx_for_h.py",
"lang": "Python"
} |
393 | 1 | filtered_h_ind = [elem for elem in ndx_ind if elem in good_ind] | 22 | 22 | [
"ListComp"
] | {
"hexsha": "f70103317a07a6f7d5eeac3ff180b3d79a0fc6b7",
"max_stars_repo_name": "fio2003/GPA_star",
"max_stars_repo_path": "gen_ndx_for_h.py",
"lang": "Python"
} |
393 | 2 | formated_h_ind = ['{:>4} '.format(elem) for elem in filtered_h_ind] | 23 | 23 | [
"ListComp"
] | {
"hexsha": "f70103317a07a6f7d5eeac3ff180b3d79a0fc6b7",
"max_stars_repo_name": "fio2003/GPA_star",
"max_stars_repo_path": "gen_ndx_for_h.py",
"lang": "Python"
} |
398 | 0 | custom_ua_list = ["/".join(client_info) for client_info in self.custom_user_agent] | 30 | 30 | [
"ListComp"
] | {
"hexsha": "f70107c16aa8da73270e2e4f859fa54ad72fc815",
"max_stars_repo_name": "MicahLyle/python-slackclient",
"max_stars_repo_path": "slackclient/slackrequest.py",
"lang": "Python"
} |
405 | 0 | X = np.hstack([np.linspace(low, high, num_samples // reps)]
for _ in range(reps)) | 60 | 61 | [
"GeneratorExp"
] | {
"hexsha": "f7010bd75a5a5416d81aa889093286f6e47a1c7d",
"max_stars_repo_name": "fedarko/songbird",
"max_stars_repo_path": "songbird/util.py",
"lang": "Python"
} |
405 | 1 | table = np.vstack(
state.multinomial(n[i], probs[i, :])
for i in range(N)
).T | 67 | 70 | [
"GeneratorExp"
] | {
"hexsha": "f7010bd75a5a5416d81aa889093286f6e47a1c7d",
"max_stars_repo_name": "fedarko/songbird",
"max_stars_repo_path": "songbird/util.py",
"lang": "Python"
} |
405 | 2 | samp_ids = pd.Index(['S%d' % i for i in range(num_samples)],
name='sampleid') | 72 | 73 | [
"ListComp"
] | {
"hexsha": "f7010bd75a5a5416d81aa889093286f6e47a1c7d",
"max_stars_repo_name": "fedarko/songbird",
"max_stars_repo_path": "songbird/util.py",
"lang": "Python"
} |
405 | 3 | feat_ids = ['F%d' % i for i in range(num_features)] | 74 | 74 | [
"ListComp"
] | {
"hexsha": "f7010bd75a5a5416d81aa889093286f6e47a1c7d",
"max_stars_repo_name": "fedarko/songbird",
"max_stars_repo_path": "songbird/util.py",
"lang": "Python"
} |
405 | 4 | balance_ids = ['L%d' % i for i in range(num_features-1)] | 75 | 75 | [
"ListComp"
] | {
"hexsha": "f7010bd75a5a5416d81aa889093286f6e47a1c7d",
"max_stars_repo_name": "fedarko/songbird",
"max_stars_repo_path": "songbird/util.py",
"lang": "Python"
} |
405 | 5 | return [xs[metadata.index.get_loc(x)] for x in xs] | 167 | 167 | [
"ListComp"
] | {
"hexsha": "f7010bd75a5a5416d81aa889093286f6e47a1c7d",
"max_stars_repo_name": "fedarko/songbird",
"max_stars_repo_path": "songbird/util.py",
"lang": "Python"
} |
408 | 0 | module.author_ids = [x.id for x in authors] | 157 | 157 | [
"ListComp"
] | {
"hexsha": "f7010e9f11d3af9bdc7566f2be0adab9c6000069",
"max_stars_repo_name": "odoochain/addons_oca",
"max_stars_repo_path": "addons14/github_connector_odoo/models/odoo_module.py",
"lang": "Python"
} |
408 | 1 | module.author_ids_description = ", ".join(sorted([x.name for x in authors])) | 158 | 158 | [
"ListComp"
] | {
"hexsha": "f7010e9f11d3af9bdc7566f2be0adab9c6000069",
"max_stars_repo_name": "odoochain/addons_oca",
"max_stars_repo_path": "addons14/github_connector_odoo/models/odoo_module.py",
"lang": "Python"
} |
408 | 2 | module.organization_serie_ids = [x.id for x in organization_series] | 167 | 167 | [
"ListComp"
] | {
"hexsha": "f7010e9f11d3af9bdc7566f2be0adab9c6000069",
"max_stars_repo_name": "odoochain/addons_oca",
"max_stars_repo_path": "addons14/github_connector_odoo/models/odoo_module.py",
"lang": "Python"
} |
408 | 3 | module.organization_serie_ids_description = " - ".join(
[x.name for x in sorted(organization_series, key=lambda x: x.sequence)]
) | 168 | 170 | [
"ListComp"
] | {
"hexsha": "f7010e9f11d3af9bdc7566f2be0adab9c6000069",
"max_stars_repo_name": "odoochain/addons_oca",
"max_stars_repo_path": "addons14/github_connector_odoo/models/odoo_module.py",
"lang": "Python"
} |
408 | 4 | return [(module.id, module.technical_name) for module in self] | 181 | 181 | [
"ListComp"
] | {
"hexsha": "f7010e9f11d3af9bdc7566f2be0adab9c6000069",
"max_stars_repo_name": "odoochain/addons_oca",
"max_stars_repo_path": "addons14/github_connector_odoo/models/odoo_module.py",
"lang": "Python"
} |
410 | 0 | s = tvm.create_schedule([x.op for x in outs]) | 178 | 178 | [
"ListComp"
] | {
"hexsha": "f701108071e5e40645215cbd4bf739ccb6950fce",
"max_stars_repo_name": "byungchul/tvm",
"max_stars_repo_path": "topi/python/topi/x86/conv2d_int8.py",
"lang": "Python"
} |
410 | 1 | s = tvm.create_schedule([x.op for x in outs]) | 219 | 219 | [
"ListComp"
] | {
"hexsha": "f701108071e5e40645215cbd4bf739ccb6950fce",
"max_stars_repo_name": "byungchul/tvm",
"max_stars_repo_path": "topi/python/topi/x86/conv2d_int8.py",
"lang": "Python"
} |
416 | 0 | return [layersNames[i[0] - 1] for i in net.getUnconnectedOutLayers()] | 50 | 50 | [
"ListComp"
] | {
"hexsha": "f70113c43d8703cf4d54d5b5d27b33e786dc3768",
"max_stars_repo_name": "JaeyoonSSim/Design-Project",
"max_stars_repo_path": "Detector_1/fusion_detecting.py",
"lang": "Python"
} |
434 | 0 | new_mol = [indices_token[str(int(x))] for x in seq] | 34 | 34 | [
"ListComp"
] | {
"hexsha": "f70122a218251691a381f37023a3eb25286312ae",
"max_stars_repo_name": "grisoniFr/virtual_libraries",
"max_stars_repo_path": "experiments/do_data_generation.py",
"lang": "Python"
} |
436 | 0 | return torch.cat([net(x) for net in self.nets], dim=1, **self.extra_params) | 43 | 43 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 1 | self.num_priors = sum(len(x)*len(scales) for x in aspect_ratios) | 78 | 78 | [
"GeneratorExp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 2 | return nn.Sequential(*sum([[
nn.Conv2d(out_channels, out_channels, kernel_size=3, padding=1),
nn.ReLU(inplace=True)
] for _ in range(num_layers)], [])) | 116 | 119 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 3 | self.bbox_extra, self.conf_extra, self.mask_extra = [make_extra(x) for x in cfg.extra_layers] | 121 | 121 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 4 | self.lat_layers = nn.ModuleList([
nn.Conv2d(x, cfg.fpn.num_features, kernel_size=1)
for x in reversed(in_channels)
]) | 286 | 289 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 5 | self.pred_layers = nn.ModuleList([
nn.Conv2d(cfg.fpn.num_features, cfg.fpn.num_features, kernel_size=3, padding=padding)
for _ in in_channels
]) | 293 | 296 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 6 | self.downsample_layers = nn.ModuleList([
nn.Conv2d(cfg.fpn.num_features, cfg.fpn.num_features, kernel_size=3, padding=1, stride=2)
for _ in range(cfg.fpn.num_downsample)
]) | 299 | 302 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 7 | self.fpn = FPN([src_channels[i] for i in self.selected_layers]) | 440 | 440 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 8 | outs = [outs[i] for i in cfg.backbone.selected_layers] | 583 | 583 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
436 | 9 | bias_shape = [x for x in proto_out.size()] | 609 | 609 | [
"ListComp"
] | {
"hexsha": "f701237fe9e15e39fca212a577bb10928413d4e7",
"max_stars_repo_name": "JosmarSuarez/yolact",
"max_stars_repo_path": "yolact.py",
"lang": "Python"
} |
448 | 0 | PRIVACY_ALPHAS = [1 + x / 10.0 for x in range(1, 100)] + list(range(12, 64)) | 17 | 17 | [
"ListComp"
] | {
"hexsha": "f7012832763745f5716873aa165b3bd66774aa82",
"max_stars_repo_name": "RQuispeC/opacus",
"max_stars_repo_path": "opacus/tests/ddp_hook_check.py",
"lang": "Python"
} |
448 | 1 | remaining_hooks["attached"] = {
p: p._backward_hooks for p in engine.module.parameters() if p._backward_hooks
} | 195 | 197 | [
"DictComp"
] | {
"hexsha": "f7012832763745f5716873aa165b3bd66774aa82",
"max_stars_repo_name": "RQuispeC/opacus",
"max_stars_repo_path": "opacus/tests/ddp_hook_check.py",
"lang": "Python"
} |
448 | 2 | remaining_hooks["detached"] = {
p: p._backward_hooks for p in engine.module.parameters() if p._backward_hooks
} | 200 | 202 | [
"DictComp"
] | {
"hexsha": "f7012832763745f5716873aa165b3bd66774aa82",
"max_stars_repo_name": "RQuispeC/opacus",
"max_stars_repo_path": "opacus/tests/ddp_hook_check.py",
"lang": "Python"
} |
456 | 0 | self.mbar.write([f'{l:.6f}' if isinstance(l, float) else str(l) for l in log], table=True) | 44 | 44 | [
"ListComp"
] | {
"hexsha": "f7012caea091390e3c93212966f0b19844281957",
"max_stars_repo_name": "Tato14/fastai2",
"max_stars_repo_path": "fastai2/callback/progress.py",
"lang": "Python"
} |
456 | 1 | val_losses = [v[1] for v in rec.values] | 83 | 83 | [
"ListComp"
] | {
"hexsha": "f7012caea091390e3c93212966f0b19844281957",
"max_stars_repo_name": "Tato14/fastai2",
"max_stars_repo_path": "fastai2/callback/progress.py",
"lang": "Python"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.