Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Webb CodeDrome

View GitHub Profile
View functionplotterdemo.py
import functionplotter as fp
import samplefunctions as sf
def main():
print("--------------------")
print("| codedrome.com |")
print("| Function Plotter |")
print("--------------------\n")
View samplefunctions.py
samples = {
"quadratic": (lambda x: x**2)
}
View functionplotter.py
import math
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
def plot(functions, start, end, step, config):
"""
View halflife.py
import halflifeutilities as hlu
import radioactivenuclides as ran
def main():
print("-------------------------------------")
print("| codedrome.com |")
print("| Half Life of Radioactive Nuclides |")
print("-------------------------------------\n")
View halflifeutilities.py
import math
import radioactivenuclides as ran
def _sci_not_to_num(significand, exponent):
return significand * 10 ** exponent
@CodeDrome
CodeDrome / radioactivenuclides.py
Created Sep 12, 2022
radioactivenuclides.py (truncated - showing 3 of 34)
View radioactivenuclides.py
radioactive_nuclides = {
"tellurium128":
{
"element": "tellurium",
"elementsymbol": "Te",
"atomicmass": 128,
"significand": 2.2,
"exponent": 24
},
@CodeDrome
CodeDrome / squarerootcalculationsdemo.py
Created Sep 9, 2022
squarerootcalculationsdemo.py
View squarerootcalculationsdemo.py
import math
import numpy as np
import squarerootcalculations as src
import squarerootplot as srp
def main():
View squarerootcalculations.py
import math
import numpy as np
import squarerootestimates as sre
def babylonian_array(radicands, iterations):
estimates = sre.linear_2(radicands)
View squarerootestimatesdemo.py
import math
import numpy as np
import squarerootestimates as sre
import squarerootplot as srp
def main():
View squarerootplot.py
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
def plot(valuerange, sqrts=None):
matplotlib.pyplot.figure(figsize=(10,8), facecolor="#FFFFFF")
plt.title('Square Roots in Python ')