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/python3 | |
import argparse, string, secrets, pyperclip # pyperclip>=1.8.2 | |
parser = argparse.ArgumentParser(prog="genpass", description="A CLI random password generator") | |
parser.add_argument("-l", "--length", help="password length", type=int) | |
parser.add_argument("-a", "--amount", help="number of passwords to generate", type=int) | |
parser.add_argument("-c", "--copy", help="copy password to clipboard", action="store_true") | |
parser.add_argument("-e", "--exclude", help="characters to exclude from password") |
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/python3 | |
import matplotlib.pyplot as plt # matplotlib>=3.8.2 | |
from math import floor | |
def collatz(x: int) -> list[int]: | |
if x <= 0: | |
raise ValueError("x must be a positive integer") | |
output = [] | |
while x > 1: | |
output.append(x) |
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 argparse import ArgumentParser | |
parser = ArgumentParser(prog="NetherCoords", description="Converts Nether coordinates to Overworld coordinates") | |
parser.add_argument('x', type=int, metavar="X", help="X position") | |
parser.add_argument('z', type=int, metavar="Z", help="Z position") | |
parser.add_argument('-o', '--overworld', action='store_true', help="Use Overworld coordinates and convert them to Nether coordinates instead") | |
def main() -> None: | |
args = parser.parse_args() |
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 discord # discord.py==2.3.2 | |
import matplotlib.pyplot as plt # matplotlib==3.9.0 | |
from dotenv import load_dotenv # python-dotenv==1.0.1 | |
from os import getenv, remove | |
from py_asciimath.translator.translator import ASCIIMath2Tex # py-asciimath==0.3.0 | |
from discord.ext import commands |