├── .gitignore ├── .gitmodules ├── LICENSE ├── NOTES.md ├── README.md ├── imgs ├── Mathematica-ring-a.png └── comic2-1040.png ├── slides ├── .gitattributes ├── .gitignore ├── Makefile ├── beamercolorthemechameleon.sty ├── beamerinnerthemefancy.sty ├── beamerouterthemedecolines.sty ├── beamerthemeTorino.sty ├── commit plots.ipynb ├── commits-all.pdf ├── commits1.pdf ├── commits2.pdf ├── django-all.txt ├── django-year.txt ├── intro.tex ├── ipython-all.txt ├── ipython-year.txt ├── linux-all.txt ├── linux-year.txt ├── matplotlib-all.txt ├── matplotlib-year.txt ├── numpy-all.txt ├── numpy-year.txt ├── pandas-all.txt ├── pandas-year.txt ├── scipy-all.txt ├── scipy-year.txt ├── sklearn-all.txt ├── sklearn-year.txt ├── sympy-250px.pdf ├── sympy-all.txt └── sympy-year.txt ├── tutorial_exercises ├── Advanced Expression Manipulation Solutions.ipynb ├── Advanced Expression Manipulation.ipynb ├── Basic Operations Solutions.ipynb ├── Basic Operations.ipynb ├── Calculus Solutions.ipynb ├── Calculus.ipynb ├── Code generation.ipynb ├── FFT Introduction.ipynb ├── FFT charged sphere.ipynb ├── FFT convergence.ipynb ├── Gotchas Solutions.ipynb ├── Gotchas.ipynb ├── Matrices Solutions.ipynb ├── Matrices.ipynb ├── Poisson equation.ipynb ├── Schrödinger equation (sine basis).ipynb ├── Simplification Solutions.ipynb ├── Simplification.ipynb ├── Solvers Solutions.ipynb ├── Solvers.ipynb ├── TVTK.ipynb ├── VTK.ipynb ├── Variation with Lagrange multipliers.ipynb └── data │ └── Venq.vtk └── tutorial_sphinx ├── .gitignore ├── Makefile ├── doctest ├── ext ├── docscrape.py ├── docscrape_sphinx.py ├── numpydoc.py └── sympylive.py ├── get_sympy.py ├── logo ├── LogoInfo.txt ├── SymPy-500x500-Logo -No-Text.png ├── SymPy-500x500-Logo-No-Transparency-No-Text.png ├── SymPy-500x500-Logo-No-Transparency.png ├── SymPy-500x500-Logo.png ├── SymPy-Favicon-WithoutTail.ico ├── SymPy-Favicon.ico ├── SymPy-Logo-NoTail.png └── SymPy-NoTail-NoText.png ├── runtests.py └── src ├── LICENSE ├── _static ├── default.css_t └── sympylogo.png ├── aboutus.rst ├── conf.py ├── gotchas.rst ├── index.rst ├── install.rst ├── pics ├── consoleascii.png ├── consoleunicode.png ├── ipythonnotebook.png ├── ipythonqtconsole.png ├── pngview1.png ├── winpdb1.png └── winpdb2.png └── tutorial ├── basic_operations.rst ├── calculus.rst ├── gotchas.rst ├── index.rst ├── intro.rst ├── manipulation.rst ├── matrices.rst ├── preliminaries.rst ├── printing.rst ├── simplification.rst └── solvers.rst /.gitignore: -------------------------------------------------------------------------------- 1 | *.sw[po] 2 | *.py[co] 3 | *~ 4 | 5 | build/ 6 | mathjax/ 7 | 8 | source/img/tikz/*.png 9 | source/img/tikz/*.pdf 10 | source/img/tikz/.*.tex 11 | 12 | .DS_Store 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ipython_doctester"] 2 | path = ipython_doctester 3 | url = https://github.com/asmeurer/ipython_doctester.git 4 | branch = fixes 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 SymPy Development Team, Aaron Meurer, Ondřej Čertík 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | a. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | b. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | c. Neither the name of SymPy nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 28 | DAMAGE. 29 | -------------------------------------------------------------------------------- /NOTES.md: -------------------------------------------------------------------------------- 1 | *Some notes for the tutorial. Feel free to edit it however you want.* 2 | 3 | ## General notes 4 | 5 | - In general, I think we should first write documentation for SymPy, then 6 | backport that documentation to IPython notebooks for the tutorial. Or, for the 7 | things that it makes sense for, write IPython notebook examples for SymPy and 8 | just use them for the tutorial. 9 | 10 | Either way, we should focus on writing narrative documentation for SymPy. It 11 | is most lacking in this, so this will help. The things we use for the tutorial 12 | should maybe be toned down in the narration, as we will be speaking the things 13 | to them. 14 | 15 | - It will be a lot easier if we can release before the tutorial, but if we 16 | don't make sure that everything works with 0.7.2. 17 | 18 | ## Things to talk about 19 | 20 | - We should talk about the important 21 | [idioms and antipatterns](https://github.com/sympy/sympy/wiki/Idioms-and-Antipatterns). 22 | 23 | - All the important expression manipulation functions (i.e., methods of 24 | Basic). This part should also be first written as documentation for SymPy. 25 | 26 | - Documentation on how to do numerics with SymPy. This is something that a lot 27 | of people at SciPy will care about. It should talk about evalf, lambdify, 28 | code generation, and so on. *Ondřej, can you do this?* 29 | 30 | - All the important modules. We should think about what these are for 31 | rewriting the tutorial. Right now, I am thinking 32 | 33 | - The core (basic operations) 34 | - Functions 35 | - Simplify 36 | - Solve 37 | - Matrices 38 | 39 | - How to install and set things up (like printers and stuff). A lot of this 40 | can be borrowed from the 2011 tutorial. Some stuff, like working with 41 | IPython, will need to be updated. 42 | 43 | - Should we talk about plotting? 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SymPy tutorial for SciPy 2013 2 | ============================= 3 | 4 | This is the tutorial that Aaron Meurer and Ondřej Čertík are giving at SciPy 5 | 2013 for SymPy. If you are attending the tutorial, please install 6 | Anaconda. You will need SymPy 0.7.2 and IPython 0.13.2. The exercises for 7 | attendees are in the tutorial_exercises directory. Everything else is 8 | presentation materials for us. 9 | 10 | If you want to build the tutorial presentation, use `make html` in the 11 | tutorial_sphinx directory. It is basically the same as the new SymPy tutorial 12 | at http://docs.sympy.org/tutorial/tutorial/. 13 | 14 | If you clone the git repo, be sure to run 15 | 16 | git submodule init 17 | 18 | to initialize the ipython_doctest submodule. Otherwise, the exercise notebooks 19 | won't work. 20 | -------------------------------------------------------------------------------- /imgs/Mathematica-ring-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/imgs/Mathematica-ring-a.png -------------------------------------------------------------------------------- /imgs/comic2-1040.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/imgs/comic2-1040.png -------------------------------------------------------------------------------- /slides/.gitattributes: -------------------------------------------------------------------------------- 1 | *.tex diff=tex 2 | *.bib diff=bibtex 3 | -------------------------------------------------------------------------------- /slides/.gitignore: -------------------------------------------------------------------------------- 1 | *.eps 2 | *.pdf 3 | *.aux 4 | *.log 5 | *.out 6 | *.dvi 7 | *.ps 8 | *.swp 9 | *.dat 10 | *.nav 11 | *.snm 12 | *.toc 13 | *.bbl 14 | *.blg 15 | *.lof 16 | *.lot 17 | *.glg 18 | *.glo 19 | *.gls 20 | *.ist 21 | *.acn 22 | *.acr 23 | *.alg 24 | 25 | .DS_Store 26 | -------------------------------------------------------------------------------- /slides/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | pdflatex intro.tex 3 | pdflatex intro.tex 4 | -------------------------------------------------------------------------------- /slides/beamercolorthemechameleon.sty: -------------------------------------------------------------------------------- 1 | % Copyright 2007 by Marco Barisione 2 | % 3 | % This file may be distributed and/or modified 4 | % 5 | % 1. under the LaTeX Project Public License and/or 6 | % 2. under the GNU Public License. 7 | 8 | \mode 9 | 10 | \definecolor{chameleongreen1}{RGB}{98,189,25} 11 | \definecolor{chameleongreen2}{RGB}{188,225,141} 12 | \definecolor{chameleongreen3}{RGB}{51,149,48} 13 | \definecolor{chameleongreen4}{RGB}{0,98,90} 14 | 15 | \setbeamercolor*{palette primary}{fg=white,bg=chameleongreen2} 16 | \setbeamercolor*{palette secondary}{fg=white,bg=chameleongreen3} 17 | \setbeamercolor*{palette tertiary}{fg=white,bg=chameleongreen4} 18 | \setbeamercolor*{palette quaternary}{fg=white,bg=chameleongreen1} 19 | 20 | \setbeamercolor*{titlelike}{bg=chameleongreen3} 21 | \setbeamercolor*{frametitle}{bg=black,fg=black} 22 | \setbeamercolor*{part title}{bg=black,fg=black} 23 | \setbeamercolor*{item}{fg=chameleongreen3} 24 | 25 | \setbeamercolor*{separation line}{} 26 | \setbeamercolor*{fine separation line}{} 27 | 28 | \mode 29 | 30 | -------------------------------------------------------------------------------- /slides/beamerinnerthemefancy.sty: -------------------------------------------------------------------------------- 1 | % Copyright 2007 by Marco Barisione 2 | % 3 | % This file may be distributed and/or modified 4 | % 5 | % 1. under the LaTeX Project Public License and/or 6 | % 2. under the GNU Public License. 7 | 8 | \mode 9 | 10 | % Use alternative title page style. 11 | \DeclareOptionBeamer{alternativetitlepage}[true]{\def\beamer@fancy@alternativetitlepage{#1}} 12 | 13 | % Logo to use in the alternative title page. 14 | \def\beamer@fancy@titlepagelogo{} 15 | \DeclareOptionBeamer{titlepagelogo}{\def\beamer@fancy@titlepagelogo{#1}} 16 | 17 | % Bullet shape. 18 | \DeclareOptionBeamer{bullet}{\def\beamer@fancy@bullet{#1}} 19 | 20 | \ExecuteOptionsBeamer{alternativetitlepage=false,bullet=square} 21 | \ProcessOptionsBeamer 22 | 23 | % Colors. 24 | \setbeamercolor*{lineup}{parent=palette primary} 25 | \setbeamercolor*{linemid}{parent=palette secondary} 26 | \setbeamercolor*{linebottom}{parent=palette tertiary} 27 | \setbeamercolor*{title page header}{parent=palette quaternary} 28 | 29 | % Lengths. 30 | \newlength{\beamer@fancy@lineup} 31 | \setlength{\beamer@fancy@lineup}{.025\paperheight} 32 | \newlength{\beamer@fancy@linemid} 33 | \setlength{\beamer@fancy@linemid}{.015\paperheight} 34 | \newlength{\beamer@fancy@linebottom} 35 | \setlength{\beamer@fancy@linebottom}{.01\paperheight} 36 | 37 | % Margins. 38 | \newlength{\beamer@fancy@normalmargin} 39 | \setlength{\beamer@fancy@normalmargin}{.06\paperwidth} 40 | \setbeamersize{text margin left=\beamer@fancy@normalmargin} 41 | \setbeamersize{text margin right=\beamer@fancy@normalmargin} 42 | \setlength\leftmargini{.6\beamer@fancy@normalmargin} 43 | \setlength\leftmarginii{.6\beamer@fancy@normalmargin} 44 | \setlength\leftmarginiii{.6\beamer@fancy@normalmargin} 45 | 46 | % Normal title page. 47 | \defbeamertemplate*{title page normal}{fancy theme}[1][] 48 | { 49 | \vbox{} 50 | \vfill 51 | \begin{centering} 52 | \begin{beamercolorbox}[wd=\paperwidth,sep=8pt,center,#1]{title page header} 53 | \usebeamerfont{title}\inserttitle\par% 54 | \ifx\insertsubtitle\@empty% 55 | \else% 56 | \vskip0.25em% 57 | {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}% 58 | \fi% 59 | \end{beamercolorbox}% 60 | \vskip1em\par 61 | \begin{beamercolorbox}[sep=8pt,center,#1]{author} 62 | \usebeamerfont{author}\insertauthor 63 | \end{beamercolorbox} 64 | \begin{beamercolorbox}[sep=8pt,center,#1]{institute} 65 | \usebeamerfont{institute}\insertinstitute 66 | \end{beamercolorbox} 67 | \begin{beamercolorbox}[sep=8pt,center,#1]{date} 68 | \usebeamerfont{date}\insertdate 69 | \end{beamercolorbox}\vskip0.5em 70 | {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par} 71 | \end{centering} 72 | \vfill 73 | } 74 | 75 | % Alternative title page, you should use this in a frame with the [plain] 76 | % option. 77 | \defbeamertemplate*{title page alternative}{fancy theme}[1][] 78 | { 79 | {\parskip0pt\offinterlineskip% 80 | \hbox{\hskip-\Gm@lmargin\hbox{\vbox{% 81 | \@tempdima=\textwidth\textwidth=\paperwidth\hsize=\textwidth\def\\{,}\vbox{}\vskip-1.5ex% 82 | % Title. 83 | \begin{beamercolorbox}[wd=\paperwidth,ht=.4\paperheight,center,#1]{title page header} 84 | \usebeamerfont{title}\inserttitle\par% 85 | \ifx\insertsubtitle\@empty% 86 | \else% 87 | \vskip0.25em% 88 | {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}% 89 | \fi% 90 | \vspace{.125\paperheight}% 91 | \end{beamercolorbox}% 92 | \vbox{}\vskip-\beamer@fancy@lineup% 93 | \vbox{}\vskip-\beamer@fancy@linemid% 94 | % First line. 95 | \hbox{% 96 | \begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@fancy@lineup,dp=0pt]{}% 97 | \end{beamercolorbox}% 98 | \begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@fancy@lineup,dp=0pt]{lineup}% 99 | \end{beamercolorbox}% 100 | }% 101 | \vbox{}\vskip0ex% 102 | % Second line. 103 | \hbox{% 104 | \begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@fancy@linemid,dp=0pt]{}% 105 | \end{beamercolorbox}% 106 | \begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@fancy@linemid,dp=0pt]{linemid}% 107 | \end{beamercolorbox}% 108 | }% 109 | % Third line. 110 | \hbox{% 111 | \begin{beamercolorbox}[wd=.5\paperwidth,ht=\beamer@fancy@linebottom,dp=0pt]{}% 112 | \end{beamercolorbox}% 113 | \begin{beamercolorbox}[wd=.5\paperwidth,ht=\beamer@fancy@linebottom,dp=0pt]{linebottom}% 114 | \end{beamercolorbox}% 115 | }% 116 | \vskip0pt% 117 | }}% 118 | \hskip-\Gm@rmargin% 119 | }}\hfil% 120 | % 121 | \begin{columns} 122 | \ifx\beamer@fancy@titlepagelogo\@empty% 123 | \column{\textwidth} 124 | \else 125 | \column{.5\textwidth} 126 | % Logo. 127 | \begin{centering} 128 | \vbox{}\vfill 129 | \includegraphics[height=.4\paperheight]{\beamer@fancy@titlepagelogo} 130 | \vfill 131 | \end{centering} 132 | \column{.5\textwidth} 133 | \fi 134 | % Authors, institute and date 135 | \vskip1em\par 136 | \begin{beamercolorbox}[sep=8pt,center,#1]{author} 137 | \usebeamerfont{author}\insertauthor 138 | \end{beamercolorbox} 139 | \begin{beamercolorbox}[sep=8pt,center,#1]{institute} 140 | \usebeamerfont{institute}\insertinstitute 141 | \end{beamercolorbox} 142 | \begin{beamercolorbox}[sep=8pt,center,#1]{date} 143 | \usebeamerfont{date}\insertdate 144 | \end{beamercolorbox}\vskip0.5em 145 | {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par} 146 | \end{columns} 147 | } 148 | 149 | \defbeamertemplate*{title page}{fancy}[1][] 150 | { 151 | \def\beamer@fancy@truetext{true}% 152 | \ifx\beamer@fancy@alternativetitlepage\beamer@fancy@truetext% 153 | \usebeamertemplate{title page alternative}% 154 | \else% 155 | \usebeamertemplate{title page normal}% 156 | \fi% 157 | } 158 | 159 | % Items. 160 | \defbeamertemplate{itemize item}{squarealt}% 161 | {\tiny\raise.5ex\hbox{\donotcoloroutermaths$\blacksquare$}} 162 | \defbeamertemplate{itemize subitem}{squarealt}% 163 | {\tiny\raise.4ex\hbox{\donotcoloroutermaths$\square$}} 164 | \defbeamertemplate{itemize subsubitem}{squarealt}% 165 | {\tiny\raise.3ex\hbox{\donotcoloroutermaths$\blacksquare$}} 166 | 167 | \defbeamertemplate{itemize item}{circlealt}% 168 | {\small\raise.2ex\hbox{\donotcoloroutermaths$\bullet$}} 169 | \defbeamertemplate{itemize subitem}{circlealt}% 170 | {\small\raise.1ex\hbox{\donotcoloroutermaths$\circ$}} 171 | \defbeamertemplate{itemize subsubitem}{circlealt}% 172 | {\scriptsize\raise.1ex\hbox{\donotcoloroutermaths$\bullet$}} 173 | 174 | \def\circletext{circle} 175 | \ifx\beamer@fancy@bullet\circletext 176 | \setbeamertemplate{items}[circlealt] 177 | \else 178 | \setbeamertemplate{items}[squarealt] 179 | \fi 180 | 181 | \mode 182 | 183 | -------------------------------------------------------------------------------- /slides/beamerouterthemedecolines.sty: -------------------------------------------------------------------------------- 1 | % Copyright 2007 by Marco Barisione 2 | % 3 | % This file may be distributed and/or modified 4 | % 5 | % 1. under the LaTeX Project Public License and/or 6 | % 2. under the GNU Public License. 7 | 8 | \mode 9 | 10 | % String used between the current page and the total page count. 11 | \def\beamer@decolines@pageofpages{/} 12 | \DeclareOptionBeamer{pageofpages}{\def\beamer@decolines@pageofpages{#1}} 13 | 14 | % Show a line below the frame title. 15 | \DeclareOptionBeamer{titleline}[true]{\def\beamer@decolines@titleline{#1}} 16 | 17 | % Image used for the watermark. 18 | \def\beamer@decolines@watermarkorig{} 19 | \DeclareOptionBeamer{watermark}{\def\beamer@decolines@watermarkorig{#1}} 20 | 21 | % Height of the watermark. 22 | \def\beamer@decolines@watermarkheight{100px} 23 | \DeclareOptionBeamer{watermarkheight}{\def\beamer@decolines@watermarkheight{#1}} 24 | 25 | % The original image height is watermarkheightmult * watermarkheight. 26 | \def\beamer@decolines@watermarkheightmult{1} 27 | \DeclareOptionBeamer{watermarkheightmult}{\def\beamer@decolines@watermarkheightmult{#1}} 28 | 29 | \ExecuteOptionsBeamer{titleline=false} 30 | \ProcessOptionsBeamer 31 | 32 | % Enable/disable the watermark. 33 | \def\watermarkon{% 34 | \def\beamer@decolines@watermark{\beamer@decolines@watermarkorig}% 35 | } 36 | \def\watermarkoff{\def\beamer@decolines@watermark{}} 37 | 38 | % Initially enable the watermark. 39 | \watermarkon 40 | 41 | % Colors. 42 | \setbeamercolor*{lineup}{parent=palette primary} 43 | \setbeamercolor*{linemid}{parent=palette secondary} 44 | \setbeamercolor*{linebottom}{parent=palette tertiary} 45 | \setbeamercolor*{page header}{parent=titlelike} 46 | 47 | % Lengths 48 | \newlength{\headerheight} 49 | \setlength{\headerheight}{.045\paperheight} 50 | \newlength{\beamer@decolines@lineup} 51 | \setlength{\beamer@decolines@lineup}{.025\paperheight} 52 | \newlength{\beamer@decolines@linemid} 53 | \setlength{\beamer@decolines@linemid}{.015\paperheight} 54 | \newlength{\beamer@decolines@linebottom} 55 | \setlength{\beamer@decolines@linebottom}{.01\paperheight} 56 | 57 | % The height of the watermark part below the 3 bottom lines. 58 | \newlength{\beamer@decolines@watermarkheightbottom} 59 | \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@lineup} 60 | \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@linemid} 61 | \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@linebottom} 62 | 63 | % The height of the watermark part over the 3 bottom lines before shrinking. 64 | \newlength{\beamer@decolines@watermarkheightupperorig} 65 | \setlength{\beamer@decolines@watermarkheightupperorig}{\beamer@decolines@watermarkheight} 66 | \addtolength{\beamer@decolines@watermarkheightupperorig}{-\beamer@decolines@watermarkheightbottom} 67 | \multiply\beamer@decolines@watermarkheightupperorig by \beamer@decolines@watermarkheightmult 68 | 69 | % Footer. 70 | \defbeamertemplate*{footline}{decolines theme} 71 | { 72 | \leavevmode% 73 | % Page number. 74 | \hbox{% 75 | \begin{beamercolorbox}[wd=.2\paperwidth,ht=0ex,dp=0ex,center]{}% 76 | \usebeamerfont{palette primary}\insertframenumber{} \beamer@decolines@pageofpages{} \inserttotalframenumber% 77 | \end{beamercolorbox}% 78 | \begin{beamercolorbox}[wd=.8\paperwidth,ht=0ex,dp=0ex]{}% 79 | \end{beamercolorbox}% 80 | } % 81 | % First line. 82 | \hbox{% 83 | \begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{}% 84 | \end{beamercolorbox}% 85 | \begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{lineup}% 86 | \end{beamercolorbox}% 87 | } % 88 | % Second line. 89 | \hbox{% 90 | \begin{beamercolorbox}[wd=\paperwidth,ht=\beamer@decolines@linemid,dp=0pt]{linemid}% 91 | \end{beamercolorbox}% 92 | } % 93 | % Third line. 94 | \hbox{% 95 | \begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{}% 96 | \end{beamercolorbox}% 97 | \begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{linebottom}% 98 | \end{beamercolorbox}% 99 | }% 100 | % This seems to fix some alignment problems with the watermark. It has to be 101 | % always applied if you do not want to see the footer moving up and down when 102 | % moving from a page with watermark to a page without or vice versa. 103 | \vskip-.5px% 104 | % Watermark. 105 | \if\beamer@decolines@watermark\@empty\else% 106 | \vskip-\beamer@decolines@watermarkheightbottom% 107 | \llap{\includegraphics[height=\beamer@decolines@watermarkheightbottom,clip=true,% 108 | trim=0pt 0pt 0pt \beamer@decolines@watermarkheightupperorig]{\beamer@decolines@watermark}\hskip-\paperwidth}% 109 | \fi% 110 | } 111 | 112 | \defbeamertemplate*{headline}{decolines theme} 113 | { 114 | \leavevmode% 115 | \hbox{% 116 | \begin{beamercolorbox}[wd=\paperwidth,ht=\headerheight,dp=0pt]{page header}% 117 | \end{beamercolorbox}% 118 | } % 119 | \vskip0pt% 120 | } 121 | 122 | \defbeamertemplate*{frametitle}{decolines theme}[1][left] 123 | { 124 | \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}% 125 | \@tempdima=\textwidth% 126 | \advance\@tempdima by\beamer@leftmargin% 127 | \advance\@tempdima by\beamer@rightmargin% 128 | \vbox{}\vskip-.5\beamer@leftmargin% 129 | \begin{beamercolorbox}[sep=\beamer@leftmargin,#1,wd=\the\@tempdima]{} 130 | \usebeamerfont{frametitle}\usebeamercolor[bg]{framesubtitle}% 131 | \vbox{}\vskip0ex% 132 | \if@tempswa\else\csname beamer@fte#1\endcsname\fi% 133 | \strut\insertframetitle\strut\par% 134 | {% 135 | \ifx\insertframesubtitle\@empty% 136 | \else% 137 | {\usebeamerfont{framesubtitle}\usebeamercolor[bg]{framesubtitle}\insertframesubtitle\strut\par}% 138 | \fi 139 | }% 140 | \vskip-1ex% 141 | \if@tempswa\else\vskip-\beamer@leftmargin\fi 142 | \end{beamercolorbox}% 143 | \def\beamer@decolines@truetext{true}% 144 | \ifx\beamer@decolines@titleline\beamer@decolines@truetext% 145 | \vskip-.5\beamer@leftmargin% 146 | \begin{beamercolorbox}[wd=\textwidth,ht=.1ex,dp=0ex]{linemid}% 147 | \end{beamercolorbox}% 148 | \fi 149 | } 150 | 151 | % Frame title continuations, default 152 | \defbeamertemplate*{frametitle continuation}{decolines theme}{(\insertcontinuationcount)} 153 | 154 | \defbeamertemplate*{sidebar right}{decolines theme} 155 | { 156 | \vskip.1\beamer@leftmargin% 157 | \llap{\insertlogo\hskip.5\beamer@leftmargin}% 158 | \vfill% 159 | \if\beamer@decolines@watermark\@empty\else% 160 | \llap{\includegraphics[height=\beamer@decolines@watermarkheight]{\beamer@decolines@watermark}}% 161 | \vskip-\beamer@decolines@watermarkheightbottom% 162 | \fi 163 | } 164 | 165 | \mode 166 | 167 | -------------------------------------------------------------------------------- /slides/beamerthemeTorino.sty: -------------------------------------------------------------------------------- 1 | % Copyright 2007 by Marco Barisione 2 | % 3 | % This file may be distributed and/or modified 4 | % 5 | % 1. under the LaTeX Project Public License and/or 6 | % 2. under the GNU Public License. 7 | 8 | \mode 9 | 10 | \DeclareOptionBeamer{alternativetitlepage}[true]{\PassOptionsToPackage{alternativetitlepage=#1}{beamerinnerthemefancy}} 11 | \DeclareOptionBeamer{titlepagelogo}{\PassOptionsToPackage{titlepagelogo=#1}{beamerinnerthemefancy}} 12 | \DeclareOptionBeamer{bullet}{\PassOptionsToPackage{bullet=#1}{beamerinnerthemefancy}} 13 | \DeclareOptionBeamer{pageofpages}{\PassOptionsToPackage{pageofpages=#1}{beamerouterthemedecolines}} 14 | \DeclareOptionBeamer{titleline}[true]{\PassOptionsToPackage{titleline=#1}{beamerouterthemedecolines}} 15 | \DeclareOptionBeamer{watermark}{\PassOptionsToPackage{watermark=#1}{beamerouterthemedecolines}} 16 | \DeclareOptionBeamer{watermarkheight}{\PassOptionsToPackage{watermarkheight=#1}{beamerouterthemedecolines}} 17 | \DeclareOptionBeamer{watermarkheightmult}{\PassOptionsToPackage{watermarkheightmult=#1}{beamerouterthemedecolines}} 18 | 19 | \ProcessOptionsBeamer 20 | 21 | \useinnertheme{fancy} 22 | \useoutertheme{decolines} 23 | \usecolortheme{chameleon} 24 | 25 | \setbeamertemplate{navigation symbols}{} 26 | 27 | \mode 28 | 29 | -------------------------------------------------------------------------------- /slides/commits-all.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/slides/commits-all.pdf -------------------------------------------------------------------------------- /slides/commits1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/slides/commits1.pdf -------------------------------------------------------------------------------- /slides/commits2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/slides/commits2.pdf -------------------------------------------------------------------------------- /slides/django-all.txt: -------------------------------------------------------------------------------- 1 | 2793 Adrian Holovaty 2 | 1872 Malcolm Tredinnick 3 | 1700 Russell Keith-Magee 4 | 887 Jannis Leidel 5 | 884 Jacob Kaplan-Moss 6 | 775 Aymeric Augustin 7 | 671 Claude Paroz 8 | 474 Luke Plant 9 | 372 Ramiro Morales 10 | 354 Alex Gaynor 11 | 349 Tim Graham 12 | 335 Gary Wilson Jr 13 | 273 Karen Tracey 14 | 272 Justin Bronn 15 | 250 James Bennett 16 | 202 Georg Bauer 17 | 196 Anssi Kääriäinen 18 | 178 Julien Phalip 19 | 154 Carl Meyer 20 | 150 Brian Rosner 21 | 143 Timo Graham 22 | 123 Gabriel Hurley 23 | 115 Florian Apolloner 24 | 93 Ian Kelly 25 | 84 Chris Beaven 26 | 73 Marc Fargas 27 | 67 Joseph Kocherhans 28 | 67 Preston Holmes 29 | 51 Paul McMillan 30 | 46 Marc Tamlyn 31 | 44 Jarek Zgoda 32 | 44 Wilson Miner 33 | 40 Simon Meers 34 | 38 Honza Král 35 | 36 Andrew Godwin 36 | 36 Nicola Larosa 37 | 35 Baptiste Mispelon 38 | 34 Matt Boersma 39 | 33 Simon Charette 40 | 25 Simon Willison 41 | 18 Preston Timmons 42 | 17 Donald Stufft 43 | 15 Łukasz Langa 44 | 14 Ludvig Ericson 45 | 12 Erik Romijn 46 | 12 Ian Clelland 47 | 11 Honza Kral 48 | 11 Shai Berger 49 | 10 Loic Bistuer 50 | 9 Aljosa Mohorovic 51 | 7 Daniel Greenfeld 52 | 6 Andrew Jesaitis 53 | 6 Daniel Lindsley 54 | 6 David Cramer 55 | 6 Idan Gazit 56 | 6 Nick Sandford 57 | 6 Senko Rasic 58 | 6 Travis Swicegood 59 | 5 Alexey Boriskin 60 | 5 Dan Loewenherz 61 | 5 Daniele Procida 62 | 5 Gavin Wahl 63 | 5 Juan Catalano 64 | 5 Marc Garcia 65 | 5 Michael Manfre 66 | 5 Stephan Jaekel 67 | 5 Tom Christie 68 | 5 Tomek Paczkowski 69 | 4 Baptiste Darthenay 70 | 4 Danilo Bargen 71 | 4 David Fischer 72 | 4 Diederik van der Boor 73 | 4 Mike Fogel 74 | 4 Mitar 75 | 4 Silvan Spross 76 | 4 Zbigniew Siciarz 77 | 4 matiasb 78 | 3 Andrei Antoukh 79 | 3 Aviral Dasgupta 80 | 3 Bryan Veloso 81 | 3 Daniel Hepper 82 | 3 Florian Hahn 83 | 3 Horst Gutmann 84 | 3 Jacob Burch 85 | 3 Jan Bednařík 86 | 3 Marc Egli 87 | 3 Marti Raudsepp 88 | 3 Mike Grouchy 89 | 3 Nick Martini 90 | 3 Not Carl 91 | 3 Piet Delport 92 | 3 Tai Lee 93 | 3 Wiktor Kolodziej 94 | 3 Wilfred Hughes 95 | 3 Yohan Boniface 96 | 2 Alasdair Nicol 97 | 2 Andrew Badr 98 | 2 Anton Baklanov 99 | 2 Anton Danilchenko 100 | 2 Anton I. Sipos 101 | 2 Audrey Roy 102 | 2 Bojan Mihelac 103 | 2 Brian Galey 104 | 2 Bruno Renié 105 | 2 Camilo Nova 106 | 2 Chris Streeter 107 | 2 Collin Anderson 108 | 2 Dmitry Medvinsky 109 | 2 Flavio Curella 110 | 2 Gabe Jackson 111 | 2 George Song 112 | 2 Gilberto Gonçalves 113 | 2 Jaap Roes 114 | 2 Jeremy Dunck 115 | 2 Jeroen Dekkers 116 | 2 Jorge Bastida 117 | 2 Klaas van Schelven 118 | 2 Konrad Hałas 119 | 2 Lee Reilly 120 | 2 Marcin Biernat 121 | 2 Mathijs de Bruin 122 | 2 Matt Robenolt 123 | 2 Matt Stevens 124 | 2 Matthew Tretter 125 | 2 Mike Johnson 126 | 2 Pablo Recio 127 | 2 Ryan Kaskel 128 | 2 Selwin Ong 129 | 2 Shabda Raaj 130 | 2 Stephen Burrows 131 | 2 Thomas Thurman 132 | 2 Tom Insam 133 | 2 Tomasz Rybak 134 | 2 konarkmodi 135 | 2 leandrafinger 136 | 2 martin.bohacek 137 | 2 nklas 138 | 1 Aaron Cannon 139 | 1 Adam Wentz 140 | 1 Adrien Lemaire 141 | 1 Aleksandra Sendecka 142 | 1 Alex Hunley 143 | 1 Alex Ogier 144 | 1 Alisson 145 | 1 Ana Krivokapic 146 | 1 Anders Kaseorg 147 | 1 Andrea Crotti 148 | 1 Andreas 149 | 1 Andreas Hug 150 | 1 Andrew Brown 151 | 1 Andrew Gorcester 152 | 1 Andrews Medina 153 | 1 Andy Dirnberger 154 | 1 Angeline Tan 155 | 1 Axel Haustant 156 | 1 Axel Hecht 157 | 1 Bas Peschier 158 | 1 Ben Konrath 159 | 1 Ben Longden 160 | 1 Ben Spaulding 161 | 1 Benjamin Peterson 162 | 1 Boo 163 | 1 Bozidar Benko 164 | 1 Brad Pitcher 165 | 1 Brandon Adams 166 | 1 Brendan MacDonell 167 | 1 Brent O'Connor 168 | 1 Brett Koonce 169 | 1 CHI Cheng 170 | 1 Caleb Smith 171 | 1 Carlos Palol 172 | 1 Carny Cheng 173 | 1 Chris Khoo 174 | 1 Chris Lawlor 175 | 1 Chris McDonald 176 | 1 Chris Wilson 177 | 1 Christian Metts 178 | 1 Christoph Sieghart 179 | 1 Christopher Allen-Poole 180 | 1 Christopher Medrela 181 | 1 Christos Kontas 182 | 1 Craig Blaszczyk 183 | 1 Daniel D. Beck 184 | 1 Daniel Roseman 185 | 1 Dave Hall 186 | 1 Deni Bertovic 187 | 1 Deric Crago 188 | 1 Dmitry Shevchenko 189 | 1 Don Spaulding 190 | 1 Eduardo Cereto Carvalho 191 | 1 Edward Tjörnhammar 192 | 1 Emil Stenström 193 | 1 Enrico Ehrhardt 194 | 1 Eric Davis 195 | 1 Eric Florenzano 196 | 1 Eric Urban 197 | 1 Evan Carmi 198 | 1 Evrim Çabuk 199 | 1 Filipa Andrade 200 | 1 Gabriel Grant 201 | 1 George Hickman 202 | 1 Glen Robertson 203 | 1 Graham Dumpleton 204 | 1 Grzegorz Nosek 205 | 1 Guilherme Gondim 206 | 1 Hannes Struss 207 | 1 Harm Geerts 208 | 1 Hernan Lozano 209 | 1 Hiroki Kiyohara 210 | 1 Igor Támara 211 | 1 Issac Kelly 212 | 1 James Aylett 213 | 1 James Tauber 214 | 1 Jani Tiainen 215 | 1 Jann Kleen 216 | 1 Jason Davies 217 | 1 Jason Yan 218 | 1 Javier Mansilla 219 | 1 Jens Page 220 | 1 Jeremy Cowgar 221 | 1 Joe Friedl 222 | 1 Joeri Bekker 223 | 1 Johan Charpentier 224 | 1 John Paulett 225 | 1 JonLoy 226 | 1 Jonatan Heyman 227 | 1 Jonathan Loy 228 | 1 Josh Smeaton 229 | 1 Juan Pedro Fisanotti 230 | 1 Juan Riaza 231 | 1 Julian Bez 232 | 1 Justin Turner Arthur 233 | 1 Karol Sikora 234 | 1 Kaspars Sprogis 235 | 1 Kenny Rachuonyo 236 | 1 Kent Hauser 237 | 1 Kevin McCarthy 238 | 1 Krzysztof Jurewicz 239 | 1 Kyle Fuller 240 | 1 Lennart Regebro 241 | 1 Loic Raucy 242 | 1 Lucian Ursu 243 | 1 Ludovic Delaveau 244 | 1 Maik Hoepfel 245 | 1 Marc Aymerich 246 | 1 Marc Neuwirth 247 | 1 Mark Huang 248 | 1 Markus Zapke-Gründemann 249 | 1 Martey Dodoo 250 | 1 Martijn Vermaat 251 | 1 Martin Brochhaus 252 | 1 Mateusz Haligowski 253 | 1 Matthew Somerville 254 | 1 Matthew Wood 255 | 1 Michael Blume 256 | 1 Michael Farrell 257 | 1 Michael Johnson 258 | 1 Michael Kelly 259 | 1 Michael Newman 260 | 1 Michael van Tellingen 261 | 1 Michal Petrucha 262 | 1 Mike Yumatov 263 | 1 Nicolas Ippolito 264 | 1 Nimesh Ghelani 265 | 1 Nuno Maltez 266 | 1 Oliver Beattie 267 | 1 Olivier Sels 268 | 1 Pablo Sanfilippo 269 | 1 Panagiotis H.M. Issaris 270 | 1 Patryk Zawadzki 271 | 1 Paul Collins 272 | 1 Paul Tax 273 | 1 Pedro Mourelle 274 | 1 Peter Inglesby 275 | 1 Rafal Stozek 276 | 1 Rafik Draoui 277 | 1 Raúl Cumplido 278 | 1 Remco Wendt 279 | 1 Renato Pedigoni 280 | 1 René Fleschenberg 281 | 1 Richard Cornish 282 | 1 Rigel Di Scala 283 | 1 Riley Strong 284 | 1 Rocky Meza 285 | 1 Roman Haritonov 286 | 1 Ryan West 287 | 1 Samuel Sutch 288 | 1 Scott Klein 289 | 1 Sean Breant 290 | 1 Sebastián Magrí 291 | 1 Simeon Visser 292 | 1 Simon Kerr 293 | 1 Stefan "hr" Berder 294 | 1 Stefan Kjartansson 295 | 1 Stefan hr Berder 296 | 1 Stratos Moros 297 | 1 Thomas Bartelmess 298 | 1 Tim Saylor 299 | 1 Tobias Carlander 300 | 1 Tobias McNulty 301 | 1 Tom Mortimer-Jones 302 | 1 Tom Terrace 303 | 1 Tom V 304 | 1 Tomasz Jaskowski 305 | 1 Tome Cvitan 306 | 1 Tomáš Ehrlich 307 | 1 Tyler Ball 308 | 1 Ulrich Petri 309 | 1 Val Neekman 310 | 1 Vebjorn Ljosa 311 | 1 Vinod Kurup 312 | 1 Vladimir A Filonov 313 | 1 Vladimír Macek 314 | 1 Vlastimil Zíma 315 | 1 WoLpH 316 | 1 anatoly techtonik 317 | 1 bbjay 318 | 1 danger 319 | 1 fako 320 | 1 ferhat elmas 321 | 1 jakul 322 | 1 jktravis 323 | 1 jnns 324 | 1 juanpex 325 | 1 kspi 326 | 1 maurizio 327 | 1 mitnk 328 | 1 mpaolini 329 | 1 orblivion 330 | 1 postrational 331 | 1 russkel 332 | 1 shepdl 333 | 1 vanschelven 334 | 1 vkuzma 335 | 1 yishaibeeri 336 | 1 zhongqi 337 | 1 zyegfryed 338 | -------------------------------------------------------------------------------- /slides/django-year.txt: -------------------------------------------------------------------------------- 1 | 498 Claude Paroz 2 | 481 Aymeric Augustin 3 | 349 Tim Graham 4 | 162 Anssi Kääriäinen 5 | 111 Florian Apolloner 6 | 105 Alex Gaynor 7 | 82 Ramiro Morales 8 | 67 Preston Holmes 9 | 46 Marc Tamlyn 10 | 37 Carl Meyer 11 | 36 Julien Phalip 12 | 35 Baptiste Mispelon 13 | 33 Russell Keith-Magee 14 | 31 Simon Charette 15 | 26 Jacob Kaplan-Moss 16 | 26 Jannis Leidel 17 | 23 Luke Plant 18 | 21 Adrian Holovaty 19 | 20 Justin Bronn 20 | 18 Preston Timmons 21 | 17 Donald Stufft 22 | 15 James Bennett 23 | 15 Łukasz Langa 24 | 14 Andrew Godwin 25 | 13 Honza Král 26 | 12 Erik Romijn 27 | 12 Ian Clelland 28 | 11 Shai Berger 29 | 10 Loic Bistuer 30 | 9 Karen Tracey 31 | 9 Simon Meers 32 | 7 Daniel Greenfeld 33 | 7 Honza Kral 34 | 6 Andrew Jesaitis 35 | 6 Daniel Lindsley 36 | 6 David Cramer 37 | 6 Nick Sandford 38 | 6 Senko Rasic 39 | 5 Alexey Boriskin 40 | 5 Dan Loewenherz 41 | 5 Daniele Procida 42 | 5 Gavin Wahl 43 | 5 Juan Catalano 44 | 5 Michael Manfre 45 | 5 Stephan Jaekel 46 | 5 Tom Christie 47 | 5 Tomek Paczkowski 48 | 4 Baptiste Darthenay 49 | 4 Danilo Bargen 50 | 4 David Fischer 51 | 4 Diederik van der Boor 52 | 4 Mike Fogel 53 | 4 Mitar 54 | 4 Silvan Spross 55 | 4 Zbigniew Siciarz 56 | 4 matiasb 57 | 3 Bryan Veloso 58 | 3 Chris Beaven 59 | 3 Florian Hahn 60 | 3 Horst Gutmann 61 | 3 Jacob Burch 62 | 3 Jan Bednařík 63 | 3 Malcolm Tredinnick 64 | 3 Marc Egli 65 | 3 Marti Raudsepp 66 | 3 Mike Grouchy 67 | 3 Nick Martini 68 | 3 Piet Delport 69 | 3 Tai Lee 70 | 3 Wiktor Kolodziej 71 | 3 Wilfred Hughes 72 | 3 Yohan Boniface 73 | 2 Alasdair Nicol 74 | 2 Andrei Antoukh 75 | 2 Andrew Badr 76 | 2 Anton Baklanov 77 | 2 Anton Danilchenko 78 | 2 Anton I. Sipos 79 | 2 Bojan Mihelac 80 | 2 Brian Galey 81 | 2 Bruno Renié 82 | 2 Camilo Nova 83 | 2 Chris Streeter 84 | 2 Collin Anderson 85 | 2 Dmitry Medvinsky 86 | 2 Flavio Curella 87 | 2 Gilberto Gonçalves 88 | 2 Jaap Roes 89 | 2 Jeremy Dunck 90 | 2 Jeroen Dekkers 91 | 2 Jorge Bastida 92 | 2 Klaas van Schelven 93 | 2 Konrad Hałas 94 | 2 Marcin Biernat 95 | 2 Mathijs de Bruin 96 | 2 Matt Robenolt 97 | 2 Matt Stevens 98 | 2 Mike Johnson 99 | 2 Pablo Recio 100 | 2 Ryan Kaskel 101 | 2 Selwin Ong 102 | 2 Shabda Raaj 103 | 2 Stephen Burrows 104 | 2 Thomas Thurman 105 | 2 Tom Insam 106 | 2 Tomasz Rybak 107 | 2 Travis Swicegood 108 | 2 konarkmodi 109 | 2 leandrafinger 110 | 2 nklas 111 | 1 Aaron Cannon 112 | 1 Adam Wentz 113 | 1 Adrien Lemaire 114 | 1 Aleksandra Sendecka 115 | 1 Alex Hunley 116 | 1 Alisson 117 | 1 Ana Krivokapic 118 | 1 Anders Kaseorg 119 | 1 Andrea Crotti 120 | 1 Andreas 121 | 1 Andreas Hug 122 | 1 Andrew Brown 123 | 1 Andrew Gorcester 124 | 1 Andrews Medina 125 | 1 Andy Dirnberger 126 | 1 Angeline Tan 127 | 1 Axel Haustant 128 | 1 Axel Hecht 129 | 1 Bas Peschier 130 | 1 Ben Konrath 131 | 1 Ben Longden 132 | 1 Ben Spaulding 133 | 1 Benjamin Peterson 134 | 1 Bozidar Benko 135 | 1 Brad Pitcher 136 | 1 Brandon Adams 137 | 1 Brendan MacDonell 138 | 1 Brent O'Connor 139 | 1 Brett Koonce 140 | 1 Brian Rosner 141 | 1 CHI Cheng 142 | 1 Caleb Smith 143 | 1 Carlos Palol 144 | 1 Carny Cheng 145 | 1 Chris Khoo 146 | 1 Chris Lawlor 147 | 1 Chris McDonald 148 | 1 Chris Wilson 149 | 1 Christian Metts 150 | 1 Christoph Sieghart 151 | 1 Christopher Allen-Poole 152 | 1 Christopher Medrela 153 | 1 Christos Kontas 154 | 1 Craig Blaszczyk 155 | 1 Daniel D. Beck 156 | 1 Dave Hall 157 | 1 Deni Bertovic 158 | 1 Deric Crago 159 | 1 Dmitry Shevchenko 160 | 1 Don Spaulding 161 | 1 Eduardo Cereto Carvalho 162 | 1 Edward Tjörnhammar 163 | 1 Emil Stenström 164 | 1 Enrico Ehrhardt 165 | 1 Eric Davis 166 | 1 Eric Florenzano 167 | 1 Eric Urban 168 | 1 Evan Carmi 169 | 1 Evrim Çabuk 170 | 1 Filipa Andrade 171 | 1 Gabe Jackson 172 | 1 Gabriel Grant 173 | 1 Gabriel Hurley 174 | 1 George Hickman 175 | 1 George Song 176 | 1 Grzegorz Nosek 177 | 1 Guilherme Gondim 178 | 1 Hannes Struss 179 | 1 Harm Geerts 180 | 1 Hernan Lozano 181 | 1 Hiroki Kiyohara 182 | 1 Igor Támara 183 | 1 Issac Kelly 184 | 1 James Aylett 185 | 1 Jani Tiainen 186 | 1 Jason Yan 187 | 1 Javier Mansilla 188 | 1 Joe Friedl 189 | 1 Joeri Bekker 190 | 1 Johan Charpentier 191 | 1 John Paulett 192 | 1 JonLoy 193 | 1 Jonatan Heyman 194 | 1 Jonathan Loy 195 | 1 Josh Smeaton 196 | 1 Juan Pedro Fisanotti 197 | 1 Justin Turner Arthur 198 | 1 Karol Sikora 199 | 1 Kaspars Sprogis 200 | 1 Kenny Rachuonyo 201 | 1 Kent Hauser 202 | 1 Kevin McCarthy 203 | 1 Krzysztof Jurewicz 204 | 1 Lennart Regebro 205 | 1 Loic Raucy 206 | 1 Lucian Ursu 207 | 1 Ludovic Delaveau 208 | 1 Maik Hoepfel 209 | 1 Marc Aymerich 210 | 1 Mark Huang 211 | 1 Markus Zapke-Gründemann 212 | 1 Martey Dodoo 213 | 1 Martijn Vermaat 214 | 1 Martin Brochhaus 215 | 1 Mateusz Haligowski 216 | 1 Matthew Somerville 217 | 1 Matthew Tretter 218 | 1 Matthew Wood 219 | 1 Michael Blume 220 | 1 Michael Farrell 221 | 1 Michael Johnson 222 | 1 Michael Kelly 223 | 1 Michael van Tellingen 224 | 1 Michal Petrucha 225 | 1 Nicolas Ippolito 226 | 1 Nimesh Ghelani 227 | 1 Nuno Maltez 228 | 1 Oliver Beattie 229 | 1 Olivier Sels 230 | 1 Pablo Sanfilippo 231 | 1 Panagiotis H.M. Issaris 232 | 1 Patryk Zawadzki 233 | 1 Paul Collins 234 | 1 Paul Tax 235 | 1 Pedro Mourelle 236 | 1 Peter Inglesby 237 | 1 Rafal Stozek 238 | 1 Rafik Draoui 239 | 1 Raúl Cumplido 240 | 1 Remco Wendt 241 | 1 Renato Pedigoni 242 | 1 René Fleschenberg 243 | 1 Richard Cornish 244 | 1 Rigel Di Scala 245 | 1 Riley Strong 246 | 1 Rocky Meza 247 | 1 Roman Haritonov 248 | 1 Ryan West 249 | 1 Sean Breant 250 | 1 Sebastián Magrí 251 | 1 Simeon Visser 252 | 1 Simon Kerr 253 | 1 Stefan "hr" Berder 254 | 1 Stefan Kjartansson 255 | 1 Stefan hr Berder 256 | 1 Thomas Bartelmess 257 | 1 Tobias Carlander 258 | 1 Tobias McNulty 259 | 1 Tom Mortimer-Jones 260 | 1 Tom V 261 | 1 Tomasz Jaskowski 262 | 1 Tome Cvitan 263 | 1 Tomáš Ehrlich 264 | 1 Ulrich Petri 265 | 1 Val Neekman 266 | 1 Vebjorn Ljosa 267 | 1 Vinod Kurup 268 | 1 Vladimir A Filonov 269 | 1 Vladimír Macek 270 | 1 Vlastimil Zíma 271 | 1 WoLpH 272 | 1 bbjay 273 | 1 fako 274 | 1 ferhat elmas 275 | 1 jktravis 276 | 1 jnns 277 | 1 juanpex 278 | 1 kspi 279 | 1 mitnk 280 | 1 mpaolini 281 | 1 orblivion 282 | 1 postrational 283 | 1 russkel 284 | 1 shepdl 285 | 1 vanschelven 286 | 1 vkuzma 287 | 1 yishaibeeri 288 | 1 zhongqi 289 | 1 zyegfryed 290 | -------------------------------------------------------------------------------- /slides/ipython-all.txt: -------------------------------------------------------------------------------- 1 | 2200 Benjamin Ragan-Kelley 2 | 1673 Fernando Perez 3 | 1306 Brian E. Granger 4 | 926 Thomas Kluyver 5 | 802 Ville M. Vainio 6 | 648 Matthias BUSSONNIER 7 | 287 Evan Patterson 8 | 206 Bradley M. Froehle 9 | 180 Gael Varoquaux 10 | 132 Takafumi Arakaki 11 | 112 Walter Doerwald 12 | 92 Paul Ivanov 13 | 70 Laurent Dufréchou 14 | 54 Jörgen Stenarson 15 | 52 Barry Wark 16 | 50 Robert Kern 17 | 47 Stefan van der Walt 18 | 45 Julian Taylor 19 | 35 Greg Caporaso 20 | 29 Matthias Bussonnier 21 | 28 Jonathan Taylor 22 | 25 Jorgen Stenarson 23 | 25 Thomas Spura 24 | 22 Jörgen Stenarson 25 | 20 Jan Schulz 26 | 20 Nicolas Rougier 27 | 17 Jason Grout 28 | 17 Jonathan March 29 | 16 Christian Boos 30 | 15 Erik Tollerud 31 | 15 Omar Andrés Zapata Mesa 32 | 14 Robert McGibbon 33 | 13 Michael Droettboom 34 | 13 Piti Ongmongkolkul 35 | 13 Puneeth Chaganti 36 | 13 Satrajit Ghosh 37 | 12 Aaron Meurer 38 | 12 David Warde-Farley 39 | 11 Jens Hedegaard Nielsen 40 | 11 W. Trevor King 41 | 10 Aron Ahmadia 42 | 10 Cameron Bates 43 | 10 Timo Paulssen 44 | 10 darren.dale 45 | 10 jdh2358 46 | 9 Administrator 47 | 9 Brandon Parsons 48 | 9 Pauli Virtanen 49 | 9 Robert Marchman 50 | 9 Scott Tsai 51 | 9 Skipper Seabold 52 | 9 jstenar 53 | 8 Andrew Straw 54 | 8 Martin Spacek 55 | 8 Ryan May 56 | 7 Danny Staple 57 | 7 Darren Dale 58 | 7 Thomi Richards 59 | 7 mcelrath 60 | 7 mr.Shu 61 | 7 vds 62 | 6 Daniel Velkov 63 | 6 Dav Clark 64 | 6 Diane Trout 65 | 6 Dominik Dabrowski 66 | 6 Jens H. Nielsen 67 | 6 Mark Voorhies 68 | 6 Siyu Zhang 69 | 6 Tom Fetherston 70 | 5 David Hirschfeld 71 | 5 David Wyde 72 | 5 Eugene Van den Bulke 73 | 5 Ian Murray 74 | 5 Joon Ro 75 | 5 Mikhail Korobov 76 | 5 Pete Aykroyd 77 | 5 Tim Couper 78 | 5 dan.milstein 79 | 4 Ahmet Bakan 80 | 4 Ben Edwards 81 | 4 Carlos Cordoba 82 | 4 Christoph Gohlke 83 | 4 Frank Murphy 84 | 4 Jez Ng 85 | 4 Juergen Hasch 86 | 4 Mani chandra 87 | 4 Olivier Verdier 88 | 4 Prabhu Ramachandran 89 | 4 chapmanb 90 | 4 drevicko 91 | 4 v923z 92 | 3 Andrew Vandever 93 | 3 Antony Lee 94 | 3 Cavendish McKay 95 | 3 Ernie French 96 | 3 Felix Werner 97 | 3 Kyle Kelley 98 | 3 Marc Abramowitz 99 | 3 Mark Wiebe 100 | 3 Omar Andres Zapata Mesa 101 | 3 Pietro Berkes 102 | 3 Roy Hyunjin Han 103 | 3 Steven Johnson 104 | 3 Szabolcs Horvát 105 | 3 Thomas Hisch 106 | 3 Valentin Haenel 107 | 3 Yaroslav Halchenko 108 | 3 dkua 109 | 3 fawce 110 | 3 muzgash 111 | 3 s8weber 112 | 2 Alcides 113 | 2 Alex Kramer 114 | 2 Benjie Chen 115 | 2 Chris Beaumont 116 | 2 Chris Laumann 117 | 2 Gerardo 118 | 2 Guy Haskin Fernald 119 | 2 Hans Meine 120 | 2 Jens H Nielsen 121 | 2 Joseph Lansdowne 122 | 2 Justin Riley 123 | 2 Kent Inverarity 124 | 2 Luis Pedro Coelho 125 | 2 Matt Cottingham 126 | 2 Matthew Brett 127 | 2 Maxim Grechkin 128 | 2 Michael Shuffett 129 | 2 Mike Hansen 130 | 2 Owen Healy 131 | 2 Pawel Jasinski 132 | 2 Ross Jones 133 | 2 Toby Gilham 134 | 2 debjan 135 | 2 macgyver 136 | 2 tzanko 137 | 2 vankayala sowjanya 138 | 2 y-p 139 | 1 Aaron Culich 140 | 1 Adam Davis 141 | 1 Aenugu Sai Kiran Reddy 142 | 1 Alberto Valverde 143 | 1 Anders Hovmöller 144 | 1 Andrew Giessel 145 | 1 Andrew Spiers 146 | 1 André Matos 147 | 1 Anton Akhmerov 148 | 1 Antonio Cuni 149 | 1 Beetoju Anuradha 150 | 1 Benedikt Sauer 151 | 1 Benjamin Jones 152 | 1 Benjamin Thyreau 153 | 1 Bernard Paulus 154 | 1 Bernardo B. Marques 155 | 1 Boris de Laage 156 | 1 Brad Reisfeld 157 | 1 Bradley Froehle 158 | 1 Cody Precord 159 | 1 Corran Webster 160 | 1 DamianHeard 161 | 1 Dan Kilman 162 | 1 Dan McDougall 163 | 1 David 164 | 1 David Zderic 165 | 1 Donald Curtis 166 | 1 Dražen Lučanin 167 | 1 Eric Firing 168 | 1 Erik M. Bray 169 | 1 Gabriel 170 | 1 Grahame Bowland 171 | 1 Hannes Schulz 172 | 1 Harry Moreno 173 | 1 Jack Feser 174 | 1 Jeff Knisley 175 | 1 Jerry Fowler 176 | 1 Johann Cohen-Tanugi 177 | 1 John Zwinck 178 | 1 Jussi Sainio 179 | 1 Kefu Chai 180 | 1 Kiorky 181 | 1 Konrad Hinsen 182 | 1 Lars Solberg 183 | 1 Lessandro Mariano 184 | 1 Mark E. Smith 185 | 1 Mark Sienkiewicz at STScI 186 | 1 MercuryRising 187 | 1 Michał Górny 188 | 1 Nathan Goldbaum 189 | 1 Nathan Rice 190 | 1 Nick Tarleton 191 | 1 Ohad Ravid 192 | 1 Olivier Grisel 193 | 1 Pablo Winant 194 | 1 Pankaj Pandey 195 | 1 Paul 196 | 1 Piotr Zolnierczuk 197 | 1 Ramana 198 | 1 Rob Young 199 | 1 Rui Pereira 200 | 1 Rustam Safin 201 | 1 Samuel Ainsworth 202 | 1 Sathesh Chandra 203 | 1 Sean Vig 204 | 1 Sebastian Busch 205 | 1 Skylar Saveland 206 | 1 Stephan Peijnik 207 | 1 Steven Bethard 208 | 1 Steven Silvester 209 | 1 Takeshi Kanmae 210 | 1 Ted Wright 211 | 1 Thomas Robitaille 212 | 1 Thomas Weißschuh 213 | 1 Timothy O'Donnell 214 | 1 Tom MacWright 215 | 1 Tony S Yu 216 | 1 Vishal Vatsa 217 | 1 Vishnu S G 218 | 1 Yoav Ram 219 | 1 Zoltán Vörös 220 | 1 anatoly techtonik 221 | 1 andy wilson 222 | 1 chebee7i 223 | 1 codebraker 224 | 1 codespaced 225 | 1 klonuo 226 | 1 muzuiget 227 | 1 tcmulcahy 228 | 1 teegaar 229 | 1 ugurthemaster 230 | 1 urielshaolin 231 | 1 vds2212 232 | 1 wilsaj 233 | -------------------------------------------------------------------------------- /slides/ipython-year.txt: -------------------------------------------------------------------------------- 1 | 762 Benjamin Ragan-Kelley 2 | 370 Matthias BUSSONNIER 3 | 245 Brian E. Granger 4 | 223 Thomas Kluyver 5 | 154 Bradley M. Froehle 6 | 107 Fernando Perez 7 | 106 Takafumi Arakaki 8 | 35 Greg Caporaso 9 | 29 Matthias Bussonnier 10 | 22 Jörgen Stenarson 11 | 20 Jan Schulz 12 | 19 Paul Ivanov 13 | 17 Evan Patterson 14 | 16 Julian Taylor 15 | 14 Jörgen Stenarson 16 | 14 Robert McGibbon 17 | 13 Jason Grout 18 | 10 Cameron Bates 19 | 10 Piti Ongmongkolkul 20 | 10 W. Trevor King 21 | 9 Robert Marchman 22 | 8 Aaron Meurer 23 | 8 Aron Ahmadia 24 | 8 Ryan May 25 | 7 Danny Staple 26 | 7 David Warde-Farley 27 | 7 mr.Shu 28 | 6 Diane Trout 29 | 6 Dominik Dabrowski 30 | 6 Siyu Zhang 31 | 5 David Wyde 32 | 5 Eugene Van den Bulke 33 | 5 Jonathan March 34 | 5 Joon Ro 35 | 5 Mikhail Korobov 36 | 4 Ahmet Bakan 37 | 4 David Hirschfeld 38 | 4 Erik Tollerud 39 | 4 Frank Murphy 40 | 4 Juergen Hasch 41 | 4 Robert Kern 42 | 4 Thomas Spura 43 | 4 chapmanb 44 | 4 drevicko 45 | 4 v923z 46 | 3 Andrew Vandever 47 | 3 Antony Lee 48 | 3 Cavendish McKay 49 | 3 Christoph Gohlke 50 | 3 Jens H. Nielsen 51 | 3 Kyle Kelley 52 | 3 Pietro Berkes 53 | 3 dkua 54 | 3 jstenar 55 | 2 Benjie Chen 56 | 2 Carlos Cordoba 57 | 2 Chris Beaumont 58 | 2 Chris Laumann 59 | 2 Guy Haskin Fernald 60 | 2 Jez Ng 61 | 2 Joseph Lansdowne 62 | 2 Martin Spacek 63 | 2 Maxim Grechkin 64 | 2 Michael Droettboom 65 | 2 Michael Shuffett 66 | 2 Owen Healy 67 | 2 Pawel Jasinski 68 | 2 Puneeth Chaganti 69 | 2 debjan 70 | 2 mcelrath 71 | 2 s8weber 72 | 2 y-p 73 | 1 Adam Davis 74 | 1 Alberto Valverde 75 | 1 Alex Kramer 76 | 1 Anders Hovmöller 77 | 1 Andrew Spiers 78 | 1 Anton Akhmerov 79 | 1 Benedikt Sauer 80 | 1 Benjamin Jones 81 | 1 Boris de Laage 82 | 1 Corran Webster 83 | 1 DamianHeard 84 | 1 Dan Kilman 85 | 1 Dan McDougall 86 | 1 Donald Curtis 87 | 1 Dražen Lučanin 88 | 1 Erik M. Bray 89 | 1 Hans Meine 90 | 1 Harry Moreno 91 | 1 Jack Feser 92 | 1 Jeff Knisley 93 | 1 Jerry Fowler 94 | 1 John Zwinck 95 | 1 Jussi Sainio 96 | 1 Konrad Hinsen 97 | 1 Lars Solberg 98 | 1 Lessandro Mariano 99 | 1 Mark Sienkiewicz at STScI 100 | 1 MercuryRising 101 | 1 Michał Górny 102 | 1 Nathan Goldbaum 103 | 1 Ohad Ravid 104 | 1 Olivier Grisel 105 | 1 Olivier Verdier 106 | 1 Rob Young 107 | 1 Rui Pereira 108 | 1 Rustam Safin 109 | 1 Samuel Ainsworth 110 | 1 Sean Vig 111 | 1 Skylar Saveland 112 | 1 Steven Silvester 113 | 1 Takeshi Kanmae 114 | 1 Thomas Robitaille 115 | 1 Thomas Weißschuh 116 | 1 Timothy O'Donnell 117 | 1 Yoav Ram 118 | 1 Zoltán Vörös 119 | 1 codebraker 120 | 1 codespaced 121 | 1 klonuo 122 | 1 tcmulcahy 123 | 1 teegaar 124 | 1 ugurthemaster 125 | 1 urielshaolin 126 | -------------------------------------------------------------------------------- /slides/linux-all.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/slides/linux-all.txt -------------------------------------------------------------------------------- /slides/matplotlib-all.txt: -------------------------------------------------------------------------------- 1 | 2741 Michael Droettboom 2 | 2145 John Hunter 3 | 1150 Eric Firing 4 | 442 Darren Dale 5 | 417 Jae-Joon Lee 6 | 272 Andrew Straw 7 | 263 Steve Chaplin 8 | 262 Phil Elson 9 | 252 Damon McDougall 10 | 230 Jouni K. Seppänen 11 | 217 Ben Root 12 | 191 Ryan May 13 | 149 Charles Moad 14 | 125 Nelle Varoquaux 15 | 112 Tony S Yu 16 | 72 Christoph Gohlke 17 | 60 Jeff Whitaker 18 | 57 Thomas A Caswell 19 | 56 Matt Giuca 20 | 56 Paul Ivanov 21 | 53 Manuel Metz 22 | 48 Norbert Nemec 23 | 46 Daniel Hyams 24 | 45 James Evans 25 | 45 pwuertz 26 | 42 Todd Miller 27 | 42 pkienzle 28 | 36 endolith 29 | 33 Michiel de Hoon 30 | 33 pelson 31 | 31 Ian Thomas 32 | 29 Paul Barret 33 | 25 Martin Spacek 34 | 23 Jens H. Nielsen 35 | 23 Jochen Voss 36 | 22 Reinier Heeres 37 | 21 Edin Salkovic 38 | 19 Todd Jennings 39 | 18 Nic Eggert 40 | 16 David Kaplan 41 | 16 Fernando Perez 42 | 16 Travis Oliphant 43 | 15 Peter Würtz 44 | 15 Sameer D'Costa 45 | 14 Gerald Storer 46 | 13 Jake Vanderplas 47 | 13 Kevin Davies 48 | 13 Maximilian Albert 49 | 13 Wes Campaigne 50 | 12 Cimarron Mittelsteadt 51 | 12 Grégory Lielens 52 | 12 Matthew Emmett 53 | 12 Piti Ongmongkolkul 54 | 10 Jens Hedegaard Nielsen 55 | 10 Stefan van der Walt 56 | 9 Craig M 57 | 8 Brian Mattern 58 | 8 Geoffroy Billotey 59 | 8 Michael Welter 60 | 8 Mike Kaufman 61 | 8 Till Stensitzki 62 | 7 Neil 63 | 7 Thomas Robitaille 64 | 7 fgb 65 | 6 Amit Aronovitch 66 | 6 Amy 67 | 6 Andrew Dawson 68 | 6 Graham Poulter 69 | 6 Jan-Philip Gehrcke 70 | 6 Joe Kington 71 | 6 Robert Johansson 72 | 5 Anton Akhmerov 73 | 5 David Huard 74 | 5 James R. Evans 75 | 5 Ken McIvor 76 | 5 bblay 77 | 4 Cameron Bates 78 | 4 Hubert Holin 79 | 4 Julien Schueller 80 | 4 Leo Singer 81 | 4 Marc Abramowitz 82 | 4 Matt Newville 83 | 4 Skipper Seabold 84 | 4 Takafumi Arakaki 85 | 4 Thomas Kluyver 86 | 4 Tobias Megies 87 | 4 Víctor Terrón 88 | 4 vbr 89 | 3 Ahmet Bakan 90 | 3 Bradley M. Froehle 91 | 3 Chris Beaumont 92 | 3 Christoph Dann 93 | 3 David Trémouilles 94 | 3 Hans Meine 95 | 3 Jeffrey Bingham 96 | 3 Maximilian Trescher 97 | 3 MinRK 98 | 3 Pauli Virtanen 99 | 3 Simon Cross 100 | 3 Tobias Hoppe 101 | 3 butterw 102 | 3 dhyams 103 | 2 Aaron Boushley 104 | 2 Adam Ginsburg 105 | 2 Alejandro Dubrovsky 106 | 2 Arnaud Gardelein 107 | 2 Ben Gamari 108 | 2 Brett Graham 109 | 2 Evan Davey 110 | 2 Francesco Montesano 111 | 2 Gellule Xg 112 | 2 Jack Kelly 113 | 2 Jeff Bingham 114 | 2 Jeremy O'Donoghue 115 | 2 Julian Taylor 116 | 2 Lodato Luciano 117 | 2 Pim Schellart 118 | 2 Russell Owen 119 | 2 Ryan Dale 120 | 2 Sandro Tosi 121 | 2 Sergey Koposov 122 | 2 Stefano Rivera 123 | 2 Tomas Kazmar 124 | 2 aseagram 125 | 2 drevicko 126 | 2 gitj 127 | 1 Adrian Price-Whelan 128 | 1 Alex C. Szatmary 129 | 1 Andreas Hilboll 130 | 1 Antony Lee 131 | 1 Binglin Chang 132 | 1 Bussonnier Matthias 133 | 1 C. Gohlke 134 | 1 Carl Michal 135 | 1 Corey Farwell 136 | 1 Craig Tenney 137 | 1 Ezra Peisach 138 | 1 Guillaume Gay 139 | 1 Ignas Anikevicius (gns_ank) 140 | 1 Jack (aka Daniel) Kelly 141 | 1 Jarrod Millman 142 | 1 Jason Grout 143 | 1 Jeremy Thurgood 144 | 1 Jim Radford 145 | 1 Jonathan Waltman 146 | 1 Julien Woillez 147 | 1 Lance Hepler 148 | 1 Martin Teichmann 149 | 1 Martin Ueding 150 | 1 Matthias BUSSONNIER 151 | 1 Min RK 152 | 1 Miriam Sierig 153 | 1 Nick Semenkovich 154 | 1 Nicolas Pinto 155 | 1 Nikolay Vyahhi 156 | 1 Pascal Bugnion 157 | 1 Paul Hobson 158 | 1 Perry Greenfield 159 | 1 Pierre Haessig 160 | 1 Richard Hattersley 161 | 1 Richard Trieu 162 | 1 Ryan Blomberg 163 | 1 Sebastian Pinnau 164 | 1 Takeshi Kanmae 165 | 1 Tor Colvin 166 | 1 Wouter Overmeire 167 | 1 Yann Tambouret 168 | 1 Zach Pincus 169 | 1 bev-a-tron 170 | 1 burrbull 171 | 1 goir 172 | 1 jschueller 173 | 1 krischer 174 | 1 mcelrath 175 | 1 montefra 176 | 1 torfbolt 177 | 1 ugurthemaster 178 | -------------------------------------------------------------------------------- /slides/matplotlib-year.txt: -------------------------------------------------------------------------------- 1 | 676 Michael Droettboom 2 | 246 Damon McDougall 3 | 204 Phil Elson 4 | 147 Eric Firing 5 | 125 Nelle Varoquaux 6 | 61 Tony S Yu 7 | 57 Ben Root 8 | 57 Thomas A Caswell 9 | 56 Matt Giuca 10 | 47 Christoph Gohlke 11 | 45 pwuertz 12 | 34 Paul Ivanov 13 | 31 Daniel Hyams 14 | 29 pelson 15 | 25 Jae-Joon Lee 16 | 22 Ian Thomas 17 | 21 Ryan May 18 | 19 Todd Jennings 19 | 18 Jens H. Nielsen 20 | 18 Martin Spacek 21 | 18 Nic Eggert 22 | 15 Peter Würtz 23 | 13 Jake Vanderplas 24 | 13 Maximilian Albert 25 | 13 Wes Campaigne 26 | 12 Cimarron Mittelsteadt 27 | 9 Matthew Emmett 28 | 8 Brian Mattern 29 | 8 Geoffroy Billotey 30 | 8 Kevin Davies 31 | 8 Michael Welter 32 | 8 Michiel de Hoon 33 | 8 Till Stensitzki 34 | 6 Amit Aronovitch 35 | 6 Amy 36 | 6 Jan-Philip Gehrcke 37 | 5 Anton Akhmerov 38 | 5 Joe Kington 39 | 5 Jouni K. Seppänen 40 | 5 Thomas Robitaille 41 | 5 bblay 42 | 5 endolith 43 | 4 Andrew Dawson 44 | 4 Cameron Bates 45 | 4 Jens Hedegaard Nielsen 46 | 4 Julien Schueller 47 | 4 Leo Singer 48 | 4 Takafumi Arakaki 49 | 4 Tobias Megies 50 | 4 Víctor Terrón 51 | 4 vbr 52 | 3 Ahmet Bakan 53 | 3 Chris Beaumont 54 | 3 David Trémouilles 55 | 3 Jeffrey Bingham 56 | 3 MinRK 57 | 3 Piti Ongmongkolkul 58 | 3 Thomas Kluyver 59 | 3 dhyams 60 | 2 Adam Ginsburg 61 | 2 Alejandro Dubrovsky 62 | 2 Ben Gamari 63 | 2 Bradley M. Froehle 64 | 2 Francesco Montesano 65 | 2 Gellule Xg 66 | 2 Jack Kelly 67 | 2 James R. Evans 68 | 2 Jeff Bingham 69 | 2 John Hunter 70 | 2 Lodato Luciano 71 | 2 Pauli Virtanen 72 | 2 Ryan Dale 73 | 2 Sandro Tosi 74 | 2 Sergey Koposov 75 | 2 Tomas Kazmar 76 | 2 aseagram 77 | 2 drevicko 78 | 2 gitj 79 | 1 Adrian Price-Whelan 80 | 1 Andreas Hilboll 81 | 1 Antony Lee 82 | 1 Binglin Chang 83 | 1 Carl Michal 84 | 1 Guillaume Gay 85 | 1 Jack (aka Daniel) Kelly 86 | 1 Jonathan Waltman 87 | 1 Julien Woillez 88 | 1 Martin Teichmann 89 | 1 Martin Ueding 90 | 1 Min RK 91 | 1 Nick Semenkovich 92 | 1 Pascal Bugnion 93 | 1 Paul Hobson 94 | 1 Pierre Haessig 95 | 1 Russell Owen 96 | 1 Ryan Blomberg 97 | 1 Sebastian Pinnau 98 | 1 Takeshi Kanmae 99 | 1 Wouter Overmeire 100 | 1 bev-a-tron 101 | 1 burrbull 102 | 1 jschueller 103 | 1 krischer 104 | 1 mcelrath 105 | 1 montefra 106 | 1 torfbolt 107 | 1 ugurthemaster 108 | -------------------------------------------------------------------------------- /slides/numpy-all.txt: -------------------------------------------------------------------------------- 1 | 1989 Travis Oliphant 2 | 1516 David Cournapeau 3 | 1205 Charles Harris 4 | 1061 Pearu Peterson 5 | 746 Mark Wiebe 6 | 605 Pauli Virtanen 7 | 421 Stefan van der Walt 8 | 284 Ralf Gommers 9 | 249 cookedm 10 | 248 Eric Jones 11 | 199 pierregm 12 | 177 Robert Kern 13 | 140 Nathaniel J. Smith 14 | 127 Jarrod Millman 15 | 110 Sebastian Berg 16 | 81 Alan McIntyre 17 | 74 sasha 18 | 72 Travis E. Oliphant 19 | 69 ovillellas 20 | 64 wfspotz@sandia.gov 21 | 58 Jay Bourque 22 | 52 Ondřej Čertík 23 | 50 Matthew Brett 24 | 46 Julian Taylor 25 | 39 Han Genuit 26 | 38 edschofield 27 | 31 dhuard 28 | 30 David Warde-Farley 29 | 30 m-d-w 30 | 29 Tim Leslie 31 | 25 chanley 32 | 25 mdroe 33 | 24 Christoph Gohlke 34 | 21 endolith 35 | 20 Fernando Perez 36 | 20 jmiller 37 | 18 John Salvatier 38 | 17 Frederic 39 | 16 Tim Hochberg 40 | 15 Aaron River 41 | 15 Thouis (Ray) Jones 42 | 15 seberg 43 | 14 chris.burns 44 | 13 Warren Weckesser 45 | 13 prabhu 46 | 11 87 47 | 11 Chris Jordan-Squire 48 | 11 Robert Cimrman 49 | 10 Christopher L. Farrow 50 | 10 Eric Fode 51 | 10 Michael Droettboom 52 | 10 Skipper Seabold 53 | 10 Thomas Robitaille 54 | 10 skip 55 | 9 Ben Walsh 56 | 8 Yaroslav Halchenko 57 | 7 Darren Dale 58 | 7 Denis Laxalde 59 | 7 Travis Vaught 60 | 7 aarchiba 61 | 6 hangenuit@gmail.com 62 | 6 jayvius 63 | 6 patmiller 64 | 5 Bradley M. Froehle 65 | 5 Derek Homeier 66 | 5 Eric Moore 67 | 5 Joe Kington 68 | 4 Alok Singhal 69 | 4 Bryan Van de Ven 70 | 4 Eric Firing 71 | 4 Geoffrey Irving 72 | 4 Justin Peel 73 | 4 Nicolas Pinto 74 | 4 Paul Anton Letnes 75 | 4 Paul Ivanov 76 | 4 dmorrill 77 | 3 Alex Ford 78 | 3 Aron Ahmadia 79 | 3 Ben Root 80 | 3 Fabian Pedregosa 81 | 3 Fazlul Shahriar 82 | 3 GaelVaroquaux 83 | 3 Guillaume Gay 84 | 3 Lars Buitinck 85 | 3 Scott Sinclair 86 | 3 Steve 87 | 3 Steve R. Hastings 88 | 3 Valentin Haenel 89 | 3 argriffing 90 | 3 peterjc 91 | 3 tim cera 92 | 2 Adam Ginsburg 93 | 2 Bartosz Telenczuk 94 | 2 Chris Barker 95 | 2 Dan Miller 96 | 2 Edward Catmur 97 | 2 Gabriel 98 | 2 Jason Grout 99 | 2 Josh Warner (Mac) 100 | 2 Luis Pedro Coelho 101 | 2 Marc Abramowitz 102 | 2 Nicolas Scheffer 103 | 2 Robert Kende 104 | 2 Ronan Lamy 105 | 2 Sandro Tosi 106 | 2 abaecker 107 | 2 ahmadia 108 | 2 jamestwebber 109 | 2 joe 110 | 2 nobody 111 | 2 swalton 112 | 2 weathergod 113 | 1 Adam Griffiths 114 | 1 Andreas Hilboll 115 | 1 Andrew Horton 116 | 1 Arfrever Frehtes Taifersar Arahesis 117 | 1 Arink Verma 118 | 1 Brent Pedersen 119 | 1 Carlos Valiente 120 | 1 Carwyn Pelley 121 | 1 Chris 122 | 1 Christian Brueffer 123 | 1 Christoph Weidemann 124 | 1 Dag Sverre Seljebotn 125 | 1 Dan Hipschman 126 | 1 David Huard 127 | 1 Derek Homeir 128 | 1 Derek Homier 129 | 1 Eli Stevens 130 | 1 Francesc Alted 131 | 1 Henry Gomersall 132 | 1 Hrvoje Niksic 133 | 1 Ilan Schnell 134 | 1 Jake Vanderplas 135 | 1 John Benediktsson 136 | 1 Jonathan Waltman 137 | 1 Joon Ro 138 | 1 Joonas Paalasmaa 139 | 1 Jos de Kloe 140 | 1 Juan Luis Cano Rodríguez 141 | 1 Julien Phalip 142 | 1 Keith Goodman 143 | 1 Kumar Appaiah 144 | 1 Leon Weber 145 | 1 Loftie Ellis 146 | 1 Marcin Juszkiewicz 147 | 1 Martin Baeuml 148 | 1 Martin Spacek 149 | 1 Martin Teichmann 150 | 1 Matt Davis 151 | 1 Maximilian Albert 152 | 1 Michael McNeil Forbes 153 | 1 Neil Muller 154 | 1 Per A. Brodtkorb 155 | 1 Raymond Roberts 156 | 1 Robert Costa 157 | 1 Rui Pereira 158 | 1 Simon Blyth 159 | 1 Sveinung Gundersen 160 | 1 Takafumi Arakaki 161 | 1 Tim Cera 162 | 1 Timo Kluck 163 | 1 Tony S Yu 164 | 1 Vladimir Rutsky 165 | 1 bebert218 166 | 1 daveydave400 167 | 1 jmozmoz 168 | 1 jswhit 169 | 1 madhusudancs 170 | 1 martin 171 | 1 martingoodson 172 | 1 mwtoews 173 | 1 zed 174 | -------------------------------------------------------------------------------- /slides/numpy-year.txt: -------------------------------------------------------------------------------- 1 | 278 Charles Harris 2 | 110 Sebastian Berg 3 | 109 Nathaniel J. Smith 4 | 69 ovillellas 5 | 61 Ralf Gommers 6 | 58 Jay Bourque 7 | 52 Ondřej Čertík 8 | 50 Pauli Virtanen 9 | 46 Julian Taylor 10 | 46 Travis E. Oliphant 11 | 30 m-d-w 12 | 26 Han Genuit 13 | 24 David Cournapeau 14 | 20 Christoph Gohlke 15 | 20 endolith 16 | 19 David Warde-Farley 17 | 18 John Salvatier 18 | 15 Frederic 19 | 15 seberg 20 | 14 Mark Wiebe 21 | 11 Warren Weckesser 22 | 10 87 23 | 10 Eric Fode 24 | 10 Thomas Robitaille 25 | 8 Matthew Brett 26 | 7 Stefan van der Walt 27 | 7 Yaroslav Halchenko 28 | 6 jayvius 29 | 5 Bradley M. Froehle 30 | 5 Eric Moore 31 | 4 Ben Walsh 32 | 3 Alex Ford 33 | 3 Eric Firing 34 | 3 Fazlul Shahriar 35 | 3 GaelVaroquaux 36 | 3 Guillaume Gay 37 | 3 Skipper Seabold 38 | 3 Steve 39 | 3 argriffing 40 | 3 peterjc 41 | 2 Adam Ginsburg 42 | 2 Aron Ahmadia 43 | 2 Bartosz Telenczuk 44 | 2 Dan Miller 45 | 2 Edward Catmur 46 | 2 Gabriel 47 | 2 Josh Warner (Mac) 48 | 2 Michael Droettboom 49 | 2 Nicolas Scheffer 50 | 2 Paul Ivanov 51 | 2 Robert Kern 52 | 2 Ronan Lamy 53 | 2 Sandro Tosi 54 | 2 Thouis (Ray) Jones 55 | 2 jamestwebber 56 | 1 Adam Griffiths 57 | 1 Andreas Hilboll 58 | 1 Andrew Horton 59 | 1 Arink Verma 60 | 1 Carwyn Pelley 61 | 1 Chris 62 | 1 Christian Brueffer 63 | 1 Dan Hipschman 64 | 1 Denis Laxalde 65 | 1 John Benediktsson 66 | 1 Jonathan Waltman 67 | 1 Joon Ro 68 | 1 Jos de Kloe 69 | 1 Juan Luis Cano Rodríguez 70 | 1 Julien Phalip 71 | 1 Kumar Appaiah 72 | 1 Leon Weber 73 | 1 Loftie Ellis 74 | 1 Luis Pedro Coelho 75 | 1 Marcin Juszkiewicz 76 | 1 Martin Baeuml 77 | 1 Martin Teichmann 78 | 1 Matt Davis 79 | 1 Maximilian Albert 80 | 1 Robert Costa 81 | 1 Sveinung Gundersen 82 | 1 Takafumi Arakaki 83 | 1 Valentin Haenel 84 | 1 Vladimir Rutsky 85 | 1 ahmadia 86 | 1 bebert218 87 | 1 daveydave400 88 | 1 jmozmoz 89 | 1 martingoodson 90 | 1 mwtoews 91 | -------------------------------------------------------------------------------- /slides/pandas-all.txt: -------------------------------------------------------------------------------- 1 | 3108 Wes McKinney 2 | 680 jreback 3 | 639 y-p 4 | 627 Chang She 5 | 327 Adam Klein 6 | 120 Phillip Cloud 7 | 109 Vytautas Jancauskas 8 | 75 Wouter Overmeire 9 | 65 Skipper Seabold 10 | 56 Andy Hayden 11 | 46 Thomas Kluyver 12 | 40 Dieter Vandenbussche 13 | 30 Jeffrey Tratner 14 | 27 Jeff Reback 15 | 25 Stephen Lin 16 | 19 Abraham Flaxman 17 | 16 Yaroslav Halchenko 18 | 15 Kieran O'Mahony 19 | 14 Gábor Lipták 20 | 14 locojaydev 21 | 13 Spencer Lyon 22 | 12 Luca Beltrame 23 | 11 Keith Hughitt 24 | 10 Martin Blais 25 | 9 Tobias Brandt 26 | 7 PKEuS 27 | 7 nipunreddevil 28 | 7 Takafumi Arakaki 29 | 7 Christopher Whelan 30 | 6 Steve 31 | 6 timmie 32 | 6 Nicholaus E. Halecky 33 | 6 K.-Michael Aye 34 | 6 Damien Garaud 35 | 5 dieterv77 36 | 5 tshauck 37 | 5 Vincent Arel-Bundock 38 | 5 Garrett Drapala 39 | 5 Marc Abramowitz 40 | 5 Mark Wiebe 41 | 5 Thierry Moisan 42 | 5 Adam Obeng 43 | 4 TomAugspurger 44 | 4 Gregg Lind 45 | 4 Shane Conway 46 | 4 Jacques Kvam 47 | 4 Dan Allan 48 | 4 Jev Kuznetsov 49 | 4 gliptak 50 | 4 Dan Birken 51 | 4 lexual 52 | 4 Dan Miller 53 | 4 Alvaro Tejero-Cantero 54 | 4 waitingkuo 55 | 4 Brenda Moon 56 | 4 Lars Buitinck 57 | 4 Dražen Lučanin 58 | 4 Loïc Estève 59 | 4 Paul Ivanov 60 | 3 Patrick O'Brien 61 | 3 Chris Billington 62 | 3 Karmel Allison 63 | 3 joshuaar 64 | 3 Nick Pentreath 65 | 3 Josh 66 | 3 Josh Klein 67 | 3 Adam Greenhall 68 | 3 Joon Ro 69 | 3 Olivier Grisel 70 | 3 Richard Höchenberger 71 | 3 dengemann 72 | 3 Kevin Stone 73 | 2 Chapman Siu 74 | 2 Todd DeLuca 75 | 2 Jay Parlar 76 | 2 Mike Kelly 77 | 2 Nathan Pinger 78 | 2 RuiDC 79 | 2 stonebig 80 | 2 Roy Hyunjin Han 81 | 2 Brad Buran 82 | 2 Jonathan deWerd 83 | 2 tim smith 84 | 2 Jonathan Chambers 85 | 2 Kamil Kisiel 86 | 2 Paddy Mullen 87 | 2 John-Colvin 88 | 2 elpres 89 | 2 Jeff Mellen 90 | 2 Will Furnass 91 | 2 Vytautas Jančauskas 92 | 2 Robert Gieseke 93 | 2 Peter Prettenhofer 94 | 2 Travis N. Vaught 95 | 2 Eric Chlebek 96 | 1 Øystein S. Haaland 97 | 1 Aman Thakral 98 | 1 Andreas H. 99 | 1 Anton I. Sipos 100 | 1 Bayle Shanks 101 | 1 Benjamin Gross 102 | 1 Brian Granger 103 | 1 Chris Mulligan 104 | 1 Chris Withers 105 | 1 Christian Geier 106 | 1 Dan Davison 107 | 1 Daniel Shapiro 108 | 1 David Zaslavsky 109 | 1 Donald Curtis 110 | 1 Doug Coleman 111 | 1 Dražen Lučanin 112 | 1 Fabrizio Pollastri 113 | 1 Fernando Perez 114 | 1 Graham Taylor 115 | 1 Illia Polosukhin 116 | 1 James Casbon 117 | 1 Jay Bourque 118 | 1 Jeff Hammerbacher 119 | 1 Jeremy Wagner 120 | 1 Johnny 121 | 1 Joshua Leahy 122 | 1 Juraj Niznan 123 | 1 Justin Berka 124 | 1 Justin C Johnson 125 | 1 Kelsey Jordahl 126 | 1 Ken Van Haren 127 | 1 Kyle Meyer 128 | 1 Laurent Gautier 129 | 1 Lorenzo Bolla 130 | 1 Luke Lee 131 | 1 Mark O'Leary 132 | 1 MinRK 133 | 1 Peng Yu 134 | 1 Ralph Bean 135 | 1 Senthil Palanisami 136 | 1 Stefan van der Walt 137 | 1 Taavi Burns 138 | 1 Thomas Wiecki 139 | 1 Thouis (Ray) Jones 140 | 1 Tim Akinbo 141 | 1 Tim McNamara 142 | 1 alex arsenovic 143 | 1 anomrake 144 | 1 claudiobertoldi 145 | 1 conmai 146 | 1 davidjameshumphreys 147 | 1 ejnens 148 | 1 fabriziop 149 | 1 herrfz 150 | 1 jniznan 151 | 1 lenolib 152 | 1 lgautier 153 | 1 lodagro 154 | 1 stephenwlin 155 | 1 svaksha 156 | 1 thauck 157 | 1 theandygross 158 | 1 thuske 159 | 1 unknown 160 | 1 vytas 161 | 1 zach powers 162 | 1 A. Flaxman 163 | -------------------------------------------------------------------------------- /slides/pandas-year.txt: -------------------------------------------------------------------------------- 1 | 761 Wes McKinney 2 | 680 jreback 3 | 639 y-p 4 | 361 Chang She 5 | 120 Phillip Cloud 6 | 89 Vytautas Jancauskas 7 | 56 Andy Hayden 8 | 37 Wouter Overmeire 9 | 32 Skipper Seabold 10 | 30 Jeffrey Tratner 11 | 27 Jeff Reback 12 | 25 Stephen Lin 13 | 14 locojaydev 14 | 14 Gábor Lipták 15 | 13 Spencer Lyon 16 | 13 Abraham Flaxman 17 | 11 Keith Hughitt 18 | 9 Tobias Brandt 19 | 8 Dieter Vandenbussche 20 | 7 PKEuS 21 | 7 nipunreddevil 22 | 7 Christopher Whelan 23 | 6 Nicholaus E. Halecky 24 | 6 Damien Garaud 25 | 6 Martin Blais 26 | 5 Vincent Arel-Bundock 27 | 5 tshauck 28 | 5 Garrett Drapala 29 | 5 dieterv77 30 | 5 Adam Obeng 31 | 5 Thierry Moisan 32 | 4 TomAugspurger 33 | 4 Dražen Lučanin 34 | 4 gliptak 35 | 4 Alvaro Tejero-Cantero 36 | 4 lexual 37 | 4 Dan Allan 38 | 4 waitingkuo 39 | 4 Dan Miller 40 | 4 Lars Buitinck 41 | 4 Loïc Estève 42 | 4 Brenda Moon 43 | 4 Paul Ivanov 44 | 3 Dan Birken 45 | 3 dengemann 46 | 3 timmie 47 | 3 Karmel Allison 48 | 3 Kevin Stone 49 | 3 Adam Greenhall 50 | 3 Richard Höchenberger 51 | 3 Patrick O'Brien 52 | 2 K.-Michael Aye 53 | 2 Mike Kelly 54 | 2 Vytautas Jančauskas 55 | 2 Chapman Siu 56 | 2 tim smith 57 | 2 Jonathan deWerd 58 | 2 Todd DeLuca 59 | 2 Peter Prettenhofer 60 | 2 stonebig 61 | 2 Jay Parlar 62 | 2 Jonathan Chambers 63 | 2 John-Colvin 64 | 2 Kieran O'Mahony 65 | 2 Will Furnass 66 | 2 Robert Gieseke 67 | 2 Jeff Mellen 68 | 2 Brad Buran 69 | 1 Øystein S. Haaland 70 | 1 Anton I. Sipos 71 | 1 Chris Mulligan 72 | 1 Chris Withers 73 | 1 Christian Geier 74 | 1 Dan Davison 75 | 1 Daniel Shapiro 76 | 1 Donald Curtis 77 | 1 Doug Coleman 78 | 1 Dražen Lučanin 79 | 1 Illia Polosukhin 80 | 1 James Casbon 81 | 1 Jay Bourque 82 | 1 Jeremy Wagner 83 | 1 Johnny 84 | 1 Joshua Leahy 85 | 1 Juraj Niznan 86 | 1 Justin C Johnson 87 | 1 Ken Van Haren 88 | 1 Kyle Meyer 89 | 1 Laurent Gautier 90 | 1 Luke Lee 91 | 1 Mark O'Leary 92 | 1 MinRK 93 | 1 Taavi Burns 94 | 1 Thomas Kluyver 95 | 1 Thouis (Ray) Jones 96 | 1 Tim Akinbo 97 | 1 Yaroslav Halchenko 98 | 1 alex arsenovic 99 | 1 anomrake 100 | 1 conmai 101 | 1 davidjameshumphreys 102 | 1 ejnens 103 | 1 elpres 104 | 1 herrfz 105 | 1 jniznan 106 | 1 lenolib 107 | 1 stephenwlin 108 | 1 svaksha 109 | 1 thauck 110 | 1 vytas 111 | 1 zach powers 112 | 1 A. Flaxman 113 | -------------------------------------------------------------------------------- /slides/scipy-all.txt: -------------------------------------------------------------------------------- 1 | 1182 Pauli Virtanen 2 | 961 Travis Oliphant 3 | 816 David Cournapeau 4 | 514 Ralf Gommers 5 | 504 Pearu Peterson 6 | 375 wnbell 7 | 321 mattknox_ca 8 | 293 Stefan van der Walt 9 | 227 Jarrod Millman 10 | 227 Matthew Brett 11 | 194 rgommers 12 | 190 Denis Laxalde 13 | 189 warren.weckesser 14 | 180 Eric Jones 15 | 168 Warren Weckesser 16 | 160 Robert Kern 17 | 155 pierregm 18 | 152 edschofield 19 | 150 Tim Leslie 20 | 136 cookedm 21 | 130 josef 22 | 126 damian.eads 23 | 108 Jake Vanderplas 24 | 97 tom.waite 25 | 82 endolith 26 | 71 fullung 27 | 64 alex 28 | 54 Robert Cimrman 29 | 50 chris.burns 30 | 46 jonathan.taylor 31 | 45 Ilan Schnell 32 | 43 Charles Harris 33 | 41 aarchiba 34 | 41 Blake Griffith 35 | 37 prabhu 36 | 34 Tim Hochberg 37 | 31 Martin Teichmann 38 | 31 Fabian Pedregosa 39 | 30 Alan McIntyre 40 | 28 Daniel Smith 41 | 26 dmitrey.kroshko 42 | 26 Eric Moore 43 | 26 Jacob Stevenson 44 | 25 Patrick Varilly 45 | 20 Fernando Perez 46 | 19 fred.mailhot 47 | 18 david.warde-farley 48 | 17 jtravs 49 | 17 Lars Buitinck 50 | 17 Anthony Scopatz 51 | 17 Travis Vaught 52 | 16 Nicky van Foreest 53 | 16 Travis E. Oliphant 54 | 14 Skipper Seabold 55 | 14 chanley 56 | 14 Jacob Silterra 57 | 13 pbrod 58 | 13 hagberg 59 | 13 François Boulogne 60 | 12 Scott Sinclair 61 | 12 Julian Taylor 62 | 12 Zhenya 63 | 12 Thomas Robitaille 64 | 11 Chris Jordan-Squire 65 | 11 brian.hawthorne 66 | 10 jtaylor 67 | 10 Josef Perktold 68 | 9 tzito 69 | 9 Niklas K 70 | 9 David Warde-Farley 71 | 8 Daniel B. Smith 72 | 8 cgohlke 73 | 8 Robert Gantner 74 | 8 dhuard 75 | 8 Thouis (Ray) Jones 76 | 7 Matt Terry 77 | 7 Bjørn Forsman 78 | 6 ArmstrongJ 79 | 6 Jacob Vanderplas 80 | 6 Joonas Paalasmaa 81 | 6 Andreas H 82 | 6 Collin RM Stocks 83 | 6 Sturla Molden 84 | 5 Andrey Smirnov 85 | 5 ondrej 86 | 5 uwe.schmitt 87 | 5 Alex Reinhart 88 | 5 jmiller 89 | 5 dmorrill 90 | 5 Tim Cera 91 | 4 nmarais 92 | 4 Ciro Duran Santillli 93 | 4 Illia Polosukhin 94 | 4 Jonathan Helmus 95 | 4 Leo Singer 96 | 4 Max Bolingbroke 97 | 4 Yaroslav Halchenko 98 | 4 abaecker 99 | 4 joe 100 | 4 skip 101 | 3 Tony S Yu 102 | 3 Fazlul Shahriar 103 | 3 Andreas Hilboll 104 | 3 josef-pktd 105 | 3 sturlamolden 106 | 3 ckuster 107 | 3 jswhit 108 | 3 Christoph Weidemann 109 | 3 Nathan Crock 110 | 3 ariel.rokem 111 | 3 Christoph Gohlke 112 | 3 Gilles Rochefort 113 | 3 Robert David Grant 114 | 3 Joseph Jon Booker 115 | 3 SytseK 116 | 3 Jeff Armstrong 117 | 2 Gert-Ludwig Ingold 118 | 2 Sebastian Berg 119 | 2 hm 120 | 2 Gavin Price 121 | 2 argriffing 122 | 2 Jorge Cañardo Alastuey 123 | 2 John Travers 124 | 2 Takuya OSHIMA 125 | 2 Paul Ivanov 126 | 2 Matty G 127 | 2 Bradley M. Froehle 128 | 2 dellsystem 129 | 2 Anton Akhmerov 130 | 2 Mark Wiebe 131 | 2 Andrew Schein 132 | 2 Keith Clawson 133 | 2 fcady 134 | 2 trueprice 135 | 1 Chad Baker 136 | 1 Daniel Velkov 137 | 1 Christopher Lee 138 | 1 Alexis Tabary 139 | 1 rob.falck 140 | 1 roberto 141 | 1 Christian 142 | 1 swalton 143 | 1 thorstenkranz 144 | 1 tonysyu 145 | 1 unknown 146 | 1 Bob Helmbold 147 | 1 Sebastian Werk 148 | 1 Sebastian Gassner 149 | 1 Stephen McQuay 150 | 1 Steven Byrnes 151 | 1 MinRK 152 | 1 Matt Newville 153 | 1 Tom Aldcroft 154 | 1 Luis Pedro Coelho 155 | 1 Louis Thibault 156 | 1 Lorenzo Luengo 157 | 1 Lawrence Chan 158 | 1 Wes McKinney 159 | 1 Christian Brodbeck 160 | 1 Zach Ploskey 161 | 1 K.-Michael Aye 162 | 1 wa03 163 | 1 Jonathan Hunt 164 | 1 Johannes Schönberger 165 | 1 Johann Cohen-Tanugi 166 | 1 Jim Radford 167 | 1 Jerome Kieffer 168 | 1 Branden Rolston 169 | 1 Jan Schlueter 170 | 1 Hugo 171 | 1 Gustav Larsson 172 | 1 honnorat 173 | 1 Alexander Eberspächer 174 | 1 Gael varoquaux 175 | 1 Fabrice Silva 176 | 1 FI$H 2000 177 | 1 lmwang 178 | 1 martin 179 | 1 mszep 180 | 1 Brandon Beacher 181 | 1 Dražen Lučanin 182 | -------------------------------------------------------------------------------- /slides/scipy-year.txt: -------------------------------------------------------------------------------- 1 | 612 Pauli Virtanen 2 | 277 Ralf Gommers 3 | 89 Warren Weckesser 4 | 79 endolith 5 | 64 alex 6 | 56 Tim Leslie 7 | 52 Denis Laxalde 8 | 41 Blake Griffith 9 | 31 Jake Vanderplas 10 | 28 Daniel Smith 11 | 26 Jacob Stevenson 12 | 26 Eric Moore 13 | 24 Patrick Varilly 14 | 13 pbrod 15 | 13 François Boulogne 16 | 12 Zhenya 17 | 12 Julian Taylor 18 | 12 Anthony Scopatz 19 | 11 Matthew Brett 20 | 10 jtaylor 21 | 10 Nicky van Foreest 22 | 9 Niklas K 23 | 8 Daniel B. Smith 24 | 7 Fabian Pedregosa 25 | 7 Lars Buitinck 26 | 6 Travis E. Oliphant 27 | 6 Sturla Molden 28 | 6 cgohlke 29 | 5 Tim Cera 30 | 5 David Cournapeau 31 | 5 Alex Reinhart 32 | 5 Thouis (Ray) Jones 33 | 4 Leo Singer 34 | 4 Illia Polosukhin 35 | 4 Skipper Seabold 36 | 4 Ciro Duran Santillli 37 | 4 Josef Perktold 38 | 4 Max Bolingbroke 39 | 3 sturlamolden 40 | 3 SytseK 41 | 3 Nathan Crock 42 | 3 Joseph Jon Booker 43 | 3 Gilles Rochefort 44 | 3 Stefan van der Walt 45 | 3 Charles Harris 46 | 3 Robert David Grant 47 | 2 Fazlul Shahriar 48 | 2 Andreas Hilboll 49 | 2 Anton Akhmerov 50 | 2 Bradley M. Froehle 51 | 2 Gert-Ludwig Ingold 52 | 2 John Travers 53 | 2 Jorge Cañardo Alastuey 54 | 2 Keith Clawson 55 | 2 Scott Sinclair 56 | 2 Sebastian Berg 57 | 2 Takuya OSHIMA 58 | 2 argriffing 59 | 2 dellsystem 60 | 2 hm 61 | 2 trueprice 62 | 1 K.-Michael Aye 63 | 1 Robert Kern 64 | 1 Bob Helmbold 65 | 1 Alexander Eberspächer 66 | 1 Johannes Schönberger 67 | 1 Jerome Kieffer 68 | 1 Stephen McQuay 69 | 1 Steven Byrnes 70 | 1 Jan Schlueter 71 | 1 Jacob Vanderplas 72 | 1 thorstenkranz 73 | 1 Hugo 74 | 1 Gustav Larsson 75 | 1 Fabrice Silva 76 | 1 Tom Aldcroft 77 | 1 Dražen Lučanin 78 | 1 Daniel Velkov 79 | 1 Yaroslav Halchenko 80 | 1 Zach Ploskey 81 | 1 Christopher Lee 82 | 1 aarchiba 83 | 1 Christoph Gohlke 84 | 1 tonysyu 85 | 1 Christian Brodbeck 86 | 1 wa03 87 | 1 Christian 88 | 1 unknown 89 | 1 Branden Rolston 90 | 1 mszep 91 | 1 MinRK 92 | 1 Matty G 93 | 1 Matt Newville 94 | 1 Louis Thibault 95 | 1 Lorenzo Luengo 96 | 1 Lawrence Chan 97 | 1 Jonathan Helmus 98 | -------------------------------------------------------------------------------- /slides/sklearn-all.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/slides/sklearn-all.txt -------------------------------------------------------------------------------- /slides/sklearn-year.txt: -------------------------------------------------------------------------------- 1 | 668 Andreas Mueller 2 | 289 Lars Buitinck 3 | 260 Gilles Louppe 4 | 233 Gael Varoquaux 5 | 211 Peter Prettenhofer 6 | 159 Mathieu Blondel 7 | 155 Arnaud Joly 8 | 151 Olivier Grisel 9 | 132 Jaques Grobler 10 | 112 Vlad Niculae 11 | 109 Wei Li 12 | 108 Noel Dawe 13 | 99 Alexandre Gramfort 14 | 66 Joel Nothman 15 | 36 Nelle Varoquaux 16 | 35 Rob Zinkov 17 | 33 eustache 18 | 29 Fabian Pedregosa 19 | 25 Robert Layton 20 | 24 Virgile Fritsch 21 | 19 Aymeric Masurelle 22 | 18 Andrew Winterman 23 | 17 Tadej Janež 24 | 16 Christian Osendorfer 25 | 15 Brian Cheung 26 | 14 Daniel Nouri 27 | 14 Doug Coleman 28 | 14 Yannick Schwartz 29 | 13 Robert Marchman 30 | 13 syhw 31 | 12 Satrajit Ghosh 32 | 11 Jake VanderPlas 33 | 11 John Benediktsson 34 | 11 Mikhail Korobov 35 | 10 Corey Lynch 36 | 10 Immanuel Bayer 37 | 10 Jim Holmström 38 | 10 Kyle Beauchamp 39 | 9 Kernc 40 | 9 Steven De Gryze 41 | 9 mr.Shu 42 | 8 Conrad Lee 43 | 8 James Bergstra 44 | 8 andy 45 | 8 jnothman 46 | 7 Hrishikesh Huilgolkar 47 | 7 Marko Burjek 48 | 6 Brian Cajes 49 | 6 Martin Luessi 50 | 6 Michael Eickenberg 51 | 6 Tiago Nunes 52 | 5 Anze 53 | 5 Nicolas Pinto 54 | 5 Raul Garreta 55 | 5 Shiqiao Du 56 | 4 ApproximateIdentity 57 | 4 Christian Jauvin 58 | 4 Federico Vaggi 59 | 4 Jacques Kvam 60 | 4 Kemal Eren 61 | 4 Richard T. Guy 62 | 3 A. Flaxman 63 | 3 Alexandre Abraham 64 | 3 Brian Holt 65 | 3 Dougal Sutherland 66 | 3 Florian Hoenig 67 | 3 Nicolas Trésegnie 68 | 3 Robert McGibbon 69 | 3 Roman Sinayev 70 | 3 Scott Dickerson 71 | 3 Szabo Roland 72 | 3 Yaroslav Halchenko 73 | 2 Diego Molla 74 | 2 Francois Savard 75 | 2 Imran Haque 76 | 2 Mark Veronda 77 | 2 Matti Lyra 78 | 2 Peter Welinder 79 | 2 Sergey Karayev 80 | 2 Sergio Medina 81 | 2 Xinfan Meng 82 | 2 jamestwebber 83 | 1 Abhijeet Kolhe 84 | 1 Alejandro Weinstein 85 | 1 Alex Companioni 86 | 1 Alexander Fabisch 87 | 1 Alexandre Passos 88 | 1 Bastiaan van den Berg 89 | 1 Benjamin Peterson 90 | 1 Bussonnier Matthias 91 | 1 Charles-Pierre Astolfi 92 | 1 Christoph Deil 93 | 1 Daniel Velkov 94 | 1 David Cournapeau 95 | 1 Denton Cockburn 96 | 1 Eugene Nizhibitsky 97 | 1 Felix Brockherde 98 | 1 JakeMick 99 | 1 James McDermott 100 | 1 Jochen Wersdörfer 101 | 1 Johannes Schönberger 102 | 1 Justin Pati 103 | 1 Ken Geis 104 | 1 Kenneth C. Arnold 105 | 1 Kevin Hughes 106 | 1 Ludwig Schwardt 107 | 1 Luis Pedro Coelho 108 | 1 Matthias Ekman 109 | 1 Miroslav Batchkarov 110 | 1 Miroslav Shubernetskiy 111 | 1 Naoki Orii 112 | 1 Norbert Crombach 113 | 1 Pavel 114 | 1 Rafael Cunha de Almeida 115 | 1 Rolando Espinoza La fuente 116 | 1 Seamus Abshere 117 | 1 Sebastian Berg 118 | 1 Shaun Jackman 119 | 1 Stefano Lattarini 120 | 1 Steve Koch 121 | 1 Subhodeep Moitra 122 | 1 Thomas Jarosch 123 | 1 Tim Sheerman-Chase 124 | 1 X006 125 | 1 bob 126 | 1 buguen 127 | 1 dengemann 128 | 1 draix 129 | 1 emanuele 130 | 1 hrishikeshio 131 | 1 nzer0 132 | 1 unknown 133 | -------------------------------------------------------------------------------- /slides/sympy-250px.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/slides/sympy-250px.pdf -------------------------------------------------------------------------------- /slides/sympy-all.txt: -------------------------------------------------------------------------------- 1 | 2715 Chris Smith 2 | 1465 Aaron Meurer 3 | 1304 Mateusz Paprocki 4 | 1208 Ondřej Čertík 5 | 908 Matthew Rocklin 6 | 460 Julien Rioux 7 | 455 Ronan Lamy 8 | 380 Raoul Bourquin 9 | 374 Kirill Smelkov 10 | 351 Øyvind Jensen 11 | 312 Tom Bachmann 12 | 260 Sergiu Ivanov 13 | 207 Mario Pernici 14 | 190 Saptarshi Mandal 15 | 169 Stefan Krastanov 16 | 156 Brian E. Granger 17 | 138 Vinzent Steinberg 18 | 133 Vladimir Perić 19 | 127 Raymond Wong 20 | 121 Sergey B Kirpichev 21 | 119 David Li 22 | 119 Fredrik Johansson 23 | 115 Sean Vig 24 | 114 Fabian Pedregosa 25 | 111 Bharath M R 26 | 109 Gilbert Gede 27 | 103 Addison Cugini 28 | 97 Thomas Hisch 29 | 95 Guru Devanla 30 | 81 Priit Laes 31 | 80 Prasoon Shukla 32 | 79 Alexey U. Gudchenko 33 | 77 Matt Habel 34 | 69 Tomo Lazovich 35 | 67 Matt Curry 36 | 59 Timothy Reluga 37 | 55 Jason Gedge 38 | 53 Aleksandar Makelov 39 | 51 Sachin Joglekar 40 | 50 Brian Jorgensen 41 | 49 Kendhia 42 | 46 Andy R. Terrel 43 | 45 Ramana Venkata 44 | 44 Grzegorz Świrski 45 | 43 Sebastian Krämer 46 | 43 Pearu Peterson 47 | 42 Manoj Kumar 48 | 40 Toon Verstraelen 49 | 40 Siddhanathan Shanmugam 50 | 40 Joan Creus 51 | 37 Jorn Baayen 52 | 37 Christian Muise 53 | 36 Jeremias Yehdegho 54 | 35 Joachim Durchholz 55 | 35 Kevin Hunter 56 | 35 Riccardo Gori 57 | 35 Matthew Hoff 58 | 33 Steve Anton 59 | 33 hm 60 | 32 Sanket Agarwal 61 | 29 Robert Schwarz 62 | 28 David Ju 63 | 27 Luke Peterson 64 | 27 Angadh Nanjangud 65 | 24 Bilal Akhtar 66 | 24 Stepan Roucka 67 | 23 Miha Marolt 68 | 22 Renato Coutinho 69 | 19 Saurabh Jha 70 | 19 Niklas Thörne 71 | 19 Alexander Hirzel 72 | 19 Nathan Alison 73 | 18 jerryma1121 74 | 17 Brian Stephanik 75 | 17 Sam Sleight 76 | 17 Sachin Irukula 77 | 17 Robert Kern 78 | 16 Patrick Lacasse 79 | 16 Angus Griffith 80 | 16 Swapnil Agarwal 81 | 15 Gary Kerr 82 | 14 Sherjil Ozair 83 | 14 Natalia Nawara 84 | 14 Nicolas Pourcelot 85 | 13 Huijun Mai 86 | 13 Jim Zhang 87 | 13 Ljubiša Moćić 88 | 13 Prafullkumar P. Tale 89 | 12 Marek Šuppa 90 | 11 Freddie Witherden 91 | 11 Roberto Nobrega 92 | 10 Jason Moore 93 | 10 Felix Kaiser 94 | 9 Sean Ge 95 | 9 Alan Bromborsky 96 | 9 Chetna Gupta 97 | 9 Friedrich Hagedorn 98 | 9 Saroj Adhikari 99 | 8 CJ Carey 100 | 8 Jaroslaw Tworek 101 | 8 Alexey Subach 102 | 8 Yuri Karadzhov 103 | 7 Rishabh Dixit 104 | 7 Christian Bühler 105 | 7 Ryan Krauss 106 | 6 Min Ragan-Kelley 107 | 6 Demian Wassermann 108 | 6 Christopher Dembia 109 | 6 Sam Magura 110 | 6 Ananya 111 | 6 Mark Dewing 112 | 6 Raphael Michel 113 | 6 Andreas Kloeckner 114 | 5 Tarun Gaba 115 | 5 Christophe Saint-Jean 116 | 5 Tobias Lenz 117 | 5 Tomasz Buchert 118 | 5 Davy Mao 119 | 5 Ankit Agrawal 120 | 5 Nichita Utiu 121 | 5 Piotr Korgul 122 | 5 Mary Clark 123 | 5 Harold Erbin 124 | 5 Matthew Brett 125 | 5 Chris Wu 126 | 5 Chancellor Arkantos 127 | 5 Katja Sophie Hotz 128 | 4 Alexandr Popov 129 | 4 Abderrahim Kitouni 130 | 4 Stefano Maggiolo 131 | 4 Varun Joshi 132 | 4 Thilina Rathnayake 133 | 4 Nimish Telang 134 | 4 Tiffany Zhu 135 | 4 Khagesh Patel 136 | 4 Rom le Clair 137 | 4 Imran Ahmed Manzoor 138 | 4 Jochen Voss 139 | 4 Stefen Yin 140 | 4 David Roberts 141 | 4 Sebastian Kreft 142 | 4 Óscar Nájera 143 | 4 Tristan Hume 144 | 4 Florian Mickler 145 | 3 Pan Peng 146 | 3 Akshay Srinivasan 147 | 3 Akshit Agarwal 148 | 3 Amit Jamadagni 149 | 3 Andrew Straw 150 | 3 Barry Wardell 151 | 3 Benjamin McDonald 152 | 3 Bill Flynn 153 | 3 Case Van Horsen 154 | 3 Cristóvão Sousa 155 | 3 Emma Hogan 156 | 3 Geoffry Song 157 | 3 George Waksman 158 | 3 Jens H. Nielsen 159 | 3 Julio Idichekop Filho 160 | 3 Luca Weihs 161 | 3 Luis Garcia 162 | 3 Manoj Babu K. 163 | 3 Martin Povišer 164 | 3 Nikolay Lazarov 165 | 3 Oliver Lee 166 | 3 Raffaele De Feo 167 | 3 Shravas K Rao 168 | 3 Ted Horst 169 | 2 Oscar Benjamin 170 | 2 Michael Mayorov 171 | 2 David Marek 172 | 2 Goutham Lakshminarayan 173 | 2 Ben Goodrich 174 | 2 Jezreel Ng 175 | 2 Tomáš Bambas 176 | 2 Ashwini Oruganti 177 | 2 Arpit Goyal 178 | 2 Stephen Loo 179 | 2 Jurjen N.E. Bos 180 | 2 Colleen Lee 181 | 2 James Aspnes 182 | 2 Sai Nikhil 183 | 2 Jack McCaffery 184 | 2 Fernando Perez 185 | 2 Oleksandr Gituliar 186 | 2 Thomas Dixon 187 | 2 Bradley Froehle 188 | 2 Nikhil Sarda 189 | 2 tsmars15 190 | 2 Thomas Wiecki 191 | 2 Pavel Fedotov 192 | 2 Boris Timokhin 193 | 2 Henrik Johansson 194 | 1 James Abbatiello 195 | 1 Sebastian Krause 196 | 1 Hubert Tsang 197 | 1 Gregory Ksionda 198 | 1 Seshagiri Prabhu 199 | 1 Shai 'Deshe' Wyborski 200 | 1 Gert-Ludwig Ingold 201 | 1 Acebulf 202 | 1 Shruti Mangipudi 203 | 1 Siddhant Jain 204 | 1 Srinivas Vasudevan 205 | 1 Elrond der Elbenfuerst 206 | 1 Eh Tan 207 | 1 David Lawrence 208 | 1 Stepan Simsa 209 | 1 Comer Duncan 210 | 1 Takafumi Arakaki 211 | 1 Tarang 212 | 1 Christian Schubert 213 | 1 Łukasz Pankowski 214 | 1 Carsten Knoll 215 | 1 Thomas Sidoti 216 | 1 Tim Lahey 217 | 1 Björn Dahlgren 218 | 1 Bernhard R. Link 219 | 1 Benjamin Fishbein 220 | 1 Bastian Weber 221 | 1 Tyler Pirtle 222 | 1 Andrew Docherty 223 | 1 Vasily Povalyaev 224 | 1 Vinay Kumar 225 | 1 Or Dvory 226 | 1 Vladimir Lagunov 227 | 1 Andre de Fortier Smit 228 | 1 Anatolii Koval 229 | 1 Ali Raza Syed 230 | 1 Alexandr Gudulin 231 | 1 marshall2389 232 | 1 vishal 233 | 1 Pauli Virtanen 234 | 1 Andrej Tokarčík 235 | 1 Prateek Papriwal 236 | 1 Puneeth Chaganti 237 | 1 Alexander Eberspächer 238 | 1 Randy Heydon 239 | 1 Nicholas J.S. Kinar 240 | 1 Max Hutchinson 241 | 1 Matthias Toews 242 | 1 Matthew Tadd 243 | 1 Matt Rajca 244 | 1 Rizgar Mella 245 | 1 Robert 246 | 1 Robert Cimrman 247 | 1 Marcin Kostrzewa 248 | 1 Madeleine Ball 249 | 1 Roberto Colistete, Jr. 250 | 1 Konrad Meyer 251 | 1 Kibeom Kim 252 | 1 Kevin Goodsell 253 | 1 Kazuo Thow 254 | 1 Kaifeng Zhu 255 | 1 Joseph Dougherty 256 | 1 Jorge E. Cardona 257 | 1 Johann Cohen-Tanugi 258 | 1 James Pearson 259 | -------------------------------------------------------------------------------- /slides/sympy-year.txt: -------------------------------------------------------------------------------- 1 | 1197 Chris Smith 2 | 624 Matthew Rocklin 3 | 410 Aaron Meurer 4 | 408 Julien Rioux 5 | 196 Raoul Bourquin 6 | 170 Sergiu Ivanov 7 | 121 Sergey B Kirpichev 8 | 116 Mario Pernici 9 | 114 Mateusz Paprocki 10 | 104 Bharath M R 11 | 97 Thomas Hisch 12 | 89 Ondřej Čertík 13 | 87 David Li 14 | 80 Prasoon Shukla 15 | 73 Stefan Krastanov 16 | 71 Ronan Lamy 17 | 68 Guru Devanla 18 | 61 Tom Bachmann 19 | 59 Timothy Reluga 20 | 51 Sachin Joglekar 21 | 45 Ramana Venkata 22 | 45 Aleksandar Makelov 23 | 42 Manoj Kumar 24 | 39 Saptarshi Mandal 25 | 35 Matthew Hoff 26 | 33 hm 27 | 28 Sean Vig 28 | 21 Angadh Nanjangud 29 | 19 Saurabh Jha 30 | 19 Niklas Thörne 31 | 19 Alexander Hirzel 32 | 17 Brian Stephanik 33 | 16 Angus Griffith 34 | 16 Patrick Lacasse 35 | 13 Huijun Mai 36 | 12 Marek Šuppa 37 | 12 Sachin Irukula 38 | 9 Sean Ge 39 | 9 Chetna Gupta 40 | 8 CJ Carey 41 | 8 Gilbert Gede 42 | 7 Prafullkumar P. Tale 43 | 7 Rishabh Dixit 44 | 6 Brian E. Granger 45 | 6 Demian Wassermann 46 | 6 Christopher Dembia 47 | 6 Ananya 48 | 5 Ankit Agrawal 49 | 5 Christophe Saint-Jean 50 | 5 Mary Clark 51 | 5 Tarun Gaba 52 | 5 Katja Sophie Hotz 53 | 4 Stefen Yin 54 | 4 Thilina Rathnayake 55 | 4 Khagesh Patel 56 | 4 Varun Joshi 57 | 3 Amit Jamadagni 58 | 3 Luke Peterson 59 | 3 Oliver Lee 60 | 3 Case Van Horsen 61 | 3 Shravas K Rao 62 | 3 Akshit Agarwal 63 | 2 Vladimir Perić 64 | 2 Jens H. Nielsen 65 | 2 Cristóvão Sousa 66 | 2 Stephen Loo 67 | 2 Colleen Lee 68 | 1 Sherjil Ozair 69 | 1 Matthew Tadd 70 | 1 Christian Bühler 71 | 1 Takafumi Arakaki 72 | 1 Tarang 73 | 1 Madeleine Ball 74 | 1 Alexander Eberspächer 75 | 1 Acebulf 76 | 1 Tyler Pirtle 77 | 1 Vasily Povalyaev 78 | 1 Benjamin Fishbein 79 | 1 Randy Heydon 80 | 1 Björn Dahlgren 81 | 1 Pavel Fedotov 82 | 1 Oscar Benjamin 83 | 1 Max Hutchinson 84 | 1 Seshagiri Prabhu 85 | -------------------------------------------------------------------------------- /tutorial_exercises/Advanced Expression Manipulation Solutions.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "name": "Advanced Expression Manipulation Solutions" 4 | }, 5 | "nbformat": 3, 6 | "nbformat_minor": 0, 7 | "worksheets": [ 8 | { 9 | "cells": [ 10 | { 11 | "cell_type": "heading", 12 | "level": 1, 13 | "metadata": {}, 14 | "source": [ 15 | "Advanced Expression Manipulation Solutions" 16 | ] 17 | }, 18 | { 19 | "cell_type": "code", 20 | "collapsed": false, 21 | "input": [ 22 | "import sys\n", 23 | "import os\n", 24 | "sys.path.insert(1, os.path.join(os.path.pardir, \"ipython_doctester\"))\n", 25 | "from sympy import *\n", 26 | "from ipython_doctester import test\n", 27 | "x, y, z = symbols('x y z')" 28 | ], 29 | "language": "python", 30 | "metadata": {}, 31 | "outputs": [] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "metadata": {}, 36 | "source": [ 37 | "For each exercise, fill in the function according to its docstring. Execute the cell to see if you did it right. " 38 | ] 39 | }, 40 | { 41 | "cell_type": "heading", 42 | "level": 2, 43 | "metadata": {}, 44 | "source": [ 45 | "Creating expressions from classes" 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "metadata": {}, 51 | "source": [ 52 | "Create the following objects without using any mathematical operators like `+`, `-`, `*`, `/`, or `**` by explicitly using the classes `Add`, `Mul`, and `Pow`. You may use `x` instead of `Symbol('x')` and `4` instead of `Integer(4)`.\n", 53 | "\n", 54 | "$$x^2 + 4xyz$$\n", 55 | "$$x^{(x^y)}$$\n", 56 | "$$x - \\frac{y}{z}$$\n" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "collapsed": false, 62 | "input": [ 63 | "@test\n", 64 | "def explicit_classes1():\n", 65 | " \"\"\"\n", 66 | " Returns the expression x**2 + 4*x*y*z, built using SymPy classes explicitly.\n", 67 | "\n", 68 | " >>> explicit_classes1()\n", 69 | " x**2 + 4*x*y*z\n", 70 | " \"\"\"\n", 71 | " return Add(Pow(x, 2), Mul(4, x, y, z))" 72 | ], 73 | "language": "python", 74 | "metadata": {}, 75 | "outputs": [] 76 | }, 77 | { 78 | "cell_type": "code", 79 | "collapsed": false, 80 | "input": [ 81 | "@test\n", 82 | "def explicit_classes2():\n", 83 | " \"\"\"\n", 84 | " Returns the expression x**(x**y), built using SymPy classes explicitly.\n", 85 | "\n", 86 | " >>> explicit_classes2()\n", 87 | " x**(x**y)\n", 88 | " \"\"\"\n", 89 | " return Pow(x, Pow(x, y))" 90 | ], 91 | "language": "python", 92 | "metadata": {}, 93 | "outputs": [] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "collapsed": false, 98 | "input": [ 99 | "@test\n", 100 | "def explicit_classes3():\n", 101 | " \"\"\"\n", 102 | " Returns the expression x - y/z, built using SymPy classes explicitly.\n", 103 | "\n", 104 | " >>> explicit_classes3()\n", 105 | " x - y/z\n", 106 | " \"\"\"\n", 107 | " return Add(x, Mul(-1, Mul(y, Pow(z, -1))))" 108 | ], 109 | "language": "python", 110 | "metadata": {}, 111 | "outputs": [] 112 | }, 113 | { 114 | "cell_type": "heading", 115 | "level": 2, 116 | "metadata": {}, 117 | "source": [ 118 | "Nested args" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "collapsed": false, 124 | "input": [ 125 | "expr = x**2 - y*(2**(x + 3) + z)" 126 | ], 127 | "language": "python", 128 | "metadata": {}, 129 | "outputs": [] 130 | }, 131 | { 132 | "cell_type": "markdown", 133 | "metadata": {}, 134 | "source": [ 135 | "Use nested `.args` calls to get the 3 in expr." 136 | ] 137 | }, 138 | { 139 | "cell_type": "code", 140 | "collapsed": false, 141 | "input": [ 142 | "@test\n", 143 | "def nested_args():\n", 144 | " \"\"\"\n", 145 | " Get the 3 in the above expression.\n", 146 | "\n", 147 | " >>> nested_args()\n", 148 | " 3\n", 149 | " \"\"\"\n", 150 | " expr = x**2 - y*(2**(x + 3) + z)\n", 151 | " return expr.args[0].args[2].args[0].args[1].args[0]" 152 | ], 153 | "language": "python", 154 | "metadata": {}, 155 | "outputs": [] 156 | }, 157 | { 158 | "cell_type": "heading", 159 | "level": 2, 160 | "metadata": {}, 161 | "source": [ 162 | "Traversal " 163 | ] 164 | }, 165 | { 166 | "cell_type": "markdown", 167 | "metadata": {}, 168 | "source": [ 169 | "Write a post-order traversal function that prints each node." 170 | ] 171 | }, 172 | { 173 | "cell_type": "code", 174 | "collapsed": false, 175 | "input": [ 176 | "@test\n", 177 | "def post(expr):\n", 178 | " \"\"\"\n", 179 | " Post-order traversal\n", 180 | "\n", 181 | " >>> expr = x**2 - y*(2**(x + 3) + z)\n", 182 | " >>> post(expr)\n", 183 | " -1\n", 184 | " y\n", 185 | " 2\n", 186 | " 3\n", 187 | " x\n", 188 | " x + 3\n", 189 | " 2**(x + 3)\n", 190 | " z\n", 191 | " 2**(x + 3) + z\n", 192 | " -y*(2**(x + 3) + z)\n", 193 | " x\n", 194 | " 2\n", 195 | " x**2\n", 196 | " x**2 - y*(2**(x + 3) + z)\n", 197 | " \"\"\"\n", 198 | " for arg in expr.args:\n", 199 | " post(arg)\n", 200 | " print expr" 201 | ], 202 | "language": "python", 203 | "metadata": {}, 204 | "outputs": [] 205 | }, 206 | { 207 | "cell_type": "code", 208 | "collapsed": false, 209 | "input": [ 210 | "for i in postorder_traversal(expr):\n", 211 | " print i" 212 | ], 213 | "language": "python", 214 | "metadata": {}, 215 | "outputs": [] 216 | } 217 | ], 218 | "metadata": {} 219 | } 220 | ] 221 | } -------------------------------------------------------------------------------- /tutorial_exercises/Advanced Expression Manipulation.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "name": "Advanced Expression Manipulation" 4 | }, 5 | "nbformat": 3, 6 | "nbformat_minor": 0, 7 | "worksheets": [ 8 | { 9 | "cells": [ 10 | { 11 | "cell_type": "heading", 12 | "level": 1, 13 | "metadata": {}, 14 | "source": [ 15 | "Advanced Expression Manipulation" 16 | ] 17 | }, 18 | { 19 | "cell_type": "code", 20 | "collapsed": false, 21 | "input": [ 22 | "import sys\n", 23 | "import os\n", 24 | "sys.path.insert(1, os.path.join(os.path.pardir, \"ipython_doctester\"))\n", 25 | "from sympy import *\n", 26 | "from ipython_doctester import test\n", 27 | "x, y, z = symbols('x y z')" 28 | ], 29 | "language": "python", 30 | "metadata": {}, 31 | "outputs": [] 32 | }, 33 | { 34 | "cell_type": "markdown", 35 | "metadata": {}, 36 | "source": [ 37 | "For each exercise, fill in the function according to its docstring. Execute the cell to see if you did it right. " 38 | ] 39 | }, 40 | { 41 | "cell_type": "heading", 42 | "level": 2, 43 | "metadata": {}, 44 | "source": [ 45 | "Creating expressions from classes" 46 | ] 47 | }, 48 | { 49 | "cell_type": "markdown", 50 | "metadata": {}, 51 | "source": [ 52 | "Create the following objects without using any mathematical operators like `+`, `-`, `*`, `/`, or `**` by explicitly using the classes `Add`, `Mul`, and `Pow`. You may use `x` instead of `Symbol('x')` and `4` instead of `Integer(4)`.\n", 53 | "\n", 54 | "$$x^2 + 4xyz$$\n", 55 | "$$x^{(x^y)}$$\n", 56 | "$$x - \\frac{y}{z}$$\n" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "collapsed": false, 62 | "input": [ 63 | "@test\n", 64 | "def explicit_classes1():\n", 65 | " \"\"\"\n", 66 | " Returns the expression x**2 + 4*x*y*z, built using SymPy classes explicitly.\n", 67 | "\n", 68 | " >>> explicit_classes1()\n", 69 | " x**2 + 4*x*y*z\n", 70 | " \"\"\"\n" 71 | ], 72 | "language": "python", 73 | "metadata": {}, 74 | "outputs": [] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "collapsed": false, 79 | "input": [ 80 | "@test\n", 81 | "def explicit_classes2():\n", 82 | " \"\"\"\n", 83 | " Returns the expression x**(x**y), built using SymPy classes explicitly.\n", 84 | "\n", 85 | " >>> explicit_classes2()\n", 86 | " x**(x**y)\n", 87 | " \"\"\"\n" 88 | ], 89 | "language": "python", 90 | "metadata": {}, 91 | "outputs": [] 92 | }, 93 | { 94 | "cell_type": "code", 95 | "collapsed": false, 96 | "input": [ 97 | "@test\n", 98 | "def explicit_classes3():\n", 99 | " \"\"\"\n", 100 | " Returns the expression x - y/z, built using SymPy classes explicitly.\n", 101 | "\n", 102 | " >>> explicit_classes3()\n", 103 | " x - y/z\n", 104 | " \"\"\"\n" 105 | ], 106 | "language": "python", 107 | "metadata": {}, 108 | "outputs": [] 109 | }, 110 | { 111 | "cell_type": "heading", 112 | "level": 2, 113 | "metadata": {}, 114 | "source": [ 115 | "Nested args" 116 | ] 117 | }, 118 | { 119 | "cell_type": "code", 120 | "collapsed": false, 121 | "input": [ 122 | "expr = x**2 - y*(2**(x + 3) + z)" 123 | ], 124 | "language": "python", 125 | "metadata": {}, 126 | "outputs": [] 127 | }, 128 | { 129 | "cell_type": "markdown", 130 | "metadata": {}, 131 | "source": [ 132 | "Use nested `.args` calls to get the 3 in expr." 133 | ] 134 | }, 135 | { 136 | "cell_type": "code", 137 | "collapsed": false, 138 | "input": [ 139 | "@test\n", 140 | "def nested_args():\n", 141 | " \"\"\"\n", 142 | " Get the 3 in the above expression.\n", 143 | "\n", 144 | " >>> nested_args()\n", 145 | " 3\n", 146 | " \"\"\"\n" 147 | ], 148 | "language": "python", 149 | "metadata": {}, 150 | "outputs": [] 151 | }, 152 | { 153 | "cell_type": "heading", 154 | "level": 2, 155 | "metadata": {}, 156 | "source": [ 157 | "Traversal " 158 | ] 159 | }, 160 | { 161 | "cell_type": "markdown", 162 | "metadata": {}, 163 | "source": [ 164 | "Write a post-order traversal function that prints each node." 165 | ] 166 | }, 167 | { 168 | "cell_type": "code", 169 | "collapsed": false, 170 | "input": [ 171 | "@test\n", 172 | "def post(expr):\n", 173 | " \"\"\"\n", 174 | " Post-order traversal\n", 175 | "\n", 176 | " >>> expr = x**2 - y*(2**(x + 3) + z)\n", 177 | " >>> post(expr)\n", 178 | " -1\n", 179 | " y\n", 180 | " 2\n", 181 | " 3\n", 182 | " x\n", 183 | " x + 3\n", 184 | " 2**(x + 3)\n", 185 | " z\n", 186 | " 2**(x + 3) + z\n", 187 | " -y*(2**(x + 3) + z)\n", 188 | " x\n", 189 | " 2\n", 190 | " x**2\n", 191 | " x**2 - y*(2**(x + 3) + z)\n", 192 | " \"\"\"\n" 193 | ], 194 | "language": "python", 195 | "metadata": {}, 196 | "outputs": [] 197 | }, 198 | { 199 | "cell_type": "code", 200 | "collapsed": false, 201 | "input": [ 202 | "for i in postorder_traversal(expr):\n", 203 | " print i" 204 | ], 205 | "language": "python", 206 | "metadata": {}, 207 | "outputs": [] 208 | } 209 | ], 210 | "metadata": {} 211 | } 212 | ] 213 | } -------------------------------------------------------------------------------- /tutorial_exercises/Gotchas Solutions.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "name": "Gotchas Solutions" 4 | }, 5 | "nbformat": 3, 6 | "nbformat_minor": 0, 7 | "worksheets": [ 8 | { 9 | "cells": [ 10 | { 11 | "cell_type": "heading", 12 | "level": 1, 13 | "metadata": {}, 14 | "source": [ 15 | "Gotchas Solutions" 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "Boilerplate to make the doctester work. Run this cell first." 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "collapsed": false, 28 | "input": [ 29 | "import sys\n", 30 | "import os\n", 31 | "sys.path.insert(1, os.path.join(os.path.pardir, \"ipython_doctester\"))\n", 32 | "from sympy import *\n", 33 | "from ipython_doctester import test\n", 34 | "# Work around a bug in IPython. This will disable the ability to paste things with >>>\n", 35 | "def notransform(line): return line\n", 36 | "from IPython.core import inputsplitter\n", 37 | "inputsplitter.transform_classic_prompt = notransform" 38 | ], 39 | "language": "python", 40 | "metadata": {}, 41 | "outputs": [], 42 | "prompt_number": 1 43 | }, 44 | { 45 | "cell_type": "markdown", 46 | "metadata": {}, 47 | "source": [ 48 | "For each exercise, fill in the function according to its docstring. Execute the cell to see if you did it right. " 49 | ] 50 | }, 51 | { 52 | "cell_type": "heading", 53 | "level": 2, 54 | "metadata": {}, 55 | "source": [ 56 | "Symbols" 57 | ] 58 | }, 59 | { 60 | "cell_type": "markdown", 61 | "metadata": {}, 62 | "source": [ 63 | "What will be the output of the following code?\n", 64 | "\n", 65 | " x = 3\n", 66 | " y = symbols('y')\n", 67 | " a = x + y\n", 68 | " y = 5\n", 69 | " print a\n", 70 | "\n", 71 | "Replace `???` in the below code with what you think the value of `a` will be. Remember to define any Symbols you need!" 72 | ] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "collapsed": false, 77 | "input": [ 78 | "@test\n", 79 | "def symbols_exercise():\n", 80 | " \"\"\"\n", 81 | " (This tests that your output is correct)\n", 82 | "\n", 83 | " >>> def testfunc():\n", 84 | " ... x = 3\n", 85 | " ... y = symbols('y')\n", 86 | " ... a = x + y\n", 87 | " ... y = 5\n", 88 | " ... return a\n", 89 | " >>> symbols_exercise() == testfunc()\n", 90 | " True\n", 91 | " \"\"\"\n", 92 | " y = symbols('y')\n", 93 | " return 3 + y" 94 | ], 95 | "language": "python", 96 | "metadata": {}, 97 | "outputs": [ 98 | { 99 | "html": [ 100 | "\n", 101 | "

Success!

\n", 102 | " " 103 | ], 104 | "output_type": "display_data" 105 | } 106 | ], 107 | "prompt_number": 2 108 | }, 109 | { 110 | "cell_type": "heading", 111 | "level": 2, 112 | "metadata": {}, 113 | "source": [ 114 | "Equality" 115 | ] 116 | }, 117 | { 118 | "cell_type": "markdown", 119 | "metadata": {}, 120 | "source": [ 121 | "Write a function that takes two expressions as input, and returns a tuple of two booleans. The first if they are equal symbolically, and the second if they are equal mathematically." 122 | ] 123 | }, 124 | { 125 | "cell_type": "code", 126 | "collapsed": false, 127 | "input": [ 128 | "@test\n", 129 | "def equality_exercise(a, b):\n", 130 | " \"\"\"\n", 131 | " Determine if a = b symbolically and mathematically.\n", 132 | "\n", 133 | " Returns a tuple of two booleans. The first is True if a = b symbolically,\n", 134 | " the second is True if a = b mathematically. Note the second may be False\n", 135 | " but the two still equal if SymPy is not powerful enough.\n", 136 | "\n", 137 | " Examples\n", 138 | " ========\n", 139 | "\n", 140 | " >>> x = symbols('x')\n", 141 | " >>> equality_exercise(x, 2)\n", 142 | " (False, False)\n", 143 | " >>> equality_exercise((x + 1)**2, x**2 + 2*x + 1)\n", 144 | " (False, True)\n", 145 | " >>> equality_exercise(2*x, 2*x)\n", 146 | " (True, True)\n", 147 | " \"\"\"\n", 148 | " return (a == b, simplify(a - b) == 0)" 149 | ], 150 | "language": "python", 151 | "metadata": {}, 152 | "outputs": [ 153 | { 154 | "html": [ 155 | "\n", 156 | "

Success!

\n", 157 | " " 158 | ], 159 | "output_type": "display_data" 160 | } 161 | ], 162 | "prompt_number": 3 163 | }, 164 | { 165 | "cell_type": "heading", 166 | "level": 2, 167 | "metadata": {}, 168 | "source": [ 169 | "`^` and `/`" 170 | ] 171 | }, 172 | { 173 | "cell_type": "markdown", 174 | "metadata": {}, 175 | "source": [ 176 | "Correct the following functions" 177 | ] 178 | }, 179 | { 180 | "cell_type": "code", 181 | "collapsed": false, 182 | "input": [ 183 | "@test\n", 184 | "def operator_exercise1():\n", 185 | " \"\"\"\n", 186 | " >>> operator_exercise1()\n", 187 | " x**2 + 2*x + 1/2\n", 188 | " \"\"\"\n", 189 | " x = symbols('x')\n", 190 | " return x**2 + 2*x + Rational(1, 2)" 191 | ], 192 | "language": "python", 193 | "metadata": {}, 194 | "outputs": [ 195 | { 196 | "html": [ 197 | "\n", 198 | "

Success!

\n", 199 | " " 200 | ], 201 | "output_type": "display_data" 202 | } 203 | ], 204 | "prompt_number": 4 205 | }, 206 | { 207 | "cell_type": "code", 208 | "collapsed": false, 209 | "input": [ 210 | "@test\n", 211 | "def operator_exercise2():\n", 212 | " \"\"\"\n", 213 | " >>> operator_exercise2()\n", 214 | " (x**2/2 + 2*x + 3/4)**(3/2)\n", 215 | " \"\"\"\n", 216 | " x = symbols('x')\n", 217 | " return (x**2/2 + 2*x + Rational(3, 4))**Rational(3, 2)" 218 | ], 219 | "language": "python", 220 | "metadata": {}, 221 | "outputs": [ 222 | { 223 | "html": [ 224 | "\n", 225 | "

Success!

\n", 226 | " " 227 | ], 228 | "output_type": "display_data" 229 | } 230 | ], 231 | "prompt_number": 5 232 | }, 233 | { 234 | "cell_type": "code", 235 | "collapsed": false, 236 | "input": [], 237 | "language": "python", 238 | "metadata": {}, 239 | "outputs": [], 240 | "prompt_number": 5 241 | } 242 | ], 243 | "metadata": {} 244 | } 245 | ] 246 | } -------------------------------------------------------------------------------- /tutorial_exercises/Gotchas.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "name": "Gotchas" 4 | }, 5 | "nbformat": 3, 6 | "nbformat_minor": 0, 7 | "worksheets": [ 8 | { 9 | "cells": [ 10 | { 11 | "cell_type": "heading", 12 | "level": 1, 13 | "metadata": {}, 14 | "source": [ 15 | "Gotchas" 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "Boilerplate to make the doctester work. Run this cell first." 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "collapsed": false, 28 | "input": [ 29 | "import sys\n", 30 | "import os\n", 31 | "sys.path.insert(1, os.path.join(os.path.pardir, \"ipython_doctester\"))\n", 32 | "from sympy import *\n", 33 | "from ipython_doctester import test\n", 34 | "# Work around a bug in IPython. This will disable the ability to paste things with >>>\n", 35 | "def notransform(line): return line\n", 36 | "from IPython.core import inputsplitter\n", 37 | "inputsplitter.transform_classic_prompt = notransform" 38 | ], 39 | "language": "python", 40 | "metadata": {}, 41 | "outputs": [] 42 | }, 43 | { 44 | "cell_type": "markdown", 45 | "metadata": {}, 46 | "source": [ 47 | "For each exercise, fill in the function according to its docstring. Execute the cell to see if you did it right. " 48 | ] 49 | }, 50 | { 51 | "cell_type": "heading", 52 | "level": 2, 53 | "metadata": {}, 54 | "source": [ 55 | "Symbols" 56 | ] 57 | }, 58 | { 59 | "cell_type": "markdown", 60 | "metadata": {}, 61 | "source": [ 62 | "What will be the output of the following code?\n", 63 | "\n", 64 | " x = 3\n", 65 | " y = symbols('y')\n", 66 | " a = x + y\n", 67 | " y = 5\n", 68 | " print a\n", 69 | "\n", 70 | "Replace `???` in the below code with what you think the value of `a` will be. Remember to define any Symbols you need!" 71 | ] 72 | }, 73 | { 74 | "cell_type": "code", 75 | "collapsed": false, 76 | "input": [ 77 | "@test\n", 78 | "def symbols_exercise():\n", 79 | " \"\"\"\n", 80 | " (This tests that your output is correct)\n", 81 | "\n", 82 | " >>> def testfunc():\n", 83 | " ... x = 3\n", 84 | " ... y = symbols('y')\n", 85 | " ... a = x + y\n", 86 | " ... y = 5\n", 87 | " ... return a\n", 88 | " >>> symbols_exercise() == testfunc()\n", 89 | " True\n", 90 | " \"\"\"\n", 91 | " return ??? # Replace ??? with what you think the value of a is" 92 | ], 93 | "language": "python", 94 | "metadata": {}, 95 | "outputs": [] 96 | }, 97 | { 98 | "cell_type": "heading", 99 | "level": 2, 100 | "metadata": {}, 101 | "source": [ 102 | "Equality" 103 | ] 104 | }, 105 | { 106 | "cell_type": "markdown", 107 | "metadata": {}, 108 | "source": [ 109 | "Write a function that takes two expressions as input, and returns a tuple of two booleans. The first if they are equal symbolically, and the second if they are equal mathematically." 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "collapsed": false, 115 | "input": [ 116 | "@test\n", 117 | "def equality_exercise(a, b):\n", 118 | " \"\"\"\n", 119 | " Determine if a = b symbolically and mathematically.\n", 120 | "\n", 121 | " Returns a tuple of two booleans. The first is True if a = b symbolically,\n", 122 | " the second is True if a = b mathematically. Note the second may be False\n", 123 | " but the two still equal if SymPy is not powerful enough.\n", 124 | "\n", 125 | " Examples\n", 126 | " ========\n", 127 | "\n", 128 | " >>> x = symbols('x')\n", 129 | " >>> equality_exercise(x, 2)\n", 130 | " (False, False)\n", 131 | " >>> equality_exercise((x + 1)**2, x**2 + 2*x + 1)\n", 132 | " (False, True)\n", 133 | " >>> equality_exercise(2*x, 2*x)\n", 134 | " (True, True)\n", 135 | " \"\"\"\n" 136 | ], 137 | "language": "python", 138 | "metadata": {}, 139 | "outputs": [] 140 | }, 141 | { 142 | "cell_type": "heading", 143 | "level": 2, 144 | "metadata": {}, 145 | "source": [ 146 | "`^` and `/`" 147 | ] 148 | }, 149 | { 150 | "cell_type": "markdown", 151 | "metadata": {}, 152 | "source": [ 153 | "Correct the following functions" 154 | ] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "collapsed": false, 159 | "input": [ 160 | "@test\n", 161 | "def operator_exercise1():\n", 162 | " \"\"\"\n", 163 | " >>> operator_exercise1()\n", 164 | " x**2 + 2*x + 1/2\n", 165 | " \"\"\"\n", 166 | " x = symbols('x')\n", 167 | " return x^2 + 2*x + 1/2" 168 | ], 169 | "language": "python", 170 | "metadata": {}, 171 | "outputs": [] 172 | }, 173 | { 174 | "cell_type": "code", 175 | "collapsed": false, 176 | "input": [ 177 | "@test\n", 178 | "def operator_exercise2():\n", 179 | " \"\"\"\n", 180 | " >>> operator_exercise2()\n", 181 | " (x**2/2 + 2*x + 3/4)**(3/2)\n", 182 | " \"\"\"\n", 183 | " x = symbols('x')\n", 184 | " return (1/2*x^2 + 2*x + 3/4)^(3/2)" 185 | ], 186 | "language": "python", 187 | "metadata": {}, 188 | "outputs": [] 189 | } 190 | ], 191 | "metadata": {} 192 | } 193 | ] 194 | } -------------------------------------------------------------------------------- /tutorial_exercises/Simplification.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "name": "Simplification" 4 | }, 5 | "nbformat": 3, 6 | "nbformat_minor": 0, 7 | "worksheets": [ 8 | { 9 | "cells": [ 10 | { 11 | "cell_type": "heading", 12 | "level": 1, 13 | "metadata": {}, 14 | "source": [ 15 | "Simplification" 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "Boilerplate to make the doctester work." 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "collapsed": false, 28 | "input": [ 29 | "import sys\n", 30 | "import os\n", 31 | "sys.path.insert(1, os.path.join(os.path.pardir, \"ipython_doctester\"))\n", 32 | "from sympy import *\n", 33 | "from ipython_doctester import test\n", 34 | "x, y, z = symbols('x y z')" 35 | ], 36 | "language": "python", 37 | "metadata": {}, 38 | "outputs": [] 39 | }, 40 | { 41 | "cell_type": "markdown", 42 | "metadata": {}, 43 | "source": [ 44 | "For each exercise, fill in the function according to its docstring. Execute the cell to see if you did it right. " 45 | ] 46 | }, 47 | { 48 | "cell_type": "heading", 49 | "level": 2, 50 | "metadata": {}, 51 | "source": [ 52 | "Polynomial/Rational Function Simplification" 53 | ] 54 | }, 55 | { 56 | "cell_type": "markdown", 57 | "metadata": {}, 58 | "source": [ 59 | "In each exercise, apply specific simplification functions to get the desired result." 60 | ] 61 | }, 62 | { 63 | "cell_type": "code", 64 | "collapsed": false, 65 | "input": [ 66 | "@test\n", 67 | "def polysimp1(expr):\n", 68 | " \"\"\"\n", 69 | " >>> polysimp1(cos(x)*sin(x) + cos(x))\n", 70 | " (sin(x) + 1)*cos(x)\n", 71 | " >>> polysimp1(cos(x)*sin(x) + cos(x) + 1)\n", 72 | " (sin(x) + 1)*cos(x) + 1\n", 73 | " \"\"\"\n" 74 | ], 75 | "language": "python", 76 | "metadata": {}, 77 | "outputs": [] 78 | }, 79 | { 80 | "cell_type": "code", 81 | "collapsed": false, 82 | "input": [ 83 | "@test\n", 84 | "def polysimp2(expr):\n", 85 | " \"\"\"\n", 86 | " >>> polysimp2((2*x + 1)/(x**2 + x))\n", 87 | " 1/(x + 1) + 1/x\n", 88 | " >>> polysimp2((x**2 + 3*x + 1)/(x**3 + 2*x**2 + x))\n", 89 | " 1/(x**2 + 2*x + 1) + 1/x\n", 90 | " \"\"\"\n" 91 | ], 92 | "language": "python", 93 | "metadata": {}, 94 | "outputs": [] 95 | }, 96 | { 97 | "cell_type": "heading", 98 | "level": 2, 99 | "metadata": {}, 100 | "source": [ 101 | "Powers" 102 | ] 103 | }, 104 | { 105 | "cell_type": "markdown", 106 | "metadata": {}, 107 | "source": [ 108 | "In each exercise, apply specific simplification functions to get the desired result. " 109 | ] 110 | }, 111 | { 112 | "cell_type": "code", 113 | "collapsed": false, 114 | "input": [ 115 | "@test\n", 116 | "def powersimp1(expr):\n", 117 | " \"\"\"\n", 118 | " >>> powersimp1(exp(x)*(exp(y) + 1))\n", 119 | " exp(x) + exp(x + y)\n", 120 | " \"\"\"\n" 121 | ], 122 | "language": "python", 123 | "metadata": {}, 124 | "outputs": [] 125 | }, 126 | { 127 | "cell_type": "code", 128 | "collapsed": false, 129 | "input": [ 130 | "@test\n", 131 | "def powersimp2(expr):\n", 132 | " \"\"\"\n", 133 | " >>> powersimp2(2**x*x**x)\n", 134 | " (2*x)**x\n", 135 | " >>> powersimp2(x**x*x**x)\n", 136 | " (x**2)**x\n", 137 | " \"\"\"\n" 138 | ], 139 | "language": "python", 140 | "metadata": {}, 141 | "outputs": [] 142 | }, 143 | { 144 | "cell_type": "code", 145 | "collapsed": false, 146 | "input": [ 147 | "@test\n", 148 | "def powersimp3(expr):\n", 149 | " \"\"\"\n", 150 | " >>> a, b, c = symbols('a b c')\n", 151 | " >>> powersimp3((a**b)**c)\n", 152 | " a**(b*c)\n", 153 | " >>> powersimp3((a**b)**(c + 1))\n", 154 | " a**(b*c + b)\n", 155 | " \"\"\"\n" 156 | ], 157 | "language": "python", 158 | "metadata": {}, 159 | "outputs": [] 160 | }, 161 | { 162 | "cell_type": "heading", 163 | "level": 2, 164 | "metadata": {}, 165 | "source": [ 166 | "Logs" 167 | ] 168 | }, 169 | { 170 | "cell_type": "code", 171 | "collapsed": false, 172 | "input": [ 173 | "@test\n", 174 | "def logsimp1(expr):\n", 175 | " \"\"\"\n", 176 | " >>> a, b = symbols('a b', positive=True)\n", 177 | " >>> logsimp1(log(x**y*a**b))\n", 178 | " y*log(x) + log(a**b)\n", 179 | " >>> logsimp1(log(x*y*a*b))\n", 180 | " log(x) + log(y) + log(a*b)\n", 181 | " \"\"\"\n" 182 | ], 183 | "language": "python", 184 | "metadata": {}, 185 | "outputs": [] 186 | }, 187 | { 188 | "cell_type": "heading", 189 | "level": 2, 190 | "metadata": {}, 191 | "source": [ 192 | "Miscellaneous " 193 | ] 194 | }, 195 | { 196 | "cell_type": "code", 197 | "collapsed": false, 198 | "input": [ 199 | "@test\n", 200 | "def miscsimp1(expr):\n", 201 | " \"\"\"\n", 202 | " >>> miscsimp1(sin(x + y))\n", 203 | " 2*(-tan(x/2)**2 + 1)*tan(y/2)/((tan(x/2)**2 + 1)*(tan(y/2)**2 + 1)) + 2*(-tan(y/2)**2 + 1)*tan(x/2)/((tan(x/2)**2 + 1)*(tan(y/2)**2 + 1))\n", 204 | " \"\"\"\n" 205 | ], 206 | "language": "python", 207 | "metadata": {}, 208 | "outputs": [] 209 | }, 210 | { 211 | "cell_type": "code", 212 | "collapsed": false, 213 | "input": [ 214 | "@test\n", 215 | "def miscsimp2(expr):\n", 216 | " \"\"\"\n", 217 | " >>> miscsimp2(gamma(x + 4))\n", 218 | " x**4*gamma(x) + 6*x**3*gamma(x) + 11*x**2*gamma(x) + 6*x*gamma(x)\n", 219 | " \"\"\"\n" 220 | ], 221 | "language": "python", 222 | "metadata": {}, 223 | "outputs": [] 224 | }, 225 | { 226 | "cell_type": "heading", 227 | "level": 2, 228 | "metadata": {}, 229 | "source": [ 230 | "Continued Fractions" 231 | ] 232 | }, 233 | { 234 | "cell_type": "code", 235 | "collapsed": false, 236 | "input": [ 237 | "def list_to_frac(l):\n", 238 | " expr = Integer(0)\n", 239 | " for i in reversed(l[1:]):\n", 240 | " expr += i\n", 241 | " expr = 1/expr\n", 242 | " return l[0] + expr" 243 | ], 244 | "language": "python", 245 | "metadata": {}, 246 | "outputs": [] 247 | }, 248 | { 249 | "cell_type": "code", 250 | "collapsed": false, 251 | "input": [ 252 | "a0, a1, a2, a3, a4 = symbols('a0:5')" 253 | ], 254 | "language": "python", 255 | "metadata": {}, 256 | "outputs": [] 257 | }, 258 | { 259 | "cell_type": "markdown", 260 | "metadata": {}, 261 | "source": [ 262 | "Determine the list used to create the continued fraction $$\\frac{a_{0} a_{1} a_{2} a_{3} a_{4} + a_{0} a_{1} a_{2} + a_{0} a_{3} a_{4} + a_{0} + a_{1} a_{2} a_{3} + a_{1} a_{3} a_{4} + a_{1} + a_{3}}{a_{0} a_{1} a_{2} a_{4} + a_{0} a_{4} + a_{1} a_{2} + a_{1} a_{4} + 1}.$$" 263 | ] 264 | }, 265 | { 266 | "cell_type": "code", 267 | "collapsed": false, 268 | "input": [ 269 | "@test\n", 270 | "def continued_frac():\n", 271 | " \"\"\"\n", 272 | " Determine the original list used to create the fraction. \n", 273 | "\n", 274 | " Return the original list from this function.\n", 275 | "\n", 276 | " >>> orig_frac = (a0*a1*a2*a3*a4 + a0*a1*a2 + a0*a3*a4 + a0 + a1*a2*a3 + a1*a3*a4 + a1 + a3)/(a0*a1*a2*a4 + a0*a4 + a1*a2 + a1*a4 + 1)\n", 277 | " >>> pprint(orig_frac, use_unicode=False, wrap_line=False)\n", 278 | " a0*a1*a2*a3*a4 + a0*a1*a2 + a0*a3*a4 + a0 + a1*a2*a3 + a1*a3*a4 + a1 + a3\n", 279 | " -------------------------------------------------------------------------\n", 280 | " a0*a1*a2*a4 + a0*a4 + a1*a2 + a1*a4 + 1 \n", 281 | " >>> cancel(list_to_frac(continued_frac())) == orig_frac\n", 282 | " True\n", 283 | " \"\"\"\n" 284 | ], 285 | "language": "python", 286 | "metadata": {}, 287 | "outputs": [] 288 | }, 289 | { 290 | "cell_type": "code", 291 | "collapsed": false, 292 | "input": [], 293 | "language": "python", 294 | "metadata": {}, 295 | "outputs": [] 296 | } 297 | ], 298 | "metadata": {} 299 | } 300 | ] 301 | } -------------------------------------------------------------------------------- /tutorial_exercises/Solvers.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "name": "Solvers" 4 | }, 5 | "nbformat": 3, 6 | "nbformat_minor": 0, 7 | "worksheets": [ 8 | { 9 | "cells": [ 10 | { 11 | "cell_type": "heading", 12 | "level": 1, 13 | "metadata": {}, 14 | "source": [ 15 | "Solvers" 16 | ] 17 | }, 18 | { 19 | "cell_type": "markdown", 20 | "metadata": {}, 21 | "source": [ 22 | "Boilerplate to make the doctester work. " 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "collapsed": false, 28 | "input": [ 29 | "import sys\n", 30 | "import os\n", 31 | "sys.path.insert(1, os.path.join(os.path.pardir, \"ipython_doctester\"))\n", 32 | "from sympy import *\n", 33 | "from ipython_doctester import test\n", 34 | "# Work around a bug in IPython. This will disable the ability to paste things with >>>\n", 35 | "def notransform(line): return line\n", 36 | "from IPython.core import inputsplitter\n", 37 | "inputsplitter.transform_classic_prompt = notransform\n", 38 | "init_printing()" 39 | ], 40 | "language": "python", 41 | "metadata": {}, 42 | "outputs": [], 43 | "prompt_number": 8 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "metadata": {}, 48 | "source": [ 49 | "For each exercise, fill in the function according to its docstring. Execute the cell to see if you did it right. " 50 | ] 51 | }, 52 | { 53 | "cell_type": "code", 54 | "collapsed": false, 55 | "input": [ 56 | "a, b, c, d, x, y, z, t = symbols('a b c d x y z t')\n", 57 | "f, g, h = symbols('f g h', cls=Function)" 58 | ], 59 | "language": "python", 60 | "metadata": {}, 61 | "outputs": [], 62 | "prompt_number": 9 63 | }, 64 | { 65 | "cell_type": "heading", 66 | "level": 2, 67 | "metadata": {}, 68 | "source": [ 69 | "Algebraic Equations" 70 | ] 71 | }, 72 | { 73 | "cell_type": "markdown", 74 | "metadata": {}, 75 | "source": [ 76 | "Write a function that computes the [quadratic equation](http://en.wikipedia.org/wiki/Quadratic_equation)." 77 | ] 78 | }, 79 | { 80 | "cell_type": "code", 81 | "collapsed": false, 82 | "input": [ 83 | "def quadratic():\n", 84 | " return ???\n", 85 | "quadratic()" 86 | ], 87 | "language": "python", 88 | "metadata": {}, 89 | "outputs": [ 90 | { 91 | "ename": "SyntaxError", 92 | "evalue": "invalid syntax (, line 2)", 93 | "output_type": "pyerr", 94 | "traceback": [ 95 | "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m2\u001b[0m\n\u001b[0;31m return ???\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" 96 | ] 97 | } 98 | ], 99 | "prompt_number": 7 100 | }, 101 | { 102 | "cell_type": "markdown", 103 | "metadata": {}, 104 | "source": [ 105 | "Write a function that computes the general solution to the cubic $x^3 + ax^2 + bx + c$." 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "collapsed": false, 111 | "input": [ 112 | "def cubic():\n", 113 | " return ???\n", 114 | "cubic()" 115 | ], 116 | "language": "python", 117 | "metadata": {}, 118 | "outputs": [ 119 | { 120 | "ename": "SyntaxError", 121 | "evalue": "invalid syntax (, line 2)", 122 | "output_type": "pyerr", 123 | "traceback": [ 124 | "\u001b[0;36m File \u001b[0;32m\"\"\u001b[0;36m, line \u001b[0;32m2\u001b[0m\n\u001b[0;31m return ???\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" 125 | ] 126 | } 127 | ], 128 | "prompt_number": 10 129 | }, 130 | { 131 | "cell_type": "heading", 132 | "level": 2, 133 | "metadata": {}, 134 | "source": [ 135 | "Differential Equations" 136 | ] 137 | }, 138 | { 139 | "cell_type": "markdown", 140 | "metadata": {}, 141 | "source": [ 142 | "A population that grows without bound is modeled by the differential equation\n", 143 | "\n", 144 | "$$f'(t)=af(t)$$\n", 145 | "\n", 146 | "Solve this differential equation using SymPy." 147 | ] 148 | }, 149 | { 150 | "cell_type": "code", 151 | "collapsed": false, 152 | "input": [], 153 | "language": "python", 154 | "metadata": {}, 155 | "outputs": [], 156 | "prompt_number": 7 157 | }, 158 | { 159 | "cell_type": "markdown", 160 | "metadata": {}, 161 | "source": [ 162 | "If the population growth is bounded, it is modeled by \n", 163 | "\n", 164 | "$$f'(t) = f(t)(1 - f(t))$$" 165 | ] 166 | }, 167 | { 168 | "cell_type": "code", 169 | "collapsed": false, 170 | "input": [], 171 | "language": "python", 172 | "metadata": {}, 173 | "outputs": [], 174 | "prompt_number": 7 175 | } 176 | ], 177 | "metadata": {} 178 | } 179 | ] 180 | } -------------------------------------------------------------------------------- /tutorial_sphinx/.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | -------------------------------------------------------------------------------- /tutorial_sphinx/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | PYTHON = python 4 | RST2HTML = rst2html 5 | 6 | # You can set these variables from the command line. 7 | SPHINXOPTS = 8 | SPHINXVER = 0.5 9 | SPHINXBUILD = PYTHONPATH=..:$(PYTHONPATH) sphinx-build 10 | PAPER = 11 | 12 | SVGFILES = $(wildcard src/modules/physics/mechanics/*.svg) 13 | PDFFILES = $(SVGFILES:%.svg=%.pdf) 14 | 15 | ALLSPHINXOPTS = -d _build/doctrees $(SPHINXOPTS) src 16 | ALLSPHINXOPTSapi = -d _build/doctrees-api $(SPHINXOPTS) api 17 | ALLSPHINXOPTSlatex = -d _build/doctrees-latex -D latex_paper_size=$(PAPER) \ 18 | $(SPHINXOPTS) src 19 | 20 | MOFILES = $(foreach l,$(LANGUAGES),$(addprefix _build/i18n/,$(addsuffix /LC_MESSAGES/tutorial.mo,${l}))) 21 | POFILES = $(foreach l,$(LANGUAGES),$(addprefix src/tutorial/tutorial.,$(addsuffix .po,${l}))) 22 | 23 | .PHONY: changes cheatsheet clean gettext help html html-errors \ 24 | htmlapi htmlhelp htmli18n info latex linkcheck texinfo \ 25 | update-po web 26 | 27 | .SUFFIXES: .pdf .svg 28 | 29 | help: 30 | @echo "Please use \`make ' where is one of" 31 | @echo " changes to make an overview over all changed/added/deprecated items" 32 | @echo " cheatsheet to make the Cheatsheet" 33 | @echo " clean to remove generated files" 34 | @echo " gettext to make pot files for translation" 35 | @echo " html to make standalone HTML files" 36 | @echo " html-errors to make the standalone HTML files, stopping on any errors or warnings" 37 | @echo " htmlapi to make HTML API docs" 38 | @echo " htmlhelp to make HTML files and a HTML help project" 39 | @echo " htmli18n to make the i18n versions" 40 | @echo " info to make Texinfo files and run them through makeinfo" 41 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 42 | @echo " linkcheck to check all external links for integrity" 43 | @echo " livehtml to use livereload to view the built html" 44 | @echo " texinfo to make Texinfo files" 45 | @echo " update-po to update po files for translation" 46 | @echo " web to make files usable by Sphinx.web" 47 | 48 | clean: 49 | -rm -rf _build 50 | -rm -rf sphinx 51 | -rm -f $(PDFFILES) 52 | 53 | html: htmli18n 54 | mkdir -p src/.static 55 | mkdir -p _build/html 56 | mkdir -p _build/doctrees 57 | mkdir -p src/modules 58 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html 59 | cp -r src/pics _build/html/ 60 | @echo 61 | @echo "Build finished. The HTML pages are in _build/html." 62 | 63 | html-errors: SPHINXOPTS += -W 64 | html-errors: html 65 | 66 | htmlapi: 67 | mkdir -p api/.static 68 | mkdir -p api/modules 69 | mkdir -p _build/api _build/doctreesapi 70 | rm -f api/modules/sympy*.rst 71 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTSapi) _build/api 72 | @echo 73 | @echo "Build finished. The API docs pages are in _build/api." 74 | 75 | gettext: 76 | $(SPHINXBUILD) -b gettext -t gettext -D master_doc=tutorial/tutorial \ 77 | -D source_suffix=.en.rst -d _build/doctrees-en src src/tutorial 78 | sed -i "/^\# [0-9a-zA-Z]*$$/d" src/tutorial/tutorial.pot 79 | 80 | update-po: $(POFILES) 81 | 82 | htmli18n: $(MOFILES) 83 | mkdir -p _build/i18n/ 84 | mkdir -p _build/html/tutorial 85 | $(foreach l,$(LANGUAGES), \ 86 | $(SPHINXBUILD) $(SPHINXOPTS) -b html -D language=$l -D master_doc=tutorial/tutorial \ 87 | -D source_suffix=.en.rst -d _build/doctrees-$l src _build/i18n/$l && \ 88 | cp _build/i18n/$l/tutorial/tutorial.html _build/html/tutorial/tutorial.$l.html && \ 89 | ) true 90 | 91 | $(POFILES): src/tutorial/tutorial.pot 92 | msgmerge -U $@ $< 93 | touch $@ 94 | 95 | $(MOFILES): _build/i18n/%/LC_MESSAGES/tutorial.mo: src/tutorial/tutorial.%.po 96 | mkdir -p $(dir $@) 97 | msgfmt $< -o $@ 98 | rm -rf _build/doctrees-$* 99 | 100 | web: 101 | mkdir -p _build/web _build/doctrees 102 | $(SPHINXBUILD) -b web $(ALLSPHINXOPTS) _build/web 103 | @echo 104 | @echo "Build finished; now you can run" 105 | @echo " python -m sphinx.web _build/web" 106 | @echo "to start the server." 107 | 108 | htmlhelp: 109 | mkdir -p _build/htmlhelp _build/doctrees 110 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp 111 | @echo 112 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 113 | ".hhp project file in _build/htmlhelp." 114 | 115 | latex: $(PDFFILES) 116 | mkdir -p _build/latex _build/doctrees 117 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTSlatex) _build/latex 118 | sed -i "s/pdflatex/xelatex/g" _build/latex/Makefile 119 | @echo 120 | @echo "Build finished; the LaTeX files are in _build/latex." 121 | @echo "Run \`make all' in that directory to run these through xelatex." 122 | 123 | .svg.pdf: 124 | inkscape --file=$< --export-area-drawing --without-gui --export-pdf=$@ 125 | 126 | changes: 127 | mkdir -p _build/changes _build/doctrees 128 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes 129 | @echo 130 | @echo "The overview file is in _build/changes." 131 | 132 | linkcheck: 133 | mkdir -p _build/linkcheck _build/doctrees 134 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck 135 | @echo 136 | @echo "Link check complete; look for any errors in the above output " \ 137 | "or in _build/linkcheck/output.txt." 138 | 139 | livehtml: 140 | livereload -b _build/html 141 | 142 | cheatsheet: _build/cheatsheet/cheatsheet.pdf 143 | 144 | _build/cheatsheet/cheatsheet.pdf: cheatsheet/cheatsheet.tex 145 | mkdir -p _build/cheatsheet 146 | pdflatex -output-directory=_build/cheatsheet cheatsheet/cheatsheet.tex 147 | pdflatex -output-directory=_build/cheatsheet cheatsheet/cheatsheet.tex 148 | 149 | texinfo: 150 | mkdir -p _build/texinfo 151 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) _build/texinfo 152 | @echo 153 | @echo "Build finished. The Texinfo files are in _build/texinfo." 154 | @echo "Run \`make' in that directory to run these through makeinfo" \ 155 | "(use \`make info' here to do that automatically)." 156 | 157 | info: 158 | mkdir -p _build/texinfo 159 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) _build/texinfo 160 | @echo "Running Texinfo files through makeinfo..." 161 | make -C _build/texinfo info 162 | @echo "makeinfo finished; the Info files are in _build/texinfo." 163 | -------------------------------------------------------------------------------- /tutorial_sphinx/doctest: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | Program to execute doctests using the py.test like interface. 5 | 6 | The advantage over py.test is that it only depends on sympy and should just 7 | work in any circumstances. See "sympy.dotest?" for documentation. 8 | """ 9 | 10 | # files listed here can be in unix forward slash format with paths 11 | # listed relative to sympy (which contains bin, etc...) 12 | blacklist = [] 13 | 14 | import sys 15 | import os 16 | from optparse import OptionParser 17 | 18 | from get_sympy import path_hack 19 | path_hack() 20 | 21 | parser = OptionParser() 22 | parser.add_option("-v", "--verbose", action="store_true", dest="verbose", 23 | default=False) 24 | 25 | # if you don't see a -n `default=False`; 26 | # if you do see a -n `store_true` means to store a True value for it; 27 | # dest is where in options to put it, options.normal will hold the bool; 28 | # when the user enters -h or --help, print the `help` text 29 | parser.add_option("-n", "--normal", action="store_true", dest="normal", 30 | help="run normal doctests; do not require explicit imports", default=False) 31 | parser.add_option('-t', '--types', dest='types', action='store', 32 | default=None, choices=['gmpy', 'python', 'sympy'], 33 | help='setup ground types: gmpy | python | sympy') 34 | parser.add_option('-C', '--no-cache', dest='cache', action='store_false', 35 | default=True, help='disable caching mechanism') 36 | parser.add_option("--no-subprocess", action="store_false", dest="subprocess", 37 | default=True, help="Don't run the tests in a separate " 38 | "subprocess. This may prevent hash randomization from being enabled.") 39 | parser.set_usage("test [options ...] [files ...]") 40 | parser.epilog = """\ 41 | "options" are any of the options above. "files" are 0 or more glob strings of \ 42 | files to run doctests on. If no file arguments are given, all doctests will be \ 43 | run. This program runs both doctests in the source and doctests in the Sphinx \ 44 | documentation (doc/src/ directory).\ 45 | """ 46 | 47 | options, args = parser.parse_args() 48 | 49 | if not options.cache: 50 | os.environ['SYMPY_USE_CACHE'] = 'no' 51 | if options.types: 52 | os.environ['SYMPY_GROUND_TYPES'] = options.types 53 | 54 | import runtests 55 | 56 | ok = runtests.doctest(*args, **{"verbose": options.verbose, 57 | "blacklist": blacklist, "normal": options.normal, "subprocess": False}) 58 | 59 | if ok: 60 | sys.exit(0) 61 | else: 62 | sys.exit(1) 63 | -------------------------------------------------------------------------------- /tutorial_sphinx/ext/docscrape_sphinx.py: -------------------------------------------------------------------------------- 1 | import re 2 | import inspect 3 | import textwrap 4 | import pydoc 5 | import sphinx 6 | from docscrape import NumpyDocString, FunctionDoc, ClassDoc 7 | 8 | 9 | class SphinxDocString(NumpyDocString): 10 | def __init__(self, docstring, config={}): 11 | self.use_plots = config.get('use_plots', False) 12 | NumpyDocString.__init__(self, docstring, config=config) 13 | 14 | # string conversion routines 15 | def _str_header(self, name, symbol='`'): 16 | return ['.. rubric:: ' + name, ''] 17 | 18 | def _str_field_list(self, name): 19 | return [':' + name + ':'] 20 | 21 | def _str_indent(self, doc, indent=4): 22 | out = [] 23 | for line in doc: 24 | out += [' '*indent + line] 25 | return out 26 | 27 | def _str_signature(self): 28 | return [''] 29 | if self['Signature']: 30 | return ['``%s``' % self['Signature']] + [''] 31 | else: 32 | return [''] 33 | 34 | def _str_summary(self): 35 | return self['Summary'] + [''] 36 | 37 | def _str_extended_summary(self): 38 | return self['Extended Summary'] + [''] 39 | 40 | def _str_param_list(self, name): 41 | out = [] 42 | if self[name]: 43 | out += self._str_field_list(name) 44 | out += [''] 45 | for param, param_type, desc in self[name]: 46 | out += self._str_indent(['**%s** : %s' % (param.strip(), 47 | param_type)]) 48 | out += [''] 49 | out += self._str_indent(desc, 8) 50 | out += [''] 51 | return out 52 | 53 | @property 54 | def _obj(self): 55 | if hasattr(self, '_cls'): 56 | return self._cls 57 | elif hasattr(self, '_f'): 58 | return self._f 59 | return None 60 | 61 | def _str_member_list(self, name): 62 | """ 63 | Generate a member listing, autosummary:: table where possible, 64 | and a table where not. 65 | 66 | """ 67 | out = [] 68 | if self[name]: 69 | out += ['.. rubric:: %s' % name, ''] 70 | prefix = getattr(self, '_name', '') 71 | 72 | if prefix: 73 | prefix = '~%s.' % prefix 74 | 75 | ## Lines that are commented out are used to make the 76 | ## autosummary:: table. Since SymPy does not use the 77 | ## autosummary:: functionality, it is easiest to just comment it 78 | ## out. 79 | #autosum = [] 80 | others = [] 81 | for param, param_type, desc in self[name]: 82 | param = param.strip() 83 | #if not self._obj or hasattr(self._obj, param): 84 | # autosum += [" %s%s" % (prefix, param)] 85 | #else: 86 | others.append((param, param_type, desc)) 87 | 88 | #if autosum: 89 | # out += ['.. autosummary::', ' :toctree:', ''] 90 | # out += autosum 91 | 92 | if others: 93 | maxlen_0 = max([len(x[0]) for x in others]) 94 | maxlen_1 = max([len(x[1]) for x in others]) 95 | hdr = "="*maxlen_0 + " " + "="*maxlen_1 + " " + "="*10 96 | fmt = '%%%ds %%%ds ' % (maxlen_0, maxlen_1) 97 | n_indent = maxlen_0 + maxlen_1 + 4 98 | out += [hdr] 99 | for param, param_type, desc in others: 100 | out += [fmt % (param.strip(), param_type)] 101 | out += self._str_indent(desc, n_indent) 102 | out += [hdr] 103 | out += [''] 104 | return out 105 | 106 | def _str_section(self, name): 107 | out = [] 108 | if self[name]: 109 | out += self._str_header(name) 110 | out += [''] 111 | content = textwrap.dedent("\n".join(self[name])).split("\n") 112 | out += content 113 | out += [''] 114 | return out 115 | 116 | def _str_see_also(self, func_role): 117 | out = [] 118 | if self['See Also']: 119 | see_also = super(SphinxDocString, self)._str_see_also(func_role) 120 | out = ['.. seealso::', ''] 121 | out += self._str_indent(see_also[2:]) 122 | return out 123 | 124 | def _str_warnings(self): 125 | out = [] 126 | if self['Warnings']: 127 | out = ['.. warning::', ''] 128 | out += self._str_indent(self['Warnings']) 129 | return out 130 | 131 | def _str_index(self): 132 | idx = self['index'] 133 | out = [] 134 | if len(idx) == 0: 135 | return out 136 | 137 | out += ['.. index:: %s' % idx.get('default', '')] 138 | for section, references in idx.iteritems(): 139 | if section == 'default': 140 | continue 141 | elif section == 'refguide': 142 | out += [' single: %s' % (', '.join(references))] 143 | else: 144 | out += [' %s: %s' % (section, ','.join(references))] 145 | return out 146 | 147 | def _str_references(self): 148 | out = [] 149 | if self['References']: 150 | out += self._str_header('References') 151 | if isinstance(self['References'], str): 152 | self['References'] = [self['References']] 153 | out.extend(self['References']) 154 | out += [''] 155 | # Latex collects all references to a separate bibliography, 156 | # so we need to insert links to it 157 | if sphinx.__version__ >= "0.6": 158 | out += ['.. only:: latex', ''] 159 | else: 160 | out += ['.. latexonly::', ''] 161 | items = [] 162 | for line in self['References']: 163 | m = re.match(r'.. \[([a-z0-9._-]+)\]', line, re.I) 164 | if m: 165 | items.append(m.group(1)) 166 | out += [' ' + ", ".join(["[%s]_" % item for item in items]), ''] 167 | return out 168 | 169 | def _str_examples(self): 170 | examples_str = "\n".join(self['Examples']) 171 | 172 | if (self.use_plots and 'import matplotlib' in examples_str 173 | and 'plot::' not in examples_str): 174 | out = [] 175 | out += self._str_header('Examples') 176 | out += ['.. plot::', ''] 177 | out += self._str_indent(self['Examples']) 178 | out += [''] 179 | return out 180 | else: 181 | return self._str_section('Examples') 182 | 183 | def __str__(self, indent=0, func_role="obj"): 184 | out = [] 185 | out += self._str_signature() 186 | out += self._str_index() + [''] 187 | out += self._str_summary() 188 | out += self._str_extended_summary() 189 | for param_list in ('Parameters', 'Returns', 'Other Parameters', 190 | 'Raises', 'Warns'): 191 | out += self._str_param_list(param_list) 192 | out += self._str_warnings() 193 | out += self._str_see_also(func_role) 194 | out += self._str_section('Notes') 195 | out += self._str_references() 196 | out += self._str_examples() 197 | for s in self._other_keys: 198 | out += self._str_section(s) 199 | out += self._str_member_list('Attributes') 200 | out = self._str_indent(out, indent) 201 | return '\n'.join(out) 202 | 203 | 204 | class SphinxFunctionDoc(SphinxDocString, FunctionDoc): 205 | def __init__(self, obj, doc=None, config={}): 206 | self.use_plots = config.get('use_plots', False) 207 | FunctionDoc.__init__(self, obj, doc=doc, config=config) 208 | 209 | 210 | class SphinxClassDoc(SphinxDocString, ClassDoc): 211 | def __init__(self, obj, doc=None, func_doc=None, config={}): 212 | self.use_plots = config.get('use_plots', False) 213 | ClassDoc.__init__(self, obj, doc=doc, func_doc=None, config=config) 214 | 215 | 216 | class SphinxObjDoc(SphinxDocString): 217 | def __init__(self, obj, doc=None, config={}): 218 | self._f = obj 219 | SphinxDocString.__init__(self, doc, config=config) 220 | 221 | 222 | def get_doc_object(obj, what=None, doc=None, config={}): 223 | if inspect.isclass(obj): 224 | what = 'class' 225 | elif inspect.ismodule(obj): 226 | what = 'module' 227 | elif callable(obj): 228 | what = 'function' 229 | else: 230 | what = 'object' 231 | 232 | if what == 'class': 233 | return SphinxClassDoc(obj, func_doc=SphinxFunctionDoc, doc=doc, 234 | config=config) 235 | elif what in ('function', 'method'): 236 | return SphinxFunctionDoc(obj, doc=doc, config=config) 237 | else: 238 | if doc is None: 239 | doc = pydoc.getdoc(obj) 240 | return SphinxObjDoc(obj, doc, config=config) 241 | -------------------------------------------------------------------------------- /tutorial_sphinx/ext/numpydoc.py: -------------------------------------------------------------------------------- 1 | """ 2 | ======== 3 | numpydoc 4 | ======== 5 | 6 | Sphinx extension that handles docstrings in the Numpy standard format. [1] 7 | 8 | It will: 9 | 10 | - Convert Parameters etc. sections to field lists. 11 | - Convert See Also section to a See also entry. 12 | - Renumber references. 13 | - Extract the signature from the docstring, if it can't be determined 14 | otherwise. 15 | 16 | .. [1] https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt 17 | 18 | """ 19 | 20 | import sphinx 21 | 22 | if sphinx.__version__ < '1.0.1': 23 | raise RuntimeError("Sphinx 1.0.1 or newer is required") 24 | 25 | import os 26 | import re 27 | import pydoc 28 | from docscrape_sphinx import get_doc_object, SphinxDocString 29 | from sphinx.util.compat import Directive 30 | import inspect 31 | 32 | 33 | def mangle_docstrings(app, what, name, obj, options, lines, 34 | reference_offset=[0]): 35 | 36 | cfg = dict(use_plots=app.config.numpydoc_use_plots, 37 | show_class_members=app.config.numpydoc_show_class_members) 38 | 39 | if what == 'module': 40 | # Strip top title 41 | title_re = re.compile(ur'^\s*[#*=]{4,}\n[a-z0-9 -]+\n[#*=]{4,}\s*', 42 | re.I | re.S) 43 | lines[:] = title_re.sub(u'', u"\n".join(lines)).split(u"\n") 44 | else: 45 | doc = get_doc_object(obj, what, u"\n".join(lines), config=cfg) 46 | lines[:] = unicode(doc).split(u"\n") 47 | 48 | if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and \ 49 | obj.__name__: 50 | if hasattr(obj, '__module__'): 51 | v = dict(full_name=u"%s.%s" % (obj.__module__, obj.__name__)) 52 | else: 53 | v = dict(full_name=obj.__name__) 54 | lines += [u'', u'.. htmlonly::', ''] 55 | lines += [u' %s' % x for x in 56 | (app.config.numpydoc_edit_link % v).split("\n")] 57 | 58 | # replace reference numbers so that there are no duplicates 59 | references = [] 60 | for line in lines: 61 | line = line.strip() 62 | m = re.match(ur'^.. \[([a-z0-9_.-])\]', line, re.I) 63 | if m: 64 | references.append(m.group(1)) 65 | 66 | # start renaming from the longest string, to avoid overwriting parts 67 | references.sort(key=lambda x: -len(x)) 68 | if references: 69 | for i, line in enumerate(lines): 70 | for r in references: 71 | if re.match(ur'^\d+$', r): 72 | new_r = u"R%d" % (reference_offset[0] + int(r)) 73 | else: 74 | new_r = u"%s%d" % (r, reference_offset[0]) 75 | lines[i] = lines[i].replace(u'[%s]_' % r, 76 | u'[%s]_' % new_r) 77 | lines[i] = lines[i].replace(u'.. [%s]' % r, 78 | u'.. [%s]' % new_r) 79 | 80 | reference_offset[0] += len(references) 81 | 82 | 83 | def mangle_signature(app, what, name, obj, options, sig, retann): 84 | # Do not try to inspect classes that don't define `__init__` 85 | if (inspect.isclass(obj) and 86 | (not hasattr(obj, '__init__') or 87 | 'initializes x; see ' in pydoc.getdoc(obj.__init__))): 88 | return '', '' 89 | 90 | if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')): 91 | return 92 | if not hasattr(obj, '__doc__'): 93 | return 94 | 95 | doc = SphinxDocString(pydoc.getdoc(obj)) 96 | if doc['Signature']: 97 | sig = re.sub(u"^[^(]*", u"", doc['Signature']) 98 | return sig, u'' 99 | 100 | 101 | def setup(app, get_doc_object_=get_doc_object): 102 | global get_doc_object 103 | get_doc_object = get_doc_object_ 104 | 105 | app.connect('autodoc-process-docstring', mangle_docstrings) 106 | app.connect('autodoc-process-signature', mangle_signature) 107 | app.add_config_value('numpydoc_edit_link', None, False) 108 | app.add_config_value('numpydoc_use_plots', None, False) 109 | app.add_config_value('numpydoc_show_class_members', True, True) 110 | 111 | # Extra mangling domains 112 | app.add_domain(NumpyPythonDomain) 113 | app.add_domain(NumpyCDomain) 114 | 115 | #------------------------------------------------------------------------------ 116 | # Docstring-mangling domains 117 | #------------------------------------------------------------------------------ 118 | 119 | from docutils.statemachine import ViewList 120 | from sphinx.domains.c import CDomain 121 | from sphinx.domains.python import PythonDomain 122 | 123 | 124 | class ManglingDomainBase(object): 125 | directive_mangling_map = {} 126 | 127 | def __init__(self, *a, **kw): 128 | super(ManglingDomainBase, self).__init__(*a, **kw) 129 | self.wrap_mangling_directives() 130 | 131 | def wrap_mangling_directives(self): 132 | for name, objtype in self.directive_mangling_map.items(): 133 | self.directives[name] = wrap_mangling_directive( 134 | self.directives[name], objtype) 135 | 136 | 137 | class NumpyPythonDomain(ManglingDomainBase, PythonDomain): 138 | name = 'np' 139 | directive_mangling_map = { 140 | 'function': 'function', 141 | 'class': 'class', 142 | 'exception': 'class', 143 | 'method': 'function', 144 | 'classmethod': 'function', 145 | 'staticmethod': 'function', 146 | 'attribute': 'attribute', 147 | } 148 | 149 | 150 | class NumpyCDomain(ManglingDomainBase, CDomain): 151 | name = 'np-c' 152 | directive_mangling_map = { 153 | 'function': 'function', 154 | 'member': 'attribute', 155 | 'macro': 'function', 156 | 'type': 'class', 157 | 'var': 'object', 158 | } 159 | 160 | 161 | def wrap_mangling_directive(base_directive, objtype): 162 | class directive(base_directive): 163 | def run(self): 164 | env = self.state.document.settings.env 165 | 166 | name = None 167 | if self.arguments: 168 | m = re.match(r'^(.*\s+)?(.*?)(\(.*)?', self.arguments[0]) 169 | name = m.group(2).strip() 170 | 171 | if not name: 172 | name = self.arguments[0] 173 | 174 | lines = list(self.content) 175 | mangle_docstrings(env.app, objtype, name, None, None, lines) 176 | self.content = ViewList(lines, self.content.parent) 177 | 178 | return base_directive.run(self) 179 | 180 | return directive 181 | -------------------------------------------------------------------------------- /tutorial_sphinx/ext/sympylive.py: -------------------------------------------------------------------------------- 1 | """ 2 | sympylive 3 | ~~~~~~~~~ 4 | 5 | Allow `SymPy Live `_ to be used for interactive 6 | evaluation of SymPy's code examples. 7 | 8 | :copyright: Copyright 2011 by the SymPy Development Team, see AUTHORS. 9 | :license: BSD, see LICENSE for details. 10 | """ 11 | 12 | 13 | def builder_inited(app): 14 | if not app.config.sympylive_url: 15 | raise ExtensionError('sympylive_url config value must be set' 16 | ' for the sympylive extension to work') 17 | 18 | app.add_javascript(app.config.sympylive_url + '/static/utilities.js') 19 | app.add_javascript(app.config.sympylive_url + '/static/external/classy.js') 20 | 21 | app.add_stylesheet(app.config.sympylive_url + '/static/live-core.css') 22 | app.add_stylesheet(app.config.sympylive_url + 23 | '/static/live-autocomplete.css') 24 | app.add_stylesheet(app.config.sympylive_url + '/static/live-sphinx.css') 25 | 26 | app.add_javascript(app.config.sympylive_url + '/static/live-core.js') 27 | app.add_javascript(app.config.sympylive_url + 28 | '/static/live-autocomplete.js') 29 | app.add_javascript(app.config.sympylive_url + '/static/live-sphinx.js') 30 | 31 | 32 | def setup(app): 33 | app.add_config_value('sympylive_url', 'http://live.sympy.org', False) 34 | app.connect('builder-inited', builder_inited) 35 | -------------------------------------------------------------------------------- /tutorial_sphinx/get_sympy.py: -------------------------------------------------------------------------------- 1 | """Functions to get the correct sympy version to run tests.""" 2 | 3 | import os 4 | import sys 5 | 6 | def path_hack(): 7 | """ 8 | Hack sys.path to import correct (local) sympy. 9 | """ 10 | this_file = os.path.abspath(__file__) 11 | sympy_dir = os.path.join(os.path.dirname(this_file), "..") 12 | sympy_dir = os.path.normpath(sympy_dir) 13 | sys.path.insert(0, sympy_dir) 14 | -------------------------------------------------------------------------------- /tutorial_sphinx/logo/LogoInfo.txt: -------------------------------------------------------------------------------- 1 | I created these logo's and permit their free use on the same terms as the rest of SymPy's code and documentation. 2 | 3 | Fredrik Johansson 4 | 5 | ---------------- 6 | 7 | This directory only contains the updated logo. 8 | All original files can be downloaded from: 9 | 10 | http://sympy.googlecode.com/svn/materials/logo/ 11 | 12 | ---------------- 13 | 14 | Font Used : CMU Serif 15 | Favicon Generator Used : http://www.favicon.co.uk/ -------------------------------------------------------------------------------- /tutorial_sphinx/logo/SymPy-500x500-Logo -No-Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/logo/SymPy-500x500-Logo -No-Text.png -------------------------------------------------------------------------------- /tutorial_sphinx/logo/SymPy-500x500-Logo-No-Transparency-No-Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/logo/SymPy-500x500-Logo-No-Transparency-No-Text.png -------------------------------------------------------------------------------- /tutorial_sphinx/logo/SymPy-500x500-Logo-No-Transparency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/logo/SymPy-500x500-Logo-No-Transparency.png -------------------------------------------------------------------------------- /tutorial_sphinx/logo/SymPy-500x500-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/logo/SymPy-500x500-Logo.png -------------------------------------------------------------------------------- /tutorial_sphinx/logo/SymPy-Favicon-WithoutTail.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/logo/SymPy-Favicon-WithoutTail.ico -------------------------------------------------------------------------------- /tutorial_sphinx/logo/SymPy-Favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/logo/SymPy-Favicon.ico -------------------------------------------------------------------------------- /tutorial_sphinx/logo/SymPy-Logo-NoTail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/logo/SymPy-Logo-NoTail.png -------------------------------------------------------------------------------- /tutorial_sphinx/logo/SymPy-NoTail-NoText.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/logo/SymPy-NoTail-NoText.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 SymPy Development Team 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | a. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | b. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | c. Neither the name of SymPy nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 28 | DAMAGE. 29 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/_static/default.css_t: -------------------------------------------------------------------------------- 1 | /* 2 | * default.css_t 3 | * ~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- default theme. 6 | * 7 | * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | @import url("basic.css"); 13 | 14 | /* -- page layout ----------------------------------------------------------- */ 15 | 16 | body { 17 | font-family: {{ theme_bodyfont }}; 18 | font-size: 100%; 19 | background-color: {{ theme_footerbgcolor }}; 20 | color: #000; 21 | margin: 0; 22 | padding: 0; 23 | } 24 | 25 | div.document { 26 | background-color: {{ theme_sidebarbgcolor }}; 27 | } 28 | 29 | div.documentwrapper { 30 | float: left; 31 | width: 100%; 32 | } 33 | 34 | div.bodywrapper { 35 | margin: 0 200px 0 {{ theme_sidebarwidth|toint }}px; 36 | } 37 | 38 | div.body { 39 | background-color: {{ theme_bgcolor }}; 40 | color: {{ theme_textcolor }}; 41 | padding: 0 20px 30px 20px; 42 | } 43 | 44 | {%- if theme_rightsidebar|tobool %} 45 | div.bodywrapper { 46 | margin: 0 {{ theme_sidebarwidth|toint }}px 0 0; 47 | } 48 | {%- endif %} 49 | 50 | div.footer { 51 | color: {{ theme_footertextcolor }}; 52 | width: 100%; 53 | padding: 9px 0 9px 0; 54 | text-align: center; 55 | font-size: 75%; 56 | } 57 | 58 | div.footer a { 59 | color: {{ theme_footertextcolor }}; 60 | text-decoration: underline; 61 | } 62 | 63 | div.related { 64 | background-color: {{ theme_relbarbgcolor }}; 65 | line-height: 30px; 66 | color: {{ theme_relbartextcolor }}; 67 | } 68 | 69 | div.related a { 70 | color: {{ theme_relbarlinkcolor }}; 71 | } 72 | 73 | div.sphinxsidebar { 74 | {%- if theme_stickysidebar|tobool %} 75 | top: 30px; 76 | bottom: 0; 77 | margin: 0; 78 | position: fixed; 79 | overflow: auto; 80 | height: auto; 81 | {%- endif %} 82 | {%- if theme_rightsidebar|tobool %} 83 | float: right; 84 | {%- if theme_stickysidebar|tobool %} 85 | right: 0; 86 | {%- endif %} 87 | {%- endif %} 88 | } 89 | 90 | {%- if theme_stickysidebar|tobool %} 91 | /* this is nice, but it it leads to hidden headings when jumping 92 | to an anchor */ 93 | /* 94 | div.related { 95 | position: fixed; 96 | } 97 | 98 | div.documentwrapper { 99 | margin-top: 30px; 100 | } 101 | */ 102 | {%- endif %} 103 | 104 | div.sphinxsidebar h3 { 105 | font-family: {{ theme_headfont }}; 106 | color: {{ theme_sidebartextcolor }}; 107 | font-size: 1.4em; 108 | font-weight: normal; 109 | margin: 0; 110 | padding: 0; 111 | } 112 | 113 | div.sphinxsidebar h3 a { 114 | color: {{ theme_sidebartextcolor }}; 115 | } 116 | 117 | div.sphinxsidebar h4 { 118 | font-family: {{ theme_headfont }}; 119 | color: {{ theme_sidebartextcolor }}; 120 | font-size: 1.3em; 121 | font-weight: normal; 122 | margin: 5px 0 0 0; 123 | padding: 0; 124 | } 125 | 126 | div.sphinxsidebar p { 127 | color: {{ theme_sidebartextcolor }}; 128 | } 129 | 130 | div.sphinxsidebar p.topless { 131 | margin: 5px 10px 10px 10px; 132 | } 133 | 134 | div.sphinxsidebar ul { 135 | margin: 10px; 136 | padding: 0; 137 | color: {{ theme_sidebartextcolor }}; 138 | } 139 | 140 | div.sphinxsidebar a { 141 | color: {{ theme_sidebarlinkcolor }}; 142 | } 143 | 144 | div.sphinxsidebar input { 145 | border: 1px solid {{ theme_sidebarlinkcolor }}; 146 | font-family: sans-serif; 147 | font-size: 1em; 148 | } 149 | 150 | {% if theme_collapsiblesidebar|tobool %} 151 | /* for collapsible sidebar */ 152 | div#sidebarbutton { 153 | background-color: {{ theme_sidebarbtncolor }}; 154 | } 155 | {% endif %} 156 | 157 | /* -- hyperlink styles ------------------------------------------------------ */ 158 | 159 | a { 160 | color: {{ theme_linkcolor }}; 161 | text-decoration: none; 162 | } 163 | 164 | a:visited { 165 | color: {{ theme_visitedlinkcolor }}; 166 | text-decoration: none; 167 | } 168 | 169 | a:hover { 170 | text-decoration: underline; 171 | } 172 | 173 | {% if theme_externalrefs|tobool %} 174 | a.external { 175 | text-decoration: none; 176 | border-bottom: 1px dashed {{ theme_linkcolor }}; 177 | } 178 | 179 | a.external:hover { 180 | text-decoration: none; 181 | border-bottom: none; 182 | } 183 | 184 | a.external:visited { 185 | text-decoration: none; 186 | border-bottom: 1px dashed {{ theme_visitedlinkcolor }}; 187 | } 188 | {% endif %} 189 | 190 | /* -- body styles ----------------------------------------------------------- */ 191 | 192 | div.body h1, 193 | div.body h2, 194 | div.body h3, 195 | div.body h4, 196 | div.body h5, 197 | div.body h6 { 198 | font-family: {{ theme_headfont }}; 199 | background-color: {{ theme_headbgcolor }}; 200 | font-weight: normal; 201 | color: {{ theme_headtextcolor }}; 202 | border-bottom: 1px solid #ccc; 203 | margin: 20px -20px 10px -20px; 204 | padding: 3px 0 3px 10px; 205 | } 206 | 207 | div.body h1 { margin-top: 0; font-size: 200%; } 208 | div.body h2 { font-size: 160%; } 209 | div.body h3 { font-size: 140%; } 210 | div.body h4 { font-size: 120%; } 211 | div.body h5 { font-size: 110%; } 212 | div.body h6 { font-size: 100%; } 213 | 214 | a.headerlink { 215 | color: {{ theme_headlinkcolor }}; 216 | font-size: 0.8em; 217 | padding: 0 4px 0 4px; 218 | text-decoration: none; 219 | } 220 | 221 | a.headerlink:hover { 222 | background-color: {{ theme_headlinkcolor }}; 223 | color: white; 224 | } 225 | 226 | div.body p, div.body dd, div.body li { 227 | text-align: left; 228 | line-height: 130%; 229 | } 230 | 231 | div.admonition p.admonition-title + p { 232 | display: inline; 233 | } 234 | 235 | div.admonition p { 236 | margin-bottom: 5px; 237 | } 238 | 239 | div.admonition pre { 240 | margin-bottom: 5px; 241 | } 242 | 243 | div.admonition ul, div.admonition ol { 244 | margin-bottom: 5px; 245 | } 246 | 247 | div.note { 248 | background-color: #eee; 249 | border: 1px solid #ccc; 250 | } 251 | 252 | div.seealso { 253 | background-color: #ffc; 254 | border: 1px solid #ff6; 255 | } 256 | 257 | div.topic { 258 | background-color: #eee; 259 | } 260 | 261 | div.warning { 262 | background-color: #ffe4e4; 263 | border: 1px solid #f66; 264 | } 265 | 266 | p.admonition-title { 267 | display: inline; 268 | } 269 | 270 | p.admonition-title:after { 271 | content: ":"; 272 | } 273 | 274 | pre { 275 | padding: 5px; 276 | background-color: {{ theme_codebgcolor }}; 277 | color: {{ theme_codetextcolor }}; 278 | line-height: 120%; 279 | border: 1px solid #ac9; 280 | border-left: none; 281 | border-right: none; 282 | } 283 | 284 | tt { 285 | background-color: #ecf0f3; 286 | padding: 0 1px 0 1px; 287 | font-size: 0.95em; 288 | } 289 | 290 | th { 291 | background-color: #ede; 292 | } 293 | 294 | .warning tt { 295 | background: #efc2c2; 296 | } 297 | 298 | .note tt { 299 | background: #d6d6d6; 300 | } 301 | 302 | .viewcode-back { 303 | font-family: {{ theme_bodyfont }}; 304 | } 305 | 306 | div.viewcode-block:target { 307 | background-color: #f4debf; 308 | border-top: 1px solid #ac9; 309 | border-bottom: 1px solid #ac9; 310 | } 311 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/_static/sympylogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/src/_static/sympylogo.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # SymPy documentation build configuration file, created by 4 | # sphinx-quickstart.py on Sat Mar 22 19:34:32 2008. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # The contents of this file are pickled, so don't put values in the namespace 9 | # that aren't pickleable (module imports are okay, they're removed automatically). 10 | # 11 | # All configuration values have a default value; values that are commented out 12 | # serve to show the default value. 13 | 14 | import sys 15 | 16 | # If your extensions are in another directory, add it here. 17 | sys.path = ['../sympy', 'ext'] + sys.path 18 | 19 | # General configuration 20 | # --------------------- 21 | 22 | # Add any Sphinx extension module names here, as strings. They can be extensions 23 | # coming with Sphinx (named 'sphinx.addons.*') or your custom ones. 24 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.mathjax', 25 | 'numpydoc', 'sympylive', 'sphinx.ext.graphviz', ] 26 | 27 | # Use this to use pngmath instead 28 | #extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.pngmath', ] 29 | 30 | # MathJax file, which is free to use. See http://www.mathjax.org/docs/2.0/start.html 31 | mathjax_path = 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full' 32 | 33 | # Add any paths that contain templates here, relative to this directory. 34 | templates_path = ['.templates'] 35 | 36 | # The suffix of source filenames. 37 | source_suffix = '.rst' 38 | 39 | # The master toctree document. 40 | master_doc = 'index' 41 | 42 | # General substitutions. 43 | project = 'SciPy 2013 SymPy Tutorial' 44 | copyright = '2013 SymPy Development Team' 45 | 46 | # The default replacements for |version| and |release|, also used in various 47 | # other places throughout the built documents. 48 | # 49 | # The short X.Y version. 50 | version = '' 51 | release = '' 52 | 53 | # There are two options for replacing |today|: either, you set today to some 54 | # non-false value, then it is used: 55 | #today = '' 56 | # Else, today_fmt is used as the format for a strftime call. 57 | today_fmt = '%B %d, %Y' 58 | 59 | # Translations: 60 | locale_dirs = ["../_build/i18n/"] 61 | 62 | # List of documents that shouldn't be included in the build. 63 | #unused_docs = [] 64 | 65 | # If true, '()' will be appended to :func: etc. cross-reference text. 66 | #add_function_parentheses = True 67 | 68 | # If true, the current module name will be prepended to all description 69 | # unit titles (such as .. function::). 70 | #add_module_names = True 71 | 72 | # If true, sectionauthor and moduleauthor directives will be shown in the 73 | # output. They are ignored by default. 74 | #show_authors = False 75 | 76 | # The name of the Pygments (syntax highlighting) style to use. 77 | pygments_style = 'sphinx' 78 | 79 | 80 | # Options for HTML output 81 | # ----------------------- 82 | 83 | # The style sheet to use for HTML and HTML Help pages. A file of that name 84 | # must exist either in Sphinx' static/ path, or in one of the custom paths 85 | # given in html_static_path. 86 | html_style = 'default.css' 87 | 88 | # Add any paths that contain custom static files (such as style sheets) here, 89 | # relative to this directory. They are copied after the builtin static files, 90 | # so a file named "default.css" will overwrite the builtin "default.css". 91 | html_static_path = ['_static'] 92 | 93 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 94 | # using the given strftime format. 95 | html_last_updated_fmt = '%b %d, %Y' 96 | 97 | html_logo = '_static/sympylogo.png' 98 | html_favicon = '../logo/SymPy-Favicon.ico' 99 | # See http://sphinx-doc.org/theming.html#builtin-themes. 100 | html_theme_options = { 101 | 'collapsiblesidebar': True, 102 | 'relbarbgcolor': '#2f441e', 103 | 'sidebarbgcolor': '#3b5526', 104 | 'sidebarbtncolor': '#4F663C', 105 | 'sidebarlinkcolor': '#81B953', 106 | 'linkcolor': '#29A329', 107 | 'visitedlinkcolor': '#307748', 108 | 'headtextcolor': '#2f441e', 109 | 'footerbgcolor': '#293b1b', 110 | 'headlinkcolor': '#AAAAAA', 111 | 'sidebartextcolor': '#DDDDDD', 112 | 'footertextcolor': '#DDDDDD', 113 | 'relbartextcolor': '#DDDDDD', 114 | 'relbarlinkcolor': '#81B953', 115 | } 116 | 117 | # If true, SmartyPants will be used to convert quotes and dashes to 118 | # typographically correct entities. 119 | #html_use_smartypants = True 120 | 121 | # Content template for the index page. 122 | #html_index = '' 123 | 124 | # Custom sidebar templates, maps document names to template names. 125 | #html_sidebars = {} 126 | 127 | # Additional templates that should be rendered to pages, maps page names to 128 | # template names. 129 | #html_additional_pages = {} 130 | 131 | # If false, no module index is generated. 132 | #html_use_modindex = True 133 | 134 | # If true, the reST sources are included in the HTML build as _sources/. 135 | #html_copy_source = True 136 | 137 | # Output file base name for HTML help builder. 138 | htmlhelp_basename = 'SymPydoc' 139 | 140 | 141 | # Options for LaTeX output 142 | # ------------------------ 143 | 144 | # The paper size ('letter' or 'a4'). 145 | #latex_paper_size = 'letter' 146 | 147 | # The font size ('10pt', '11pt' or '12pt'). 148 | #latex_font_size = '10pt' 149 | 150 | # Grouping the document tree into LaTeX files. List of tuples 151 | # (source start file, target name, title, author, document class [howto/manual], toctree_only). 152 | # toctree_only is set to True so that the start file document itself is not included in the 153 | # output, only the documents referenced by it via TOC trees. The extra stuff in the master 154 | # document is intended to show up in the HTML, but doesn't really belong in the LaTeX output. 155 | latex_documents = [('index', 'sympy-%s.tex' % release, 'SymPy Documentation', 156 | 'SymPy Development Team', 'manual', True)] 157 | 158 | # Additional stuff for the LaTeX preamble. 159 | # Tweaked to work with XeTeX. 160 | latex_elements = { 161 | 'babel': '', 162 | 'fontenc': r''' 163 | \usepackage{amssymb} 164 | \usepackage{fontspec} 165 | \defaultfontfeatures{Mapping=tex-text} 166 | \setmainfont{DejaVu Serif} 167 | \setsansfont{DejaVu Sans} 168 | \setmonofont{DejaVu Sans Mono} 169 | ''', 170 | 'fontpkg': '', 171 | 'inputenc': '', 172 | 'utf8extra': '', 173 | 'preamble': '' 174 | } 175 | 176 | # SymPy logo on title page 177 | latex_logo = '_static/sympylogo.png' 178 | 179 | # Documents to append as an appendix to all manuals. 180 | #latex_appendices = [] 181 | 182 | # Show page numbers next to internal references 183 | latex_show_pagerefs = True 184 | 185 | # We use False otherwise the module index gets generated twice. 186 | latex_use_modindex = False 187 | 188 | default_role = 'math' 189 | pngmath_divpng_args = ['-gamma 1.5', '-D 110'] 190 | # Note, this is ignored by the mathjax extension 191 | # Any \newcommand should be defined in the file 192 | pngmath_latex_preamble = '\\usepackage{amsmath}\n' \ 193 | '\\usepackage{bm}\n' \ 194 | '\\usepackage{amsfonts}\n' \ 195 | '\\usepackage{amssymb}\n' \ 196 | '\\setlength{\\parindent}{0pt}\n' 197 | 198 | texinfo_documents = [ 199 | (master_doc, 'sympy', 'SymPy Documentation', 'SymPy Development Team', 200 | 'SymPy', 'Computer algebra system (CAS) in Python', 'Programming', 1), 201 | ] 202 | 203 | # Use svg for graphviz 204 | 205 | graphviz_output_format = 'svg' 206 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/index.rst: -------------------------------------------------------------------------------- 1 | SymPy Tutorial for SciPy 2013 2 | ============================= 3 | 4 | This is the tutorial that Aaron Meurer and Ondřej Čertík will be giving at 5 | SciPy 2013 for `SymPy `_. This is just a stripped down 6 | version of our `docs `_, with the new tutorial that 7 | Aaron Meurer has written, adapted for SymPy 0.7.2. 8 | 9 | The slides for this tutorial are `here `_. 10 | 11 | The source for this tutorial is on `GitHub `_. 12 | 13 | The materials for this tutorial are `here 14 | `_, including 15 | exercises (exercises require the IPython notebook). 16 | 17 | The video of this tutorial is on YouTube. Parts `1 18 | `_, `2 19 | `_, `3 20 | `_, `4 21 | `_, `5 22 | `_, and `6 23 | `_. 24 | 25 | .. toctree:: 26 | :maxdepth: 2 27 | 28 | install.rst 29 | tutorial/index.rst 30 | gotchas.rst 31 | aboutus.rst 32 | 33 | .. _please report it: http://code.google.com/p/sympy/issues/list 34 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/install.rst: -------------------------------------------------------------------------------- 1 | .. _installation: 2 | 3 | Installation 4 | ------------ 5 | 6 | The SymPy CAS can be installed on virtually any computer with Python 2.5 or 7 | above. SymPy does not require any special Python modules: let us know if you 8 | have any problems with SymPy on a standard Python install. The current 9 | recommended method of installation is directly from the source files. 10 | Alternatively, executables are available for Windows, and some Linux 11 | distributions have SymPy packages available. 12 | 13 | Source 14 | ====== 15 | 16 | SymPy currently recommends that users install directly from the source files. 17 | You will first have to download the source files via the archive. Download the 18 | latest release (tar.gz) from the `downloads site`_ and open it with your 19 | operating system's standard decompression utility. 20 | 21 | When downloading the archive, make sure to get the correct version (Python 2 or 22 | Python 3). If you're not sure which one to use, you probably want the Python 2 23 | version. Note that you can install both if you want. 24 | 25 | After the download is complete, you should have a folder called "sympy". From 26 | your favorite command line terminal, change directory into that folder and 27 | execute the following:: 28 | 29 | $ python setup.py install 30 | 31 | Alternatively, if you don't want to install the package onto your computer, you 32 | may run SymPy with the "isympy" console (which automatically imports SymPy 33 | packages and defines common symbols) by executing within the "sympy" folder:: 34 | 35 | $ ./bin/isympy 36 | 37 | You may now run SymPy statements directly within the Python shell:: 38 | 39 | >>> from __future__ import division 40 | >>> from sympy import * 41 | >>> x, y, z, t = symbols('x y z t') 42 | >>> k, m, n = symbols('k m n', integer=True) 43 | >>> f, g, h = symbols('f g h', cls=Function) 44 | >>> print diff(x**2/2, x) 45 | x 46 | 47 | Git 48 | === 49 | 50 | If you are a developer or like to get the latest updates as they come, be sure 51 | to install from git. To download the repository, execute the following from the 52 | command line:: 53 | 54 | $ git clone git://github.com/sympy/sympy.git 55 | 56 | Then, execute either the setup.py or the bin/isympy scripts as demonstrated 57 | above. 58 | 59 | To update to the latest version, go into your repository and execute:: 60 | 61 | $ git pull origin master 62 | 63 | If you want to install SymPy, but still want to use the git version, you can run 64 | from your repository:: 65 | 66 | $ setupegg.py develop 67 | 68 | This will cause the installed version to always point to the version in the git 69 | directory. 70 | 71 | If you're using the git repository with Python 3, you have to use the 72 | ``./bin/use2to3`` script to build the Python 3 version of SymPy. This will put 73 | everything in the py3k-sympy directory. 74 | 75 | Anaconda 76 | ======== 77 | 78 | Although SymPy does not have any hard dependencies, many nice features are 79 | only enabled when certain libraries are installed. For example, without 80 | Matplotlib, only simple text-based plotting is enabled. With the IPython 81 | notebook or qtconsole, you can get nicer `\LaTeX` printing by running 82 | ``%loadext sympy.interactive.ipythonprinting``. An easy way to get all these 83 | libraries in addition to SymPy is to install `Anaconda 84 | `_, which is a free Python distribution 85 | from Continuum Analytics that includes SymPy, Matplotlib, IPython, NumPy, and 86 | many more useful packages for scientific computing. 87 | 88 | Other Methods 89 | ============= 90 | 91 | An installation executable is available for Windows users at the 92 | `downloads site`_ (.exe). In addition, various Linux distributions have SymPy 93 | available as a package. Others are strongly encouraged to download from source 94 | (details above). 95 | 96 | Run SymPy 97 | ========= 98 | 99 | After installation, it is best to verify that your freshly-installed SymPy 100 | works. To do this, start up Python and import the SymPy libraries:: 101 | 102 | $ python 103 | >>> from sympy import * 104 | 105 | From here, execute some simple SymPy statements like the ones below:: 106 | 107 | >>> x = Symbol('x') 108 | >>> limit(sin(x)/x, x, 0) 109 | 1 110 | >>> integrate(1/x, x) 111 | log(x) 112 | 113 | For a starter guide on using SymPy effectively, refer to the :ref:`tutorial`. 114 | 115 | Questions 116 | ========= 117 | 118 | If you have a question about installation or SymPy in general, feel free to 119 | visit the IRC channel at irc.freenode.net, channel `#sympy`_. In addition, 120 | our `mailing list`_ is an excellent source of community support. 121 | 122 | If you think there's a bug or you would like to request a feature, please open 123 | an `issue ticket`_. 124 | 125 | .. _downloads site: https://code.google.com/p/sympy/downloads/list 126 | .. _#sympy: irc://irc.freenode.net/sympy 127 | .. _issue ticket: http://code.google.com/p/sympy/issues/list 128 | .. _mailing list: http://groups.google.com/group/sympy 129 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/pics/consoleascii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/src/pics/consoleascii.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/pics/consoleunicode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/src/pics/consoleunicode.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/pics/ipythonnotebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/src/pics/ipythonnotebook.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/pics/ipythonqtconsole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/src/pics/ipythonqtconsole.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/pics/pngview1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/src/pics/pngview1.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/pics/winpdb1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/src/pics/winpdb1.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/pics/winpdb2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/certik/scipy-2013-tutorial/26a1cab3a16402afdc20088cedf47acd9bc58483/tutorial_sphinx/src/pics/winpdb2.png -------------------------------------------------------------------------------- /tutorial_sphinx/src/tutorial/basic_operations.rst: -------------------------------------------------------------------------------- 1 | .. _tutorial-basic: 2 | 3 | ================== 4 | Basic Operations 5 | ================== 6 | 7 | Here we discuss some of the most basic operations needed for expression 8 | manipulation in SymPy. Some more advanced operations will be discussed later 9 | in the :ref:`advanced expression manipulation ` section. 10 | 11 | >>> from sympy import * 12 | >>> x, y, z = symbols("x y z") 13 | 14 | Substitution 15 | ============ 16 | 17 | One of the most common things you might want to do with a mathematical 18 | expression is substitution. Substitution replaces all instances of something 19 | in an expression with something else. It is done using the ``subs`` method. 20 | For example 21 | 22 | >>> expr = cos(x) + 1 23 | >>> expr.subs(x, y) 24 | cos(y) + 1 25 | 26 | Substitution is usually done for one of two reasons: 27 | 28 | 1. Evaluating an expression at a point. For example, if our expression is 29 | ``cos(x) + 1`` and we want to evaluate it at the point ``x = 0``, so that 30 | we get ``cos(0) + 1``, which is 2. 31 | 32 | >>> expr.subs(x, 0) 33 | 2 34 | 35 | 2. Replacing a subexpression with another subexpression. There are two 36 | reasons we might want to do this. The first is if we are trying to build 37 | an expression that has some symmetry, such as `x^{x^{x^x}}`. To build 38 | this, we might start with ``x**y``, and replace ``y`` with ``x**y``. We 39 | would then get ``x**(x**y)``. If we replaced ``y`` in this new expression 40 | with ``x**x``, we would get ``x**(x**(x**x))``, the desired expression. 41 | 42 | >>> expr = x**y 43 | >>> expr 44 | x**y 45 | >>> expr = expr.subs(y, x**y) 46 | >>> expr 47 | x**(x**y) 48 | >>> expr = expr.subs(y, x**x) 49 | >>> expr 50 | x**(x**(x**x)) 51 | 52 | The second is if we want to perform a very controlled simplification, or 53 | perhaps a simplification that SymPy is otherwise unable to do. For 54 | example, say we have `\sin(2x) + \cos(2x)`, and we want to replace 55 | `\sin(2x)` with `2\sin(x)\cos(x)`. As we will learn later, the function 56 | ``expand_trig`` does this. However, this function will also expand 57 | `\cos(2x)`, which we may not want. While there are ways to perform such 58 | precise simplification, and we will learn some of them in the 59 | :ref:`advanced expression manipulation ` section, an 60 | easy way is to just replace `\sin(2x)` with `2\sin(x)\cos(x)`. 61 | 62 | >>> expr = sin(2*x) + cos(2*x) 63 | >>> expand_trig(expr) 64 | 2*sin(x)*cos(x) + 2*cos(x)**2 - 1 65 | >>> expr.subs(sin(2*x), 2*sin(x)*cos(x)) 66 | 2*sin(x)*cos(x) + cos(2*x) 67 | 68 | There are two important things to note about ``subs``. First, it returns a 69 | new expression. SymPy objects are immutable. That means that ``subs`` does 70 | modify it in-place. For example 71 | 72 | >>> expr = cos(x) 73 | >>> expr.subs(x, 0) 74 | 1 75 | >>> expr 76 | cos(x) 77 | >>> x 78 | x 79 | 80 | .. sidebar:: Quick Tip 81 | 82 | SymPy expressions are immutable. No function will change them in-place. 83 | 84 | Here, we see that performing ``expr.subs(x, 0)`` leaves ``expr`` unchanged. 85 | In fact, since SymPy expressions are immutable, no function will change them 86 | in-place. All functions will return new expressions. 87 | 88 | To perform multiple substitutions at once, pass a list of ``(old, new)`` pairs 89 | to ``subs``. 90 | 91 | >>> expr = x**3 + 4*x*y - z 92 | >>> expr.subs([(x, 2), (y, 4), (z, 0)]) 93 | 40 94 | 95 | It is often useful to combine this with a list comprehension to do a large set 96 | of similar replacements all at once. For example, say we had `x^4 - 4x^3 + 4x^2 - 97 | 2x + 3` and we wanted to replace all instances of `x` that have an even power 98 | with `y`, to get `y^4 - 4x^3 + 4y^2 - 2x + 3`. 99 | 100 | >>> expr = x**4 - 4*x**3 + 4*x**2 - 2*x + 3 101 | >>> replacements = [(x**i, y**i) for i in range(5) if i % 2 == 0] 102 | >>> expr.subs(replacements) 103 | -4*x**3 - 2*x + y**4 + 4*y**2 + 3 104 | 105 | Converting Strings to SymPy Expressions 106 | ======================================= 107 | 108 | The ``sympify`` function (that's ``sympify``, not to be confused with 109 | ``simplify``) can be used to convert strings into SymPy expressions. 110 | 111 | For example 112 | 113 | >>> str_expr = "x**2 + 3*x - 1/2" 114 | >>> expr = sympify(str_expr) 115 | >>> expr 116 | x**2 + 3*x - 1/2 117 | >>> expr.subs(x, 2) 118 | 19/2 119 | 120 | .. warning:: ``sympify`` uses ``eval``. Don't use it on unsanitized input. 121 | 122 | ``evalf`` 123 | ========= 124 | 125 | To evaluate a numerical expression into a floating point number, use 126 | ``evalf``. 127 | 128 | >>> expr = sqrt(8) 129 | >>> expr.evalf() 130 | 2.82842712474619 131 | 132 | SymPy can evaluate floating point expressions to arbitrary precision. By 133 | default, 15 digits of precision are used, but you can pass any number as the 134 | argument to ``evalf``. Let's compute the first 100 digits of `\pi`. 135 | 136 | >>> pi.evalf(100) 137 | 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068 138 | 139 | To numerically evaluate an expression with a Symbol at a point, we might use 140 | ``subs`` followed by ``evalf``, but it is more efficient and numerically 141 | stable to pass the substitution to ``evalf`` using the ``subs`` flag, which 142 | takes a dictionary of ``Symbol: point`` pairs. 143 | 144 | >>> expr = cos(2*x) 145 | >>> expr.evalf(subs={x: 2.4}) 146 | 0.0874989834394464 147 | 148 | ``subs`` and ``evalf`` are good if you want to do simple evaluation, but if 149 | you intend to evaluate an expression at many points, there are more efficient 150 | ways. See the advanced numerics section for more details. 151 | 152 | .. TODO: Link to advanced numerics section 153 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/tutorial/calculus.rst: -------------------------------------------------------------------------------- 1 | ========== 2 | Calculus 3 | ========== 4 | 5 | This section covers how to do basic calculus tasks such as derivatives, 6 | integrals, limits, and series expansions in SymPy. If you are not familiar 7 | with the math of any part of this section, you may safely skip it. 8 | 9 | >>> from sympy import * 10 | >>> x, y, z = symbols('x y z') 11 | >>> init_printing(use_unicode=True) 12 | 13 | .. _tutorial-derivatives: 14 | 15 | Derivatives 16 | =========== 17 | 18 | To take derivatives, use the ``diff`` function. 19 | 20 | >>> diff(cos(x), x) 21 | -sin(x) 22 | >>> diff(exp(x**2), x) 23 | ⎛ 2⎞ 24 | ⎝x ⎠ 25 | 2⋅x⋅ℯ 26 | 27 | ``diff`` can take multiple derivatives at once. To take multiple derivatives, 28 | pass the variable as many times as you wish to differentiate, or pass a number 29 | after the variable. For example, both of the following find the third 30 | derivative of `x^4`. 31 | 32 | >>> diff(x**4, x, x, x) 33 | 24⋅x 34 | >>> diff(x**4, x, 3) 35 | 24⋅x 36 | 37 | You can also take derivatives with respect to many variables at once. Just 38 | pass each derivative in order, using the same syntax as for single variable 39 | derivatives. For example, each of the following will compute 40 | `\frac{\partial^7}{\partial x\partial y^2\partial z^4} e^{x y z}`. 41 | 42 | >>> expr = exp(x*y*z) 43 | >>> diff(expr, x, y, y, z, z, z, z) 44 | 6 5 3 x⋅y⋅z 5 4 2 x⋅y⋅z 4 3 x⋅y⋅z 3 2 x⋅y⋅z 45 | x ⋅y ⋅z ⋅ℯ + 14⋅x ⋅y ⋅z ⋅ℯ + 52⋅x ⋅y ⋅z⋅ℯ + 48⋅x ⋅y ⋅ℯ 46 | >>> diff(expr, x, y, 2, z, 4) 47 | 6 5 3 x⋅y⋅z 5 4 2 x⋅y⋅z 4 3 x⋅y⋅z 3 2 x⋅y⋅z 48 | x ⋅y ⋅z ⋅ℯ + 14⋅x ⋅y ⋅z ⋅ℯ + 52⋅x ⋅y ⋅z⋅ℯ + 48⋅x ⋅y ⋅ℯ 49 | >>> diff(expr, x, y, y, z, 4) 50 | 6 5 3 x⋅y⋅z 5 4 2 x⋅y⋅z 4 3 x⋅y⋅z 3 2 x⋅y⋅z 51 | x ⋅y ⋅z ⋅ℯ + 14⋅x ⋅y ⋅z ⋅ℯ + 52⋅x ⋅y ⋅z⋅ℯ + 48⋅x ⋅y ⋅ℯ 52 | 53 | ``diff`` can also be called as a method. The two ways of calling ``diff`` are 54 | exactly the same, and are provided only for convenience. 55 | 56 | >>> expr.diff(x, y, y, z, 4) 57 | 6 5 3 x⋅y⋅z 5 4 2 x⋅y⋅z 4 3 x⋅y⋅z 3 2 x⋅y⋅z 58 | x ⋅y ⋅z ⋅ℯ + 14⋅x ⋅y ⋅z ⋅ℯ + 52⋅x ⋅y ⋅z⋅ℯ + 48⋅x ⋅y ⋅ℯ 59 | 60 | To create an unevaluated derivative, use the ``Derivative`` class. It has the 61 | same syntax as ``diff``. 62 | 63 | >>> deriv = Derivative(expr, x, y, y, z, 4) 64 | >>> deriv 65 | 7 66 | d ⎛ x⋅y⋅z⎞ 67 | ──────────⎝ℯ ⎠ 68 | 4 2 69 | dz dy dx 70 | 71 | To evaluate an unevaluated derivative, use the ``doit`` method. 72 | 73 | >>> deriv.doit() 74 | 6 5 3 x⋅y⋅z 5 4 2 x⋅y⋅z 4 3 x⋅y⋅z 3 2 x⋅y⋅z 75 | x ⋅y ⋅z ⋅ℯ + 14⋅x ⋅y ⋅z ⋅ℯ + 52⋅x ⋅y ⋅z⋅ℯ + 48⋅x ⋅y ⋅ℯ 76 | 77 | These unevaluated objects are useful for delaying the evaluation of the 78 | derivative, or for printing purposes. They are also used when SymPy does not 79 | know how to compute the derivative of an expression (for example, if it 80 | contains an undefined function, which are described in the :ref:`Solving 81 | Differential Equations ` section). 82 | 83 | Integrals 84 | ========= 85 | 86 | To compute an integral, use the ``integrate`` function. There are two kinds 87 | of integrals, definite and indefinite. To compute an indefinite integral, 88 | that is, an antiderivative, or primitive, just pass the variable after the 89 | expression. 90 | 91 | >>> integrate(cos(x), x) 92 | sin(x) 93 | 94 | Note that SymPy does not include the constant of integration. If you want it, 95 | you can add one yourself, or rephrase your problem as a differential equation 96 | and use ``dsolve`` to solve it, which does add the constant (see :ref:`tutorial-dsolve`). 97 | 98 | .. sidebar:: Quick Tip 99 | 100 | `\infty` in SymPy is ``oo`` (that's the lowercase letter "oh" twice). This 101 | is because ``oo`` looks like `\infty`, and is easy to type. 102 | 103 | To compute a definite integral, pass the argument ``(integration_variable, 104 | lower_limit, upper_limit)``. For example, to compute 105 | 106 | .. math:: 107 | 108 | \int_0^\infty e^{-x}\,dx, 109 | 110 | we would do 111 | 112 | >>> integrate(exp(-x), (x, 0, oo)) 113 | 1 114 | 115 | As with indefinite integrals, you can pass multiple limit tuples to perform a 116 | multiple integral. For example, to compute 117 | 118 | .. math:: 119 | 120 | \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} e^{- x^{2} - y^{2}}\, dx\, dy, 121 | 122 | do 123 | 124 | >>> integrate(exp(-x**2 - y**2), (x, -oo, oo), (y, -oo, oo)) 125 | π 126 | 127 | If ``integrate`` is unable to compute an integral, it returns an unevaluated 128 | ``Integral`` object. 129 | 130 | >>> expr = integrate(exp(exp(x)), x) 131 | >>> print expr 132 | Integral(exp(exp(x)), x) 133 | >>> expr 134 | ⌠ 135 | ⎮ ⎛ x⎞ 136 | ⎮ ⎝ℯ ⎠ 137 | ⎮ ℯ dx 138 | ⌡ 139 | 140 | As with ``Derivative``, you can create an unevaluated integral using 141 | ``Integral``. To later evaluate this integral, call ``doit``. 142 | 143 | >>> expr = Integral(log(x)**2, x) 144 | >>> expr 145 | ⌠ 146 | ⎮ 2 147 | ⎮ log (x) dx 148 | ⌡ 149 | >>> expr.doit() 150 | 2 151 | x⋅log (x) - 2⋅x⋅log(x) + 2⋅x 152 | 153 | ``integrate`` uses powerful algorithms that are always improving to compute 154 | both definite and indefinite integrals, including heuristic pattern matching 155 | type algorithms, a partial implementation of the `Risch algorithm 156 | `_, and an algorithm using 157 | `Meijer G-functions `_ that is 158 | useful for computing integrals in terms of special functions, especially 159 | definite integrals. Here is a sampling of some of the power of ``integrate``. 160 | 161 | >>> integ = Integral((x**4 + x**2*exp(x) - x**2 - 2*x*exp(x) - 2*x - 162 | ... exp(x))*exp(x)/((x - 1)**2*(x + 1)**2*(exp(x) + 1)), x) 163 | >>> integ 164 | ⌠ 165 | ⎮ ⎛ 4 2 x 2 x x⎞ x 166 | ⎮ ⎝x + x ⋅ℯ - x - 2⋅x⋅ℯ - 2⋅x - ℯ ⎠⋅ℯ 167 | ⎮ ──────────────────────────────────────── dx 168 | ⎮ 2 2 ⎛ x ⎞ 169 | ⎮ (x - 1) ⋅(x + 1) ⋅⎝ℯ + 1⎠ 170 | ⌡ 171 | >>> integ.doit() 172 | 2 ⎛ x ⎞ x ⎛ x ⎞ 173 | x ⋅log⎝ℯ + 1⎠ ℯ log⎝ℯ + 1⎠ 174 | ────────────── + ────── - ─────────── 175 | 2 2 2 176 | x - 1 x - 1 x - 1 177 | 178 | >>> integ = Integral(sin(x**2), x) 179 | >>> integ 180 | ⌠ 181 | ⎮ ⎛ 2⎞ 182 | ⎮ sin⎝x ⎠ dx 183 | ⌡ 184 | >>> integ.doit() 185 | ⎛ ___ ⎞ 186 | ___ ___ ⎜╲╱ 2 ⋅x⎟ 187 | 3⋅╲╱ 2 ⋅╲╱ π ⋅fresnels⎜───────⎟⋅Γ(3/4) 188 | ⎜ ___ ⎟ 189 | ⎝ ╲╱ π ⎠ 190 | ────────────────────────────────────── 191 | 8⋅Γ(7/4) 192 | 193 | 194 | >>> integ = Integral(x**y*exp(-x), (x, 0, oo)) 195 | >>> integ 196 | ∞ 197 | ⌠ 198 | ⎮ y -x 199 | ⎮ x ⋅ℯ dx 200 | ⌡ 201 | 0 202 | >>> integ.doit() 203 | ⎧ Γ(y + 1) for -re(y) < 1 204 | ⎪ 205 | ⎪∞ 206 | ⎪⌠ 207 | ⎨⎮ y -x 208 | ⎪⎮ x ⋅ℯ dx otherwise 209 | ⎪⌡ 210 | ⎪0 211 | ⎩ 212 | 213 | This last example returned a ``Piecewise`` expression because the integral 214 | does not converge unless `\Re(y) > 1.` 215 | 216 | Limits 217 | ====== 218 | 219 | SymPy can compute symbolic limits with the ``limit`` function. The syntax to compute 220 | 221 | .. math:: 222 | 223 | \lim_{x\to x_0} f(x) 224 | 225 | is ``limit(f(x), x, x0)``. 226 | 227 | >>> limit(sin(x)/x, x, 0) 228 | 1 229 | 230 | ``limit`` should be used instead of ``subs`` whenever the point of evaluation 231 | is a singularity. Even though SymPy has objects to represent `\infty`, using 232 | them for evaluation is not reliable because they do not keep track of things 233 | like rate of growth. Also, things like `\infty - \infty` and 234 | `\frac{\infty}{\infty}` return `\mathrm{nan}` (not-a-number). For example 235 | 236 | >>> expr = x**2/exp(x) 237 | >>> expr.subs(x, oo) 238 | nan 239 | >>> limit(expr, x, oo) 240 | 0 241 | 242 | Like ``Derivative`` and ``Integral``, ``limit`` has an unevaluated 243 | counterpart, ``Limit``. To evaluate it, use ``doit``. 244 | 245 | >>> expr = Limit((cos(x) - 1)/x, x, 0) 246 | >>> expr 247 | cos(x) - 1 248 | lim ────────── 249 | x->0 x 250 | >>> expr.doit() 251 | 0 252 | 253 | To evaluate a limit at one side only, pass ``'+'`` or ``'-'`` as a third 254 | argument to ``limit``. For example, to compute 255 | 256 | .. math:: 257 | 258 | \lim_{x\to 0^+}\frac{1}{x}, 259 | 260 | do 261 | 262 | >>> limit(1/x, x, 0, '+') 263 | ∞ 264 | 265 | As opposed to 266 | 267 | >>> limit(1/x, x, 0, '-') 268 | -∞ 269 | 270 | Series Expansion 271 | ================ 272 | 273 | SymPy can compute asymptotic series expansions of functions around a point. To 274 | compute the expansion of `f(x)` around the point `x = x_0` terms of order 275 | `x^n`, use ``f(x).series(x, x0, n)``. ``x0`` and ``n`` can be omitted, in 276 | which case the defaults ``x0=0`` and ``n=6`` will be used. 277 | 278 | >>> expr = exp(sin(x)) 279 | >>> expr.series(x, 0, 4) 280 | 2 281 | x ⎛ 4⎞ 282 | 1 + x + ── + O⎝x ⎠ 283 | 2 284 | 285 | The `O\left (x^4\right )` term at the end represents the Landau order term at 286 | `x=0` (not to be confused with big O notation used in computer science, which 287 | generally represents the Landau order term at `x=\infty`). It means that all 288 | x terms with power greater than or equal to `x^4` are omitted. Order terms 289 | can be created and manipulated outside of ``series``. They automatically 290 | absorb higher order terms. 291 | 292 | >>> x + x**3 + x**6 + O(x**4) 293 | 3 ⎛ 4⎞ 294 | x + x + O⎝x ⎠ 295 | >>> x*O(1) 296 | O(x) 297 | 298 | If you do not want the order term, use the ``removeO`` method. 299 | 300 | >>> expr.series(x, 0, 4).removeO() 301 | 2 302 | x 303 | ── + x + 1 304 | 2 305 | 306 | Currently, ``O`` only supports orders at 0, so series expansions at points 307 | other than 0 are computed by first shifting to 0 and then shifting back. 308 | 309 | >>> exp(x - 6).series(x, 6) 310 | 2 3 4 5 311 | x x x x ⎛ 6⎞ 312 | 1 + x + ── + ── + ── + ─── + O⎝x ⎠ 313 | 2 6 24 120 314 | 315 | This means that if you compute the series expansion at a point other than 0, 316 | the result will be shifted to 0. You can easily shift it back with ``subs``. 317 | 318 | >>> exp(x - 6).series(x, 6).removeO().subs(x, x - 6) 319 | 5 4 3 2 320 | (x - 6) (x - 6) (x - 6) (x - 6) 321 | x + ──────── + ──────── + ──────── + ──────── - 5 322 | 120 24 6 2 323 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/tutorial/index.rst: -------------------------------------------------------------------------------- 1 | .. _tutorial: 2 | 3 | ================ 4 | SymPy Tutorial 5 | ================ 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | 10 | preliminaries.rst 11 | intro.rst 12 | printing.rst 13 | gotchas.rst 14 | basic_operations.rst 15 | simplification.rst 16 | calculus.rst 17 | solvers.rst 18 | matrices.rst 19 | manipulation.rst 20 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/tutorial/intro.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | Introduction 3 | ============== 4 | 5 | What is Symbolic Computation? 6 | ============================= 7 | 8 | Symbolic computation deals with the computation of mathematical objects 9 | symbolically. This means that the mathematical objects are represented 10 | exactly, not approximately, and mathematical expressions with unevaluated 11 | variables are left in symbolic form. 12 | 13 | Let's take an example. Say we wanted to use the built-in Python functions to 14 | compute square roots. We might do something like this 15 | 16 | >>> import math 17 | >>> math.sqrt(9) 18 | 3.0 19 | 20 | 9 is a perfect square, so we got the exact answer, 3. But suppose we computed 21 | the square root of a number that isn't a perfect square 22 | 23 | >>> math.sqrt(8) 24 | 2.82842712475 25 | 26 | Here we got an approximate result. 2.82842712475 is not the exact square root 27 | of 8 (indeed, the actual square root of 8 cannot be represented by a finite 28 | decimal, since it is an irrational number). If all we cared about was the 29 | decimal form of the square root of 8, we would be done. 30 | 31 | But suppose we want to go further. Recall that `\sqrt{8} = \sqrt{4\cdot 2} = 32 | 2\sqrt{2}`. We would have a hard time deducing this from the above result. 33 | This is where symbolic computation comes in. With a symbolic computation 34 | system like SymPy, square roots of numbers that are not perfect squares are 35 | left unevaluated by default 36 | 37 | >>> import sympy 38 | >>> sympy.sqrt(3) 39 | sqrt(3) 40 | 41 | Furthermore---and this is where we start to see the real power of symbolic 42 | computation---symbolic results can be symbolically simplified. 43 | 44 | >>> sympy.sqrt(8) 45 | 2*sqrt(2) 46 | 47 | A More Interesting Example 48 | ========================== 49 | 50 | The above example starts to show how we can manipulate irrational numbers 51 | exactly using SymPy. But it is much more powerful than that. Symbolic 52 | computation systems (which by the way, are also often called computer algebra 53 | systems, or just CASs) such as SymPy are capable of computing symbolic 54 | expressions with variables. 55 | 56 | As we will see later, in SymPy, variables are defined using ``symbols``. 57 | Unlike many symbolic manipulation systems, variables in SymPy must be defined 58 | before they are used (the reason for this will be discussed in the :ref:`next 59 | section `). 60 | 61 | Let us define a symbolic expression, representing the mathematical expression 62 | `x + 2y`. 63 | 64 | >>> from sympy import symbols 65 | >>> x, y = symbols('x y') 66 | >>> expr = x + 2*y 67 | >>> expr 68 | x + 2*y 69 | 70 | Note that we wrote ``x + 2*y`` just as we would if ``x`` and ``y`` were 71 | ordinary Python variables. But in this case, instead of evaluating to 72 | something, the expression remains as just ``x + 2*y``. Now let us play around 73 | with it: 74 | 75 | >>> expr + 1 76 | x + 2*y + 1 77 | >>> expr - x 78 | 2*y 79 | 80 | Notice something in the above example. When we typed ``expr - x``, we did not 81 | get ``x + 2*y - x``, but rather just ``2*y``. The ``x`` and the ``-x`` 82 | automatically canceled one another. This is similar to how ``sqrt(8)`` 83 | automatically turned into ``2*sqrt(2)`` above. This isn't always the case in 84 | SymPy, however: 85 | 86 | >>> x*expr 87 | x*(x + 2*y) 88 | 89 | Here, we might have expected `x(x + 2y)` to transform into `x^2 + 2xy`, but 90 | instead we see that the expression was left alone. This is a common theme in 91 | SymPy. Aside from obvious simplifications like `x - x = 0` and `\sqrt{8} = 92 | 2\sqrt{2}`, most simplifications are not performed automatically. This is 93 | because we might prefer the factored form `x(x + 2y)`, or we might prefer the 94 | expanded form `x^2 + 2xy`. Both forms are useful in different circumstances. 95 | In SymPy, there are functions to go from one form to the other 96 | 97 | >>> from sympy import expand, factor 98 | >>> expanded_expr = expand(x*expr) 99 | >>> expanded_expr 100 | x**2 + 2*x*y 101 | >>> factor(expanded_expr) 102 | x*(x + 2*y) 103 | 104 | The Power of Symbolic Computation 105 | ================================= 106 | 107 | The real power of a symbolic computation system such as SymPy is the ability 108 | to do all sorts of computations symbolically. SymPy can compute derivatives, 109 | integrals, and limits, solve equations, work with matrices, and much, much 110 | more, and do it all symbolically. It includes modules for plotting, printing 111 | (like 2D pretty printed output of math formulas, or `\LaTeX`), code 112 | generation, physics, statistics, combinatorics, number theory, geometry, 113 | logic, and more. Here is a small sampling of the sort of symbolic power SymPy 114 | is capable of, to whet your appetite. 115 | 116 | >>> from sympy import * 117 | >>> x, t, z, nu = symbols('x t z nu') 118 | 119 | - This will make all further example pretty print with unicode characters. 120 | 121 | >>> init_printing(use_unicode=True) 122 | 123 | - Take the derivative of `\sin{(x)}e^x`. 124 | 125 | >>> diff(sin(x)*exp(x), x) 126 | x x 127 | ℯ ⋅sin(x) + ℯ ⋅cos(x) 128 | 129 | - Compute `\int(e^x\sin{(x)} + e^x\cos{(x)})\,dx`. 130 | 131 | >>> integrate(exp(x)*sin(x) + exp(x)*cos(x), x) 132 | x 133 | ℯ ⋅sin(x) 134 | 135 | - Compute `\int_{-\infty}^\infty \sin{(x^2)}\,dx`. 136 | 137 | >>> integrate(sin(x**2), (x, -oo, oo)) 138 | ___ ___ 139 | ╲╱ 2 ⋅╲╱ π 140 | ─────────── 141 | 2 142 | 143 | - Find :math:`\lim_{x\to 0}\frac{\sin{(x)}}{x}`. 144 | 145 | >>> limit(sin(x)/x, x, 0) 146 | 1 147 | 148 | - Solve `x^2 - 2 = 0`. 149 | 150 | >>> solve(x**2 - 2, x) 151 | ⎡ ___ ___⎤ 152 | ⎣-╲╱ 2 , ╲╱ 2 ⎦ 153 | 154 | - Solve the differential equation `y'' - y = e^t`. 155 | 156 | >>> y = Function('y') 157 | >>> dsolve(Eq(y(t).diff(t, t) - y(t), exp(t)), y(t)) 158 | -t ⎛ t⎞ t 159 | y(t) = C₂⋅ℯ + ⎜C₁ + ─⎟⋅ℯ 160 | ⎝ 2⎠ 161 | 162 | - Find the eigenvalues of `\left[\begin{smallmatrix}1 & 2\\2 & 163 | 2\end{smallmatrix}\right]`. 164 | 165 | >>> Matrix([[1, 2], [2, 2]]).eigenvals() 166 | ⎧ ____ ____ ⎫ 167 | ⎪3 ╲╱ 17 ╲╱ 17 3 ⎪ 168 | ⎨─ + ──────: 1, - ────── + ─: 1⎬ 169 | ⎪2 2 2 2 ⎪ 170 | ⎩ ⎭ 171 | 172 | - Rewrite the Bessel function `J_{\nu}\left(z\right)` in terms of the 173 | spherical Bessel function `j_\nu(z)`. 174 | 175 | >>> besselj(nu, z).rewrite(jn) 176 | ___ ___ 177 | ╲╱ 2 ⋅╲╱ z ⋅jn(ν - 1/2, z) 178 | ────────────────────────── 179 | ___ 180 | ╲╱ π 181 | 182 | - Print `\int_{0}^{\pi} \cos^{2}{\left (x \right )}\, dx` using `\LaTeX`. 183 | 184 | >>> latex(Integral(cos(x)**2, (x, 0, pi))) 185 | \int_{0}^{\pi} \cos^{2}{\left (x \right )}\, dx 186 | 187 | Why SymPy? 188 | ========== 189 | 190 | There are many computer algebra systems out there. `This 191 | `_ Wikipedia 192 | article lists many of them. What makes SymPy a better choice than the 193 | alternatives? 194 | 195 | First off, SymPy is completely free. It is open source, and licensed under the 196 | liberal BSD license, so you can even modify the source code and sell if you 197 | want to. This contrasts with popular commercial systems like Maple or 198 | Mathematica that cost hundreds of dollars in licenses. 199 | 200 | Second, SymPy uses Python. Most computer algebra systems invent their own 201 | language. Not SymPy. SymPy is written entirely in Python, and is executed 202 | entirely in Python. This means that if you already know Python, it is much 203 | easier to get started with SymPy, because you already know the syntax (and if 204 | you don't know Python, it is really easy to learn). Plus, we already know 205 | that Python is a well-designed, battle-tested language. The SymPy developers 206 | are confident in their abilities in writing mathematical software, but 207 | inventing a whole new programming language is a completely different thing. 208 | By reusing an existing language, we are able to focus on those things that 209 | matter, the mathematics. 210 | 211 | Another computer algebra system, Sage also uses Python as its language. But 212 | Sage is large, with a download of over a gigabyte. An advantage of SymPy is 213 | that it is lightweight. In addition to being relatively small, it has no 214 | dependencies other than Python, so it can be used almost anywhere easily. 215 | Furthermore, the goals of Sage and the goals of SymPy are different. Sage 216 | aims to be a full featured system for mathematics, and aims to do so by 217 | compiling all the major open source mathematical systems together into 218 | one. When you call some function in Sage, such as ``integrate``, it calls out 219 | to one of the open source packages that it includes. In fact, SymPy is 220 | included in Sage. SymPy on the other hand aims to be an independent system, 221 | with all the features implemented in SymPy itself. 222 | 223 | A final important feature of SymPy is that it can be used as a library. Many 224 | computer algebra systems focus on being usable in interactive environments, but 225 | if you wish to automate or extend them, it is difficult to do. With SymPy, 226 | you can just as easily use it in an interactive Python environment or import 227 | it in your own Python application. SymPy also provides APIs to make it easy 228 | to extend it with your own custom functions. 229 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/tutorial/preliminaries.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | Preliminaries 3 | =============== 4 | 5 | This tutorial assumes that the reader already knows the basics of the Python programming 6 | language. If you do not, the `official Python 7 | tutorial `_ is excellent. 8 | 9 | This tutorial assumes a decent mathematical background. Most examples require 10 | knowledge up to calculus level, and some require knowledge at a calculus 11 | level. Some of the advanced features require more than this. If you come 12 | across a section that uses some mathematical function you are not familiar 13 | with, you can probably skip over it, or replace it with a similar one that you 14 | are more familiar with. Or look up the function on Wikipedia and learn 15 | something new. Some important mathematical concepts that are not common 16 | knowledge will be introduced as necessary. 17 | 18 | Installation 19 | ============ 20 | 21 | .. sidebar:: Quick Tip 22 | 23 | You do not need to install SymPy to try it. You can use the online shell 24 | at http://live.sympy.org, or the shell at the bottom right of this 25 | documentation page. 26 | 27 | You will need to install SymPy first. See the :ref:`installation guide 28 | `. 29 | 30 | Alternately, you can just use the SymPy Live Sphinx extension to run the code 31 | blocks in the browser. For example, click on the green "Run code block in 32 | SymPy Live" button below 33 | 34 | >>> from sympy import * 35 | >>> x = symbols('x') 36 | >>> a = Integral(cos(x)*exp(x), x) 37 | >>> Eq(a, a.doit()) 38 | Integral(exp(x)*cos(x), x) == exp(x)*sin(x)/2 + exp(x)*cos(x)/2 39 | 40 | The SymPy Live shell in the bottom corner will pop up and evaluate the code 41 | block. You can also click any individual line to evaluate it one at a time. 42 | 43 | The SymPy Live shell is a fully interactive Python shell. You can type any 44 | expression in the input box to evaluate it. Feel free to use it throughout 45 | the tutorial to experiment. 46 | 47 | To show or hide the SymPy Live shell at any time, just click the green button 48 | on the bottom right of the screen. 49 | 50 | By default, the SymPy Live shell uses `\LaTeX` for output. If you want the 51 | output to look more like the output in the documentation, change the 52 | output format to ``Str`` or ``Unicode``. 53 | 54 | If you wish to modify an example before evaluating it, change the evaluation 55 | mode to "copy" in the SymPy Live settings. This will cause clicking on an 56 | example to copy the example to the SymPy Live shell, but not evaluate it, 57 | allowing you to change it before execution. You can also use the up/down 58 | arrow keys on your keyboard in the input box to move through the shell 59 | history. 60 | 61 | The SymPy Live shell is also available at http://live.sympy.org, with extra 62 | features, like a mobile phone enhanced version and saved history. 63 | 64 | About This Tutorial 65 | =================== 66 | 67 | This tutorial aims to give an introduction to SymPy for someone who has not 68 | used the library before. Many features of SymPy will be introduced in this 69 | tutorial, but they will not be exhaustive. In fact, virtually every 70 | functionality shown in this tutorial will have more options or capabilities 71 | than what will be shown. The rest of the SymPy documentation serves as API 72 | documentation, which extensively lists every feature and option of each 73 | function. 74 | 75 | These are the goals of this tutorial: 76 | 77 | .. NB: This is mainly here for you, the person who is editing and adding to 78 | this tutorial. Try to keep these principles in mind. 79 | 80 | - To give a guide, suitable for someone who has never used SymPy (but who has 81 | used Python and knows the necessary mathematics). 82 | 83 | - To be written in a narrative format, which is both easy and fun to follow. 84 | It should read like a book. 85 | 86 | - To give insightful examples and exercises, to help the reader learn and to 87 | make it entertaining to work through. 88 | 89 | - To introduce concepts in a logical order. 90 | 91 | .. In other words, don't try to get ahead of yourself. 92 | 93 | - To use good practices and idioms, and avoid antipatterns. Functions or 94 | methodologies that tend to lead to antipatterns are avoided. Features that 95 | are only useful to advanced users are not shown. 96 | 97 | - To be consistent. If there are multiple ways to do it, only the best way is 98 | shown. 99 | 100 | .. For example, there are at least five different ways to create Symbols. 101 | ``symbols`` is the only one that is general and doesn't lead to 102 | antipatterns, so it is the only one used. 103 | 104 | - To avoid unnecessary duplication, it is assumed that previous sections of 105 | the tutorial have already been read. 106 | 107 | Feedback on this tutorial, or on SymPy in general is always welcome. Just 108 | write to our `mailing list 109 | `_. 110 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/tutorial/printing.rst: -------------------------------------------------------------------------------- 1 | .. _tutorial-printing: 2 | 3 | ========== 4 | Printing 5 | ========== 6 | 7 | As we have already seen, SymPy can pretty print its output using Unicode 8 | characters. This is a short introduction to the most common printing options 9 | available in SymPy. 10 | 11 | Printers 12 | ======== 13 | 14 | There are several printers available in SymPy. The most common ones are 15 | 16 | - str 17 | - repr 18 | - ASCII pretty printer 19 | - Unicode pretty printer 20 | - LaTeX 21 | - MathML 22 | - Dot 23 | 24 | In addition to these, there are also "printers" that can output SymPy objects 25 | to code, such as C, Fortran, Javascript, Theano, and Python. These are not 26 | discussed in this tutorial. 27 | 28 | Setting up Pretty Printing 29 | ========================== 30 | 31 | If all you want is the best pretty printing, use the ``init_printing`` 32 | function. This will automatically enable the best printer available in your 33 | environment. 34 | 35 | >>> from sympy import init_printing 36 | >>> init_printing() # doctest: +SKIP 37 | 38 | .. sidebar:: Quick Tip 39 | 40 | You an also change the printer used in SymPy Live. Just change the "Output 41 | Format" in the settings. 42 | 43 | If you plan to work in an interactive calculator-type session, the 44 | ``init_session`` function will automatically import everything in SymPy, 45 | create some common Symbols, setup plotting, and run ``init_printing``. 46 | 47 | >>> from sympy import init_session 48 | >>> init_session() # doctest: +SKIP 49 | 50 | :: 51 | 52 | Python console for SymPy 0.7.2-git (Python 2.7.5-64-bit) (ground types: gmpy) 53 | 54 | These commands were executed: 55 | >>> from __future__ import division 56 | >>> from sympy import * 57 | >>> x, y, z, t = symbols('x y z t') 58 | >>> k, m, n = symbols('k m n', integer=True) 59 | >>> f, g, h = symbols('f g h', cls=Function) 60 | 61 | Documentation can be found at http://www.sympy.org 62 | 63 | >>> 64 | 65 | In any case, this is what will happen: 66 | 67 | - In the IPython QTConsole, if `\LaTeX` is installed, it will enable a printer 68 | that uses `\LaTeX`. 69 | 70 | .. image:: ../pics/ipythonqtconsole.png 71 | :height: 500 72 | 73 | If `\LaTeX` is not installed, but Matplotlib is installed, it will use the 74 | Matplotlib rendering engine. If Matplotlib is not installed, it uses the 75 | Unicode pretty printer. 76 | 77 | - In the IPython notebook, it will use MathJax to render `\LaTeX`. 78 | 79 | .. image:: ../pics/ipythonnotebook.png 80 | :height: 250 81 | 82 | - In an IPython console session, or a regular Python session, it will use the 83 | Unicode pretty printer if the terminal supports Unicode. 84 | 85 | .. image:: ../pics/consoleunicode.png 86 | :width: 700 87 | 88 | - In a terminal that does not support Unicode, the ASCII pretty printer is 89 | used. 90 | 91 | .. image:: ../pics/consoleascii.png 92 | :width: 700 93 | 94 | To explicitly not use `\LaTeX`, pass ``use_latex=False`` to ``init_printing`` 95 | or ``init_session``. To explicitly not use Unicode, pass 96 | ``use_unicode=False``. 97 | 98 | 99 | Printing Functions 100 | ================== 101 | 102 | In addition to automatic printing, you can explicitly use any one of the 103 | printers by calling the appropriate function. 104 | 105 | str 106 | --- 107 | 108 | To get a string form of an expression, use ``str(expr)``. This is also the 109 | form that is produced by ``print expr``. String forms are designed to be easy 110 | to read, but in a form that is correct Python syntax so that it can be copied 111 | and pasted. The ``str`` form of an expression will usually look exactly the 112 | same as the expression as you would enter it. 113 | 114 | >>> from sympy import * 115 | >>> x, y, z = symbols('x y z') 116 | >>> str(Integral(sqrt(1/x), x)) 117 | 'Integral(sqrt(1/x), x)' 118 | >>> print Integral(sqrt(1/x), x) 119 | Integral(sqrt(1/x), x) 120 | 121 | repr 122 | ---- 123 | 124 | The repr form of an expression is designed to show the exact form of an 125 | expression. It will be discussed more in the :ref:`tutorial-manipulation` 126 | section. To get it, use ``srepr`` [#srepr-fn]_. 127 | 128 | >>> srepr(Integral(sqrt(1/x), x)) 129 | "Integral(Pow(Pow(Symbol('x'), Integer(-1)), Rational(1, 2)), Tuple(Symbol('x')))" 130 | 131 | The repr form is mostly useful for understanding how an expression is built 132 | internally. 133 | 134 | 135 | ASCII Pretty Printer 136 | -------------------- 137 | 138 | The ASCII pretty printer is accessed from ``pprint``. If the terminal does 139 | not support Unicode, the ASCII printer is used by default. Otherwise, you 140 | must pass ``use_unicode=False``. 141 | 142 | >>> pprint(Integral(sqrt(1/x), x), use_unicode=False) 143 | / 144 | | 145 | | ___ 146 | | / 1 147 | | / - dx 148 | | \/ x 149 | | 150 | / 151 | 152 | ``pprint`` prints the output to the screen. If you want the string form, use 153 | ``pretty``. 154 | 155 | >>> pretty(Integral(sqrt(1/x), x), use_unicode=False) 156 | ' / \n | \n | ___ \n | / 1 \n | / - dx\n | \\/ x \n | \n/ ' 157 | >>> print pretty(Integral(sqrt(1/x), x), use_unicode=False) 158 | / 159 | | 160 | | ___ 161 | | / 1 162 | | / - dx 163 | | \/ x 164 | | 165 | / 166 | 167 | Unicode Pretty Printer 168 | ---------------------- 169 | 170 | The Unicode pretty printer is also accessed from ``print``. It the terminal 171 | supports Unicode, it is used automatically. It ``pprint`` is not able to 172 | detect that the terminal supports unicode, you can pass ``use_unicode=True``. 173 | 174 | >>> pprint(Integral(sqrt(1/x), x), use_unicode=True) 175 | ⌠ 176 | ⎮ ___ 177 | ⎮ ╱ 1 178 | ⎮ ╱ ─ dx 179 | ⎮ ╲╱ x 180 | ⌡ 181 | 182 | `\LaTeX` 183 | -------- 184 | 185 | To get the `\LaTeX` form of an expression, use ``latex``. 186 | 187 | >>> print latex(Integral(sqrt(1/x), x)) 188 | \int \sqrt{\frac{1}{x}}\, dx 189 | 190 | The ``latex`` function has many options to change the formatting of different 191 | things. See :py:meth:`its documentation ` for 192 | more details. 193 | 194 | MathML 195 | ------ 196 | 197 | There is also a printer to MathML, called ``print_mathml``. It must be imported 198 | from ``sympy.printing.mathml``. 199 | 200 | >>> from sympy.printing.mathml import print_mathml 201 | >>> print_mathml(Integral(sqrt(1/x), x)) 202 | 203 | 204 | 205 | x 206 | 207 | 208 | 209 | 210 | 211 | x 212 | -1 213 | 214 | 215 | 216 | 217 | ``print_mathml`` prints the output. If you want the string, use the function 218 | ``mathml``. 219 | 220 | Dot 221 | --- 222 | 223 | The ``dotprint`` function in ``sympy.printing.dot`` prints output to dot 224 | format, which can be rendered with Graphviz. See the 225 | :ref:`tutorial-manipulation` section for some examples of the output of this 226 | printer. 227 | 228 | .. rubric:: Footnotes 229 | 230 | .. [#srepr-fn] SymPy does not use the Python builtin ``repr`` function for 231 | repr printing, because in Python ``str(list)`` calls ``repr`` on the 232 | elements of the list, and some SymPy functions return lists (such as 233 | ``solve``). Since ``srepr`` is so verbose, it is unlikely that anyone 234 | would want it called by default on the output of ``solve``. 235 | -------------------------------------------------------------------------------- /tutorial_sphinx/src/tutorial/solvers.rst: -------------------------------------------------------------------------------- 1 | ========= 2 | Solvers 3 | ========= 4 | 5 | >>> from sympy import * 6 | >>> x, y, z = symbols('x y z') 7 | >>> init_printing(use_unicode=True) 8 | 9 | A Note about Equations 10 | ====================== 11 | 12 | Recall from the :ref:`gotchas ` section of this 13 | tutorial that symbolic equations in SymPy are not represented by ``=`` or 14 | ``==``, but by ``Eq``. 15 | 16 | 17 | >>> Eq(x, y) 18 | x = y 19 | 20 | 21 | However, there is an even easier way. In SymPy, any expression is not in an 22 | ``Eq`` is automatically assumed to equal 0 by the solving functions. Since `a 23 | = b` if and only if `a - b = 0`, this means that instead of using ``x == y``, 24 | you can just use ``x - y``. For example 25 | 26 | >>> solve(Eq(x**2, 1), x) 27 | [-1, 1] 28 | >>> solve(Eq(x**2 - 1, 0), x) 29 | [-1, 1] 30 | >>> solve(x**2 - 1, x) 31 | [-1, 1] 32 | 33 | This is particularly useful if the equation you wish to solve is already equal 34 | to 0. Instead of typing ``solve(Eq(expr, 0), x)``, you can just use 35 | ``solve(expr, x)``. 36 | 37 | Solving Equations Algebraically 38 | =============================== 39 | 40 | The main function for solving algebraic equations, as we saw above, is 41 | ``solve``. The syntax is ``solve(equations, variables)``, where, as we saw 42 | above, ``equations`` may be in the form of ``Eq`` instances or expressions 43 | that are assumed to be equal to zero. 44 | 45 | .. TODO: This is a mess, because solve() has such a complicated interface. 46 | 47 | When solving a single equation, the output of ``solve`` is a list of the 48 | solutions. 49 | 50 | >>> solve(x**2 - x, x) 51 | [0, 1] 52 | 53 | If no solutions are found, an empty list is returned, or 54 | ``NotImplementedError`` is raised. 55 | 56 | >>> solve(exp(x), x) 57 | [] 58 | 59 | .. note:: 60 | 61 | If ``solve`` returns ``[]`` or raises ``NotImplementedError``, it doesn't 62 | mean that the equation has no solutions. It just means that it couldn't 63 | find any. Often this means that the solutions cannot be represented 64 | symbolically. For example, the equation `x = \cos(x)` has a solution, but 65 | it cannot be represented symbolically using standard functions. 66 | 67 | >>> solve(x - cos(x), x) 68 | Traceback (most recent call last): 69 | ... 70 | NotImplementedError: multiple generators [x, exp(I*x)] 71 | No algorithms are implemented to solve equation exp(I*x) 72 | 73 | In fact, ``solve`` makes *no guarantees whatsoever* about the completeness 74 | of the solutions it finds. Much of ``solve`` is heuristics, which may find 75 | some solutions to an equation or system of equations, but not all of them. 76 | 77 | ``solve`` can also solve systems of equations. Pass a list of equations and a 78 | list of variables to solve for. 79 | 80 | >>> solve([x - y + 2, x + y - 3], [x, y]) 81 | {x: 1/2, y: 5/2} 82 | >>> solve([x*y - 7, x + y - 6], [x, y]) 83 | ⎡⎛ ___ ___ ⎞ ⎛ ___ ___ ⎞⎤ 84 | ⎣⎝- ╲╱ 2 + 3, ╲╱ 2 + 3⎠, ⎝╲╱ 2 + 3, - ╲╱ 2 + 3⎠⎦ 85 | 86 | .. note:: 87 | 88 | The type of the output of ``solve`` when solving systems of equations 89 | varies depending on the type of the input. If you want a consistent 90 | interface, pass ``dict=True``. 91 | 92 | >>> solve([x - y + 2, x + y - 3], [x, y], dict=True) 93 | [{x: 1/2, y: 5/2}] 94 | >>> solve([x*y - 7, x + y - 6], [x, y], dict=True) 95 | ⎡⎧ ___ ___ ⎫ ⎧ ___ ___ ⎫⎤ 96 | ⎢⎨x: - ╲╱ 2 + 3, y: ╲╱ 2 + 3⎬, ⎨x: ╲╱ 2 + 3, y: - ╲╱ 2 + 3⎬⎥ 97 | ⎣⎩ ⎭ ⎩ ⎭⎦ 98 | 99 | .. _tutorial-roots: 100 | 101 | ``solve`` reports each solution only once. To get the solutions of a 102 | polynomial including multiplicity use ``roots``. 103 | 104 | >>> solve(x**3 - 6*x**2 + 9*x, x) 105 | [0, 3] 106 | >>> roots(x**3 - 6*x**2 + 9*x, x) 107 | {0: 1, 3: 2} 108 | 109 | The output ``{0: 1, 3: 2}`` of ``roots`` means that ``0`` is a root of 110 | multiplicity 1 and ``3`` is a root of multiplicity 2. 111 | 112 | .. _tutorial-dsolve: 113 | 114 | Solving Differential Equations 115 | ============================== 116 | 117 | To solve differential equations, use ``dsolve``. First, create an undefined 118 | function by passing ``cls=Function`` to the ``symbols`` function. 119 | 120 | 121 | >>> f, g = symbols('f g', cls=Function) 122 | 123 | ``f`` and ``g`` are now undefined functions. We can call ``f(x)``, and it 124 | will represent an unknown function. 125 | 126 | >>> f(x) 127 | f(x) 128 | 129 | Derivatives of ``f(x)`` are unevaluated. 130 | 131 | >>> f(x).diff(x) 132 | d 133 | ──(f(x)) 134 | dx 135 | 136 | (see the :ref:`Derivatives ` section for more on 137 | derivatives). 138 | 139 | To represent the differential equation `f''(x) - 2f'(x) + f(x) = \sin(x)`, we 140 | would thus use 141 | 142 | >>> diffeq = Eq(f(x).diff(x, x) - 2*f(x).diff(x) + f(x), sin(x)) 143 | >>> diffeq 144 | 2 145 | d d 146 | f(x) - 2⋅──(f(x)) + ───(f(x)) = sin(x) 147 | dx 2 148 | dx 149 | 150 | To solve the ODE, pass it and the function to solve for to ``dsolve``. 151 | 152 | >>> dsolve(diffeq, f(x)) 153 | x cos(x) 154 | f(x) = (C₁ + C₂⋅x)⋅ℯ + ────── 155 | 2 156 | 157 | ``dsolve`` returns an instance of ``Eq``. This is because in general, 158 | solutions to differential equations cannot be solved explicitly for the 159 | function. 160 | 161 | >>> dsolve(f(x).diff(x)*(1 - sin(f(x))), f(x)) 162 | f(x) + cos(f(x)) = C₁ 163 | 164 | The arbitrary constants in the solutions from dsolve are symbols of the form 165 | ``C1``, ``C2``, ``C3``, and so on. 166 | --------------------------------------------------------------------------------