index
int64
statement_id
int64
statement
string
lineno
int64
end_lineno
int64
comprehension_types
list
metadata
dict
456
2
self.file.write(','.join([str(t) for t in log]) + '\n')
108
108
[ "ListComp" ]
{ "hexsha": "f7012caea091390e3c93212966f0b19844281957", "max_stars_repo_name": "Tato14/fastai2", "max_stars_repo_path": "fastai2/callback/progress.py", "lang": "Python" }
462
0
refs = set([r.strip() for r in refnames.strip("()").split(",")])
180
180
[ "ListComp" ]
{ "hexsha": "f701300168d70aab345ae6b11215023d9be8143b", "max_stars_repo_name": "psyplot/ci-release-test", "max_stars_repo_path": "release_test/_version.py", "lang": "Python" }
462
1
tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)])
184
184
[ "ListComp" ]
{ "hexsha": "f701300168d70aab345ae6b11215023d9be8143b", "max_stars_repo_name": "psyplot/ci-release-test", "max_stars_repo_path": "release_test/_version.py", "lang": "Python" }
462
2
tags = set([r for r in refs if re.search(r'\d', r)])
193
193
[ "ListComp" ]
{ "hexsha": "f701300168d70aab345ae6b11215023d9be8143b", "max_stars_repo_name": "psyplot/ci-release-test", "max_stars_repo_path": "release_test/_version.py", "lang": "Python" }
465
0
if ( exc and exc.messages and isinstance(exc.messages, dict) and all([key is None for key in exc.messages.keys()]) ): exc.messages = list(itertools.chain.from_iterable(exc.messages.values()))
1,163
1,169
[ "ListComp" ]
{ "hexsha": "f70131b5a4b1638a0ebec960b0e6d3ac3970019e", "max_stars_repo_name": "annuupadhyayPS/great_expectations", "max_stars_repo_path": "great_expectations/data_context/types/base.py", "lang": "Python" }
465
1
if data["config_version"] == 0 and any( [ store_config["class_name"] == "ValidationsStore" for store_config in data["stores"].values() ] ): raise ge_exceptions.UnsupportedConfigVersionError( "You appear to be using a config vers...
1,194
1,202
[ "ListComp" ]
{ "hexsha": "f70131b5a4b1638a0ebec960b0e6d3ac3970019e", "max_stars_repo_name": "annuupadhyayPS/great_expectations", "max_stars_repo_path": "great_expectations/data_context/types/base.py", "lang": "Python" }
465
2
if data["config_version"] < CURRENT_GE_CONFIG_VERSION and ( "checkpoint_store_name" in data or any( [ store_config["class_name"] == "CheckpointStore" for store_config in data["stores"].values() ] ) ): ...
1,220
1,238
[ "ListComp" ]
{ "hexsha": "f70131b5a4b1638a0ebec960b0e6d3ac3970019e", "max_stars_repo_name": "annuupadhyayPS/great_expectations", "max_stars_repo_path": "great_expectations/data_context/types/base.py", "lang": "Python" }
465
3
base_action_list_dict = {action["name"]: action for action in base_action_list}
2,233
2,233
[ "DictComp" ]
{ "hexsha": "f70131b5a4b1638a0ebec960b0e6d3ac3970019e", "max_stars_repo_name": "annuupadhyayPS/great_expectations", "max_stars_repo_path": "great_expectations/data_context/types/base.py", "lang": "Python" }
469
0
fscps = [io.open(scp, "r", encoding="utf-8") for scp in args.scp]
34
34
[ "ListComp" ]
{ "hexsha": "f701331f418b271808b257dda1cf537ba3ca9082", "max_stars_repo_name": "texpomru13/espnet", "max_stars_repo_path": "utils/mix-mono-wav-scp.py", "lang": "Python" }
469
1
if not all(k == keys[0] for k in keys): raise RuntimeError( "The ids mismatch. Hint; the input files must be " "sorted and must have same ids: {}".format(keys) )
54
58
[ "GeneratorExp" ]
{ "hexsha": "f701331f418b271808b257dda1cf537ba3ca9082", "max_stars_repo_name": "texpomru13/espnet", "max_stars_repo_path": "utils/mix-mono-wav-scp.py", "lang": "Python" }
469
2
args.out.write( "{} sox -M {} -c {} -t wav - |\n".format( keys[0], " ".join("{}".format(w) for w in wavs), len(fscps) ) )
60
64
[ "GeneratorExp" ]
{ "hexsha": "f701331f418b271808b257dda1cf537ba3ca9082", "max_stars_repo_name": "texpomru13/espnet", "max_stars_repo_path": "utils/mix-mono-wav-scp.py", "lang": "Python" }
472
0
word = [e for e in self.db.entries.values() if a in e.searchaffixes]
71
72
[ "ListComp" ]
{ "hexsha": "f7013540106d82345f673369326f21c8329a90c1", "max_stars_repo_name": "lojban/vlasisku", "max_stars_repo_path": "vlasisku/models.py", "lang": "Python" }
480
0
chars = [random.choice(ascii_letters + digits) for _ in range(15)]
429
429
[ "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
1
settings['FEEDS'] = { urljoin('file:', pathname2url(str(file_path))): feed for file_path, feed in FEEDS.items() }
438
441
[ "DictComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
2
parsed = [json.loads(to_unicode(line)) for line in data['jl'].splitlines()]
523
523
[ "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
3
rows = [{k: v for k, v in row.items() if v} for row in rows]
524
524
[ "DictComp", "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
4
rows = [{k: v for k, v in row.items() if v} for row in rows]
536
536
[ "DictComp", "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
5
got_rows = [{e.tag: e.text for e in it} for it in root.findall('item')]
538
538
[ "DictComp", "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
6
rows = [{k: v for k, v in row.items() if v} for row in rows]
551
551
[ "DictComp", "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
7
xml_rows = [{e.tag: e.text for e in it} for it in root.findall('item')]
554
554
[ "DictComp", "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
8
expected = [{k: v for k, v in row.items() if v} for row in rows]
581
581
[ "DictComp", "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
9
expected = [{k: v for k, v in row.items() if v} for row in rows]
595
595
[ "DictComp", "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
480
10
rows_jl = [dict(row) for row in items]
696
696
[ "ListComp" ]
{ "hexsha": "f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0", "max_stars_repo_name": "KevvKo/scrapy", "max_stars_repo_path": "tests/test_feedexport.py", "lang": "Python" }
485
0
def recipe(request): return os.path.join(metadata_dir, request.param)
80
81
[ "ListComp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
1
contents = [p.strip().decode('utf-8') for p in has_prefix.readlines()]
703
704
[ "ListComp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
2
matches = [entry for entry in contents if entry.endswith('binary-has-prefix') or entry.endswith('"binary-has-prefix"')]
706
707
[ "ListComp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
3
contents = [p.strip().decode('utf-8') for p in has_prefix.readlines()]
719
720
[ "ListComp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
4
matches = [entry for entry in contents if entry.endswith('binary-has-prefix') or entry.endswith('"binary-has-prefix"')]
722
723
[ "ListComp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
5
output = [os.path.join(os.getcwd(), path, 'meta.yaml') for path in files]
789
789
[ "ListComp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
6
assert any('strong_pinned_package 1.0' in req for req in m.meta['requirements']['host'])
912
912
[ "GeneratorExp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
7
assert any(re.match(r'run_exports_subpkg 1.0 h[a-f0-9]{%s}_0' % testing_config.hash_length, req) for (m, _, _) in ms for req in m.meta['requirements']['run'])
934
936
[ "GeneratorExp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
8
assert not any_locks, "remaining locks:\n{}".format('\n'.join('->'.join((l, r)) for (l, r) in locks_list))
1,017
1,018
[ "GeneratorExp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
9
files = [filename for _, _, filenames in os.walk(git_cache_directory) for filename in filenames]
1,141
1,142
[ "ListComp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
485
10
assert not any(re.search('python\s+[23]\.', dep) for dep in m.meta['requirements']['run'])
1,174
1,174
[ "GeneratorExp" ]
{ "hexsha": "f7013ee950543f8a9cca0d5c76ee787cb943881b", "max_stars_repo_name": "eklitzke/conda-build", "max_stars_repo_path": "tests/test_api_build.py", "lang": "Python" }
487
0
until_time = [int(s.strip()) for s in values['Time_{}'.format(i + 1)].split(":") if s.strip().isdigit()]
192
194
[ "ListComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
1
if any([spe in field.lower() for spe in field_sets]): f_set, hour, minute, value = self.field_interpreter(field) if f_set.lower() == 'through': # main condition. All sub-conditions must obey a # `Through` condition # First, in...
390
502
[ "ListComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
2
ep_day = self.idf.add_object( ep_object='Schedule:Day:Hourly'.upper(), save=False, **dict(Name=name, Schedule_Type_Limits_Name=self.schType, **{'Hour_{}'.format(i + 1): unique_day[i] for i in range(24...
743
750
[ "DictComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
3
ep_week = self.idf.add_object( ep_object='Schedule:Week:Daily'.upper(), save=False, **dict(Name=week_id, **{'{}_ScheduleDay_Name'.format( weekday): dict_week[week_id][ 'day_{}'.format(i)] for ...
786
806
[ "DictComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
4
bincount = [sum(1 for _ in group) for key, group in itertools.groupby(nws + 1) if key]
812
813
[ "GeneratorExp", "ListComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
5
week_order = {i: v for i, v in enumerate(np.array( [key for key, group in itertools.groupby(nws + 1) if key]) - 1)}
814
815
[ "DictComp", "ListComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
6
date = [day for week in monthcal for day in week if \ day.weekday() == dayofweek and \ day.month == month][nth]
926
928
[ "ListComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
7
dd = [dd for dd in dds if dd.Special_Day_Type.lower() == field or dd.Special_Day_Type.lower() in special_day_types]
1,060
1,061
[ "ListComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
8
dd = [dd for dd in dds if dd.Day_Type.lower() == field]
1,090
1,090
[ "ListComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
487
9
date = '/'.join([str(item).zfill(2) for item in data])
1,095
1,095
[ "ListComp" ]
{ "hexsha": "f7013f89ddf7249cb8c21753c974a4e817c0eaa2", "max_stars_repo_name": "brunomarct/archetypal", "max_stars_repo_path": "archetypal/schedule.py", "lang": "Python" }
491
0
full_cmd = " ".join(f"{k}={v}" for k, v in env_vars.items()) + " " + cmd_to_run
898
899
[ "GeneratorExp" ]
{ "hexsha": "f701420d7e91f4bcbdb6b47908438c20bcf682cc", "max_stars_repo_name": "behnamh217rn21/ray-master", "max_stars_repo_path": "release/e2e.py", "lang": "Python" }
492
0
results_without_duplicates = [key for (key, ignored) in results.items()]
25
25
[ "ListComp" ]
{ "hexsha": "f70143280a7d3e0800ab0318774e9f82ec6c1c84", "max_stars_repo_name": "DReichLab/adna-workflow", "max_stars_repo_path": "read_groups_from_bam.py", "lang": "Python" }
496
0
return [cls.from_json(j) for j in l]
205
205
[ "ListComp" ]
{ "hexsha": "f701454a3029889fb15ae188e49b88eafbc88eec", "max_stars_repo_name": "efritz/localstack", "max_stars_repo_path": "localstack/utils/common.py", "lang": "Python" }
496
1
return ''.join([obj_to_xml(o) for o in obj])
499
499
[ "ListComp" ]
{ "hexsha": "f701454a3029889fb15ae188e49b88eafbc88eec", "max_stars_repo_name": "efritz/localstack", "max_stars_repo_path": "localstack/utils/common.py", "lang": "Python" }
496
2
return ''.join(['<{k}>{v}</{k}>'.format(k=k, v=obj_to_xml(v)) for (k, v) in obj.items()])
501
501
[ "ListComp" ]
{ "hexsha": "f701454a3029889fb15ae188e49b88eafbc88eec", "max_stars_repo_name": "efritz/localstack", "max_stars_repo_path": "localstack/utils/common.py", "lang": "Python" }
496
3
jar_entries = [e for e in zf.infolist() if e.filename.lower().endswith('.jar')]
840
840
[ "ListComp" ]
{ "hexsha": "f701454a3029889fb15ae188e49b88eafbc88eec", "max_stars_repo_name": "efritz/localstack", "max_stars_repo_path": "localstack/utils/common.py", "lang": "Python" }
496
4
matching_prefix = [e for e in jar_entries if not jar_path_prefix or e.filename.lower().startswith(jar_path_prefix)]
843
844
[ "ListComp" ]
{ "hexsha": "f701454a3029889fb15ae188e49b88eafbc88eec", "max_stars_repo_name": "efritz/localstack", "max_stars_repo_path": "localstack/utils/common.py", "lang": "Python" }
496
5
class_files = [e for e in zf.infolist() if e.filename.endswith('.class')]
858
858
[ "ListComp" ]
{ "hexsha": "f701454a3029889fb15ae188e49b88eafbc88eec", "max_stars_repo_name": "efritz/localstack", "max_stars_repo_path": "localstack/utils/common.py", "lang": "Python" }
496
6
manifest_file = [e for e in zf.infolist() if e.filename.upper() == 'META-INF/MANIFEST.MF']
859
859
[ "ListComp" ]
{ "hexsha": "f701454a3029889fb15ae188e49b88eafbc88eec", "max_stars_repo_name": "efritz/localstack", "max_stars_repo_path": "localstack/utils/common.py", "lang": "Python" }
496
7
return all([os.path.exists(f) for f in files])
884
884
[ "ListComp" ]
{ "hexsha": "f701454a3029889fb15ae188e49b88eafbc88eec", "max_stars_repo_name": "efritz/localstack", "max_stars_repo_path": "localstack/utils/common.py", "lang": "Python" }
516
0
requirements = [line.strip() for line in fh]
29
29
[ "ListComp" ]
{ "hexsha": "f70156a3a2fcf8fcc48c436b8d608cbe337dddd0", "max_stars_repo_name": "hannes-holey/hans", "max_stars_repo_path": "setup.py", "lang": "Python" }
517
0
label_to_id = {attribute.find('name').text: idx for idx, attribute in enumerate(label.iter('attribute'))}
50
50
[ "DictComp" ]
{ "hexsha": "f701581069cfd8be095c0662247dab35763588a4", "max_stars_repo_name": "APrigarina/open_model_zoo", "max_stars_repo_path": "tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_multilabel_recognition.py", "lang": "Python" }
517
1
return {'label_map': {value: key for key, value in attribute_values_mapping.items()}}
83
83
[ "DictComp" ]
{ "hexsha": "f701581069cfd8be095c0662247dab35763588a4", "max_stars_repo_name": "APrigarina/open_model_zoo", "max_stars_repo_path": "tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_multilabel_recognition.py", "lang": "Python" }
517
2
label = [label for label in meta.iter('label') if label.find('name').text == self.label]
86
86
[ "ListComp" ]
{ "hexsha": "f701581069cfd8be095c0662247dab35763588a4", "max_stars_repo_name": "APrigarina/open_model_zoo", "max_stars_repo_path": "tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_multilabel_recognition.py", "lang": "Python" }
518
0
return ''.join( [line.strip() for line in xml_dom.toxml().splitlines()] )
316
318
[ "ListComp" ]
{ "hexsha": "f701593506fcf4f739f92e926ff4b2ac42373413", "max_stars_repo_name": "iilness2/bash-lambda-layer-custom", "max_stars_repo_path": "bin/awscli/customizations/history/show.py", "lang": "Python" }
519
0
values = [data[k] for k in labels]
31
31
[ "ListComp" ]
{ "hexsha": "f70159d65a5bfff918de93d5a0e04e7f23f300b0", "max_stars_repo_name": "HenriqueBuzin/TCC", "max_stars_repo_path": "Python/venv/lib/python3.7/site-packages/prometheus_client/platform_collector.py", "lang": "Python" }
521
0
groundtruth_boxlists = [ box_list_ops.to_absolute_coordinates( box_list.BoxList(boxes), true_image_shapes[i, 0], true_image_shapes[i, 1]) for i, boxes in enumerate( self.groundtruth_lists(fields.BoxListFields.boxes)) ]
1,551
1,557
[ "ListComp" ]
{ "hexsha": "f7015a05765804fec4cfa4d48e357987ad3578a0", "max_stars_repo_name": "AXATechLab/models", "max_stars_repo_path": "research/object_detection/meta_architectures/faster_rcnn_meta_arch_override_RPN.py", "lang": "Python" }
521
1
groundtruth_classes_with_background_list = [ tf.to_float( tf.pad(one_hot_encoding, [[0, 0], [1, 0]], mode='CONSTANT')) for one_hot_encoding in self.groundtruth_lists( fields.BoxListFields.classes)]
1,558
1,562
[ "ListComp" ]
{ "hexsha": "f7015a05765804fec4cfa4d48e357987ad3578a0", "max_stars_repo_name": "AXATechLab/models", "max_stars_repo_path": "research/object_detection/meta_architectures/faster_rcnn_meta_arch_override_RPN.py", "lang": "Python" }
521
2
if any(dim is None for dim in proposals_shape): proposals_shape = tf.shape(proposals)
1,663
1,664
[ "GeneratorExp" ]
{ "hexsha": "f7015a05765804fec4cfa4d48e357987ad3578a0", "max_stars_repo_name": "AXATechLab/models", "max_stars_repo_path": "research/object_detection/meta_architectures/faster_rcnn_meta_arch_override_RPN.py", "lang": "Python" }
521
3
proposal_boxlists = [ box_list.BoxList(proposal_boxes_single_image) for proposal_boxes_single_image in tf.unstack(proposal_boxes)]
2,071
2,073
[ "ListComp" ]
{ "hexsha": "f7015a05765804fec4cfa4d48e357987ad3578a0", "max_stars_repo_name": "AXATechLab/models", "max_stars_repo_path": "research/object_detection/meta_architectures/faster_rcnn_meta_arch_override_RPN.py", "lang": "Python" }
521
4
return {var.op.name: var for var in feature_extractor_variables}
2,337
2,337
[ "DictComp" ]
{ "hexsha": "f7015a05765804fec4cfa4d48e357987ad3578a0", "max_stars_repo_name": "AXATechLab/models", "max_stars_repo_path": "research/object_detection/meta_architectures/faster_rcnn_meta_arch_override_RPN.py", "lang": "Python" }
523
0
inputs = [crypto.q - 2 ** 9, crypto.q - 10, 0, 100, 2 ** 200 + 10] + [ common.rand.randrange(0, crypto.q - 2) for _ in range(20) ]
191
193
[ "ListComp" ]
{ "hexsha": "f7015abd02d2e91af592e552a6b9c0a139f233d9", "max_stars_repo_name": "ph4r05/monero-agent", "max_stars_repo_path": "monero_glue_test/test_crypto.py", "lang": "Python" }
523
1
inputs = [crypto.l - 2 ** 9, crypto.l - 10, 0, 100, 2 ** 200 + 10] + [ common.rand.randrange(0, crypto.l - 2) for _ in range(20) ]
201
203
[ "ListComp" ]
{ "hexsha": "f7015abd02d2e91af592e552a6b9c0a139f233d9", "max_stars_repo_name": "ph4r05/monero-agent", "max_stars_repo_path": "monero_glue_test/test_crypto.py", "lang": "Python" }
528
0
image_idx_list = [x.strip() for x in open(split_file).readlines()]
241
241
[ "ListComp" ]
{ "hexsha": "f7015bc8d1aae686fe1efb7e3d9e149f9f981a3e", "max_stars_repo_name": "Sakura176/PointRCNN", "max_stars_repo_path": "tools/train_eval.py", "lang": "Python" }
534
0
a = [reader.int() for _ in range(3 * m)]
88
88
[ "ListComp" ]
{ "hexsha": "f701614adbe0c289b89493a7ae3140602778980b", "max_stars_repo_name": "kagemeka/atcoder-submissions", "max_stars_repo_path": "jp.atcoder/abc012/abc012_4/21865313.py", "lang": "Python" }
538
0
self.assertAllEqual([[0, i] for i in range(6)], out.indices)
390
390
[ "ListComp" ]
{ "hexsha": "f701647c2b297015f025eb53bd191a1a8c54ec62", "max_stars_repo_name": "AlexChrisF/udacity", "max_stars_repo_path": "tensorflow/contrib/layers/python/kernel_tests/sparse_feature_cross_op_test.py", "lang": "Python" }
538
1
self.assertTrue(all(x < 1000 and x >= 0 for x in out.values))
391
391
[ "GeneratorExp" ]
{ "hexsha": "f701647c2b297015f025eb53bd191a1a8c54ec62", "max_stars_repo_name": "AlexChrisF/udacity", "max_stars_repo_path": "tensorflow/contrib/layers/python/kernel_tests/sparse_feature_cross_op_test.py", "lang": "Python" }
541
0
inlist = np.array([list(map(int, l)) for l in data.split('\n')])
49
49
[ "ListComp" ]
{ "hexsha": "f70165831b1a0ae798b12f7c6cfd6eaade682b3b", "max_stars_repo_name": "vulpicastor/advent-of-code-2021", "max_stars_repo_path": "src/11.py", "lang": "Python" }
547
0
this_dict = {c.name: c for c in self._linear_feature_columns}
159
159
[ "DictComp" ]
{ "hexsha": "f7016c5c21cf950aa7d4520f766ef05b3aa9a22c", "max_stars_repo_name": "calebchoo/modulabs", "max_stars_repo_path": "tensorflow/contrib/learn/python/learn/estimators/linear.py", "lang": "Python" }
547
1
that_dict = { c.name: c for c in layers.infer_real_valued_columns(features) }
160
162
[ "DictComp" ]
{ "hexsha": "f7016c5c21cf950aa7d4520f766ef05b3aa9a22c", "max_stars_repo_name": "calebchoo/modulabs", "max_stars_repo_path": "tensorflow/contrib/learn/python/learn/estimators/linear.py", "lang": "Python" }
547
2
this_dict = {c.name: c for c in self._linear_feature_columns}
310
310
[ "DictComp" ]
{ "hexsha": "f7016c5c21cf950aa7d4520f766ef05b3aa9a22c", "max_stars_repo_name": "calebchoo/modulabs", "max_stars_repo_path": "tensorflow/contrib/learn/python/learn/estimators/linear.py", "lang": "Python" }
547
3
that_dict = { c.name: c for c in layers.infer_real_valued_columns(features) }
311
313
[ "DictComp" ]
{ "hexsha": "f7016c5c21cf950aa7d4520f766ef05b3aa9a22c", "max_stars_repo_name": "calebchoo/modulabs", "max_stars_repo_path": "tensorflow/contrib/learn/python/learn/estimators/linear.py", "lang": "Python" }
548
0
if any(not isinstance(i, dict) and not _supported_input_size_type(i) for i in input_sizes): raise KeyError("An input size must either be a static size or a range of three sizes (min, opt, max) as Dict")
22
23
[ "GeneratorExp" ]
{ "hexsha": "f7016c7c0c3a67ee7989e59320e22bece5f09791", "max_stars_repo_name": "peri044/TRTorch", "max_stars_repo_path": "py/trtorch/_compile_spec.py", "lang": "Python" }
548
1
if all(k in i for k in ["min", "opt", "min"]): in_range = trtorch._C.InputRange() in_range.min = i["min"] in_range.opt = i["opt"] in_range.max = i["max"] parsed_input_sizes.append(in_range) elif "opt" in i: in_r...
28
44
[ "GeneratorExp" ]
{ "hexsha": "f7016c7c0c3a67ee7989e59320e22bece5f09791", "max_stars_repo_name": "peri044/TRTorch", "max_stars_repo_path": "py/trtorch/_compile_spec.py", "lang": "Python" }
568
0
num_targets = len([x for x in (program, module, code) if x != ()])
358
358
[ "ListComp" ]
{ "hexsha": "f701763c784e49214fd9a7e52a90d440b81882b8", "max_stars_repo_name": "despresj/dotfiles", "max_stars_repo_path": "vscode/extensions/ms-python.python-2022.4.1/pythonFiles/lib/python/debugpy/adapter/clients.py", "lang": "Python" }
569
0
print(''.join([char + char for char in word]))
31
31
[ "ListComp" ]
{ "hexsha": "f701767e7eb4bd50bad3cd14a4cce3b563d834a2", "max_stars_repo_name": "LukeBriggsDev/GCSE-Code-Tasks", "max_stars_repo_path": "p03.2/double_letters.py", "lang": "Python" }
576
0
DIVISION_RULES = { k: v.split("/", maxsplit=1)[0] for k, v in mimetypes.types_map.items() }
31
33
[ "DictComp" ]
{ "hexsha": "f70179383f15ccce81946c10265dbb68c2fdd06a", "max_stars_repo_name": "damare01/novelsave", "max_stars_repo_path": "novelsave/settings.py", "lang": "Python" }
580
0
object_keys = [r['name'] for r in objects]
261
261
[ "ListComp" ]
{ "hexsha": "f7017af6c3cdf3b84c5e4f104a6d25cb9b08d77a", "max_stars_repo_name": "Damian-MG/lithops", "max_stars_repo_path": "lithops/storage/backends/swift/swift.py", "lang": "Python" }
582
0
assert all(look_for in page for look_for in step.look_fors)
114
114
[ "GeneratorExp" ]
{ "hexsha": "f7017bfdb0cd9b92d160e04e3ef909806fba71cd", "max_stars_repo_name": "LaudateCorpus1/ansible-navigator", "max_stars_repo_path": "tests/integration/actions/inventory/base.py", "lang": "Python" }
582
1
assert not any(look_not in page for look_not in step.look_nots)
117
117
[ "GeneratorExp" ]
{ "hexsha": "f7017bfdb0cd9b92d160e04e3ef909806fba71cd", "max_stars_repo_name": "LaudateCorpus1/ansible-navigator", "max_stars_repo_path": "tests/integration/actions/inventory/base.py", "lang": "Python" }
583
0
match = [z for z in balancers if z['name'] == name]
100
100
[ "ListComp" ]
{ "hexsha": "f7017f4f4ad299560711cdd1fb4c0b007148e3da", "max_stars_repo_name": "yuriks/salt", "max_stars_repo_path": "salt/states/libcloud_loadbalancer.py", "lang": "Python" }
583
1
match = [z for z in balancers if z['name'] == name]
128
128
[ "ListComp" ]
{ "hexsha": "f7017f4f4ad299560711cdd1fb4c0b007148e3da", "max_stars_repo_name": "yuriks/salt", "max_stars_repo_path": "salt/states/libcloud_loadbalancer.py", "lang": "Python" }
584
0
return [0 for i in range(size)]
72
72
[ "ListComp" ]
{ "hexsha": "f7017fa3cd00892a2d9a04db6d620ac61486f985", "max_stars_repo_name": "ArtFXDev/silex_client", "max_stars_repo_path": "silex_client/utils/parameter_types.py", "lang": "Python" }
585
0
dp = [[[0] * 2 for _ in range(K + 1)] for _ in range(L + 1)]
4
4
[ "ListComp" ]
{ "hexsha": "f701801fce4e0791e2126e82c19b415fb5f428d4", "max_stars_repo_name": "knuu/competitive-programming", "max_stars_repo_path": "atcoder/abc/abc154_e.py", "lang": "Python" }
601
0
[ bpy.data.objects.remove(obj) for obj in bpy.data.objects if obj.type in ("MESH", "LIGHT", "CURVE") ]
85
89
[ "ListComp" ]
{ "hexsha": "f7018ac86c15a5146e9c8fcde8a6f279fdfb8f77", "max_stars_repo_name": "Avinash2468/bpycv", "max_stars_repo_path": "bpycv/scene_setting.py", "lang": "Python" }
602
0
decomm = [tup for tup in site_caps if (tup[2] == period)]
361
361
[ "ListComp" ]
{ "hexsha": "f7018bb7234e923366e80dfdf0fde1be51c3f094", "max_stars_repo_name": "zarppy/MUREIL_2014", "max_stars_repo_path": "generator/txmultigeneratormultisite.py", "lang": "Python" }
602
1
decom_cap = sum([tup[0] for tup in decomm])
365
365
[ "ListComp" ]
{ "hexsha": "f7018bb7234e923366e80dfdf0fde1be51c3f094", "max_stars_repo_name": "zarppy/MUREIL_2014", "max_stars_repo_path": "generator/txmultigeneratormultisite.py", "lang": "Python" }
602
2
new_list = [tup for tup in site_caps if not (tup[2] == period)]
379
379
[ "ListComp" ]
{ "hexsha": "f7018bb7234e923366e80dfdf0fde1be51c3f094", "max_stars_repo_name": "zarppy/MUREIL_2014", "max_stars_repo_path": "generator/txmultigeneratormultisite.py", "lang": "Python" }
602
3
new_cap_list = [tup[0] for tup in site_data[0] if (tup[1] == period)]
449
449
[ "ListComp" ]
{ "hexsha": "f7018bb7234e923366e80dfdf0fde1be51c3f094", "max_stars_repo_name": "zarppy/MUREIL_2014", "max_stars_repo_path": "generator/txmultigeneratormultisite.py", "lang": "Python" }
602
4
capacity.append(sum([tup[0] for tup in cap_list[site]]))
478
478
[ "ListComp" ]
{ "hexsha": "f7018bb7234e923366e80dfdf0fde1be51c3f094", "max_stars_repo_name": "zarppy/MUREIL_2014", "max_stars_repo_path": "generator/txmultigeneratormultisite.py", "lang": "Python" }
605
0
filenames = [os.path.join(data_dir, 'data_batch_%d.bin' % i) for i in xrange(1, 6)]
151
152
[ "ListComp" ]
{ "hexsha": "f7018d7d290f789306ee6408d401f7694b5d77f5", "max_stars_repo_name": "PepSalehi/algorithms", "max_stars_repo_path": "ML/tf-cifar-10/cifar10_input.py", "lang": "Python" }
605
1
filenames = [os.path.join(data_dir, 'data_batch_%d.bin' % i) for i in xrange(1, 6)]
216
217
[ "ListComp" ]
{ "hexsha": "f7018d7d290f789306ee6408d401f7694b5d77f5", "max_stars_repo_name": "PepSalehi/algorithms", "max_stars_repo_path": "ML/tf-cifar-10/cifar10_input.py", "lang": "Python" }
608
0
users = [{'name': name, 'stream': stream} for name, stream in zip(user_names, stream_urls) if stream]
42
42
[ "ListComp" ]
{ "hexsha": "f7019023ce6c6a82f163a45aaf9b53f99160d360", "max_stars_repo_name": "schlarpc/oneartplease", "max_stars_repo_path": "oneartplease.py", "lang": "Python" }
610
0
planid = [_.strip() for _ in planid]
68
68
[ "ListComp" ]
{ "hexsha": "f701930267eb677de0ff92fb8288386877a8c15a", "max_stars_repo_name": "hypergravity/bopy", "max_stars_repo_path": "bopy/spec/lamost.py", "lang": "Python" }
610
1
return np.array(["spec-%05d-%s_sp%02d-%03d%s" % (mjd[i], planid[i], spid[i], fiberid[i], extname) for i in range(len(mjd))])
78
80
[ "ListComp" ]
{ "hexsha": "f701930267eb677de0ff92fb8288386877a8c15a", "max_stars_repo_name": "hypergravity/bopy", "max_stars_repo_path": "bopy/spec/lamost.py", "lang": "Python" }
610
2
return np.array(["%s%s%sspec-%05d-%s_sp%02d-%03d%s" % (dirpath, planid[i], os.path.sep, mjd[i], planid[i], spid[i], fiberid[i], extname) for i in range(len(mjd))])
93
96
[ "ListComp" ]
{ "hexsha": "f701930267eb677de0ff92fb8288386877a8c15a", "max_stars_repo_name": "hypergravity/bopy", "max_stars_repo_path": "bopy/spec/lamost.py", "lang": "Python" }