Python Resources for Math 499

From OpenCircuits
Jump to navigation Jump to search

This is a draft for material that may be moved to the official course site

Software

Install Anaconda Python/Spyder for Python

Why install Anaconda rather than some other perfectly reasonable download? Because:

  • It does an install of both core Python and lots of extensions of use in science and mathematics.
  • It includes a nice ( but not perfect ) Integrated Development Environment, IDE.
  • It has a good command line update tool ( called "conda" this is in addition to the usual "pip" ).
  • It is well supported, has good resources on web.
  • Of course, it is free.

Download for all operating system at: DOWNLOAD ANACONDA NOW Anaconda supports both Python 2.7 and 3.x, generally we prefer 2.7 as not all packages that you want may have been upgraded to 3.x. Anaconda can support both with easy version switching, but Russ at any rate has not figured this out.

For a list of the extensions in Anaconda see: Anaconda package list The list also has links to more information on the packages.

Python Extensions You May Want

Most of these already in the Anaconda install but if you are not using it you may want to add extensions. Anaconda extensions are supported with the conda utility. If conda will not do the trick you may need another installation path. When conda does not work try installing with pip or Google or ask Russ.

  • SciPy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering. In particular, these are some of the core packages: NumPy ( numerical methods ) , SciPy ( scientific computing ), Matplotlib ( plotting ), Sympy ( symbolic mathematics), pandas ( data structures & analysis ) and more ...... SciPy.org
  • TkInter for construction of Graphical User Interfaces ( GUI's ) TkInter
  • Beautiful Soup for screen scraping, web data harvesting. Beautiful Soup

SageMath

Is a version of Python and an environment for running it especially developed for math and science. Once you are set up to use it access is from your web browser and work is saved in notebooks. It is, at least to me, a very interesting environment similar in many ways to Matlab or Mathematica. They are closed source, this is open.

There are several free servers you can point your browse at but they may not offer great availability or performance. My ( Russ ) preferred method of running it is to install a server on my laptop and connect as local host. This is too big a topic for me to author a good treatment here ( and now ) but you should at least be aware of this option.

If you are adventurous Google Sagemath and see what you can do.

Readings, Documentation, and Similar Resources

Programming In Python

Meta Python

Business Problems in Python

Business often seeks maximum profit, or minimum cost. Thus problems of optimization may be useful. Another area of interest is data analysis. It would be nice to have a matrix of math methods and the software that supports the method. In the way old days the software was just choosing the "best" language ( usually the one you knew ) and then going at it. Now days the language choice is greatly influenced not just but the characteristics of the language but also the packages that are already programed in much of the problem domain you need. It would be nice to have a chart of the problem domains and the software tools that might apply. I am working on this for Python, stay tuned.


Problem Domains and Python

Problem Domain Python Comment
Function Maximization ( calculus ) SageMath packages already installed. Both symbolic and numerical methods are available. Sagemath Calculus Tutorial
Linear Programming


Monte Carlo Simulation *Modelling a Basic Income with Python and Monte Carlo Simulation - Chris Stucchio