Update README.md
Browse files9 unmodified lines1011121313141516161718194 unmodified lines2425262727282930303132333435366 unmodified lines43444545464748492 unmodified lines52535455565758596059616263649 unmodified lines```pythonfrom datasets import load_dataset
ds = load_dataset("github-code", streaming=True, split="train")ds = 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: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("github-code", streaming=True, split="train", languages=["Dockerfile"])ds = load_dataset("lvwerra/github-code", streaming=True, split="train", languages=["Dockerfile"])print(next(iter(ds))["code"])
#OUTPUT:"""\FROM rockyluke/ubuntu:precise
6 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"])ds = load_dataset("lvwerra/github-code", streaming=True, split="train", licenses=["mit", "isc"])
licenses = []iterable = iter(ds)2 unmodified lines licenses.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("github-code", split="train")ds = load_dataset("lvwerra/github-code", split="train")```
## LanguagesREADME.md+8-6