Skip to content

Instantly share code, notes, and snippets.

@judge2020
judge2020 / plot_discord_predictions.py
Created May 18, 2024 04:05 — forked from rebane2001/plot_discord_predictions.py
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
import glob
import json
from datetime import datetime
from matplotlib import pyplot
age_ts = []
age_keys = ["prob_13_17", "prob_18_24", "prob_25_34", "prob_35_over"]
age_lists = {k:[] for k in age_keys}
gen_ts = []
@judge2020
judge2020 / cg2glsl.py
Created September 21, 2021 01:56 — forked from rdb/cg2glsl.py
Convert Cg shaders designed for Panda3D to GLSL shaders. Requires cgc.exe to be installed (part of the NVIDIA Cg Toolkit)
import subprocess
import sys
import os
glsl_extensions = {'v': '.vert', 'f': '.frag', 'g': '.geom'}
if len(sys.argv) != 2:
print("Usage: cg2glsl.py something.sha")
sys.exit(1)
apt install python ffmpeg
curl -L http://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 https://youtube.com/watch?v=fVLDxmjeyVo
@judge2020
judge2020 / generate-client.sh
Created November 2, 2019 04:51 — forked from Belphemur/generate-client.sh
Generate a new client configuration for WireGuard
#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "$0 client-name"
exit 1
fi
@judge2020
judge2020 / cloudflare-hot-link-protection-with-stub.js
Last active October 1, 2019 06:37 — forked from vdbelt/cloudflare-hot-link-protection-with-whitelist.js
Cloudflare service worker hot link protection with whitelist

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X