Update README.md
Browse files9 unmodified lines101112131415161718194 unmodified lines2425262728293031323334356 unmodified lines424344454647482 unmodified lines5152535455565758596061629 unmodified lines```pythonfrom datasets import load_datasetds = load_dataset("github-code", streaming=True, split="train")print(next(iter(ds))){'code': "import mod189 from './mod189';\nvar value=mod189+1;\nexport default value;\n",'repo_name': 'MirekSz/webpack-es6-ts',4 unmodified lines}```You can see that besides the code, repo name, and path also the programming language, license, and the size of the file are part of the dataset. You can also filter the dataset for any subset of the 30 included languages (see the full list below) in the dataset. Just pass the list of languages as a list:```pythonds = load_dataset("github-code", streaming=True, split="train", languages=["Dockerfile"])print(next(iter(ds))["code"])"""\FROM rockyluke/ubuntu:precise6 unmodified linesWe also have access to the license of the origin repo of a file so we can filter for licenses in the same way we filtered for languages:```pythonds = load_dataset("github-code", streaming=True, split="train", licenses=["mit", "isc"])licenses = []iterable = iter(ds)2 unmodified lineslicenses.append(element["license"])print(Counter(licenses))Counter({'mit': 9896, 'isc': 104})```Naturally, you can also download the full dataset. Note that this will download ~300GB compressed text data and the uncompressed dataset will take up ~1TB of storage:```pythonds = load_dataset("github-code", split="train")```## Languages9 unmodified lines101112131415161718194 unmodified lines242526272829303132333435366 unmodified lines434445464748492 unmodified lines525354555657585960616263649 unmodified lines```pythonfrom datasets import load_datasetds = load_dataset("lvwerra/github-code", streaming=True, split="train")print(next(iter(ds)))#OUTPUT:{'code': "import mod189 from './mod189';\nvar value=mod189+1;\nexport default value;\n",'repo_name': 'MirekSz/webpack-es6-ts',4 unmodified lines}```You can see that besides the code, repo name, and path also the programming language, license, and the size of the file are part of the dataset. You can also filter the dataset for any subset of the 30 included languages (see the full list below) in the dataset. Just pass the list of languages as a list. E.g. if your dream is to build a Codex model for Dockerfiles use the following configuration:```pythonds = load_dataset("lvwerra/github-code", streaming=True, split="train", languages=["Dockerfile"])print(next(iter(ds))["code"])#OUTPUT:"""\FROM rockyluke/ubuntu:precise6 unmodified linesWe also have access to the license of the origin repo of a file so we can filter for licenses in the same way we filtered for languages:```pythonds = load_dataset("lvwerra/github-code", streaming=True, split="train", licenses=["mit", "isc"])licenses = []iterable = iter(ds)2 unmodified lineslicenses.append(element["license"])print(Counter(licenses))#OUTPUT:Counter({'mit': 9896, 'isc': 104})```Naturally, you can also download the full dataset. Note that this will download ~300GB compressed text data and the uncompressed dataset will take up ~1TB of storage:```pythonds = load_dataset("lvwerra/github-code", split="train")```## Languages
README.md+8-6