Skip to content

Instantly share code, notes, and snippets.

## NOTE
## I'm only releasing this code for educational purposes
## Do not abuse it please
## And this is terrible code, so don't use this as a reference on how to code properly
## Made for: https://youtu.be/E3gf88rSzqo
from PIL import Image
from PIL import ImageFilter
import math
import wave
import struct
@rebane2001
rebane2001 / keybase.md
Created September 25, 2018 14:50
Verification of sorts

Keybase proof

I hereby claim:

  • I am rebane2001 on github.
  • I am rebane2001 (https://keybase.io/rebane2001) on keybase.
  • I have a public key ASCRS5qGKG2CuxsPwvZ2BH_VFLOnVh4iHspFOYTiFpbhjwo

To claim this, I am signing this object:

@rebane2001
rebane2001 / tähed.py
Last active October 2, 2020 15:44
Skript, mis annab tähtede kohta statistikat sõna kohta. Pole just parim lahendus, kuid kui keegi viitsib selle funktsiooniks valmis kirjutada saab ka oma projektides kasutada
# Siia tuleb sõna mille kohta on soov info leida
sona = "kuulilennuteetunneliluuk"
tüübid = {
"Tagavokaalid": "uõoa",
"Eesvokaalid": "iüeöä",
"Täishäälikud": "aeiouõöäü",
"Kaashäälikud": "jlmnrszhfšžkgpbtd",
"Helilised häälikud": "aeiouõöäüjlmnrv",
"Helitud häälikud": "szhfšžkgpbtd",
@rebane2001
rebane2001 / lasermouse.py
Created September 27, 2018 19:19
Simple script to control your mouse pointer with a laser and a webcam (only works on Windows)
import cv2
import numpy as np
import win32api, win32con
import math
webcam_x = 640 #Set webcam resolution
webcam_y = 640
screen_x = 1280 #Set screen resolution
screen_y = 1024
#NOTE = ONLY WORKS IN PYTHON 3 (MAYBE WORKS IN PYTHON 2 I HAVNe' TESTED")
import os
import sys
import urllib.request
print("Supports INFINITE LENGHT (unlimited)")
len = input("Enter how many letters do you want (no support for words in 1.0 version yet):")
File_Name = "lorem.txt"
OUTPUTXT = ""
urllib.request.urlretrieve ("https://en.wikipedia.org/wiki/Lorem_ipsum", File_Name)
with open("lorem.txt","r") as loremtxt1:
@rebane2001
rebane2001 / rabool-js.html
Last active March 20, 2023 15:37 — forked from petskratt/xkcd_pwd_gen.php
Generate xkcd style password using most common 1000 Estonian words (Ansip and Savisaar excluded)
<!doctype html>
<html lang="et">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Salasõna-pulpulaator | rabool-js</title>
<style>
html {
background-color: #fafafa
}
@rebane2001
rebane2001 / fotoalbum-dl.py
Created September 30, 2020 13:07
Laeb alla fotoalbum.ee albumeid
import urllib.request
import re
base_url = "http://fotoalbum.ee"
album = input("Sisesta fotoalbum.ee albumi link:")
album = album.split("?")[0]
if not "/sets/" in album:
print("Hoiatus: Link pole album ning võib seetõttu valesti toimida")
pildid = []
import json
import sys
if len(sys.argv) < 2:
print("infojsonredact - A simple script to redact private information from ytdl info.json files")
print("Output will be saved in info.json.redacted files")
print("Usage: infojsonredact.py file1.info.json [file2.info.json, file3.info.json...]")
sys.exit(2)
redacted = ["url","manifest_url","fragment_base_url","fragments","http_headers","User-Agent","Accept-Charset","Accept","Accept-Encoding","Accept-Language","player_url","playlist","playlist_id","playlist_title","playlist_uploader","playlist_uploader_id","playlist_index","thumbnail","_filename","downloader_options","http_chunk_size","initialization_url","annotations", "playlist_count","version","_version","repository","release_git_head","filesize_approx","_format_sort_fields"]
@rebane2001
rebane2001 / README.md
Last active June 29, 2024 01:01 — forked from corentinbettiol/README.md
Tiny js code that will simulate a 3D view of your elements, like firefox used to do.

example gif

Explanations

This script will get the computed background color of your body, and then will create shadows darker than your background (if you have a light background), or lighter than your background (if you have a dark background). If the body does not have a background, the script will take 160 as the default value for red, green and blue.

It will then add a border, a box-shadow, a padding and a margin to each element of your page, and will use the cool rotate3d css function to tilt your website.

Install

# Simple script to convert trs files to srt. May not be perfect, so edit this script as necessary.
# Warning, this script is unsafe to use against untrusted data.
# See for more info: https://docs.python.org/3/library/xml.html#xml-vulnerabilities
from datetime import timedelta
from xml.dom import minidom
import srt
subs = []