Pythontm CARLOS PEÑA ¿Qué Es Python? 2

Total Page:16

File Type:pdf, Size:1020Kb

Pythontm CARLOS PEÑA ¿Qué Es Python? 2 1 PythonTM CARLOS PEÑA ¿Qué es Python? 2 Python es un lenguaje de programación interpretado cuya filosofía hace hincapié en una sintaxis que favorezca un código legible. Se trata de un lenguaje de programación multiparadigma, ya que soporta orientación a objetos, programación imperativa y, en menor medida, programación funcional. Es un lenguaje multiplataforma. Posee una licencia de código abierto, denominada Python Software Foundation License, que es compatible con la Licencia pública general de GPL (General Public License) a partir de la versión 2.1.1. El intérprete de Python estándar incluye un modo interactivo en el cual se escriben las instrucciones en una especie de intérprete de comandos: las expresiones pueden ser introducidas una a una, pudiendo verse el resultado de su evaluación inmediatamente. Historia de Python 3 • Su nombre se debe a la comedia 1969 británica Monty Python Flying Circus • El holandés y creador Guido van Rossum publica el código. 1991 • Version 0.9.0 • Python 3.X 2009 Video Usos típicos de Python 4 Web Development: Django, Pyramid, Bottle, Tornado, Flask, web2py GUI Development: tkInter, PyGObject, PyQt, PySide, Kivy, wxPython Scientific and Numeric: SciPy, Pandas, IPython Software Development: Buildbot, Trac, Roundup System Administration: Ansible, Salt, OpenStack Versiones de Python 5 Hasta la fecha (Julio 2017) existen dos versiones disponibles de Python: (descargables en www.python.org) Python Python 2.X 3.X Año de Año de lanzamiento lanzamiento 2000 2009 Ultima Ultima versión versión 2.7.13 3.6.2 ¿Cómo Trabajar con Python? 6 Se puede trabajar desde un archivo de texto Es necesario generado por un block de descargar alguna notas con extensión “.py”, •Sublime Text “.pyc”, “.pyd”, “.pyo” o (recomendado) versión de Python “.pyw” para luego •Block de notas desde la pagina ejecutarse en el símbolo de oficial e instalarla en sistema llamando previamente a Python. el sistema operativo No es necesario (en la Se puede trabajar desde •ipython mayoría de los casos) algún paquete de •Spyder desarrollo en entorno tener instalada alguna Python. •Jupyter versión Python pues el desarrollador ya lo trae incluido Desarrolladores para Python 7 Locales Es necesario instalarlos en nuestros ordenadores para poder ejecutarlos. Anaconda, Enthought Canopy, PyCharm, entre otros… Onlines Son ejecutables desde algún navegador web como Chrome, Safari… Codeskulptor, SourceLair, Codecademi, entre otros… Portables Pueden ser ejecutados desde un disco externo. WinPython, ZePyzo, entre otros… Librerías para Python 8 Algunas librerías mas comunes para la ingeniería son: NumPy Bokeh np SciPy as Bokeh Math Numpy Random import MatplotLib Filosofía Python 9 Bello es mejor que feo. Explícito es mejor que implícito. Simple es mejor que complejo. Import Complejo es mejor que complicado. Plano es mejor que anidado. Disperso es mejor que denso. La legibilidad cuenta. this Los casos especiales no son tan especiales como para quebrantar las reglas. Lo práctico gana a lo puro. Los errores nunca deberían dejarse pasar silenciosamente. A menos que hayan sido silenciados explícitamente. Frente a la ambigüedad, rechaza la tentación de adivinar. Debería haber una -y preferiblemente sólo una- manera obvia de hacerlo. Aunque esa manera puede no ser obvia al principio a menos que usted sea holandés.15 Ahora es mejor que nunca. Aunque nunca es a menudo mejor que ya mismo. Si la implementación es difícil de explicar, es una mala idea. Si la implementación es fácil de explicar, puede que sea una buena idea. Los espacios de nombres (namespaces) son una gran idea ¡Hagamos más de esas cosas! Tipos de Datos 10 Tipo Clase Notas Ejemplo str Cadena Inmutable 'Cadena' unicode Cadena Versión Unicode de str u'Cadena' Mutable, puede list Secuencia contener objetos de [4.0, 'Cadena', True] diversos tipos Inmutable, puede tuple Secuencia contener objetos de (4.0, 'Cadena', True) diversos tipos Mutable, sin orden, no set([4.0, 'Cadena', set Conjunto contiene duplicados True]) Inmutable, sin orden, frozenset([4.0, frozenset Conjunto no contiene 'Cadena', True]) duplicados Grupo de pares {'key1': 1.0, 'key2': dict Mapping clave:valor False} Tipos de Datos 11 Tipo Clase Notas Ejemplo Precisión fija, int Número entero convertido en long en 42 caso de overflow. 42L ó 45696678615198 long Número entero Precisión arbitraria 7643L Coma flotante de float Número decimal 3.1415927 doble precisión Parte real y parte complex Número complejo (4.5 + 3j) imaginaria j. Valor booleano bool Booleano True o False verdadero o falso ¿Cuál versión de Python usaremos? 12 www.codeskulptor.org Desarrollado en Texas, USA por Scott Python 2.X Rixner, Profesor de Rice University Browser: Chrome, Posee las librerías Especial para la Safari, Mozilla. No OnLine necesarias para enseñanza compatible con comenzar Explorer Entorno Codeskulptor 13 URL: La ruta cambia cuando se presiona el botón de guardado Ejecutar: en este Documentación e botón se ejecuta información útil el código escrito acerca de en el editor funciones, librerías, estructuras, Guardado: en objetos. este botón se genera el URL único del código Modo VIZ: es una Descarga: forma de correr el permite la programa paso a descarga del paso desglosando código al cada secuencia. ordenador Útil para hallar errores Abrir: en este botón se abre el código guardado en el Demo: Contiene ordenador una buena cantidad de Refrescar: en ejemplos y códigos que pueden ser de este botón se Limpiar pantalla: en Pantalla de Pantalla de utilidad para el genera un nuevo este botón se limpia edición de ejecución de programador en URL para el la pantalla de comandos comandos código ejecución (derecha) etapa de aprendizaje Librerías Standard Modules 14 Disponibles Math Module Random Module en Collections Module – Default Dictionaries Codeskulptor Collections Module – Counters Regular Expression (re) Module Time Module Urllib2 Module Graphics Modules SimpleGUI Module – Frame SimpleGUI Module – Control Objects SimpleGUI Module – Canvas SimpleGUI Module – TImers SimpleGUI Module – Images SimpleGUI Module – Sounds SimpleGUI Module – Constants SimpleGUI Module – Maps SimpleGUI Module – Markers SimpleGUI Module – Lines SimplePlot Module Other Modules Numeric Module – Matrices CodeSkulptor Module 16 Python 2.7.13 SINTAXIS Y CONCEPTOS Nociones básicas 17 La representación de números en Python contempla los enteros, los decimales o punto flotantes: Enteros: Int >>> 1 -2 102 Decimales: Float >>> 2.0 11.5 0.1334 La function type() determina el tipo de objeto que se está manejando print type(4.0) <type ‘float’> La function int() convierte un número en entero mientras que float() lo convierte en decimal. print int(4.7), float(-19) 4 -19.0 Nociones básicas 18 Para imprimir en pantalla en la version Python 2.X se dispone del comando print: Por ejemplo para imprimir en pantalla una cadena de caracteres (string) se hace uso de comillas dobles o simples: print “hola” “hola” print ’hola’ ’hola’ Si deseamos imprimir algún número o varios al mismo tiempo se tienen dos posibilidades: 1. Se colocan tantos print como datos diferentes se tengan 2. Se separan los datos a imprimir por comas (,) de esta forma se imprimiran los datos de forma independiente pero uno al lado del otro. print -3 -3 print 5, 8.5, -102 5 8.5 -102 Nociones básicas 19 Para la definición de variables se tienen las siguientes reglas: 1. Se permite el uso de letras, números y underscore 2. No se puede comenzar un nombre con un número 3. Se distinguen minúsculas de mayúsculas 4. El símbolo “=“ le asigna el valor a la variable 5. Se puede modificar el valor de la variable a lo largo del código Cierto_Falso=True print Cierto_Falso True Edad_Raul=12 print Edad_Raul 12 Los comentarios en python se hacen con el símbolo “#”. Todo lo que sea escrito en la linea de código después de “#” no será tomado en cuenta por Python. Nociones básicas 20 Para la definición de variables se tienen las siguientes reglas (cont): 6. Se pueden definir más de una variable en una misma linea de código de la siguiente forma: #Variable1, Variable2,…, VariableN = Valor_Var1, Valor_Var2,…, Valor_VarN #Por ejemplo: X,Y=1, 5 P, Q, Z = 9.8 , -4 , 9+3 print Y 5 print Z 12 print Q -4 print X 1 Notemos que deben haber tantos valores como variables. De lo contrario obtendremos un error en la ejecución. Otra forma para crear dos variables con iguales valores: A=B= -3.1416 Nociones básicas 21 Palabras reservadas para Python* And exec Not Assert finally or Break for pass Class from print Continue global raise def if return del import try elif in while else is with except lambda yield *Estas palabras no pueden ser usadas como identificadores (nombres) de variables Nociones básicas 22 Operadores elementales Operación Símbolo Ejemplo Suma, 푎 + 푏 + 6+11 Resta, 푎 − 푏 - 7-2 Producto, 푎. 푏 * -5*4 División, 푎 푏 / 4.0/3.0 o 4/3 División entera, 푎 푏 // 4.0//3.0 o 4//3 Potencia, 푎푏 ** 5**7 Resto de la división de a % 5%4 y b (módulo) a%b Es importante destacar que Python en su versión 2.X arroja un valor entero de la división de dos enteros (por ejemplo 4/3=1), mientras que si al menos uno de los dos valores es decimal arrojará un valor decimal (por ejemplo 4.0/3 o 4/3.0 ambos=1.333333333). En la versión 3.X no es necesaria la distinción. Nociones básicas 23 Símbolo Operación > Mayor que >= Mayor o igual que < Menor que Relacionales <= Menor o igual que == Igual que != Distinto que <> Distinto que Operadores Operador Descripción A and B Retorna True si ambas expresiones son verdaderas A or B Retorna True si A o B es verdadera Lógicos not A Negado
Recommended publications
  • Access Full Issue
    ISSN 2520-2073 (print) ISSN 2521-442X (online) TRAINING, LANGUAGE AND CULTURE ‘Tell me and I forget. Teach me and I remember. Involve me and I learn’ ‒ Benjamin Franklin Vol. 4 Issue 4 2020 Issue DOI: 10.22363/2521-442X-2020-4-4 The quarterly journal published by Peoples’ Friendship University of Russia (RUDN University) ISSN 2520-2073 (print) AIMS AND SCOPE TRAINING, LANGUAGE AND CULTURE ISSN 2521-442X (online) Training, Language and Culture (TLC) is a peer-reviewed journal that aims to promote and disseminate research spanning the spectrum of language and linguistics, education and culture studies with a special focus on professional communication and professional discourse. Editorial Board of A quarterly journal published by RUDN University Training, Language and Culture invites research-based articles, reviews and editorials covering issues of relevance for the scientific and professional communities. EDITORIAL BOARD Dr Elena N. Malyuga Peoples’ Friendship University of Russia (RUDN University), Moscow, Russian Federation FOCUS AREAS Barry Tomalin Glasgow Caledonian University London, London, UK Training, Language and Culture covers the following areas of scholarly interest: theoretical and practical perspectives in language and linguistics; Dr Michael McCarthy University of Nottingham, Nottingham, UK culture studies; interpersonal and intercultural professional communication; language and culture teaching and training, including techniques and Dr Robert O’Dowd University of León, León, Spain technology, testing and assessment. Dr Elsa Huertas Barros University of Westminster, London, UK Dr Olga V. Aleksandrova Lomonosov Moscow State University, Moscow, Russian Federation LICENSING Dr Lilia K. Raitskaya Moscow State Institute of International Relations (MGIMO University), Moscow, Russian Federation All articles and book reviews published in Training, Language and Culture are licensed under a Creative Commons Attribution 4.0 International Li- Dr Alex Krouglov University College London, London, UK cense (CC BY 4.0).
    [Show full text]
  • WEB2PY Enterprise Web Framework (2Nd Edition)
    WEB2PY Enterprise Web Framework / 2nd Ed. Massimo Di Pierro Copyright ©2009 by Massimo Di Pierro. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600, or on the web at www.copyright.com. Requests to the Copyright owner for permission should be addressed to: Massimo Di Pierro School of Computing DePaul University 243 S Wabash Ave Chicago, IL 60604 (USA) Email: [email protected] Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created ore extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. Library of Congress Cataloging-in-Publication Data: WEB2PY: Enterprise Web Framework Printed in the United States of America.
    [Show full text]
  • Desarrollo De Una Aplicación Web De Gestión Colaborativa Para Un Club De Triatlón
    Escola Tècnica Superior d’Enginyeria Informàtica Universitat Politècnica de València Desarrollo de una aplicación web de gestión colaborativa para un club de triatlón Trabajo Fin de Grado Grado en Ingeniería Informática Autor: Jose Enrique Pérez Rubio Tutor/a: Manuela Albert Albiol Victoria Torres Bosch 2016 - 2017 Desarrollo de una aplicación web de gestión colaborativa para un club de triatlón 2 Resumen Se ha desarrollado una intranet para sustituir el actual método de contacto y navegación de los usuarios el cual es un foro. La nueva aplicación cuenta con más funcionalidades que no estaban disponibles anteriormente. La página web está desarrollada en web2py, un framework de Python. Como patrón de diseño para la implementación se utilizará el conocido Modelo Vista Controlador (MVC), arquitectura estándar hoy en día el cual separa los datos y la lógica de las vistas del usuario. Este diseño facilita el desarrollo y mantenimiento de las aplicaciones. Palabras clave: triatlón, intranet, web2py, framework, Python. MCV Abstract This Intranet has been developed to replace the current users contact and navigation method, nowadays it is a forum. The new application has more functionality than previously available. This web page is developed in Python web2py’s framework. As design for the implementation we'll be using the Model View Controller (MVC), standard architecture because it separates the data and the logic from user's view. This design improves the development and maintenance of applications. Keywords: triathlon, intranet, web2py, framework, Python, MVC 3 Desarrollo de una aplicación web de gestión colaborativa para un club de triatlón Agradecimientos Antes de nada, me gustaría dar las gracias a: Mis padres, por alentarme a continuar mi educación y han trabajado siempre muy duro para poder brindarme la oportunidad que ellos nunca tuvieron para poder continuar mis estudios.
    [Show full text]
  • Donovan Buccat
    Donovan Buccat 2129 Doxey Drive, San Jose, CA | 707-673-7184 | [email protected] linkedin.com/in/donovan-buccat | github.com/donovanbuccat | donovanbuccat.com d WORK EXPERIENCE Splashtop – San Jose, CA Technical Support Engineer, Mar 2020 – Present • Resolved 4500+ cases for businesses and customers of various professional backgrounds. • Troubleshot issues concerning remote access technology to facilitate a smooth work from home experience. • Provided technical support for escalations and high profile cases until resolution. • Analyzed logs to debug software issues with the macOS, linux, iOS, and Android development teams. • Created reports using JIRA for various bugs and assisted with migrations for the web development team. PROJECTS TagRide Application Full Stack Dev, Jan 2019 – June 2019 • Created a proficient front-end design for a mobile ridesharing application for iOS and Android. • Designed HTTP methods for creating driver and passenger confirmations for the server. • Constructed backend to store driver profiles, photos, and documentation as objects in Azure Cloud storage. • Designed the login page so it could fit on all devices. • Built using C#, Xamarin, and ASP.NET. • Executed all of the proper protocols in Agile including planning, sprints, and sprint reviews on team of six. Astrology Website Full Stack Dev, Mar 2018 – June 2018 • Focused on crafting visual elements of the website and also the forum which allowed people to post about their astrology signs. • Integrated tagging feature for forum posts into backend which allowed posts to be filtered by custom tags. • Built backend using python database abstraction layer to primarily store forum posts, photos, and profiles. • Utilized PythonAnywhere for hosting the full stack web application in the cloud.
    [Show full text]
  • Why We Use Django Rather Than Flask in Asset Management System
    9 VI June 2021 https://doi.org/10.22214/ijraset.2021.35756 International Journal for Research in Applied Science & Engineering Technology (IJRASET) ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.429 Volume 9 Issue VI Jun 2021- Available at www.ijraset.com Why we use Django rather than Flask in Asset Management System Anuj Kumar Sewani1, Chhavi Jain2, Chirag Palliwal3, Ekta Yadav4, Hemant Mittal5 1,2,3,4U.G. Students, B.Tech, 5Assistant Professor, Dept. of Computer Science & Engineering, Global Institute of Technology, Jaipur Abstract: Python provide number of frameworks for web development and other applications by Django, Flask, Bottle, Web2py, CherryPy and many more. Frameworks are efficient and versatile to build, test and optimize software. A web framework is a collection of package or module which allows us to develop web applications or services. It provides a foundation on which software developers can built a functional program for a specific platform. The main purpose of this study about python framework is to analyze which is better framework among Django or flask for web development. The study implement a practical approach on PyCharm. The result of this study is - “Django is better than flask”. I. INTRODUCTION Asset management refers to the process of developing, operating, maintaining, and selling assets in a cost-effective manner. Most commonly used in finance, the term is used in reference to individuals or firms that manage assets on behalf of individuals or other entities. Asset Management System are used to manage all the assets of a company, we can use this software to manage assets in any field i.e.
    [Show full text]
  • 3 Overview of Landslide in India
    A SELECTED ANNOTATED BIBLIOGRAPHY AND BIBLIOGRAPHY ON LANDSLIDES IN INDIA Compiled by Surya Parkash and Anil Kathait NATIONAL INSTITUTE OF DISASTER MANAGEMENT Ministry of Home Affairs, Government of India 5-B, I.P. Estate, M.G. Road New Delhi – 110 002 Table of Contents S. No. Content Page No. Foreword ii Preface iii Acknowledgement iv 1. Background 1 2. About Landslides 2 3. Overview of Landslides in India 5 4. Annotated Bibliography 9 5. Bibliography 87 6. List of Publications / Periodicals related to landslides 109 7. Web links for landslide publications 111 8. Glossary 113 9. Index 115 i Foreword The document on “A Selected Annotated Bibliography and Bibliography on Landslides in India” is prepared to provide a source of inventory for those who are interested in the landslide subject or willing to do research on it. It is a compilation of the available literature and research work pursued on Indian landslides. American Psychological Association (APA) citation style, one of the most used citation method is used for the referring the research work. The annotated bibliography and bibliography are placed in alphabetical order. The document has been formulated by Dr. Surya Parkash, Associate Professor, NIDM. It is divided in two parts: annotated bibliography and bibliography. Annotated bibliography is provided with the summary of the research work carried by the researcher. NIDM acknowledges the valuable support from all resource persons and institutes for providing technical inputs on the document and reviewing the same at various stages of preparation and publication. ii Preface The contemplation of available literature or research work carried out on any subject facilitates in understanding that particular subject.
    [Show full text]
  • An Analysis of CSRF Defenses in Web Frameworks
    Where We Stand (or Fall): An Analysis of CSRF Defenses in Web Frameworks Xhelal Likaj Soheil Khodayari Giancarlo Pellegrino Saarland University CISPA Helmholtz Center for CISPA Helmholtz Center for Saarbruecken, Germany Information Security Information Security [email protected] Saarbruecken, Germany Saarbruecken, Germany [email protected] [email protected] Abstract Keywords Cross-Site Request Forgery (CSRF) is among the oldest web vul- CSRF, Defenses, Web Frameworks nerabilities that, despite its popularity and severity, it is still an ACM Reference Format: understudied security problem. In this paper, we undertake one Xhelal Likaj, Soheil Khodayari, and Giancarlo Pellegrino. 2021. Where We of the first security evaluations of CSRF defense as implemented Stand (or Fall): An Analysis of CSRF Defenses in Web Frameworks. In by popular web frameworks, with the overarching goal to identify Proceedings of ACM Conference (Conference’17). ACM, New York, NY, USA, additional explanations to the occurrences of such an old vulner- 16 pages. https://doi.org/10.1145/nnnnnnn.nnnnnnn ability. Starting from a review of existing literature, we identify 16 CSRF defenses and 18 potential threats agains them. Then, we 1 Introduction evaluate the source code of the 44 most popular web frameworks Cross-Site Request Forgery (CSRF) is among the oldest web vul- across five languages (i.e., JavaScript, Python, Java, PHP, andC#) nerabilities, consistently ranked as one of the top ten threats to covering about 5.5 million LoCs, intending to determine the imple- web applications [88]. Successful CSRF exploitations could cause re- mented defenses and their exposure to the identified threats. We mote code execution [111], user accounts take-over [85, 87, 90, 122], also quantify the quality of web frameworks’ documentation, look- or compromise of database integrity—to name only a few in- ing for incomplete, misleading, or insufficient information required stances.
    [Show full text]
  • A Presentation Service for Rapidly Building Interactive Collaborative Web Applications
    A Presentation Service for Rapidly Building Interactive Collaborative Web Applications SCIENTIA MANU E T MENTE A thesis submitted to the School of Computer Science University College University of New South Wales Australian Defence Force Academy for the degree of Doctor of Philosophy By Michael Joseph Sweeney 31 March 2008 c Copyright 2008 by Michael Joseph Sweeney i Certi¯cate of Originality I hereby declare that this submission is my own work and that, to the best of my knowledge and belief, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma at UNSW or any other educational institution, except where due acknowledgement is made in the thesis. Any contribution made to the research by colleagues, with whom I have worked at UNSW or elsewhere, during my candidature, is fully acknowledged. I also declare that the intellectual content of this thesis is the product of my own work, except to the extent that assistance from others in the project's design and conception or in style, presentation and linguistic expression is acknowledged. Michael Joseph Sweeney ii Abstract Web applications have become a large segment of the software development domain but their rapid rise in popularity has far exceeded the support in software engineer- ing. There are many tools and techniques for web application development, but the developer must still learn and use many complex protocols and languages. Products still closely bind data operations, business logic, and the user interface, limiting integration and interoperability.
    [Show full text]
  • Evaluation of Password Hashing Schemes in Open Source Web
    Evaluation of Password Hashing Schemes in Open Source Web Platforms Christoforos Ntantogian, Stefanos Malliaros, Christos Xenakis Department of Digital Systems, University of Piraeus, Piraeus, Greece {dadoyan, stefmal, xenakis}@unipi.gr Abstract: Nowadays, the majority of web platforms in the Internet originate either from CMS to easily deploy websites or by web applications frameworks that allow developers to design and implement web applications. Considering the fact that CMS are intended to be plug and play solutions and their main aim is to allow even non-developers to deploy websites, we argue that the default hashing schemes are not modified when deployed in the Internet. Also, recent studies suggest that even developers do not use appropriate hash functions to protect passwords, since they may not have adequate security expertise. Therefore, the default settings of CMS and web applications frameworks play an important role in the security of password storage. This paper evaluates the default hashing schemes of popular CMS and web application frameworks. First, we formulate the cost time of password guessing attacks and next we investigate the default hashing schemes of popular CMS and web applications frameworks. We also apply our framework to perform a comparative analysis of the cost time between the various CMS and web application frameworks. Finally, considering that intensive hash functions consume computational resources, we analyze hashing schemes from a different perspective. That is, we investigate if it is feasible and under what conditions to perform slow rate denial of service attacks from concurrent login attempts. Through our study we have derived a set of critical observations.
    [Show full text]
  • Business Uses for Python & IBM I
    Business uses for Python & IBM i Mike Pavlak – IT Strategist [email protected] A little background, please What is Python, really? ■ General purpose language ■ Easy to get started ■ Simple syntax ■ Great for integrations (glue between systems) ■ Access to C and other APIs ■ Infrastructure first, but applications, too 4 Historically… ■ Python was conceptualized by Guido Van Rossum in the late 1980’s ■ Rossum published the first version of Python code (0.9.0) in February of 1991 at the CWI(Centrum Wiskunde & Informatica) in the Netherlands, Amsterdam ■ Python is derived from the ABC programming language, which is a general purpose language that was also developed at CWI. ■ Rossum chose the name “Python” since he was a fan of Monty Python’s Flying Circus. ■ Python is now maintained by a core development team at the institute, although Rossum still holds a vital role in directing its progress and as leading “commitor”. 5 Python lineage ■ Python 1 – 1994 ■ Python 2 – 2000 (Not dead yet…) ▶2,7 – 2010 ■ Python 3 – 2008 ▶3.5 – 2015 ▶3.6.2 – July 2017 ▶3.7 ➔ ETA July 2018 6 Why use it? Academia ■ 1970’s ▶COBOL, Basic ■ 1980’s ▶Pascal, Delphi ■ 1990’s ▶Java ■ 2000 ▶Python & Open Source 8 Carnegie Mellon ■ School discovered that students understood OO ▶But could not build a logic loop to save their soul! ■ Robert Harper, professor of CS writes: “Object-oriented programming is eliminated entirely from the introductory curriculum, because it is both anti-modular and anti- parallel by its very nature, and hence unsuitable for a modern
    [Show full text]
  • Development of a Competition Web Service for Attitude Estimation Algorithms
    Development of a Competition Web Service for Attitude Estimation Algorithms Sam Osenieks u4677151 Supervised by Dr. Jochen Trumpf November 2013 A thesis submitted in part fulfilment of the degree of Bachelor of Engineering Department of Engineering Australian National University This thesis contains no material which has been accepted for the award of any other degree or diploma in any university. To the best of the author’s knowledge, it contains no material previously published or written by another person, except where due reference is made in the text. Sam Osenieks 1 November 2013 © Sam Osenieks ABSTRACT Attitude estimation algorithms can vary greatly, being based around various sensor measurements which relate to the intended application of an algorithm. As such, it can be difficult to find relevant attitude estimation algorithms to benchmark newly developed methods against, or to find an ideal existing solution for a given application. The goal of this work was to develop a competition web service which would allow researchers and engineers to more easily compare attitude estimation solutions. The system was designed to be robust and secure. It aims to supply a variety of functions and features to aid comparisons, all of which will be built about the concept of a leaderboard where attitude estimation algorithms are ranked against each other for given datasets and quality measures. This paper focuses on the design of such a system, along with a web proof of concept for some important features. i CONTENTS List of Figures ......................................................................................................................................................
    [Show full text]
  • Enterprise Web Framework This Document Is an Overview of New Features in 1.63
    web2py Enterprise Web Framework this document is an overview of new features in 1.63 Startup Interface Download and click! No Installation No Dependencies No Configuration Runs Everywhere including Google App Engine Web Based Admin Interface Login Manage Apps Create Apps Design Apps Test/Debug Mercurial Integration Web Based Admin Interface receive web2py announcements from twitter be notified of upgrades web2py Architecture Each app has its own database administrative interface welcome admin examples user app app app apps (scaffolding) gluon (session, request, response, cookies, security, template language, database abstraction layer, caching, errors, routes, upload/download streaming, internationalization, etc.) cherrypy wsgi web server handlers www mod_proxy cgi, fcgi, mod_python, mod_wsgi Web Based Admin Interface type “images” Web Based Admin Interface click to run The Scaffolding App click to go back The Scaffolding App App Authentication Custom Menu Quick Links The Scaffolding App click to EDIT Edit an App Metadata what is this app about? what is this license? Edit an App click to toggle Edit your Models click for database admin Models describe the “data representation” of you app db.py connects to DB, defines tables, Auth, Crud (edit this file to add tables) menu.py defines menus for the scaffoling app (can be removed if not needed) Edit your Controllers click to ajax shell or run doctests Controllers describe the workflow of your app default.py is the default (entry point) controller of your app appadmin.py defines a database administrative interface for your app (appadmin) click on [test] to run all doctests online Edit your Views adds ajax capabilities Each function in controller returns a dictionary that is rendered by a view file.
    [Show full text]