Skip to content

Instantly share code, notes, and snippets.

View Blayung's full-sized avatar

Tea Master Blayung

  • Poland
  • 09:42 (UTC +02:00)
View GitHub Profile
@Blayung
Blayung / polishToCyrillic.py
Last active March 25, 2025 16:05
Polish to cyrillic text converter (kinda crappy and overcomplicated)
#!/bin/python3
mainMap = {
"a": "а",
"ą": "ѧ",
"b": "б",
"c": "ц",
"d": "д",
"e": "э",
"ę": "ѫ",
"f": "ф",
@Blayung
Blayung / convertToPolish.py
Last active March 25, 2025 16:13
Russian to Polish transcription python script
#!/bin/python3
import os
russianToPolishMap = {
"а": "a",
"б": "b",
"в": "w",
"г": "g",
"д": "d",
"е": "ie",
@Blayung
Blayung / gpu-usage.py
Last active February 1, 2025 16:22
Nvidia gpu usage python script for i3blocks
#!/bin/python3
import bs4
import subprocess
xmlData = bs4.BeautifulSoup(subprocess.check_output(["nvidia-smi", "-q", "-x"]), "xml")
print(f"{xmlData.find('gpu_util').string[:-2]}%, {xmlData.find('memory_util').string[:-2]}%")
@Blayung
Blayung / extract.sh
Last active February 1, 2025 16:23
A simple bash script to extract the most common archive types
#!/bin/bash
if [ -z "$1" ]; then
echo "No file name was specified."
exit
elif ! [ -z "$2" ]; then
echo "Usage: extract.sh <filename>"
exit
elif ! [ -f "$1" ]; then
echo "This file does not exist."
exit