- I need code for the purposes listed in in the purposes section of this readme
- More often than not I have just copied my old code and modified it in the new project as needed leaving a comment stating that it originated from another of my projects;
- Now I will have an easy means of maintaining consistant code across projects as well as a standerdized implementation.
- Access large quantities of numerical info from a constant
- Display Data with plotting and graphing libraries
- clone the repo then run the command:
python -m pip install -e NumLib
- (running it this way ensures if you are using Anaconda Envs you can run this in an activated Env)
- Is a script for loading constants into attributes of the instance of NumLib
- Constants can be redefined to change the file the code looks for number data in (WARNING this does not mean the parsing algorithm will understand the file)
- (WARNING) for reasons pertaining to github's limit on file sizes
pi-billion.txt
is not provided in this repo... but can be obtained by a simple google search and finding MIT's publicly available link to a billion digits of pi. (https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt) Using thewget insert-link-here
command in linux may be helpfull... The author of this code cannot be held responsible for misuse of this link ... or any similar scenario pertaining to the download of such a large volume of data... - Notice! all other constant files were from public online sources; the author of this code in no way claims reliability nor authorship of these files.
PRIMES_FILE_NAME="Primes1mil.txt"
PHI_FILE_NAME="GOLDEN_RATIO_20k_Places.txt"
ZETAFUNC_ZEROS_NAME="ZetaZerosIM.txt"
PI_FILE_NAME="pi-billion.txt"
loadPrimes
loads numbers intoself.primes
loadPhiDigits
loads numbers intoself.phiDigits
loadZetaZeros
loads numbers intoself.zetaZeros
loadPiDigits
loads numbers intoself.primes
- add Euler's constant
- add in Collatz Path length lookup data
- Previously in my other repos was called
PlottingUtil
this class combines the most useful (and best working) versions of my previous code - (friendly reminder )Do not forget
%matplotlib notebook
in matlab if plotting and that if using Jupyter Notebook the kernel may cache the library not actually updating any changes made to PlotUtil between runs... a kernel restart is needed. - class
PlotUtil
can be used in two different ways: as a static methods class as well as an object oriented class which holds data
PlotUtil.plot({'name':'insert label name here','data':[[x data here],[y data here]]})
: takes an object as described above and plots x points vs y with a random colorPlotUtil.plotSeries([{'name':'insert label name here','data':[[x data here],[y data here]]}])
: similar toPlotUtil.plot()
except it plots multiple data series and the first 3 colors are predefined then random colors