summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Sethi2010-10-13 17:32:59 +0530
committerAmit Sethi2010-10-13 17:32:59 +0530
commit8eed6263ab409111c65eee6ca7ab17eee476414e (patch)
tree0f0f84f646eb761a6186306104ee95b0f906d570
parent900a0f4d3fefd4bf05bab44d5ae4d561b8af8660 (diff)
parentb731ddf2fa28a85b2a62278676249bfb1cbff7b1 (diff)
downloadst-scripts-8eed6263ab409111c65eee6ca7ab17eee476414e.tar.gz
st-scripts-8eed6263ab409111c65eee6ca7ab17eee476414e.tar.bz2
st-scripts-8eed6263ab409111c65eee6ca7ab17eee476414e.zip
merging heads
-rw-r--r--basic-data-type/quickref.tex49
-rw-r--r--basic-data-type/script.rst (renamed from basicdatatype.rst)90
-rw-r--r--basic-data-type/slides.org72
-rw-r--r--basic-data-type/slides.tex158
-rw-r--r--getting-started-with-lists/getting_started_with_lists.rst137
-rw-r--r--getting-started-with-lists/quickref.tex8
-rw-r--r--getting-started-with-lists/slides.org35
-rw-r--r--getting-started-with-lists/slides.tex106
-rw-r--r--plotting-data/plotting-data.rst136
-rw-r--r--plotting-data/slides.org84
-rw-r--r--plotui/quickref.tex8
-rw-r--r--plotui/script.rst182
-rw-r--r--plotui/slides.tex106
-rw-r--r--statistics/quickref.tex8
-rw-r--r--statistics/script.rst (renamed from statistics.rst)21
-rw-r--r--statistics/slides.org33
-rw-r--r--statistics/slides.tex106
-rw-r--r--symbolics/quickref.tex8
-rw-r--r--symbolics/script.rst (renamed from symbolics.rst)6
-rw-r--r--symbolics/slides.tex106
20 files changed, 1436 insertions, 23 deletions
diff --git a/basic-data-type/quickref.tex b/basic-data-type/quickref.tex
new file mode 100644
index 0000000..1047219
--- /dev/null
+++ b/basic-data-type/quickref.tex
@@ -0,0 +1,49 @@
+\documentclass{article}
+\begin{Document}
+\begin{center}
+\textbf{Basic DataType Quick Reference}\\
+\end{center}
+Declaring an Integer:\\
+{\ex \lstinline| b=9999999999999999999 |}
+
+Declaring a float:\\
+{\ex \lstinline| p=3.141592 |}
+
+Declaring a Complex number:\\
+{\ex \lstinline| c = 3.2+4.6j |}
+
+Modulo Operator:\\
+{\ex \lstinline| 87 % 6 |}
+
+Exponent Operator:\\
+{\ex \lstinline| 7**8 |}
+
+Declaring a list:\\
+{\ex \lstinline| var_list = [1, 1.2, [1,2]] |}
+
+Declaring a string:\\
+{\ex \lstinline| k='Single quote' |}
+{\ex \lstinline| l="Double quote contain's single quote" |}
+{\ex \lstinline| m='''"Contain's both"''' |}
+
+Declaring a tuple:\\
+{\ex \lstinline| var_tup = (1,2,3,4) |}
+
+
+Accessing Lists, string and tuples:\\
+{\ex \lstinline| seq[-1] |}
+
+Interconversion of number datatype:\\
+{\ex \lstinline| float(2.3+4.2j) |}
+
+
+Interconversion of sequences:\\
+{\ex \lstinline| tup=tuple([1,2,3,4,5]) |}
+
+Spliting string into lists:\\
+{\ex \lstinline| ''split this sting''.split() |}
+
+Join lists to create strings:\\
+{\ex \lstinline| ','.join['List','joined','on','commas'] |}
+
+\end{Document}
diff --git a/basicdatatype.rst b/basic-data-type/script.rst
index ed97c24..64583c7 100644
--- a/basicdatatype.rst
+++ b/basic-data-type/script.rst
@@ -1,14 +1,29 @@
-Hello friends and welcome to the tutorial on Basic Data types and
-operators in Python.
+.. Objectives
+.. ----------
+
+.. Learn about Python Data Structures and Operators.(Remembering)
+.. Use them to do basic operations.(Applying)
+
+.. Prerequisites
+.. -------------
+
+
+
+.. Author : Amit Sethi
+ Internal Reviewer :
+ External Reviewer :
+ Checklist OK? : <put date stamp here, if OK> [2010-10-05]
+Hello friends and welcome to the tutorial on Basic Data types and operators in Python.
{{{ Show the slide containing title }}}
{{{ Show the slide containing the outline slide }}}
In this tutorial, we shall look at::
- * Various Datatypes in Python
- * Operators with a little hands-on on how they can be applied to
- the different data types.
+ * Datatypes in Python
+ * Operators in Python
+
+with a little hands-on on how they can be applied to the different data types.
@@ -20,8 +35,8 @@ There are three built-in data types in python to represent numbers.
These are:
* Integers
- * Complex and
- * Boolean
+ * float and
+ * Complex
Lets first talk about integers. ::
@@ -81,7 +96,7 @@ The last data type in the list is complex number ::
c = 3.2+4.6j
as simple as that so essentialy its just a combination of two floats the
-imaginary part being define by j notation instead of i. Complex numbers have a lot of functions specific to them.
+imaginary part being defined by j notation instead of i. Complex numbers have a lot of functions specific to them.
Lets check these ::
c.<Tab>
@@ -97,6 +112,10 @@ We can get the absolute value using the function ::
abs(c)
+
+
+{{ Slide for memory aid }}
+
Python also has Boolean as a built-in type.
Try it out just type ::
@@ -142,10 +161,42 @@ where as the expression ::
gives the value False.
-Lets now discuss sequence data structures in python. Sequence
+
+Lets now look at some operators available in Python to manipulate these data types.
+
+
+
+Python uses % for modulo operation ::
+
+ 87 % 6
+and two stars for a exponent. ::
+
+ 7**8
+
+
+In case one wishes to use the current value of variable in which the result is stored in the expression one can do that by putting the operator before `equal to`. ::
+
+ a=73
+ a*=34
+
+is same as ::
+
+ a=a*34
+
+and ::
+
+ a/=23
+
+is same as ::
+
+ a=a/23
+
+
+Lets now discuss sequence data stypes in python. Sequence
datatypes are those in which elements are kept in a sequential
order. All the elements accessed using index.
+
{{{ slide to for memory aid }}}
The sequence datatypes in python are ::
@@ -207,7 +258,7 @@ unlike '[' for lists.::
Because of their sequential property there are certain functions and
operations we can apply to all of them.
-{{{ Slide for memory aid }}}
+
The first one is accessing.
@@ -382,6 +433,21 @@ Thus we get a list joined on commas. Similarly we can do spaces.::
Note that the list has to be a list of strings to apply join operation.
+With this we come to the end of this tutorial .
+
+In this tutorial we have discussed
+
+1. Number Datatypes , integer,float and complex
+2. Boolean and datatype and operators
+3. Sequence data types ,List,String and Tuple
+4. Accesing sequence
+5. Slicing sequences
+6. Finding length , sorting and reversing operations on sequences.
+7. Immutability.
+
+
+
+
.. #[Nishanth]: string to list is fine. But list to string can be left for
string manipulations. Just say it requires some string
manipulations and leave it there.
@@ -399,7 +465,3 @@ Thank You.
-Author : Amit Sethi
-Internal Reviewer 1 : Nishanth
-Internal Reviewer 2 :
-External Reviewer
diff --git a/basic-data-type/slides.org b/basic-data-type/slides.org
new file mode 100644
index 0000000..2d12dbd
--- /dev/null
+++ b/basic-data-type/slides.org
@@ -0,0 +1,72 @@
+#+LaTeX_CLASS: beamer
+#+LaTeX_CLASS_OPTIONS: [presentation]
+#+BEAMER_FRAME_LEVEL: 1
+
+#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent}
+#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
+#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
+#+OPTIONS: H:5 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
+
+#+TITLE: Plotting Data
+#+AUTHOR: FOSSEE
+#+DATE: 2010-09-14 Tue
+#+EMAIL: info@fossee.in
+
+# \author[FOSSEE] {FOSSEE}
+
+# \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+# \date{}
+
+* Tutorial Plan
+** Datatypes in Python
+** Operators in Python
+
+* Numbers
+** Integers
+** Float
+** Complex
+
+* Boolean
+** True
+** False
+
+* Sequence Data types
+** Data in Sequence
+** Accessed using Index
+*** list
+*** String
+*** Tuple
+
+* All are Strings
+
+** k='Single quote'
+** l="Double quote contain's single quote"
+** m='''"Contain's both"'''
+
+* Summary
+** a=73
+** b=3.14
+** c=3+4j
+
+* Summary Contd.
+
+** t=True
+** f=False
+** t and f
+
+* Summary Contd.
+** l= [2,1,4,3]
+** s='hello'
+** tu=(1,2,3,4)
+
+* Summary Contd.
+** tu[-1]
+** s[1:-1]
+
+* Summary Contd.
+
+** Sorted(l)
+** reversed(s)
+
+
+
diff --git a/basic-data-type/slides.tex b/basic-data-type/slides.tex
new file mode 100644
index 0000000..b66f55d
--- /dev/null
+++ b/basic-data-type/slides.tex
@@ -0,0 +1,158 @@
+% Created 2010-10-13 Wed 17:08
+\documentclass[presentation]{beamer}
+\usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent}
+\usepackage[latin1]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{graphicx}
+\usepackage{longtable}
+\usepackage{float}
+\usepackage{wrapfig}
+\usepackage{soul}
+\usepackage{amssymb}
+\usepackage{hyperref}
+
+
+\title{Plotting Data }
+\author{FOSSEE}
+\date{2010-09-14 Tue}
+
+\begin{document}
+
+\maketitle
+
+
+
+
+
+
+\begin{frame}
+\frametitle{Tutorial Plan}
+\label{sec-1}
+\begin{itemize}
+
+\item Datatypes in Python\\
+\label{sec-1.1}%
+\item Operators in Python\\
+\label{sec-1.2}%
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{Numbers}
+\label{sec-2}
+\begin{itemize}
+
+\item Integers\\
+\label{sec-2.1}%
+\item Float\\
+\label{sec-2.2}%
+\item Complex\\
+\label{sec-2.3}%
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{Boolean}
+\label{sec-3}
+\begin{itemize}
+
+\item True\\
+\label{sec-3.1}%
+\item False\\
+\label{sec-3.2}%
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{Sequence Data types}
+\label{sec-4}
+\begin{itemize}
+
+\item Data in Sequence\\
+\label{sec-4.1}%
+\item Accessed using Index
+\label{sec-4.2}%
+\begin{itemize}
+
+\item list\\
+\label{sec-4.2.1}%
+\item String\\
+\label{sec-4.2.2}%
+\item Tuple\\
+\label{sec-4.2.3}%
+\end{itemize} % ends low level
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{All are Strings}
+\label{sec-5}
+\begin{itemize}
+
+\item k='Single quote'\\
+\label{sec-5.1}%
+\item l="Double quote contain's single quote"\\
+\label{sec-5.2}%
+\item m='''"Contain's both"'''\\
+\label{sec-5.3}%
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{Summary}
+\label{sec-6}
+\begin{itemize}
+
+\item a=73\\
+\label{sec-6.1}%
+\item b=3.14\\
+\label{sec-6.2}%
+\item c=3+4j\\
+\label{sec-6.3}%
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{Summary Contd.}
+\label{sec-7}
+\begin{itemize}
+
+\item t=True\\
+\label{sec-7.1}%
+\item f=False\\
+\label{sec-7.2}%
+\item t and f\\
+\label{sec-7.3}%
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{Summary Contd.}
+\label{sec-8}
+\begin{itemize}
+
+\item l= [2,1,4,3]\\
+\label{sec-8.1}%
+\item s='hello'\\
+\label{sec-8.2}%
+\item tu=(1,2,3,4)\\
+\label{sec-8.3}%
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{Summary Contd.}
+\label{sec-9}
+\begin{itemize}
+
+\item tu[-1]\\
+\label{sec-9.1}%
+\item s[1:-1]\\
+\label{sec-9.2}%
+\end{itemize} % ends low level
+\end{frame}
+\begin{frame}
+\frametitle{Summary Contd.}
+\label{sec-10}
+\begin{itemize}
+
+\item Sorted(l)\\
+\label{sec-10.1}%
+\item reversed(s)\\
+\label{sec-10.2}%
+\end{itemize} % ends low level
+\end{frame}
+
+\end{document}
diff --git a/getting-started-with-lists/getting_started_with_lists.rst b/getting-started-with-lists/getting_started_with_lists.rst
new file mode 100644
index 0000000..a82de02
--- /dev/null
+++ b/getting-started-with-lists/getting_started_with_lists.rst
@@ -0,0 +1,137 @@
+Hello friends and welcome to the tutorial on getting started with
+lists.
+
+ {{{ Show the slide containing title }}}
+
+ {{{ Show the slide containing the outline slide }}}
+
+In this tutorial we will be getting acquainted with a python data
+structure called lists. We will learn ::
+
+ * How to create lists
+ * Structure of lists
+ * Access list elements
+ * Append elements to lists
+ * Deleting elements from lists
+
+List is a compound data type, it can contain data of other data
+types. List is also a sequence data type, all the elements are in
+order and there order has a meaning.
+
+We will first create an empty list with no elements. On your IPython
+shell type ::
+
+ empty = []
+ type(empty)
+
+
+This is an empty list without any elements.
+
+* Filled lists
+
+Lets now define a list, nonempty and fill it with some random elements.
+
+nonempty = ['spam', 'eggs', 100, 1.234]
+
+Thus the simplest way of creating a list is typing out a sequence
+of comma-separated values (items) between square brackets.
+All the list items need not have the same data type.
+
+
+
+As we can see lists can contain different kinds of data. In the
+previous example 'spam' and 'eggs' are strings and 100 and 1.234
+integer and float. Thus we can put elements of heterogenous types in
+lists. Thus list themselves can be one of the element types possible
+in lists. Thus lists can also contain other lists. Example ::
+
+ list_in_list=[[4,2,3,4],'and', 1, 2, 3, 4]
+
+We access list elements using the number of index. The
+index begins from 0. So for list nonempty, nonempty[0] gives the
+first element, nonempty[1] the second element and so on and
+nonempty[3] the last element. ::
+
+ nonempty[0]
+ nonempty[1]
+ nonempty[3]
+
+We can also access the elememts from the end using negative indices ::
+
+ nonempty[-1]
+ nonempty[-2]
+ nonempty[-4]
+
+-1 gives the last element which is the 4th element , -2 second to last and -4 gives the fourth
+from last element which is first element.
+
+We can append elements to the end of a list using append command. ::
+
+ nonempty.append('onemore')
+ nonempty
+ nonempty.append(6)
+ nonempty
+
+As we can see non empty appends 'onemore' and 6 at the end.
+
+
+
+Using len function we can check the number of elements in the list
+nonempty. In this case it being 6 ::
+
+ len(nonempty)
+
+
+
+Just like we can append elements to a list we can also remove them.
+There are two ways of doing it. One is by using index. ::
+
+ del(nonempty[1])
+
+
+
+deletes the element at index 1, i.e the second element of the
+list, 'eggs'. The other way is removing element by content. Lets say
+one wishes to delete 100 from nonempty list the syntax of the command
+should be ::
+
+ a.remove(100)
+
+but what if their were two 100's. To check that lets do a small
+experiment. ::
+
+ a.append('spam')
+ a
+ a.remove('spam')
+ a
+
+If we check a now we will see that the first occurence 'spam' is removed
+thus remove removes the first occurence of the element in the sequence
+and leaves others untouched.
+
+
+{{{Slide for Summary }}}
+
+
+In this tutorial we came across a sequence data type called lists. ::
+
+ * We learned how to create lists.
+ * How to access lists.
+ * Append elements to list.
+ * Delete Element from list.
+ * And Checking list length.
+
+
+
+{{{ Sponsored by Fossee Slide }}}
+
+This tutorial was created as a part of FOSSEE project.
+
+I hope you found this tutorial useful.
+
+Thank You
+
+
+ * Author : Amit Sethi
+ * First Reviewer :
+ * Second Reviewer : Nishanth
diff --git a/getting-started-with-lists/quickref.tex b/getting-started-with-lists/quickref.tex
new file mode 100644
index 0000000..b26d168
--- /dev/null
+++ b/getting-started-with-lists/quickref.tex
@@ -0,0 +1,8 @@
+Creating a linear array:\\
+{\ex \lstinline| x = linspace(0, 2*pi, 50)|}
+
+Plotting two variables:\\
+{\ex \lstinline| plot(x, sin(x))|}
+
+Plotting two lists of equal length x, y:\\
+{\ex \lstinline| plot(x, y)|}
diff --git a/getting-started-with-lists/slides.org b/getting-started-with-lists/slides.org
new file mode 100644
index 0000000..528c840
--- /dev/null
+++ b/getting-started-with-lists/slides.org
@@ -0,0 +1,35 @@
+#+LaTeX_CLASS: beamer
+#+LaTeX_CLASS_OPTIONS: [presentation]
+#+BEAMER_FRAME_LEVEL: 1
+
+#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent}
+#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
+#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
+#+OPTIONS: H:5 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
+
+#+TITLE: Plotting Data
+#+AUTHOR: FOSSEE
+#+DATE: 2010-09-14 Tue
+#+EMAIL: info@fossee.in
+
+# \author[FOSSEE] {FOSSEE}
+
+# \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+# \date{}
+
+* Tutorial Plan
+** How to create lists
+** Structure of lists
+** Access list elements
+** Append elements to lists
+** Deleting elements from lists
+
+
+* Summary
+
+ l=[1,2,3,4]
+ l[-1]
+ l.append(5)
+ del(l[2])
+ len(l)
+
diff --git a/getting-started-with-lists/slides.tex b/getting-started-with-lists/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/getting-started-with-lists/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/plotting-data/plotting-data.rst b/plotting-data/plotting-data.rst
new file mode 100644
index 0000000..3af6dda
--- /dev/null
+++ b/plotting-data/plotting-data.rst
@@ -0,0 +1,136 @@
+Plotting Experimental Data
+=============================
+Hello and welcome , this tutorial on Plotting Experimental data is
+presented by the fossee team.
+
+{{{ Show the slide containing title }}}
+
+
+{{{ Show the Outline Slide }}}
+
+Here we will discuss plotting Experimental data.
+
+1. We will see how we can represent a sequence of numbers in Python.
+
+2. We will also become fimiliar with elementwise squaring of such a
+sequence.
+
+3. We will also see how we can use our graph to indicate Error.
+
+One needs to be fimiliar with the concepts of plotting
+mathematical functions in Python.
+
+We will use data from a Simple Pendulum Experiment to illustrate our
+points.
+
+{{{ Simple Pendulum data Slide }}}
+
+
+
+
+As we know for a simple pendulum length,L is directly proportional to
+the square of time,T. We shall be plotting L and T^2 values.
+
+
+First we will have to initiate L and T values. We initiate them as sequence
+of values. To tell ipython a sequence of values we write the sequence in
+comma seperated values inside two square brackets. This is also called List
+so to create two sequences
+
+L,t type in ipython shell. ::
+
+ In []: L = [0.1, 0.2, 0.3, 0.4, 0.5,0.6, 0.7, 0.8, 0.9]
+
+ In []: t= [0.69, 0.90, 1.19,1.30, 1.47, 1.58, 1.77, 1.83, 1.94]
+
+
+
+To obtain the square of sequence t we will use the function square
+with argument t.This is saved into the variable tsquare.::
+
+ In []: tsquare=square(t)
+
+ array([ 0.4761, 0.81 , 1.4161, 1.69 , 2.1609, 2.4964, 3.1329,
+ 3.3489, 3.7636])
+
+
+Now to plot L vs T^2 we will simply type ::
+
+ In []: plot(L,t,.)
+
+'.' here represents to plot use small dots for the point. ::
+
+ In []: clf()
+
+You can also specify 'o' for big dots.::
+
+ In []: plot(L,t,o)
+
+ In []: clf()
+
+
+{{{ Slide with Error data included }}}
+
+
+Now we shall try and take into account error into our plots . The
+Error values for L and T are on your screen.We shall again intialize
+the sequence values in the same manner as we did for L and t ::
+
+ In []: delta_L= [0.08,0.09,0.07,0.05,0.06,0.00,0.06,0.06,0.01]
+
+ In []: delta_T= [0.04,0.08,0.11,0.05,0.03,0.03,0.01,0.07,0.01]
+
+
+
+Now to plot L vs T^2 with an error bar we use the function errorbar()
+
+The syntax of the command is as given on the screen. ::
+
+
+ In []: errorbar(L,tsquare,xerr=delta_L, yerr=delta_T, fmt='b.')
+
+This gives a plot with error bar for x and y axis. The dots are of blue color. The parameters xerr and yerr are error on x and y axis and fmt is the format of the plot.
+
+
+similarly we can draw the same error bar with big red dots just change
+the parameters to fmt to 'ro'. ::
+
+ In []: clf()
+ In []: errorbar(L,tsquare,xerr=delta_L, yerr=delta_T, fmt='ro')
+
+
+
+thats it. you can explore other options to errorbar using the documentation
+of errorbar.::
+
+ In []: errorbar?
+
+
+{{{ Summary Slides }}}
+
+In this tutorial we have learnt :
+
+1. How to declare a sequence of number , specifically the kind of sequence we learned was a list.
+
+2. Plotting experimental data extending our knowledge from mathematical functions.
+
+3. The various options available for plotting dots instead of lines.
+
+4. Plotting experimental data such that we can also represent error. We did this using the errorbar() function.
+
+
+ {{{ Show the "sponsored by FOSSEE" slide }}}
+
+
+
+This tutorial was created as a part of FOSSEE project.
+
+Hope you have enjoyed and found it useful.
+
+ Thankyou
+
+
+
+Author : Amit Sethi
+Internal Reviewer :
+Internal Reviewer 2 :
diff --git a/plotting-data/slides.org b/plotting-data/slides.org
new file mode 100644
index 0000000..f9ff4c2
--- /dev/null
+++ b/plotting-data/slides.org
@@ -0,0 +1,84 @@
+#+LaTeX_CLASS: beamer
+#+LaTeX_CLASS_OPTIONS: [presentation]
+#+BEAMER_FRAME_LEVEL: 1
+
+#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent}
+#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
+#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
+#+OPTIONS: H:5 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
+
+#+TITLE: Plotting Experimental Data
+#+AUTHOR: FOSSEE
+#+DATE: 2010-09-14 Tue
+#+EMAIL: info@fossee.in
+
+# \author[FOSSEE] {FOSSEE}
+
+# \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+# \date{}
+
+* Tutorial Plan
+** Plotting Experiment Data and Error Bars
+* Pre-requisites
+** Plotting simple analytical Functions
+* plot L vs. T^2
+
+#+ORGTBL: L vs T^2 orgtbl-to-latex
+
+ | L | T |
+ | 0.1 | 0.69 |
+ | 0.2 | 0.90 |
+ | 0.3 | 1.19 |
+ | 0.4 | 1.30 |
+ | 0.5 | 1.47 |
+ | 0.6 | 1.58 |
+ | 0.7 | 1.77 |
+ | 0.8 | 1.83 |
+ | 0.9 | 1.94 |
+
+
+
+
+* Initializing L & T
+ : In []: L = [0.1, 0.2, 0.3, 0.4, 0.5,
+ : 0.6, 0.7, 0.8, 0.9]
+ : In []: t = [0.69, 0.90, 1.19,
+ : 1.30, 1.47, 1.58,
+ : 1.77, 1.83, 1.94]
+* square()
+ : In []: tsquare=square(t)
+
+ : array([ 0.4761, 0.81 , 1.4161, 1.69 , 2.1609, 2.4964, 3.1329,
+ : 3.3489, 3.7636])
+
+
+* Plotting
+ : In[]: plot(L,t,.)
+
+
+ : In[]: plot(L,t,o)
+
+* Adding an Error Column
+
+
+ | L | T | /Delta L | /Delta T |
+ | 0.1 | 0.69 | 0.08 | 0.04 |
+ | 0.2 | 0.90 | 0.09 | 0.08 |
+ | 0.3 | 1.19 | 0.07 | 0.11 |
+ | 0.4 | 1.30 | 0.05 | 0.05 |
+ | 0.5 | 1.47 | 0.06 | 0.03 |
+ | 0.6 | 1.58 | 0.00 | 0.03 |
+ | 0.7 | 1.77 | 0.06 | 0.01 |
+ | 0.8 | 1.83 | 0.06 | 0.07 |
+ | 0.9 | 1.94 | 0.01 | 0.01 |
+
+
+* Plotting Error bar
+
+ : In[]: delta_L= [0.08,0.09,0.07,0.05,0.16,
+ : 0.00,0.06,0.06,0.01]
+ : In[]: delta_T= [0.04,0.08,0.11,0.05,0.03,
+ : 0.03,0.01,0.07,0.01]
+
+
+
diff --git a/plotui/quickref.tex b/plotui/quickref.tex
new file mode 100644
index 0000000..b26d168
--- /dev/null
+++ b/plotui/quickref.tex
@@ -0,0 +1,8 @@
+Creating a linear array:\\
+{\ex \lstinline| x = linspace(0, 2*pi, 50)|}
+
+Plotting two variables:\\
+{\ex \lstinline| plot(x, sin(x))|}
+
+Plotting two lists of equal length x, y:\\
+{\ex \lstinline| plot(x, y)|}
diff --git a/plotui/script.rst b/plotui/script.rst
new file mode 100644
index 0000000..2c5b955
--- /dev/null
+++ b/plotui/script.rst
@@ -0,0 +1,182 @@
+Hello and welcome to the tutorial on creating simple plots using
+Python.This tutorial is presented by the Fossee group.
+{{{ Show the Title Slide }}}
+
+I hope you have IPython running on your computer.
+
+In this tutorial we will look at plot command and also how to study
+the plot using the UI.
+
+{{{ Show Outline Slide }}}
+
+Lets start ipython on your shell, type ::
+
+ $ipython -pylab
+
+
+Pylab is a python library which provides plotting functionality.It
+also provides many other important mathematical and scientific
+functions. After running IPython -pylab in your shell if at the top of
+the result of this command, you see something like ::
+
+
+ `ERROR: matplotlib could NOT be imported! Starting normal
+ IPython.`
+
+
+{{{ Slide with Error written on it }}}
+
+Then you have to install matplotlib and run this command again.
+
+Now type in your ipython shell ::
+
+ In[]: linpace?
+
+
+
+as the documentation says, it returns `num` evenly spaced samples,
+calculated over the interval start and stop. To illustrate this, lets
+do it form 1 to 100 and try 100 points. ::
+
+ In[]: linspace(1,100,100)
+
+As you can see a sequence of numbers from 1 to 100 appears.
+
+Now lets try 200 points between 0 and 1 you do this by typing ::
+
+
+ In[]: linspace(0,1,200)
+
+0 for start , 1 for stop and 200 for no of points. In linspace
+the start and stop points can be integers, decimals , or
+constants. Let's try and get 100 points between -pi to pi. Type ::
+
+ In[]: p = linspace(-pi,pi,100)
+
+
+'pi' here is constant defined by pylab. Save this to the variable, p
+.
+
+If you now ::
+
+ In[]: len(p)
+
+You will get the no. of points. len function gives the no of elements
+of a sequence.
+
+
+Let's try and plot a cosine curve between -pi and pi using these
+points. Simply type ::
+
+
+ In[]: plot(p,cos(points))
+
+Here cos(points) gets the cosine value at every corresponding point to
+p.
+
+
+We can also save cos(points) to variable cosine and plot it using
+plot.::
+
+ In[]: cosine=cos(points)
+
+ In[]: plot(p,cosine)
+
+
+
+Now do ::
+
+ In[]: clf()
+
+this will clear the plot.
+
+This is done because any other plot we try to make shall come on the
+same drawing area. As we do not wish to clutter the area with
+overlaid plots , we just clear it with clf(). Now lets try a sine
+plot. ::
+
+
+ In []: plot(p,sin(p))
+
+
+
+
+The Window on which the plot appears can be used to study it better.
+
+First of all moving the mouse around gives us the point where mouse
+points at.
+
+Also we have some buttons the right most among them is
+for saving the file.
+
+Just click on it specifying the name of the file. We will save the plot
+by the name sin_curve in pdf format.
+
+
+
+{{{ Action corelating with the words }}}
+
+As you can see I can specify format of file from the dropdown.
+
+Formats like png ,eps ,pdf, ps are available.
+
+Left to the save button is the slider button to specify the margins.
+
+{{{ Action corelating with the words }}}
+
+Left to this is zoom button to zoom into the plot. Just specify the
+region to zoom into.
+The button left to it can be used to move the axes of the plot.
+
+{{{ Action corelating with the words }}}
+
+The next two buttons with a left and right arrow icons change the state of the
+plot and take it to the previous state it was in. It more or less acts like a
+back and forward button in the browser.
+
+{{{ Action corelating with the words }}}
+
+The last one is 'home' referring to the initial plot.
+
+{{{ Action corelating with the words}}}
+
+
+
+{{{ Summary Slide }}}
+
+
+In this tutorial we have looked at
+
+1. Starting Ipython with pylab
+
+2. Using linspace function to create `num` equaly spaced points in a region.
+
+3. Finding length of sequnces using len.
+
+4. Plotting mathematical functions using plot.
+
+4. Clearing drawing area using clf
+
+5. Using the UI of plot for studying it better . Using functionalities like save , zoom , moving the plots on x and y axis
+
+etc ..
+
+
+
+{{{ Show the "sponsored by FOSSEE" slide }}}
+
+
+
+This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
+
+
+
+ Hope you have enjoyed and found it useful.
+
+ Thankyou
+
+
+
+Author : Amit Sethi
+Internal Reviewer :
+Internal Reviewer 2 :
diff --git a/plotui/slides.tex b/plotui/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/plotui/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/statistics/quickref.tex b/statistics/quickref.tex
new file mode 100644
index 0000000..b26d168
--- /dev/null
+++ b/statistics/quickref.tex
@@ -0,0 +1,8 @@
+Creating a linear array:\\
+{\ex \lstinline| x = linspace(0, 2*pi, 50)|}
+
+Plotting two variables:\\
+{\ex \lstinline| plot(x, sin(x))|}
+
+Plotting two lists of equal length x, y:\\
+{\ex \lstinline| plot(x, y)|}
diff --git a/statistics.rst b/statistics/script.rst
index afe7e46..5398e21 100644
--- a/statistics.rst
+++ b/statistics/script.rst
@@ -28,7 +28,7 @@ all the elements and dividing by length of the list.::
sum function gives us the sum of the elements.::
- mean_using_sum=sum_age_list/len(age_list)
+ mean_using_sum=float(sum_age_list)/len(age_list)
This obviously gives the mean age but python has another
method for getting the mean. This is the mean function::
@@ -48,13 +48,15 @@ as if it was a single list of elements ::
flattened_seq=[1,5,6,8,1,3,4,5]
mean(flattened_seq)
-As you can see both the results are same. The other is mean
+As you can see both the results are same. The other way is mean
of each column.::
mean(two_dimension,0)
array([ 1. , 4. , 5. , 6.5])
-or along the two rows seperately.::
+we pass an extra argument 0 in that case.
+
+In case of getting mean along the rows the argument is 1::
mean(two_dimension,1)
array([ 5. , 3.25])
@@ -69,9 +71,16 @@ using the functions median and std::
median(age_list)
std(age_list)
+Median and std can also be calculated for two dimensional arrays along columns and rows just like mean.
-
-Now lets apply this to a real world example ::
+ For example ::
+
+ median(two_dimension,0)
+ std(two_dimension,1)
+
+This gives us the median along the colums and standard devition along the rows.
+
+Now lets apply this to a real world example
We will a data file that is at the a path
``/home/fossee/sslc2.txt``.It contains record of students and their
@@ -124,7 +133,7 @@ Standard deviation. ::
Now lets try and and get the mean for all the subjects ::
- L=loadtxt('sslc2.txt',usecols=(3,4,5,6,7),delimiter=';')
+ L=loadtxt('/home/fossee/sslc2.txt',usecols=(3,4,5,6,7),delimiter=';')
mean(L,0)
array([ 73.55452504, 53.79828941, 62.83342759, 50.69806158, 63.17056881])
diff --git a/statistics/slides.org b/statistics/slides.org
new file mode 100644
index 0000000..d4a5548
--- /dev/null
+++ b/statistics/slides.org
@@ -0,0 +1,33 @@
+#+LaTeX_CLASS: beamer
+#+LaTeX_CLASS_OPTIONS: [presentation]
+#+BEAMER_FRAME_LEVEL: 1
+
+#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent}
+#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
+#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
+#+OPTIONS: H:5 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
+
+#+TITLE: Statistics
+#+AUTHOR: FOSSEE
+#+DATE: 2010-09-14 Tue
+#+EMAIL: info@fossee.in
+
+# \author[FOSSEE] {FOSSEE}
+
+# \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+# \date{}
+
+* Tutorial Plan
+** Doing simple statistical operations in Python
+** Using loadtxt to solve statistics problem
+
+* Summary
+** seq=[1,5,6,8,1,3,4,5]
+** sum(seq)
+** mean(seq)
+** median(seq)
+** std(seq)
+
+* Summary
+
+** loadtxt
diff --git a/statistics/slides.tex b/statistics/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/statistics/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}
diff --git a/symbolics/quickref.tex b/symbolics/quickref.tex
new file mode 100644
index 0000000..b26d168
--- /dev/null
+++ b/symbolics/quickref.tex
@@ -0,0 +1,8 @@
+Creating a linear array:\\
+{\ex \lstinline| x = linspace(0, 2*pi, 50)|}
+
+Plotting two variables:\\
+{\ex \lstinline| plot(x, sin(x))|}
+
+Plotting two lists of equal length x, y:\\
+{\ex \lstinline| plot(x, y)|}
diff --git a/symbolics.rst b/symbolics/script.rst
index 0bf9957..8539898 100644
--- a/symbolics.rst
+++ b/symbolics/script.rst
@@ -1,8 +1,8 @@
Symbolics with Sage
-------------------
-This tutorial on using Sage for symbolic calculation is brought to you
-by Fossee group.
+Hello friends and welcome to the tutorial on symbolics with sage.
+
.. #[Madhu: Sounds more or less like an ad!]
@@ -56,7 +56,7 @@ Now if you type::
sin(y)
- sage simply returns the expression .
+ sage simply returns the expression .
.. #[Madhu: Why is this line indented? Also full stop. When will you
learn? Yes we can correct you. But corrections are for you to
diff --git a/symbolics/slides.tex b/symbolics/slides.tex
new file mode 100644
index 0000000..df1462c
--- /dev/null
+++ b/symbolics/slides.tex
@@ -0,0 +1,106 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Tutorial slides on Python.
+%
+% Author: FOSSEE
+% Copyright (c) 2009, FOSSEE, IIT Bombay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\documentclass[14pt,compress]{beamer}
+%\documentclass[draft]{beamer}
+%\documentclass[compress,handout]{beamer}
+%\usepackage{pgfpages}
+%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
+
+% Modified from: generic-ornate-15min-45min.de.tex
+\mode<presentation>
+{
+ \usetheme{Warsaw}
+ \useoutertheme{infolines}
+ \setbeamercovered{transparent}
+}
+
+\usepackage[english]{babel}
+\usepackage[latin1]{inputenc}
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+
+\usepackage{ae,aecompl}
+\usepackage{mathpazo,courier,euler}
+\usepackage[scaled=.95]{helvet}
+
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+
+\usepackage{listings}
+\lstset{language=Python,
+ basicstyle=\ttfamily\bfseries,
+ commentstyle=\color{red}\itshape,
+ stringstyle=\color{darkgreen},
+ showstringspaces=false,
+ keywordstyle=\color{blue}\bfseries}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros
+\setbeamercolor{emphbar}{bg=blue!20, fg=black}
+\newcommand{\emphbar}[1]
+{\begin{beamercolorbox}[rounded=true]{emphbar}
+ {#1}
+ \end{beamercolorbox}
+}
+\newcounter{time}
+\setcounter{time}{0}
+\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
+
+\newcommand{\typ}[1]{\lstinline{#1}}
+
+\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}} }
+
+% Title page
+\title{Your Title Here}
+
+\author[FOSSEE] {FOSSEE}
+
+\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
+\date{}
+
+% DOCUMENT STARTS
+\begin{document}
+
+\begin{frame}
+ \maketitle
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Outline}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% All other slides here. %%
+%% The same slides will be used in a classroom setting. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}[fragile]
+ \frametitle{Summary}
+ \begin{itemize}
+ \item
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Thank you!}
+ \begin{block}{}
+ \begin{center}
+ This spoken tutorial has been produced by the
+ \textcolor{blue}{FOSSEE} team, which is funded by the
+ \end{center}
+ \begin{center}
+ \textcolor{blue}{National Mission on Education through \\
+ Information \& Communication Technology \\
+ MHRD, Govt. of India}.
+ \end{center}
+ \end{block}
+\end{frame}
+
+\end{document}