Skip to content

Instantly share code, notes, and snippets.

@henrydatei
henrydatei / xrel.py
Created August 1, 2023 13:00
Searches xrel.to to find a release for a movie which is between 7.5 GB and 12 GB big
import requests
from bs4 import BeautifulSoup
def getSceneReleases(link):
newLink = link.split(".html")[0] + "/releases.html"
cookies = {"notice_understood":"1"}
r2 = requests.get(newLink, cookies = cookies)
soup = BeautifulSoup(r2.text, features = "lxml")
sceneReleases = soup.find_all("div", {"class": "release_item"})
liste = []
@henrydatei
henrydatei / energy.py
Created August 1, 2023 12:55
Analyse what Energy Sachsen (a radio broadcast station) has played via their API
from collections import Counter
import requests
def getTotalSongLength(day, hour):
dauer = 0
params = {"day": day, "hour": hour}
req = requests.get("https://api.nrjnet.de/webradio/playlist/energy/sachsen", params = params)
req.raise_for_status()
for title in req.json()["playlist"]["songs"]:
duration = title["duration"].split(":")
@henrydatei
henrydatei / datacamp-solution-extractor.py
Created January 24, 2022 22:09
extracts the solution for Datacamp courses
import requests
import re
import html
from urllib.parse import urlparse, parse_qs
import difflib
import csv
from io import StringIO
# data is provided by Datacamp in a weired mixture of JSON and CSV, so I wrote my own function so find specific information
def findString2(result, search):
@henrydatei
henrydatei / Algorithmen Logistik.tex
Created April 7, 2021 15:04
Algorithmen für Logistik
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage[left=2.1cm,right=3.1cm,bottom=3cm,footskip=0.75cm,headsep=0.5cm]{geometry}
\usepackage{enumerate}
\usepackage{enumitem}
@henrydatei
henrydatei / file.tex
Created March 11, 2021 18:49
WolframAlpha für Mathe 2
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage[left=2.1cm,right=3.1cm,bottom=3cm,footskip=0.75cm,headsep=0.5cm]{geometry}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{marvosym}
@henrydatei
henrydatei / file.tex
Created March 11, 2021 18:49
WolframAlpha für Mathe 1
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage[left=2.1cm,right=3.1cm,bottom=3cm,footskip=0.75cm,headsep=0.5cm]{geometry}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{marvosym}
@henrydatei
henrydatei / ppsx-to-video.sh
Last active July 13, 2021 17:55
Create a video from a ppsx-file
#!/bin/bash
#passende Ordner erstellen
read -p "Nummer der Vorlesung " nummer
mkdir -p Einzelseiten
mkdir -p Einzelseiten/VL$nummer
mkdir -p Einzelseiten/VL$nummer/audio
mkdir -p Einzelseiten/VL$nummer/jpg
mkdir -p Einzelseiten/VL$nummer/pdf
# mkdir -p Einzelseiten/VL$nummer/png
@henrydatei
henrydatei / vcs-downloader.sh
Last active March 9, 2023 09:34
Download a video from Videocampus Sachsen
#file=$1
#videoname=$(echo "$file" | cut -d "." -f1)
#echo "$videoname"
touch playlist.txt
touch urllist.txt
key=$1
videoname=$2
#keystring=$(cat $file | grep -o -E "key=[0-9,a-z]+")
@henrydatei
henrydatei / document.tex
Created November 5, 2020 08:33
Internetökonomie - Fragenkatalog
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{parskip}
\usepackage[left=2.1cm,right=3.1cm,bottom=2.3cm,footskip=0.75cm,headsep=0.5cm]{geometry}
\usepackage[ngerman]{babel}
\usepackage{enumerate}
\usepackage{longtable}
\title{GDIÖ Selbsttest \LaTex Dokument}
\author{Felix Hauspurg}
\date{October 2020}
@henrydatei
henrydatei / TR-Rechner.tex
Last active October 23, 2020 16:50
unbekannte Funktionen des Taschenrechners
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage[left=2.1cm,right=3.1cm,bottom=3cm,footskip=0.75cm,headsep=0.5cm]{geometry}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{marvosym}
\usepackage{tabularx}