This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "covergen" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
tiny-skia = "0.11.4" | |
realfft = "3.3.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: ffmpeg_telegram_video_sticker: <video_in> <time <= 3> [<chromakey color in hex>] [<chromakey similarity>] | |
ffmpeg_telegram_video_sticker() { | |
PWD_START=$(pwd) | |
TMPDIR=/tmp/sticker-$(date +%Y-%m-%d-%H:%M:%S) | |
mkdir $TMPDIR | |
cp $1 $TMPDIR/ | |
cd $TMPDIR | |
ffmpeg -i $1 $(if [[ ! -z $3 && ! -z $4 ]]; then echo -vf "chromakey=\#$3:$4:0"; fi) -c copy -c:v png -t $2 tmp.mov | |
ffmpeg -y -i tmp.mov -r 30 -t $2 -an -c:v libvpx-vp9 -pix_fmt yuva420p -vf 'scale=512:512:force_original_aspect_ratio=decrease' -b:v 350K ${1}_sticker.webm | |
cp ${1}_sticker.webm $PWD_START/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMON_FLAGS="-march=native -O2 -pipe" | |
CFLAGS="${COMMON_FLAGS}" | |
CXXFLAGS="${COMMON_FLAGS}" | |
FCFLAGS="${COMMON_FLAGS}" | |
FFLAGS="${COMMON_FLAGS}" | |
CHOST="aarch64-unknown-linux-gnu" | |
ACCEPT_KEYWORDS="~arm64" | |
MAKEOPTS="-j8" | |
LLVM_TARGETS="AArch64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def iterate(l, ost): | |
if ost == 0: return l | |
newL = [] | |
for i in l: | |
for k in "01": newL.append(i + k) | |
return iterate(newL, ost - 1) | |
func = input("Input function (in eval format): ") | |
variables = [] | |
for i in func: | |
if i in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" and not i in variables: variables.append(i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "untitled" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
bracket-color = "0.8.2" | |
[dependencies.sdl2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# --- | |
# dependencies: | |
# python.org: '>=3.11.3' | |
# nmap.org: '*' | |
# --- | |
import os | |
import sys | |
myArgs = list(sys.argv)[0:] |