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
""" | |
A python script to minify the HTML/CSS/JS files of a website. | |
Minifiers by Andrew Chilton (https://twitter.com/andychilton). | |
""" | |
import os, requests | |
def minify_css(css_file, overwrite=False): | |
with open(css_file, 'r') as f: |
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
# clipboardNormalizer.py | |
""" | |
A super-simple and silly python program that normalizes content in your clipboard if there's foriegn characters. | |
I originally made it so that I can copy-paste stuff from the Discord Bot DankMemer's economy system which uses foreign characters instead of spaces to discourage copy pasting. | |
This program is super useless for anything besides that, or so I think. Congratulations if you can find a proper use case. | |
""" | |
from pyperclip import copy, paste |
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
# Calculate Standard Deviation (Continuous Series | Actual & Assumed Mean Methods) | |
# Simple python program I wrote to automate a huge portion of my homework. | |
# Economics is a nightmare :√ | |
from prettytable import PrettyTable | |
def number(num): | |
"""Returns any string containing number (int/float) in a cleaner way.""" | |
#num = str(round(float(num), 2)) | |
return num[:num.rindex('.')] if num.endswith('.0') else num |
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
# Memorable Random Int (originally Memorable One-Time Password Generator) | |
# Written by Alan Varghese (waterrmalann) | |
""" | |
A random number generator (between two ranges) that outputs a number that is easy to read and remember. | |
Can be used to generate OTPs that stay in short term memory but may not be that secure due to the limited set of numbers. | |
""" | |
from random import choice | |
import string |
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 subprocess | |
def find_passwords(): | |
profiles_out = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8',).split('\n') | |
profiles = [i.split(":")[1][1:-1] for i in profiles_out if "All User Profile" in i] | |
print(f"Known Networks: {len(profiles)}") | |
print() | |
for profile in profiles: | |
wifi_out = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', profile, 'key=clear']).decode('utf-8').split('\n') |
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
/* Scroll Attached Animations */ | |
// v1.0.0 (quite wonky) | |
// Written by Alan (github.com/waterrmalann) | |
// For use alongside: https://animate.style/ | |
// Never force your animations on the user. | |
// Don't animate if the user prefers reduced motion (browser accessibility setting). | |
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches; | |
if (!prefersReducedMotion) { |
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 get_flame(name1, name2): | |
"""Calculate the FLAME position of two names.""" | |
FLAME = ("Friendship", "Love", "Affection", "Marriage", "Enemies") # "Siblings" as an additional entry. | |
# Get rid of the spaces and turn everything into lowercase. | |
name1_crossed = name1.replace(' ', '').lower() | |
name2_crossed = name2.replace(' ', '').lower() | |
# Cross out common letters from both names. |
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
""" | |
python port of GPW (Generate Pronouncable Passwords) | |
https://www.multicians.org/thvv/gpw.html | |
https://www.multicians.org/thvv/gpw-js.html | |
""" | |
import random | |
alphabets = 'abcdefghijklmnopqrstuvwxyz' |
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
/* | |
Memorable Integer Generator: JavaScript Port | |
*/ | |
String.prototype.reverse = function() { | |
return this.valueOf().split("").reverse().join(""); | |
} | |
class MIG { | |
constructor(minimum, maximum) { |
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: | |
my_custom_font = PseudoFont('L33TSP34K', '@6cdef9h!jk1mnopqr5+uvwxy2', '48(D3FG#|JK1MN0PQR$7UVWXY2', '') | |
sample = my_custom_font("The Quick Brown Fox Jumps Over The Lazy Dog") | |
sample -> '7he Qu!ck 8rown Fox Jump5 0ver 7he 1@2y Do9' | |
""" | |
class PseudoFont: | |
def __init__(self, font_name: str, font_lower: str, font_upper: str, font_digits: str): | |
# The name of the defined font style. |
OlderNewer