index int64 | statement_id int64 | statement string | lineno int64 | end_lineno int64 | comprehension_types list | metadata dict |
|---|---|---|---|---|---|---|
293 | 0 | upload_file_list = [f for f in upload_file_list if verify_mapillary_tag(f)] | 83 | 83 | [
"ListComp"
] | {
"hexsha": "f700c0c10f19f9f12a3b5a93890df68ad11c0b8c",
"max_stars_repo_name": "LeonhardStrasser/https-github.com-mapillary-mapillary_tools",
"max_stars_repo_path": "mapillary_tools/upload.py",
"lang": "Python"
} |
299 | 0 | ret_val.update({table: engine for table in tables}) | 261 | 261 | [
"DictComp"
] | {
"hexsha": "f700c57a203a727e26c5ba4059e2b290d8a2a3ba",
"max_stars_repo_name": "Eastwu5788/Mask-SQLAlchemy",
"max_stars_repo_path": "mask_sqlalchemy/__init__.py",
"lang": "Python"
} |
302 | 0 | return dict([(k, getattr(self, k, None)) for k in keys]) | 65 | 65 | [
"ListComp"
] | {
"hexsha": "f700c767ff92c13aef1a23a878df02eea4e86053",
"max_stars_repo_name": "antont/tundra",
"max_stars_repo_path": "src/Application/PythonScriptModule/pymodules_old/circuits/core/values.py",
"lang": "Python"
} |
303 | 0 | feat_names = [f + "_p" for f in feats] + [f + "_c" for f in feats] | 514 | 514 | [
"ListComp"
] | {
"hexsha": "f700c828e1ae0ff1deb8636e189c09f5c64ea253",
"max_stars_repo_name": "ncfrey/mlmsynth",
"max_stars_repo_path": "pumml/learners.py",
"lang": "Python"
} |
306 | 0 | a = [int(a_temp) for a_temp in input().strip().split(' ')] | 14 | 14 | [
"ListComp"
] | {
"hexsha": "f700cb5fa6b3a65b0f27e583671a9cfd14e15279",
"max_stars_repo_name": "Owngithub10101/Hackerrank-Problem-Solving",
"max_stars_repo_path": "Algorithms/Implementation/picking-numbers.py",
"lang": "Python"
} |
308 | 0 | dataframe = dataframe[[val for key, val in coldict.items()]].copy() | 74 | 74 | [
"ListComp"
] | {
"hexsha": "f700cc2db4300e6b6c079786b6be91828b98ea16",
"max_stars_repo_name": "d33bs/cupyopt",
"max_stars_repo_path": "src/cupyopt/nuggets/dataframe.py",
"lang": "Python"
} |
311 | 0 | ids = [ x["_id"] for x in results ] | 119 | 119 | [
"ListComp"
] | {
"hexsha": "f700ce19f231a90c836b91d616c94f8404fc8fd4",
"max_stars_repo_name": "superstap/jimi",
"max_stars_repo_path": "core/model.py",
"lang": "Python"
} |
313 | 0 | sample["data"] = [val for sublist in sample["data"] for val in sublist] | 157 | 157 | [
"ListComp"
] | {
"hexsha": "f700d08368e70d12a9fe5d31f3bb701d4f1002f4",
"max_stars_repo_name": "pcanas/vissl",
"max_stars_repo_path": "vissl/data/ssl_transforms/__init__.py",
"lang": "Python"
} |
316 | 0 | files = [f for f in files if not f.startswith('.')] | 377 | 377 | [
"ListComp"
] | {
"hexsha": "f700d349785d32abf8d10d9e46ea09cced369e49",
"max_stars_repo_name": "ln0119/tensorflow-fast-rcnn",
"max_stars_repo_path": "tensorflow/python/platform/default/_gfile.py",
"lang": "Python"
} |
318 | 0 | data = dict((k, data[k]) for k in data_columns) | 230 | 230 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 1 | data = dict((k, v) for k, v in compat.iteritems(data)
if k in columns) | 300 | 301 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 2 | arrays = [data[k] for k in keys] | 333 | 333 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 3 | repr_width = max([len(l) for l in value.split('\n')]) | 473 | 473 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 4 | arrays.extend(self.iloc[:, k] for k in range(len(self.columns))) | 589 | 589 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 5 | return dict((k, v.to_dict()) for k, v in compat.iteritems(self)) | 707 | 707 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 6 | return dict((k, v.tolist()) for k, v in compat.iteritems(self)) | 709 | 709 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 7 | return dict((k, v) for k, v in compat.iteritems(self)) | 715 | 715 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 8 | return [dict((k, v) for k, v in zip(self.columns, row))
for row in self.values] | 717 | 718 | [
"GeneratorExp",
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 9 | arrays = [data[k] for k in columns] | 823 | 823 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 10 | to_remove = [arr_columns.get_loc(field) for field in index] | 867 | 867 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 11 | result_index = MultiIndex.from_arrays(
[arrays[i] for i in to_remove], names=index) | 869 | 870 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 12 | arr_exclude = [x for x in exclude if x in arr_columns] | 877 | 877 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 13 | to_remove = [arr_columns.get_loc(col) for col in arr_exclude] | 878 | 878 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 14 | arrays = [v for i, v in enumerate(arrays) if i not in to_remove] | 879 | 879 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 15 | arrays = ix_vals + [self[c].get_values() for c in self.columns] | 916 | 916 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 16 | arrays = [self[c].get_values() for c in self.columns] | 929 | 929 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 17 | dtype = np.dtype([(x, v.dtype) for x, v in zip(names, arrays)]) | 932 | 932 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 18 | arrays = [idict[k] for k in columns if k in idict] | 971 | 971 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 19 | data = [lib.maybe_convert_objects(v) for v in arr] | 984 | 984 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 20 | space = max([len(com.pprint_thing(k)) for k in self.columns]) + 4 | 1,493 | 1,493 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 21 | dtypes = ['%s(%d)' % k for k in sorted(compat.iteritems(counts))] | 1,538 | 1,538 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 22 | result = Series([ c.values.nbytes for col, c in self.iteritems() ],
index=self.columns) | 1,578 | 1,579 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 23 | names = [x for x in self.index.names] | 2,556 | 2,556 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 24 | level = [self.index._get_level_number(lev) for lev in level] | 2,667 | 2,667 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 25 | vals = (self[col].values for col in subset) | 2,848 | 2,848 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 26 | result = dict([(col, f(col)) for col in this]) | 3,127 | 3,127 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 27 | result = dict([
(i, f(i)) for i, col in enumerate(this.columns)
]) | 3,138 | 3,140 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 28 | return dict([(col, func(a[col], b[col])) for col in a.columns]) | 3,212 | 3,212 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 29 | return dict([(i, func(a.iloc[:, i], b.iloc[:, i]))
for i, col in enumerate(a.columns)]) | 3,219 | 3,220 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 30 | series_gen = (self.icol(i) for i in range(len(self.columns))) | 3,748 | 3,748 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 31 | series_gen = (Series.from_array(arr, index=res_columns, name=name, dtype=dtype)
for i, (arr, name) in
enumerate(zip(values, res_index))) | 3,755 | 3,757 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 32 | can_concat = all(df.index.is_unique for df in frames) | 4,019 | 4,019 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 33 | result = [index[i] if i >= 0 else NA for i in indices] | 4,369 | 4,369 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 34 | result = [index[i] if i >= 0 else NA for i in indices] | 4,400 | 4,400 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 35 | quantiles = [[f(vals, x) for x in per]
for (_, vals) in data.iteritems()] | 4,512 | 4,513 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 36 | return concat((self.iloc[:, [i]].isin(values[col])
for i, col in enumerate(self.columns)), axis=1) | 4,692 | 4,693 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 37 | values = np.array([convert(v) for v in values]) | 4,843 | 4,843 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 38 | arrays = [data.icol(i).values for i, col in enumerate(data.columns)
if col in columns] | 4,870 | 4,871 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 39 | arrays = [data.icol(i).values for i in range(len(columns))] | 4,874 | 4,874 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 40 | arrays = [data[k] for k in columns] | 4,903 | 4,903 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 41 | arr_columns = _ensure_index(
[arr_columns[i] for i in indexer]) | 4,956 | 4,957 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 42 | arrays = [arrays[i] for i in indexer] | 4,958 | 4,958 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 43 | columns = _get_combined_index([
s.index for s in data if getattr(s, 'index', None) is not None
]) | 4,976 | 4,978 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 44 | gen = (list(x.keys()) for x in data) | 5,008 | 5,008 | [
"GeneratorExp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 45 | data = [(type(d) is dict) and d or dict(d) for d in data] | 5,013 | 5,013 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 46 | arrays = [ convert(arr) for arr in content ] | 5,036 | 5,036 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
318 | 47 | has_some_name = any([getattr(s, 'name', None) is not None for s in data]) | 5,043 | 5,043 | [
"ListComp"
] | {
"hexsha": "f700d4316842c3ceb0981946e2d5fd713d664c46",
"max_stars_repo_name": "lmarti/pandas",
"max_stars_repo_path": "pandas/core/frame.py",
"lang": "Python"
} |
319 | 0 | gdf = geopandas.GeoDataFrame(geometry=[shapely.geometry.Point(x, x) for x in [5,4,3,2]]) | 3 | 3 | [
"ListComp"
] | {
"hexsha": "f700d457ceccdb1435f157493066afbfc7b6f6f1",
"max_stars_repo_name": "kevjp/openstreetmap-carto",
"max_stars_repo_path": "geo_agent/test/overwrite_geojson.py",
"lang": "Python"
} |
320 | 0 | v = [R(x) for x in v] | 185 | 185 | [
"ListComp"
] | {
"hexsha": "f700d475269b885063676b9344c7da5676553cc3",
"max_stars_repo_name": "sensen1/sage",
"max_stars_repo_path": "src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py",
"lang": "Python"
} |
320 | 1 | if not all(x.parent() is R and x.is_unit() for x in v):
raise ValueError('there is at least one element in the ' +
'list %s not lying in %s ' % (v, R) +
'or which is not invertible') | 192 | 195 | [
"GeneratorExp"
] | {
"hexsha": "f700d475269b885063676b9344c7da5676553cc3",
"max_stars_repo_name": "sensen1/sage",
"max_stars_repo_path": "src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py",
"lang": "Python"
} |
320 | 2 | p = Permutation([self.degree()] + [i for i in range(1, self.degree())]) | 263 | 263 | [
"ListComp"
] | {
"hexsha": "f700d475269b885063676b9344c7da5676553cc3",
"max_stars_repo_name": "sensen1/sage",
"max_stars_repo_path": "src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py",
"lang": "Python"
} |
320 | 3 | autgroup_size = len([x for x in End(R) if x.is_injective()]) | 330 | 330 | [
"ListComp"
] | {
"hexsha": "f700d475269b885063676b9344c7da5676553cc3",
"max_stars_repo_name": "sensen1/sage",
"max_stars_repo_path": "src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py",
"lang": "Python"
} |
320 | 4 | return self.codomain()([a * x for x in b.rows()]) | 504 | 504 | [
"ListComp"
] | {
"hexsha": "f700d475269b885063676b9344c7da5676553cc3",
"max_stars_repo_name": "sensen1/sage",
"max_stars_repo_path": "src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py",
"lang": "Python"
} |
322 | 0 | nodes_nbrs=((n,self.adj[n]) for n in self.nbunch_iter(nbunch)) | 828 | 828 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 1 | nodes_nbrs=((n,self.pred[n]) for n in self.nbunch_iter(nbunch)) | 870 | 870 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 2 | nodes_nbrs=zip(
((n,self.succ[n]) for n in self.nbunch_iter(nbunch)),
((n,self.pred[n]) for n in self.nbunch_iter(nbunch))) | 927 | 929 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 3 | yield (n,
sum((succ[nbr].get(weight,1) for nbr in succ))+
sum((pred[nbr].get(weight,1) for nbr in pred))) | 937 | 939 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 4 | nodes_nbrs=((n,self.pred[n]) for n in self.nbunch_iter(nbunch)) | 980 | 980 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 5 | yield (n, sum(data.get(weight,1) for data in nbrs.values())) | 988 | 988 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 6 | nodes_nbrs=((n,self.succ[n]) for n in self.nbunch_iter(nbunch)) | 1,029 | 1,029 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 7 | yield (n, sum(data.get(weight,1) for data in nbrs.values())) | 1,037 | 1,037 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 8 | H.add_edges_from( (u,v,deepcopy(d))
for u,nbrs in self.adjacency_iter()
for v,d in nbrs.items()
if v in self.pred[u]) | 1,238 | 1,241 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 9 | H.add_edges_from( (u,v,deepcopy(d))
for u,nbrs in self.adjacency_iter()
for v,d in nbrs.items() ) | 1,243 | 1,245 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
322 | 10 | H.add_edges_from( (v,u,deepcopy(d)) for u,v,d
in self.edges(data=True) ) | 1,267 | 1,268 | [
"GeneratorExp"
] | {
"hexsha": "f700d53f312546235262c209dd86926fb0027889",
"max_stars_repo_name": "movingpictures83/MATria",
"max_stars_repo_path": "networkx_mod/classes/digraph.py",
"lang": "Python"
} |
324 | 0 | self.timestamp_sequences.extend([
# Request a new token every 100ms (10 TPS) for 2 seconds.
1 + 0.1 * i for i in range(20)
]) | 75 | 78 | [
"ListComp"
] | {
"hexsha": "f700d854e2b87c83dfa59314f01e5237a60e914f",
"max_stars_repo_name": "kellertk/botocore",
"max_stars_repo_path": "tests/unit/retries/test_bucket.py",
"lang": "Python"
} |
326 | 0 | DFS['r'] = [c[0] for c in DFS['rgb']] | 144 | 144 | [
"ListComp"
] | {
"hexsha": "f700d9479c9728354a66dc7a550274f53cde032e",
"max_stars_repo_name": "colizoli/letter_color_mri",
"max_stars_repo_path": "experiment/Behav_Consistency.py",
"lang": "Python"
} |
326 | 1 | DFS['g'] = [c[1] for c in DFS['rgb']] | 145 | 145 | [
"ListComp"
] | {
"hexsha": "f700d9479c9728354a66dc7a550274f53cde032e",
"max_stars_repo_name": "colizoli/letter_color_mri",
"max_stars_repo_path": "experiment/Behav_Consistency.py",
"lang": "Python"
} |
326 | 2 | DFS['b'] = [c[2] for c in DFS['rgb']] | 146 | 146 | [
"ListComp"
] | {
"hexsha": "f700d9479c9728354a66dc7a550274f53cde032e",
"max_stars_repo_name": "colizoli/letter_color_mri",
"max_stars_repo_path": "experiment/Behav_Consistency.py",
"lang": "Python"
} |
330 | 0 | _rs = multi_task.run(_task, [(_t, os.path.join(_d_inp, 'data'), os.path.join(_d_ref, 'data'), opts) for _t in multi_task.load(_ts, opts)], opts) | 145 | 145 | [
"ListComp"
] | {
"hexsha": "f700dc10cf350473ea1bc07b4576a52b3cab050a",
"max_stars_repo_name": "terraPulse/boreal-tcc-analysis",
"max_stars_repo_path": "src/bin/create_esta_layers.py",
"lang": "Python"
} |
330 | 1 | print('processed', len([_r for _r in _rs if _r]), 'tiles') | 146 | 146 | [
"ListComp"
] | {
"hexsha": "f700dc10cf350473ea1bc07b4576a52b3cab050a",
"max_stars_repo_name": "terraPulse/boreal-tcc-analysis",
"max_stars_repo_path": "src/bin/create_esta_layers.py",
"lang": "Python"
} |
333 | 0 | return '%s%s --> %s' % (''.join([x.source for x in self.key]),
', '.join([str(x) for x in self.pages]),
Command.__repr__(self)) | 47 | 49 | [
"ListComp"
] | {
"hexsha": "f700dcf909f39203bc9f428ef86290ba47cf8386",
"max_stars_repo_name": "perfectbark/LaTex2Docx",
"max_stars_repo_path": "plasTeX/Base/LaTeX/Index.py",
"lang": "Python"
} |
333 | 1 | output = [x for x in output if x] | 140 | 140 | [
"ListComp"
] | {
"hexsha": "f700dcf909f39203bc9f428ef86290ba47cf8386",
"max_stars_repo_name": "perfectbark/LaTex2Docx",
"max_stars_repo_path": "plasTeX/Base/LaTeX/Index.py",
"lang": "Python"
} |
333 | 2 | result = cmp(zip([collator(x) for x in self.sortkey if isinstance(x, basestring)],
[collator(x.textContent) for x in self.key],
self.key),
zip([collator(x) for x in other.sortkey if isinstance(x, basestring)],
[collator(... | 392 | 397 | [
"ListComp"
] | {
"hexsha": "f700dcf909f39203bc9f428ef86290ba47cf8386",
"max_stars_repo_name": "perfectbark/LaTex2Docx",
"max_stars_repo_path": "plasTeX/Base/LaTeX/Index.py",
"lang": "Python"
} |
333 | 3 | return ' '.join(['@'.join(self.sortkey),
'!'.join([x.source for x in self.key])]) | 404 | 405 | [
"ListComp"
] | {
"hexsha": "f700dcf909f39203bc9f428ef86290ba47cf8386",
"max_stars_repo_name": "perfectbark/LaTex2Docx",
"max_stars_repo_path": "plasTeX/Base/LaTeX/Index.py",
"lang": "Python"
} |
333 | 4 | return ' '.join(['@'.join(self.sortkey),
'!'.join([x.source for x in self.key]),
' '.join([x.source for x in self.format])]) | 407 | 409 | [
"ListComp"
] | {
"hexsha": "f700dcf909f39203bc9f428ef86290ba47cf8386",
"max_stars_repo_name": "perfectbark/LaTex2Docx",
"max_stars_repo_path": "plasTeX/Base/LaTeX/Index.py",
"lang": "Python"
} |
335 | 0 | print('\n'.join(str(x) for x in avg)) | 17 | 17 | [
"GeneratorExp"
] | {
"hexsha": "f700ddd360b85347609f21c1d6489abdde7537cf",
"max_stars_repo_name": "DonaldWhyte/high-performance-data-processing-in-python",
"max_stars_repo_path": "code/rolling_tests.py",
"lang": "Python"
} |
335 | 1 | print('\n'.join(str(x) for x in std)) | 19 | 19 | [
"GeneratorExp"
] | {
"hexsha": "f700ddd360b85347609f21c1d6489abdde7537cf",
"max_stars_repo_name": "DonaldWhyte/high-performance-data-processing-in-python",
"max_stars_repo_path": "code/rolling_tests.py",
"lang": "Python"
} |
335 | 2 | print('\n'.join(str(x) for x in std_fast)) | 28 | 28 | [
"GeneratorExp"
] | {
"hexsha": "f700ddd360b85347609f21c1d6489abdde7537cf",
"max_stars_repo_name": "DonaldWhyte/high-performance-data-processing-in-python",
"max_stars_repo_path": "code/rolling_tests.py",
"lang": "Python"
} |
336 | 0 | self.layer = nn.ModuleList([BertLayer(config) for _ in range(config.num_hidden_layers)]) | 29 | 29 | [
"ListComp"
] | {
"hexsha": "f700de8154178c1411a9769d01d40870fe625d67",
"max_stars_repo_name": "INK-USC/RiddleSense",
"max_stars_repo_path": "methods/transformers/examples/deebert/src/modeling_highway_bert.py",
"lang": "Python"
} |
336 | 1 | self.highway = nn.ModuleList([BertHighway(config) for _ in range(config.num_hidden_layers)]) | 30 | 30 | [
"ListComp"
] | {
"hexsha": "f700de8154178c1411a9769d01d40870fe625d67",
"max_stars_repo_name": "INK-USC/RiddleSense",
"max_stars_repo_path": "methods/transformers/examples/deebert/src/modeling_highway_bert.py",
"lang": "Python"
} |
336 | 2 | self.early_exit_entropy = [-1 for _ in range(config.num_hidden_layers)] | 32 | 32 | [
"ListComp"
] | {
"hexsha": "f700de8154178c1411a9769d01d40870fe625d67",
"max_stars_repo_name": "INK-USC/RiddleSense",
"max_stars_repo_path": "methods/transformers/examples/deebert/src/modeling_highway_bert.py",
"lang": "Python"
} |
341 | 0 | all_updated = sum([set['updated'] for set in all_processed]) | 54 | 54 | [
"ListComp"
] | {
"hexsha": "f700e28af26ab19a72197442b3b55696a4239890",
"max_stars_repo_name": "tulibraries/tulflow",
"max_stars_repo_path": "tulflow/harvest.py",
"lang": "Python"
} |
341 | 1 | all_deleted = sum([set['deleted'] for set in all_processed]) | 55 | 55 | [
"ListComp"
] | {
"hexsha": "f700e28af26ab19a72197442b3b55696a4239890",
"max_stars_repo_name": "tulibraries/tulflow",
"max_stars_repo_path": "tulflow/harvest.py",
"lang": "Python"
} |
341 | 2 | all_sets = [oai_set.xml.find("oai:setSpec", namespaces=NS).text for oai_set in list_sets] | 83 | 83 | [
"ListComp"
] | {
"hexsha": "f700e28af26ab19a72197442b3b55696a4239890",
"max_stars_repo_name": "tulibraries/tulflow",
"max_stars_repo_path": "tulflow/harvest.py",
"lang": "Python"
} |
343 | 0 | return [x for x in result if containing_str in x] | 148 | 148 | [
"ListComp"
] | {
"hexsha": "f700e563255eb9b5b51024e029510165ba3ade1b",
"max_stars_repo_name": "pailabteam/pailab",
"max_stars_repo_path": "pailab/tools/tree.py",
"lang": "Python"
} |
343 | 1 | [input_variables.remove(x) for x in target_variables] | 239 | 239 | [
"ListComp"
] | {
"hexsha": "f700e563255eb9b5b51024e029510165ba3ade1b",
"max_stars_repo_name": "pailabteam/pailab",
"max_stars_repo_path": "pailab/tools/tree.py",
"lang": "Python"
} |
343 | 2 | if not [item for item in input_variables if item in list(data)] == list(input_variables):
raise Exception('RawData does not include at least one column included in input_variables') | 244 | 245 | [
"ListComp"
] | {
"hexsha": "f700e563255eb9b5b51024e029510165ba3ade1b",
"max_stars_repo_name": "pailabteam/pailab",
"max_stars_repo_path": "pailab/tools/tree.py",
"lang": "Python"
} |
343 | 3 | if not [item for item in target_variables if item in list(data)] == list(target_variables):
raise Exception('RawData does not include at least one column included in target_variables') | 251 | 252 | [
"ListComp"
] | {
"hexsha": "f700e563255eb9b5b51024e029510165ba3ade1b",
"max_stars_repo_name": "pailabteam/pailab",
"max_stars_repo_path": "pailab/tools/tree.py",
"lang": "Python"
} |
345 | 0 | setup(name='Fibonacci',
version='1.0',
description='Python Distribution Utilities',
author='Kevin Chen',
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
) | 9 | 16 | [
"ListComp"
] | {
"hexsha": "f700e672cd17275a041dea32beccb6a84ec37569",
"max_stars_repo_name": "Damaen/Travis-Hello-world",
"max_stars_repo_path": "setup.py",
"lang": "Python"
} |
347 | 0 | combined = (flatpat for (_, flatpat, _, _) in some) | 408 | 408 | [
"GeneratorExp"
] | {
"hexsha": "f700e6f165ef83040ba85bd247ff66f7e13fa19c",
"max_stars_repo_name": "pmaillefert/Mywebsite",
"max_stars_repo_path": "Bottle.py",
"lang": "Python"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.