Skip to content

Instantly share code, notes, and snippets.

View odysseuskir's full-sized avatar

Odysseus Abraham Kirikopoulos odysseuskir

View GitHub Profile
@odysseuskir
odysseuskir / cpu-stresser.py
Created November 6, 2022 20:34
CPU Stresser
a = 0
while True:
a += 1
print(a)
@odysseuskir
odysseuskir / doom_clock.py
Last active May 13, 2023 09:34
Doom clock
import time
a = 8.94112903 * (10 ** 111)
while a > 0:
a -= 1
print(f"The heat death of the universe will occur in {a} minutes")
time.sleep(60)
@odysseuskir
odysseuskir / get_up.py
Created August 15, 2023 10:14
The doctor told me that I should get off the chair every 30 minutes to take a walk and come back, so I made this in Python.
import dbus
import time
item = "org.freedesktop.Notifications"
notfy_intf = dbus.Interface(
dbus.SessionBus().get_object(item, "/"+item.replace(".", "/")), item)
def countdown(t):
while t > 0:
@odysseuskir
odysseuskir / gpa_forecast.py
Last active October 27, 2023 20:42
Getting in a public university in Greece requires candidates to take the Panhellenics examination. Your average grades from the exam, must be above the university's required minimum grade. That required minimum grade changes every year, so I made this script that forecasts that grade for next year. Accuracy has not been proven yet!
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
years = np.array(range(2004, 2024)).reshape(-1, 1)
required_gpa = np.array(
[17.1, 17.1, 16.8, 17.1, 17.1, 17.6, 17.8, 16.3, 16.3, 15.5, 16.3, 16.0, 16.0, 15.8, 16.4, 16.7, 16.8, 17.3, 17.1,
17.7]) # Change me!
poly = PolynomialFeatures(degree=2)