Skip to content

Instantly share code, notes, and snippets.

View amamic1803's full-sized avatar

Antonio Mamić amamic1803

  • Zagreb, Croatia
  • 00:06 (UTC +02:00)
View GitHub Profile
@amamic1803
amamic1803 / quadratic-equation-solver.py
Created September 10, 2025 11:04
A script to solve quadratic equation
def main():
print("Quadratic equation solver\n")
print("Enter equation:")
print(" - equation: a X^2 + b X + c = 0")
a = float(input(" - coefficient a: "))
b = float(input(" - coefficient b: "))
c = float(input(" - coefficient c: "))
solutions = solve_quadratic(a, b, c)
@amamic1803
amamic1803 / rename-random.py
Last active September 8, 2025 11:42
A script to randomly rename all items in a directory
import os
import random
def main():
print("#################### Rename Random ####################\n")
print("WARNING: This tool randomly renames all items in the\ngiven directory (while preserving file extensions)\n")
path = input("Enter directory path: ")
path = os.path.abspath(path)
@amamic1803
amamic1803 / monitor2sleep.py
Last active September 8, 2025 10:04
A script to put monitor to sleep
import ctypes
def main():
# load the user32 library
user32 = ctypes.windll.user32
# constants
HWND_BROADCAST = 0xFFFF
WM_SYSCOMMAND = 0x0112
@amamic1803
amamic1803 / vtt2srt.py
Last active August 10, 2025 22:46
A VTT to SRT subtitle converter
import functools
import os
import re
def main():
input_file = input("Input VTT file: ")
output_file = input("Output SRT file: ")
if os.path.exists(output_file):
@amamic1803
amamic1803 / coordinate-clicker.py
Last active September 8, 2025 11:41
A simple clicker over coordinates with start/stop controls
import itertools
import threading
import time
import keyboard
import mouse
RUNNING = False