{"id":22197844,"url":"https://github.com/onmax/nimiq.com-sources","last_synced_at":"2025-07-27T01:31:36.430Z","repository":{"id":85698340,"uuid":"557242726","full_name":"onmax/nimiq.com-sources","owner":"onmax","description":"Script to auto-generate sources used in nimiq.com","archived":false,"fork":false,"pushed_at":"2024-11-18T03:18:21.000Z","size":1053,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-30T14:41:52.334Z","etag":null,"topics":["github-api","github-stats","huggingface-transformers","python3","scripts","sentiment-analysis","twitter-api"],"latest_commit_sha":null,"homepage":"https://nimiq.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onmax.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}},"created_at":"2022-10-25T10:36:52.000Z","updated_at":"2024-11-18T03:18:24.000Z","dependencies_parsed_at":"2024-04-15T05:41:59.570Z","dependency_job_id":null,"html_url":"https://github.com/onmax/nimiq.com-sources","commit_stats":null,"previous_names":["onmax/nimiq.com-sources"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnimiq.com-sources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnimiq.com-sources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnimiq.com-sources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnimiq.com-sources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onmax","download_url":"https://codeload.github.com/onmax/nimiq.com-sources/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227741489,"owners_count":17812860,"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":["github-api","github-stats","huggingface-transformers","python3","scripts","sentiment-analysis","twitter-api"],"created_at":"2024-12-02T14:24:18.679Z","updated_at":"2024-12-02T14:24:19.362Z","avatar_url":"https://github.com/onmax.png","language":"Python","readme":"\u003cimg src=\"/icon.svg\" alt=\"Nimiq Stats Logo\" /\u003e\n\nThis repository contains the auto-generated sources that we use in [nimiq.com](https://nimiq.com).\n\nWe are using [Github Actions](.github/workflows/) It will run every Monday, Thursday and Saturday at 03:00 UTC.\n\n\n## Requirements\n\nYou should have the following environmental variables:\n\n- `GITHUB_TOKEN`: Read [docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).\n- `TWITTER_TOKEN`: Read [docs](https://developer.twitter.com/en/docs/authentication/oauth-2-0/bearer-tokens#:~:text=Login%20to%20your%20Twitter%20account,Bearer%20Token%20on%20this%20page.).\n- `LUNARCRUSH_TOKEN`: Read [docs](https://lunarcrush.com/developers/api/authentication).\n\n## Run the scripts\n\n```bash\npython3 ./src/tweets.py\npython3 ./src/stats.py\npython3 ./src/social_score.py\n```\n\n## What is it being generated?\n\n### Tweets\n\nWe like to know what the community is saying about Nimiq. \n\n- [tweets.py](./src/tweets.py)\n- [Tweets job](.github/workflows/fetch-data.yml#12)\n\n#### GitHub Action\n\n- [Tweets job](.github/workflows/fetch-data.yml#12)\n\n#### How do we do it?\n\nWe use [Twitter's API](https://developer.twitter.com/en/docs/twitter-api/tweets/search/introduction) to get the latest tweets that contain the word `nimiq`.\n\nThen, we filter the tweets using [finiteautomata/bertweet-base-sentiment-analysis](https://huggingface.co/finiteautomata/bertweet-base-sentiment-analysis) model from Hugging Face 🤗.\n\n#### Output\n\nWe store two tweets datasets: [All tweets](./output/tweets/tweets.json) and [Positive tweets](./output/tweets/positive-tweets.json).\n\n### GitHub Stats\n\nCompute the amount of commits and additions made in the last `N_WEEKS`.\n\n- [stats.py](./src/stats.py)\n- [Stats job](.github/workflows/fetch-data.yml#38)\n\n#### How do we do it?\n\nWe use [GitHub's statistics API](https://docs.github.com/en/rest/metrics/statistics) to get the stats of the last year, and then we filter the data to get the stats of the last `N_WEEKS`.\n\n#### Output\n\nWe store two files: [Stats](./output/stats/stats.json) and [Stats by repo](./output/stats/stats-by-repo.json).\n\n### Social score by LunarCrush\n\nFetchs social stats from [LunarCrush](https://lunarcrush.com/).\n\n- [social_score.py](./src/social_score.py)\n- [Social score job](.github/workflows/fetch-data.yml#61)\n\n#### How do we do it?\n\nWe use [Lunarcrush's API](https://lunarcrush.com/developers/api/coins/:coin) to get the stats of NIM. These are the stats we are using:\n\n- `social_score`:  Sum of followers, retweets, likes, reddit karma... of social posts collected\n- `social_score_24h_rank`: Position/rank of the output 24 hour social score relative to all other supported output, lower is best/highest social score\n- `average_sentiment`: Average sentiment of collected social posts\n- `sentiment_absolute`: Percent of bullish or very bullish tweets\n- `sentiment_relative`: Percent tweets that are bullish (excluding neutral in the count)\n- `social_impact_score`: A proprietary score based on the relative trend of social_score\n- `galaxy_score`: A proprietary score based on technical indicators of price, average social sentiment, relative social activity\n- `social_contributors`: The number of unique accounts posting on social\n- `social_volume_calc_24h`: Number of social posts over the last 24 hours\n- `social_score_calc_24h`: Sum of social engagement over the last 24 hours\n\n#### Output\n\nWe store the stats in [social-score.json](./output/social-score/social-score.json).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmax%2Fnimiq.com-sources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonmax%2Fnimiq.com-sources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmax%2Fnimiq.com-sources/lists"}