Skip to content

Instantly share code, notes, and snippets.

View st1vms's full-sized avatar
😎

Stefano Raneri st1vms

😎
View GitHub Profile
@st1vms
st1vms / binary_knapsack_solver.py
Last active July 18, 2025 23:28
Knapsack 0-1 solver
# -----------------------------------------------------------------------------
# Binary Knapsack Solver v0.1.0
# -----------------------------------------------------------------------------
# Copyright (c) 2025 Stefano Raneri
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@st1vms
st1vms / !Playing MIDI files with Pygame
Created February 5, 2024 16:02
Playing MIDI files with Pygame
Playing MIDI files with Pygame
@st1vms
st1vms / discord_fetch_threads.py
Created February 16, 2024 11:36
Fetch Discord threads data from a specific channel
"""Discord threads crawler module"""
from datetime import datetime
from dataclasses import dataclass
import requests
# Override user agent
USER_AGENT = ""
# Discord Authentication header
@st1vms
st1vms / linear_regr.py
Last active April 6, 2024 11:05
Linear Regression in Python
"""Linear Regression module"""
import numpy as np
class SimpleLinearRegressionModel:
"""Linear regression model class"""
def __init__(self, float_precision: int = 6) -> None:
@st1vms
st1vms / Coursera_DataScience_Exercise
Last active April 16, 2024 09:38
Coursera_Exercise_DataScience
## Where I store my assignments...
@st1vms
st1vms / Coursera_WebScraping_Exercise
Last active April 16, 2024 10:21
Coursera_WebScraping_Exercise
.
@st1vms
st1vms / check_bins.sh
Created April 24, 2024 08:30
GTFOBins checker
#!/usr/bin/bash
bins=(
"7z"
"aa-exec"
"ab"
"agetty"
"alpine"
"ansible-playbook"
"ansible-test"
@st1vms
st1vms / visit_bot.py
Created September 17, 2024 12:00
Bot for visitcount.itsvg.in used to auto generate views
"""Visit Count spammer bot"""
import multiprocessing
from time import sleep
import requests
BASE_GITHUB_URL = "https://github.com/"
BASE_VISITCOUNT_URL = "https://visitcount.itsvg.in/api"
BASE_VISITCOUNT_PARAMS = {
"id": None,
@st1vms
st1vms / fund_calc.py
Last active July 10, 2025 17:24
Fund calculator
# Requirements: pandas matplotlib
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import ticker
# Parameters
MONTHLY_INVESTMENT = 100
MONTHLY_RATES = [0.005] # All the monthly rates to simulate
@st1vms
st1vms / !CardCounting
Last active September 28, 2025 14:45
Card Counter
Card Counting software for Blackjack