Skip to content

Instantly share code, notes, and snippets.

View megamaz's full-sized avatar
💻
mid programmer

megamaz

💻
mid programmer
View GitHub Profile
@megamaz
megamaz / gen_play_history.py
Created June 9, 2024 05:42
Generates a vanilla Song Play History json file (for those who lost said data from the AppData folder) from your BeatLeader plays.
import json
import requests
###### FOR FUTURE USERS
# This code grabs your BeatLader score and generates play information for your AppData folder.
# The goal is that if you accidentally wiped your PC clean or something and lost your appdata folder,
# you can run this code to get your PBs back. This is the vanilla portion only- the stuff that
# displays your max combo, highscore, max rank, and play count at the bottom of the leaderboard.
# I doubt anyone needs it but if someone does hit me up on discord "megamaz" and I'll write
# some code that generates a SongPlayHistory json file that you can shove into your UserData.
# Download your data dump and place this file in the "messages" folder of your data dump.
# Run it using python
from datetime import datetime, timedelta, timezone
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv
import json
import os
# This is a direct copy / paste of my VERY FIRST PYTHON CODE!!
# I will NOT improve on it. My English wasn't very good either at the time.
name= input("What is your name, coder? ")
print("Oh, hi "+ name+"!")
feel=input("how are you doing "+name+"?")
print("you are doing "+feel+".")
feel_answer= input("What makes you doing "+feel+"? (in one word, as a verb please)")
print("you are doing "+feel+" because you are "+feel_answer+".")
right= input("right?")
@megamaz
megamaz / main.py
Created April 22, 2020 03:18
My very very first python personal code! I am so very proud to have found it again. Here I am, sharing it.
print("FUN FACT ABOUT THIS CALCULATOR!")
import random
print()
print("---------------------------------------------------------------------------")
fact = random.randint(1, 3)
if fact == 1:
print("This calculator has 70 lines of code!")
if fact == 2:
print("The exponant had an error, which was fixed after 5 days.")
if fact == 3:
@megamaz
megamaz / webcheck.py
Last active July 26, 2019 16:28
Checks a website. I currently have no way of checking if the website exists, therefore please be sure that the website exists. Otherwise, it'll crash. (runtime error)
import time, requests, sys
print("\n"*100)
url = str(input("INSERT URL HERE: "))
if url[:8] != "https://":
if url[:7] != "http://":
print("not a url.")
sys.exit(0)
sys.exit(0)
while True:
@megamaz
megamaz / graph.py
Last active June 24, 2019 22:47
Graph library can be used to makeit easier to use graphs. Put this file into whatever python code you want to make, type import graph, and use graph.(command) to use graph.
import ctypes
import sys
"""
Graphing made simpler
INTS
----
Used for points (X, Y) or size of graph
"""
graphs = []
# 'graphs' list is using nested tuples like this:
@megamaz
megamaz / TheWay.py
Last active April 21, 2019 00:20
The way
import random
import time
import sys
best = open("shot.txt", "a+")
sleeptime = float(input("Enter how much time in between dialogues: "))
time_lived = 0
ammo = 6
print("\n" * 100)
def Print(script):
print("/ " + ((len(script) + 1) * "~") + " \ ")
import random
import time
battleHappen = False
card = [14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2]
player1 = input("What is player one's name? ")
player2 = input("What is player two's name? ")
print()
print("Hello " + player1 + " and " + player2 + ". Welcome to battle.")
@megamaz
megamaz / Labyrinthfacts.py
Last active July 20, 2020 21:24
Labyrinth
import random
def fact():
facts = ["There are more than 100 lines of code dedicated to mapping! (240, and growing each updates!)", "Tree leafs (fakewallpos, #) were actually the wall texture, before being updated in 1.10 to █", "Monsters and traps currently remain unused", "The very first version of the game had walls randomized and the area size was customizeable.", "The game's first code was written on the 15th october 2018.", "There is a test area almost out of reach."]
fact = random.choice(facts)
print(fact)