# HG changeset patch # User Nishanth # Date 1286562379 -19800 # Node ID 5f2c165b4a3c3d6f2163b1cec01245783680c369 # Parent a3aa223c16625f0a1c725b8e19ff8eb2ddc39a0a# Parent c43677920502c7f3f503b24d0f4595be700aa5c1 merged with punch diff -r c43677920502 -r 5f2c165b4a3c plotting_using_sage/questions.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plotting_using_sage/questions.rst Fri Oct 08 23:56:19 2010 +0530 @@ -0,0 +1,90 @@ +Objective Questions +------------------- + + 1. If ``a = [1, 1, 2, 3, 3, 5, 5, 8]``. What is set(a) + + a. set([1, 1, 2, 3, 3, 5, 5, 8]) + #. set([1, 2, 3, 5, 8]) + #. set([1, 2, 3, 3, 5, 5]) + #. Error + + Answer: set([1, 2, 3, 5, 8]) + + 2. ``a = set([1, 3, 5])``. How do you find the length of a? + + Answer: len(a) + + 3. ``a = set([1, 3, 5])``. What does a[2] produce? + + a. 1 + #. 3 + #. 5 + #. Error + + Answer: Error + + 4. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What + is the value of ``odd | squares``? + + Answer: set([1, 3, 4, 5, 7, 9, 16]) + + 5. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What + is the value of ``odd - squares``? + + Answer: set([3, 5, 7]) + + 6. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What + is the value of ``odd ^ squares``? + + Answer: set([3, 4, 5, 7, 16]) + + 7. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What + does ``odd * squares`` give? + + a. set([1, 12, 45, 112, 9]) + #. set([1, 3, 4, 5, 7, 9, 16]) + #. set([]) + #. Error + + Answer: Error + + 8. ``a = set([1, 2, 3, 4])`` and ``b = set([5, 6, 7, 8])``. What is ``a + b`` + + a. set([1, 2, 3, 4, 5, 6, 7, 8]) + #. set([6, 8, 10, 12]) + #. set([5, 12, 21, 32]) + #. Error + + 9. ``a`` is a set. how do you check if if a varaible ``b`` exists in ``a``? + + Answer: b in a + + 10. ``a`` and ``b`` are two sets. What is ``a ^ b == (a - b) | (b - a)``? + + a. True + #. False + + Answer: False + + +Larger Questions +---------------- + + 1. Given that mat_marks is a list of maths marks of a class. Find out the + no.of duplicates marks in the list. + + Answer:: + + unique_marks = set(mat_marks) + no_of_duplicates = len(mat_marks) - len(unique_marks) + + 2. Given that mat_marks is a list of maths marks of a class. Find how many + duplicates of each mark exist. + + Answer:: + + marks_set = set(mat_marks) + for mark in marks_set: + occurences = mat_marks.count(mark) + print occurences - 1, "duplicates of", mark, "exist" + diff -r c43677920502 -r 5f2c165b4a3c plotting_using_sage/quickref.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plotting_using_sage/quickref.tex Fri Oct 08 23:56:19 2010 +0530 @@ -0,0 +1,11 @@ +Creating a tuple:\\ +{\ex \lstinline| t = (1, "hello", 2.5)|} + +Accessing elements of tuples:\\ +{\ex \lstinline| t[index] Ex: t[2]|} + +Accessing slices of tuples:\\ +{\ex \lstinline| t[start:stop:step]|} + +Swapping values:\\ +{\ex \lstinline| a, b = b, a|} diff -r c43677920502 -r 5f2c165b4a3c plotting_using_sage/script.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plotting_using_sage/script.rst Fri Oct 08 23:56:19 2010 +0530 @@ -0,0 +1,257 @@ +.. Objectives +.. ---------- + +.. A - Students and teachers from Science and engineering backgrounds + B - + C - + D - + +.. Prerequisites +.. ------------- + +.. 1. Getting started with lists + +.. Author : Nishanth Amuluru + Internal Reviewer : + External Reviewer : + Checklist OK? : [2010-10-05] + +Script +------ + +Hello friends, welcome to the tutorial on "Plotting using SAGE". + +{{{ Show the outline slide }}} + +In this tutorial we shall look at + + * 2D plotting in SAGE + * 3D plotting in SAGE + +We shall first create a symbolic variable ``x`` +:: + + x = var('x') + +We shall plot the function ``sin(x) - cos(x) ^ 2`` in the range (-5, 5). +:: + + plot(sin(x) - cos(x) ^ 2, (x, -5, 5)) + +As we can see, the plot is shown. + +``plot`` command takes the symbolic function as the first argument and the +range as the second argument. + +{{{ Pause here and try out the following exercises }}} + +%% 1 %% Define a variable ``y`` and plot the function ``y^2 + 5y - 7`` in the + range (-3, 3) + +{{{ continue from paused state }}} + +:: + + y = var('y') + plot(y^2 + 5*y -7, (y, -3, 3)) + +We have seen that plot command plots the given function on a linear range. + +What if the x and y values are functions of another variable. +For instance, lets plot the trajectory of a projectile. + +A projectile was thrown at 50 m/s^2 and at an angle of 45 degrees from the +ground. We shall plot the trajectory of the particle for 5 seconds. + +These types of plots can be drawn using the parametric_plot function. +We first define the time variable. +:: + + t = var('t') + +Then we define the x and y as functions of t. +:: + + f_x = 50 * cos(pi/4) + f_y = 50 * sin(pi/4) * t - 1/2 * 9.81 * t^2 ) + +We then call the ``parametric_plot`` function as +:: + + parametric_plot((f_x, f_y), (t, 0, 5)) + +And we can see the trajectory of the projectile. + +The ``parametric_plot`` funciton takes a tuple of two functions as the first +argument and the range over which the independent variable varies as the second +argument. + +{{{ Pause here and try out the following exercises }}} + +%% 2 %% A particle is thrown into the air at 10 m/s^2 and at angle of 60 degrees + from the top of a 100 m tower. Plot the trajectory of the particle. + +{{{ continue from paused state }}} + +:: + + t = var('t') + f_x = 10 * cos(pi/3) * t + f_y = 100 + 10 * sin(pi/3) * t - 1/2 * 9.81 * t^2 + parametric_plot((f_x, f_y), (t,0,5)) + +Now we shall look at how to plot a set of points. + +We have the ``line`` function to acheive this. + +We shall plot sin(x) at few points and join them. + +First we need the set of points. +:: + + points = [ (x, sin(x)) for x in srange(-2*float(pi), 2*float(pi), 0.75) ] + +``srange`` takes a start, a stop and a step argument and returns a list of +point. We generate list of tuples in which the first value is ``x`` and second +is ``sin(x)``. + +:: + + line(points) + +plots the points and joins them with a line. + +{{{ Pause here and try out the following exercises }}} + +%% 3 %% Plot the cosine function using line function. + +{{{ continue from paused state }}} + +:: + + points = [ (x, cos(x)) for x in srange(-2*float(pi), 2*float(pi), 0.75) ] + line(points) + +The ``line`` function behaves like the plot command in matplotlib. The +difference is that ``plot`` command takes two sequences while line command +expects a sequence of co-ordinates. + +As we can see, the axes limits are set by SAGE. Often we would want to set them +ourselves. Moreover, the plot is shown here since the last command that is +executed produces a plot. + +Let us try this example +:: + + plot(cos(x), (x,0,2*pi)) + # Does the plot show up?? + +As we can see here, the plot is not shown since the last command does not +produce a plot. + +The actual way of showing a plot is to use the ``show`` command. + +:: + + p1 = plot(cos(x), (x,0,2*pi)) + show(p1) + # What happens now?? + +As we can see the plot is shown since we used it with ``show`` command. + +``show`` command is also used set the axes limits. + +:: + + p1 = plot(cos(x), (x,0,2*pi)) + show(p1, xmin=0, xmax=2*pi, ymin=-1.2, ymax=1.2) + +As we can see, we just have to pass the right keyword arguments to the ``show`` +command to set the axes limits. + +{{{ Pause here and try out the following exercises }}} + +%% 4 %% Plot the cosine function in the range (-2pi, 2pi) and set the x-axis + limits to (-5, 5) and y-axis limits to (-2, 2) respectively. + +{{{ continue from paused state }}} + +:: + + p1 = plot(cos(x), (x, 0, 2*pi)) + show(p1, xmin=-5, xmax=5, ymin=-2, ymax=2) + +The ``show`` command can also be used to show multiple plots. +:: + + p1 = plot(cos(x), (x, 0, 2*pi)) + p2 = plot(sin(x), (x, 0, 2*pi)) + show(p1+p2) + +As we can see, we can add the plots and use them in the ``show`` command. + +{{{ Pause here and try out the following exercises }}} + +%% 5 %% Plot sin(x) and sin(2*x) in the range (0, 2pi) + +{{{ continue from paused state }}} + +:: + + p1 = plot(sin(x), (x, 0, 2*pi)) + p2 = plot(sin(2*x), (x, 0, 2*pi)) + show(p1+p2) + +Now we shall look at 3D plotting in SAGE. + +We have the ``plot3d`` function that takes a function in terms of two +independent variables and the range over which they vary. + +:: + + x, y = var('x y') + plot3d(x^2 + y^2, (x, 0, 2), (y, 0, 2)) + +We get a 3D plot which can be rotated and zoomed using the mouse. + +{{{ Pause here and try out the following exercises }}} + +%% 6 %% Plot the function sin(x)^2 + cos(y)^2 for x in range (0,2) and y in + range (-2, 2) + +{{{ continue from paused state }}} + +:: + + x, y = var("x y") + plot3d( sin(x)^2 + cos(y)^2, (x, 0, 2), (y, -2, 2)) + +``parametric_plot3d`` function plots the surface in which x, y and z are +functions of another variable. + +:: + + u, v = var("u v") + f_x = u + f_y = v + f_z = u^2 + v^2 + parametric_plot3d((f_x, f_y, f_z), (u, 0, 2), (v, 0, 2)) + +{{{ Show summary slide }}} + +This brings us to the end of the tutorial. +we have learnt + + * How to draw 2D plots using plot comand + * How to use the parametric_plot and line functions + * How to use show command for multiple plots and setting axes limits + * How to draw 3D plots + +{{{ Show the "sponsored by FOSSEE" slide }}} + +#[Nishanth]: Will add this line after all of us fix on one. +This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India + +Hope you have enjoyed and found it useful. +Thankyou + diff -r c43677920502 -r 5f2c165b4a3c plotting_using_sage/slides.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plotting_using_sage/slides.tex Fri Oct 08 23:56:19 2010 +0530 @@ -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 +{ + \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 -r c43677920502 -r 5f2c165b4a3c using_sage_to_teach.rst --- a/using_sage_to_teach.rst Fri Oct 08 12:36:28 2010 +0530 +++ b/using_sage_to_teach.rst Fri Oct 08 23:56:19 2010 +0530 @@ -11,6 +11,14 @@ * How to use SAGE worksheets for collaborative learning * How to use typesetting in sage for neater outputs +2D + * plot + * parametric_plot + * polygon + * line +3D + * plot3d + * parametric_plot3d {{{ Pause here and try out the following exercises }}} %% 2 %% change the label on y-axis to "y" and save the lines of code diff -r c43677920502 -r 5f2c165b4a3c using_sage_to_teach/questions.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/using_sage_to_teach/questions.rst Fri Oct 08 23:56:19 2010 +0530 @@ -0,0 +1,90 @@ +Objective Questions +------------------- + + 1. If ``a = [1, 1, 2, 3, 3, 5, 5, 8]``. What is set(a) + + a. set([1, 1, 2, 3, 3, 5, 5, 8]) + #. set([1, 2, 3, 5, 8]) + #. set([1, 2, 3, 3, 5, 5]) + #. Error + + Answer: set([1, 2, 3, 5, 8]) + + 2. ``a = set([1, 3, 5])``. How do you find the length of a? + + Answer: len(a) + + 3. ``a = set([1, 3, 5])``. What does a[2] produce? + + a. 1 + #. 3 + #. 5 + #. Error + + Answer: Error + + 4. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What + is the value of ``odd | squares``? + + Answer: set([1, 3, 4, 5, 7, 9, 16]) + + 5. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What + is the value of ``odd - squares``? + + Answer: set([3, 5, 7]) + + 6. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What + is the value of ``odd ^ squares``? + + Answer: set([3, 4, 5, 7, 16]) + + 7. ``odd = set([1, 3, 5, 7, 9])`` and ``squares = set([1, 4, 9, 16])``. What + does ``odd * squares`` give? + + a. set([1, 12, 45, 112, 9]) + #. set([1, 3, 4, 5, 7, 9, 16]) + #. set([]) + #. Error + + Answer: Error + + 8. ``a = set([1, 2, 3, 4])`` and ``b = set([5, 6, 7, 8])``. What is ``a + b`` + + a. set([1, 2, 3, 4, 5, 6, 7, 8]) + #. set([6, 8, 10, 12]) + #. set([5, 12, 21, 32]) + #. Error + + 9. ``a`` is a set. how do you check if if a varaible ``b`` exists in ``a``? + + Answer: b in a + + 10. ``a`` and ``b`` are two sets. What is ``a ^ b == (a - b) | (b - a)``? + + a. True + #. False + + Answer: False + + +Larger Questions +---------------- + + 1. Given that mat_marks is a list of maths marks of a class. Find out the + no.of duplicates marks in the list. + + Answer:: + + unique_marks = set(mat_marks) + no_of_duplicates = len(mat_marks) - len(unique_marks) + + 2. Given that mat_marks is a list of maths marks of a class. Find how many + duplicates of each mark exist. + + Answer:: + + marks_set = set(mat_marks) + for mark in marks_set: + occurences = mat_marks.count(mark) + print occurences - 1, "duplicates of", mark, "exist" + diff -r c43677920502 -r 5f2c165b4a3c using_sage_to_teach/quickref.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/using_sage_to_teach/quickref.tex Fri Oct 08 23:56:19 2010 +0530 @@ -0,0 +1,11 @@ +Creating a tuple:\\ +{\ex \lstinline| t = (1, "hello", 2.5)|} + +Accessing elements of tuples:\\ +{\ex \lstinline| t[index] Ex: t[2]|} + +Accessing slices of tuples:\\ +{\ex \lstinline| t[start:stop:step]|} + +Swapping values:\\ +{\ex \lstinline| a, b = b, a|} diff -r c43677920502 -r 5f2c165b4a3c using_sage_to_teach/script.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/using_sage_to_teach/script.rst Fri Oct 08 23:56:19 2010 +0530 @@ -0,0 +1,181 @@ +.. Objectives +.. ---------- + +.. A - Students and teachers from Science and engineering backgrounds + B - + C - + D - + +.. Prerequisites +.. ------------- + +.. 1. Getting started with lists + +.. Author : Nishanth Amuluru + Internal Reviewer : + External Reviewer : + Checklist OK? : [2010-10-05] + +Script +------ + +Hello friends and welcome to the tutorial on "Using SAGE to teach" + +{{{ Show the slide containing title }}} + +{{{ Show the slide containing the outline slide }}} + +In this tutorial, we shall learn + + * How to use the "@interact" feature of SAGE for better demonstration + * How to use SAGE for collaborative learning + +Let us look at a typical example of demonstrating a damped oscillation. +:: + + t = var('t') + p1 = plot( e^(-t) * sin(2*t), (t, 0, 15)) + show(p1) + +Now let us reduce the damping factor +:: + + t = var('t') + p1 = plot( e^(-t/2) * sin(2*t), (t, 0, 15)) + show(p1) + +Now if we want to reduce the damping factor even more, we would be using +e^(-t/3). We can observe that every time we have to change, all we do is change +something very small and re evaluate the cell. + +This process can be automated using the ``@interact`` feature of SAGE. + +:: + + @interact + def plot_damped(n=1): + t = var('t') + p1 = plot( e^(-t/n) * sin(2*t), (t, 0, 20)) + show(p1) + +We can see that the function is evaluated and the plot is shown. We can also +see that there is a field to enter the value of ``n`` and it is currently set +to ``1``. Let us change it to 2 and hit enter. + +We see that the new plot with reduced damping factor is shown. Similarly we can +change ``n`` to any desired value and hit enter and the function will be +evaluated. + +This is a very handy tool while demonstrating or teaching. + +{{{ Pause here and try out the following exercises }}} + +%% 1 %% Plot the sine curve and vary its frequency using the ``@interact`` + +{{{ continue from paused state }}} + +:: + + @interact + def sine_plot(n=1): + x = var('x') + p2 = plot(sin(n*x), (x, 0, 2*pi)) + show(p2) + +Often we would want to vary a parameter over range instead of taking it as an +input from the user. For instance we do not want the user to give ``n`` as 0 +for the damping oscillation we discussed. In such cases we use a range of +values as the default argument. +:: + + @interact + def plot_damped(n=(1..10)): + t = var('t') + p1 = plot( e^(-t/n) * sin(2*t), (t, 0, 20)) + show(p1) + +We get similar plot but the only difference is the input widget. Here it is a +slider unlike an input field. We can see that as the slider is moved, the +function is evaluated and plotted accordingly. + +{{{ Pause here and try out the following exercises }}} + +%% 2 %% Take a string as input from user and circular shift it to the left and + vary the shift length using a slider + +{{{ continue from paused state }}} + +:: + + @interact + def str_shift(s="MADAM", shift=(0..8)): + shift_len = shift % len(s) + chars = list(s) + shifted_chars = chars[shift_len:] + chars[:shift_len] + print "Actual String:", s + print "Shifted String:", "".join(shifted_chars) + +Sometimes we want the user to have only a given set of options. We use a list +of items as the default argument in such situations. +:: + + @interact + def str_shift(s="STRING", shift=(0..8), direction=["Left", "Right"]): + shift_len = shift % len(s) + chars = list(s) + if direction == "Right": + shifted_chars = chars[-shift_len:] + chars[:-shift_len] + else: + shifted_chars = chars[shift_len:] + chars[:shift_len] + print "Actual String:", s + print "Shifted String:", "".join(shifted_chars) + +We can see that buttons are displayed which enables us to select from a given +set of options. + +We have learnt how to use the ``@interact`` feature of SAGE for better +demonstration. We shall look at how to use SAGE worksheets for collaborative +learning. + +The first feature we shall see is the ``publish`` feature. Open a worksheet and +in the top right, we can see a button called ``publish``. Click on that and we +get a confirmation page with an option for re publishing. + +For now lets forget that opion and simply publish by cliking ``yes``. The +worksheet is now published. + +Now lets signout and go to the sage notebook home. We see link to browse +published worksheets. Lets click on it and we can see the worksheet. This does +not require login and anyone can view the worksheet. + +Alternatively, if one wants to edit the sheet, there is a link on top left +corner that enables the user to download a copy of the sheet onto their home. +This way they can edit a copy of the worksheet. + +We have learnt how to publish the worksheets to enable users to edit a copy. +Next, we shall look at how to enable users to edit the actual worksheet itself. + +Let us open the worksheet and we see a link called ``share`` on the top right +corner of the worksheet. Click the link and we get a box where we can type the +usernames of users whom we want to share the worksheet with. We can even +specify multiple users by seperating their names using commas. Once we have +shared the worksheet, the worksheet appears on the home of shared users. + +{{{ Show summary slide }}} + +This brings us to the end of the tutorial. +we have learnt + + * How to user interactive feaures of SAGE + * How to publish our work + * How to edit a copy of one of the published worksheets + * How to share the worksheets with fellow users + +{{{ Show the "sponsored by FOSSEE" slide }}} + +#[Nishanth]: Will add this line after all of us fix on one. +This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India + +Hope you have enjoyed and found it useful. +Thankyou + diff -r c43677920502 -r 5f2c165b4a3c using_sage_to_teach/slides.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/using_sage_to_teach/slides.tex Fri Oct 08 23:56:19 2010 +0530 @@ -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 +{ + \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}