Compare commits

...

22 Commits

Author SHA1 Message Date
4844f55bd3 🤗 stars 2023-05-17 13:44:50 +02:00
39cd33b22d 🤗 stars 2023-05-17 09:19:32 +02:00
6e3aca45cf 🤗 stars 2023-05-17 08:53:54 +02:00
6bd60794e7 🤗 stars 2023-05-17 08:52:13 +02:00
39a4060eb2 🤗 stars 2023-05-17 08:42:15 +02:00
dfbad16079 🤗 stars 2023-05-17 08:41:17 +02:00
d10d8ec447 🤗 stars 2023-05-17 08:38:48 +02:00
b1def680c0 🤗 stars 2023-05-17 08:21:11 +02:00
19636515c4 🤗 stars 2023-05-17 08:04:10 +02:00
b922ec0035 🤗 stars 2023-05-17 07:52:59 +02:00
dc87583edc 🤗 stars 2023-05-17 07:45:16 +02:00
485febe508 🤗 stars 2023-05-17 07:41:29 +02:00
3f490bc686 🤗 stars 2023-05-17 07:38:25 +02:00
0444b61859 🤗 stars 2023-05-17 07:32:31 +02:00
eefdaf8d7f 🤗 stars 2023-05-17 07:30:41 +02:00
6385ece180 🤗 stars 2023-05-17 07:27:42 +02:00
d3760b7b47 🤗 stars 2023-05-17 07:23:17 +02:00
be97928571 🤗 stars 2023-05-17 07:21:56 +02:00
2424ae7fda 🤗 stars 2023-05-17 07:19:42 +02:00
d5a92f9b30 🤗 stars 2023-05-17 07:17:27 +02:00
5cb2bb5329 🤗 stars 2023-05-17 07:13:39 +02:00
f37e077d30 🤗 stars 2023-05-17 07:11:57 +02:00
2 changed files with 60 additions and 0 deletions

29
.github/workflows/count_stars.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Count 🤗 stars ⭐
on:
push:
branches:
- fire
env:
HF_HOME: /mnt/cache
TRANSFORMERS_IS_CI: yes
OMP_NUM_THREADS: 8
MKL_NUM_THREADS: 8
RUN_SLOW: yes
SIGOPT_API_TOKEN: ${{ secrets.SIGOPT_API_TOKEN }}
TF_FORCE_GPU_ALLOW_GROWTH: true
RUN_PT_TF_CROSS_TESTS: 1
jobs:
send_results:
name: Send results to webhook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Count 🤗 stars ⭐
env:
ACCESS_REPO_INFO_TOKEN: ${{ secrets.ACCESS_REPO_INFO_TOKEN }}
shell: bash
run: |
python -u count_stars.py

31
count_stars.py Normal file
View File

@ -0,0 +1,31 @@
import os
import time
import requests
from datetime import datetime
def foo(token, old):
headers = None
if token is not None:
headers = {"Accept": "application/vnd.github+json", "Authorization": f"Bearer {token}"}
url = f"https://api.github.com/repos/huggingface/transformers"
result = requests.get(url, headers=headers).json()
count = result["stargazers_count"]
# print(f"⭐: {count}")
now = datetime.today().strftime('%Y-%m-%d %H:%M:%S')
if count != old:
print("-" * 40)
print(f"⭐: {count} | {now}")
return count
if __name__ == "__main__":
old = None
for i in range(20000):
time.sleep(5)
old = foo(token=os.environ["ACCESS_REPO_INFO_TOKEN"], old=old)