A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| import numpy as np | |
| from math import pi, log | |
| import pylab | |
| from scipy import fft, ifft | |
| from scipy.optimize import curve_fit | |
| i = 10000 | |
| x = np.linspace(0, 3.5 * pi, i) | |
| y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 * | |
| np.random.randn(i)) |
| import numpy as np | |
| from math import pi, log | |
| import pylab | |
| from scipy import fft, ifft | |
| from scipy.optimize import curve_fit | |
| i = 10000 | |
| x = np.linspace(0, 3.5 * pi, i) | |
| y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 * | |
| np.random.randn(i)) |
| import numpy as np | |
| from math import pi, log | |
| import pylab | |
| from scipy import fft, ifft | |
| from scipy.optimize import curve_fit | |
| i = 10000 | |
| x = np.linspace(0, 3.5 * pi, i) | |
| y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 * | |
| np.random.randn(i)) |
| { | |
| "metadata": { | |
| "name": "", | |
| "signature": "sha256:85727c0bce75a8d3d004db29359002b5a426d858c8ee70ed110deb1936a51942" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ |
| pyinstaller -F -w --noupx main.spec |
| # good discussion here: http://stackoverflow.com/questions/4308168/sigmoidal-regression-with-scipy-numpy-python-etc | |
| # curve_fit() example from here: http://permalink.gmane.org/gmane.comp.python.scientific.user/26238 | |
| # other sigmoid functions here: http://en.wikipedia.org/wiki/Sigmoid_function | |
| import numpy as np | |
| import pylab | |
| from scipy.optimize import curve_fit | |
| def sigmoid(x, x0, k): | |
| y = 1 / (1 + np.exp(-k*(x-x0))) |
| install: | |
| - sudo apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended | |
| - sudo apt-get install chktex | |
| script: | |
| - make | |
| - chktex -W # Print version information. | |
| - chktex -q -n 6 *.tex chapters.*.tex 2>/dev/null | tee lint.out | |
| # If lint output is non-empty report an error. | |
| - test ! -s lint.out |