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
/* Vars. */ | |
:root { | |
--main-color: #ffa494; | |
--background-color: rgb(0, 0, 0); | |
} | |
/* Rounded Edges. */ | |
#app-mount { | |
border-radius: 20px; | |
background-color: transparent; | |
} |
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 | |
print( | |
""" | |
This script simulates this scenario: | |
you have a die of N faces | |
you have Y quantity of that die | |
what is the average of X rolls, | |
taking the highest value of all | |
dies for that roll? |
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 PIL import Image | |
size = (1280,1280) | |
img = Image.new(mode='RGBA',size=size,color=(255,128,255,128)) | |
pixels = img.load() | |
for x in range(size[0]): | |
for y in range(size[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
raw = '' | |
with open('raw.txt','rt') as f: | |
raw = f.read() | |
formatted = raw.split('\n') | |
import re | |
to_delete = [] | |
for index in (range(len(formatted))): |
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
# pase poorly formatted school math assignment numbers here. | |
data = """32,33,21,51,44,25,35,82,55,47,52,38,39,43,48,51,53,37,40,15 | |
""" | |
# run the program, copy the output, paste to google sheets. much faster than retyping by hand. | |
import re | |
spl = re.split(pattern='[\n,]',string=data) | |
print('\n'.join(spl)) |
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 os | |
import shutil | |
to_clean = './compressed' | |
output = './full_cleaned' | |
if not os.path.exists(output): | |
os.makedirs(output) | |
def clean(dir:str): | |
children = [f'{dir}/{child}' for child in os.listdir(dir)] | |
files = [child for child in children if os.path.isfile(child)] |
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
let id = "the id of the room to join here"; | |
let prefix = "@_Bot "; | |
let admin = [] | |
let superadmin = "the user in control of the admin commands" | |
require('dotenv').config(); | |
const { Client } = require('dogehouse.js'); | |
const app = new Client(); | |
app.connect(process.env.DOGEHOUSE_TOKEN, process.env.DOGEHOUSE_REFRESH_TOKEN).then(async () => { |
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 cmath | |
from PIL import Image | |
import yaml | |
#colors are expressed as (R,G,B) 0-255 | |
props = {} | |
with open('./props.yaml','rt') as f: | |
props = yaml.full_load(f.read()) | |
# view |
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 os | |
# checks if a string contains another string | |
def ContainsString(str,checkfor): | |
for i in range(0,len(str)): | |
if (str[i:i+len(checkfor)] == checkfor): | |
return True | |
return False | |
# remove the directory if it contains a 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 math | |
class OperatedList: | |
def __init__(self, *args: int): | |
self.list = list(args) | |
def __len__(self): | |
return len(self.list) | |
# Operation Functions |
NewerOlder