index
int64
statement_id
int64
statement
string
lineno
int64
end_lineno
int64
comprehension_types
list
metadata
dict
714
0
return dict([to_vim(k), to_vim(v)] for k, v in obj.items())
55
55
[ "GeneratorExp" ]
{ "hexsha": "f701d45f0c4e24fdc3dba6acf4d40a703353740b", "max_stars_repo_name": "lambdalisue/vim-gista", "max_stars_repo_path": "autoload/vital/__vim_gista__/Web/API/github.py", "lang": "Python" }
714
1
return list(to_vim(v) for v in obj)
57
57
[ "GeneratorExp" ]
{ "hexsha": "f701d45f0c4e24fdc3dba6acf4d40a703353740b", "max_stars_repo_name": "lambdalisue/vim-gista", "max_stars_repo_path": "autoload/vital/__vim_gista__/Web/API/github.py", "lang": "Python" }
714
2
workers = [Thread(**kwargs) for n in range(nprocess)]
157
157
[ "ListComp" ]
{ "hexsha": "f701d45f0c4e24fdc3dba6acf4d40a703353740b", "max_stars_repo_name": "lambdalisue/vim-gista", "max_stars_repo_path": "autoload/vital/__vim_gista__/Web/API/github.py", "lang": "Python" }
714
3
kwargs = { ensure_unicode(k, encoding): ensure_unicode(v, encoding) for k, v in kwargs.items()}
200
201
[ "DictComp" ]
{ "hexsha": "f701d45f0c4e24fdc3dba6acf4d40a703353740b", "max_stars_repo_name": "lambdalisue/vim-gista", "max_stars_repo_path": "autoload/vital/__vim_gista__/Web/API/github.py", "lang": "Python" }
721
0
candidates = list(mod_name for mod_name in sys.modules.copy() if self.module_valid(sys.modules[mod_name]))
198
199
[ "GeneratorExp" ]
{ "hexsha": "f701d83c8c0491098011e98966490d3b6a659777", "max_stars_repo_name": "gabistoian/Hide-Text-in-image", "max_stars_repo_path": "venv/Lib/site-packages/shiboken2/files.dir/shibokensupport/signature/mapping.py", "lang": "Python" }
723
0
coordList = [ [ tuple(int(coord) for coord in pair.split(",")) for pair in line.split(" -> ") ] for line in puzzleInput.strip().splitlines() ]
12
18
[ "GeneratorExp", "ListComp" ]
{ "hexsha": "f701d938aba4d8300cacab21080c0e69d8ac18c8", "max_stars_repo_name": "spgill/AdventOfCode2021", "max_stars_repo_path": "day05.py", "lang": "Python" }
723
1
utils.printAnswer(len([item for item in part1Grid.items() if item[1] > 1]))
66
66
[ "ListComp" ]
{ "hexsha": "f701d938aba4d8300cacab21080c0e69d8ac18c8", "max_stars_repo_name": "spgill/AdventOfCode2021", "max_stars_repo_path": "day05.py", "lang": "Python" }
723
2
return len([item for item in part2Grid.items() if item[1] > 1])
69
69
[ "ListComp" ]
{ "hexsha": "f701d938aba4d8300cacab21080c0e69d8ac18c8", "max_stars_repo_name": "spgill/AdventOfCode2021", "max_stars_repo_path": "day05.py", "lang": "Python" }
725
0
return [v._make_route_dict(r) for r in routes]
47
47
[ "ListComp" ]
{ "hexsha": "f701da916352cb9069d9c0e76375bee26e2ffece", "max_stars_repo_name": "Cerberus98/quark", "max_stars_repo_path": "quark/plugin_modules/routes.py", "lang": "Python" }
730
0
all_links = [a for a in all_links if re.search(url_regex, a['href'])]
261
262
[ "ListComp" ]
{ "hexsha": "f701dc4aceb91f10edb6c0bfa86f3db68e475953", "max_stars_repo_name": "timgates42/MechanicalSoup", "max_stars_repo_path": "mechanicalsoup/stateful_browser.py", "lang": "Python" }
730
1
all_links = [a for a in all_links if a.text == link_text]
264
265
[ "ListComp" ]
{ "hexsha": "f701dc4aceb91f10edb6c0bfa86f3db68e475953", "max_stars_repo_name": "timgates42/MechanicalSoup", "max_stars_repo_path": "mechanicalsoup/stateful_browser.py", "lang": "Python" }
736
0
[self.might_sensitive_words.append(f'O: {word}') for word in optional_words]
25
25
[ "ListComp" ]
{ "hexsha": "f701df068b2f136d27f5c1dacf5a101cbdf4bc52", "max_stars_repo_name": "PabloEmidio/Findout-in-Comment", "max_stars_repo_path": "search_tool.py", "lang": "Python" }
736
1
[self.might_sensitive_words.remove(word) for word in remove_words if word in self.might_sensitive_words]
26
26
[ "ListComp" ]
{ "hexsha": "f701df068b2f136d27f5c1dacf5a101cbdf4bc52", "max_stars_repo_name": "PabloEmidio/Findout-in-Comment", "max_stars_repo_path": "search_tool.py", "lang": "Python" }
736
2
elif any(string in comment for string in high): return {'high': comment} elif any(string in comment for string in medium): return {'medium': comment} else: return {'low': comment}
40
45
[ "GeneratorExp" ]
{ "hexsha": "f701df068b2f136d27f5c1dacf5a101cbdf4bc52", "max_stars_repo_name": "PabloEmidio/Findout-in-Comment", "max_stars_repo_path": "search_tool.py", "lang": "Python" }
736
3
elif any(string in comment for string in medium): return {'medium': comment} else: return {'low': comment}
42
45
[ "GeneratorExp" ]
{ "hexsha": "f701df068b2f136d27f5c1dacf5a101cbdf4bc52", "max_stars_repo_name": "PabloEmidio/Findout-in-Comment", "max_stars_repo_path": "search_tool.py", "lang": "Python" }
737
0
add_entities( [SupervisorProcessSensor(info, supervisor_server) for info in processes], True )
33
35
[ "ListComp" ]
{ "hexsha": "f701df2d6c3bb3e37f1bcdb97765f18418e63e7b", "max_stars_repo_name": "mikan-megane/core", "max_stars_repo_path": "homeassistant/components/supervisord/sensor.py", "lang": "Python" }
739
0
word_list = [word for word in valid_word_list if len(set(word)) == 5]
20
20
[ "ListComp" ]
{ "hexsha": "f701dfb05b4e2b1468d4835338476d9029415eab", "max_stars_repo_name": "Masa-Shin/make-4-five-letter-words-without-repetition", "max_stars_repo_path": "src/get_5_five_letter_words.py", "lang": "Python" }
742
0
paths = [path for path, _ in CLONES.values()] + list(CACHE_DIRS.values())
108
108
[ "ListComp" ]
{ "hexsha": "f701e15de95b18608b398cedc0243f079d79d203", "max_stars_repo_name": "asford/dvc", "max_stars_repo_path": "dvc/external_repo.py", "lang": "Python" }
746
0
assert any(r is not NoReturn for r in results), 'exception occured on every run'
445
445
[ "GeneratorExp" ]
{ "hexsha": "f701e5714469931c76e895573715c567623da2a7", "max_stars_repo_name": "vishalsodani/deal", "max_stars_repo_path": "tests.py", "lang": "Python" }
746
1
assert any(r is NoReturn for r in results), 'no exception occured'
446
446
[ "GeneratorExp" ]
{ "hexsha": "f701e5714469931c76e895573715c567623da2a7", "max_stars_repo_name": "vishalsodani/deal", "max_stars_repo_path": "tests.py", "lang": "Python" }
750
0
argstr = ', '.join(['object ' + fix_object(x) for x in exception.args])
402
402
[ "ListComp" ]
{ "hexsha": "f701e93ad73088654fd6b538457d54c52ecec092", "max_stars_repo_name": "0xFireball/exascript2", "max_stars_repo_path": "Src/Scripts/generate_exceptions.py", "lang": "Python" }
750
1
cw.writeline('args = PythonTuple.MakeTuple(' + ', '.join([fix_object(x) for x in exception.args]) + ');')
406
406
[ "ListComp" ]
{ "hexsha": "f701e93ad73088654fd6b538457d54c52ecec092", "max_stars_repo_name": "0xFireball/exascript2", "max_stars_repo_path": "Src/Scripts/generate_exceptions.py", "lang": "Python" }
750
2
cw.writeline('__init__(' + ', '.join([fix_object(x) for x in exception.args]) + ');')
413
413
[ "ListComp" ]
{ "hexsha": "f701e93ad73088654fd6b538457d54c52ecec092", "max_stars_repo_name": "0xFireball/exascript2", "max_stars_repo_path": "Src/Scripts/generate_exceptions.py", "lang": "Python" }
751
0
expected.update({ii: slice(None, None, None) for ii in range(1, 1000)})
136
136
[ "DictComp" ]
{ "hexsha": "f701e9411422a12eaa72972194de87ab9163810c", "max_stars_repo_name": "abhinavralhan/dask", "max_stars_repo_path": "dask/array/tests/test_slicing.py", "lang": "Python" }
751
1
expected = merge(dict((('y', i, 0), (getitem, ('x', i, 0), (slice(None, None, None), [1, 3, 5]))) for i in range(4)), dict((('y', i, 1), (getitem, ('x', i, 1), (slice(None, None, None), [17])...
280
285
[ "GeneratorExp" ]
{ "hexsha": "f701e9411422a12eaa72972194de87ab9163810c", "max_stars_repo_name": "abhinavralhan/dask", "max_stars_repo_path": "dask/array/tests/test_slicing.py", "lang": "Python" }
753
0
queues = [RetryQueue() for i in range(CORES)]
710
710
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
1
args = [(dat, binspar, binsper, parmetric, permetric, rng, weights, range(int(Nd*i/CORES),int(Nd*(i+1)/CORES)), True, queues[i]) for i in range(CORES)]
711
711
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
2
jobs = [Process(target=aDDwcalcp, args=(a)) for a in args]
712
712
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
3
queues = [RetryQueue() for i in range(CORES)]
725
725
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
4
args = [(datR, binspar, binsper, parmetric, permetric, rng, rweights, range(int(Nr*i/CORES),int(Nr*(i+1)/CORES)), True, queues[i]) for i in range(CORES)]
726
726
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
5
jobs = [Process(target=aRRwcalcp, args=(a)) for a in args]
727
727
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
6
queues = [RetryQueue() for i in range(CORES)]
740
740
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
7
args = [(dat, datR, binspar, binsper, parmetric, permetric, rng, weights, range(int(Nr*i/CORES), int(Nr*(i+1)/CORES)), True, queues[i]) for i in range(CORES)]
741
741
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
8
jobs = [Process(target=aRDwcalcp, args=(a)) for a in args]
742
742
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
9
queues = [RetryQueue() for i in range(CORES)]
756
756
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
10
args = [(dat, datR, binspar, binsper, parmetric, permetric, rng, rweights, range(int(Nd*i/CORES), int(Nd*(i+1)/CORES)), True, queues[i]) for i in range(CORES)]
757
757
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
753
11
jobs = [Process(target=aDRwcalcp, args=(a)) for a in args]
758
758
[ "ListComp" ]
{ "hexsha": "f701eae7d9153c4940a9de47ed79a004e74e6560", "max_stars_repo_name": "rohinkumar/CorrelCalc", "max_stars_repo_path": "correlcalc/antpcf.py", "lang": "Python" }
756
0
nodes.extend([node for node in nodes_all if (str(node.port) == failover_node.port)])
348
349
[ "ListComp" ]
{ "hexsha": "f701ec8d1673c733a95290013d8b9a3737b4b8a1", "max_stars_repo_name": "sumedhpb/testrunner", "max_stars_repo_path": "pytests/security/SecretsMgmtTests.py", "lang": "Python" }
756
1
nodes.extend([node for node in nodes_all if node.ip == failover_node.ip])
352
353
[ "ListComp" ]
{ "hexsha": "f701ec8d1673c733a95290013d8b9a3737b4b8a1", "max_stars_repo_name": "sumedhpb/testrunner", "max_stars_repo_path": "pytests/security/SecretsMgmtTests.py", "lang": "Python" }
763
0
self.assertEqual( [ x.text for x in self.selenium.find_elements_by_xpath("//ul[@class='timelist']/li/a") ], ['Now', 'Midnight', '6 a.m.', 'Noon', '6 p.m.'] )
824
830
[ "ListComp" ]
{ "hexsha": "f701f1abff83536a090c2e94d28527084e8c64b6", "max_stars_repo_name": "ronpad/django", "max_stars_repo_path": "tests/admin_widgets/tests.py", "lang": "Python" }
763
1
selected = [td for td in tds if td.get_attribute('class') == 'selected']
909
909
[ "ListComp" ]
{ "hexsha": "f701f1abff83536a090c2e94d28527084e8c64b6", "max_stars_repo_name": "ronpad/django", "max_stars_repo_path": "tests/admin_widgets/tests.py", "lang": "Python" }
764
0
results = pool.map(f, [X[feature] for feature in df_features['Feature']], chunksize=chunksize)
137
137
[ "ListComp" ]
{ "hexsha": "f701f1d7ecfbfea55fbc17179f0299931e6d1dd5", "max_stars_repo_name": "davidcrowland/layer_vb_tagging", "max_stars_repo_path": "extra/tsfresh_examples/tsfresh/feature_selection/feature_selector.py", "lang": "Python" }
764
1
C = [sum([1.0 / i for i in range(1, k + 1)]) for k in K]
264
264
[ "ListComp" ]
{ "hexsha": "f701f1d7ecfbfea55fbc17179f0299931e6d1dd5", "max_stars_repo_name": "davidcrowland/layer_vb_tagging", "max_stars_repo_path": "extra/tsfresh_examples/tsfresh/feature_selection/feature_selector.py", "lang": "Python" }
764
2
T = [fdr_level * k / m * 1.0 / c for k, c in zip(K, C)]
267
267
[ "ListComp" ]
{ "hexsha": "f701f1d7ecfbfea55fbc17179f0299931e6d1dd5", "max_stars_repo_name": "davidcrowland/layer_vb_tagging", "max_stars_repo_path": "extra/tsfresh_examples/tsfresh/feature_selection/feature_selector.py", "lang": "Python" }
766
0
missing = [dep for dep in deps if not importlib.util.find_spec(dep)]
35
35
[ "ListComp" ]
{ "hexsha": "f701f30df1fc51076dcd0f5de3aeec82d2c612ae", "max_stars_repo_name": "ZohaibZ/DataScience", "max_stars_repo_path": "Statistical Methods and Data Analysis/Module 2 Assignment/venv/lib/python3.8/site-packages/matplotlib/tests/test_backends_interactive.py", "lang": "Python" }
770
0
assert (expected_error in [format_error(error) for error in result.errors])
724
724
[ "ListComp" ]
{ "hexsha": "f701f57a6d66a5162c4485e2059098ca7ddc59f7", "max_stars_repo_name": "jhgg/graphql-py", "max_stars_repo_path": "tests/core_type/test_introspection.py", "lang": "Python" }
771
0
talks_votes = [talk.num_votes for talk in talks]
205
205
[ "ListComp" ]
{ "hexsha": "f701f5da9daa45c173263130bee6d726af6e96a9", "max_stars_repo_name": "VladimirFilonov/moscowdjango", "max_stars_repo_path": "apps/meetup/views.py", "lang": "Python" }
774
0
return all( isinstance(item, ALLOWED_HOST_TYPES) for item in value )
42
45
[ "GeneratorExp" ]
{ "hexsha": "f701f865b738ef986aac7ad75382e6e9b70325f2", "max_stars_repo_name": "ryanwersal/pyinfra", "max_stars_repo_path": "pyinfra_cli/inventory.py", "lang": "Python" }
774
1
group_data[group_name] = { key: value for key, value in six.iteritems(attrs) if _is_group_data(key, value) }
78
82
[ "DictComp" ]
{ "hexsha": "f701f865b738ef986aac7ad75382e6e9b70325f2", "max_stars_repo_name": "ryanwersal/pyinfra", "max_stars_repo_path": "pyinfra_cli/inventory.py", "lang": "Python" }
774
2
return { key: value for key, value in six.iteritems(attrs) if _is_inventory_group(key, value) }
90
94
[ "DictComp" ]
{ "hexsha": "f701f865b738ef986aac7ad75382e6e9b70325f2", "max_stars_repo_name": "ryanwersal/pyinfra", "max_stars_repo_path": "pyinfra_cli/inventory.py", "lang": "Python" }
774
3
fake_groups = { # In API mode groups *must* be tuples of (hostnames, data) name: group if isinstance(group, tuple) else (group, {}) for name, group in six.iteritems(groups) }
165
169
[ "DictComp" ]
{ "hexsha": "f701f865b738ef986aac7ad75382e6e9b70325f2", "max_stars_repo_name": "ryanwersal/pyinfra", "max_stars_repo_path": "pyinfra_cli/inventory.py", "lang": "Python" }
777
0
all_deploy_dependencies = set(itertools.chain.from_iterable( compute_recursive_contract_dependencies(contract_name, dependency_graph) for contract_name in contracts_to_deploy ))
26
29
[ "GeneratorExp" ]
{ "hexsha": "f701f97e1f188d4e04e78e513ce8208e4d9f71ef", "max_stars_repo_name": "blockchainhelppro/CelvinRost", "max_stars_repo_path": "deploy.py", "lang": "Python" }
777
1
deploy_order = tuple( contract_name for contract_name in global_deploy_order if contract_name in all_contracts_to_deploy )
34
39
[ "GeneratorExp" ]
{ "hexsha": "f701f97e1f188d4e04e78e513ce8208e4d9f71ef", "max_stars_repo_name": "blockchainhelppro/CelvinRost", "max_stars_repo_path": "deploy.py", "lang": "Python" }
778
0
cat_idx = [df.iloc[:, 1:].columns.get_loc(val) for val in categorical_cols]
82
82
[ "ListComp" ]
{ "hexsha": "f701f9d8c81d5e989359e6483b6e3216e93ad459", "max_stars_repo_name": "prakass1/InteractiveSimilarityExplorer", "max_stars_repo_path": "machine_learning_model.py", "lang": "Python" }
778
1
num_idx = [df.iloc[:, 1:].columns.get_loc(val) for val in num_cols]
83
83
[ "ListComp" ]
{ "hexsha": "f701f9d8c81d5e989359e6483b6e3216e93ad459", "max_stars_repo_name": "prakass1/InteractiveSimilarityExplorer", "max_stars_repo_path": "machine_learning_model.py", "lang": "Python" }
778
2
usr_vals = np.array([user_ts[n_id] for n_id in diff_near_idx[0]])
229
229
[ "ListComp" ]
{ "hexsha": "f701f9d8c81d5e989359e6483b6e3216e93ad459", "max_stars_repo_name": "prakass1/InteractiveSimilarityExplorer", "max_stars_repo_path": "machine_learning_model.py", "lang": "Python" }
783
0
return [x for l in lists for x in l]
32
32
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
1
return [e.val(k) for e in seq]
36
36
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
2
ipt_seqs = [extract_key(exp_seq, k) for exp_seq in exp_seqs]
49
49
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
3
ret["inputs"][k] = [ipt_seq[:-1] for ipt_seq in ipt_seqs]
50
50
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
4
ret["next_inputs"][k] = [ipt_seq[1:] for ipt_seq in ipt_seqs]
51
51
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
5
act_seqs = [extract_key(exp_seq, k) for exp_seq in exp_seqs]
54
54
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
6
ret["actions"][k] = [act_seq[:-1] for act_seq in act_seqs]
55
55
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
7
ret["next_actions"][k] = [act_seq[1:] for act_seq in act_seqs]
56
56
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
8
ret["rewards"][ k] = [extract_key(exp_seq[:-1], k) for exp_seq in exp_seqs]
59
60
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
9
ret["states"][ k] = [extract_key(exp_seq[:1], k)[0] for exp_seq in exp_seqs]
68
69
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
10
ret["next_states"][k] = [ extract_key(exp_seq[1:2], k)[0] for exp_seq in exp_seqs ]
70
72
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
11
ret["next_alive"]["alive"] \ = [extract_key(exp_seq[1:], "alive") for exp_seq in exp_seqs]
74
75
[ "ListComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
12
inputs_ = {k: [v] for k, v in inputs.items()}
277
277
[ "DictComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
13
states_ = {k: [v] for k, v in states.items()}
278
278
[ "DictComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
14
prediction = {k: v[0] for k, v in prediction.items()}
282
282
[ "DictComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
15
next_states = {k: v[0] for k, v in next_states.items()}
283
283
[ "DictComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
783
16
zero_rewards = {k: [0] * len(v) for k, v in rewards.items()}
337
337
[ "DictComp" ]
{ "hexsha": "f701fef52c14cd1ab59e97d3208e9fba872d50d7", "max_stars_repo_name": "skylian/flare", "max_stars_repo_path": "flare/framework/agent.py", "lang": "Python" }
789
0
ua_verification_devices = [vd for vd in verification_devices if vd.test_user_agent(user_agent)]
99
99
[ "ListComp" ]
{ "hexsha": "f7020143781683c04a23b0b50295a1890ca68391", "max_stars_repo_name": "janheise/zentral", "max_stars_repo_path": "server/accounts/models.py", "lang": "Python" }
789
1
return tuple((i.value, i.value) for i in cls)
167
167
[ "GeneratorExp" ]
{ "hexsha": "f7020143781683c04a23b0b50295a1890ca68391", "max_stars_repo_name": "janheise/zentral", "max_stars_repo_path": "server/accounts/models.py", "lang": "Python" }
794
0
lines = [l for l in lines if "<suppressed>" not in l]
111
111
[ "ListComp" ]
{ "hexsha": "f7020407270c486b259d7d6e15d11395208c8459", "max_stars_repo_name": "astrohr/dagor-preprocessing", "max_stars_repo_path": "finder/planets.py", "lang": "Python" }
794
1
if p.name not in (i.name for i in self.planets): p.analyzePlanet() self.planets.append(p) if self.beeperOn: playsound('up.wav') else: # print('Plane already known (' + p.name + ')') pass
458
465
[ "GeneratorExp" ]
{ "hexsha": "f7020407270c486b259d7d6e15d11395208c8459", "max_stars_repo_name": "astrohr/dagor-preprocessing", "max_stars_repo_path": "finder/planets.py", "lang": "Python" }
794
2
return sorted([p for p in self.planets if not p.discard], key=lambda planet: planet.maxAltitudeEphemeride.dateUnix)
482
482
[ "ListComp" ]
{ "hexsha": "f7020407270c486b259d7d6e15d11395208c8459", "max_stars_repo_name": "astrohr/dagor-preprocessing", "max_stars_repo_path": "finder/planets.py", "lang": "Python" }
797
0
print(' '.join(str(i) for i in list(product(*[aarr, barr]))))
6
6
[ "GeneratorExp" ]
{ "hexsha": "f70206cc800c5e0d94292d32c57ac589cda0f286", "max_stars_repo_name": "raghavi101/HackerRank", "max_stars_repo_path": "learn1/46.py", "lang": "Python" }
798
0
print('\n'.join('{:.2f}'.format(i) for i in COST))
156
156
[ "GeneratorExp" ]
{ "hexsha": "f702081e249e1d95321d52a2424e1f7a8a4b4c3a", "max_stars_repo_name": "code-lab-org/sys611", "max_stars_repo_path": "previous/week12/object-oriented/FactorySystemOO.py", "lang": "Python" }
815
0
self.inv_vocab = {v: k for k, v in self.vocab.items()}
168
168
[ "DictComp" ]
{ "hexsha": "f7020e806b61d3b1b2fd2eb73b1d37b9c9465b3f", "max_stars_repo_name": "joytianya/google_bert", "max_stars_repo_path": "zuo/bert/tokenization.py", "lang": "Python" }
815
1
return ["".join(x) for x in output]
251
251
[ "ListComp" ]
{ "hexsha": "f7020e806b61d3b1b2fd2eb73b1d37b9c9465b3f", "max_stars_repo_name": "joytianya/google_bert", "max_stars_repo_path": "zuo/bert/tokenization.py", "lang": "Python" }
816
0
return [[float(D(n) / determinant) or 0.0 for n in row] for row in swapped_matrix]
40
40
[ "ListComp" ]
{ "hexsha": "f7020e83e9b4b451e496d6aadff5e7867e1489d5", "max_stars_repo_name": "hank-chou/python", "max_stars_repo_path": "matrix/inverse_of_matrix.py", "lang": "Python" }
820
0
return [v.translate(first_negated) for v in shape]
35
35
[ "ListComp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
1
self.__variants = [ [ list(shape_tuple) for shape_tuple in { tuple(canonicalize_shape([f(v) for v in s])) for f in fs } ] for s in self.__shapes ]
90
99
[ "ListComp", "SetComp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
2
for instance_id in [self.__lattice.point_to_index(p) for p in self.__lattice.points]: quadtree.add_expr( (HAS_INSTANCE_ID, instance_id), lambda p, i=instance_id: fast_eq(self.__shape_instance_grid[p], int_vals[i])) quadtree.add_expr( (NOT_HAS_INSTANCE_ID, instance_id), ...
151
157
[ "ListComp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
3
min_y = min(p.y for p in self.__shape_type_grid)
230
230
[ "GeneratorExp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
4
min_x = min(p.x for p in self.__shape_type_grid)
231
231
[ "GeneratorExp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
5
max_y = max(p.y for p in self.__shape_type_grid)
232
232
[ "GeneratorExp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
6
max_x = max(p.x for p in self.__shape_type_grid)
233
233
[ "GeneratorExp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
7
min_y = min(p.y for p in self.__shape_instance_grid)
253
253
[ "GeneratorExp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
8
min_x = min(p.x for p in self.__shape_instance_grid)
254
254
[ "GeneratorExp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
9
max_y = max(p.y for p in self.__shape_instance_grid)
255
255
[ "GeneratorExp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
820
10
max_x = max(p.x for p in self.__shape_instance_grid)
256
256
[ "GeneratorExp" ]
{ "hexsha": "f7021005377ccdda8d76009a04d71c7447d772fc", "max_stars_repo_name": "jaylorch/grilops", "max_stars_repo_path": "grilops/shapes.py", "lang": "Python" }
824
0
proj_versions = [x for x in proj_versions if re.fullmatch(r"v\d+\.\d+", x)]
63
63
[ "ListComp" ]
{ "hexsha": "f70214d382ae03efdb4a7b2d43a33a02aafbf03c", "max_stars_repo_name": "KronosTheLate/jill.py", "max_stars_repo_path": "jill/install.py", "lang": "Python" }
824
1
link_list = [f"julia-{f(version)}" for f in (f_major_version, f_minor_version)]
111
112
[ "ListComp" ]
{ "hexsha": "f70214d382ae03efdb4a7b2d43a33a02aafbf03c", "max_stars_repo_name": "KronosTheLate/jill.py", "max_stars_repo_path": "jill/install.py", "lang": "Python" }
826
0
row = "".join(".xo"[int(c)] for c in b[irow])
119
119
[ "GeneratorExp" ]
{ "hexsha": "f70215af683529cb3b43d00b6d7dc7a40230ca48", "max_stars_repo_name": "imandr/RLpy", "max_stars_repo_path": "rlpy/gradnet/samples/single_agent/single_agent_ttt_env.py", "lang": "Python" }
826
1
choices = [i for i, x in enumerate(available_actions) if x]
155
155
[ "ListComp" ]
{ "hexsha": "f70215af683529cb3b43d00b6d7dc7a40230ca48", "max_stars_repo_name": "imandr/RLpy", "max_stars_repo_path": "rlpy/gradnet/samples/single_agent/single_agent_ttt_env.py", "lang": "Python" }
841
0
self.data = [0 for _ in range(self.samples)]
159
159
[ "ListComp" ]
{ "hexsha": "f702222d3dba2c9d49caadf65f84a04d301756c8", "max_stars_repo_name": "CentraleNantesRobotics/ping360_sonar_python", "max_stars_repo_path": "ping360_sonar/ping360_sonar/sonar_interface.py", "lang": "Python" }
848
0
if self.models and [k for k, v in self.models.items() if v["type"] == "segmentation"]: self.ui.segmentationCollapsibleButton.collapsed = False
480
481
[ "ListComp" ]
{ "hexsha": "f70225bfe03aae6c356907a08cda096186636654", "max_stars_repo_name": "hkethi002/MONAILabel", "max_stars_repo_path": "plugins/slicer/MONAILabel/MONAILabel.py", "lang": "Python" }