feat: add api aggregations

This commit is contained in:
2026-08-08 23:37:54 +05:30
parent 5848cf9ff4
commit 30a5055d7c
14 changed files with 70411 additions and 0 deletions
+2
View File
@@ -174,3 +174,5 @@ cython_debug/
# PyPI configuration file # PyPI configuration file
.pypirc .pypirc
# JSON dumps
*.json
+3841
View File
File diff suppressed because one or more lines are too long
+50
View File
@@ -0,0 +1,50 @@
# import requests
from datetime import datetime
import json
# response = requests.post(
# "https://api.devfolio.co/api/search/hackathons",
# headers={
# "User-Agent": (
# "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
# "AppleWebKit/537.36 (KHTML, like Gecko) "
# "Chrome/151.0.0.0 Safari/537.36"
# ),
# "Origin": "https://devfolio.co",
# "Referer": "https://devfolio.co/",
# },
# json={
# "type": "application_open",
# "from": 0,
# "size": 100,
# },
# )
#
# hackathons = list(map(lambda v: v["_source"], response.json()["hits"]["hits"]))
# with open("devfolio.json", "w", encoding="utf-8") as file:
# file.write(response.text)
with open("devfolio.json") as file:
hackathons = list(
map(lambda v: v["_source"], json.loads(file.read())["hits"]["hits"])
)
# print(hackathons[0])
for hackathon in hackathons:
name = hackathon["name"]
location = hackathon["location"]
event_date = datetime.fromisoformat(hackathon["starts_at"]).date()
reg_start = datetime.fromisoformat(
hackathon["hackathon_setting"]["reg_starts_at"]
).date()
reg_end = datetime.fromisoformat(
hackathon["hackathon_setting"]["reg_ends_at"]
).date()
print(name)
print(f"Location: {location}")
print(f"Event Date: {event_date}")
print(f"Registration: {reg_start} - {reg_end}")
print()
+30734
View File
File diff suppressed because it is too large Load Diff
+46
View File
@@ -0,0 +1,46 @@
# import requests
from datetime import datetime
import json
# response = requests.get(
# "https://devnovate.co/api/v1/events",
# headers={
# "User-Agent": (
# "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
# "AppleWebKit/537.36 (KHTML, like Gecko) "
# "Chrome/151.0.0.0 Safari/537.36"
# ),
# },
# )
#
# with open("devnovate.json", "w", encoding="utf-8") as file:
# file.write(response.text)
with open("devnovate.json") as file:
hackathons = json.loads(file.read())
for hackathon in hackathons:
if (
hackathon["registrationStatus"] != "OPEN"
or hackathon["name"] == "test"
or (
hackathon["eventType"] != "hackathon"
and "hackathon" not in hackathon["name"]
and "hackathon" not in hackathon["subtitle"]
)
):
continue
name = hackathon["name"]
location = hackathon["location"]
event_date = hackathon["startDate"]
reg_end = datetime.fromisoformat(hackathon["registrationDeadline"])
if reg_end.timestamp() < datetime.now().timestamp():
continue
print(name)
print(f"Location: {location}")
print(f"Event Date: {event_date}")
print(f"Registration End: {reg_end.date()}")
print()
+127
View File
@@ -0,0 +1,127 @@
{
"success": true,
"message": "Public Event listing",
"data": [
{
"_id": "6a69d512984ddea492a29a5a",
"eventUrl": "bitsom-pitchfest2026",
"title": "BITSoM Vertex Builders' Pitch Fest 2026",
"thumbnail": "https://storage.googleapis.com/vision-hack2skill-production/innovator/USER01338782/1786010583153-homepagebitsom.webp",
"registrationStart": "2026-08-05T07:40:00.000Z",
"registrationEnd": "2026-09-06T18:25:00.000Z",
"submissionStart": "2026-08-05T07:41:00.000Z",
"submissionEnd": "2026-09-06T18:29:00.000Z",
"ticket": "FREE",
"mode": "HYBRID",
"participation": "Team",
"flag": "FLAGSHIP",
"index": 1
},
{
"_id": "6a4e52bc6c0b4168b23b92bd",
"eventUrl": "ai-codesarathi",
"title": "AI-Code Sarathi",
"thumbnail": "https://storage.googleapis.com/vision-hack2skill-production/innovator/USER00000008/1785928359628-homepageaicodesarathi.webp",
"registrationStart": "2026-07-30T13:38:00.000Z",
"registrationEnd": "2026-09-05T13:38:00.000Z",
"submissionStart": null,
"submissionEnd": null,
"ticket": "FREE",
"mode": "VIRTUAL",
"participation": "Individual",
"flag": "FLAGSHIP",
"index": 2
},
{
"_id": "6a47421ab7e5e377d3011ded",
"eventUrl": "unilog2026",
"title": "UniHack",
"thumbnail": "https://storage.googleapis.com/vision-hack2skill-production/innovator/USER00000009/1785760903321-homepageunilog.webp",
"registrationStart": "2026-07-29T05:01:00.000Z",
"registrationEnd": "2026-08-23T05:01:00.000Z",
"submissionStart": "2026-07-29T05:01:00.000Z",
"submissionEnd": "2026-08-23T05:01:00.000Z",
"ticket": "FREE",
"mode": "VIRTUAL",
"participation": "Team",
"flag": "FLAGSHIP",
"index": 3
},
{
"_id": "6a3ceacd3a30dadf5f4776d3",
"eventUrl": "apac-genaiacademy-c3",
"title": "Gen AI Academy APAC Edition",
"thumbnail": "https://storage.googleapis.com/vision-hack2skill-production/innovator/USER00000009/1785156557858-image6.webp",
"registrationStart": "2026-07-16T08:46:00.000Z",
"registrationEnd": "2026-08-31T08:46:00.000Z",
"submissionStart": "2026-07-27T10:30:00.000Z",
"submissionEnd": "2026-08-31T18:29:00.000Z",
"ticket": "FREE",
"mode": "HYBRID",
"participation": "Team",
"flag": "FLAGSHIP",
"index": 4
},
{
"_id": "69f051e249097564b5d45161",
"eventUrl": "datathon-2026",
"title": "IBM Z Datathon 2026",
"thumbnail": "https://storage.googleapis.com/vision-hack2skill-production/innovator/USER00219668/1781535587340-IBMZFlyer21.webp",
"registrationStart": "2026-06-19T04:30:00.000Z",
"registrationEnd": "2026-10-01T06:29:00.000Z",
"submissionStart": "2026-07-31T18:30:00.000Z",
"submissionEnd": "2026-10-05T18:29:00.000Z",
"ticket": "FREE",
"mode": "HYBRID",
"participation": "Team",
"flag": "COMMUNITY",
"index": 5
},
{
"_id": "69cca4b245645a10e1172e76",
"eventUrl": "pwvirtual1",
"title": "Virtual: PromptWars",
"thumbnail": "https://storage.googleapis.com/vision-hack2skill-production/innovator/USER00000009/1775555602339-PromptWarsVirtualHomepage.webp",
"registrationStart": "2026-04-01T08:30:00.000Z",
"registrationEnd": "2026-11-30T04:53:00.000Z",
"submissionStart": null,
"submissionEnd": null,
"ticket": "FREE",
"mode": "VIRTUAL",
"participation": "Individual",
"flag": "FLAGSHIP",
"index": 6
},
{
"_id": "6991f48ef55c0f157228b7f5",
"eventUrl": "bootcamps-2026",
"title": "Build with AI: Bootcamps",
"thumbnail": "https://storage.googleapis.com/vision-hack2skill-production/innovator/USER00000009/1773139511922-image336.webp",
"registrationStart": "2026-02-15T16:30:00.000Z",
"registrationEnd": "2026-11-30T16:30:00.000Z",
"submissionStart": null,
"submissionEnd": null,
"ticket": "FREE",
"mode": "IN_PERSON",
"participation": "Individual",
"flag": "FLAGSHIP",
"index": 7
},
{
"_id": "6991a6b1f55c0f157226ed0b",
"eventUrl": "promptwarsdelhincr",
"title": "Build with AI: PromptWars",
"thumbnail": "https://storage.googleapis.com/vision-hack2skill-production/innovator/USER00000009/1773748967253-HomepagePWIP.webp",
"registrationStart": "2026-02-15T10:57:00.000Z",
"registrationEnd": "2026-10-10T10:57:00.000Z",
"submissionStart": null,
"submissionEnd": null,
"ticket": "FREE",
"mode": "IN_PERSON",
"participation": "Individual",
"flag": "FLAGSHIP",
"index": 8
}
],
"pages": 1
}
+28
View File
@@ -0,0 +1,28 @@
# import requests
from datetime import datetime
import json
# response = requests.get(
# "https://hack2skill.com/api/v1/innovator/public/event/public-list?page=1&records=27&isRegistrationOngoing=true",
# headers={
# "User-Agent": (
# "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
# "AppleWebKit/537.36 (KHTML, like Gecko) "
# "Chrome/151.0.0.0 Safari/537.36"
# ),
# },
# )
#
# with open("hack2skill.json", "w", encoding="utf-8") as file:
# file.write(response.text)
with open("hack2skill.json") as file:
hackathons = json.loads(file.read())["data"]
for hackathon in hackathons:
name = hackathon["title"]
reg_end = datetime.fromisoformat(hackathon["registrationEnd"]).date()
print(name)
print(f"Registration End: {reg_end}")
print()
+2512
View File
File diff suppressed because it is too large Load Diff
+44
View File
@@ -0,0 +1,44 @@
# import requests
from datetime import datetime
import json
# response = requests.get(
# "https://api.hackculture.io/api/v1/hackathons?limit=50&response_type=card&sort_by=start_datetime&sort_order=-1",
# headers={
# "User-Agent": (
# "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
# "AppleWebKit/537.36 (KHTML, like Gecko) "
# "Chrome/151.0.0.0 Safari/537.36"
# ),
# "Origin": "https://hackculture.io",
# "Referer": "https://hackculture.io/",
# },
# )
#
# with open("hackculture.json", "w", encoding="utf-8") as file:
# file.write(response.text)
with open("hackculture.json") as file:
hackathons = json.loads(file.read())
# print(hackathons[0])
for hackathon in hackathons:
if not hackathon["is_registration_open"] or hackathon["type"] != "hackathon":
continue
name = hackathon["name"]
org = hackathon["organizer_name"]
location = None
if hackathon["location"]:
location = hackathon["location"]["name"]
if hackathon["location"]["address"]:
location += ", " + hackathon["location"]["address"]
event_date = datetime.fromisoformat(hackathon["end_datetime"])
print(name)
print(f"Organizer: {org}")
print(f"Location: {location}")
print(f"Event Date: {event_date.date()}")
print()
+5
View File
@@ -0,0 +1,5 @@
certifi==2026.7.22
charset-normalizer==3.4.9
idna==3.18
requests==2.34.2
urllib3==2.7.0
+1502
View File
File diff suppressed because it is too large Load Diff
+53
View File
@@ -0,0 +1,53 @@
# import requests
from datetime import datetime
import json
# import re
# response = requests.get(
# "https://reskilll.com/discover",
# headers={
# "User-Agent": (
# "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
# "AppleWebKit/537.36 (KHTML, like Gecko) "
# "Chrome/151.0.0.0 Safari/537.36"
# ),
# },
# )
#
#
# def strip_undefined(obj):
# if isinstance(obj, dict):
# return {k: strip_undefined(v) for k, v in obj.items() if v != "$undefined"}
# elif isinstance(obj, list):
# return [strip_undefined(element) for element in obj]
# return obj
#
#
# def extract_data(html):
# match = re.search(r'\\"initialData\\":(\[.*?\])\}\]\]', html, re.DOTALL)
# if match:
# return strip_undefined(
# json.loads(bytes(match.group(1), "utf-8").decode("unicode_escape"))
# )
# return None
#
# with open("reskilll.json", "w", encoding="utf-8") as file:
# file.write(json.dumps(extract_data(response.text)))
with open("reskilll.json") as file:
hackathons = json.loads(file.read())
for hackathon in hackathons:
name = hackathon["title"]
org = hackathon["organizer"]
location = hackathon["location"]
reg_end = datetime.strptime(hackathon["deadline"], "%b %d, %Y")
if reg_end.timestamp() < datetime.now().timestamp():
continue
print(name)
print(f"Organizer: {org}")
print(f"Location: {location}")
print(f"Registration End: {reg_end.date()}")
print()
+31420
View File
File diff suppressed because one or more lines are too long
+47
View File
@@ -0,0 +1,47 @@
# import requests
from datetime import datetime
import json
# BASE_URL = "https://unstop.com/api/public/opportunity/search-result"
# PARAMS = {
# "opportunity": "hackathons",
# "oppstatus": "open",
# "per_page": "200",
# }
# HEADERS = {
# "User-Agent": (
# "Mozilla/5.0 (X11; Linux x86_64) "
# "AppleWebKit/537.36 (KHTML, like Gecko) "
# "Chrome/151.0.0.0 Safari/537.36"
# )
# }
#
# request_url = BASE_URL + "?" + "&".join(f"{k}={v}" for k, v in PARAMS.items())
# response = requests.get(request_url, headers=HEADERS)
#
# with open("unstop.json", "w", encoding="utf-8") as file:
# file.write(response.text)
#
# hackathons = response.json()["data"]["data"]
with open("unstop.json") as file:
hackathons = json.loads(file.read())["data"]["data"]
for hackathon in hackathons:
title = hackathon["title"]
org = hackathon["organisation"]["name"]
location = hackathon["address_with_country_logo"]["address"]
event_date = datetime.fromisoformat(hackathon["end_date"]).date()
reg_start = datetime.fromisoformat(
hackathon["regnRequirements"]["start_regn_dt"]
).date()
reg_end = datetime.fromisoformat(
hackathon["regnRequirements"]["end_regn_dt"]
).date()
print(title)
print(f"Organization: {org}")
print(f"Location: {location}")
print(f"Event Date: {event_date}")
print(f"Registration: {reg_start} - {reg_end}")
print()