|
Download tasks/readable/041/task_readable.md from megagonlabs/arcs: direct link, hf CLI and curl.
- Browser
- Download file 906 Bytes
-
https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/041/task_readable.md
- Command line
-
hf download hf://datasets/megagonlabs/arcs/tasks/readable/041/task_readable.md
-
curl -L -o task_readable.md https://huggingface.co/datasets/megagonlabs/arcs/resolve/main/tasks/readable/041/task_readable.md
906 Bytes
Task: 041
Database: github_repos
Question
Use the GITHUB_REPOS_* tables to count the total number of sample files in projects with Python and over 10 watchers.
Gold Query
WITH python_repos AS (
SELECT DISTINCT sc.sample_repo_name as repo_name
FROM GITHUB_REPOS_SAMPLE_CONTENTS sc
WHERE LOWER(sc.sample_path) LIKE '%.py'
),
watch_repos AS (
SELECT DISTINCT sr.repo_name
FROM GITHUB_REPOS_SAMPLE_REPOS sr
WHERE sr.watch_count > 10
)
SELECT COUNT(CASE WHEN sf.repo_name IN (SELECT pr.repo_name FROM python_repos pr) THEN 1 ELSE NULL END) AS python_file_count,
COUNT(CASE WHEN sf.repo_name IN (SELECT wr.repo_name FROM watch_repos wr) THEN 1 ELSE NULL END) AS watch_file_count
FROM GITHUB_REPOS_SAMPLE_FILES sf;
Execution Result:
| python_file_count | watch_file_count |
|---|---|
| 35 | 224 |
1 rows