{"id":17949991,"url":"https://github.com/noook/collatz","last_synced_at":"2025-04-03T15:43:54.316Z","repository":{"id":123778951,"uuid":"130809806","full_name":"noook/collatz","owner":"noook","description":null,"archived":false,"fork":false,"pushed_at":"2018-04-24T07:37:15.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T04:28:43.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-24T06:54:01.000Z","updated_at":"2018-04-24T07:37:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"82e71409-aa03-4347-b9bf-83b55412e941","html_url":"https://github.com/noook/collatz","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/noook%2Fcollatz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noook%2Fcollatz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noook%2Fcollatz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noook%2Fcollatz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noook","download_url":"https://codeload.github.com/noook/collatz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247031509,"owners_count":20872315,"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":[],"created_at":"2024-10-29T09:36:20.378Z","updated_at":"2025-04-03T15:43:54.288Z","avatar_url":"https://github.com/noook.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# collatz.py\n\nThis script calculates the biggest sequences of [Collatz Conjecture](https://en.wikipedia.org/wiki/Collatz_conjecture).\nThe script never ends, and takes no parameter.\n\n## The Algorithm:\n\nFor each number from 1 to infinite (as it never ends), we apply the Collatz conjecture and determine how much steps we do until we reach 1 (The Collatz conjecture says that regardless of the number we pick, we always reach 1). \n\n+ If the number is even :\n  + Divide it by 2\n+ If the number is odd :\n  + Multiply by 3 and add 1 to the result\nIn both case, it represents 1 step.\n\nRepeat until we reach 1.\n\n## How to run it forever ?\n\nI advise you to go on a server, and to run it in background as follows : \n\n```bash\nnohup python3 collatz.py \u0026\n```\n\nLogs are stored in the same directory as `collatz.py` is. You can check them whenever you want.\n\n### Can I see it online without having to log into my server ?\n\nSure, I made the file `index.php` for that. But you can't use it as it is. You have to modify it a little bit.\nAs `collatz.py` writes in a log file every biggest sequence he finds, you have to update the path to the log file in `index.php` line 18.\n\nI took care of fetching the PID automatically with the command line in the PHP file, you won't have to edit this line unless you rename the python file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoook%2Fcollatz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoook%2Fcollatz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoook%2Fcollatz/lists"}