LAST TIME..THE COMMAND LINE

Size: px
Start display at page:

Download "LAST TIME..THE COMMAND LINE"

Transcription

1 LAST TIME..THE COMMAND LINE Maybe slightly to fast.. Finder Applications Utilities Terminal The color can be adjusted and is simply a matter of taste. Per default it is black! Dr. Robert Kofler Introduction to Programming May 16, / 30

2 THE FINAL GAME Store in python folder import random print ( Welcome ) randomnumber = random. randint ( 1, ) attempts =1 while ( True ) : guess= i n t ( input ( Guess the number : ) ) i f guess==randomnumber : print ( You win, a f t e r, attempts, attempts ) break e l i f guess < randomnumber : print ( The number i s l a r g e r ) e lse : print ( The number i s smaller ) attempts +=1 # l a c y man s s y n t a x f o r : a t t e m p t s = a t t e m p t s +1 print ( Game over ) # s a v e as improvedgame. py # F5 Dr. Robert Kofler Introduction to Programming May 16, / 30

3 REMINDER: UNIX COMMANDS whoami pwd : print working directory ls : list the files in my current directory cd : change directory python3.3 : start a script using the Python3 interpreter Dr. Robert Kofler Introduction to Programming May 16, / 30

4 START THE GAME FROM THE UNIX-SHELL = Enter button cd Desktop/pythonlecture (= change to the path where the script is stored) in case your folder has a different name use ls -l and cd to navigate into the folder containing your python script python3.3 finalgame.py Enjoy your game (= tell python3 to interpret your script) In case you see something weird like >>> you accidentially entered the Python command line. Type quit() to escape Dr. Robert Kofler Introduction to Programming May 16, / 30

5 START A PYTHON SCRIPT DIRECTLY FROM STUDENT python3.3 Desktop/python/finalgame.py Dr. Robert Kofler Introduction to Programming May 16, / 30

6 STARTING A PYTHON SCRIPT FROM ANYWHERE USING ABSOLUTE PATHS You are at bin and want to start the game python3.3 /Users/student/Desktop/python/finalgame.py Dr. Robert Kofler Introduction to Programming May 16, / 30

7 MINI TASK: START YOUR PYTHON SCRIPT USING ABSOLUTE PATHS python3.3 /Users/student/Desktop/python/finalgame.py Hint: use (= Tabulator) for autocomplete! type: python3.3 /U continue: python3.3 /Users/s continue: python3.3 /Users/student/D... Dr. Robert Kofler Introduction to Programming May 16, / 30

8 SUMMARY: ABSOLUTE PATH - RELATIVE PATH absolute path: always starts with root symbol / and is ALWAYS the same for any given directory, irrespective to your position in the directory tree. Is more conservative, mixing up files is more difficult. For my scripts I frequently provide absolute paths as parameters because they are unambiguous. relative path: never starts with the root symbol. It is always relative to your position. May be more convenient because usually you have to type less. Dr. Robert Kofler Introduction to Programming May 16, / 30

9 PLAYED ENOUGH Dr. Robert Kofler Introduction to Programming May 16, / 30

10 LET S GET BIOMEDICAL Dr. Robert Kofler Introduction to Programming May 16, / 30

11 DOWNLOADING THE HUMAN GENES store in your python folder Dr. Robert Kofler Introduction to Programming May 16, / 30

12 THE ABSOLUTE PATH OF FILES genes.txt: /Volumes/Temp2/genes.txt humang.txt: /Users/student/Desktop/humang.txt human-genes.txt:? Dr. Robert Kofler Introduction to Programming May 16, / 30

13 MINI TASK: FIND THE ABSOLUTE PATH OF YOUR HUMAN-GENES FILE First open a new IDLE window. Copy the absolute path as a comment to IDLE. Hint: use the command line, navigate into the folder containing your genes-file and type pwd to get the directory. You can than manually enter the rest. Hint: if you are lazy, use autocomplete Dr. Robert Kofler Introduction to Programming May 16, / 30

14 PRINTING THE CONTENT OF THE GENES FILE genepath= /Users/ r o b e r t k o f l e r /Desktop/python/human genes. g t f # we use a f o r l o o p t o i t e r a t e o v e r t h e f i l e, l i n e by l i n e for l i n e in open ( genepath, r ) : print ( l i n e ) # s a v e as g e n e p r i n t e r. py > F5 # p r e s s C t r l c t o s t o p i t Dr. Robert Kofler Introduction to Programming May 16, / 30

15 FILE OBJECT - ANOTHER OBJECT If you want to read a file, you need the following information: position of the file = absolute path read the file or write to the file? what is my current position in the file, i.e.: which line have I last read. All this information is stored in the file object! You do not have to worry about the current position in the file, you are just reading line by line. The file object is thus another object, so which objects have we met so far? Dr. Robert Kofler Introduction to Programming May 16, / 30

16 WHY OBJECTS Helps you modelling the real world. Imagine you are programming a farm-simulator (Farmville 3). You would create an object for a horse, a cow, a barn, the farmer, of course also for the farmer/innen, the pond, etc.. It thus allows you to develop the software at a very picturesque (tangible level). Instead of loops within loops, you have cows interacting with farmers (nice level ob abstraction). Dr. Robert Kofler Introduction to Programming May 16, / 30

17 WHY DO WE NEED OBJECTS? Unfortunatelly there is no escape from objects in Python: file object, range even the string.. We will not learn how to create objects (remember 1 hour lecture..) but we will learn how to use them! And remember in addition to the basic data types int, float, list, tuple we now add infinitely many different types of objects.. Dr. Robert Kofler Introduction to Programming May 16, / 30

18 FORMAL DEFINITION OF AN OBJECT Objects in object-oriented programming are essentially data structures together with their associated processing routines. A object thus has: data structures processing routines (=called methods; similar to functions) Dr. Robert Kofler Introduction to Programming May 16, / 30

19 MODELING A COW Which data-structures (which information does a cow have)? age milk yield?? any other ideas Which formal routines (what can you do with a cow)? feed() milk()?? Dr. Robert Kofler Introduction to Programming May 16, / 30

20 CLASS VS INSTANCE Class All cows adhere to the same template; the all have a age, a milk yield and so on, this template is called class. Instance One specific cow adhering to the template (class). Thus the cow named Resi is an instance, a cow named Pepi is an instance and so on. To summarize, a class cow represents the general concept of a cow, an instance of a cow is one particular cow. # C r e a t e an i n s t a n c e o f a cow Cow ( ) r e s i = Cow( 1 2, 4000) # age, m ilk y i e l d r e s i. feed ( 2 ) # g i v e 2 k i l o o f g r a s s # n o t e t h e p o i n t. # with t h e p o i n t we a r e c a l l i n g a method f o r # t h e p a r t i c u l a r i n s t a n c e milk = r e s i. milk ( ) # g e t t h e m ilk Dr. Robert Kofler Introduction to Programming May 16, / 30

21 BACK TO THE FILE OBJECT # c r e a t e an i n s t a n c e o f a f i l e o b j e c t fo=open ( /Users/student/Desktop/python/human genes. g t f, r ) # f o i s one i n s t a n c e o f t h e f i l e o b j e c t cowreader=open ( /Users/student/Desktop/cow genes. g t f, r ) # c o w r e a d e r i s a n o t h e r i n s t a n c e o f t h e f i l e o b j e c t # what a r e t h e p r o c e s s i n g r o u t i n e s (= methods )? fo. read ( ) fo. write ( ) fo. seek ( ) # Reminder : main use o f t h e f i l e o b j e c t for l i n e in fo : # do something Dr. Robert Kofler Introduction to Programming May 16, / 30

22 SUMMARY: METHOD VS FUNCTION function(): standalone; e.g.: print(), range(), int() method(): they are never alone, always only with an instance of an object; e.g.: resi.feed(2), fileobject.read(), string.split( ) what about: fileobject.feed(2)? Dr. Robert Kofler Introduction to Programming May 16, / 30

23 INSPECTING THE HUMAN-GENE FILE The human genes are stored in the widely used gtf-format. New UNIX commands head and tail Head prints the first 10 lines of a file whereas tail prints the last 10 lines of a file. move into the folder where you stored the gene file! type: head human-genes.gtf The gtf file contains information about gene s Dr. Robert Kofler Introduction to Programming May 16, / 30

24 REFRESHER: GENES AND CHROMOSOMES A gene is a region in a chromosome, usually codeing for a protein. Dr. Robert Kofler Introduction to Programming May 16, / 30

25 GENE IN THE GTF-FILE column 1: the chromosome of the gene (is a string) column 4: start position of the gene column 5: end position of the gene column 7: strand of the gene column 9: diverse information and comments, like the name of the gene Dr. Robert Kofler Introduction to Programming May 16, / 30

26 THE LENGTH OF GENES genepath= /Users/ r o b e r t k o f l e r /Desktop/python/human genes. g t f # we use a f o r l o o p t o i t e r a t e o v e r t h e f i l e, l i n e by l i n e for l i n e in open ( genepath, r ) : tmp= l i n e. s p l i t ( \ t ) # \ t = symbol f o r t a b u l a t o r s t a r t = i n t ( tmp [ 3 ] ) end= i n t ( tmp [ 4 ] ) print ( end s t a r t ) # s a v e as g e n e l e n g t h. py > F5 # p r e s s C t r l c t o s t o p i t Dr. Robert Kofler Introduction to Programming May 16, / 30

27 SPLIT(): STRING IS ACTUALLY AN OBJECT # c r e a t e a s t r i n g t e s t = the small c a t jumps the quick # s p l i t i t a t s p a c e and we g e t a l i s t a= t e s t. s p l i t ( ) print ( a ) # NOTE: a l i s t / t u p l e can c o n t a i n a n y t h ing!! # not j u s t i n t e g e r s # now we s p l i t i t a t c a t b= t e s t. s p l i t ( c a t ) print ( b ) # s a v e as s t r i n g o b j e c t. py # F5 Dr. Robert Kofler Introduction to Programming May 16, / 30

28 SPECIAL SYMBOLS IN A STRING # c r e a t e a s t r i n g t e s t = the \ t s m a l l \ ncat \njumps\ nthe \ tquick \n\n\n print ( t e s t ) # \ t = t a b u l a t o r # \n =new l i n e # r s t r i p ( ) removes something from t h e r i g h t end # we want t o g e t r i d o f t h e annoying \n\n\n t e s t = t e s t. r s t r i p ( \n ) print ( t e s t ) Dr. Robert Kofler Introduction to Programming May 16, / 30

29 QUICK DETOUR: GENE PRINTING IMPROVED genepath= /Users/ r o b e r t k o f l e r /Desktop/python/human genes. g t f # we use a f o r l o o p t o i t e r a t e o v e r t h e f i l e, l i n e by l i n e for l i n e in open ( genepath, r ) : # when r e a d i n g a f i l e e v e r y # l i n e ends with an \n > so l e t s remove i t l i n e = l i n e. r s t r i p ( \n ) print ( l i n e ) Dr. Robert Kofler Introduction to Programming May 16, / 30

30 TASK 6: X VS Y # Task6 : X vs Y # G i r l s : count t h e number o f g e n e s on t h e X chromosome # Boys : count t h e number o f g e n e s on t h e Y chromosome # example output : # X has??? g e n e s ( g i r l s ) # Y has??? g e n e s ( boys ) # Hint : use s p l i t # s a v e as t a s k 6 XvsY. py in your t a s k s f o l d e r # F5 Dr. Robert Kofler Introduction to Programming May 16, / 30

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations Lab 2 Worksheet Problems Problem : Geometry and Linear Equations Linear algebra is, first and foremost, the study of systems of linear equations. You are going to encounter linear systems frequently in

More information

Lab 6: Linear Algebra

Lab 6: Linear Algebra 6.1 Introduction Lab 6: Linear Algebra This lab is aimed at demonstrating Python s ability to solve linear algebra problems. At the end of the assignment, you should be able to write code that sets up

More information

CS1110 Lab 3 (Feb 10-11, 2015)

CS1110 Lab 3 (Feb 10-11, 2015) CS1110 Lab 3 (Feb 10-11, 2015) First Name: Last Name: NetID: The lab assignments are very important and you must have a CS 1110 course consultant tell CMS that you did the work. (Correctness does not matter.)

More information

VPython Class 2: Functions, Fields, and the dreaded ˆr

VPython Class 2: Functions, Fields, and the dreaded ˆr Physics 212E Classical and Modern Physics Spring 2016 1. Introduction VPython Class 2: Functions, Fields, and the dreaded ˆr In our study of electric fields, we start with a single point charge source

More information

Notater: INF3331. Veronika Heimsbakk December 4, Introduction 3

Notater: INF3331. Veronika Heimsbakk December 4, Introduction 3 Notater: INF3331 Veronika Heimsbakk veronahe@student.matnat.uio.no December 4, 2013 Contents 1 Introduction 3 2 Bash 3 2.1 Variables.............................. 3 2.2 Loops...............................

More information

A First Course on Kinetics and Reaction Engineering Example 1.4

A First Course on Kinetics and Reaction Engineering Example 1.4 Example 1.4 Problem Purpose This example illustrates the process of identifying reactions that are linear combinations of other reactions in a set and eliminating them until a mathematically independent

More information

PHYSICS 3266 SPRING 2016

PHYSICS 3266 SPRING 2016 PHYSICS 3266 SPRIG 2016 Each problem is worth 5 points as discussed in the syllabus. For full credit you must include in your solution a copy of your program (well commented and listed any students that

More information

Learning Packet. Lesson 5b Solving Quadratic Equations THIS BOX FOR INSTRUCTOR GRADING USE ONLY

Learning Packet. Lesson 5b Solving Quadratic Equations THIS BOX FOR INSTRUCTOR GRADING USE ONLY Learning Packet Student Name Due Date Class Time/Day Submission Date THIS BOX FOR INSTRUCTOR GRADING USE ONLY Mini-Lesson is complete and information presented is as found on media links (0 5 pts) Comments:

More information

Tutorial 8 Raster Data Analysis

Tutorial 8 Raster Data Analysis Objectives Tutorial 8 Raster Data Analysis This tutorial is designed to introduce you to a basic set of raster-based analyses including: 1. Displaying Digital Elevation Model (DEM) 2. Slope calculations

More information

Lab 1: Empirical Energy Methods Due: 2/14/18

Lab 1: Empirical Energy Methods Due: 2/14/18 Lab 1: Empirical Energy Methods Due: 2/14/18 General remarks on scientific scripting Scientific scripting for managing the input and output data is an important component of modern materials computations,

More information

Outline. policies for the second part. with answers. MCS 260 Lecture 10.5 Introduction to Computer Science Jan Verschelde, 9 July 2014

Outline. policies for the second part. with answers. MCS 260 Lecture 10.5 Introduction to Computer Science Jan Verschelde, 9 July 2014 Outline 1 midterm exam on Friday 11 July 2014 policies for the second part 2 some review questions with answers MCS 260 Lecture 10.5 Introduction to Computer Science Jan Verschelde, 9 July 2014 Intro to

More information

Lesson 5b Solving Quadratic Equations

Lesson 5b Solving Quadratic Equations Lesson 5b Solving Quadratic Equations In this lesson, we will continue our work with Quadratics in this lesson and will learn several methods for solving quadratic equations. The first section will introduce

More information

Tutorial. Getting started. Sample to Insight. March 31, 2016

Tutorial. Getting started. Sample to Insight. March 31, 2016 Getting started March 31, 2016 Sample to Insight CLC bio, a QIAGEN Company Silkeborgvej 2 Prismet 8000 Aarhus C Denmark Telephone: +45 70 22 32 44 www.clcbio.com support-clcbio@qiagen.com Getting started

More information

Comp 11 Lectures. Mike Shah. July 12, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 12, / 33

Comp 11 Lectures. Mike Shah. July 12, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 12, / 33 Comp 11 Lectures Mike Shah Tufts University July 12, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 12, 2017 1 / 33 Please do not distribute or host these slides without prior permission. Mike

More information

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101 E23: Hotel Management System Author: 1302509 Zhao Ruimin 1301478 Wen Yunlu 1302575 Hu Xing 1301911 Chen Ke 1302599 Tang Haoyuan Module: EEE 101 Lecturer: Date: Dr.Lin December/22/2014 Contents Contents

More information

M etodos Matem aticos e de Computa c ao I

M etodos Matem aticos e de Computa c ao I Métodos Matemáticos e de Computação I Complex Systems 01/16 General structure Microscopic scale Individual behavior Description of the constituents Model Macroscopic scale Collective behavior Emergence

More information

MERGING (MERGE / MOSAIC) GEOSPATIAL DATA

MERGING (MERGE / MOSAIC) GEOSPATIAL DATA This help guide describes how to merge two or more feature classes (vector) or rasters into one single feature class or raster dataset. The Merge Tool The Merge Tool combines input features from input

More information

On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work

On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work Lab 5 : Linking Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work 1 Objective The main objective of this lab is to experiment

More information

Titrator 3.0 Tutorial: Calcite precipitation

Titrator 3.0 Tutorial: Calcite precipitation Titrator 3.0 Tutorial: Calcite precipitation November 2008 Steve Cabaniss A. Introduction This brief tutorial is intended to acquaint you with some of the features of the program Titrator. It assumes that

More information

Task 1: Open ArcMap and activate the Spatial Analyst extension.

Task 1: Open ArcMap and activate the Spatial Analyst extension. Exercise 10 Spatial Analyst The following steps describe the general process that you will follow to complete the exercise. Specific steps will be provided later in the step-by-step instructions component

More information

FIT100 Spring 01. Project 2. Astrological Toys

FIT100 Spring 01. Project 2. Astrological Toys FIT100 Spring 01 Project 2 Astrological Toys In this project you will write a series of Windows applications that look up and display astrological signs and dates. The applications that will make up the

More information

Turbulence in the Solar Wind

Turbulence in the Solar Wind Turbulence in the Solar Wind BU Summer School on Plasma Processes in Space Physics In this lab, you will calculate the turbulence in the fast and slow solar wind. You will download the data from NASA s

More information

LightWork Memo 18: Galactic Spectra Data Overview 1

LightWork Memo 18: Galactic Spectra Data Overview 1 LightWork Memo 18: Galactic Spectra Data Overview 1 Subject: Galactic Spectra Data Overview Memo: 18, revision 1 From: Glen Langston, Evan Smith and Sophie Knudsen Date: 2017 August 18 Summary: Examples

More information

Lectures about Python, useful both for beginners and experts, can be found at (http://scipy-lectures.github.io).

Lectures about Python, useful both for beginners and experts, can be found at  (http://scipy-lectures.github.io). Random Matrix Theory (Sethna, "Entropy, Order Parameters, and Complexity", ex. 1.6, developed with Piet Brouwer) 2016, James Sethna, all rights reserved. This is an ipython notebook. This hints file is

More information

User Guide for Hermir version 0.9: Toolbox for Synthesis of Multivariate Stationary Gaussian and non-gaussian Series

User Guide for Hermir version 0.9: Toolbox for Synthesis of Multivariate Stationary Gaussian and non-gaussian Series User Guide for Hermir version 0.9: Toolbox for Synthesis of Multivariate Stationary Gaussian and non-gaussian Series Hannes Helgason, Vladas Pipiras, and Patrice Abry June 2, 2011 Contents 1 Organization

More information

HW8. Due: November 1, 2018

HW8. Due: November 1, 2018 CSCI 1010 Theory of Computation HW8 Due: November 1, 2018 Attach a fully filled-in cover sheet to the front of your printed homework Your name should not appear anywhere; the cover sheet and each individual

More information

Databases through Python-Flask and MariaDB

Databases through Python-Flask and MariaDB 1 Databases through Python-Flask and MariaDB Tanmay Agarwal, Durga Keerthi and G V V Sharma Contents 1 Python-flask 1 1.1 Installation.......... 1 1.2 Testing Flask......... 1 2 Mariadb 1 2.1 Software

More information

1 Newton s 2nd and 3rd Laws

1 Newton s 2nd and 3rd Laws Physics 13 - Winter 2007 Lab 2 Instructions 1 Newton s 2nd and 3rd Laws 1. Work through the tutorial called Newton s Second and Third Laws on pages 31-34 in the UW Tutorials in Introductory Physics workbook.

More information

Introduction to Hartree-Fock calculations in Spartan

Introduction to Hartree-Fock calculations in Spartan EE5 in 2008 Hannes Jónsson Introduction to Hartree-Fock calculations in Spartan In this exercise, you will get to use state of the art software for carrying out calculations of wavefunctions for molecues,

More information

M E R C E R W I N WA L K T H R O U G H

M E R C E R W I N WA L K T H R O U G H H E A L T H W E A L T H C A R E E R WA L K T H R O U G H C L I E N T S O L U T I O N S T E A M T A B L E O F C O N T E N T 1. Login to the Tool 2 2. Published reports... 7 3. Select Results Criteria...

More information

Cantera / Stancan Primer

Cantera / Stancan Primer Cantera / Stancan Primer Matthew Campbell; A.J. Simon; Chris Edwards Introduction to Cantera and Stancan Cantera is an open-source, object-oriented software package which performs chemical and thermodynamic

More information

Exercises for Windows

Exercises for Windows Exercises for Windows CAChe User Interface for Windows Select tool Application window Document window (workspace) Style bar Tool palette Select entire molecule Select Similar Group Select Atom tool Rotate

More information

GIS Functions and Integration. Tyler Pauley Associate Consultant

GIS Functions and Integration. Tyler Pauley Associate Consultant GIS Functions and Integration Tyler Pauley Associate Consultant Contents GIS in AgileAssets products Displaying data within AMS Symbolizing the map display Display on Bing Maps Demo- Displaying a map in

More information

L435/L555. Dept. of Linguistics, Indiana University Fall 2016

L435/L555. Dept. of Linguistics, Indiana University Fall 2016 in in L435/L555 Dept. of Linguistics, Indiana University Fall 2016 1 / 13 in we know how to output something on the screen: print( Hello world. ) input: input() returns the input from the keyboard

More information

LAB 2 - ONE DIMENSIONAL MOTION

LAB 2 - ONE DIMENSIONAL MOTION Name Date Partners L02-1 LAB 2 - ONE DIMENSIONAL MOTION OBJECTIVES Slow and steady wins the race. Aesop s fable: The Hare and the Tortoise To learn how to use a motion detector and gain more familiarity

More information

Calculating Bond Enthalpies of the Hydrides

Calculating Bond Enthalpies of the Hydrides Proposed Exercise for the General Chemistry Section of the Teaching with Cache Workbook: Calculating Bond Enthalpies of the Hydrides Contributed by James Foresman, Rachel Fogle, and Jeremy Beck, York College

More information

VCell Tutorial. Building a Rule-Based Model

VCell Tutorial. Building a Rule-Based Model VCell Tutorial Building a Rule-Based Model We will demonstrate how to create a rule-based model of EGFR receptor interaction with two adapter proteins Grb2 and Shc. A Receptor-monomer reversibly binds

More information

Homework 2: Structure and Defects in Crystalline and Amorphous Materials

Homework 2: Structure and Defects in Crystalline and Amorphous Materials Homework 2: Structure and Defects in Crystalline and Amorphous Materials Muhammad Ashraful Alam Network of Computational Nanotechnology Discovery Park, Purdue University. In Lectures 4-6, we have discussed

More information

FALL 2018 MATH 4211/6211 Optimization Homework 4

FALL 2018 MATH 4211/6211 Optimization Homework 4 FALL 2018 MATH 4211/6211 Optimization Homework 4 This homework assignment is open to textbook, reference books, slides, and online resources, excluding any direct solution to the problem (such as solution

More information

Worksheet 1: Integrators

Worksheet 1: Integrators Simulation Methods in Physics I WS 2014/2015 Worksheet 1: Integrators Olaf Lenz Alexander Schlaich Stefan Kesselheim Florian Fahrenberger Peter Košovan October 22, 2014 Institute for Computational Physics,

More information

Assignment 4: Object creation

Assignment 4: Object creation Assignment 4: Object creation ETH Zurich Hand-out: 13 November 2006 Due: 21 November 2006 Copyright FarWorks, Inc. Gary Larson 1 Summary Today you are going to create a stand-alone program. How to create

More information

Homework 9: Protein Folding & Simulated Annealing : Programming for Scientists Due: Thursday, April 14, 2016 at 11:59 PM

Homework 9: Protein Folding & Simulated Annealing : Programming for Scientists Due: Thursday, April 14, 2016 at 11:59 PM Homework 9: Protein Folding & Simulated Annealing 02-201: Programming for Scientists Due: Thursday, April 14, 2016 at 11:59 PM 1. Set up We re back to Go for this assignment. 1. Inside of your src directory,

More information

CSCE 155N Fall Homework Assignment 2: Stress-Strain Curve. Assigned: September 11, 2012 Due: October 02, 2012

CSCE 155N Fall Homework Assignment 2: Stress-Strain Curve. Assigned: September 11, 2012 Due: October 02, 2012 CSCE 155N Fall 2012 Homework Assignment 2: Stress-Strain Curve Assigned: September 11, 2012 Due: October 02, 2012 Note: This assignment is to be completed individually - collaboration is strictly prohibited.

More information

Natural Language Processing Prof. Pushpak Bhattacharyya Department of Computer Science & Engineering, Indian Institute of Technology, Bombay

Natural Language Processing Prof. Pushpak Bhattacharyya Department of Computer Science & Engineering, Indian Institute of Technology, Bombay Natural Language Processing Prof. Pushpak Bhattacharyya Department of Computer Science & Engineering, Indian Institute of Technology, Bombay Lecture - 21 HMM, Forward and Backward Algorithms, Baum Welch

More information

PHP-Einführung - Lesson 4 - Object Oriented Programming. Alexander Lichter June 27, 2017

PHP-Einführung - Lesson 4 - Object Oriented Programming. Alexander Lichter June 27, 2017 PHP-Einführung - Lesson 4 - Object Oriented Programming Alexander Lichter June 27, 2017 Content of this lesson 1. Recap 2. Why OOP? 3. Git gud - PHPStorm 4. Include and Require 5. Classes and objects 6.

More information

Pymol Practial Guide

Pymol Practial Guide Pymol Practial Guide Pymol is a powerful visualizor very convenient to work with protein molecules. Its interface may seem complex at first, but you will see that with a little practice is simple and powerful

More information

Nondeterministic finite automata

Nondeterministic finite automata Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the

More information

Supplementary Material

Supplementary Material Supplementary Material Contents 1 Keywords of GQL 2 2 The GQL grammar 3 3 THE GQL user guide 4 3.1 The environment........................................... 4 3.2 GQL projects.............................................

More information

TDDD63 Project: API. September 13, 2014

TDDD63 Project: API. September 13, 2014 TDDD63 Project: API Martin Söderén September 13, 2014 Contents 1 Using the API 2 2 Connection and Status 2 2.1 how to connect through USB...................... 2 2.2 how to connect through wlan......................

More information

Chapter 1 Linear Equations. 1.1 Systems of Linear Equations

Chapter 1 Linear Equations. 1.1 Systems of Linear Equations Chapter Linear Equations. Systems of Linear Equations A linear equation in the n variables x, x 2,..., x n is one that can be expressed in the form a x + a 2 x 2 + + a n x n = b where a, a 2,..., a n and

More information

: Intro Programming for Scientists and Engineers Assignment 4: Learning from Echocardiograms

: Intro Programming for Scientists and Engineers Assignment 4: Learning from Echocardiograms Assignment 4: Learning from Echocardiograms Page 1 600.112: Intro Programming for Scientists and Engineers Assignment 4: Learning from Echocardiograms Peter H. Fröhlich phf@cs.jhu.edu Joanne Selinski joanne@cs.jhu.edu

More information

Creative Data Mining

Creative Data Mining Creative Data Mining Using ML algorithms in python Artem Chirkin Dr. Daniel Zünd Danielle Griego Lecture 7 0.04.207 /7 What we will cover today Outline Getting started Explore dataset content Inspect visually

More information

Introduction to FARGO3D

Introduction to FARGO3D Introduction to FARGO3D PABLO BENITEZ-LLAMBAY / PBLLAMBAY@NBI.KU.DK FARGO3D is a versatile HD/MHD code that runs on clusters of CPUs or GPUs, developed with special emphasis on protoplanetary disks. However,

More information

1-D Convection-Diffusion Lab

1-D Convection-Diffusion Lab Computational Fluid Dynamics -D Convection-Diffusion Lab The lab. uses scientificworkplace symbolic calculus and maths editor software (SWP) This file Concevtion-Diffusion-Lab is available from Blackboard

More information

4.4 The Calendar program

4.4 The Calendar program 4.4. THE CALENDAR PROGRAM 109 4.4 The Calendar program To illustrate the power of functions, in this section we will develop a useful program that allows the user to input a date or a month or a year.

More information

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40 Comp 11 Lectures Mike Shah Tufts University July 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 26, 2017 1 / 40 Please do not distribute or host these slides without prior permission. Mike

More information

Section III - Designing Models for 3D Printing

Section III - Designing Models for 3D Printing Section III - Designing Models for 3D Printing In this section of the Jmol Training Guide, you will become familiar with the commands needed to design a model that will be built on a 3D Printer. As you

More information

Lab 4: Kirchhoff migration (Matlab version)

Lab 4: Kirchhoff migration (Matlab version) Due Date: Oktober 29th, 2012 TA: Mandy Wong (mandyman@sep.stanford.edu) Lab 4: Kirchhoff migration (Matlab version) Robert U. Terwilliger 1 ABSTRACT In this computer exercise you will modify the Kirchhoff

More information

Using first-order logic, formalize the following knowledge:

Using first-order logic, formalize the following knowledge: Probabilistic Artificial Intelligence Final Exam Feb 2, 2016 Time limit: 120 minutes Number of pages: 19 Total points: 100 You can use the back of the pages if you run out of space. Collaboration on the

More information

WILEY. Differential Equations with MATLAB (Third Edition) Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg

WILEY. Differential Equations with MATLAB (Third Edition) Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg Differential Equations with MATLAB (Third Edition) Updated for MATLAB 2011b (7.13), Simulink 7.8, and Symbolic Math Toolbox 5.7 Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg All

More information

Project IV Fourier Series

Project IV Fourier Series Project IV Fourier Series Robert Jerrard Goal of the project To develop understanding of how many terms of a Fourier series are required in order to well-approximate the original function, and of the differences

More information

An Introduction to Matlab

An Introduction to Matlab An Introduction to Matlab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University August 25, 2013 Outline Starting Matlab Matlab Vectors and Functions

More information

How to Make or Plot a Graph or Chart in Excel

How to Make or Plot a Graph or Chart in Excel This is a complete video tutorial on How to Make or Plot a Graph or Chart in Excel. To make complex chart like Gantt Chart, you have know the basic principles of making a chart. Though I have used Excel

More information

SYMBOLIC AND NUMERICAL COMPUTING FOR CHEMICAL KINETIC REACTION SCHEMES

SYMBOLIC AND NUMERICAL COMPUTING FOR CHEMICAL KINETIC REACTION SCHEMES SYMBOLIC AND NUMERICAL COMPUTING FOR CHEMICAL KINETIC REACTION SCHEMES by Mark H. Holmes Yuklun Au J. W. Stayman Department of Mathematical Sciences Rensselaer Polytechnic Institute, Troy, NY, 12180 Abstract

More information

The CSC Interface to Sky in Google Earth

The CSC Interface to Sky in Google Earth The CSC Interface to Sky in Google Earth CSC Threads The CSC Interface to Sky in Google Earth 1 Table of Contents The CSC Interface to Sky in Google Earth - CSC Introduction How to access CSC data with

More information

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? What is the most powerful of automata? In this lecture we will introduce

More information

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University Prof. Mi Lu TA: Ehsan Rohani Laboratory Exercise #4 MIPS Assembly and Simulation

More information

Determination of Density 1

Determination of Density 1 Introduction Determination of Density 1 Authors: B. D. Lamp, D. L. McCurdy, V. M. Pultz and J. M. McCormick* Last Update: February 1, 2013 Not so long ago a statistical data analysis of any data set larger

More information

Stellarium Walk-through for First Time Users

Stellarium Walk-through for First Time Users Stellarium Walk-through for First Time Users Stellarium is the computer program often demonstrated during our planetarium shows at The MOST, Syracuse s science museum. It is our hope that visitors to our

More information

Tutorial Three: Loops and Conditionals

Tutorial Three: Loops and Conditionals Tutorial Three: Loops and Conditionals Imad Pasha Chris Agostino February 18, 2015 1 Introduction In lecture Monday we learned that combinations of conditionals and loops could make our code much more

More information

Project 2: Using linear systems for numerical solution of boundary value problems

Project 2: Using linear systems for numerical solution of boundary value problems LINEAR ALGEBRA, MATH 124 Instructor: Dr. T.I. Lakoba Project 2: Using linear systems for numerical solution of boundary value problems Goal Introduce one of the most important applications of Linear Algebra

More information

Practical Information

Practical Information MA2501 Numerical Methods Spring 2018 Norwegian University of Science and Technology Department of Mathematical Sciences Semester Project Practical Information This project counts for 30 % of the final

More information

Calibration Routine. Store in HDD. Switch "Program Control" Ref 1/ Ref 2 Manual Automatic

Calibration Routine. Store in HDD. Switch Program Control Ref 1/ Ref 2 Manual Automatic 4.2 IMPLEMENTATION LABVIEW 4.2.1 LabVIEW features LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) originally released for the Apple Macintosh in 1986. It is a highly productive

More information

Illustrate It! You will need to set out colored pencil and markers at this station.

Illustrate It! You will need to set out colored pencil and markers at this station. Kesler Science Station Lab Comets, Meteors, and Asteroids Teacher Directions Explore It! I will spend much of my time at this station making sure that the students are doing the orbits correctly. I have

More information

EXERCISE 12: IMPORTING LIDAR DATA INTO ARCGIS AND USING SPATIAL ANALYST TO MODEL FOREST STRUCTURE

EXERCISE 12: IMPORTING LIDAR DATA INTO ARCGIS AND USING SPATIAL ANALYST TO MODEL FOREST STRUCTURE EXERCISE 12: IMPORTING LIDAR DATA INTO ARCGIS AND USING SPATIAL ANALYST TO MODEL FOREST STRUCTURE Document Updated: December, 2007 Introduction This exercise is designed to provide you with possible silvicultural

More information

OUTLINE. Deterministic and Stochastic With spreadsheet program : Integrated Mathematics 2

OUTLINE. Deterministic and Stochastic With spreadsheet program : Integrated Mathematics 2 COMPUTER SIMULATION OUTLINE In this module, we will focus on the act simulation, taking mathematical models and implement them on computer systems. Simulation & Computer Simulations Mathematical (Simulation)

More information

BASIC TECHNOLOGY Pre K starts and shuts down computer, monitor, and printer E E D D P P P P P P P P P P

BASIC TECHNOLOGY Pre K starts and shuts down computer, monitor, and printer E E D D P P P P P P P P P P BASIC TECHNOLOGY Pre K 1 2 3 4 5 6 7 8 9 10 11 12 starts and shuts down computer, monitor, and printer P P P P P P practices responsible use and care of technology devices P P P P P P opens and quits an

More information

Dynamics of the Atmosphere GEMPAK Lab 3. 3) In-class exercise about geostrophic balance in the real atmosphere.

Dynamics of the Atmosphere GEMPAK Lab 3. 3) In-class exercise about geostrophic balance in the real atmosphere. Dynamics of the Atmosphere GEMPAK Lab 3 Goals of this lab: 1) Learn about Linux scripts. 2) Learn how to combine levels in GEMPAK functions. 3) In-class exercise about geostrophic balance in the real atmosphere.

More information

Lab 2: Photon Counting with a Photomultiplier Tube

Lab 2: Photon Counting with a Photomultiplier Tube Lab 2: Photon Counting with a Photomultiplier Tube 1 Introduction 1.1 Goals In this lab, you will investigate properties of light using a photomultiplier tube (PMT). You will assess the quantitative measurements

More information

Using the EartH2Observe data portal to analyse drought indicators. Lesson 4: Using Python Notebook to access and process data

Using the EartH2Observe data portal to analyse drought indicators. Lesson 4: Using Python Notebook to access and process data Using the EartH2Observe data portal to analyse drought indicators Lesson 4: Using Python Notebook to access and process data Preface In this fourth lesson you will again work with the Water Cycle Integrator

More information

Computational Physics (6810): Session 2

Computational Physics (6810): Session 2 Computational Physics (6810): Session 2 Dick Furnstahl Nuclear Theory Group OSU Physics Department January 13, 2017 Session 1 follow-ups Types of error Reminder of power laws Session 1 follow-ups Session

More information

MAT 343 Laboratory 6 The SVD decomposition and Image Compression

MAT 343 Laboratory 6 The SVD decomposition and Image Compression MA 4 Laboratory 6 he SVD decomposition and Image Compression In this laboratory session we will learn how to Find the SVD decomposition of a matrix using MALAB Use the SVD to perform Image Compression

More information

Looking hard at algebraic identities.

Looking hard at algebraic identities. Looking hard at algebraic identities. Written by Alastair Lupton and Anthony Harradine. Seeing Double Version 1.00 April 007. Written by Anthony Harradine and Alastair Lupton. Copyright Harradine and Lupton

More information

Okay now go back to your pyraf window

Okay now go back to your pyraf window PHYS 391 Astronomical Image Data: Measuring the Distance and Age of a Stellar Cluster Goals This lab is designed to demonstrate basic astronomy data analysis and how extracting stellar population information

More information

Teachers Guide. Overview

Teachers Guide. Overview Teachers Guide Overview BioLogica is multilevel courseware for genetics. All the levels are linked so that changes in one level are reflected in all the other levels. The BioLogica activities guide learners

More information

Manual 06 for MD++ Visualization. Keonwook Kang and Wei Cai. December 10, 2005

Manual 06 for MD++ Visualization. Keonwook Kang and Wei Cai. December 10, 2005 Manual 06 for MD++ Visualization Keonwook Kang and Wei Cai December 10, 2005 1 MD++ Visualization 1.1 Visualization Parameters In MD++, there are several parameters related with displaying the simulation

More information

Synteny Portal Documentation

Synteny Portal Documentation Synteny Portal Documentation Synteny Portal is a web application portal for visualizing, browsing, searching and building synteny blocks. Synteny Portal provides four main web applications: SynCircos,

More information

6. How Functions Work and Are Accessed. Topics: Modules and Functions More on Importing Call Frames

6. How Functions Work and Are Accessed. Topics: Modules and Functions More on Importing Call Frames 6. How Functions Work and Are Accessed Topics: Modules and Functions More on Importing Call Frames Let s Talk About Modules What Are They? M1.py A module is a.py file that contains Python code The name

More information

Chemistry 5021/8021 Computational Chemistry 3/4 Credits Spring Semester 2000 ( Due 4 / 3 / 00 )

Chemistry 5021/8021 Computational Chemistry 3/4 Credits Spring Semester 2000 ( Due 4 / 3 / 00 ) Chemistry 5021/8021 Computational Chemistry 3/4 Credits Spring Semester 2000 ( Due 4 / 3 / 00 ) This problem set will take longer than the last one in the sense that you may need to submit some jobs, leave,

More information

ncounter PlexSet Data Analysis Guidelines

ncounter PlexSet Data Analysis Guidelines ncounter PlexSet Data Analysis Guidelines NanoString Technologies, Inc. 530 airview Ave North Seattle, Washington 98109 USA Telephone: 206.378.6266 888.358.6266 E-mail: info@nanostring.com Molecules That

More information

Lecture 5b: Starting Matlab

Lecture 5b: Starting Matlab Lecture 5b: Starting Matlab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University August 7, 2013 Outline 1 Resources 2 Starting Matlab 3 Homework

More information

LAB 5: ROTATIONAL DYNAMICS

LAB 5: ROTATIONAL DYNAMICS 1 Name Date Day/Time of Lab Partner(s) Lab TA OBJECTIVES LAB 5: ROTATIONAL DYNAMICS To investigate and understand moment of inertia as it relates to rotational motion. To relate angular and linear position,

More information

Advanced Machine Learning Practical 4b Solution: Regression (BLR, GPR & Gradient Boosting)

Advanced Machine Learning Practical 4b Solution: Regression (BLR, GPR & Gradient Boosting) Advanced Machine Learning Practical 4b Solution: Regression (BLR, GPR & Gradient Boosting) Professor: Aude Billard Assistants: Nadia Figueroa, Ilaria Lauzana and Brice Platerrier E-mails: aude.billard@epfl.ch,

More information

ITC Expert User s Manual

ITC Expert User s Manual ITC Expert User s Manual 1 Section 1: ITC Expert Background... 3 Minimal Heats and Injections... 3 C Parameter... 3 C Limitations... 4 High C... 4 Low C... 6 Concentrations Ratio... 6 Section 2: ITC Expert

More information

GIS Workshop UCLS_Fall Forum 2014 Sowmya Selvarajan, PhD TABLE OF CONTENTS

GIS Workshop UCLS_Fall Forum 2014 Sowmya Selvarajan, PhD TABLE OF CONTENTS TABLE OF CONTENTS TITLE PAGE NO. 1. ArcGIS Basics I 2 a. Open and Save a Map Document 2 b. Work with Map Layers 2 c. Navigate in a Map Document 4 d. Measure Distances 4 2. ArcGIS Basics II 5 a. Work with

More information

At the start of the term, we saw the following formula for computing the sum of the first n integers:

At the start of the term, we saw the following formula for computing the sum of the first n integers: Chapter 11 Induction This chapter covers mathematical induction. 11.1 Introduction to induction At the start of the term, we saw the following formula for computing the sum of the first n integers: Claim

More information

You w i ll f ol l ow these st eps : Before opening files, the S c e n e panel is active.

You w i ll f ol l ow these st eps : Before opening files, the S c e n e panel is active. You w i ll f ol l ow these st eps : A. O pen a n i m a g e s t a c k. B. Tr a c e t h e d e n d r i t e w i t h t h e user-guided m ode. C. D e t e c t t h e s p i n e s a u t o m a t i c a l l y. D. C

More information

Section 7: Discriminant Analysis.

Section 7: Discriminant Analysis. Section 7: Discriminant Analysis. Ensure you have completed all previous worksheets before advancing. 1 Linear Discriminant Analysis To perform Linear Discriminant Analysis in R we will make use of the

More information

Department of Chemical Engineering University of California, Santa Barbara Spring Exercise 2. Due: Thursday, 4/19/09

Department of Chemical Engineering University of California, Santa Barbara Spring Exercise 2. Due: Thursday, 4/19/09 Department of Chemical Engineering ChE 210D University of California, Santa Barbara Spring 2012 Exercise 2 Due: Thursday, 4/19/09 Objective: To learn how to compile Fortran libraries for Python, and to

More information

Exploiting Virtual Observatory and Information Technology: Techniques for Astronomy

Exploiting Virtual Observatory and Information Technology: Techniques for Astronomy Exploiting Virtual Observatory and Information Technology: Techniques for Astronomy Lecture #6 Goal: VO Workflows Science Usage Nicholas Walton AstroGrid Project Scientist Institute of Astronomy, The University

More information