Datasets:
ri_id
int64 | path
string | hexsha
string | size
int64 | ext_key
string | is_deleted
bool | ext
string | lang_ex
string |
---|---|---|---|---|---|---|---|
0 | .gitattributes | dfe0770424b2a19faf507a501ebfc23be8f54e7b | 66 | gitattributes | false | gitattributes | other |
0 | tree/sub1/f_sub1.txt | e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 | 0 | txt | false | txt | Text |
0 | tree/f_tree.txt | e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 | 0 | txt | false | txt | Text |
0 | test/test_version.py | 9cfa75c6fd9f1db675be783506d9740de6fcfce6 | 330 | py | false | py | Python |
0 | test/test_tree.py | f89e91b031cb6b21c1d6567e5b046ec3af9b98b0 | 643 | py | false | py | Python |
0 | test/test_help.py | f7cf1af21a04c19bccbcace394970421104868f8 | 817 | py | false | py | Python |
0 | setup.py | 1718ccba97b7395015ecea7feb2c69e811ed3ee9 | 2,252 | py | false | py | Python |
0 | arbory/subcommands/tree.py | 3387ed4057cd5cf379f3f23e6407f3c76a88e058 | 1,110 | py | false | py | Python |
0 | arbory/subcommands/config.py | 01960354ee0df0a9d6885c6ccdda2e18ca2b9309 | 1,544 | py | false | py | Python |
0 | arbory/subcommands/__init__.py | 56dac085576643fac64d1abfca3b7fade3bb0fb0 | 50 | py | false | py | Python |
0 | test/test_config.py | feef769e10c1fcae01cda7b4d194b8cf75191369 | 1,343 | py | false | py | Python |
0 | arbory/const.py | 691ae20818d0fc1e23eaeb2bb697fcaeda982edc | 97 | py | false | py | Python |
0 | arbory/config_spec.py | a9494cdabe565ad3c32117a0963422f417a18ab1 | 249 | py | false | py | Python |
0 | arbory/config.ini | a4a224941d053dc238f345ef100187592bd41753 | 150 | ini | false | ini | INI |
0 | arbory/__version__.py | 478b55126e0b7fa01246ee3bb4bce3c3aec35dc3 | 63 | py | false | py | Python |
0 | arbory/__init__.py | 7f45708543a5e0489741d02cc5a03615869c7b4f | 40 | py | false | py | Python |
0 | README.md | da3275bf75c81f0956e45c3c7f735377d58ae544 | 166 | md | false | md | Markdown |
0 | MANIFEST.in | 64ad321dfff2eb592df2776b35a1cf9131f44f1c | 26 | in | false | in | other |
0 | LICENSE | 6b751f7bda7cf67e93ef53db703f0d0f1a6ebabb | 1,315 | null | false | null | other |
0 | .gitignore | ae659d1bb710181d1ec457045424044ef88724d0 | 55 | gitignore | false | gitignore | other |
0 | arbory/core.py | 5c2cf251b8805f57c3ead202327b946979f662fa | 561 | py | false | py | Python |
1 | src/core/validation/validation.pipe.ts | f1b3cf4fc95346bf49bf5d6353449f25eff71285 | 1,363 | ts | false | ts | TypeScript |
1 | src/core/validation/validation.pipe.spec.ts | 3651eb4ab39ea4aef233ec111fd76152ebe673a3 | 180 | ts | false | ts | TypeScript |
1 | src/core/validation/validation.exception.ts | 8ceeb68786530d53bc0542fcd457204e6da7e069 | 510 | ts | false | ts | TypeScript |
1 | src/core/validation/validation.error.spec.ts | b7d1faff6354fbb5e623664b849eee5789cb3aa0 | 201 | ts | false | ts | TypeScript |
1 | src/core/form/paginate.spec.ts | 10cf88c3fd82ddde7b4733119482f5f43d527ee6 | 155 | ts | false | ts | TypeScript |
1 | src/core/terminus-options/terminus-options.service.spec.ts | 1facd0468b4c7cde9d37779457ef02f50d7e0472 | 524 | ts | false | ts | TypeScript |
1 | src/core/index.ts | 53c515eb298b9cc3dd4640bd5eedf1b495c24b5f | 231 | ts | false | ts | TypeScript |
1 | src/core/form/paginate.ts | 82bdbd3cee8cb545b95a1ff784f31c0df11bbb2c | 403 | ts | false | ts | TypeScript |
1 | src/example/example-filter.spec.ts | 5f5b49b6663a0b4cb8fe4e26835aa83c53bfc671 | 176 | ts | false | ts | TypeScript |
1 | src/core/terminus-options/terminus-options.service.ts | 3e9e522bc825f51f43717f31cb4b0db9067aecc2 | 1,086 | ts | false | ts | TypeScript |
1 | src/example/example-filter.ts | cb41026e285a09fa504818e30fc4b9d72f0cb2b1 | 441 | ts | false | ts | TypeScript |
1 | tsconfig.build.json | 64f86c6bd2bb30e3d22e752295eb7c7923fc191e | 97 | json | false | json | JSON |
1 | src/example/example.entity.ts | 9d653908bac05419698ddee0c933788486188944 | 395 | ts | false | ts | TypeScript |
1 | src/example/example.module.ts | 0b23646e3155dbb3eeeffe83bce49fcf51b87a53 | 370 | ts | false | ts | TypeScript |
1 | src/example/example.provider.ts | 821791a43ab184e8fa31504f25890082d41837a0 | 259 | ts | false | ts | TypeScript |
1 | src/example/example.service.spec.ts | 190f9f22f781fc659ad00085b50aa92476d23515 | 467 | ts | false | ts | TypeScript |
1 | src/example/example.service.ts | c88a1f6c92237da1ea13ffd6116afc3928252278 | 915 | ts | false | ts | TypeScript |
1 | src/example/example.spec.ts | 5da2138e1dabab6cc153cb41269e01adffe30722 | 427 | ts | false | ts | TypeScript |
1 | src/main.ts | c2621f1caa510239d2de0caf076d6f73f634f3ef | 1,870 | ts | false | ts | TypeScript |
1 | test/app.e2e-spec.ts | 50cda62332e9474925e819ff946358a9c40d1bf2 | 630 | ts | false | ts | TypeScript |
1 | test/jest-e2e.json | e9d912f3e3cefc18505d3cd19b3a5a9f567f5de0 | 183 | json | false | json | JSON |
1 | src/core/form/paginate-factory.ts | 24e6c75b99b4927e54e31991adbcb425ce9a1bce | 698 | ts | false | ts | TypeScript |
1 | tsconfig.json | 69f185fd9de8c2cb1ab8d2d6b753ec127b770c7e | 336 | json | false | json | JSON |
1 | src/example/example.entity.spec.ts | 1eaf6fe73d73507c6a052a9a77b4dbca14c089e6 | 176 | ts | false | ts | TypeScript |
1 | src/core/form/paginate-factory.spec.ts | 1ec421560eab4b351ed2eade5f75de72212ddfcd | 477 | ts | false | ts | TypeScript |
1 | src/core/database/database.provider.ts | 0127a265ba0a41850122aa03371a68ac663e4f6c | 1,285 | ts | false | ts | TypeScript |
1 | src/core/form/form-filter.ts | 2198cbce0450e6bf1fd652be8d4760d2264cda08 | 1,468 | ts | false | ts | TypeScript |
1 | .editorconfig | 4d33a9ab0336951b93bb1b783eb6cba05a80cdbf | 583 | editorconfig | false | editorconfig | other |
1 | .eslintrc.js | 0ae17cac2ff22a6fdd9039a5b3bb70446ab6bb3e | 599 | js | false | js | JavaScript |
1 | .gitignore | 5830f2c0e599ce80c9d89253832bd673ad848c93 | 1,699 | gitignore | false | gitignore | other |
1 | src/core/form/form.spec.ts | 8f132942006e035d435f21a573f149956aaf5f43 | 164 | ts | false | ts | TypeScript |
1 | .vscode/extensions.json | 0dcee9becf195a8849812845298d25f31f941500 | 250 | json | false | json | JSON |
1 | .vscode/launch.json | ea3ac31ef12d948e610531f27c860c881a103d14 | 252 | json | false | json | JSON |
1 | Dockerfile | 2ad8564a0bc5575e263974338926f8f0c032a41c | 382 | null | false | null | Dockerfile |
1 | LICENSE | 3e29b6b4f35eacd0a81693eae2cc572b4f6a4e49 | 1,073 | null | false | null | other |
1 | README.md | 265beb4355f206500e8550a671e8edcc9c02b3ec | 2,503 | md | false | md | Markdown |
1 | config/custom-environment-variables.yml | 1efe22e58d24a867fe973786d0919a9603989919 | 42 | yml | false | yml | YAML |
1 | config/default.yml | 5bca2aef6db218668565bb0fad58ccd60e51e376 | 772 | yml | false | yml | YAML |
1 | config/development.example.yml | e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 | 0 | yml | false | yml | YAML |
1 | .prettierrc | dcb72794f5300a3e0ccd2ad0669d802b62f3d370 | 51 | prettierrc | false | prettierrc | other |
1 | http/core.http | e50b07748d43412b208eb7327e044752c67f180a | 112 | http | false | http | HTTP |
1 | docker-compose.yml | acc77bf9b4f394d147ab1566ec78adda08113cca | 725 | yml | false | yml | YAML |
1 | src/app.service.ts | 927d7cca0badb13577152bf8753ce3552358f53b | 142 | ts | false | ts | TypeScript |
1 | src/app.module.ts | 4acf3b3717f5bedf1f53390e4034060459dcbbe5 | 445 | ts | false | ts | TypeScript |
1 | src/app.controller.ts | 8167a9e9a0a9a4a7527ca51c3306c2541cb0538f | 527 | ts | false | ts | TypeScript |
1 | src/core/core.module.ts | 802fcc7f0230bd0e4dc5ca460b4ed63595a96498 | 647 | ts | false | ts | TypeScript |
1 | package.json | 56ed04dcc25514d9feec186f1d67af0e66b1835e | 2,657 | json | false | json | JSON |
1 | package-lock.json | 0e284b8d811c2f6529a5c0fc1f0923da0b43f76f | 495,429 | json | false | json | JSON |
1 | nest-cli.json | 56167b36a14c2c69eb0db57302e2c44a1128b006 | 64 | json | false | json | JSON |
1 | http/example.http | e8b819b1a51cf64db2dd49309614c9ddb87a90b3 | 116 | http | false | http | HTTP |
1 | src/app.controller.spec.ts | d22f3890a380cea30641cfecc329b5c794ef5fb2 | 617 | ts | false | ts | TypeScript |
2 | src/configuration/core.js | f3db174db5380827c89406780c51bf39c8f8f572 | 1,257 | js | false | js | JavaScript |
2 | schemas/credentials.json | 1874f60c5fd280e39c41673414dda935bc57ecd0 | 75 | json | false | json | JSON |
2 | schemas/predefined.json | 0154ecef4dccf2ab051922b6812fa0551f40dcbe | 895 | json | false | json | JSON |
2 | src/actions/adhoc.js | cc508dc71607ccdd72f8ca1e63f676bde29ba9c5 | 639 | js | false | js | JavaScript |
2 | src/actions/predefined.js | ab8fde7d08e882495745479060abe78eeb6217e7 | 514 | js | false | js | JavaScript |
2 | src/config.js | c27e7d954cae56a4d72c76955db59acbc3dae649 | 267 | js | false | js | JavaScript |
2 | src/configuration/amqp.js | b094d2b4ae26606ff8187147ae6e5d539798b919 | 1,060 | js | false | js | JavaScript |
2 | src/index.js | de3974ad906b1e3891c67ef1f644fb53362afd97 | 41 | js | false | js | JavaScript |
2 | test/helpers.js | 747f3868b50ee8642d1cecd3d4c72b9563982397 | 3,208 | js | false | js | JavaScript |
2 | src/utils/test-error.js | 0024665af9dc1e9068613eaea346a8effe67d094 | 410 | js | false | js | JavaScript |
2 | test/.eslintrc | 7eeefc33b66c055f211388c46d17b50c45db7c25 | 37 | eslintrc | false | eslintrc | other |
2 | test/fixture/text.csv | 7cccd386d6671643ae2508f8197a572377ff7960 | 35 | csv | false | csv | CSV |
2 | test/suites/bin/send-email.js | 1d6f5270fd4051f2a5c7db67454f4781d66543dc | 2,770 | js | false | js | JavaScript |
2 | test/suites/ms-mailer.js | 5ec82f099d75736219a69864df0d572ca8271f0e | 5,040 | js | false | js | JavaScript |
2 | yarn.lock | a39372950e757861eaeaf8801a7f557238257394 | 386,968 | lock | true | lock | JSON |
2 | schemas/config.json | 9ad1eb4b5d15144dfaa8dff8866dfba6dcf11402 | 920 | json | false | json | JSON |
2 | src/mailer.js | 52db335e9aa93184ca8a9a78cd0d5972a343eb77 | 4,822 | js | false | js | JavaScript |
2 | schemas/common-mailer.json | 2788ae93e981775ff9cc3f3c18cb1ca6dd6edc7c | 6,980 | json | false | json | JSON |
2 | package.json | 30b59a315edd5d1b1f9a03a92910670875d56732 | 2,893 | json | false | json | JSON |
2 | schemas/README.md | bdc2b453a43eda310078190426e2f133d96d1f0f | 604 | md | false | md | Markdown |
2 | schemas/adhoc.json | dd5a294eda1cac81f83df6dadb4ec9189fcc8429 | 932 | json | false | json | JSON |
2 | .babelrc | bb317ed4fac2d432900c6332cb20199bd5287bdc | 256 | babelrc | false | babelrc | other |
2 | .dockerignore | 37406471413cdd0a347446533b7c067f665a7443 | 753 | dockerignore | false | dockerignore | other |
2 | .editorconfig | e717f5eb6387be229227ad8eba6a56f4cd904ade | 214 | editorconfig | false | editorconfig | other |
2 | .eslintignore | dd449725e188f816bcebfc05678064efcbc29a81 | 5 | eslintignore | false | eslintignore | other |
2 | .eslintrc | b5154ea7f1ba87367f5508553739ffb17744fba6 | 30 | eslintrc | false | eslintrc | other |
2 | .gitignore | 2102632c789ed123ace061e07308738531876f18 | 580 | gitignore | false | gitignore | other |
2 | .mdeprc | 43f44c649af66a2d3c0ffd5be0993b42a1053eec | 84 | mdeprc | false | mdeprc | other |
Dataset Card for The Stack Metadata
Changelog
Release | Description |
---|---|
v1.1 | This is the first release of the metadata. It is for The Stack v1.1 |
v1.2 | Metadata dataset matching The Stack v1.2 |
Dataset Summary
This is a set of additional information for repositories used for The Stack. It contains file paths, detected licenes as well as some other information for the repositories.
Supported Tasks and Leaderboards
The main task is to recreate repository structure from the files of The Stack. Also, the set can be used for computing statistics and custom filtering or aggregation operations on The Stack.
Dataset Structure
Data Fields
The set is split into buckets by repositories. There are 944 buckets. Additionally to the fields in the image, ri
contains min_repo_event_datetime
which is the ealiest date and time of an event for a repo after Jan 1 2015.
As an example of an aggregation operation on The Stack, the image above shows conceptually a selection of stars ( and issues and PR count) for a file. Each unique file can be part of multiple repositories. So, The Stack releases unique files and aggregates meta information (e.g stars) from all repositories it belongs to. For example, for max_stars_count we take the maximum number of stars from all repositories the file is part of.
The meta data will allow you to reconstruct repository directory structures. For this, for each repository form ri
tabele it is needed to take all its files from fi
table, find them in The Stack by file's hexsha
and save those files' content under its path for a repository from fi
table. For speed it is preferable to index The Stack by hexsha first.
Usage Example
Restore folder structure for python files in numpy repository
import datasets
from pathlib import Path
from tqdm.auto import tqdm
import pandas as pd
# assuming metadata is cloned into the local folder /data/hf_repos/the-stack-metadata
# the stack is cloned into the local folder /data/hf_repos/the-stack-v1.1
# destination folder is in /repo_workdir/numpy_restored
the_stack_meta_path = Path('/data/hf_repos/the-stack-metadata')
the_stack_path = Path('/data/hf_repos/the-stack-v1.1')
repo_dst_root = Path('/repo_workdir/numpy_restored')
repo_name = 'numpy/numpy'
# Get bucket with numpy repo info
# meta_bucket_path = None
#for fn in tqdm(list((the_stack_meta_path/'data').glob('*/ri.parquet'))):
# df = pd.read_parquet(fn)
# if any(df['name'] == repo_name):
# meta_bucket_path = fn
# break
meta_bucket_path = the_stack_meta_path / 'data/255_944'
# Get repository id from repo name
ri_id = pd.read_parquet(
meta_bucket_path / 'ri.parquet'
).query(
f'`name` == "{repo_name}"'
)['id'].to_list()[0]
# Get files information for the reopository
files_info = pd.read_parquet(
meta_bucket_path / 'fi.parquet'
).query(
f'`ri_id` == {ri_id} and `size` != 0 and `is_deleted` == False'
)
# Convert DF with files information to a dictionary by language and then file hexsha
# there can be more than one file with the same hexsha in the repo so we gather
# all instances per unique hexsha
files_info_dict = {
k: v[['hexsha', 'path']].groupby('hexsha').apply(lambda x: list(x['path'])).to_dict()
for k, v in files_info.groupby('lang_ex')
}
# Load Python part of The Stack
ds = datasets.load_dataset(
str(the_stack_path/'data/python'),
num_proc=10, ignore_verifications=True
)
# Save file content of the python files in the numpy reposirotry in their appropriate locations
def save_file_content(example, files_info_dict, repo_dst_root):
if example['hexsha'] in files_info_dict:
for el in files_info_dict[example['hexsha']]:
path = repo_dst_root / el
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(example['content'])
ds.map(
save_file_content,
fn_kwargs={'files_info_dict': files_info_dict['Python'], 'repo_dst_root': repo_dst_root},
num_proc=10
)
Dataset Creation
Please refer to the section in The Stack.
Considerations for Using the Data
Please refer to the section in The Stack.
Additional Information
Please refer to the section in The Stack.
Terms of Use for The Stack
Please refer to the section in The Stack.
- Downloads last month
- 771