Skip to content

Instantly share code, notes, and snippets.

View MrStickyPiston's full-sized avatar

Mr Sticky Piston MrStickyPiston

View GitHub Profile
@MrStickyPiston
MrStickyPiston / rechipped.py
Last active March 25, 2024 08:35
Generates a datapack that inserts chipped blocks into the rechiseled chisel
import os
import json
import shutil
# Function to read JSON files and extract values
def extract_values_from_json(file_path):
with open(file_path, 'r') as file:
data = json.load(file)
if 'values' in data:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(-10.0, 10.0, 0.001)
y = x ** 2 + x * 2 + 10
plt.plot(x, y, label='y = x**2')
plt.xlabel('x')
plt.ylabel('y')
@MrStickyPiston
MrStickyPiston / 3D_procedural_terrain.py
Last active August 24, 2024 15:37
A program to generate 3d terrain in python
import random
import sys
import noise
import numpy as np
import matplotlib.pyplot
if "--seed" in sys.argv:
try:
seed = int(sys.argv[sys.argv.index("--seed")+1])
@MrStickyPiston
MrStickyPiston / soundFormulas.py
Last active May 12, 2023 16:09
A program to easily use the physics formulas for sound
import os
import sympy
# DONT REMOVE THIS IS USED IN EVAL()
from math import exp, log, sqrt
def clear():
os.system('cls' if os.name == 'nt' else 'clear')