From: <jd...@us...> - 2007-10-30 20:21:42
|
Revision: 4067 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4067&view=rev Author: jdh2358 Date: 2007-10-30 13:21:39 -0700 (Tue, 30 Oct 2007) Log Message: ----------- added solved vs skeletons Makefile build Modified Paths: -------------- trunk/py4science/workbook/convolution.tex trunk/py4science/workbook/fft_imdenoise.tex trunk/py4science/workbook/files_etc.tex trunk/py4science/workbook/glass_dots.tex trunk/py4science/workbook/lotka_volterra.tex trunk/py4science/workbook/qsort.tex trunk/py4science/workbook/quad_newton.tex trunk/py4science/workbook/stats_descriptives.tex trunk/py4science/workbook/stats_distributions.tex trunk/py4science/workbook/trapezoid.tex trunk/py4science/workbook/wallis_pi.tex trunk/py4science/workbook/wordfreqs.tex Added Paths: ----------- trunk/py4science/workbook/Makefile trunk/py4science/workbook/examples_skel/ trunk/py4science/workbook/examples_skel/convolution_demo.py trunk/py4science/workbook/examples_skel/fft_imdenoise.py trunk/py4science/workbook/examples_skel/glass_dots1.py trunk/py4science/workbook/examples_skel/lotka_volterra.py trunk/py4science/workbook/examples_skel/noisy_sine.py trunk/py4science/workbook/examples_skel/qsort.py trunk/py4science/workbook/examples_skel/quad_newton.py trunk/py4science/workbook/examples_skel/stats_descriptives.py trunk/py4science/workbook/examples_skel/stats_distributions.py trunk/py4science/workbook/examples_skel/stock_records.py trunk/py4science/workbook/examples_skel/trapezoid.py trunk/py4science/workbook/examples_skel/wallis_pi.py trunk/py4science/workbook/examples_skel/wordfreqs.py trunk/py4science/workbook/examples_solved Removed Paths: ------------- trunk/py4science/workbook/skel Added: trunk/py4science/workbook/Makefile =================================================================== --- trunk/py4science/workbook/Makefile (rev 0) +++ trunk/py4science/workbook/Makefile 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1,11 @@ +solved: + rm -rf examples + ln -s examples_solved examples + cp main.tex workbook_solved.tex + pdflatex workbook_solved + +skeletons: + rm -rf examples + ln -s examples_skel examples + cp main.tex workbook_skeletons.tex + pdflatex workbook_skeletons Modified: trunk/py4science/workbook/convolution.tex =================================================================== --- trunk/py4science/workbook/convolution.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/convolution.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -87,7 +87,7 @@ multiplication property to perform the same convolution in Fourier space to confirm the numerical result from \texttt{numpy.convolve}. -\lstinputlisting[label=code:convolution_demo,caption={IGNORED}]{skel/convolution_demo_skel.py} +\lstinputlisting[label=code:convolution_demo,caption={IGNORED}]{examples/convolution_demo.py} Added: trunk/py4science/workbook/examples_skel/convolution_demo.py =================================================================== --- trunk/py4science/workbook/examples_skel/convolution_demo.py (rev 0) +++ trunk/py4science/workbook/examples_skel/convolution_demo.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/convolution_demo_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/convolution_demo.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/fft_imdenoise.py =================================================================== --- trunk/py4science/workbook/examples_skel/fft_imdenoise.py (rev 0) +++ trunk/py4science/workbook/examples_skel/fft_imdenoise.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/fft_imdenoise_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/fft_imdenoise.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/glass_dots1.py =================================================================== --- trunk/py4science/workbook/examples_skel/glass_dots1.py (rev 0) +++ trunk/py4science/workbook/examples_skel/glass_dots1.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/glass_dots1_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/glass_dots1.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/lotka_volterra.py =================================================================== --- trunk/py4science/workbook/examples_skel/lotka_volterra.py (rev 0) +++ trunk/py4science/workbook/examples_skel/lotka_volterra.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/lotka_volterra_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/lotka_volterra.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/noisy_sine.py =================================================================== --- trunk/py4science/workbook/examples_skel/noisy_sine.py (rev 0) +++ trunk/py4science/workbook/examples_skel/noisy_sine.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/noisy_sine_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/noisy_sine.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/qsort.py =================================================================== --- trunk/py4science/workbook/examples_skel/qsort.py (rev 0) +++ trunk/py4science/workbook/examples_skel/qsort.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/qsort_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/qsort.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/quad_newton.py =================================================================== --- trunk/py4science/workbook/examples_skel/quad_newton.py (rev 0) +++ trunk/py4science/workbook/examples_skel/quad_newton.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/quad_newton_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/quad_newton.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/stats_descriptives.py =================================================================== --- trunk/py4science/workbook/examples_skel/stats_descriptives.py (rev 0) +++ trunk/py4science/workbook/examples_skel/stats_descriptives.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/stats_descriptives_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/stats_descriptives.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/stats_distributions.py =================================================================== --- trunk/py4science/workbook/examples_skel/stats_distributions.py (rev 0) +++ trunk/py4science/workbook/examples_skel/stats_distributions.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/stats_distributions_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/stats_distributions.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/stock_records.py =================================================================== --- trunk/py4science/workbook/examples_skel/stock_records.py (rev 0) +++ trunk/py4science/workbook/examples_skel/stock_records.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/stock_records_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/stock_records.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/trapezoid.py =================================================================== --- trunk/py4science/workbook/examples_skel/trapezoid.py (rev 0) +++ trunk/py4science/workbook/examples_skel/trapezoid.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/trapezoid_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/trapezoid.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/wallis_pi.py =================================================================== --- trunk/py4science/workbook/examples_skel/wallis_pi.py (rev 0) +++ trunk/py4science/workbook/examples_skel/wallis_pi.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/wallis_pi_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/wallis_pi.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_skel/wordfreqs.py =================================================================== --- trunk/py4science/workbook/examples_skel/wordfreqs.py (rev 0) +++ trunk/py4science/workbook/examples_skel/wordfreqs.py 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../../examples/skel/wordfreqs_skel.py \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_skel/wordfreqs.py ___________________________________________________________________ Name: svn:special + * Added: trunk/py4science/workbook/examples_solved =================================================================== --- trunk/py4science/workbook/examples_solved (rev 0) +++ trunk/py4science/workbook/examples_solved 2007-10-30 20:21:39 UTC (rev 4067) @@ -0,0 +1 @@ +link ../examples \ No newline at end of file Property changes on: trunk/py4science/workbook/examples_solved ___________________________________________________________________ Name: svn:special + * Modified: trunk/py4science/workbook/fft_imdenoise.tex =================================================================== --- trunk/py4science/workbook/fft_imdenoise.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/fft_imdenoise.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -41,7 +41,7 @@ to one. This serves to enhance contrast among the darker elements of the image, so it is not completely dominated by the brighter segments -\lstinputlisting[label=code:fft_imdenoise_skel,caption={IGNORED}]{skel/fft_imdenoise_skel.py} +\lstinputlisting[label=code:fft_imdenoise,caption={IGNORED}]{examples/fft_imdenoise.py} \begin{figure} \begin{centering}\includegraphics[width=4in]{fig/fft_imdenoise}\par\end{centering} Modified: trunk/py4science/workbook/files_etc.tex =================================================================== --- trunk/py4science/workbook/files_etc.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/files_etc.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -44,7 +44,7 @@ Here is the exercise skeleton of the script to create and plot the data file -\lstinputlisting[label=code:noisy_sine_skel,caption={IGNORED}]{skel/noisy_sine_skel.py} +\lstinputlisting[label=code:noisy_sine,caption={IGNORED}]{examples/noisy_sine.py} and the graph will look something like Figure~\ref{fig:noisy_sine} @@ -189,7 +189,7 @@ in 2003 and held to the present) for each stock. Here is the exercise skeleton.: -\lstinputlisting[label=code:stock_records_skel,caption={IGNORED}]{skel/stock_records_skel.py} +\lstinputlisting[label=code:stock_records,caption={IGNORED}]{examples/stock_records.py} The graph will look something like Figure~\ref{fig:stock_records}. Modified: trunk/py4science/workbook/glass_dots.tex =================================================================== --- trunk/py4science/workbook/glass_dots.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/glass_dots.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -38,7 +38,7 @@ \textit{stable node}, if one is greater than one and the other less than one, we have a \textit{saddle node}. -\lstinputlisting[label=code:glass_dots1_skel,caption={IGNORED}]{skel/glass_dots1_skel.py} +\lstinputlisting[label=code:glass_dots1,caption={IGNORED}]{examples/glass_dots1.py} Modified: trunk/py4science/workbook/lotka_volterra.tex =================================================================== --- trunk/py4science/workbook/lotka_volterra.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/lotka_volterra.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -1,7 +1,7 @@ \section{Lotka-Volterra Equations} \label{sec:lotka_volterra} -\lstinputlisting[label=code:lotka_volterra_skel,caption={IGNORED}]{skel/lotka_volterra_skel.py} +\lstinputlisting[label=code:lotka_volterra,caption={IGNORED}]{examples/lotka_volterra.py} \begin{figure} \begin{centering}\includegraphics[width=4in]{fig/lotka_volterra}\par\end{centering} Modified: trunk/py4science/workbook/qsort.tex =================================================================== --- trunk/py4science/workbook/qsort.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/qsort.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -20,11 +20,11 @@ represents the sorting operation, $+$ indicates list concatenation and $[p]$ is the list containing the pivot as its single element. \end{enumerate} -The listing~\ref{code:qsort_skel} contains a skeleton with no implementation +The listing~\ref{code:qsort} contains a skeleton with no implementation but with tests already written (in the form of \emph{unit tests}, as described in the introduction). -\lstinputlisting[label=code:qsort_skel,caption={IGNORED}]{skel/qsort_skel.py} +\lstinputlisting[label=code:qsort,caption={IGNORED}]{examples/qsort.py} \subsection*{Hints} Modified: trunk/py4science/workbook/quad_newton.tex =================================================================== --- trunk/py4science/workbook/quad_newton.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/quad_newton.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -26,9 +26,9 @@ u=\frac{1}{4}.\] -The listing~\ref{code:quad_newton_skel} contains a skeleton that +The listing~\ref{code:quad_newton} contains a skeleton that includes for comparison the correct numerical value. -\lstinputlisting[label=code:quad_newton_skel,caption={IGNORED}]{skel/quad_newton_skel.py} +\lstinputlisting[label=code:quad_newton,caption={IGNORED}]{examples/quad_newton.py} Deleted: trunk/py4science/workbook/skel =================================================================== --- trunk/py4science/workbook/skel 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/skel 2007-10-30 20:21:39 UTC (rev 4067) @@ -1 +0,0 @@ -link ../examples/skel \ No newline at end of file Modified: trunk/py4science/workbook/stats_descriptives.tex =================================================================== --- trunk/py4science/workbook/stats_descriptives.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/stats_descriptives.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -44,7 +44,7 @@ \end{lstlisting} -\lstinputlisting[label=code:stats_descriptives_skel,caption={IGNORED}]{skel/stats_descriptives_skel.py} +\lstinputlisting[label=code:stats_descriptives,caption={IGNORED}]{examples/stats_descriptives.py} \begin{figure} \begin{centering}\includegraphics[width=4in]{fig/stats_descriptives}\par\end{centering} Modified: trunk/py4science/workbook/stats_distributions.tex =================================================================== --- trunk/py4science/workbook/stats_distributions.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/stats_distributions.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -78,7 +78,7 @@ should look something like those in Figure~\ref{fig:stats_distributions}. -\lstinputlisting[label=code:stats_distributions_skel,caption={IGNORED}]{skel/stats_distributions_skel.py} +\lstinputlisting[label=code:stats_distributions,caption={IGNORED}]{examples/stats_distributions.py} \begin{figure} \begin{centering}\includegraphics[width=4in]{fig/stats_distributions}\par\end{centering} Modified: trunk/py4science/workbook/trapezoid.tex =================================================================== --- trunk/py4science/workbook/trapezoid.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/trapezoid.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -36,11 +36,11 @@ \end{figure} -Listing~\ref{code:trapezoid_skel} contains a skeleton for this problem, +Listing~\ref{code:trapezoid} contains a skeleton for this problem, written in the form of two incomplete functions and a set of automatic tests (in the form of \emph{unit tests}, as described in the introduction). -\lstinputlisting[label=code:trapezoid_skel,caption={IGNORED}]{skel/trapezoid_skel.py} +\lstinputlisting[label=code:trapezoid,caption={IGNORED}]{examples/trapezoid.py} In this exercise, you'll need to write two functions, \texttt{trapz} and \texttt{trapzf}. \texttt{trapz} applies the trapezoid formula Modified: trunk/py4science/workbook/wallis_pi.tex =================================================================== --- trunk/py4science/workbook/wallis_pi.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/wallis_pi.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -6,12 +6,12 @@ \pi=\prod_{i=1}^{\infty}\frac{4i^{2}}{4i^{2}-1}.\end{equation} -The listing~\ref{code:wallis_pi_skel} contains a skeleton with no +The listing~\ref{code:wallis_pi} contains a skeleton with no implementation but with some plotting commands already inserted, so that you can visualize the convergence rate of this formula as more terms are kept. -\lstinputlisting[label=code:wallis_pi_skel,caption={IGNORED}]{skel/wallis_pi_skel.py} +\lstinputlisting[label=code:wallis_pi,caption={IGNORED}]{examples/wallis_pi.py} After running the script successfully, you should obtain a plot similar to Figure~\ref{fig:wallis_pi}. Modified: trunk/py4science/workbook/wordfreqs.tex =================================================================== --- trunk/py4science/workbook/wordfreqs.tex 2007-10-30 19:18:26 UTC (rev 4066) +++ trunk/py4science/workbook/wordfreqs.tex 2007-10-30 20:21:39 UTC (rev 4067) @@ -14,10 +14,10 @@ In this problem, you will need to count the frequencies of all the words contained in a compressed text file supplied as input. -The listing~\ref{code:wordfreqs_skel} contains a skeleton for this +The listing~\ref{code:wordfreqs} contains a skeleton for this problem, with \texttt{XXX} marking various places that are incomplete. -\lstinputlisting[label=code:wordfreqs_skel,caption={IGNORED}]{skel/wordfreqs_skel.py} +\lstinputlisting[label=code:wordfreqs,caption={IGNORED}]{examples/wordfreqs.py} \subsection*{Hints} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |