{"id":15378740,"url":"https://github.com/musale/project-euler-streak","last_synced_at":"2025-03-27T22:27:10.462Z","repository":{"id":82445425,"uuid":"81922479","full_name":"musale/project-euler-streak","owner":"musale","description":"Project Euler Streak Maker","archived":false,"fork":false,"pushed_at":"2017-02-15T14:42:53.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T00:42:53.885Z","etag":null,"topics":["euler","euler-exercises","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/musale.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":"2017-02-14T08:23:38.000Z","updated_at":"2018-05-03T16:31:54.000Z","dependencies_parsed_at":"2023-06-15T17:46:42.681Z","dependency_job_id":null,"html_url":"https://github.com/musale/project-euler-streak","commit_stats":{"total_commits":54,"total_committers":2,"mean_commits":27.0,"dds":0.07407407407407407,"last_synced_commit":"1fc439063d756ab1ae158ba4553f67d90af2c296"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musale%2Fproject-euler-streak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musale%2Fproject-euler-streak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musale%2Fproject-euler-streak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musale%2Fproject-euler-streak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/musale","download_url":"https://codeload.github.com/musale/project-euler-streak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245933562,"owners_count":20696269,"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":["euler","euler-exercises","python"],"created_at":"2024-10-01T14:16:47.094Z","updated_at":"2025-03-27T22:27:10.434Z","avatar_url":"https://github.com/musale.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Project Euler Streak Maker\n\u003e The purpose of this _bot_ is to help me achieve a streak on Github as I get to work on programming problems from [Project Euler](https://projecteuler.net/archives). The solutions repo it updates is [this one.](https://github.com/musale/euler-problems-python)\n\n### Set up\nThe project is written in `Python`. The executable file is the `run.py`\n#### Getting Started\n* clone this repo\n* run `pip install -r requirements.txt` to get the dependencies.\n* create a `.env` file and fill it with your variables for `GITHUB_USERNAME`\n  \u003e We need a Github `token` to enable us to make authenticated calls so generate one from [here](https://help.github.com/articles/creating-an-access-token-for-command-line-use/)\n* update your `.env` file with your `GITHUB_TOKEN`\n    \u003e Next we need to create a repo which will house the Euler problems that this bot will be creating. You can choose to use the same repo but:\n\n  1. You can't have a streak from forks\n  2. I don't want your commits (delete the `.git` folder in this after cloning. Push to your own repo now :wink:)\n* Create a new repo on Github. Now update your `.env` `GITHUB_REPO` to be this repo\n* If you deleted the `.git` folder, initialize this repo now to track your files.\n* run `python run.py`\n* check the repo you created on Github if it has a new file `001.py`. That's it.\n\n#### Cron?\nI created a cron to run this once a day\n\n`streak.sh`\n```\n#!/bin/bash\ncd /projects/project-euler-streak\n/usr/bin/python run.py\n```\nAnd then I fed it into `crontab -e`\n\n`0 14 * * * /projects/project-euler-streak/streak.sh`\n\nYou can pretty much use any scheduling tools you like\n\n### Credits\nComing up with this project, I had some handy libraries and resources online that really made my work easy.\n* [Euler Python Library](https://github.com/iKevinY/EulerPy) - helped me get the Euler problems by running the `euler` command. Nifty and handy!\n* [Github API V3](https://developer.github.com/v3) - good stuff. More examples please :sob:\n* [mdswanson.com](http://mdswanson.com/blog/2011/07/23/digging-around-the-github-api-take-2.html)\n* [Levi Botelho's Coding Blog](http://www.levibotelho.com/development/commit-a-file-with-the-github-api)\n* [Harlantwood's](https://gist.github.com/harlantwood/2935203) Ruby gist - I actually understood from this. :clap: :clap:\n* All you fine people answering questions on SO! Seriously, great stuff!!!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmusale%2Fproject-euler-streak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmusale%2Fproject-euler-streak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmusale%2Fproject-euler-streak/lists"}