Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (10 sloc) 430 Bytes
import json
IN_FOLDER = "data-codes-sources-fr-master/data/"
OUT_FOLDER = "stats/"
with open(IN_FOLDER + "repertoires/json/all.json") as f:
repertoires = json.load(f)
def last_repositories(repertoires):
last_repo = sorted(repertoires, key=lambda k: k["date_creation"], reverse=True)[:10]
with open(OUT_FOLDER + "last_repositories.json", "w") as f:
json.dump(last_repo, f)
last_repositories(repertoires)
You can’t perform that action at this time.