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 | |
import os, struct, subprocess, random | |
#import icecream as ic | |
def GenRndNumber(begin, end, rounding=0): | |
Number = struct.unpack("Q", os.urandom(8))[0] / 2 ** 64 | |
RangeDist = float(end) - float(begin) | |
if rounding == 0: | |
return float(begin) + Number * RangeDist |
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
// Standard C++ stuff | |
#include <iostream> | |
#include <array> | |
#include <cmath> | |
#include <numbers> | |
// SDL2 stuff | |
#include "SDL2/SDL.h" | |
// Compile: g++ -std=c++20 -Wall -Wextra -pedantic -Ofast SDL2Plasma.cpp -o SDL2Plasma -lSDL2 -fopenmp |
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
// Standard C++ stuff | |
#include <iostream> | |
#include <string> | |
#include <random> | |
// SDL2 stuff | |
#include "SDL2/SDL.h" | |
// Other crazy stuffs | |
#define SCREEN_WIDTH 320 |
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
/************************************************************ | |
* JULIA SET IN C++ * | |
* Library used: SDL2 * | |
* Written by Katsumi -- https://twitter.com/realKatsumi_vn * | |
************************************************************/ | |
// Standard C++ stuff | |
#include <iostream> | |
#include <complex> | |
#include <vector> |
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
import re | |
def IMString(string: str) -> str: | |
out = string | |
def DiacriticChar(charpair: str) -> str: | |
match charpair.group()[1]: | |
case "q": | |
match charpair.group()[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
try: | |
import clipboard | |
except ModuleNotFoundError: | |
print("Dude, type \"pip install clipboard\" and press ENTER!") | |
else: | |
from random import choice | |
string = [] | |
for i in range(10): |
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 | |
data = [r"\x124567ef", 435219825313097414482329961, "epacse_edocinu"] | |
def convert(a, b): | |
result = "" | |
for i in range(23, -1, -1): | |
result += a[b >> 4*i & 15] | |
return result |
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
from sys import argv | |
ri = lambda let: f":regional_indicator_{let}:" if let.isalpha() else " " | |
print("".join(map(ri, argv[1]))) |
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
# NOTE: Requires OpenCC (pip install opencc) | |
import opencc, sys | |
if len(sys.argv) <= 2: | |
print("ERROR: Not enough arguments") | |
elif sys.argv[1] == "--trad": | |
converter = opencc.OpenCC("t2jp.json") | |
print(converter.convert(sys.argv[2])) | |
elif sys.argv[1] == "--simp": | |
converter1, converter2 = opencc.OpenCC("s2t.json"), opencc.OpenCC("t2jp.json") |
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
import random as r, tkinter as tk, namemaker, sys, time | |
from tkinter import ttk, messagebox as mb | |
if len(sys.argv) < 2: | |
raise OSError("Please enter a name, like this \"python3 battle.py [player_name]\"") | |
PLAYER_NAME = sys.argv[1] | |
BOSS_NAME = namemaker.randomName(4, "cv").capitalize() | |
BOSS_SPECIES = namemaker.randomName(r.randint(2, 5), "cvc").capitalize() | |
player_data = { |
NewerOlder