Skip to content

Instantly share code, notes, and snippets.

@scottralph
scottralph / Digits.scala
Created September 30, 2021 16:57
Collatz Digits class
package collatz
import scala.collection.mutable.ListBuffer
import scala.collection.mutable.Set
class Digits(val digitSequence : Array[Byte]) {
val OUTPUT_DIGIT_WIDTH = 100
override def toString(): String = {
val sb = new StringBuilder()
@scottralph
scottralph / RC-Circuit.py
Created February 11, 2022 14:50
Charging of a RC Circuit
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import math
fig = plt.figure()
ax = plt.axes()
ax.set_xlim([0,4])
ax.set_ylim([0,1])
xs = np.array([x/1000.0 for x in range(0,4001)])