{"id":18278363,"url":"https://github.com/panta/sample-n-files","last_synced_at":"2025-10-15T10:35:44.193Z","repository":{"id":137290947,"uuid":"154112026","full_name":"panta/sample-n-files","owner":"panta","description":"Randomly selects N files from a source directory, printing the names and/or copying to a destination directory.","archived":false,"fork":false,"pushed_at":"2018-10-22T13:00:28.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T22:51:40.233Z","etag":null,"topics":["command-line","pex","python","python3","tool","utility"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-22T08:42:50.000Z","updated_at":"2018-10-22T13:01:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b30a7c7-e78b-41df-b4ac-181bf170c68c","html_url":"https://github.com/panta/sample-n-files","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panta%2Fsample-n-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panta%2Fsample-n-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panta%2Fsample-n-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panta%2Fsample-n-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panta","download_url":"https://codeload.github.com/panta/sample-n-files/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980826,"owners_count":21027803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","pex","python","python3","tool","utility"],"created_at":"2024-11-05T12:24:09.766Z","updated_at":"2025-10-15T10:35:39.160Z","avatar_url":"https://github.com/panta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"README\n======\n\nThe `sample-n-files` command randomly selects `N` files from a source directory, printing the names and/or copying to a destination directory.\n\nIt requires Python 3 (tested with 3.6.5).\n\nThe build procedure creates a [pex](https://pex.readthedocs.io/en/stable/),\nwhich embeds all the dependencies in a single executable, and that can then be installed wherever you see fit.\n\n## Building and installing\n\nTo build:\n\n```bash\n$ make build\n```\n\nTo install:\n\n```bash\n$ make install\n```\n\n## Using\n\n```bash\n$ sample-n-files --help\nUsage: sample_n_files [OPTIONS] SRC DST\n\n  Sample `count` files, copying them from `src` to `dst`\n\nOptions:\n  --count INTEGER      Number of file to sample.\n  --prefix TEXT        Prefix of the files to consider\n  --printonly BOOLEAN  Print only instead of copying\n  --verbose BOOLEAN    Be verbose\n  --help               Show this message and exit.\n\n$ sample-n-files --count 25 --prefix \"dog\" --verbose yes cat_vs_dog/ dogs_selection/\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanta%2Fsample-n-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanta%2Fsample-n-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanta%2Fsample-n-files/lists"}