{"id":20601869,"url":"https://github.com/tomasfn87/randomize","last_synced_at":"2026-05-29T08:31:08.502Z","repository":{"id":225261917,"uuid":"765492916","full_name":"tomasfn87/randomize","owner":"tomasfn87","description":"(( Use it on Google Colab: click the link below )) Python script that takes a JSON with a list and a JSON with the last result; by default it will choose an item from the list, avoiding the last result, but it can also select each item of the list once and generate a log file.","archived":false,"fork":false,"pushed_at":"2025-04-26T01:55:37.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T02:57:10.559Z","etag":null,"topics":["google-colab-notebook","json-logs","list","python3","randomizer"],"latest_commit_sha":null,"homepage":"https://colab.research.google.com/drive/1kAGGr3dOY30sIOwSJn89dm8s0IAjpJx7?usp=sharing","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomasfn87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-03-01T02:50:45.000Z","updated_at":"2025-04-26T01:55:41.000Z","dependencies_parsed_at":"2024-03-22T21:25:56.833Z","dependency_job_id":"8fe13dfc-3810-4b51-a01b-e5e7a4be6e0b","html_url":"https://github.com/tomasfn87/randomize","commit_stats":null,"previous_names":["tomasfn87/randomize"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomasfn87/randomize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Frandomize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Frandomize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Frandomize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Frandomize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasfn87","download_url":"https://codeload.github.com/tomasfn87/randomize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Frandomize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33644140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["google-colab-notebook","json-logs","list","python3","randomizer"],"created_at":"2024-11-16T09:12:17.398Z","updated_at":"2026-05-29T08:31:08.487Z","avatar_url":"https://github.com/tomasfn87.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Randomize\n\n- Python script that takes a JSON with a list and a JSON with the last result; it will choose an item from the list, avoiding the last result.\n\n## How to use\n\n```console\npython3 randomize.py\n```\n\n- 1. Run the command above to create initial JSON files;\n- 2. Edit `listToRandomize.json` with the result description and the data you need to randomize;\n- 3. Run the command above again and the result will be printed to the screen.\n\n### `--loop` option\n\n```console\npython3 randomize.py --loop 3\n```\n\n- The `--loop n` flag allows the program to be executed `n` times (`n` must be an integer).\n\n### `--no-repeat` option\n\n```console\npython3 randomize.py --no-repeat\n```\n\n- Running the program with the flag `--no-repeat` will make it avoid all items that were already selected until the whole list is over;\n- This option will also generate a nice log of the program execution in the file `alreadyRandomized.json`, thus generating an automatic report of an activity or process that needs random sorting to function.\n\n### How to backup a randomization session's data\n\n- Scripts `save_result_as_JSON.sh` and `save_result_as_MD.sh` read data from the session JSON files and save it to the corresponding file format, allowing the session data to backed up.\n\n#### Permissions\n\n```console\nchmod +x save_result_as_{JSON,MD}.sh\n```\n\n- First add execution permission to the scripts.\n\n---\n\n#### As `.json`\n\n```\n./save_result_as_JSON.sh 'file_name'\n```\n\n- If `jq` is installed the result will be printed to the screen;\n- Install it on `Debian` systems with\n\n```console\nsudo apt install -y jq\n```\n\n---\n\n#### As `.md`\n\n```\n./save_result_as_MD.sh 'file_name'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasfn87%2Frandomize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasfn87%2Frandomize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasfn87%2Frandomize/lists"}