WorldWideScience

Sample records for python scripting language

  1. PyMOOSE: interoperable scripting in Python for MOOSE

    Directory of Open Access Journals (Sweden)

    Subhasis Ray

    2008-12-01

    Full Text Available Python is emerging as a common scripting language for simulators. This opens up many possibilities for interoperability in the form of analysis, interfaces, and communications between simulators. We report the integration of Python scripting with the Multi-scale Object Oriented Simulation Environment (MOOSE. MOOSE is a general-purpose simulation system for compartmental neuronal models and for models of signaling pathways based on chemical kinetics. We show how the Python-scripting version of MOOSE, PyMOOSE, combines the power of a compiled simulator with the versatility and ease of use of Python. We illustrate this by using Python numerical libraries to analyze MOOSE output online, and by developing a GUI in Python/Qt for a MOOSE simulation. Finally, we build and run a composite neuronal/signaling model that uses both the NEURON and MOOSE numerical engines, and Python as a bridge between the two. Thus PyMOOSE has a high degree of interoperability with analysis routines, with graphical toolkits, and with other simulators.

  2. Python GUI Scripting Interface for Running Atomic Physics Applications

    OpenAIRE

    Tahat, Amani; Tahat, Mofleh

    2011-01-01

    We create a Python GUI scripting interface working under Windows in addition to (UNIX/Linux). The GUI has been built around the Python open-source programming language. We use the Python's GUI library that so called Python Mega Widgets (PMW) and based on Tkinter Python module (http://www.freenetpages.co.uk/hp/alan.gauld/tutgui.htm). The new GUI was motivated primarily by the desire of more updated operations, more flexibility incorporating future and current improvements in producing atomic d...

  3. WekaPyScript: Classification, Regression, and Filter Schemes for WEKA Implemented in Python

    Directory of Open Access Journals (Sweden)

    Christopher Beckham

    2016-08-01

    Full Text Available WekaPyScript is a package for the machine learning software WEKA that allows learning algorithms and preprocessing methods for classification and regression to be written in Python, as opposed to WEKA’s implementation language, Java. This opens up WEKA to its machine learning and scientific computing ecosystem. Furthermore, due to Python’s minimalist syntax, learning algorithms and preprocessing methods can be prototyped easily and utilised from within WEKA. WekaPyScript works by running a local Python server using the host’s installation of Python; as a result, any libraries installed in the host installation can be leveraged when writing a script for WekaPyScript. Three example scripts (two learning algorithms and one preprocessing method are presented.

  4. Scripting MODFLOW model development using Python and FloPy

    Science.gov (United States)

    Bakker, Mark; Post, Vincent E. A.; Langevin, Christian D.; Hughes, Joseph D.; White, Jeremy; Starn, Jeffrey; Fienen, Michael N.

    2016-01-01

    Graphical user interfaces (GUIs) are commonly used to construct and postprocess numerical groundwater flow and transport models. Scripting model development with the programming language Python is presented here as an alternative approach. One advantage of Python is that there are many packages available to facilitate the model development process, including packages for plotting, array manipulation, optimization, and data analysis. For MODFLOW-based models, the FloPy package was developed by the authors to construct model input files, run the model, and read and plot simulation results. Use of Python with the available scientific packages and FloPy facilitates data exploration, alternative model evaluations, and model analyses that can be difficult to perform with GUIs. Furthermore, Python scripts are a complete, transparent, and repeatable record of the modeling process. The approach is introduced with a simple FloPy example to create and postprocess a MODFLOW model. A more complicated capture-fraction analysis with a real-world model is presented to demonstrate the types of analyses that can be performed using Python and FloPy.

  5. Using Scripting Languages to Teach Programming

    OpenAIRE

    Syropoulos, Apostolos; Stavrianos, Athanasios

    2014-01-01

    Nowadays, scripting programming languages like Python, Perl and Ruby are widely used in system programming, scientific computing, etc. Although solving a particular problem in these languages requires less time, less programming effort, and less concepts to be taught to achieve the desired goal, still they are not used as teaching tools. Therefore, the use of scripting languages as a teaching vehicle for programming course is very promising. On the other hand, GUI programming, when performed ...

  6. Learning Python

    National Research Council Canada - National Science Library

    Lutz, Mark; Ascher, David

    1999-01-01

    ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Part I. Getting Started 1. A Python Q&A Session Why Do People Use Python? Is Python a Scripting Language? Okay, But What's the Downside? Who Uses Python Today...

  7. Learning Python

    National Research Council Canada - National Science Library

    Lutz, Mark; Ascher, David

    2004-01-01

    ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Part I. Getting Started 1. A Python Q&A Session Why Do People Use Python? Is Python a Scripting Language? Okay, But What's the Downside? Who Uses Python Today...

  8. Implementation of Private Cloud Computing Using Integration of JavaScript and Python

    Directory of Open Access Journals (Sweden)

    2010-09-01

    Full Text Available

    This paper deals with the design and deployment of a novel library class in Python, enabling the use of JavaScript functionalities in Application Programming and the leveraging of this Library into development for third generation technologies such as Private Cloud Computing. The integration of these two prevalent languages provides us with a new level of compliance which helps in developing an understanding between Web Programming and Application Programming. An inter-browser functionality wrapping, which would enable users to have a JavaScript experience in Python interfaces directly, without having to depend on external programs, has been developed. The functionality of this concept is prevalent in the fact that Applications written in JavaScript and accessed on the browser now have the capability of interacting with each other on a common platform with the help of a Python wrapper. The idea is demonstrated by the integrating with the now ubiquitous Cloud Computing concept. With the help of examples, we have showcased the same and explained how the Library XOCOM can be a stepping stone to flexible cloud computing environment.

  9. Python for Ecology

    Science.gov (United States)

    Python is a high-level scripting language that is becoming increasingly popular for scientific computing. This all-day workshop is designed to introduce the basics of Python programming to ecologists. Some scripting/programming experience is recommended (e.g. familiarity with R)....

  10. Python library reference

    NARCIS (Netherlands)

    G. van Rossum (Guido)

    1995-01-01

    textabstractPython is an extensible, interpreted, object-oriented programming language. It supports a wide range of applications, from simple text processing scripts to interactive WWW browsers. While the Python Reference Manual describes the exact syntax and semantics of the language, it does not

  11. Pro Android Python with SL4A Writing Android Native Apps Using Python, Lua, and Beanshell

    CERN Document Server

    Ferrill, Paul

    2011-01-01

    Pro Android Python with SL4A is for programmers and hobbyists who want to write apps for Android devices without having to learn Java first. Paul Ferrill leads you from installing the Scripting Layer for Android (SL4A) to writing small scripts, to more complicated and interesting projects, and finally to uploading and packaging your programs to an Android device. Android runs scripts in many scripting languages, but Python, Lua, and Beanshell are particularly popular. Most programmers know more than one programming language, so that they have the best tool for whatever task they want to accomp

  12. Programming Python

    CERN Document Server

    Lutz, Mark

    2011-01-01

    If you've mastered Python's fundamentals, you're ready to start using it to get real work done. Programming Python will show you how, with in-depth tutorials on the language's primary application domains: system administration, GUIs, and the Web. You'll also explore how Python is used in databases, networking, front-end scripting layers, text processing, and more. This book focuses on commonly used tools and libraries to give you a comprehensive understanding of Python's many roles in practical, real-world programming. You'll learn language syntax and programming techniques in a clear and co

  13. Revising the worksheet with L3: a language and environment foruser-script interaction

    Energy Technology Data Exchange (ETDEWEB)

    Hohn, Michael H.

    2008-01-22

    This paper describes a novel approach to the parameter anddata handling issues commonly found in experimental scientific computingand scripting in general. The approach is based on the familiarcombination of scripting language and user interface, but using alanguage expressly designed for user interaction and convenience. The L3language combines programming facilities of procedural and functionallanguages with the persistence and need-based evaluation of data flowlanguages. It is implemented in Python, has access to all Pythonlibraries, and retains almost complete source code compatibility to allowsimple movement of code between the languages. The worksheet interfaceuses metadata produced by L3 to provide selection of values through thescriptit self and allow users to dynamically evolve scripts withoutre-running the prior versions. Scripts can be edited via text editors ormanipulated as structures on a drawing canvas. Computed values are validscripts and can be used further in other scripts via simplecopy-and-paste operations. The implementation is freely available underan open-source license.

  14. Python scripting in the Nengo simulator

    Directory of Open Access Journals (Sweden)

    Terrence C Stewart

    2009-03-01

    Full Text Available Nengo is an open-source neural simulator that has been greatly enhanced by the recent addition of a Python script interface. Nengo provides a wide range of features that are useful for physiological simulations, including unique features that facilitate development of population-coding models using the Neural Engineering Framework (NEF. This framework uses information theory, signal processing, and control theory to formalize the development of large-scale neural circuit models. Notably, it can also be used to determine the synaptic weights that underlie observed network dynamics and transformations of represented variables. Nengo provides rich NEF support, and includes customizable models of spike generation, muscle dynamics, synaptic plasticity, and synaptic integration, as well as an intuitive graphical user interface. All aspects of Nengo models are accessible via the Python interface, allowing for programmatic creation of models, inspection and modification of neural parameters, and automation of model evaluation. Since Nengo combines Python and Java, it can also be integrated with any existing Java or 100% Python code libraries. Current work includes connecting neural models in Nengo with existing symbolic cognitive models, creating hybrid systems that combine detailed neural models of specific brain regions with higher-level models of remaining brain areas. Such hybrid models can provide 1 more realistic boundary conditions for the neural components, and 2 more realistic sub-components for the larger cognitive models.

  15. Python scripting in the nengo simulator.

    Science.gov (United States)

    Stewart, Terrence C; Tripp, Bryan; Eliasmith, Chris

    2009-01-01

    Nengo (http://nengo.ca) is an open-source neural simulator that has been greatly enhanced by the recent addition of a Python script interface. Nengo provides a wide range of features that are useful for physiological simulations, including unique features that facilitate development of population-coding models using the neural engineering framework (NEF). This framework uses information theory, signal processing, and control theory to formalize the development of large-scale neural circuit models. Notably, it can also be used to determine the synaptic weights that underlie observed network dynamics and transformations of represented variables. Nengo provides rich NEF support, and includes customizable models of spike generation, muscle dynamics, synaptic plasticity, and synaptic integration, as well as an intuitive graphical user interface. All aspects of Nengo models are accessible via the Python interface, allowing for programmatic creation of models, inspection and modification of neural parameters, and automation of model evaluation. Since Nengo combines Python and Java, it can also be integrated with any existing Java or 100% Python code libraries. Current work includes connecting neural models in Nengo with existing symbolic cognitive models, creating hybrid systems that combine detailed neural models of specific brain regions with higher-level models of remaining brain areas. Such hybrid models can provide (1) more realistic boundary conditions for the neural components, and (2) more realistic sub-components for the larger cognitive models.

  16. Beginning Python using Python 2.6 and Python 3.1

    CERN Document Server

    Payne, James

    2010-01-01

    Beginning Python: Using Python 2.6 and Python 3.1 introduces this open source, portable, interpreted, object-oriented programming language that combines remarkable power with clear syntax. This book enables you to quickly create robust, reliable, and reusable Python applications by teaching the basics so you can quickly develop Web and scientific applications, incorporate databases, and master systems tasks on various operating systems, including Linux, MAC OS, and Windows. You’ll get a comprehensive tutorial that guides you from writing simple, basic Python scripts all the way through complex concepts, and also features a reference of the standard modules with examples illustrating how to implement features in the various modules. Plus, the book covers using Python in specific program development domains, such as XML, databases, scientific applications, network programming, and Web development

  17. Obtaining and processing Daymet data using Python and ArcGIS

    Science.gov (United States)

    Bohms, Stefanie

    2013-01-01

    This set of scripts was developed to automate the process of downloading and mosaicking daily Daymet data to a user defined extent using ArcGIS and Python programming language. The three steps are downloading the needed Daymet tiles for the study area extent, converting the netcdf file to a tif raster format, and mosaicking those rasters to one file. The set of scripts is intended for all levels of experience with Python programming language and requires no scripting by the user.

  18. Automating tasks in protein structure determination with the clipper python module.

    Science.gov (United States)

    McNicholas, Stuart; Croll, Tristan; Burnley, Tom; Palmer, Colin M; Hoh, Soon Wen; Jenkins, Huw T; Dodson, Eleanor; Cowtan, Kevin; Agirre, Jon

    2018-01-01

    Scripting programming languages provide the fastest means of prototyping complex functionality. Those with a syntax and grammar resembling human language also greatly enhance the maintainability of the produced source code. Furthermore, the combination of a powerful, machine-independent scripting language with binary libraries tailored for each computer architecture allows programs to break free from the tight boundaries of efficiency traditionally associated with scripts. In the present work, we describe how an efficient C++ crystallographic library such as Clipper can be wrapped, adapted and generalized for use in both crystallographic and electron cryo-microscopy applications, scripted with the Python language. We shall also place an emphasis on best practices in automation, illustrating how this can be achieved with this new Python module. © 2017 The Authors Protein Science published by Wiley Periodicals, Inc. on behalf of The Protein Society.

  19. OpenSeesPy: Python library for the OpenSees finite element framework

    Science.gov (United States)

    Zhu, Minjie; McKenna, Frank; Scott, Michael H.

    2018-01-01

    OpenSees, an open source finite element software framework, has been used broadly in the earthquake engineering community for simulating the seismic response of structural and geotechnical systems. The framework allows users to perform finite element analysis with a scripting language and for developers to create both serial and parallel finite element computer applications as interpreters. For the last 15 years, Tcl has been the primary scripting language to which the model building and analysis modules of OpenSees are linked. To provide users with different scripting language options, particularly Python, the OpenSees interpreter interface was refactored to provide multi-interpreter capabilities. This refactoring, resulting in the creation of OpenSeesPy as a Python module, is accomplished through an abstract interface for interpreter calls with concrete implementations for different scripting languages. Through this approach, users are able to develop applications that utilize the unique features of several scripting languages while taking advantage of advanced finite element analysis models and algorithms.

  20. TEACHING ALGORITHMIZATION AND PROGRAMMING USING PYTHON LANGUAGE

    Directory of Open Access Journals (Sweden)

    M. Lvov

    2014-07-01

    Full Text Available The article describes requirements to educational programming languages and considers the use of Python as the first programming language. The issues of introduction of this programming language into teaching and replacing Pascal by Python are examined. The advantages of such approach are regarded. The comparison of popular programming languages is represented from the point of view of their convenience of use for teaching algorithmization and programming. Python supports lots of programming paradigms: structural, object-oriented, functional, imperative and aspect-oriented, and learning can be started without any preparation. There is one more advantage of the language: all algorithms are written easily and structurally in Python. Therefore, due to all mentioned above, it is possible to affirm that Python pretends to become a decent replacement for educational programming language PASCAL both at schools and on the first courses of higher education establishments.

  1. p3d--Python module for structural bioinformatics.

    Science.gov (United States)

    Fufezan, Christian; Specht, Michael

    2009-08-21

    High-throughput bioinformatic analysis tools are needed to mine the large amount of structural data via knowledge based approaches. The development of such tools requires a robust interface to access the structural data in an easy way. For this the Python scripting language is the optimal choice since its philosophy is to write an understandable source code. p3d is an object oriented Python module that adds a simple yet powerful interface to the Python interpreter to process and analyse three dimensional protein structure files (PDB files). p3d's strength arises from the combination of a) very fast spatial access to the structural data due to the implementation of a binary space partitioning (BSP) tree, b) set theory and c) functions that allow to combine a and b and that use human readable language in the search queries rather than complex computer language. All these factors combined facilitate the rapid development of bioinformatic tools that can perform quick and complex analyses of protein structures. p3d is the perfect tool to quickly develop tools for structural bioinformatics using the Python scripting language.

  2. Introduction to Python for CMF Authority Users

    Energy Technology Data Exchange (ETDEWEB)

    Pritchett-Sheats, Lori A. [Los Alamos National Lab. (LANL), Los Alamos, NM (United States)

    2017-03-14

    This talk is a very broad over view of Python that highlights key features in the language used in the Common Model Framework (CMF). I assume that the audience has some programming experience in a shell scripting language (C shell, Bash, PERL) or other high level language (C/C++/ Fortran). The talk will cover Python data types, classes (objects) and basic programming constructs. The talk concludes with slides describing how I developed the basic classes for a TITANS homework assignment.

  3. Pybel: a Python wrapper for the OpenBabel cheminformatics toolkit

    Directory of Open Access Journals (Sweden)

    Morley Chris

    2008-03-01

    Full Text Available Abstract Background Scripting languages such as Python are ideally suited to common programming tasks in cheminformatics such as data analysis and parsing information from files. However, for reasons of efficiency, cheminformatics toolkits such as the OpenBabel toolkit are often implemented in compiled languages such as C++. We describe Pybel, a Python module that provides access to the OpenBabel toolkit. Results Pybel wraps the direct toolkit bindings to simplify common tasks such as reading and writing molecular files and calculating fingerprints. Extensive use is made of Python iterators to simplify loops such as that over all the molecules in a file. A Pybel Molecule can be easily interconverted to an OpenBabel OBMol to access those methods or attributes not wrapped by Pybel. Conclusion Pybel allows cheminformaticians to rapidly develop Python scripts that manipulate chemical information. It is open source, available cross-platform, and offers the power of the OpenBabel toolkit to Python programmers.

  4. p3d – Python module for structural bioinformatics

    Directory of Open Access Journals (Sweden)

    Fufezan Christian

    2009-08-01

    Full Text Available Abstract Background High-throughput bioinformatic analysis tools are needed to mine the large amount of structural data via knowledge based approaches. The development of such tools requires a robust interface to access the structural data in an easy way. For this the Python scripting language is the optimal choice since its philosophy is to write an understandable source code. Results p3d is an object oriented Python module that adds a simple yet powerful interface to the Python interpreter to process and analyse three dimensional protein structure files (PDB files. p3d's strength arises from the combination of a very fast spatial access to the structural data due to the implementation of a binary space partitioning (BSP tree, b set theory and c functions that allow to combine a and b and that use human readable language in the search queries rather than complex computer language. All these factors combined facilitate the rapid development of bioinformatic tools that can perform quick and complex analyses of protein structures. Conclusion p3d is the perfect tool to quickly develop tools for structural bioinformatics using the Python scripting language.

  5. Python as a federation tool for GENESIS 3.0.

    Directory of Open Access Journals (Sweden)

    Hugo Cornelis

    Full Text Available The GENESIS simulation platform was one of the first broad-scale modeling systems in computational biology to encourage modelers to develop and share model features and components. Supported by a large developer community, it participated in innovative simulator technologies such as benchmarking, parallelization, and declarative model specification and was the first neural simulator to define bindings for the Python scripting language. An important feature of the latest version of GENESIS is that it decomposes into self-contained software components complying with the Computational Biology Initiative federated software architecture. This architecture allows separate scripting bindings to be defined for different necessary components of the simulator, e.g., the mathematical solvers and graphical user interface. Python is a scripting language that provides rich sets of freely available open source libraries. With clean dynamic object-oriented designs, they produce highly readable code and are widely employed in specialized areas of software component integration. We employ a simplified wrapper and interface generator to examine an application programming interface and make it available to a given scripting language. This allows independent software components to be 'glued' together and connected to external libraries and applications from user-defined Python or Perl scripts. We illustrate our approach with three examples of Python scripting. (1 Generate and run a simple single-compartment model neuron connected to a stand-alone mathematical solver. (2 Interface a mathematical solver with GENESIS 3.0 to explore a neuron morphology from either an interactive command-line or graphical user interface. (3 Apply scripting bindings to connect the GENESIS 3.0 simulator to external graphical libraries and an open source three dimensional content creation suite that supports visualization of models based on electron microscopy and their conversion to

  6. Python as a federation tool for GENESIS 3.0.

    Science.gov (United States)

    Cornelis, Hugo; Rodriguez, Armando L; Coop, Allan D; Bower, James M

    2012-01-01

    The GENESIS simulation platform was one of the first broad-scale modeling systems in computational biology to encourage modelers to develop and share model features and components. Supported by a large developer community, it participated in innovative simulator technologies such as benchmarking, parallelization, and declarative model specification and was the first neural simulator to define bindings for the Python scripting language. An important feature of the latest version of GENESIS is that it decomposes into self-contained software components complying with the Computational Biology Initiative federated software architecture. This architecture allows separate scripting bindings to be defined for different necessary components of the simulator, e.g., the mathematical solvers and graphical user interface. Python is a scripting language that provides rich sets of freely available open source libraries. With clean dynamic object-oriented designs, they produce highly readable code and are widely employed in specialized areas of software component integration. We employ a simplified wrapper and interface generator to examine an application programming interface and make it available to a given scripting language. This allows independent software components to be 'glued' together and connected to external libraries and applications from user-defined Python or Perl scripts. We illustrate our approach with three examples of Python scripting. (1) Generate and run a simple single-compartment model neuron connected to a stand-alone mathematical solver. (2) Interface a mathematical solver with GENESIS 3.0 to explore a neuron morphology from either an interactive command-line or graphical user interface. (3) Apply scripting bindings to connect the GENESIS 3.0 simulator to external graphical libraries and an open source three dimensional content creation suite that supports visualization of models based on electron microscopy and their conversion to computational models

  7. Accessing the VO with Python

    Science.gov (United States)

    Plante, R.; Fitzpatrick, M.; Graham, M.; Tody, D.; Young, W.

    2014-05-01

    We introduce two products for accessing the VO from Python: PyVO and VOClient. PyVO is built on the widely-used Astropy package and is well suited for integrating automated access to astronomical data into highly customizable scripts and applications for data analysis in Python. VOClient is built on a collection of C-libraries and is well suited for integrating with multi-language analysis packages. It also provides a framework for integrating legacy software into the Python environment. In this demo, we will run through several examples demonstrate basic data discovery and retrieval of data. This includes finding archives containing data of interest (VO registry), retrieving datasets (SIA, SSA), and exploring (Cone Search, SLAP). VOClient features some extended capabilities including the ability to communicate to other desktop applications from a script using the SAMP protocol.

  8. A 3d game in python

    OpenAIRE

    Xu, Minghui

    2014-01-01

    3D game has widely been accepted and loved by many game players. More and more different kinds of 3D games were developed to feed people’s needs. The most common programming language for development of 3D game is C++ nowadays. Python is a high-level scripting language. It is simple and clear. The concise syntax could speed up the development cycle. This project was to develop a 3D game using only Python. The game is about how a cat lives in the street. In order to live, the player need...

  9. Scripting DRAGON

    International Nuclear Information System (INIS)

    Hebert, A.

    2002-01-01

    The paper describes an user-oriented framework specifically designed to facilitate the use of legacy Fortran codes similar to Dragon. The basic idea is to use a bytecode interpreted language as a glue to link all the components required by the end user. This scripting approach is illustrated with Dragon, where we have replaced the control language CLE-2000 with a bytecode interpreted language, without having to modify Dragon. We have shown how Python or Java can be used to link the Dragon modules together and to construct an object-oriented user interface. Python or Java can also be used to construct execution procedures, calculation schemes and graphical user interfaces. Java was finally selected as the most interesting choice. This approach can be used with other legacy Fortran codes, as soon as their input/output data structures are Dragon-compatible. The only modification required on Fortran code is the replacement of some common blocks by associative tables, already available with the LCM application programming interface. (author)

  10. A New Python Library for Spectroscopic Analysis with MIDAS Style

    Science.gov (United States)

    Song, Y.; Luo, A.; Zhao, Y.

    2013-10-01

    The ESO MIDAS is a system for astronomers to analyze data which many astronomers are using. Python is a high level script language and there are many applications for astronomical data process. We are releasing a new Python library which realizes some MIDAS commands in Python. People can use it to write a MIDAS style Python code. We call it PydasLib. It is a Python library based on ESO MIDAS functions, which is easily used by astronomers who are familiar with the usage of MIDAS.

  11. A student's guide to Python for physical modeling

    CERN Document Server

    Kinder, Jesse M

    2015-01-01

    Python is a computer programming language that is rapidly gaining popularity throughout the sciences. A Student’s Guide to Python for Physical Modeling aims to help you, the student, teach yourself enough of the Python programming language to get started with physical modeling. You will learn how to install an open-source Python programming environment and use it to accomplish many common scientific computing tasks: importing, exporting, and visualizing data; numerical analysis; and simulation. No prior programming experience is assumed. This tutorial focuses on fundamentals and introduces a wide range of useful techniques, including: Basic Python programming and scripting Numerical arrays Two- and three-dimensional graphics Monte Carlo simulations Numerical methods, including solving ordinary differential equations Image processing Animation Numerous code samples and exercises—with solutions—illustrate new ideas as they are introduced. A website that accompanies this guide provides additional resourc...

  12. Querying and Serving N-gram Language Models with Python

    Directory of Open Access Journals (Sweden)

    2009-06-01

    Full Text Available Statistical n-gram language modeling is a very important technique in Natural Language Processing (NLP and Computational Linguistics used to assess the fluency of an utterance in any given language. It is widely employed in several important NLP applications such as Machine Translation and Automatic Speech Recognition. However, the most commonly used toolkit (SRILM to build such language models on a large scale is written entirely in C++ which presents a challenge to an NLP developer or researcher whose primary language of choice is Python. This article first provides a gentle introduction to statistical language modeling. It then describes how to build a native and efficient Python interface (using SWIG to the SRILM toolkit such that language models can be queried and used directly in Python code. Finally, it also demonstrates an effective use case of this interface by showing how to leverage it to build a Python language model server. Such a server can prove to be extremely useful when the language model needs to be queried by multiple clients over a network: the language model must only be loaded into memory once by the server and can then satisfy multiple requests. This article includes only those listings of source code that are most salient. To conserve space, some are only presented in excerpted form. The complete set of full source code listings may be found in Volume 1 of The Python Papers Source Codes Journal.

  13. PyXNAT: XNAT in Python

    Directory of Open Access Journals (Sweden)

    Yannick eSchwartz

    2012-05-01

    Full Text Available As neuroimaging databases grow in size and complexity, the time researchers spend investigating and managing the data increases to the expense of data analysis. As a result, investigators rely more and more heavily on scripting using high-level languages to automate data management and processing tasks. For this, a structured and programatic access to the data store is necessary. Web services are a first step toward this goal. They however lack in functionality and ease of use because they provide only low level interfaces to databases. We introduce here {PyXNAT}, a Python module that interacts with The Extensible Neuroimaging Archive Toolkit (XNAT through native Python calls across multiple operating systems. The choice of Python enables {PyXNAT} to expose the XNAT Web Services and unify their features with a higher level and more expressive language. {PyXNAT} provides XNAT users direct access to all the scientific packages in Python. Finally {PyXNAT} aims to be efficient and easy to use, both as a backend library to build XNAT clients and as an alternative frontend from the command line.

  14. PyXNAT: XNAT in Python.

    Science.gov (United States)

    Schwartz, Yannick; Barbot, Alexis; Thyreau, Benjamin; Frouin, Vincent; Varoquaux, Gaël; Siram, Aditya; Marcus, Daniel S; Poline, Jean-Baptiste

    2012-01-01

    As neuroimaging databases grow in size and complexity, the time researchers spend investigating and managing the data increases to the expense of data analysis. As a result, investigators rely more and more heavily on scripting using high-level languages to automate data management and processing tasks. For this, a structured and programmatic access to the data store is necessary. Web services are a first step toward this goal. They however lack in functionality and ease of use because they provide only low-level interfaces to databases. We introduce here PyXNAT, a Python module that interacts with The Extensible Neuroimaging Archive Toolkit (XNAT) through native Python calls across multiple operating systems. The choice of Python enables PyXNAT to expose the XNAT Web Services and unify their features with a higher level and more expressive language. PyXNAT provides XNAT users direct access to all the scientific packages in Python. Finally PyXNAT aims to be efficient and easy to use, both as a back-end library to build XNAT clients and as an alternative front-end from the command line.

  15. Flexible Environmental Modeling with Python and Open - GIS

    Science.gov (United States)

    Pryet, Alexandre; Atteia, Olivier; Delottier, Hugo; Cousquer, Yohann

    2015-04-01

    Numerical modeling now represents a prominent task of environmental studies. During the last decades, numerous commercial programs have been made available to environmental modelers. These software applications offer user-friendly graphical user interfaces that allow an efficient management of many case studies. However, they suffer from a lack of flexibility and closed-source policies impede source code reviewing and enhancement for original studies. Advanced modeling studies require flexible tools capable of managing thousands of model runs for parameter optimization, uncertainty and sensitivity analysis. In addition, there is a growing need for the coupling of various numerical models associating, for instance, groundwater flow modeling to multi-species geochemical reactions. Researchers have produced hundreds of open-source powerful command line programs. However, there is a need for a flexible graphical user interface allowing an efficient processing of geospatial data that comes along any environmental study. Here, we present the advantages of using the free and open-source Qgis platform and the Python scripting language for conducting environmental modeling studies. The interactive graphical user interface is first used for the visualization and pre-processing of input geospatial datasets. Python scripting language is then employed for further input data processing, call to one or several models, and post-processing of model outputs. Model results are eventually sent back to the GIS program, processed and visualized. This approach combines the advantages of interactive graphical interfaces and the flexibility of Python scripting language for data processing and model calls. The numerous python modules available facilitate geospatial data processing and numerical analysis of model outputs. Once input data has been prepared with the graphical user interface, models may be run thousands of times from the command line with sequential or parallel calls. We

  16. Usage of the Python programming language in the CMS experiment

    International Nuclear Information System (INIS)

    Wilkinson, R; Hegner, B; Jones, C D

    2010-01-01

    Being a highly dynamic language and allowing reliable programming with quick turnarounds, Python is a widely used programming language in CMS. Most of the tools used in workflow management and the GRID interface tools are written in this language. Also most of the tools used in the context of release management: integration builds, release building and deploying, as well as performance measurements are in Python. With an interface to the CMS data formats, rapid prototyping of analyses and debugging is an additional use case. Finally in 2008 the CMS experiment switched to using Python as its configuration language. This paper will give an overview of the general usage of Python in the CMS experiment and discuss which features of the language make it well-suited for the existing use cases.

  17. LicenseScript: A Novel Digital Rights Language

    NARCIS (Netherlands)

    Chong, C.N.; Corin, R.J.; Etalle, Sandro; Hartel, Pieter H.; Law, Y.W.; Grimm, R.; Nitzel, J.

    We propose LicenseScript as a new multi-set rewriting/logic based language for expressing dynamic conditions of use of digital assets such as music, video or private data. LicenseScript differs from the other DRM languages in that it caters for the intentional but legal manipulation of data. We

  18. Leveraging Python Interoperability Tools to Improve Sapphire's Usability

    Energy Technology Data Exchange (ETDEWEB)

    Gezahegne, A; Love, N S

    2007-12-10

    The Sapphire project at the Center for Applied Scientific Computing (CASC) develops and applies an extensive set of data mining algorithms for the analysis of large data sets. Sapphire's algorithms are currently available as a set of C++ libraries. However many users prefer higher level scripting languages such as Python for their ease of use and flexibility. In this report, we evaluate four interoperability tools for the purpose of wrapping Sapphire's core functionality with Python. Exposing Sapphire's functionality through a Python interface would increase its usability and connect its algorithms to existing Python tools.

  19. Rapid web development using AJAX and Python

    Energy Technology Data Exchange (ETDEWEB)

    Dolgert, A; Gibbons, L; Kuznetsov, V [Cornell University, Ithaca, NY 14853 (United States)], E-mail: vkuznet@gmail.com

    2008-07-15

    We discuss the rapid development of a large scale data discovery service for the CMS experiment using modern AJAX techniques and the Python language. To implement a flexible interface capable of accommodating several different versions of the DBS database, we used a 'stack' approach. Asynchronous JavaScript and XML (AJAX) together with an SQL abstraction layer, template engine, code generation tool and dynamic queries provide powerful tools for constructing interactive interfaces to large amounts of data. We show how the use of these tools, with rapid development in a modern scripting language, improved the scalability and usability of the the search interface for different user communities.

  20. Rapid web development using AJAX and Python

    International Nuclear Information System (INIS)

    Dolgert, A; Gibbons, L; Kuznetsov, V

    2008-01-01

    We discuss the rapid development of a large scale data discovery service for the CMS experiment using modern AJAX techniques and the Python language. To implement a flexible interface capable of accommodating several different versions of the DBS database, we used a 'stack' approach. Asynchronous JavaScript and XML (AJAX) together with an SQL abstraction layer, template engine, code generation tool and dynamic queries provide powerful tools for constructing interactive interfaces to large amounts of data. We show how the use of these tools, with rapid development in a modern scripting language, improved the scalability and usability of the the search interface for different user communities

  1. ParselTongue: AIPS Talking Python

    Science.gov (United States)

    Kettenis, M.; van Langevelde, H. J.; Reynolds, C.; Cotton, B.

    2006-07-01

    After more than 20 years of service, classic AIPS still is the data reduction package of choice for many radio-interferometry projects, especially for VLBI. Its age shows, most prominently in the limited scripting capabilities of its user interface: POPS. ParselTongue is an attempt to make the trusted AIPS algorithms and AIPS data structures available in a modern dynamic programming language: Python. It also provides an environment to do distributed computing to take advantage of modern computing clusters. This makes it suitable for use as a scripting interface for doing complicated data reduction on large data sets. It is also used as a coding platform for the new calibration algorithms that are being developed for the European VLBI Network as part of the ALBUS project. Here we hope to take advantage of Python's extensive support for web-based technologies to automate things like collecting calibration data.

  2. LicenseScript: A Logical Language for Digital Rights Management

    NARCIS (Netherlands)

    Chong, C.N.; Corin, R.J.; Doumen, J.M.; Etalle, Sandro; Hartel, Pieter H.; Law, Y.W.; Tokmakoff, Andrew

    We propose LicenseScript, a language for digital rights management (DRM) based on multiset rewriting and logic programming. LicenseScript enjoys a precise syntax and semantics, and it is rich enough to embed other rights expression languages (REL). We show that LicenseScript is expressive and

  3. NMRbot: Python scripts enable high-throughput data collection on current Bruker BioSpin NMR spectrometers.

    Science.gov (United States)

    Clos, Lawrence J; Jofre, M Fransisca; Ellinger, James J; Westler, William M; Markley, John L

    2013-06-01

    To facilitate the high-throughput acquisition of nuclear magnetic resonance (NMR) experimental data on large sets of samples, we have developed a simple and straightforward automated methodology that capitalizes on recent advances in Bruker BioSpin NMR spectrometer hardware and software. Given the daunting challenge for non-NMR experts to collect quality spectra, our goal was to increase user accessibility, provide customized functionality, and improve the consistency and reliability of resultant data. This methodology, NMRbot, is encoded in a set of scripts written in the Python programming language accessible within the Bruker BioSpin TopSpin ™ software. NMRbot improves automated data acquisition and offers novel tools for use in optimizing experimental parameters on the fly. This automated procedure has been successfully implemented for investigations in metabolomics, small-molecule library profiling, and protein-ligand titrations on four Bruker BioSpin NMR spectrometers at the National Magnetic Resonance Facility at Madison. The investigators reported benefits from ease of setup, improved spectral quality, convenient customizations, and overall time savings.

  4. Python as First Textual Programming Language in Secondary Education

    Directory of Open Access Journals (Sweden)

    José Carlos GARCÍA MONSÁLVEZ

    2017-07-01

    Full Text Available With the recent introduction of Programming in the K-12 curricula there is an opportunity to include Computer Science fundamental concepts. This paper presents the origin and evolution of Python as well as their main features that configure it as an ideal programming language. We also review and classify some educational tools in the Python ecosystem. Such tools cover a wide-open spectrum of resources from interactive books to libraries which ease the construction of student elaborated software artefacts. This work presents a multidisciplinary proposal to use the Python programming language in all levels of Secondary Stage.

  5. Python programming language and the effectiveness of its inclusion in the teaching

    OpenAIRE

    Vitásek, Tomáš

    2009-01-01

    The goal of the first part of this work is to summarize the basics of the Python programming language. Show how to create programs in Python, what are the modules, the basic data types, syntax and the possibility of approach to language. The second part will address the description of the initial programming courses, their objectives and what benefits it brings to teaching Python. Finally, then look at the (in)dependence on the Python platform for running and how to get from Python to another...

  6. PyORBIT: A Python Shell For ORBIT

    Energy Technology Data Exchange (ETDEWEB)

    Jean-Francois Ostiguy; Jeffrey Holmes

    2003-07-01

    ORBIT is code developed at SNS to simulate beam dynamics in accumulation rings and synchrotrons. The code is structured as a collection of external C++ modules for SuperCode, a high level interpreter shell developed at LLNL in the early 1990s. SuperCode is no longer actively supported and there has for some time been interest in replacing it by a modern scripting language, while preserving the feel of the original ORBIT program. In this paper, we describe a new version of ORBIT where the role of SuperCode is assumed by Python, a free, well-documented and widely supported object-oriented scripting language. We also compare PyORBIT to ORBIT from the standpoint of features, performance and future expandability.

  7. PyORBIT: A Python Shell For ORBIT

    International Nuclear Information System (INIS)

    Jean-Francois Ostiguy; Jeffrey Holmes

    2003-01-01

    ORBIT is code developed at SNS to simulate beam dynamics in accumulation rings and synchrotrons. The code is structured as a collection of external C++ modules for SuperCode, a high level interpreter shell developed at LLNL in the early 1990s. SuperCode is no longer actively supported and there has for some time been interest in replacing it by a modern scripting language, while preserving the feel of the original ORBIT program. In this paper, we describe a new version of ORBIT where the role of SuperCode is assumed by Python, a free, well-documented and widely supported object-oriented scripting language. We also compare PyORBIT to ORBIT from the standpoint of features, performance and future expandability

  8. Simplifying the parallelization of scientific codes by a function-centric approach in Python

    International Nuclear Information System (INIS)

    Nilsen, Jon K; Cai Xing; Langtangen, Hans Petter; Hoeyland, Bjoern

    2010-01-01

    The purpose of this paper is to show how existing scientific software can be parallelized using a separate thin layer of Python code where all parallelization-specific tasks are implemented. We provide specific examples of such a Python code layer, which can act as templates for parallelizing a wide set of serial scientific codes. The use of Python for parallelization is motivated by the fact that the language is well suited for reusing existing serial codes programmed in other languages. The extreme flexibility of Python with regard to handling functions makes it very easy to wrap up decomposed computational tasks of a serial scientific application as Python functions. Many parallelization-specific components can be implemented as generic Python functions, which may take as input those wrapped functions that perform concrete computational tasks. The overall programming effort needed by this parallelization approach is limited, and the resulting parallel Python scripts have a compact and clean structure. The usefulness of the parallelization approach is exemplified by three different classes of application in natural and social sciences.

  9. A Python interface to Diffpack-based classes and solvers

    OpenAIRE

    Munthe-Kaas, Heidi Vikki

    2013-01-01

    Python is a programming language that has gained a lot of popularity during the last 15 years, and as a very easy-to-learn and flexible scripting language it is very well suited for computa- tional science, both in mathematics and in physics. Diffpack is a PDE library written in C++, made for easier implementation of both smaller PDE solvers and for larger libraries of simu- lators. It contains large class hierarchies for different solvers, grids, arrays, parallel computing and almost everyth...

  10. An intuitive Python interface for Bioconductor libraries demonstrates the utility of language translators

    DEFF Research Database (Denmark)

    Gautier, Laurent

    2010-01-01

    time, Python has matured as a rich and reliable language for the agile development of prototypes or final implementations, as well as for handling large data sets. Results The data structures and functions from Bioconductor can be exposed to Python as a regular library. This allows a fully transparent...... and native use of Bioconductor from Python, without one having to know the R language and with only a small community of translators required to know both. To demonstrate this, we have implemented such Python representations for key infrastructure packages in Bioconductor, letting a Python programmer handle...... annotation data, microarray data, and next-generation sequencing data. Conclusions Bioconductor is now not solely reserved to R users. Building a Python application using Bioconductor functionality can be done just like if Bioconductor was a Python package....

  11. COMPARISON OF PYTHON (AN OPEN SOURCE PROGRAMMING LANGUAGE) WITH OTHER PROGRAMMING LANGUAGES

    OpenAIRE

    Sushil Kumar*1 & Richa Aggarwal2

    2018-01-01

    Language is a communication tool through which we can communicate with each other like Hindi, English etc any other language. So if we want to communicate with computer, we need computer programming languages. So in computer we have two types of languages, one is low level language which is easily understood by computer but difficult to learn. Second is high level language which is same like English language, not understood by computer but easy to learn. Python is a high level language. This...

  12. pyGeno: A Python package for precision medicine and proteogenomics.

    Science.gov (United States)

    Daouda, Tariq; Perreault, Claude; Lemieux, Sébastien

    2016-01-01

    pyGeno is a Python package mainly intended for precision medicine applications that revolve around genomics and proteomics. It integrates reference sequences and annotations from Ensembl, genomic polymorphisms from the dbSNP database and data from next-gen sequencing into an easy to use, memory-efficient and fast framework, therefore allowing the user to easily explore subject-specific genomes and proteomes. Compared to a standalone program, pyGeno gives the user access to the complete expressivity of Python, a general programming language. Its range of application therefore encompasses both short scripts and large scale genome-wide studies.

  13. Psyplot: Visualizing rectangular and triangular Climate Model Data with Python

    Science.gov (United States)

    Sommer, Philipp

    2016-04-01

    The development and use of climate models often requires the visualization of geo-referenced data. Creating visualizations should be fast, attractive, flexible, easily applicable and easily reproducible. There is a wide range of software tools available for visualizing raster data, but they often are inaccessible to many users (e.g. because they are difficult to use in a script or have low flexibility). In order to facilitate easy visualization of geo-referenced data, we developed a new framework called "psyplot," which can aid earth system scientists with their daily work. It is purely written in the programming language Python and primarily built upon the python packages matplotlib, cartopy and xray. The package can visualize data stored on the hard disk (e.g. NetCDF, GeoTIFF, any other file format supported by the xray package), or directly from the memory or Climate Data Operators (CDOs). Furthermore, data can be visualized on a rectangular grid (following or not following the CF Conventions) and on a triangular grid (following the CF or UGRID Conventions). Psyplot visualizes 2D scalar and vector fields, enabling the user to easily manage and format multiple plots at the same time, and to export the plots into all common picture formats and movies covered by the matplotlib package. The package can currently be used in an interactive python session or in python scripts, and will soon be developed for use with a graphical user interface (GUI). Finally, the psyplot framework enables flexible configuration, allows easy integration into other scripts that uses matplotlib, and provides a flexible foundation for further development.

  14. Static Analysis of Dynamic Languages

    DEFF Research Database (Denmark)

    Madsen, Magnus

    Dynamic programming languages are highly popular and widely used. Java- Script is often called the lingua franca of the web and it is the de facto standard for client-side web programming. On the server-side the PHP, Python and Ruby languages are prevalent. What these languages have in common...... with static type systems, such as Java and C# , but the same features are rarely available for dynamic languages such as JavaScript. The aim of this thesis is to investigate techniques for improving the tool- support for dynamic programming languages without imposing any artificial restrictions...... of new dataflow analysis techniques to tackle the nature of dynamic programming languages....

  15. A Python extension to the ATLAS online software for the thin gap chamber trigger system

    CERN Document Server

    Maeno, Tadashi; Komatsu, Satoru; Nakayoshi, Kazuo; Yasu, Yoshiji

    2004-01-01

    A Python extension module for A Toroidal LHC Apparatus (ATLAS) Online Software has been developed for the Thin Gap Chamber (TGC) trigger system. Python is an interactive scripting language including built- in high-level libraries, and provides an easy way to build Web applications. These features are not included in the Online Software, and are important in developing test software for the TGC trigger system. The Python extension module is designed and implemented using a C++ library, "Boost.Python." We have developed a Web application using the extension module and Zope (a Python-based Web application server), which allows one to monitor the TGC trigger system from anywhere in the world. The functionalities of the Python extension module and its application for the TGC trigger system are presented. 7 Refs.

  16. Python essential reference

    CERN Document Server

    Beazley, David M

    2009-01-01

    Python Essential Reference is the definitive reference guide to the Python programming language — the one authoritative handbook that reliably untangles and explains both the core Python language and the most essential parts of the Python library. Designed for the professional programmer, the book is concise, to the point, and highly accessible. It also includes detailed information on the Python library and many advanced subjects that is not available in either the official Python documentation or any other single reference source. Thoroughly updated to reflect the significant new programming language features and library modules that have been introduced in Python 2.6 and Python 3, the fourth edition of Python Essential Reference is the definitive guide for programmers who need to modernize existing Python code or who are planning an eventual migration to Python 3. Programmers starting a new Python project will find detailed coverage of contemporary Python programming idioms.

  17. JavaScript and JSON essentials

    CERN Document Server

    Sriparasa, Sai

    2013-01-01

    The book follows a tutorial-based approach and will teach you how to work with JSON tools, design JSON objects, and how to use different techniques to handle JSON data.This book is a great resource for developers who would like to learn more about JSON and who wish to apply it in their own projects. It will be useful to have some prior knowledge of HTML and JavaScript to help you understand the concepts covered in this book. Some familiarity with a server-side language such as PHP, C#, or Python would also be beneficial, but this is not compulsory.

  18. LISp-Miner Control Language description of scripting language implementation

    Directory of Open Access Journals (Sweden)

    Milan Simunek

    2014-04-01

    Full Text Available This paper introduces the LISp-Miner Control Language – a scripting language for the LISp-Miner system, an academic system for knowledge discovery in databases. The main purpose of this language is to provide programmable means to all the features of the LISp-Miner system and mainly to automate the main phases of data mining – from data introduction and preprocessing, formulation of analytical tasks, to discovery of the most interesting patterns. In this sense, the language is a necessary prerequisite for the EverMiner project of data mining automation. Language will serve other purposes too – for an automated verification of the LISp-Miner system functionality before a new version is released and as an educational tool in advanced data mining courses.

  19. CVXPY: A Python-Embedded Modeling Language for Convex Optimization

    OpenAIRE

    Diamond, Steven; Boyd, Stephen

    2016-01-01

    CVXPY is a domain-specific language for convex optimization embedded in Python. It allows the user to express convex optimization problems in a natural syntax that follows the math, rather than in the restrictive standard form required by solvers. CVXPY makes it easy to combine convex optimization with high-level features of Python such as parallelism and object-oriented design. CVXPY is available at http://www.cvxpy.org/ under the GPL license, along with documentation and examples.

  20. CVXPY: A Python-Embedded Modeling Language for Convex Optimization.

    Science.gov (United States)

    Diamond, Steven; Boyd, Stephen

    2016-04-01

    CVXPY is a domain-specific language for convex optimization embedded in Python. It allows the user to express convex optimization problems in a natural syntax that follows the math, rather than in the restrictive standard form required by solvers. CVXPY makes it easy to combine convex optimization with high-level features of Python such as parallelism and object-oriented design. CVXPY is available at http://www.cvxpy.org/ under the GPL license, along with documentation and examples.

  1. The atomic simulation environment-a Python library for working with atoms.

    Science.gov (United States)

    Hjorth Larsen, Ask; Jørgen Mortensen, Jens; Blomqvist, Jakob; Castelli, Ivano E; Christensen, Rune; Dułak, Marcin; Friis, Jesper; Groves, Michael N; Hammer, Bjørk; Hargus, Cory; Hermes, Eric D; Jennings, Paul C; Bjerre Jensen, Peter; Kermode, James; Kitchin, John R; Leonhard Kolsbjerg, Esben; Kubal, Joseph; Kaasbjerg, Kristen; Lysgaard, Steen; Bergmann Maronsson, Jón; Maxson, Tristan; Olsen, Thomas; Pastewka, Lars; Peterson, Andrew; Rostgaard, Carsten; Schiøtz, Jakob; Schütt, Ole; Strange, Mikkel; Thygesen, Kristian S; Vegge, Tejs; Vilhelmsen, Lasse; Walter, Michael; Zeng, Zhenhua; Jacobsen, Karsten W

    2017-07-12

    The atomic simulation environment (ASE) is a software package written in the Python programming language with the aim of setting up, steering, and analyzing atomistic simulations. In ASE, tasks are fully scripted in Python. The powerful syntax of Python combined with the NumPy array library make it possible to perform very complex simulation tasks. For example, a sequence of calculations may be performed with the use of a simple 'for-loop' construction. Calculations of energy, forces, stresses and other quantities are performed through interfaces to many external electronic structure codes or force fields using a uniform interface. On top of this calculator interface, ASE provides modules for performing many standard simulation tasks such as structure optimization, molecular dynamics, handling of constraints and performing nudged elastic band calculations.

  2. The Python ARM Radar Toolkit (Py-ART), a Library for Working with Weather Radar Data in the Python Programming Language

    OpenAIRE

    Helmus, Jonathan J; Collis, Scott M

    2016-01-01

    The Python ARM Radar Toolkit is a package for reading, visualizing, correcting and analysing data from weather radars. Development began to meet the needs of the Atmospheric Radiation Measurement Climate Research Facility and has since expanded to provide a general-purpose framework for working with data from weather radars in the Python programming language. The toolkit is built on top of libraries in the Scientific Python ecosystem including NumPy, SciPy, and matplotlib, and makes use of Cy...

  3. Python pocket reference, version 2.4

    CERN Document Server

    Lutz, Mark

    2005-01-01

    Python is optimized for quality, productivity, portability, and integration. Hundreds of thousands of Python developers around the world rely on Python for general-purpose tasks, Internet scripting, systems programming, user interfaces, and product customization. Available on all major computing platforms, including commercial versions of Unix, Linux, Windows, and Mac OS X, Python is portable, powerful and remarkable easy to use. With its convenient, quick-reference format, Python Pocket Reference, 3rd Edition is the perfect on-the-job reference. More importantly, it's now been refreshed

  4. On the Performance of the Python Programming Language for Serial and Parallel Scientific Computations

    Directory of Open Access Journals (Sweden)

    Xing Cai

    2005-01-01

    Full Text Available This article addresses the performance of scientific applications that use the Python programming language. First, we investigate several techniques for improving the computational efficiency of serial Python codes. Then, we discuss the basic programming techniques in Python for parallelizing serial scientific applications. It is shown that an efficient implementation of the array-related operations is essential for achieving good parallel performance, as for the serial case. Once the array-related operations are efficiently implemented, probably using a mixed-language implementation, good serial and parallel performance become achievable. This is confirmed by a set of numerical experiments. Python is also shown to be well suited for writing high-level parallel programs.

  5. X Python reference manual

    NARCIS (Netherlands)

    K.S. Mullender (Sjoerd)

    1995-01-01

    textabstractThis document describes the built-in types, exceptions, and functions of the X windows extension to Python. It assumes basic knowledge about the Python language and access to the X windows documentation. For an informal introduction to the language, see the Python Tutorial. The Python

  6. The definitive guide to Jython Python for the Java platform

    CERN Document Server

    Juneau, Josh; Ng, Victor; Soto, Leo; Wierzbicki, Frank

    2010-01-01

    Jython is an open source implementation of the high-level, dynamic, object-oriented scripting language Python seamlessly integrated with the Java platform. The predecessor to Jython, JPython, is certified as 100% Pure Java. Jython is freely available for both commercial and noncommercial use and is distributed with source code. Jython is complementary to Java. The Definitive Guide to Jython, written by the official Jython team leads, covers the latest Jython 2.5 (or 2.5.x) from the basics to the advanced features. This book begins with a brief introduction to the language and then journeys thr

  7. Programming ArcGIS 10.1 with Python cookbook

    CERN Document Server

    Pimpler, Eric

    2013-01-01

    This book is written in a helpful, practical style with numerous hands-on recipes and chapters to help you save time and effort by using Python to power ArcGIS to create shortcuts, scripts, tools, and customizations.""Programming ArcGIS 10.1 with Python Cookbook"" is written for GIS professionals who wish to revolutionize their ArcGIS workflow with Python. Basic Python or programming knowledge is essential(?).

  8. Scripting language design and the implementation test for PSO-GA ...

    African Journals Online (AJOL)

    ... the Characters of Code (COC) are measured in order to test the easiness of the programming language. The results show that across all algorithms, the scripting language is anticipated to enable easy programming which has been presented by the very less number of COC compared to the JAVA programming language.

  9. PyMidas: Interface from Python to Midas

    Science.gov (United States)

    Maisala, Sami; Oittinen, Tero

    2014-01-01

    PyMidas is an interface between Python and MIDAS, the major ESO legacy general purpose data processing system. PyMidas allows a user to exploit both the rich legacy of MIDAS software and the power of Python scripting in a unified interactive environment. PyMidas also allows the usage of other Python-based astronomical analysis systems such as PyRAF.

  10. Learning Python

    CERN Document Server

    Lutz, Mark

    2009-01-01

    Google and YouTube use Python because it's highly adaptable, easy to maintain, and allows for rapid development. If you want to write high-quality, efficient code that's easily integrated with other languages and tools, this hands-on book will help you be productive with Python quickly -- whether you're new to programming or just new to Python. It's an easy-to-follow self-paced tutorial, based on author and Python expert Mark Lutz's popular training course. Each chapter contains a stand-alone lesson on a key component of the language, and includes a unique Test Your Knowledge section with p

  11. TH-D-BRB-04: Pinnacle Scripting: Improving Efficiency While Maintaining Safety

    Energy Technology Data Exchange (ETDEWEB)

    Moore, J. [Johns Hopkins University (United States)

    2016-06-15

    Scripting capabilities and application programming interfaces (APIs) are becoming commonly available in modern treatment planning systems. These links to the treatment planning system (TPS) allow users to read data from the TPS, and in some cases use TPS functionality and write data back to the TPS. Such tools are powerful extensions, allowing automation of routine clinical tasks and supporting research, particularly research involving repetitive tasks on large patient populations. The data and functionality exposed by scripting/API capabilities is vendor dependent, as are the languages used by script/API engines, such as the Microsoft .NET framework or Python. Scripts deployed in a clinical environment must be commissioned and validated like any other software tool. This session will provide an overview of scripting applications and a discussion of best practices, followed by a practical introduction to the scripting capabilities of three commercial treatment planning systems. Learning Objectives: Understand the scripting capabilities available in several treatment planning systems Learn how to get started using scripting capabilities Understand the best practices for safe script deployment in a clinical environment R. Popple, Varian Medical Systems has provided research support unrelated to the topic of this session.R. Cardan, Varian Medical Systems for grant research, product evaluation, and teaching honorarium.

  12. TH-D-BRB-04: Pinnacle Scripting: Improving Efficiency While Maintaining Safety

    International Nuclear Information System (INIS)

    Moore, J.

    2016-01-01

    Scripting capabilities and application programming interfaces (APIs) are becoming commonly available in modern treatment planning systems. These links to the treatment planning system (TPS) allow users to read data from the TPS, and in some cases use TPS functionality and write data back to the TPS. Such tools are powerful extensions, allowing automation of routine clinical tasks and supporting research, particularly research involving repetitive tasks on large patient populations. The data and functionality exposed by scripting/API capabilities is vendor dependent, as are the languages used by script/API engines, such as the Microsoft .NET framework or Python. Scripts deployed in a clinical environment must be commissioned and validated like any other software tool. This session will provide an overview of scripting applications and a discussion of best practices, followed by a practical introduction to the scripting capabilities of three commercial treatment planning systems. Learning Objectives: Understand the scripting capabilities available in several treatment planning systems Learn how to get started using scripting capabilities Understand the best practices for safe script deployment in a clinical environment R. Popple, Varian Medical Systems has provided research support unrelated to the topic of this session.R. Cardan, Varian Medical Systems for grant research, product evaluation, and teaching honorarium.

  13. Python to learn programming

    Science.gov (United States)

    Bogdanchikov, A.; Zhaparov, M.; Suliyev, R.

    2013-04-01

    Today we have a lot of programming languages that can realize our needs, but the most important question is how to teach programming to beginner students. In this paper we suggest using Python for this purpose, because it is a programming language that has neatly organized syntax and powerful tools to solve any task. Moreover it is very close to simple math thinking. Python is chosen as a primary programming language for freshmen in most of leading universities. Writing code in python is easy. In this paper we give some examples of program codes written in Java, C++ and Python language, and we make a comparison between them. Firstly, this paper proposes advantages of Python language in relation to C++ and JAVA. Then it shows the results of a comparison of short program codes written in three different languages, followed by a discussion on how students understand programming. Finally experimental results of students' success in programming courses are shown.

  14. Pteros 2.0: Evolution of the fast parallel molecular analysis library for C++ and python.

    Science.gov (United States)

    Yesylevskyy, Semen O

    2015-07-15

    Pteros is the high-performance open-source library for molecular modeling and analysis of molecular dynamics trajectories. Starting from version 2.0 Pteros is available for C++ and Python programming languages with very similar interfaces. This makes it suitable for writing complex reusable programs in C++ and simple interactive scripts in Python alike. New version improves the facilities for asynchronous trajectory reading and parallel execution of analysis tasks by introducing analysis plugins which could be written in either C++ or Python in completely uniform way. The high level of abstraction provided by analysis plugins greatly simplifies prototyping and implementation of complex analysis algorithms. Pteros is available for free under Artistic License from http://sourceforge.net/projects/pteros/. © 2015 Wiley Periodicals, Inc.

  15. Head First Python

    CERN Document Server

    Barry, Paul

    2010-01-01

    Ever wished you could learn Python from a book? Head First Python is a complete learning experience for Python that helps you learn the language through a unique method that goes beyond syntax and how-to manuals, helping you understand how to be a great Python programmer. You'll quickly learn the language's fundamentals, then move onto persistence, exception handling, web development, SQLite, data wrangling, and Google App Engine. You'll also learn how to write mobile apps for Android, all thanks to the power that Python gives you. We think your time is too valuable to waste struggling with

  16. Python algorithms mastering basic algorithms in the Python language

    CERN Document Server

    Hetland, Magnus Lie

    2014-01-01

    Python Algorithms, Second Edition explains the Python approach to algorithm analysis and design. Written by Magnus Lie Hetland, author of Beginning Python, this book is sharply focused on classical algorithms, but it also gives a solid understanding of fundamental algorithmic problem-solving techniques. The book deals with some of the most important and challenging areas of programming and computer science in a highly readable manner. It covers both algorithmic theory and programming practice, demonstrating how theory is reflected in real Python programs. Well-known algorithms and data struc

  17. Conversion of the agent-oriented domain-specific language ALAS into JavaScript

    Science.gov (United States)

    Sredojević, Dejan; Vidaković, Milan; Okanović, Dušan; Mitrović, Dejan; Ivanović, Mirjana

    2016-06-01

    This paper shows generation of JavaScript code from code written in agent-oriented domain-specific language ALAS. ALAS is an agent-oriented domain-specific language for writing software agents that are executed within XJAF middleware. Since the agents can be executed on various platforms, they must be converted into a language of the target platform. We also try to utilize existing tools and technologies to make the whole conversion process as simple as possible, as well as faster and more efficient. We use the Xtext framework that is compatible with Java to implement ALAS infrastructure - editor and code generator. Since Xtext supports Java, generation of Java code from ALAS code is straightforward. To generate a JavaScript code that will be executed within the target JavaScript XJAF implementation, Google Web Toolkit (GWT) is used.

  18. Smashing CoffeeScript

    CERN Document Server

    Hudson, Alex

    2013-01-01

    Brew the perfect code with CoffeeScript If you're familiar with JavaScript and the often-frustrating process of creating complex applications, a nice cup of CoffeeScript can help. CoffeeScript is a programming language that compiles into JavaScript and simplifies the entire development process. Now you can tap the full power of CoffeeScript with Smashing CoffeeScript. This full-color, practical book explains CoffeeScript language, syntax, and processes, and will soon have you producing concise and quality code. Ultimately, you'll create RIAs and mobile apps faster, with less

  19. Modules based on the geochemical model PHREEQC for use in scripting and programming languages

    Science.gov (United States)

    Charlton, Scott R.; Parkhurst, David L.

    2011-01-01

    The geochemical model PHREEQC is capable of simulating a wide range of equilibrium reactions between water and minerals, ion exchangers, surface complexes, solid solutions, and gases. It also has a general kinetic formulation that allows modeling of nonequilibrium mineral dissolution and precipitation, microbial reactions, decomposition of organic compounds, and other kinetic reactions. To facilitate use of these reaction capabilities in scripting languages and other models, PHREEQC has been implemented in modules that easily interface with other software. A Microsoft COM (component object model) has been implemented, which allows PHREEQC to be used by any software that can interface with a COM server—for example, Excel®, Visual Basic®, Python, or MATLAB". PHREEQC has been converted to a C++ class, which can be included in programs written in C++. The class also has been compiled in libraries for Linux and Windows that allow PHREEQC to be called from C++, C, and Fortran. A limited set of methods implements the full reaction capabilities of PHREEQC for each module. Input methods use strings or files to define reaction calculations in exactly the same formats used by PHREEQC. Output methods provide a table of user-selected model results, such as concentrations, activities, saturation indices, and densities. The PHREEQC module can add geochemical reaction capabilities to surface-water, groundwater, and watershed transport models. It is possible to store and manipulate solution compositions and reaction information for many cells within the module. In addition, the object-oriented nature of the PHREEQC modules simplifies implementation of parallel processing for reactive-transport models. The PHREEQC COM module may be used in scripting languages to fit parameters; to plot PHREEQC results for field, laboratory, or theoretical investigations; or to develop new models that include simple or complex geochemical calculations.

  20. PyCMSXiO: an external interface to script treatment plans for the Elekta® CMS XiO treatment planning system

    Science.gov (United States)

    Xing, Aitang; Arumugam, Sankar; Holloway, Lois; Goozee, Gary

    2014-03-01

    Scripting in radiotherapy treatment planning systems not only simplifies routine planning tasks but can also be used for clinical research. Treatment planning scripting can only be utilized in a system that has a built-in scripting interface. Among the commercially available treatment planning systems, Pinnacle (Philips) and Raystation (Raysearch Lab.) have inherent scripting functionality. CMS XiO (Elekta) is a widely used treatment planning system in radiotherapy centres around the world, but it does not have an interface that allows the user to script radiotherapy plans. In this study an external scripting interface, PyCMSXiO, was developed for XiO using the Python programming language. The interface was implemented as a python package/library using a modern object-oriented programming methodology. The package was organized as a hierarchy of different classes (objects). Each class (object) corresponds to a plan object such as the beam of a clinical radiotherapy plan. The interface of classes was implemented as object functions. Scripting in XiO using PyCMSXiO is comparable with Pinnacle scripting. This scripting package has been used in several research projects including commissioning of a beam model, independent three-dimensional dose verification for IMRT plans and a setup-uncertainty study. Ease of use and high-level functions provided in the package achieve a useful research tool. It was released as an open-source tool that may benefit the medical physics community.

  1. PyCMSXiO: an external interface to script treatment plans for the Elekta® CMS XiO treatment planning system

    International Nuclear Information System (INIS)

    Xing, Aitang; Arumugam, Sankar; Holloway, Lois; Goozee, Gary

    2014-01-01

    Scripting in radiotherapy treatment planning systems not only simplifies routine planning tasks but can also be used for clinical research. Treatment planning scripting can only be utilized in a system that has a built-in scripting interface. Among the commercially available treatment planning systems, Pinnacle (Philips) and Raystation (Raysearch Lab.) have inherent scripting functionality. CMS XiO (Elekta) is a widely used treatment planning system in radiotherapy centres around the world, but it does not have an interface that allows the user to script radiotherapy plans. In this study an external scripting interface, PyCMSXiO, was developed for XiO using the Python programming language. The interface was implemented as a python package/library using a modern object-oriented programming methodology. The package was organized as a hierarchy of different classes (objects). Each class (object) corresponds to a plan object such as the beam of a clinical radiotherapy plan. The interface of classes was implemented as object functions. Scripting in XiO using PyCMSXiO is comparable with Pinnacle scripting. This scripting package has been used in several research projects including commissioning of a beam model, independent three-dimensional dose verification for IMRT plans and a setup-uncertainty study. Ease of use and high-level functions provided in the package achieve a useful research tool. It was released as an open-source tool that may benefit the medical physics community.

  2. Creating and Viewing HTML Files with Python

    OpenAIRE

    William J. Turkel; Adam Crymble

    2012-01-01

    This lesson uses Python to create and view an HTML file. If you write programs that output HTML, you can use any browser to look at your results. This is especially convenient if your program is automatically creating hyperlinks or graphic entities like charts and diagrams. Here you will learn how to create HTML files with Python scripts, and how to use Python to automatically open an HTML file in Firefox.

  3. ACPYPE - AnteChamber PYthon Parser interfacE.

    Science.gov (United States)

    Sousa da Silva, Alan W; Vranken, Wim F

    2012-07-23

    ACPYPE (or AnteChamber PYthon Parser interfacE) is a wrapper script around the ANTECHAMBER software that simplifies the generation of small molecule topologies and parameters for a variety of molecular dynamics programmes like GROMACS, CHARMM and CNS. It is written in the Python programming language and was developed as a tool for interfacing with other Python based applications such as the CCPN software suite (for NMR data analysis) and ARIA (for structure calculations from NMR data). ACPYPE is open source code, under GNU GPL v3, and is available as a stand-alone application at http://www.ccpn.ac.uk/acpype and as a web portal application at http://webapps.ccpn.ac.uk/acpype. We verified the topologies generated by ACPYPE in three ways: by comparing with default AMBER topologies for standard amino acids; by generating and verifying topologies for a large set of ligands from the PDB; and by recalculating the structures for 5 protein-ligand complexes from the PDB. ACPYPE is a tool that simplifies the automatic generation of topology and parameters in different formats for different molecular mechanics programmes, including calculation of partial charges, while being object oriented for integration with other applications.

  4. Towards Python-based Domain-specific Languages for Self-reconfigurable Modular Robotics Research

    DEFF Research Database (Denmark)

    Moghadam, Mikael; Johan Christensen, David; Brandt, David

    2013-01-01

    This paper explores the role of operating system and high-level languages in the development of software and domain-specific languages (DSLs) for self-reconfigurable robotics. We review some of the current trends in self-reconfigurable robotics and describe the development of a software system...... for ATRON II which utilizes Linux and Python to significantly improve software abstraction and portability while providing some basic features which could prove useful when using Python, either stand-alone or via a DSL, on a self-reconfigurable robot system. These features include transparent socket...... communication, module identification, easy software transfer and reliable module-to-module communication. The end result is a software platform for modular robots that where appropriate builds on existing work in operating systems, virtual machines, middleware and high-level languages....

  5. Mastering TypeScript

    CERN Document Server

    Rozentals, Nathan

    2015-01-01

    Whether you are a JavaScript developer aiming to learn TypeScript, or an experienced TypeScript developer wanting to take your skills to the next level, this book is for you. From basic to advanced language constructs, test-driven development, and object-oriented techniques, you will learn how to get the most out of the TypeScript language.

  6. PyRosetta: a script-based interface for implementing molecular modeling algorithms using Rosetta.

    Science.gov (United States)

    Chaudhury, Sidhartha; Lyskov, Sergey; Gray, Jeffrey J

    2010-03-01

    PyRosetta is a stand-alone Python-based implementation of the Rosetta molecular modeling package that allows users to write custom structure prediction and design algorithms using the major Rosetta sampling and scoring functions. PyRosetta contains Python bindings to libraries that define Rosetta functions including those for accessing and manipulating protein structure, calculating energies and running Monte Carlo-based simulations. PyRosetta can be used in two ways: (i) interactively, using iPython and (ii) script-based, using Python scripting. Interactive mode contains a number of help features and is ideal for beginners while script-mode is best suited for algorithm development. PyRosetta has similar computational performance to Rosetta, can be easily scaled up for cluster applications and has been implemented for algorithms demonstrating protein docking, protein folding, loop modeling and design. PyRosetta is a stand-alone package available at http://www.pyrosetta.org under the Rosetta license which is free for academic and non-profit users. A tutorial, user's manual and sample scripts demonstrating usage are also available on the web site.

  7. Creating and Viewing HTML Files with Python

    Directory of Open Access Journals (Sweden)

    William J. Turkel

    2012-07-01

    Full Text Available This lesson uses Python to create and view an HTML file. If you write programs that output HTML, you can use any browser to look at your results. This is especially convenient if your program is automatically creating hyperlinks or graphic entities like charts and diagrams. Here you will learn how to create HTML files with Python scripts, and how to use Python to automatically open an HTML file in Firefox.

  8. Learning selenium testing tools with Python

    CERN Document Server

    Gundecha, Unmesh

    2014-01-01

    If you are a quality testing professional, or a software or web application developer looking to create automation test scripts for your web applications, with an interest in Python, then this is the perfect guide for you. Python developers who need to do Selenium testing need not learn Java, as they can directly use Selenium for testing with this book.

  9. MDSplus objects-Python implementation

    Energy Technology Data Exchange (ETDEWEB)

    Fredian, T., E-mail: twf@psfc.mit.ed [Massachusetts Institute of Technology, Plasma Science and Fusion Center, NW17-268, 175 Albany Street, Cambridge, MA 02139 (United States); Stillerman, J. [Massachusetts Institute of Technology, Plasma Science and Fusion Center, NW17-268, 175 Albany Street, Cambridge, MA 02139 (United States); Manduchi, G. [Consorzio RFX, Euratom-ENEA Association, Corso Stati Uniti 4, Padova 35127 (Italy)

    2010-07-15

    MDSplus is a data acquisition and analysis software package used widely throughout the international fusion research community. During the past year, an important set of enhancements were designed under the project name of 'MDSobjects' which would provide a common, powerful application programming interface (API) to MDSplus in programming languages with object-oriented capabilities. This paper will discuss the Python language implementation of this API and some of the capabilities that this implementation provides for data storage and retrieval using the MDSplus system. We have implemented a new MDSplus Python module which exposes the MDSplus objects features to the language. The internal MDSplus programming language, TDI, has also been enhanced to be able to invoke Python commands from the TDI language. Now that Python is aware of the complex data structures in MDSplus such as Signals, the language becomes a very good candidate for applications ranging from data acquisition device support to analysis and visualization.

  10. MDSplus objects-Python implementation

    International Nuclear Information System (INIS)

    Fredian, T.; Stillerman, J.; Manduchi, G.

    2010-01-01

    MDSplus is a data acquisition and analysis software package used widely throughout the international fusion research community. During the past year, an important set of enhancements were designed under the project name of 'MDSobjects' which would provide a common, powerful application programming interface (API) to MDSplus in programming languages with object-oriented capabilities. This paper will discuss the Python language implementation of this API and some of the capabilities that this implementation provides for data storage and retrieval using the MDSplus system. We have implemented a new MDSplus Python module which exposes the MDSplus objects features to the language. The internal MDSplus programming language, TDI, has also been enhanced to be able to invoke Python commands from the TDI language. Now that Python is aware of the complex data structures in MDSplus such as Signals, the language becomes a very good candidate for applications ranging from data acquisition device support to analysis and visualization.

  11. The Python ARM Radar Toolkit (Py-ART, a Library for Working with Weather Radar Data in the Python Programming Language

    Directory of Open Access Journals (Sweden)

    Jonathan J Helmus

    2016-07-01

    Full Text Available The Python ARM Radar Toolkit is a package for reading, visualizing, correcting and analysing data from weather radars. Development began to meet the needs of the Atmospheric Radiation Measurement Climate Research Facility and has since expanded to provide a general-purpose framework for working with data from weather radars in the Python programming language. The toolkit is built on top of libraries in the Scientific Python ecosystem including NumPy, SciPy, and matplotlib, and makes use of Cython for interfacing with existing radar libraries written in C and to speed up computationally demanding algorithms. The source code for the toolkit is available on GitHub and is distributed under a BSD license.

  12. Expyriment: A Python library for cognitive and neuroscientific experiments

    NARCIS (Netherlands)

    Krause, F.; Lindemann, O.

    2014-01-01

    Expyriment is an open-source and platform-independent lightweight Python library for designing and conducting timing-critical behavioral and neuroimaging experiments. The major goal is to provide a well-structured Python library for script-based experiment development, with a high priority being the

  13. Python Switch Statement

    Directory of Open Access Journals (Sweden)

    2008-06-01

    Full Text Available The Python programming language does not have a built in switch/case control structure as found in many other high level programming languages. It is thought by some that this is a deficiency in the language, and the control structure should be added. This paper demonstrates that not only is the control structure not needed, but that the methods available in Python are more expressive than built in case statements in other high level languages.

  14. Python Integration with a Functional DBMS

    OpenAIRE

    Zou, Hanzheng

    2009-01-01

    Python is an Object Oriented programming language and widely used nowadays. This report describes how to extend a functional database system Amos II for integration with Python. Several possibilities are analyzed to combine the Amos II C external interfaces with those of Python. Based on these discussions, new functionality has been added to the Python language by implementing a Python C external module. A basic API called PyAmos, interfacing Python and Amos II, is proposed and implemented in...

  15. Elementary mechanics using Python a modern course combining analytical and numerical techniques

    CERN Document Server

    Malthe-Sørenssen, Anders

    2015-01-01

    This book – specifically developed as a novel textbook on elementary classical mechanics – shows how analytical and numerical methods can be seamlessly integrated to solve physics problems. This approach allows students to solve more advanced and applied problems at an earlier stage and equips them to deal with real-world examples well beyond the typical special cases treated in standard textbooks. Another advantage of this approach is that students are brought closer to the way physics is actually discovered and applied, as they are introduced right from the start to a more exploratory way of understanding phenomena and of developing their physical concepts. While not a requirement, it is advantageous for the reader to have some prior knowledge of scientific programming with a scripting-type language. This edition of the book uses Python, and a chapter devoted to the basics of scientific programming with Python is included. A parallel edition using Matlab instead of Python is also available. Last but not...

  16. JavaScript Pocket Reference

    CERN Document Server

    Flanagan, David

    1998-01-01

    JavaScript is a powerful, object-based scripting language that can be embedded directly in HTML pages. It allows you to create dynamic, interactive Web-based applications that run completely within a Web browser -- JavaScript is the language of choice for developing Dynamic HTML (DHTML) content. JavaScript can be integrated effectively with CGI and Java to produce sophisticated Web applications, although, in many cases, JavaScript eliminates the need for complex CGI scripts and Java applets altogether. The JavaScript Pocket Reference is a companion volume to JavaScript: The Definitive Guide

  17. PyRosetta: a script-based interface for implementing molecular modeling algorithms using Rosetta

    Science.gov (United States)

    Chaudhury, Sidhartha; Lyskov, Sergey; Gray, Jeffrey J.

    2010-01-01

    Summary: PyRosetta is a stand-alone Python-based implementation of the Rosetta molecular modeling package that allows users to write custom structure prediction and design algorithms using the major Rosetta sampling and scoring functions. PyRosetta contains Python bindings to libraries that define Rosetta functions including those for accessing and manipulating protein structure, calculating energies and running Monte Carlo-based simulations. PyRosetta can be used in two ways: (i) interactively, using iPython and (ii) script-based, using Python scripting. Interactive mode contains a number of help features and is ideal for beginners while script-mode is best suited for algorithm development. PyRosetta has similar computational performance to Rosetta, can be easily scaled up for cluster applications and has been implemented for algorithms demonstrating protein docking, protein folding, loop modeling and design. Availability: PyRosetta is a stand-alone package available at http://www.pyrosetta.org under the Rosetta license which is free for academic and non-profit users. A tutorial, user's manual and sample scripts demonstrating usage are also available on the web site. Contact: pyrosetta@graylab.jhu.edu PMID:20061306

  18. Python high performance programming

    CERN Document Server

    Lanaro, Gabriele

    2013-01-01

    An exciting, easy-to-follow guide illustrating the techniques to boost the performance of Python code, and their applications with plenty of hands-on examples.If you are a programmer who likes the power and simplicity of Python and would like to use this language for performance-critical applications, this book is ideal for you. All that is required is a basic knowledge of the Python programming language. The book will cover basic and advanced topics so will be great for you whether you are a new or a seasoned Python developer.

  19. pyGeno: A Python package for precision medicine and proteogenomics [version 2; referees: 1 approved, 2 approved with reservations

    Directory of Open Access Journals (Sweden)

    Tariq Daouda

    2016-05-01

    Full Text Available pyGeno is a Python package mainly intended for precision medicine applications that revolve around genomics and proteomics. It integrates reference sequences and annotations from Ensembl, genomic polymorphisms from the dbSNP database and data from next-gen sequencing into an easy to use, memory-efficient and fast framework, therefore allowing the user to easily explore subject-specific genomes and proteomes. Compared to a standalone program, pyGeno gives the user access to the complete expressivity of Python, a general programming language. Its range of application therefore encompasses both short scripts and large scale genome-wide studies.

  20. ACPYPE - AnteChamber PYthon Parser interfacE

    Directory of Open Access Journals (Sweden)

    Sousa da Silva Alan W

    2012-07-01

    Full Text Available Abstract Background ACPYPE (or AnteChamber PYthon Parser interfacE is a wrapper script around the ANTECHAMBER software that simplifies the generation of small molecule topologies and parameters for a variety of molecular dynamics programmes like GROMACS, CHARMM and CNS. It is written in the Python programming language and was developed as a tool for interfacing with other Python based applications such as the CCPN software suite (for NMR data analysis and ARIA (for structure calculations from NMR data. ACPYPE is open source code, under GNU GPL v3, and is available as a stand-alone application at http://www.ccpn.ac.uk/acpype and as a web portal application at http://webapps.ccpn.ac.uk/acpype. Findings We verified the topologies generated by ACPYPE in three ways: by comparing with default AMBER topologies for standard amino acids; by generating and verifying topologies for a large set of ligands from the PDB; and by recalculating the structures for 5 protein–ligand complexes from the PDB. Conclusions ACPYPE is a tool that simplifies the automatic generation of topology and parameters in different formats for different molecular mechanics programmes, including calculation of partial charges, while being object oriented for integration with other applications.

  1. TypeScript essentials

    CERN Document Server

    Nance, Christopher

    2014-01-01

    The book introduces the TypeScript language and its features to anyone looking to develop rich web applications. Whether you are new to web development or are an experienced engineer with strong JavaScript skills, this book will get you writing code quickly. A basic understanding of JavaScript and its language features are necessary for this book.

  2. A modeling paradigm for interdisciplinary water resources modeling: Simple Script Wrappers (SSW)

    Science.gov (United States)

    Steward, David R.; Bulatewicz, Tom; Aistrup, Joseph A.; Andresen, Daniel; Bernard, Eric A.; Kulcsar, Laszlo; Peterson, Jeffrey M.; Staggenborg, Scott A.; Welch, Stephen M.

    2014-05-01

    Holistic understanding of a water resources system requires tools capable of model integration. This team has developed an adaptation of the OpenMI (Open Modelling Interface) that allows easy interactions across the data passed between models. Capabilities have been developed to allow programs written in common languages such as matlab, python and scilab to share their data with other programs and accept other program's data. We call this interface the Simple Script Wrapper (SSW). An implementation of SSW is shown that integrates groundwater, economic, and agricultural models in the High Plains region of Kansas. Output from these models illustrates the interdisciplinary discovery facilitated through use of SSW implemented models. Reference: Bulatewicz, T., A. Allen, J.M. Peterson, S. Staggenborg, S.M. Welch, and D.R. Steward, The Simple Script Wrapper for OpenMI: Enabling interdisciplinary modeling studies, Environmental Modelling & Software, 39, 283-294, 2013. http://dx.doi.org/10.1016/j.envsoft.2012.07.006 http://code.google.com/p/simple-script-wrapper/

  3. Duplicating MC-15 Output with Python and MCNP

    Energy Technology Data Exchange (ETDEWEB)

    McSpaden, Alexander Thomas [Los Alamos National Lab. (LANL), Los Alamos, NM (United States)

    2017-08-23

    Two Python scripts have been written that process the output files of MCNP6 into a format that mimics the list-mode output of Los Alamos National Laboratory’s MC-15 and NPOD neutron detection systems. This report details the methods implemented in these scripts and instructions on their use.

  4. ELLIPT2D: A Flexible Finite Element Code Written Python

    International Nuclear Information System (INIS)

    Pletzer, A.; Mollis, J.C.

    2001-01-01

    The use of the Python scripting language for scientific applications and in particular to solve partial differential equations is explored. It is shown that Python's rich data structure and object-oriented features can be exploited to write programs that are not only significantly more concise than their counter parts written in Fortran, C or C++, but are also numerically efficient. To illustrate this, a two-dimensional finite element code (ELLIPT2D) has been written. ELLIPT2D provides a flexible and easy-to-use framework for solving a large class of second-order elliptic problems. The program allows for structured or unstructured meshes. All functions defining the elliptic operator are user supplied and so are the boundary conditions, which can be of Dirichlet, Neumann or Robbins type. ELLIPT2D makes extensive use of dictionaries (hash tables) as a way to represent sparse matrices.Other key features of the Python language that have been widely used include: operator over loading, error handling, array slicing, and the Tkinter module for building graphical use interfaces. As an example of the utility of ELLIPT2D, a nonlinear solution of the Grad-Shafranov equation is computed using a Newton iterative scheme. A second application focuses on a solution of the toroidal Laplace equation coupled to a magnetohydrodynamic stability code, a problem arising in the context of magnetic fusion research

  5. User-friendly parallelization of GAUDI applications with Python

    International Nuclear Information System (INIS)

    Mato, Pere; Smith, Eoin

    2010-01-01

    GAUDI is a software framework in C++ used to build event data processing applications using a set of standard components with well-defined interfaces. Simulation, high-level trigger, reconstruction, and analysis programs used by several experiments are developed using GAUDI. These applications can be configured and driven by simple Python scripts. Given the fact that a considerable amount of existing software has been developed using serial methodology, and has existed in some cases for many years, implementation of parallelisation techniques at the framework level may offer a way of exploiting current multi-core technologies to maximize performance and reduce latencies without re-writing thousands/millions of lines of code. In the solution we have developed, the parallelization techniques are introduced to the high level Python scripts which configure and drive the applications, such that the core C++ application code requires no modification, and that end users need make only minimal changes to their scripts. The developed solution leverages from existing generic Python modules that support parallel processing. Naturally, the parallel version of a given program should produce results consistent with its serial execution. The evaluation of several prototypes incorporating various parallelization techniques are presented and discussed.

  6. User-friendly parallelization of GAUDI applications with Python

    Energy Technology Data Exchange (ETDEWEB)

    Mato, Pere; Smith, Eoin, E-mail: pere.mato@cern.c [PH Department, CERN, 1211 Geneva 23 (Switzerland)

    2010-04-01

    GAUDI is a software framework in C++ used to build event data processing applications using a set of standard components with well-defined interfaces. Simulation, high-level trigger, reconstruction, and analysis programs used by several experiments are developed using GAUDI. These applications can be configured and driven by simple Python scripts. Given the fact that a considerable amount of existing software has been developed using serial methodology, and has existed in some cases for many years, implementation of parallelisation techniques at the framework level may offer a way of exploiting current multi-core technologies to maximize performance and reduce latencies without re-writing thousands/millions of lines of code. In the solution we have developed, the parallelization techniques are introduced to the high level Python scripts which configure and drive the applications, such that the core C++ application code requires no modification, and that end users need make only minimal changes to their scripts. The developed solution leverages from existing generic Python modules that support parallel processing. Naturally, the parallel version of a given program should produce results consistent with its serial execution. The evaluation of several prototypes incorporating various parallelization techniques are presented and discussed.

  7. A Python Geospatial Language Toolkit

    Science.gov (United States)

    Fillmore, D.; Pletzer, A.; Galloy, M.

    2012-12-01

    The volume and scope of geospatial data archives, such as collections of satellite remote sensing or climate model products, has been rapidly increasing and will continue to do so in the near future. The recently launched (October 2011) Suomi National Polar-orbiting Partnership satellite (NPP) for instance, is the first of a new generation of Earth observation platforms that will monitor the atmosphere, oceans, and ecosystems, and its suite of instruments will generate several terabytes each day in the form of multi-spectral images and derived datasets. Full exploitation of such data for scientific analysis and decision support applications has become a major computational challenge. Geophysical data exploration and knowledge discovery could benefit, in particular, from intelligent mechanisms for extracting and manipulating subsets of data relevant to the problem of interest. Potential developments include enhanced support for natural language queries and directives to geospatial datasets. The translation of natural language (that is, human spoken or written phrases) into complex but unambiguous objects and actions can be based on a context, or knowledge domain, that represents the underlying geospatial concepts. This poster describes a prototype Python module that maps English phrases onto basic geospatial objects and operations. This module, along with the associated computational geometry methods, enables the resolution of natural language directives that include geographic regions of arbitrary shape and complexity.

  8. Python in a nutshell

    CERN Document Server

    Martelli, Alex; Holden, Steve

    2016-01-01

    Useful in many roles, from design and prototyping to testing, deployment, and maintenance, Python is consistently ranked among today’s most popular programming languages. The third edition of this practical book provides a quick reference to the language—including Python 3.5, 2.7, and highlights of 3.6—commonly used areas of its vast standard library, and some of the most useful third-party modules and packages. Ideal for programmers with some Python experience, and those coming to Python from other programming languages, this book covers a wide range of application areas, including web and network programming, XML handling, database interactions, and high-speed numeric computing. Discover how Python provides a unique mix of elegance, simplicity, practicality, and sheer power.

  9. Python at CERN

    CERN Multimedia

    Witowski, Sebastian

    2017-01-01

    The Large Hadron Collider at CERN is producing 600 million collisions every second. Only 1 in a million collisions is interesting. It requires a fast programming language to analyze and filter this amount of data. Is Python such a language? No, it’s not. Does it mean there is no place for Python in one of the largest scientific facilities in the world? Quite the contrary. The ease of use and a very low learning curve makes Python a perfect programming language for many physicists and other people without the computer science background. CERN does not only produce large amounts of data. The interesting bits of data have to be stored, analyzed, shared and published. Work of many scientists across various research facilities around the world has to be synchronized. This is the area where Python flourishes. And with CERN’s pursuit to create and use open source software, many interesting projects were born. To facilitate the analysis of data, ROOT framework [https://root.cern.ch/] was created. It’s a C++ fra...

  10. Reflection-Based Python-C++ Bindings

    International Nuclear Information System (INIS)

    Generowicz, Jacek; Lavrijsen, Wim T.L.P.; Marino, Massimo; Mato, Pere

    2004-01-01

    Python is a flexible, powerful, high-level language with excellent interactive and introspective capabilities and a very clean syntax. As such, it can be a very effective tool for driving physics analysis. Python is designed to be extensible in low-level C-like languages, and its use as a scientific steering language has become quite widespread. To this end, existing and custom-written C or C++ libraries are bound to the Python environment as so-called extension modules. A number of tools for easing the process of creating such bindings exist, such as SWIG and Boost. Python. Yet, the process still requires a considerable amount of effort and expertise. The C++ language has few built-in introspective capabilities, but tools such as LCGDict and CINT add this by providing so-called dictionaries: libraries that contain information about the names, entry points, argument types, etc. of other libraries. The reflection information from these dictionaries can be used for the creation of bindings and so the process can be fully automated, as dictionaries are already provided for many end-user libraries for other purposes, such as object persistency. PyLCGDict is a Python extension module that uses LCG dictionaries, as PyROOT uses CINT reflection information, to allow /cwPython users to access C++ libraries with essentially no preparation on the users' behalf. In addition, and in a similar way, PyROOT gives ROOT users access to Python libraries

  11. Designing Abstractions for JavaScript Program Analysis

    DEFF Research Database (Denmark)

    Andreasen, Esben Sparre

    JavaScript is a widely used dynamic programming language. What started out as a client-side scripting language for browsers, is now used for large applications in many different settings. As for other dynamic languages, JavaScript makes it easy to write programs quickly without being constrained...... by the language, and programmers exploit that power to write highly dynamic programs. Automated tools for helping programmers and optimizing programs are used successfully for many programming languages. Unfortunately, the automated tools for JavaScript are not as good as for other programming languages....... The program analyses, that the automated tools are built upon, are poorly suited to deal with the highly dynamic nature of JavaScript programs. The lack of language restrictions on the programmer are detrimental to the quality of program analyses for JavaScript. The aim of this dissertation is to address...

  12. TelluSim: A Python Plug-in Based Computational Framework for Spatially Distributed Environmental and Earth Sciences Modelling

    Science.gov (United States)

    Willgoose, G. R.

    2008-12-01

    TelluSim is a python-based computational framework for integrating and manipulating modules written in a variety of computer languages. TelluSim consists of a main program that dynamically, at run time, assembles a series of modules. These modules can be written in any language that can be accessed by Python. Currently we have modules in Fortran and Python, with C to be supported soon. New modules are incorporated as plug-ins like done for a browser or Photoshop, simply by copying the module binary into a plug-in directory. TelluSim automatically generates a GUI for parameter and state I/O, and automatically creates the intermodule communication mechanisms needed for the computations. A decision to use Python was arrived at after detailed trials using other languages including C, Tcl/Tk and Fortran. An important aspect of the design of TelluSim was to minimise the overhead in interfacing the modules with TelluSim, and minimise any requirement for recoding of existing software, so eliminating a major disadvantage of more complex frameworks (e.g. JAMS, openMI). Several significant Fortran codes developed by the author have been incorporated as part of the design process and as proof of concept. In particular the SIBERIA landform evolution code (a high performance F90 code, including parallel capability) has been broken up into a series of TelluSim modules, so that the SIBERIA now consists of a Python script of 20 lines. These 20 lines assemble and run the underlying modules (about 50,000 lines of Fortran code). The presentation will discuss in more detail the design of TelluSim, and our experiences of the advantages and disadvantages of using Python relative to other approaches.

  13. Training course "Porting code from Matlab to Python"

    OpenAIRE

    Diaz, Sandra; Klijn, Wouter; Deepu, Rajalekshmi; Peyser, Alexander; Oden, Lena

    2017-01-01

    Python is becoming a popular language for scientific applications and is increasingly used for high performance computing. In this course we want to introduce Matlab programmers to the usage of Python. Matlab and Python have a comparable language philosophy, but Python can offer better performance using its optimizations and parallelization interfaces. Python also increases the portability and flexibility (interaction with other open source and proprietary software packages) of solutions, and...

  14. Dive Into Python 3

    CERN Document Server

    Pilgrim, Mark

    2009-01-01

    Mark Pilgrim's Dive Into Python 3 is a hands-on guide to Python 3 (the latest version of the Python language) and its differences from Python 2. As in the original book, Dive Into Python, each chapter starts with a real, complete code sample, proceeds to pick it apart and explain the pieces, and then puts it all back together in a summary at the end. This book includes: * Example programs completely rewritten to illustrate powerful new concepts now available in Python 3: sets, iterators, generators, closures, comprehensions, and much more* A detailed case study of porting a major library from

  15. User interfaces for computational science: A domain specific language for OOMMF embedded in Python

    Science.gov (United States)

    Beg, Marijan; Pepper, Ryan A.; Fangohr, Hans

    2017-05-01

    Computer simulations are used widely across the engineering and science disciplines, including in the research and development of magnetic devices using computational micromagnetics. In this work, we identify and review different approaches to configuring simulation runs: (i) the re-compilation of source code, (ii) the use of configuration files, (iii) the graphical user interface, and (iv) embedding the simulation specification in an existing programming language to express the computational problem. We identify the advantages and disadvantages of different approaches and discuss their implications on effectiveness and reproducibility of computational studies and results. Following on from this, we design and describe a domain specific language for micromagnetics that is embedded in the Python language, and allows users to define the micromagnetic simulations they want to carry out in a flexible way. We have implemented this micromagnetic simulation description language together with a computational backend that executes the simulation task using the Object Oriented MicroMagnetic Framework (OOMMF). We illustrate the use of this Python interface for OOMMF by solving the micromagnetic standard problem 4. All the code is publicly available and is open source.

  16. Reliable JavaScript how to code safely in the world's most dangerous language

    CERN Document Server

    Spencer, Lawrence

    2015-01-01

    Create more robust applications with a test-first approach to JavaScript Reliable JavaScript, How to Code Safely in the World's Most Dangerous Language demonstrates how to create test-driven development for large-scale JavaScript applications that will stand the test of time and stay accurate through long-term use and maintenance. Taking a test-first approach to software architecture, this book walks you through several patterns and practices and explains what they are supposed to do by having you write unit tests. Write the code to pass the unit tests, so you not only develop your technique

  17. Static Analysis for JavaScript

    DEFF Research Database (Denmark)

    Jensen, Simon Holm

    . This dissertation describes the design and implementation of a static analysis for JavaScript that can assist programmers in finding bugs in code during development. We describe the design of a static analysis tool for JavaScript, built using the monotone framework. This analysis infers detailed type information......Web applications present unique challenges to designers of static analysis tools. One of these challenges is the language JavaScript used for client side scripting in the browser. JavaScript is a complex language with many pitfalls and poor tool support compared to other languages...... about programs. This information can be used to detect bugs such as null pointer dereferences and unintended type coercions. The analysis is sound, enabling it to prove the absence of certain program errors. JavaScript is usually run within the context of the browser and the DOM API. The major...

  18. GUI implementation of image encryption and decryption using Open CV-Python script on secured TFTP protocol

    Science.gov (United States)

    Reddy, K. Rasool; Rao, Ch. Madhava

    2018-04-01

    Currently safety is one of the primary concerns in the transmission of images due to increasing the use of images within the industrial applications. So it's necessary to secure the image facts from unauthorized individuals. There are various strategies are investigated to secure the facts. In that encryption is certainly one of maximum distinguished method. This paper gives a sophisticated Rijndael (AES) algorithm to shield the facts from unauthorized humans. Here Exponential Key Change (EKE) concept is also introduced to exchange the key between client and server. The things are exchange in a network among client and server through a simple protocol is known as Trivial File Transfer Protocol (TFTP). This protocol is used mainly in embedded servers to transfer the data and also provide protection to the data if protection capabilities are integrated. In this paper, implementing a GUI environment for image encryption and decryption. All these experiments carried out on Linux environment the usage of Open CV-Python script.

  19. Beginning programming with Python for dummies

    CERN Document Server

    Mueller, John Paul

    2014-01-01

    Learn Python-the fun and easy way-and get in the programming game today! Python is one of the fastest growing programming languages, and no wonder. It requires three to five times less time than developing in Java, is a great building block for learning both procedural and object-oriented programming concepts, and is an ideal language for data analysis. Beginning Programming with Python For Dummies is the perfect guide to this dynamic and powerful programming language-even if you''ve never coded before! Author John Paul Mueller draws on his vast programming knowledge and experience to guide yo

  20. Professional JavaScript for Web Developers

    CERN Document Server

    Zakas, Nicholas C

    2011-01-01

    A significant update to a bestselling JavaScript book As the key scripting language for the web, JavaScript is supported by every modern web browser and allows developers to create client-side scripts that take advantage of features such as animating the canvas tag and enabling client-side storage and application caches. After an in-depth introduction to the JavaScript language, this updated edition of a bestseller progresses to break down how JavaScript is applied for web development using the latest web development technologies. Veteran author and JavaScript guru Nicholas Zakas shows how Jav

  1. JavaScript The Definitive Guide

    CERN Document Server

    Flanagan, David

    2011-01-01

    Since 1996, JavaScript: The Definitive Guide has been the bible for JavaScript programmers-a programmer's guide and comprehensive reference to the core language and to the client-side JavaScript APIs defined by web browsers. The 6th edition covers HTML5 and ECMAScript 5. Many chapters have been completely rewritten to bring them in line with today's best web development practices. New chapters in this edition document jQuery and server side JavaScript. It's recommended for experienced programmers who want to learn the programming language of the Web, and for current JavaScript programmers wh

  2. Python tutorial

    NARCIS (Netherlands)

    G. van Rossum (Guido)

    1995-01-01

    textabstractPython is a simple, yet powerful programming language that bridges the gap between C and shell programming, and is thus ideally suited for ``throw-away programming'' and rapid prototyping. Its syntax is put together from constructs borrowed from a variety of other languages; most

  3. User interfaces for computational science: A domain specific language for OOMMF embedded in Python

    Directory of Open Access Journals (Sweden)

    Marijan Beg

    2017-05-01

    Full Text Available Computer simulations are used widely across the engineering and science disciplines, including in the research and development of magnetic devices using computational micromagnetics. In this work, we identify and review different approaches to configuring simulation runs: (i the re-compilation of source code, (ii the use of configuration files, (iii the graphical user interface, and (iv embedding the simulation specification in an existing programming language to express the computational problem. We identify the advantages and disadvantages of different approaches and discuss their implications on effectiveness and reproducibility of computational studies and results. Following on from this, we design and describe a domain specific language for micromagnetics that is embedded in the Python language, and allows users to define the micromagnetic simulations they want to carry out in a flexible way. We have implemented this micromagnetic simulation description language together with a computational backend that executes the simulation task using the Object Oriented MicroMagnetic Framework (OOMMF. We illustrate the use of this Python interface for OOMMF by solving the micromagnetic standard problem 4. All the code is publicly available and is open source.

  4. Pro JavaScript with MooTools

    CERN Document Server

    Obcena, Mark Joseph

    2010-01-01

    Pro JavaScript with MooTools is unlike any other JavaScript book on the market today. While similar books focus on either JavaScript as a language of the browser or how to use JavaScript frameworks, Pro JavaScript with MooTools fills the gap between these topics and moves beyond - exploring the advanced features of JavaScript and how the MooTools framework uses these features to further improve the language itself. The book itself takes a unique three-pronged approach. It first walks you through the advanced features of JavaScript and the MooTools framework, including native augmentation and t

  5. Scoria: a Python module for manipulating 3D molecular data.

    Science.gov (United States)

    Ropp, Patrick; Friedman, Aaron; Durrant, Jacob D

    2017-09-18

    Third-party packages have transformed the Python programming language into a powerful computational-biology tool. Package installation is easy for experienced users, but novices sometimes struggle with dependencies and compilers. This presents a barrier that can hinder the otherwise broad adoption of new tools. We present Scoria, a Python package for manipulating three-dimensional molecular data. Unlike similar packages, Scoria requires no dependencies, compilation, or system-wide installation. One can incorporate the Scoria source code directly into their own programs. But Scoria is not designed to compete with other similar packages. Rather, it complements them. Our package leverages others (e.g. NumPy, SciPy), if present, to speed and extend its own functionality. To show its utility, we use Scoria to analyze a molecular dynamics trajectory. Our FootPrint script colors the atoms of one chain by the frequency of their contacts with a second chain. We are hopeful that Scoria will be a useful tool for the computational-biology community. A copy is available for download free of charge (Apache License 2.0) at http://durrantlab.com/scoria/ . Graphical abstract .

  6. Python pocket reference

    CERN Document Server

    Lutz, Mark

    2010-01-01

    This is the book to reach for when you're coding on the fly and need an answer now. It's an easy-to-use reference to the core language, with descriptions of commonly used modules and toolkits, and a guide to recent changes, new features, and upgraded built-ins -- all updated to cover Python 3.X as well as version 2.6. You'll also quickly find exactly what you need with the handy index. Written by Mark Lutz -- widely recognized as the world's leading Python trainer -- Python Pocket Reference, Fourth Edition, is the perfect companion to O'Reilly's classic Python tutorials, also written by Mark

  7. Python data analysis

    CERN Document Server

    Idris, Ivan

    2014-01-01

    This book is for programmers, scientists, and engineers who have knowledge of the Python language and know the basics of data science. It is for those who wish to learn different data analysis methods using Python and its libraries. This book contains all the basic ingredients you need to become an expert data analyst.

  8. Benchmarking JavaScript Frameworks

    OpenAIRE

    Mariano, Carl Lawrence

    2017-01-01

    JavaScript programming language has been in existence for many years already and is one of the most widely known, if not, the most used front-end programming language in web development. However, JavaScript is still evolving and with the emergence of JavaScript Frameworks (JSF), there has been a major change in how developers develop software nowadays. Developers these days often use more than one framework in order to fulfil their job which has given rise to the problem for developers when i...

  9. Advanced software development workstation. Engineering scripting language graphical editor: DRAFT design document

    Science.gov (United States)

    1991-01-01

    The Engineering Scripting Language (ESL) is a language designed to allow nonprogramming users to write Higher Order Language (HOL) programs by drawing directed graphs to represent the program and having the system generate the corresponding program in HOL. The ESL system supports user generation of HOL programs through the manipulation of directed graphs. The components of this graphs (nodes, ports, and connectors) are objects each of which has its own properties and property values. The purpose of the ESL graphical editor is to allow the user to create or edit graph objects which represent programs.

  10. ObsPy: A Python Toolbox for Seismology - Recent Developments and Applications

    Science.gov (United States)

    Megies, T.; Krischer, L.; Barsch, R.; Sales de Andrade, E.; Beyreuther, M.

    2014-12-01

    ObsPy (http://www.obspy.org) is a community-driven, open-source project dedicated to building a bridge for seismology into the scientific Python ecosystem. It offersa) read and write support for essentially all commonly used waveform, station, and event metadata file formats with a unified interface,b) a comprehensive signal processing toolbox tuned to the needs of seismologists,c) integrated access to all large data centers, web services and databases, andd) convenient wrappers to legacy codes like libtau and evalresp.Python, currently the most popular language for teaching introductory computer science courses at top-ranked U.S. departments, is a full-blown programming language with the flexibility of an interactive scripting language. Its extensive standard library and large variety of freely available high quality scientific modules cover most needs in developing scientific processing workflows. Together with packages like NumPy, SciPy, Matplotlib, IPython, Pandas, lxml, and PyQt, ObsPy enables the construction of complete workflows in Python. These vary from reading locally stored data or requesting data from one or more different data centers through to signal analysis and data processing and on to visualizations in GUI and web applications, output of modified/derived data and the creation of publication-quality figures.ObsPy enjoys a large world-wide rate of adoption in the community. Applications successfully using it include time-dependent and rotational seismology, big data processing, event relocations, and synthetic studies about attenuation kernels and full-waveform inversions to name a few examples. All functionality is extensively documented and the ObsPy tutorial and gallery give a good impression of the wide range of possible use cases.We will present the basic features of ObsPy, new developments and applications, and a roadmap for the near future and discuss the sustainability of our open-source development model.

  11. Beginning Python from novice to professional

    CERN Document Server

    Hetland, Magnus Lie

    2005-01-01

    ""Beginning Python: From Novice to Professional"" is the most comprehensive book on the Python ever written. Based on ""Practical Python,"" this newly revised book is both an introduction and practical reference for a swath of Python-related programming topics, including addressing language internals, database integration, network programming, and web services. Advanced topics, such as extending Python and packaging/distributing Python applications, are also covered. Ten different projects illustrate the concepts introduced in the book. You will learn how to create a P2P file-sharing applicati

  12. Head First Programming A learner's guide to programming using the Python language

    CERN Document Server

    Griffiths, David

    2009-01-01

    Looking for a reliable way to learn how to program on your own, without being overwhelmed by confusing concepts? Head First Programming introduces the core concepts of writing computer programs -- variables, decisions, loops, functions, and objects -- which apply regardless of the programming language. This book offers concrete examples and exercises in the dynamic and versatile Python language to demonstrate and reinforce these concepts. Learn the basic tools to start writing the programs that interest you, and get a better understanding of what software can (and cannot) do. When you're fi

  13. Python : the holy grail of programming

    CERN Multimedia

    2006-01-01

    From 3 to 5 July, CERN hosted the fifth EuroPython Conference bringing together 300 users of Python, an open source programming language, which is more and more appreciated, especially at CERN. The local organisation of Euopython 2006 was managed by a small team from the PH/SFT group. Above, David Quarrie presenting the use of Python in Atlas analyses. If you visited Building 40 at the beginning of July, you may have come across a long orange and yellow snake. This had no relation with the Football World Championship! It was just the mascot of the fifth EuroPython Conference that saw almost 300 software developers, designers and business people gathering at CERN for the annual meeting of the European Python community. Python is an open source programming language actively used in industry and academia for a wide variety of purposes. As CERN decided to host this conference, it is perhaps not surprising to learn that Python is increasingly used in our Laboratory in both computing and physics application domai...

  14. PySLHA: a Pythonic interface to SUSY Les Houches accord data

    International Nuclear Information System (INIS)

    Buckley, Andy

    2015-01-01

    This paper describes the PySLHA package, a Python language module and program collection for reading, writing and visualising SUSY model data in the SLHA format. PySLHA can read and write SLHA data in a very general way, including the official SLHA2 extension and user customisations, and with arbitrarily deep indexing of data block entries and a dedicated, intuitive interface for particle data and decay information. The draft SLHA3 XSECTION feature is also fully supported. PySLHA can additionally read and write the legacy ISAWIG model format, and provides format conversion scripts. A publication-quality mass spectrum and decay chain plotting tool, slhaplot, is included in the package. (orig.)

  15. HTSeq--a Python framework to work with high-throughput sequencing data.

    Science.gov (United States)

    Anders, Simon; Pyl, Paul Theodor; Huber, Wolfgang

    2015-01-15

    A large choice of tools exists for many standard tasks in the analysis of high-throughput sequencing (HTS) data. However, once a project deviates from standard workflows, custom scripts are needed. We present HTSeq, a Python library to facilitate the rapid development of such scripts. HTSeq offers parsers for many common data formats in HTS projects, as well as classes to represent data, such as genomic coordinates, sequences, sequencing reads, alignments, gene model information and variant calls, and provides data structures that allow for querying via genomic coordinates. We also present htseq-count, a tool developed with HTSeq that preprocesses RNA-Seq data for differential expression analysis by counting the overlap of reads with genes. HTSeq is released as an open-source software under the GNU General Public Licence and available from http://www-huber.embl.de/HTSeq or from the Python Package Index at https://pypi.python.org/pypi/HTSeq. © The Author 2014. Published by Oxford University Press.

  16. A Transcription Scheme for Languages Employing the Arabic Script Motivated by Speech Processing Application

    National Research Council Canada - National Science Library

    Ganjavi, Shadi; Georgiou, Panayiotis G; Narayanan, Shrikanth

    2004-01-01

    ... (The DARPA Babylon Program; Narayanan, 2003). In this paper, we discuss transcription systems needed for automated spoken language processing applications in Persian that uses the Arabic script for writing...

  17. Checking Correctness of TypeScript Interfaces for JavaScript Libraries

    DEFF Research Database (Denmark)

    Feldthaus, Asger; Møller, Anders

    2014-01-01

    The TypeScript programming language adds optional types to JavaScript, with support for interaction with existing JavaScript libraries via interface declarations. Such declarations have been written for hundreds of libraries, but they can be difficult to write and often contain errors, which may...... affect the type checking and misguide code completion for the application code in IDEs. We present a pragmatic approach to check correctness of TypeScript declaration files with respect to JavaScript library implementations. The key idea in our algorithm is that many declaration errors can be detected...... library and with a low number of false positives. Our analysis of how programmers use library interface declarations furthermore reveals some practical limitations of the TypeScript type system....

  18. Specifying the Behaviour of Python Programs: Language and Basic Examples

    Directory of Open Access Journals (Sweden)

    2010-04-01

    Full Text Available This manuscript describe BeSSY, a function-centric language for formal behavioural specification that requires no more than high-school mathematics on arithmetic, functions, Boolean algebra and sets theory. An object can be modelled as a union of data sets and functions whereas inherited object can be modelled as a union of supersets and a set of object-specific functions. Python list and dictionary operations will be specified in BeSSY for illustration.

  19. Learning JavaScript

    CERN Document Server

    Powers, Shelley

    2008-01-01

    Packed with best practices and examples of JavaScript use, Learning JavaScript provides complete, no-nonsense coverage of this quirky yet essential language for web development. You'll learn everything from primitive data types to complex features, including JavaScript elements involved with Ajax and dynamic page effects. By the end of the book, you'll be able to work with even the most sophisticated libraries and web applications.

  20. Experiences in Building Python Automation Framework for Verification and Data Collections

    Directory of Open Access Journals (Sweden)

    2010-09-01

    Full Text Available

    This paper describes our experiences in building a Python automation framework. Specifically, the automation framework is used to support verification and data collection scripts. The scripts control various test equipments in addition to the device under test (DUT to characterize a specific performance with a specific configuration or to evaluate the correctness of the behaviour of the DUT. The specific focus on this paper is on documenting our experiences in building an automation framework using Python: on the purposes, goals and the benefits, rather than on a tutorial of how to build such a framework.

  1. Python reference manual

    NARCIS (Netherlands)

    G. van Rossum (Guido)

    1995-01-01

    textabstractPython is a simple, yet powerful, interpreted programming language that bridges the gap between C and shell programming, and is thus ideally suited for ``throw-away programming'' and rapid prototyping. Its syntax is put together from constructs borrowed from a variety of other languages;

  2. Pydna: a simulation and documentation tool for DNA assembly strategies using python.

    Science.gov (United States)

    Pereira, Filipa; Azevedo, Flávio; Carvalho, Ângela; Ribeiro, Gabriela F; Budde, Mark W; Johansson, Björn

    2015-05-02

    Recent advances in synthetic biology have provided tools to efficiently construct complex DNA molecules which are an important part of many molecular biology and biotechnology projects. The planning of such constructs has traditionally been done manually using a DNA sequence editor which becomes error-prone as scale and complexity of the construction increase. A human-readable formal description of cloning and assembly strategies, which also allows for automatic computer simulation and verification, would therefore be a valuable tool. We have developed pydna, an extensible, free and open source Python library for simulating basic molecular biology DNA unit operations such as restriction digestion, ligation, PCR, primer design, Gibson assembly and homologous recombination. A cloning strategy expressed as a pydna script provides a description that is complete, unambiguous and stable. Execution of the script automatically yields the sequence of the final molecule(s) and that of any intermediate constructs. Pydna has been designed to be understandable for biologists with limited programming skills by providing interfaces that are semantically similar to the description of molecular biology unit operations found in literature. Pydna simplifies both the planning and sharing of cloning strategies and is especially useful for complex or combinatorial DNA molecule construction. An important difference compared to existing tools with similar goals is the use of Python instead of a specifically constructed language, providing a simulation environment that is more flexible and extensible by the user.

  3. JavaScript Patterns

    CERN Document Server

    Stefanov, Stoyan

    2010-01-01

    What's the best approach for developing an application with JavaScript? This book helps you answer that question with numerous JavaScript coding patterns and best practices. If you're an experienced developer looking to solve problems related to objects, functions, inheritance, and other language-specific categories, the abstractions and code templates in this guide are ideal -- whether you're writing a client-side, server-side, or desktop application with JavaScript. Written by JavaScript expert Stoyan Stefanov -- Senior Yahoo! Technical and architect of YSlow 2.0, the web page performance

  4. Learning Python with Raspberry Pi

    CERN Document Server

    Bradbury, Alex

    2014-01-01

    The must-have companion guide to the Raspberry Pi User Guide! Raspberry Pi chose Python as its teaching language of choice to encourage a new generation of programmers to learn how to program. This approachable book serves as an ideal resource for anyone wanting to use Raspberry Pi to learn to program and helps you get started with the Python programming language. Aimed at first-time developers with no prior programming language assumed, this beginner book gets you up and running.Covers variables, loops, and functionsAddresses 3D graphics programmingWalks you through programming MinecraftZero

  5. On Parallel Software Engineering Education Using Python

    Science.gov (United States)

    Marowka, Ami

    2018-01-01

    Python is gaining popularity in academia as the preferred language to teach novices serial programming. The syntax of Python is clean, easy, and simple to understand. At the same time, it is a high-level programming language that supports multi programming paradigms such as imperative, functional, and object-oriented. Therefore, by default, it is…

  6. Schopnosti překladačů programovacího jazyka Python

    OpenAIRE

    Pala, Ondřej

    2015-01-01

    PALA, Ondřej. Ability of compilers programming language Python. Brno, 2015. Diploma thesis. Mendel university in Brno. Diploma thesis rate ability of selected compilers programming language Python. First path of thesis is focused to programming language Python and principle of working compilers. Second path is focused to creating testing tasks, defining eva-luation criterias of compilers and testing compilers without testing tasks.

  7. Analyzing rasters, vectors and time series using new Python interfaces in GRASS GIS 7

    Science.gov (United States)

    Petras, Vaclav; Petrasova, Anna; Chemin, Yann; Zambelli, Pietro; Landa, Martin; Gebbert, Sören; Neteler, Markus; Löwe, Peter

    2015-04-01

    GRASS GIS 7 is a free and open source GIS software developed and used by many scientists (Neteler et al., 2012). While some users of GRASS GIS prefer its graphical user interface, significant part of the scientific community takes advantage of various scripting and programing interfaces offered by GRASS GIS to develop new models and algorithms. Here we will present different interfaces added to GRASS GIS 7 and available in Python, a popular programming language and environment in geosciences. These Python interfaces are designed to satisfy the needs of scientists and programmers under various circumstances. PyGRASS (Zambelli et al., 2013) is a new object-oriented interface to GRASS GIS modules and libraries. The GRASS GIS libraries are implemented in C to ensure maximum performance and the PyGRASS interface provides an intuitive, pythonic access to their functionality. GRASS GIS Python scripting library is another way of accessing GRASS GIS modules. It combines the simplicity of Bash and the efficiency of the Python syntax. When full access to all low-level and advanced functions and structures from GRASS GIS library is required, Python programmers can use an interface based on the Python ctypes package. Ctypes interface provides complete, direct access to all functionality as it would be available to C programmers. GRASS GIS provides specialized Python library for managing and analyzing spatio-temporal data (Gebbert and Pebesma, 2014). The temporal library introduces space time datasets representing time series of raster, 3D raster or vector maps and allows users to combine various spatio-temporal operations including queries, aggregation, sampling or the analysis of spatio-temporal topology. We will also discuss the advantages of implementing scientific algorithm as a GRASS GIS module and we will show how to write such module in Python. To facilitate the development of the module, GRASS GIS provides a Python library for testing (Petras and Gebbert, 2014) which

  8. Pybus - A Python Software Bus

    International Nuclear Information System (INIS)

    Lavrijsen, Wim T.L.P.

    2004-01-01

    A software bus, just like its hardware equivalent, allows for the discovery, installation, configuration, loading, unloading, and run-time replacement of software components, as well as channeling of inter-component communication. Python, a popular open-source programming language, encourages a modular design on software written in it, but it offers little or no component functionality. However, the language and its interpreter provide sufficient hooks to implement a thin, integral layer of component support. This functionality can be presented to the developer in the form of a module, making it very easy to use. This paper describes a Pythonmodule, PyBus, with which the concept of a ''software bus'' can be realized in Python. It demonstrates, within the context of the ATLAS software framework Athena, how PyBus can be used for the installation and (run-time) configuration of software, not necessarily Python modules, from a Python application in a way that is transparent to the end-user

  9. Imagining a Stata / Python Combination

    Science.gov (United States)

    Fiedler, James

    2012-01-01

    There are occasions when a task is difficult in Stata, but fairly easy in a more general programming language. Python is a popular language for a range of uses. It is easy to use, has many high ]quality packages, and programs can be written relatively quickly. Is there any advantage in combining Stata and Python within a single interface? Stata already offers support for user-written programs, which allow extensive control over calculations, but somewhat less control over graphics. Also, except for specifying output, the user has minimal programmatic control over the user interface. Python can be used in a way that allows more control over the interface and graphics, and in so doing provide a roundabout method for satisfying some user requests (e.g., transparency levels in graphics and the ability to clear the results window). My talk will explore these ideas, present a possible method for combining Stata and Python, and give examples to demonstrate how this combination might be useful.

  10. New Python-based methods for data processing

    International Nuclear Information System (INIS)

    Sauter, Nicholas K.; Hattne, Johan; Grosse-Kunstleve, Ralf W.; Echols, Nathaniel

    2013-01-01

    The Computational Crystallography Toolbox (cctbx) is a flexible software platform that has been used to develop high-throughput crystal-screening tools for both synchrotron sources and X-ray free-electron lasers. Plans for data-processing and visualization applications are discussed, and the benefits and limitations of using graphics-processing units are evaluated. Current pixel-array detectors produce diffraction images at extreme data rates (of up to 2 TB h −1 ) that make severe demands on computational resources. New multiprocessing frameworks are required to achieve rapid data analysis, as it is important to be able to inspect the data quickly in order to guide the experiment in real time. By utilizing readily available web-serving tools that interact with the Python scripting language, it was possible to implement a high-throughput Bragg-spot analyzer (cctbx.spotfinder) that is presently in use at numerous synchrotron-radiation beamlines. Similarly, Python interoperability enabled the production of a new data-reduction package (cctbx.xfel) for serial femtosecond crystallography experiments at the Linac Coherent Light Source (LCLS). Future data-reduction efforts will need to focus on specialized problems such as the treatment of diffraction spots on interleaved lattices arising from multi-crystal specimens. In these challenging cases, accurate modeling of close-lying Bragg spots could benefit from the high-performance computing capabilities of graphics-processing units

  11. New Python-based methods for data processing

    Energy Technology Data Exchange (ETDEWEB)

    Sauter, Nicholas K., E-mail: nksauter@lbl.gov; Hattne, Johan; Grosse-Kunstleve, Ralf W.; Echols, Nathaniel [Lawrence Berkeley National Laboratory, 1 Cyclotron Road, Berkeley, CA 94720 (United States)

    2013-07-01

    The Computational Crystallography Toolbox (cctbx) is a flexible software platform that has been used to develop high-throughput crystal-screening tools for both synchrotron sources and X-ray free-electron lasers. Plans for data-processing and visualization applications are discussed, and the benefits and limitations of using graphics-processing units are evaluated. Current pixel-array detectors produce diffraction images at extreme data rates (of up to 2 TB h{sup −1}) that make severe demands on computational resources. New multiprocessing frameworks are required to achieve rapid data analysis, as it is important to be able to inspect the data quickly in order to guide the experiment in real time. By utilizing readily available web-serving tools that interact with the Python scripting language, it was possible to implement a high-throughput Bragg-spot analyzer (cctbx.spotfinder) that is presently in use at numerous synchrotron-radiation beamlines. Similarly, Python interoperability enabled the production of a new data-reduction package (cctbx.xfel) for serial femtosecond crystallography experiments at the Linac Coherent Light Source (LCLS). Future data-reduction efforts will need to focus on specialized problems such as the treatment of diffraction spots on interleaved lattices arising from multi-crystal specimens. In these challenging cases, accurate modeling of close-lying Bragg spots could benefit from the high-performance computing capabilities of graphics-processing units.

  12. MEG and EEG data analysis with MNE-Python

    Directory of Open Access Journals (Sweden)

    Alexandre eGramfort

    2013-12-01

    Full Text Available Magnetoencephalography and electroencephalography (M/EEG measure the weakelectromagnetic signals generated by neuronal activity in the brain. Using thesesignals to characterize and locate neural activation in the brain is achallenge that requires expertise in physics, signalprocessing, statistics, and numerical methods. As part of the MNE softwaresuite, MNE-Python is an open-sourcesoftware package that addresses this challenge by providingstate-of-the-art algorithms implemented in Python that cover multiple methods of data preprocessing, source localization, statistical analysis, and estimation offunctional connectivity between distributed brain regions.All algorithms and utility functions are implemented in a consistent manner with well-documented interfaces, enabling users to create M/EEG data analysispipelines by writing Python scripts.Moreover, MNE-Python is tightly integrated with the core Python libraries for scientificcomptutation (Numpy, Scipy and visualization (matplotlib and Mayavi, as wellas the greater neuroimaging ecosystem in Python via the Nibabel package. The code is provided under the new BSD licenseallowing code reuse, even in commercial products. Although MNE-Python has onlybeen under heavy development for a couple of years, it has rapidly evolved withexpanded analysis capabilities and pedagogical tutorials because multiple labs have collaborated during code development to help share best practices.MNE-Python also gives easy access to preprocessed datasets,helping users to get started quickly and facilitating reproducibility ofmethods by other researchers. Full documentation, including dozens ofexamples, is available at http://martinos.org/mne.

  13. Implementing Python for DrRacket

    OpenAIRE

    Ramos, Pedro Palma; Leitão, António Menezes

    2014-01-01

    The Python programming language is becoming increasingly popular in a variety of areas, most notably among novice programmers. On the other hand, Racket and other Scheme dialects are considered excellent vehicles for introducing Computer Science concepts. This paper presents an implementation of Python for Racket and the DrRacket IDE. This allows Python programmers to use Racket libraries and vice versa, as well as using DrRacket's pedagogic features. In particular, it allows architects and d...

  14. NEVESIM: event-driven neural simulation framework with a Python interface.

    Science.gov (United States)

    Pecevski, Dejan; Kappel, David; Jonke, Zeno

    2014-01-01

    NEVESIM is a software package for event-driven simulation of networks of spiking neurons with a fast simulation core in C++, and a scripting user interface in the Python programming language. It supports simulation of heterogeneous networks with different types of neurons and synapses, and can be easily extended by the user with new neuron and synapse types. To enable heterogeneous networks and extensibility, NEVESIM is designed to decouple the simulation logic of communicating events (spikes) between the neurons at a network level from the implementation of the internal dynamics of individual neurons. In this paper we will present the simulation framework of NEVESIM, its concepts and features, as well as some aspects of the object-oriented design approaches and simulation strategies that were utilized to efficiently implement the concepts and functionalities of the framework. We will also give an overview of the Python user interface, its basic commands and constructs, and also discuss the benefits of integrating NEVESIM with Python. One of the valuable capabilities of the simulator is to simulate exactly and efficiently networks of stochastic spiking neurons from the recently developed theoretical framework of neural sampling. This functionality was implemented as an extension on top of the basic NEVESIM framework. Altogether, the intended purpose of the NEVESIM framework is to provide a basis for further extensions that support simulation of various neural network models incorporating different neuron and synapse types that can potentially also use different simulation strategies.

  15. Portable Just-in-Time Specialization of Dynamically Typed Scripting Languages

    Science.gov (United States)

    Williams, Kevin; McCandless, Jason; Gregg, David

    In this paper, we present a portable approach to JIT compilation for dynamically typed scripting languages. At runtime we generate ANSI C code and use the system's native C compiler to compile this code. The C compiler runs on a separate thread to the interpreter allowing program execution to continue during JIT compilation. Dynamic languages have variables which may change type at any point in execution. Our interpreter profiles variable types at both whole method and partial method granularity. When a frequently executed region of code is discovered, the compilation thread generates a specialized version of the region based on the profiled types. In this paper, we evaluate the level of instruction specialization achieved by our profiling scheme as well as the overall performance of our JIT.

  16. Design Automation Using Script Languages. High-Level CAD Templates in Non-Parametric Programs

    Science.gov (United States)

    Moreno, R.; Bazán, A. M.

    2017-10-01

    The main purpose of this work is to study the advantages offered by the application of traditional techniques of technical drawing in processes for automation of the design, with non-parametric CAD programs, provided with scripting languages. Given that an example drawing can be solved with traditional step-by-step detailed procedures, is possible to do the same with CAD applications and to generalize it later, incorporating references. In today’s modern CAD applications, there are striking absences of solutions for building engineering: oblique projections (military and cavalier), 3D modelling of complex stairs, roofs, furniture, and so on. The use of geometric references (using variables in script languages) and their incorporation into high-level CAD templates allows the automation of processes. Instead of repeatedly creating similar designs or modifying their data, users should be able to use these templates to generate future variations of the same design. This paper presents the automation process of several complex drawing examples based on CAD script files aided with parametric geometry calculation tools. The proposed method allows us to solve complex geometry designs not currently incorporated in the current CAD applications and to subsequently create other new derivatives without user intervention. Automation in the generation of complex designs not only saves time but also increases the quality of the presentations and reduces the possibility of human errors.

  17. EPICS V4 in Python

    International Nuclear Information System (INIS)

    Guobao Shen; Kraimer, M.; Davidsaver, M.

    2012-01-01

    At NSLS-II, Python has been selected as the primary development language for physics applications. Interest in Python as a rapid application development environment continues to grow. Many large experimental scientific facilities have adopted Python for beam commissioning and the operation. The EPICS control system framework has become the de facto standard for the control of large experimental facilities, where it is in use in over 100 facilities. The next version of EPICS (EPICS V4), under active development will extend the support for physics applications, data acquisition, and data analysis. Python support for EPICS V4 will provide an effective framework to address these requirements. This paper presents design, development and status of activities focused on EPICS V4 in Python

  18. Aura: A Multi-Featured Programming Framework in Python

    Directory of Open Access Journals (Sweden)

    2010-09-01

    Full Text Available This paper puts forward the design, programming and application of innovative educational software, ‘Aura’ made using Python and PyQt Python bindings. The research paper presents a new concept of using a single tool to relate between syntaxes of various programming languages and algorithms. It radically increases their understanding and retaining capacity, since they can correlate between many programming languages. The software is a totally unorthodox attempt towards helping students who have their first tryst with programming languages. The application is designed to help students understand how algorithms work and thus, help them in learning multiple programming languages on a single platform using an interactive graphical user interface. This paper elucidates how using Python and PyQt bindings, a comprehensive feature rich application, that implements an interactive algorithm building technique, a web browser, multiple programming language framework, a code generator and a real time code sharing hub be embedded into a single interface. And also explains, that using Python as building tool, it requires much less coding than conventional feature rich applications coded in other programming languages, and at the same time does not compromise on stability, inter-operability and robustness of the application.

  19. Learn AppleScript The Comprehensive Guide to Scripting and Automation on MAC OS X

    CERN Document Server

    Rosenthal, Hanaan

    2009-01-01

    AppleScript is an English-like, easy-to-understand scripting language built into every Mac. AppleScript can automate hundreds of AppleScriptable applications, performing tasks both large and small, complex and simple. Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third Edition has been completely updated for Mac OS X Snow Leopard. It's all here, with an emphasis on practical information that will help you solve any automation problem-from the most mundane repetitive tasks to highly integrated workflows of complex systems. * Friendly enough for beginners, d

  20. CoffeeScript application development cookbook

    CERN Document Server

    Hatfield, Mike

    2015-01-01

    If you are interested in developing modern applications, this book will help you leverage the vast JavaScript ecosystem while using an elegant language, helping you avoid the shortcomings of JavaScript.

  1. Python Introduction and Installation

    Directory of Open Access Journals (Sweden)

    William J. Turkel

    2012-07-01

    Full Text Available This first lesson in our section on dealing with Online Sources is designed to get you and your computer set up to start programming. We will focus on installing the relevant software – all free and reputable – and finally we will help you to get your toes wet with some simple programming that provides immediate results. In this opening module you will install the Python programming language, the Beautiful Soup HTML/XML parser, and a text editor. Screencaps provided here come from Komodo Edit, but you can use any text editor capable of working with Python. Here’s a list of other options: Python Editors. Once everything is installed, you will write your first programs, “Hello World” in Python and HTML.

  2. Pro Python System Administration

    CERN Document Server

    Sileika, R

    2010-01-01

    As time goes on, system administrators are presented with increasingly complicated challenges. In the early days, a team of engineers might have had to look after one or two systems. These days, one engineer can administer hundreds or thousands of systems. System administrators are gradually replacing their tools with more advanced and flexible ones. One of the choices is Python. Structurally, Python is a modern, high-level language with a very clean syntax. Python comes with many built-in libraries that can make automation tasks easier. It also has extensive set of third-party libraries and a

  3. The Little Book on CoffeeScript

    CERN Document Server

    MacCaw, Alex

    2012-01-01

    This little book shows JavaScript developers how to build superb web applications with CoffeeScript, the remarkable little language that's gaining considerable interest. Through example code, this guide demonstrates how CoffeeScript abstracts JavaScript, providing syntactical sugar and preventing many common errors. You'll learn CoffeeScript's syntax and idioms step by step, from basic variables and functions to complex comprehensions and classes. Written by Alex MacCaw, author of JavaScript Web Applications (O'Reilly), with contributions from CoffeeScript creator Jeremy Ashkenas, this book

  4. Extending and embedding the Python interpreter

    NARCIS (Netherlands)

    G. van Rossum (Guido)

    1995-01-01

    textabstractPython is an interpreted, object-oriented programming language. This document describes how to write modules in C or C++ to extend the Python interpreter with new modules. Those modules can define new functions but also new object types and their methods. The document also describes

  5. MTpy: A Python toolbox for magnetotellurics

    Science.gov (United States)

    Krieger, Lars; Peacock, Jared R.

    2014-01-01

    We present the software package MTpy that allows handling, processing, and imaging of magnetotelluric (MT) data sets. Written in Python, the code is open source, containing sub-packages and modules for various tasks within the standard MT data processing and handling scheme. Besides the independent definition of classes and functions, MTpy provides wrappers and convenience scripts to call standard external data processing and modelling software.

  6. Programming ArcGIS with Python cookbook

    CERN Document Server

    Pimpler, Eric

    2015-01-01

    Programming ArcGIS with Python Cookbook, Second Edition, is written for GIS professionals who wish to revolutionize their ArcGIS workflow with Python. Whether you are new to ArcGIS or a seasoned professional, you almost certainly spend time each day performing various geoprocessing tasks. This book will teach you how to use the Python programming language to automate these geoprocessing tasks and make you a more efficient and effective GIS professional.

  7. MEG and EEG data analysis with MNE-Python.

    Science.gov (United States)

    Gramfort, Alexandre; Luessi, Martin; Larson, Eric; Engemann, Denis A; Strohmeier, Daniel; Brodbeck, Christian; Goj, Roman; Jas, Mainak; Brooks, Teon; Parkkonen, Lauri; Hämäläinen, Matti

    2013-12-26

    Magnetoencephalography and electroencephalography (M/EEG) measure the weak electromagnetic signals generated by neuronal activity in the brain. Using these signals to characterize and locate neural activation in the brain is a challenge that requires expertise in physics, signal processing, statistics, and numerical methods. As part of the MNE software suite, MNE-Python is an open-source software package that addresses this challenge by providing state-of-the-art algorithms implemented in Python that cover multiple methods of data preprocessing, source localization, statistical analysis, and estimation of functional connectivity between distributed brain regions. All algorithms and utility functions are implemented in a consistent manner with well-documented interfaces, enabling users to create M/EEG data analysis pipelines by writing Python scripts. Moreover, MNE-Python is tightly integrated with the core Python libraries for scientific comptutation (NumPy, SciPy) and visualization (matplotlib and Mayavi), as well as the greater neuroimaging ecosystem in Python via the Nibabel package. The code is provided under the new BSD license allowing code reuse, even in commercial products. Although MNE-Python has only been under heavy development for a couple of years, it has rapidly evolved with expanded analysis capabilities and pedagogical tutorials because multiple labs have collaborated during code development to help share best practices. MNE-Python also gives easy access to preprocessed datasets, helping users to get started quickly and facilitating reproducibility of methods by other researchers. Full documentation, including dozens of examples, is available at http://martinos.org/mne.

  8. An introduction to Python and computer programming

    CERN Document Server

    Zhang, Yue

    2015-01-01

    This book introduces Python programming language and fundamental concepts in algorithms and computing. Its target audience includes students and engineers with little or no background in programming, who need to master a practical programming language and learn the basic thinking in computer science/programming. The main contents come from lecture notes for engineering students from all disciplines, and has received high ratings. Its materials and ordering have been adjusted repeatedly according to classroom reception. Compared to alternative textbooks in the market, this book introduces the underlying Python implementation of number, string, list, tuple, dict, function, class, instance and module objects in a consistent and easy-to-understand way, making assignment, function definition, function call, mutability and binding environments understandable inside-out. By giving the abstraction of implementation mechanisms, this book builds a solid understanding of the Python programming language.

  9. ActionScript 3.0 Bible

    CERN Document Server

    Braunstein, Roger

    2010-01-01

    The updated edition on all the latest features and capabilities of ActionScript 3.0 and Flash Player 10. ActionScript is a popular programming language used primarily for the development of Web sites and software. This update to the successful previous version introduces you to all the exciting new capabilities of ActionScript 3.0. You'll see how ActionScript 3.0 goes beyond its primary use of scripting Flash animations and is now an object-oriented evolution that runs ten times faster than previous versions and can be used in Adobe's new platforms, including Flex and AIR. Hands-on instruction

  10. GPAW - massively parallel electronic structure calculations with Python-based software

    DEFF Research Database (Denmark)

    Enkovaara, Jussi; Romero, Nichols A.; Shende, Sameer

    2011-01-01

    of the productivity enhancing features together with a good numerical performance. We have used this approach in implementing an electronic structure simulation software GPAW using the combination of Python and C programming languages. While the chosen approach works well in standard workstations and Unix...... popular choice. While dynamic, interpreted languages, such as Python, can increase the effciency of programmer, they cannot compete directly with the raw performance of compiled languages. However, by using an interpreted language together with a compiled language, it is possible to have most...... environments, massively parallel supercomputing systems can present some challenges in porting, debugging and profiling the software. In this paper we describe some details of the implementation and discuss the advantages and challenges of the combined Python/C approach. We show that despite the challenges...

  11. Python 3 text processing with NLTK 3 cookbook

    CERN Document Server

    Perkins, Jacob

    2014-01-01

    This book is intended for Python programmers interested in learning how to do natural language processing. Maybe you've learned the limits of regular expressions the hard way, or you've realized that human language cannot be deterministically parsed like a computer language. Perhaps you have more text than you know what to do with, and need automated ways to analyze and structure that text. This Cookbook will show you how to train and use statistical language models to process text in ways that are practically impossible with standard programming tools. A basic knowledge of Python and the basi

  12. Lexicon Reduction for Urdu/Arabic Script Based Character Recognition: A Multilingual OCR

    Directory of Open Access Journals (Sweden)

    Saeeda Naz

    2016-04-01

    Full Text Available Arabic script character recognition is challenging task due to complexity of the script and huge number of ligatures. We present a method for the development of multilingual Arabic script OCR (Optical Character Recognition and lexicon reduction for Arabic Script and its derivative languages. The objective of the proposed method is to overcome the large dataset Urdu and similar scripts by using GCT (Ghost Character Theory concept. Arabic and its sibling script languages share the similar character dataset i.e. the character set are difference in diacritic and writing styles like Naskh or Nasta?liq. Based on the proposed method, the lexicon for Arabic and Arabic script based languages can be minimized approximately up to 20 times. The proposed multilingual Arabic script OCR approach have been evaluated for online Arabic and its derivative language like Urdu using BPNN. The result showed that proposed method helps to not only the reduction of lexicon but also helps to develop the Multilanguage character recognition system for Arabic Script.

  13. AIMBAT: A Python/Matplotlib Tool for Measuring Teleseismic Arrival Times

    Science.gov (United States)

    Lou, X.; van der Lee, S.; Lloyd, S.

    2013-12-01

    Python is an open-source, platform-independent, and object-oriented scripting language. It became more popular in the seismologist community since the appearance of ObsPy (Beyreuther et al. 2010, Megies et al. 2011), which provides a powerful framework for seismic data access and processing. This study introduces a new Python-based tool named AIMBAT (Automated and Interactive Measurement of Body-wave Arrival Times) for measuring teleseismic body-wave arrival times on large-scale seismic event data (Lou et al. 2013). Compared to ObsPy, AIMBAT is a lighter tool that is more focused on a particular aspect of seismic data processing. It originates from the widely used MCCC (Multi-Channel Cross-Correlation) method developed by VanDecar and Crosson (1990). On top of the original MCCC procedure, AIMBAT is automated in initial phase picking and is interactive in quality control. The core cross-correlation function is implemented in Fortran to boost up performance in addition to Python. The GUI (graphical user interface) of AIMBAT depends on Matplotlib's GUI-neutral widgets and event-handling API. A number of sorting and (de)selecting options are designed to facilitate the quality control of seismograms. By using AIMBAT, both relative and absolute teleseismic body-wave arrival times are measured. AIMBAT significantly improves efficiency and quality of the measurements. User interaction is needed only to pick the target phase arrival and to set a time window on the array stack. The package is easy to install and use, open-source, and is publicly available. Graphical user interface of AIMBAT.

  14. Feasibility of Python in teaching programming

    Directory of Open Access Journals (Sweden)

    Rafael Martínez Estévez

    2014-03-01

    Full Text Available Given the diversity of the objectives of the programming courses in the Cuban educational system and the training of teachers, it is not easy to decide the language to be used in each case. The intention of this article is to bring to debate to our context a trend that has been growing in the last decade: Python as a first programming language. The aim of this study is to compile some inter national experiences in the use of Python in introductory programming courses, also analyzing their advantages and disadvantages.

  15. Re-imagining a Stata/Python Combination

    Science.gov (United States)

    Fiedler, James

    2013-01-01

    At last year's Stata Conference, I presented some ideas for combining Stata and the Python programming language within a single interface. Two methods were presented: in one, Python was used to automate Stata; in the other, Python was used to send simulated keystrokes to the Stata GUI. The first method has the drawback of only working in Windows, and the second can be slow and subject to character input limits. In this presentation, I will demonstrate a method for achieving interaction between Stata and Python that does not suffer these drawbacks, and I will present some examples to show how this interaction can be useful.

  16. Foundation ActionScript 3.0 for Flash and Flex

    CERN Document Server

    Richardson, Darren

    2009-01-01

    In this book, you'll: *Learn the fundamentals of ActionScript 3.0 using both the Flash IDE and Flex *Use ActionScript 3.0's object-oriented features *Manipulate sound and video to produce exciting modern web applications *Work with XML as your data source ActionScript 3.0, the latest version of the Flash Platform's scripting language, offers many new and powerful features. ActionScript is now a full-fledged programming language, with complete object-oriented capabilities, improved event handling, sound and video support, drawing capabilities, support for regular expressions, and much more. Whe

  17. A new open-source Python-based Space Weather data access, visualization, and analysis toolkit

    Science.gov (United States)

    de Larquier, S.; Ribeiro, A.; Frissell, N. A.; Spaleta, J.; Kunduri, B.; Thomas, E. G.; Ruohoniemi, J.; Baker, J. B.

    2013-12-01

    Space weather research relies heavily on combining and comparing data from multiple observational platforms. Current frameworks exist to aggregate some of the data sources, most based on file downloads via web or ftp interfaces. Empirical models are mostly fortran based and lack interfaces with more useful scripting languages. In an effort to improve data and model access, the SuperDARN community has been developing a Python-based Space Science Data Visualization Toolkit (DaViTpy). At the center of this development was a redesign of how our data (from 30 years of SuperDARN radars) was made available. Several access solutions are now wrapped into one convenient Python interface which probes local directories, a new remote NoSQL database, and an FTP server to retrieve the requested data based on availability. Motivated by the efficiency of this interface and the inherent need for data from multiple instruments, we implemented similar modules for other space science datasets (POES, OMNI, Kp, AE...), and also included fundamental empirical models with Python interfaces to enhance data analysis (IRI, HWM, MSIS...). All these modules and more are gathered in a single convenient toolkit, which is collaboratively developed and distributed using Github and continues to grow. While still in its early stages, we expect this toolkit will facilitate multi-instrument space weather research and improve scientific productivity.

  18. Isolating and Restricting Client-Side JavaScript:Isoleren en beperken van JavaScript aan de cliëntzijde

    OpenAIRE

    Van Acker, Steven

    2015-01-01

    In today’s web applications, no one disputes the important role of JavaScript asa client-side programming language. JavaScript can turn the Web into a lively,dynamic and interactive end-user experience. Unfortunately, JavaScript canalso be used to steal sensitive information and abuse powerful functionality. Sloppy input validation can make a web application vulnerable, allowingmalicious JavaScript code to leak into a web application’s JavaScript executionenvironment, where it leads to un...

  19. PRACTICAL APPROACH FOR HYPERSPECTRAL IMAGE PROCESSING IN PYTHON

    OpenAIRE

    Annala, L.; Eskelinen, M. A.; Hämäläinen, J.; Riihinen, A.; Pölönen, I.

    2018-01-01

    Python is a very popular programming language among data scientists around the world. Python can also be used in hyperspectral data analysis. There are some toolboxes designed for spectral imaging, such as Spectral Python and HyperSpy, but there is a need for analysis pipeline, which is easy to use and agile for different solutions. We propose a Python pipeline which is built on packages xarray, Holoviews and scikit-learn. We have developed some of own tools, MaskAccessor, VisualisorAccessor ...

  20. πScope: Python based scientific workbench with MDSplus data visualization tool

    Energy Technology Data Exchange (ETDEWEB)

    Shiraiwa, S., E-mail: shiraiwa@PSFC.MIT.EDU; Fredian, T.; Hillairet, J.; Stillerman, J.

    2016-11-15

    Highlights: • πScope provides great enhancement in MDSplus data visualization. • πScope provides a single platform for both data browsing and complicated analysis. • πScope is scriptable and easily expandable due to its object oriented. • πScope is written in python and available from (http://piscope.psfc.mit.edu/). - Abstract: A newly developed python based scientific data analysis and visualization tool, πScope ( (http://piscope.psfc.mit.edu)), is reported. The primary motivation is 1) to provide an updated tool to browse the MDSplus data beyond existing dwscope/jScope and 2) to realize a universal foundation to construct interface tools to perform computer modeling from experimental data. To visualize MDSplus data, πScope has many features including overplotting different signals and discharges, generating various plot types (line, contour, image, etc.), performing in-panel data analysis using python scripts, and producing publication quality graphics. The logic to generate multi-panel plots is designed to be backward compatible with dwscope, enabling smooth migration for users. πScope uses multi-threading in data loading, and is easy to modify and expand due to its object-oriented design. Furthermore, A user can access the data structure both from a GUI and a script, enabling relatively complex data analysis workflow built quickly on πScope.

  1. πScope: Python based scientific workbench with MDSplus data visualization tool

    International Nuclear Information System (INIS)

    Shiraiwa, S.; Fredian, T.; Hillairet, J.; Stillerman, J.

    2016-01-01

    Highlights: • πScope provides great enhancement in MDSplus data visualization. • πScope provides a single platform for both data browsing and complicated analysis. • πScope is scriptable and easily expandable due to its object oriented. • πScope is written in python and available from (http://piscope.psfc.mit.edu/). - Abstract: A newly developed python based scientific data analysis and visualization tool, πScope ( (http://piscope.psfc.mit.edu)), is reported. The primary motivation is 1) to provide an updated tool to browse the MDSplus data beyond existing dwscope/jScope and 2) to realize a universal foundation to construct interface tools to perform computer modeling from experimental data. To visualize MDSplus data, πScope has many features including overplotting different signals and discharges, generating various plot types (line, contour, image, etc.), performing in-panel data analysis using python scripts, and producing publication quality graphics. The logic to generate multi-panel plots is designed to be backward compatible with dwscope, enabling smooth migration for users. πScope uses multi-threading in data loading, and is easy to modify and expand due to its object-oriented design. Furthermore, A user can access the data structure both from a GUI and a script, enabling relatively complex data analysis workflow built quickly on πScope.

  2. Globalisation, Language Planning and Language Rights: The Recent Script Policy Measures Adopted by Japan and the People's Republic of China

    Science.gov (United States)

    Premaratne, Dilhara D.

    2015-01-01

    In 2009, two significant script policy measures were adopted by Japan and the People's Republic of China (China hereafter), both as a response to national language needs triggered by globalisation. However, the measures chosen by the two countries were very different, Japan choosing to increase and China choosing to standardise the Chinese…

  3. PNet: A Python Library for Petri Net Modeling and Simulation

    OpenAIRE

    Zhu En Chay; Bing Feng Goh; Maurice HT Ling

    2016-01-01

    Petri Net is a formalism to describe changes between 2 or more states across discrete time and has been used to model many systems. We present PNet – a pure Python library for Petri Net modeling and simulation in Python programming language. The design of PNet focuses on reducing the learning curve needed to define a Petri Net by using a text-based language rather than programming constructs to define transition rules. Complex transition rules can be refined as regular Python functions. To de...

  4. Pointer Analysis for JavaScript Programming Tools

    DEFF Research Database (Denmark)

    Feldthaus, Asger

    Tools that can assist the programmer with tasks, such as, refactoring or code navigation, have proven popular for Java, C#, and other programming languages. JavaScript is a widely used programming language, and its users could likewise benefit from such tools, but the dynamic nature of the language...... is an obstacle for the development of these. Because of this, tools for JavaScript have long remained ineffective compared to those for many other programming languages. Static pointer analysis can provide a foundation for more powerful tools, although the design of this analysis is itself a complicated endeavor....... In this work, we explore techniques for performing pointer analysis of JavaScript programs, and we find novel applications of these techniques. In particular, we demonstrate how these can be used for code navigation, automatic refactoring, semi-automatic refactoring of incomplete programs, and checking of type...

  5. Scaling-Up Effective Language and Literacy Instruction: Evaluating the Importance of Scripting and Group Size Components

    DEFF Research Database (Denmark)

    Bleses, Dorthe; Højen, Anders; Dale, Philip

    2018-01-01

    participated in a cluster-randomized evaluation of three variations of a language-literacy focused curriculum (LEAP) comprising 40 twice-weekly 30-min lessons. LEAP-LARGE and LEAP-SMALL conditions involved educators’ implementation of a scope and sequence of objectives using scripted lessons provided to whole......-class and small groups, respectively. In LEAP-OPEN, educators followed the scope and sequence but were allowed to determine the instructional activities for each of 40 lessons (i.e., they received no scripted lessons). A business-as-usual (BAU) condition served as the control. Overall, the largest effect sizes...

  6. Python for Unix and Linux system administration

    CERN Document Server

    Gift, Noah

    2007-01-01

    Python is an ideal language for solving problems, especially in Linux and Unix networks. With this pragmatic book, administrators can review various tasks that often occur in the management of these systems, and learn how Python can provide a more efficient and less painful way to handle them. Each chapter in Python for Unix and Linux System Administration presents a particular administrative issue, such as concurrency or data backup, and presents Python solutions through hands-on examples. Once you finish this book, you'll be able to develop your own set of command-line utilities with Pytho

  7. The Next Generation of Ground Operations Command and Control; Scripting in C Sharp and Visual Basic

    Science.gov (United States)

    Ritter, George; Pedoto, Ramon

    2010-01-01

    This slide presentation reviews the use of scripting languages in Ground Operations Command and Control. It describes the use of scripting languages in a historical context, the advantages and disadvantages of scripts. It describes the Enhanced and Redesigned Scripting (ERS) language, that was designed to combine the features of a scripting language and the graphical and IDE richness of a programming language with the utility of scripting languages. ERS uses the Microsoft Visual Studio programming environment and offers custom controls that enable an ERS developer to extend the Visual Basic and C sharp language interface with the Payload Operations Integration Center (POIC) telemetry and command system.

  8. CoffeeScript application development

    CERN Document Server

    Young, Ian

    2013-01-01

    CoffeeScript Application Development is a practical, hands-on guide with step-by-step instructions. Follow the smooth and easy tutorial approach, covering examples that build in complexity. By the final chapter you'll be wondering why you didn't try CoffeeScript sooner.If you are a JavaScript developer who wants to save time and add power to your code, then this is the book that will help you do it. With minimal fuss you will learn a whole new language which will reduce your application development time from weeks to days.

  9. Interactive game programming with Python (CodeSkulptor)

    OpenAIRE

    Ajayi, Richard Olugbenga

    2014-01-01

    Over the years, several types of gaming platforms have been created to encourage a more organised and friendly atmosphere for game lovers in various works of life, culture, and environment. This thesis focuses on the concept of interactive programming using Python. It encourages the use of Python to create simple interactive games applications based on basic human concept and ideas. CodeSkulptor is a browser-based IDE programming environment and uses the Python programming language. O...

  10. TVB-EduPack - An interactive learning and scripting platform for The Virtual Brain

    Directory of Open Access Journals (Sweden)

    Henrik eMatzke

    2015-11-01

    Full Text Available The Virtual Brain (TVB; www.thevirtualbrain.org is a neuroinformatics platform for full brain network simulation based on individual anatomical connectivity data. The framework addresses clinical and neuroscientific questions by simulating multi-scale neural dynamics that range from local population activity to large-scale brain function and related macroscopic signals like electroencephalography and functional magnetic resonance imaging. TVB is equipped with a graphical and a command-line interface to create models that capture the characteristic biological variability to predict the brain activity of individual subjects. To enable researchers from various backgrounds a quick start into TVB and brain network modelling in general, we developed an educational module: TVB-EduPack. EduPack offers two educational functionalities that seamlessly integrate into TVB’s graphical user interface (GUI: (i interactive tutorials introduce GUI elements, guide through the basic mechanics of software usage and develop complex use-case scenarios; animations, videos and textual descriptions transport essential principles of computational neuroscience and brain modelling; (ii an automatic script generator records model parameters and produces input files for TVB’s Python programming interface; thereby, simulation configurations can be exported as scripts that allow flexible customization of the modelling process and self-defined batch- and post-processing applications while benefitting from the full power of the Python language and its toolboxes. This article covers the implementation of TVB-EduPack and its integration into TVB architecture. Like TVB, EduPack is an open source community project that lives from the participation and contribution of its users. TVB-EduPack can be obtained as part of TVB from thevirtualbrain.org.

  11. HOPE: A Python just-in-time compiler for astrophysical computations

    Science.gov (United States)

    Akeret, J.; Gamper, L.; Amara, A.; Refregier, A.

    2015-04-01

    The Python programming language is becoming increasingly popular for scientific applications due to its simplicity, versatility, and the broad range of its libraries. A drawback of this dynamic language, however, is its low runtime performance which limits its applicability for large simulations and for the analysis of large data sets, as is common in astrophysics and cosmology. While various frameworks have been developed to address this limitation, most focus on covering the complete language set, and either force the user to alter the code or are not able to reach the full speed of an optimised native compiled language. In order to combine the ease of Python and the speed of C++, we developed HOPE, a specialised Python just-in-time (JIT) compiler designed for numerical astrophysical applications. HOPE focuses on a subset of the language and is able to translate Python code into C++ while performing numerical optimisation on mathematical expressions at runtime. To enable the JIT compilation, the user only needs to add a decorator to the function definition. We assess the performance of HOPE by performing a series of benchmarks and compare its execution speed with that of plain Python, C++ and the other existing frameworks. We find that HOPE improves the performance compared to plain Python by a factor of 2 to 120, achieves speeds comparable to that of C++, and often exceeds the speed of the existing solutions. We discuss the differences between HOPE and the other frameworks, as well as future extensions of its capabilities. The fully documented HOPE package is available at http://hope.phys.ethz.ch and is published under the GPLv3 license on PyPI and GitHub.

  12. Managing Fieldwork Data with Toolbox and the Natural Language Toolkit

    Directory of Open Access Journals (Sweden)

    Stuart Robinson

    2007-06-01

    Full Text Available This paper shows how fieldwork data can be managed using the program Toolbox together with the Natural Language Toolkit (NLTK for the Python programming language. It provides background information about Toolbox and describes how it can be downloaded and installed. The basic functionality of the program for lexicons and texts is described, and its strengths and weaknesses are reviewed. Its underlying data format is briefly discussed, and Toolbox processing capabilities of NLTK are introduced, showing ways in which it can be used to extend the functionality of Toolbox. This is illustrated with a few simple scripts that demonstrate basic data management tasks relevant to language documentation, such as printing out the contents of a lexicon as HTML.

  13. Learning ActionScript 30

    CERN Document Server

    Shupe, Rich

    2010-01-01

    If you're new to ActionScript 3.0, or want to enhance your skill set, this bestselling book is the ideal guide. Designers, developers, and programmers alike will find Learning ActionScript 3.0 invaluable for navigating ActionScript 3.0's learning curve. You'll learn the language by getting a clear look at essential topics such as logic, event handling, displaying content, classes, and much more. Updated for Flash Professional CS5, this revised and expanded edition delivers hands-on exercises and full-color code samples to help you increase your abilities as you progress through the book. Top

  14. Python for secret agents

    CERN Document Server

    Lott, Steven F

    2014-01-01

    If you are a Python beginner who is looking to learn the language through interesting projects, this book is for you. A basic knowledge of programming and statistics is beneficial to get the most out of the book.

  15. Python-Assisted MODFLOW Application and Code Development

    Science.gov (United States)

    Langevin, C.

    2013-12-01

    The U.S. Geological Survey (USGS) has a long history of developing and maintaining free, open-source software for hydrological investigations. The MODFLOW program is one of the most popular hydrologic simulation programs released by the USGS, and it is considered to be the most widely used groundwater flow simulation code. MODFLOW was written using a modular design and a procedural FORTRAN style, which resulted in code that could be understood, modified, and enhanced by many hydrologists. The code is fast, and because it uses standard FORTRAN it can be run on most operating systems. Most MODFLOW users rely on proprietary graphical user interfaces for constructing models and viewing model results. Some recent efforts, however, have focused on construction of MODFLOW models using open-source Python scripts. Customizable Python packages, such as FloPy (https://code.google.com/p/flopy), can be used to generate input files, read simulation results, and visualize results in two and three dimensions. Automating this sequence of steps leads to models that can be reproduced directly from original data and rediscretized in space and time. Python is also being used in the development and testing of new MODFLOW functionality. New packages and numerical formulations can be quickly prototyped and tested first with Python programs before implementation in MODFLOW. This is made possible by the flexible object-oriented design capabilities available in Python, the ability to call FORTRAN code from Python, and the ease with which linear systems of equations can be solved using SciPy, for example. Once new features are added to MODFLOW, Python can then be used to automate comprehensive regression testing and ensure reliability and accuracy of new versions prior to release.

  16. Neural network based system for script identification in Indian ...

    Indian Academy of Sciences (India)

    2016-08-26

    Aug 26, 2016 ... The paper describes a neural network-based script identification system which can be used in the machine reading of documents written in English, Hindi and Kannada language scripts. Script identification is a basic requirement in automation of document processing, in multi-script, multi-lingual ...

  17. pypet: A Python Toolkit for Data Management of Parameter Explorations.

    Science.gov (United States)

    Meyer, Robert; Obermayer, Klaus

    2016-01-01

    pypet (Python parameter exploration toolkit) is a new multi-platform Python toolkit for managing numerical simulations. Sampling the space of model parameters is a key aspect of simulations and numerical experiments. pypet is designed to allow easy and arbitrary sampling of trajectories through a parameter space beyond simple grid searches. pypet collects and stores both simulation parameters and results in a single HDF5 file. This collective storage allows fast and convenient loading of data for further analyses. pypet provides various additional features such as multiprocessing and parallelization of simulations, dynamic loading of data, integration of git version control, and supervision of experiments via the electronic lab notebook Sumatra. pypet supports a rich set of data formats, including native Python types, Numpy and Scipy data, Pandas DataFrames, and BRIAN(2) quantities. Besides these formats, users can easily extend the toolkit to allow customized data types. pypet is a flexible tool suited for both short Python scripts and large scale projects. pypet's various features, especially the tight link between parameters and results, promote reproducible research in computational neuroscience and simulation-based disciplines.

  18. Python for scientists

    CERN Document Server

    Stewart, John M

    2017-01-01

    Scientific Python is a significant public domain alternative to expensive proprietary software packages. This book teaches from scratch everything the working scientist needs to know using copious, downloadable, useful and adaptable code snippets. Readers will discover how easy it is to implement and test non-trivial mathematical algorithms and will be guided through the many freely available add-on modules. A range of examples, relevant to many different fields, illustrate the language's capabilities. The author also shows how to use pre-existing legacy code (usually in Fortran77) within the Python environment, thus avoiding the need to master the original code. In this new edition, several chapters have been re-written to reflect the IPython notebook style. With an extended index, an entirely new chapter discussing SymPy and a substantial increase in the number of code snippets, researchers and research students will be able to quickly acquire all the skills needed for using Python effectively.

  19. Využití jazyka TypeScript v Power BI

    OpenAIRE

    Černý, Jan

    2016-01-01

    This bachelor thesis looks into creating visualisations in Power BI, product of Microsoft company, and in the TypeScript programming language. Its objective is to explain the visualisation structure and its development. The introductory part of the thesis introduces basic terms, the second part describes the JavaScript language on which TypeScript is patterned. The third chapter inquires into TypeScript and the fourth chapter describes Power BI. The last chapter contains the visualisations th...

  20. Pyception: Teaching Python with a Serious Game

    OpenAIRE

    Laskemoen, Kristian

    2013-01-01

    This thesis set out to study how an online serious game could affect users? motivation on learning Python. One of the projects core goals is to find out whether learning Python is more motivating when having an effortless start through a web based game. A second goal is to find out if Python as a programming language are well suited for a serious game.After the development and implementation of the game, it was performed a user experiment in order to receive feedback. Data from this user expe...

  1. Some Aspects of Culture Teaching in Foreign Language and ESP Classes: Cultural Scripts and Small Talk

    Directory of Open Access Journals (Sweden)

    Ivona Baranovskaja

    2011-12-01

    Full Text Available The present paper deals with the problem of teaching culture in the foreign language classes at all levels of education. Cultural studies should not be separated from the language syllabus and foreign language learning should not be limited to formal learning of systems of sounds, words, and syntactic structures, but should also include learning the culture of the target language. Success in intercultural communication depends greatly on the understanding of a number of cultural features. The article emphasizes the importance of teaching and learning target culture, as well as introduces the analysis of cultural scripts and small talk in English, Russian and Polish languages. Understanding the cultural differences will benefit and facilitate cross-cultural communication under diverse circumstances. Thereby, this issue is relevant to foreign language and ESP classes focusing on the improvement of both students’ language and cultural skills.

  2. Výuka algoritmizace a programování se zaměřením na programovací jazyk Python

    OpenAIRE

    Kotek, Lukáš

    2013-01-01

    The thesis researches the ability of use of Python programming language in the field of high school education and uses qualitative and quantitative methods of research and finds Python suitable. The thesis also brings theoretical analysis of the Python language, including practical exams in the form of sample programs. It researchs even other programming languages used in education and their suitability for this purpose and compares them with Python programming language. It also finds two mos...

  3. Python and AWS Cookbook

    CERN Document Server

    Garnaat, Mitch

    2011-01-01

    If you intend to use Amazon Web Services (AWS) for remote computing and storage, Python is an ideal programming language for developing applications and controlling your cloud-based infrastructure. This cookbook gets you started with more than two dozen recipes for using Python with AWS, based on the author's boto library. You'll find detailed recipes for working with the S3 storage service as well as EC2, the service that lets you design and build cloud applications. Each recipe includes a code solution you can use immediately, along with a discussion of why and how the recipe works. You al

  4. Expyriment: a Python library for cognitive and neuroscientific experiments.

    Science.gov (United States)

    Krause, Florian; Lindemann, Oliver

    2014-06-01

    Expyriment is an open-source and platform-independent lightweight Python library for designing and conducting timing-critical behavioral and neuroimaging experiments. The major goal is to provide a well-structured Python library for script-based experiment development, with a high priority being the readability of the resulting program code. Expyriment has been tested extensively under Linux and Windows and is an all-in-one solution, as it handles stimulus presentation, the recording of input/output events, communication with other devices, and the collection and preprocessing of data. Furthermore, it offers a hierarchical design structure, which allows for an intuitive transition from the experimental design to a running program. It is therefore also suited for students, as well as for experimental psychologists and neuroscientists with little programming experience.

  5. A cross-linguistic evaluation of script-specific effects on fMRI lateralization in late second language readers

    Directory of Open Access Journals (Sweden)

    Maki Sophia Koyama

    2014-04-01

    Full Text Available Behavioral and neuroimaging studies have provided evidence that reading is strongly left lateralized, and this pattern of functional lateralization can be indicative of reading competence. However, it remains unclear whether functional lateralization differs between the first (L1 and second (L2 languages in bilingual L2 readers. This question is particularly important when the particular script, or orthography, learned by the L2 readers is markedly different from their L1 script. In this study, we quantified functional lateralization in brain regions involved in visual word recognition for participants’ L1 and L2 scripts, with a particular focus on the effects of L1-L2 script differences in the visual complexity and orthographic depth of the script. Two different groups of late L2 learners participated in an fMRI experiment: L1 readers of Japanese who learnt to read alphabetic English and L1 readers of English who learnt to read both Japanese syllabic Kana and logographic Kanji. The results showed weaker leftward lateralization in the posterior lateral occipital complex (pLOC for logographic Kanji compared with syllabic and alphabetic scripts in both L1 and L2 readers of Kanji. When both L1 and L2 scripts were non-logographic, where symbols are mapped onto sounds, functional lateralization did not significantly differ between L1 and L2 scripts in any region, in any group. Our findings indicate that weaker leftward lateralization for logographic reading reflects greater requirement of the right hemisphere for processing visually complex logographic Kanji symbols, irrespective of whether Kanji is the readers’ L1 or L2, rather than characterizing the efforts of L2 readers to accommodate to the L2 script Finally, brain-behavior analysis revealed that functional lateralization for L2 reading predicted L2 reading competency.

  6. Stimfit: quantifying electrophysiological data with Python

    Directory of Open Access Journals (Sweden)

    Segundo Jose Guzman

    2014-02-01

    Full Text Available Intracellular electrophysiological recordings provide crucial insights into elementary neuronal signals such as action potentials and synaptic currents. Analyzing and interpreting these signals is essential for a quantitative understanding of neuronal information processing, and requires both fast data visualization and ready access to complex analysis routines. To achieve this goal, we have developed Stimfit, a free software package for cellular neurophysiology with a Python scripting interface and a built-in Python shell. The program supports most standard file formats for cellular neurophysiology and other biomedical signals through the Biosig library. To quantify and interpret the activity of single neurons and communication between neurons, the program includes algorithms to characterize the kinetics of presynaptic action potentials and postsynaptic currents, estimate latencies between pre- and postsynaptic events, and detect spontaneously occurring events. We validate and benchmark these algorithms, give estimation errors, and provide sample use cases, showing that Stimfit represents an efficient, accessible and extensible way to accurately analyze and interpret neuronal signals.

  7. Practical Approach for Hyperspectral Image Processing in Python

    Science.gov (United States)

    Annala, L.; Eskelinen, M. A.; Hämäläinen, J.; Riihinen, A.; Pölönen, I.

    2018-04-01

    Python is a very popular programming language among data scientists around the world. Python can also be used in hyperspectral data analysis. There are some toolboxes designed for spectral imaging, such as Spectral Python and HyperSpy, but there is a need for analysis pipeline, which is easy to use and agile for different solutions. We propose a Python pipeline which is built on packages xarray, Holoviews and scikit-learn. We have developed some of own tools, MaskAccessor, VisualisorAccessor and a spectral index library. They also fulfill our goal of easy and agile data processing. In this paper we will present our processing pipeline and demonstrate it in practice.

  8. HTML5 programming with JavaScript for dummies

    CERN Document Server

    Mueller, John Paul

    2013-01-01

    Web designers and programmers, add JavaScript to your HTML5 development toolkit without fear Modern websites are complex, and some of the most exciting features - things like geolocation, canvas, portability to mobile and more - require JavaScript to leverage what HTML5 can create. Don't know JavaScript? That's where HTML5 Programming with JavaScript For Dummies comes in. Rather than walking you through JavaScript as a programming language, it approaches JavaScript as a tool to help you enhance web pages. Helps web designers and programmers tap the full power of HT

  9. A Discussion about Upgrading the Quick Script Platform to Create Natural Language based IoT Systems

    DEFF Research Database (Denmark)

    Khanna, Anirudh; Das, Bhagwan; Pandey, Bishwajeet

    2016-01-01

    With the advent of AI and IoT, the idea of incorporating smart things/appliances in our day to day life is converting into a reality. The paper discusses the possibilities and potential of designing IoT systems which can be controlled via natural language, with help of Quick Script as a development...

  10. Functional programming in JavaScript

    CERN Document Server

    Mantyla, Dan

    2015-01-01

    If you are a JavaScript developer interested in learning functional programming, looking for the quantum leap towards mastering the JavaScript language, or just want to become a better programmer in general, then this book is ideal for you. It is aimed at programmers involved in developing reactive frontend apps, server-side apps that wrangle with reliability and concurrency, and everything in between.

  11. Dr.LiTHO: a development and research lithography simulator

    Science.gov (United States)

    Fühner, Tim; Schnattinger, Thomas; Ardelean, Gheorghe; Erdmann, Andreas

    2007-03-01

    This paper introduces Dr.LiTHO, a research and development oriented lithography simulation environment developed at Fraunhofer IISB to flexibly integrate our simulation models into one coherent platform. We propose a light-weight approach to a lithography simulation environment: The use of a scripting (batch) language as an integration platform. Out of the great variety of different scripting languages, Python proved superior in many ways: It exhibits a good-natured learning-curve, it is efficient, available on virtually any platform, and provides sophisticated integration mechanisms for existing programs. In this paper, we will describe the steps, required to provide Python bindings for existing programs and to finally generate an integrated simulation environment. In addition, we will give a short introduction into selected software design demands associated with the development of such a framework. We will especially focus on testing and (both technical and user-oriented) documentation issues. Dr.LiTHO Python files contain not only all simulation parameter settings but also the simulation flow, providing maximum flexibility. In addition to relatively simple batch jobs, repetitive tasks can be pooled in libraries. And as Python is a full-blown programming language, users can add virtually any functionality, which is especially useful in the scope of simulation studies or optimization tasks, that often require masses of evaluations. Furthermore, we will give a short overview of the numerous existing Python packages. Several examples demonstrate the feasibility and productiveness of integrating Python packages into custom Dr.LiTHO scripts.

  12. Mixed Messages: Measuring Conformance and Non-Interference in TypeScript

    OpenAIRE

    Williams, Jack; Morris, J. Garrett; Wadler, Philip; Zalewski, Jakub

    2017-01-01

    TypeScript participates in the recent trend among programming languages to support gradual typing. The DefinitelyTyped Repository for TypeScript supplies type definitions for over 2000 popular JavaScript libraries. However, there is no guarantee that implementations conform to their corresponding declarations.We present a practical evaluation of gradual typing for TypeScript. We have developed a tool for use with TypeScript, based on the polymorphic blame calculus, for monitoring JavaScript l...

  13. An Object-Oriented Python Implementation of an Intermediate-Level Atmospheric Model

    Science.gov (United States)

    Lin, J. W.

    2008-12-01

    The Neelin-Zeng Quasi-equilibrium Tropical Circulation Model (QTCM1) is a Fortran-based intermediate-level atmospheric model that includes simplified treatments of several physical processes, including a GCM-like convective scheme and a land-surface scheme with representations of different surface types, evaporation, and soil moisture. This model has been used in studies of the Madden-Julian oscillation, ENSO, and vegetation-atmosphere interaction effects on climate. Through the assumption of convective quasi-equilibrium in the troposphere, the QTCM1 is able to include full nonlinearity, resolve baroclinic disturbances, and generate a reasonable climatology, all at low computational cost. One year of simulation on a PC at 5.625 × 3.75 degree longitude-latitude resolution takes under three minutes of wall-clock time. The Python package qtcm implements the QTCM1 in a mixed-language environment that retains the speed of compiled Fortran while providing the benefits of Python's object-oriented framework and robust suite of utilities and datatypes. We describe key programming constructs used to create this modeling environment: the decomposition of model runs into Python objects, providing methods so visualization tools are attached to model runs, and the use of Python's mutable datatypes (lists and dictionaries) to implement the "run list" entity, which enables total runtime control of subroutine execution order and content. The result is an interactive modeling environment where the traditional sequence of "hypothesis → modeling → visualization and analysis" is opened up and made nonlinear and flexible. In this environment, science tasks such as parameter-space exploration and testing alternative parameterizations can be easily automated, without the need for multiple versions of the model code interacting with a bevy of makefiles and shell scripts. The environment also simplifies interfacing of the atmospheric model to other models (e.g., hydrologic models

  14. PyChimera: use UCSF Chimera modules in any Python 2.7 project.

    Science.gov (United States)

    Rodríguez-Guerra Pedregal, Jaime; Maréchal, Jean-Didier

    2018-05-15

    UCSF Chimera is a powerful visualization tool remarkably present in the computational chemistry and structural biology communities. Built on a C++ core wrapped under a Python 2.7 environment, one could expect to easily import UCSF Chimera's arsenal of resources in custom scripts or software projects. Nonetheless, this is not readily possible if the script is not executed within UCSF Chimera due to the isolation of the platform. UCSF ChimeraX, successor to the original Chimera, partially solves the problem but yet major upgrades need to be undergone so that this updated version can offer all UCSF Chimera features. PyChimera has been developed to overcome these limitations and provide access to the UCSF Chimera codebase from any Python 2.7 interpreter, including interactive programming with tools like IPython and Jupyter Notebooks, making it easier to use with additional third-party software. PyChimera is LGPL-licensed and available at https://github.com/insilichem/pychimera. jaime.rodriguezguerra@uab.cat or jeandidier.marechal@uab.cat. Supplementary data are available at Bioinformatics online.

  15. An Open-Source Automated Peptide Synthesizer Based on Arduino and Python.

    Science.gov (United States)

    Gali, Hariprasad

    2017-10-01

    The development of the first open-source automated peptide synthesizer, PepSy, using Arduino UNO and readily available components is reported. PepSy was primarily designed to synthesize small peptides in a relatively small scale (<100 µmol). Scripts to operate PepSy in a fully automatic or manual mode were written in Python. Fully automatic script includes functions to carry out resin swelling, resin washing, single coupling, double coupling, Fmoc deprotection, ivDde deprotection, on-resin oxidation, end capping, and amino acid/reagent line cleaning. Several small peptides and peptide conjugates were successfully synthesized on PepSy with reasonably good yields and purity depending on the complexity of the peptide.

  16. PyMercury: Interactive Python for the Mercury Monte Carlo Particle Transport Code

    International Nuclear Information System (INIS)

    Iandola, F.N.; O'Brien, M.J.; Procassini, R.J.

    2010-01-01

    Monte Carlo particle transport applications are often written in low-level languages (C/C++) for optimal performance on clusters and supercomputers. However, this development approach often sacrifices straightforward usability and testing in the interest of fast application performance. To improve usability, some high-performance computing applications employ mixed-language programming with high-level and low-level languages. In this study, we consider the benefits of incorporating an interactive Python interface into a Monte Carlo application. With PyMercury, a new Python extension to the Mercury general-purpose Monte Carlo particle transport code, we improve application usability without diminishing performance. In two case studies, we illustrate how PyMercury improves usability and simplifies testing and validation in a Monte Carlo application. In short, PyMercury demonstrates the value of interactive Python for Monte Carlo particle transport applications. In the future, we expect interactive Python to play an increasingly significant role in Monte Carlo usage and testing.

  17. pypet: A Python Toolkit for Data Management of Parameter Explorations

    Directory of Open Access Journals (Sweden)

    Robert Meyer

    2016-08-01

    Full Text Available pypet (Python parameter exploration toolkit is a new multi-platform Python toolkit for managing numerical simulations. Sampling the space of model parameters is a key aspect of simulations and numerical experiments. pypet is designed to allow easy and arbitrary sampling of trajectories through a parameter space beyond simple grid searches.pypet collects and stores both simulation parameters and results in a single HDF5 file.This collective storage allows fast and convenient loading of data for further analyses.pypet provides various additional features such as multiprocessing and parallelization of simulations, dynamic loading of data, integration of git version control, and supervision of experiments via the electronic lab notebook Sumatra. pypet supports a rich set of data formats, including native Python types, Numpy and Scipy data, Pandas DataFrames, and BRIAN(2 quantities. Besides these formats, users can easily extend the toolkit to allow customized data types. pypet is a flexible tool suited for both short Python scripts and large scale projects. pypet's various features, especially the tight link between parameters and results, promote reproducible research in computational neuroscience and simulation-based disciplines.

  18. PRACTICAL APPROACH FOR HYPERSPECTRAL IMAGE PROCESSING IN PYTHON

    Directory of Open Access Journals (Sweden)

    L. Annala

    2018-04-01

    Full Text Available Python is a very popular programming language among data scientists around the world. Python can also be used in hyperspectral data analysis. There are some toolboxes designed for spectral imaging, such as Spectral Python and HyperSpy, but there is a need for analysis pipeline, which is easy to use and agile for different solutions. We propose a Python pipeline which is built on packages xarray, Holoviews and scikit-learn. We have developed some of own tools, MaskAccessor, VisualisorAccessor and a spectral index library. They also fulfill our goal of easy and agile data processing. In this paper we will present our processing pipeline and demonstrate it in practice.

  19. TmiRUSite and TmiROSite scripts: searching for mRNA fragments with miRNA binding sites with encoded amino acid residues

    OpenAIRE

    Berillo, Olga; Régnier, Mireille; Ivashchenko, Anatoly

    2014-01-01

    microRNAs are small RNA molecules that inhibit the translation of target genes. microRNA binding sites are located in the untranslated regions as well as in the coding domains. We describe TmiRUSite and TmiROSite scripts developed using python as tools for the extraction of nucleotide sequences for miRNA binding sites with their encoded amino acid residue sequences. The scripts allow for retrieving a set of additional sequences at left and at right from the binding site. The scripts presents ...

  20. HOPE: Just-in-time Python compiler for astrophysical computations

    Science.gov (United States)

    Akeret, Joel; Gamper, Lukas; Amara, Adam; Refregier, Alexandre

    2014-11-01

    HOPE is a specialized Python just-in-time (JIT) compiler designed for numerical astrophysical applications. HOPE focuses on a subset of the language and is able to translate Python code into C++ while performing numerical optimization on mathematical expressions at runtime. To enable the JIT compilation, the user only needs to add a decorator to the function definition. By using HOPE, the user benefits from being able to write common numerical code in Python while getting the performance of compiled implementation.

  1. Pyvolve: A Flexible Python Module for Simulating Sequences along Phylogenies.

    Science.gov (United States)

    Spielman, Stephanie J; Wilke, Claus O

    2015-01-01

    We introduce Pyvolve, a flexible Python module for simulating genetic data along a phylogeny using continuous-time Markov models of sequence evolution. Easily incorporated into Python bioinformatics pipelines, Pyvolve can simulate sequences according to most standard models of nucleotide, amino-acid, and codon sequence evolution. All model parameters are fully customizable. Users can additionally specify custom evolutionary models, with custom rate matrices and/or states to evolve. This flexibility makes Pyvolve a convenient framework not only for simulating sequences under a wide variety of conditions, but also for developing and testing new evolutionary models. Pyvolve is an open-source project under a FreeBSD license, and it is available for download, along with a detailed user-manual and example scripts, from http://github.com/sjspielman/pyvolve.

  2. pyPaSWAS: Python-based multi-core CPU and GPU sequence alignment.

    Science.gov (United States)

    Warris, Sven; Timal, N Roshan N; Kempenaar, Marcel; Poortinga, Arne M; van de Geest, Henri; Varbanescu, Ana L; Nap, Jan-Peter

    2018-01-01

    Our previously published CUDA-only application PaSWAS for Smith-Waterman (SW) sequence alignment of any type of sequence on NVIDIA-based GPUs is platform-specific and therefore adopted less than could be. The OpenCL language is supported more widely and allows use on a variety of hardware platforms. Moreover, there is a need to promote the adoption of parallel computing in bioinformatics by making its use and extension more simple through more and better application of high-level languages commonly used in bioinformatics, such as Python. The novel application pyPaSWAS presents the parallel SW sequence alignment code fully packed in Python. It is a generic SW implementation running on several hardware platforms with multi-core systems and/or GPUs that provides accurate sequence alignments that also can be inspected for alignment details. Additionally, pyPaSWAS support the affine gap penalty. Python libraries are used for automated system configuration, I/O and logging. This way, the Python environment will stimulate further extension and use of pyPaSWAS. pyPaSWAS presents an easy Python-based environment for accurate and retrievable parallel SW sequence alignments on GPUs and multi-core systems. The strategy of integrating Python with high-performance parallel compute languages to create a developer- and user-friendly environment should be considered for other computationally intensive bioinformatics algorithms.

  3. Large-scale automated image analysis for computational profiling of brain tissue surrounding implanted neuroprosthetic devices using Python.

    Science.gov (United States)

    Rey-Villamizar, Nicolas; Somasundar, Vinay; Megjhani, Murad; Xu, Yan; Lu, Yanbin; Padmanabhan, Raghav; Trett, Kristen; Shain, William; Roysam, Badri

    2014-01-01

    In this article, we describe the use of Python for large-scale automated server-based bio-image analysis in FARSIGHT, a free and open-source toolkit of image analysis methods for quantitative studies of complex and dynamic tissue microenvironments imaged by modern optical microscopes, including confocal, multi-spectral, multi-photon, and time-lapse systems. The core FARSIGHT modules for image segmentation, feature extraction, tracking, and machine learning are written in C++, leveraging widely used libraries including ITK, VTK, Boost, and Qt. For solving complex image analysis tasks, these modules must be combined into scripts using Python. As a concrete example, we consider the problem of analyzing 3-D multi-spectral images of brain tissue surrounding implanted neuroprosthetic devices, acquired using high-throughput multi-spectral spinning disk step-and-repeat confocal microscopy. The resulting images typically contain 5 fluorescent channels. Each channel consists of 6000 × 10,000 × 500 voxels with 16 bits/voxel, implying image sizes exceeding 250 GB. These images must be mosaicked, pre-processed to overcome imaging artifacts, and segmented to enable cellular-scale feature extraction. The features are used to identify cell types, and perform large-scale analysis for identifying spatial distributions of specific cell types relative to the device. Python was used to build a server-based script (Dell 910 PowerEdge servers with 4 sockets/server with 10 cores each, 2 threads per core and 1TB of RAM running on Red Hat Enterprise Linux linked to a RAID 5 SAN) capable of routinely handling image datasets at this scale and performing all these processing steps in a collaborative multi-user multi-platform environment. Our Python script enables efficient data storage and movement between computers and storage servers, logs all the processing steps, and performs full multi-threaded execution of all codes, including open and closed-source third party libraries.

  4. Large-scale automated image analysis for computational profiling of brain tissue surrounding implanted neuroprosthetic devices using Python

    Directory of Open Access Journals (Sweden)

    Nicolas eRey-Villamizar

    2014-04-01

    Full Text Available In this article, we describe use of Python for large-scale automated server-based bio-image analysis in FARSIGHT, a free and open-source toolkit of image analysis methods for quantitative studies of complex and dynamic tissue microenvironments imaged by modern optical microscopes including confocal, multi-spectral, multi-photon, and time-lapse systems. The core FARSIGHT modules for image segmentation, feature extraction, tracking, and machine learning are written in C++, leveraging widely used libraries including ITK, VTK, Boost, and Qt. For solving complex image analysis task, these modules must be combined into scripts using Python. As a concrete example, we consider the problem of analyzing 3-D multi-spectral brain tissue images surrounding implanted neuroprosthetic devices, acquired using high-throughput multi-spectral spinning disk step-and-repeat confocal microscopy. The resulting images typically contain 5 fluorescent channels, 6,000$times$10,000$times$500 voxels with 16 bits/voxel, implying image sizes exceeding 250GB. These images must be mosaicked, pre-processed to overcome imaging artifacts, and segmented to enable cellular-scale feature extraction. The features are used to identify cell types, and perform large-scale analytics for identifying spatial distributions of specific cell types relative to the device. Python was used to build a server-based script (Dell 910 PowerEdge servers with 4 sockets/server with 10 cores each, 2 threads per core and 1TB of RAM running on Red Hat Enterprise Linux linked to a RAID 5 SAN capable of routinely handling image datasets at this scale and performing all these processing steps in a collaborative multi-user multi-platform environment consisting. Our Python script enables efficient data storage and movement between compute and storage servers, logging all processing steps, and performs full multi-threaded execution of all codes, including open and closed-source third party libraries.

  5. The Next Generation of Ground Operations Command and Control; Scripting in C no. and Visual Basic

    Science.gov (United States)

    Ritter, George; Pedoto, Ramon

    2010-01-01

    Scripting languages have become a common method for implementing command and control solutions in space ground operations. The Systems Test and Operations Language (STOL), the Huntsville Operations Support Center (HOSC) Scripting Language Processor (SLP), and the Spacecraft Control Language (SCL) offer script-commands that wrap tedious operations tasks into single calls. Since script-commands are interpreted, they also offer a certain amount of hands-on control that is highly valued in space ground operations. Although compiled programs seem to be unsuited for interactive user control and are more complex to develop, Marshall Space flight Center (MSFC) has developed a product called the Enhanced and Redesign Scripting (ERS) that makes use of the graphical and logical richness of a programming language while offering the hands-on and ease of control of a scripting language. ERS is currently used by the International Space Station (ISS) Payload Operations Integration Center (POIC) Cadre team members. ERS integrates spacecraft command mnemonics, telemetry measurements, and command and telemetry control procedures into a standard programming language, while making use of Microsoft's Visual Studio for developing Visual Basic (VB) or C# ground operations procedures. ERS also allows for script-style user control during procedure execution using a robust graphical user input and output feature. The availability of VB and C# programmers, and the richness of the languages and their development environment, has allowed ERS to lower our "script" development time and maintenance costs at the Marshall POIC.

  6. JavaScript & jQuery The Missing Manual

    CERN Document Server

    McFarland, David

    2011-01-01

    JavaScript lets you supercharge your HTML with animation, interactivity, and visual effects-but many web designers find the language hard to learn. This jargon-free guide covers JavaScript basics and shows you how to save time and effort with the jQuery library of prewritten JavaScript code. You'll soon be building web pages that feel and act like desktop programs, without having to do much programming. The important stuff you need to know: Make your pages interactive. Create JavaScript events that react to visitor actions.Use animations and effects. Build drop-down navigation menus, pop-ups

  7. Tool-supported Refactoring for JavaScript

    DEFF Research Database (Denmark)

    Feldthaus, Asger; Millstein, Todd; Møller, Anders

    2011-01-01

    Script because of its dynamic nature. We propose a framework for specifying and implementing JavaScript refactorings based on pointer analysis. We describe novel refactorings motivated by best practice recommendations for JavaScript programming, and demonstrate how they can be described concisely in terms...... of queries provided by our framework. Experiments performed with a prototype implementation on a suite of existing applications show that our approach is well-suited for developing practical refactoring tools for JavaScript.......Refactoring is a popular technique for improving the structure of existing programs while maintaining their behavior. For statically typed programming languages such as Java, a wide variety of refactorings have been described, and tool support for performing refactorings and ensuring...

  8. The Power of Scripting: DGS Meets Programming

    Directory of Open Access Journals (Sweden)

    Jürgen Richter-Gebert

    2010-06-01

    Full Text Available In this article we demonstrate how the combination of a system for dynamic geometry with a freely programmable scripting environment can be advantageously used in teaching and research. We explain the reasons behind various design decisions that were made by us when designing the language CindyScript and give examples that proof how they lead to easy and understandable code that can be used in education. We give several concrete application scenarios of the language that was developed by the authors and seamlessly interacts with the dynamic geometry system Cinderella.

  9. Emerge - A Python environment for the modeling of subsurface transfers

    Science.gov (United States)

    Lopez, S.; Smai, F.; Sochala, P.

    2014-12-01

    The simulation of subsurface mass and energy transfers often relies on specific codes that were mainly developed using compiled languages which usually ensure computational efficiency at the expense of relatively long development times and relatively rigid software. Even if a very detailed, possibly graphical, user-interface is developed the core numerical aspects are rarely accessible and the smallest modification will always need a compilation step. Thus, user-defined physical laws or alternative numerical schemes may be relatively difficult to use. Over the last decade, Python has emerged as a popular and widely used language in the scientific community. There already exist several libraries for the pre and post-treatment of input and output files for reservoir simulators (e.g. pytough). Development times in Python are considerably reduced compared to compiled languages, and programs can be easily interfaced with libraries written in compiled languages with several comprehensive numerical libraries that provide sequential and parallel solvers (e.g. PETSc, Trilinos…). The core objective of the Emerge project is to explore the possibility to develop a modeling environment in full Python. Consequently, we are developing an open python package with the classes/objects necessary to express, discretize and solve the physical problems encountered in the modeling of subsurface transfers. We heavily relied on Python to have a convenient and concise way of manipulating potentially complex concepts with a few lines of code and a high level of abstraction. Our result aims to be a friendly numerical environment targeting both numerical engineers and physicist or geoscientists with the possibility to quickly specify and handle geometries, arbitrary meshes, spatially or temporally varying properties, PDE formulations, boundary conditions…

  10. Learning scientific programming with Python

    CERN Document Server

    Hill, Christian

    2015-01-01

    Learn to master basic programming tasks from scratch with real-life scientifically relevant examples and solutions drawn from both science and engineering. Students and researchers at all levels are increasingly turning to the powerful Python programming language as an alternative to commercial packages and this fast-paced introduction moves from the basics to advanced concepts in one complete volume, enabling readers to quickly gain proficiency. Beginning with general programming concepts such as loops and functions within the core Python 3 language, and moving onto the NumPy, SciPy and Matplotlib libraries for numerical programming and data visualisation, this textbook also discusses the use of IPython notebooks to build rich-media, shareable documents for scientific analysis. Including a final chapter introducing challenging topics such as floating-point precision and algorithm stability, and with extensive online resources to support advanced study, this textbook represents a targeted package for students...

  11. Efficient Approximate JavaScript Call Graph Construction

    NARCIS (Netherlands)

    S. Benschop

    2014-01-01

    htmlabstractJavaScript has seen an increase in popularity in the last few years, both in the browser as well as on other platforms such as Node.js. However, the tools to help developers reason about JavaScript code remain fairly barebone in comparison with tooling for static languages such as Java.

  12. Sparks Will Fly: engineering creative script conflicts

    Science.gov (United States)

    Veale, Tony; Valitutti, Alessandro

    2017-10-01

    Scripts are often dismissed as the stuff of good movies and bad politics. They codify cultural experience so rigidly that they remove our freedom of choice and become the very antithesis of creativity. Yet, mental scripts have an important role to play in our understanding of creative behaviour, since a deliberate departure from an established script can produce results that are simultaneously novel and familiar, especially when others stick to the conventional script. Indeed, creative opportunities often arise at the overlapping boundaries of two scripts that antagonistically compete to mentally organise the same situation. This work explores the computational integration of competing scripts to generate creative friction in short texts that are surprising but meaningful. Our exploration considers conventional macro-scripts - ordered sequences of actions - and the less obvious micro-scripts that operate at even the lowest levels of language. For the former, we generate plots that squeeze two scripts into a single mini-narrative; for the latter, we generate ironic descriptions that use conflicting scripts to highlight the speaker's pragmatic insincerity. We show experimentally that verbal irony requires both kinds of scripts - macro and micro - to work together to reliably generate creative sparks from a speaker's subversive intent.

  13. The use of the Arabic script in northern Mozambique | Bonate ...

    African Journals Online (AJOL)

    Northern Mozambican Muslim population has been using the Arabic script for writing in KiSwahili and local African languages for centuries. Even today, many people continue using this script in private correspondence. Despite the abundance of the documents in this script that are housed at the Mozambique Historical ...

  14. Introduction into bi-partite networks in python

    OpenAIRE

    Kasberger, Stefan

    2016-01-01

    This essay and the related computation delivers a comprehensive introduction into the concept of bipartite networks, a class of networks whose nodes are divided into two sets and only the connection between two nodes in different sets is allowed (Easley and Kleinberg, 2010). The analysis and visualization is done in the programming language Python and offers easy to understand first steps in both fields, network analyses and python programming. As data a collaboration network of github users ...

  15. Visualization of the CMS python configuration system

    International Nuclear Information System (INIS)

    Erdmann, M; Fischer, R; Klimkovich, T; Mueller, G; Steggemann, J; Hegner, B; Hinzmann, A

    2010-01-01

    The job configuration system of the CMS experiment is based on the Python programming language. Software modules and their order of execution are both represented by Python objects. In order to investigate and verify configuration parameters and dependencies naturally appearing in modular software, CMS employs a graphical tool. This tool visualizes the configuration objects, their dependencies, and the information flow. Furthermore it can be used for documentation purposes. The underlying software concepts as well as the visualization are presented.

  16. Visualization of the CMS python configuration system

    Energy Technology Data Exchange (ETDEWEB)

    Erdmann, M; Fischer, R; Klimkovich, T; Mueller, G; Steggemann, J [RWTH Aachen University, Physikalisches Institut 3A, 52062 Aachen (Germany); Hegner, B [CERN, CH-1211 Geneva 23 (Switzerland); Hinzmann, A, E-mail: andreas.hinzmann@cern.c

    2010-04-01

    The job configuration system of the CMS experiment is based on the Python programming language. Software modules and their order of execution are both represented by Python objects. In order to investigate and verify configuration parameters and dependencies naturally appearing in modular software, CMS employs a graphical tool. This tool visualizes the configuration objects, their dependencies, and the information flow. Furthermore it can be used for documentation purposes. The underlying software concepts as well as the visualization are presented.

  17. MatLab Script and Functional Programming

    Science.gov (United States)

    Shaykhian, Gholam Ali

    2007-01-01

    MatLab Script and Functional Programming: MatLab is one of the most widely used very high level programming languages for scientific and engineering computations. It is very user-friendly and needs practically no formal programming knowledge. Presented here are MatLab programming aspects and not just the MatLab commands for scientists and engineers who do not have formal programming training and also have no significant time to spare for learning programming to solve their real world problems. Specifically provided are programs for visualization. The MatLab seminar covers the functional and script programming aspect of MatLab language. Specific expectations are: a) Recognize MatLab commands, script and function. b) Create, and run a MatLab function. c) Read, recognize, and describe MatLab syntax. d) Recognize decisions, loops and matrix operators. e) Evaluate scope among multiple files, and multiple functions within a file. f) Declare, define and use scalar variables, vectors and matrices.

  18. PyGaze: an open-source, cross-platform toolbox for minimal-effort programming of eye-tracking experiments

    NARCIS (Netherlands)

    Dalmaijer, E.S.; Mathôt, S.; van der Stigchel, S.

    2014-01-01

    he PyGaze toolbox is an open-source software package for Python, a high-level programming language. It is designed for creating eyetracking experiments in Python syntax with the least possible effort, and it offers programming ease and script readability without constraining functionality and

  19. Evaluation of Static JavaScript Call Graph Algorithms

    NARCIS (Netherlands)

    J.-J. Dijkstra (Jorryt-Jan)

    2014-01-01

    htmlabstractThis thesis consists of a replication study in which two algorithms to compute JavaScript call graphs have been implemented and evaluated. Existing IDE support for JavaScript is hampered due to the dynamic nature of the language. Previous studies partially solve call graph computation

  20. A modern Python interface for the Generic Mapping Tools

    Science.gov (United States)

    Uieda, L.; Wessel, P.

    2017-12-01

    Figures generated by The Generic Mapping Tools (GMT) are present in countless publications across the Earth sciences. The command-line interface of GMT lends the tool its flexibility but also creates a barrier to entry for begginers. Meanwhile, adoption of the Python programming language has grown across the scientific community. This growth is largely due to the simplicity and low barrier to entry of the language and its ecosystem of tools. Thus, it is not surprising that there have been at least three attempts to create Python interfaces for GMT: gmtpy (github.com/emolch/gmtpy), pygmt (github.com/ian-r-rose/pygmt), and PyGMT (github.com/glimmer-cism/PyGMT). None of these projects are currently active and, with the exception of pygmt, they do not use the GMT Application Programming Interface (API) introduced in GMT 5. The two main Python libraries for plotting data on maps are the matplotlib Basemap toolkit (matplotlib.org/basemap) and Cartopy (scitools.org.uk/cartopy), both of which rely on matplotlib (matplotlib.org) as the backend for generating the figures. Basemap is known to have limitations and is being discontinued. Cartopy is an improvement over Basemap but is still bound by the speed and memory constraints of matplotlib. We present a new Python interface for GMT (GMT/Python) that makes use of the GMT API and of new features being developed for the upcoming GMT 6 release. The GMT/Python library is designed according to the norms and styles of the Python community. The library integrates with the scientific Python ecosystem by using the "virtual files" from the GMT API to implement input and output of Python data types (numpy "ndarray" for tabular data and xarray "Dataset" for grids). Other features include an object-oriented interface for creating figures, the ability to display figures in the Jupyter notebook, and descriptive aliases for GMT arguments (e.g., "region" instead of "R" and "projection" instead of "J"). GMT/Python can also serve as a backend

  1. Algorithmic synthesis using Python compiler

    Science.gov (United States)

    Cieszewski, Radoslaw; Romaniuk, Ryszard; Pozniak, Krzysztof; Linczuk, Maciej

    2015-09-01

    This paper presents a python to VHDL compiler. The compiler interprets an algorithmic description of a desired behavior written in Python and translate it to VHDL. FPGA combines many benefits of both software and ASIC implementations. Like software, the programmed circuit is flexible, and can be reconfigured over the lifetime of the system. FPGAs have the potential to achieve far greater performance than software as a result of bypassing the fetch-decode-execute operations of traditional processors, and possibly exploiting a greater level of parallelism. This can be achieved by using many computational resources at the same time. Creating parallel programs implemented in FPGAs in pure HDL is difficult and time consuming. Using higher level of abstraction and High-Level Synthesis compiler implementation time can be reduced. The compiler has been implemented using the Python language. This article describes design, implementation and results of created tools.

  2. Pyvolve: A Flexible Python Module for Simulating Sequences along Phylogenies.

    Directory of Open Access Journals (Sweden)

    Stephanie J Spielman

    Full Text Available We introduce Pyvolve, a flexible Python module for simulating genetic data along a phylogeny using continuous-time Markov models of sequence evolution. Easily incorporated into Python bioinformatics pipelines, Pyvolve can simulate sequences according to most standard models of nucleotide, amino-acid, and codon sequence evolution. All model parameters are fully customizable. Users can additionally specify custom evolutionary models, with custom rate matrices and/or states to evolve. This flexibility makes Pyvolve a convenient framework not only for simulating sequences under a wide variety of conditions, but also for developing and testing new evolutionary models. Pyvolve is an open-source project under a FreeBSD license, and it is available for download, along with a detailed user-manual and example scripts, from http://github.com/sjspielman/pyvolve.

  3. A facility for creating Python extensions in C++

    International Nuclear Information System (INIS)

    Dubois, P F

    1998-01-01

    Python extensions are usually created by writing the glue that connects Python to the desired new functionality in the C language. While simple extensions do not require much effort, to do the job correctly with full error checking is tedious and prone to errors in reference counting and to memory leaks, especially when errors occur. The resulting program is difficult to read and maintain. By designing suitable C++ classes to wrap the Python C API, we are able to produce extensions that are correct and which clean up after themselves correctly when errors occur. This facility also integrates the C++ and Python exception facilities. This paper briefly describes our package for this purpose, named CXX. The emphasis is on our design choices and the way these contribute to the construction of accurate Python extensions. We also briefly relate the way CXX's facilities for sequence classes allow use of C++'s Standard Template Library (STL) algorithms on C++ sequences

  4. Exploiting Structure and Conventions of Movie Scripts for Information Retrieval and Text Mining

    DEFF Research Database (Denmark)

    Jhala, Arnav

    2008-01-01

    Movie scripts are documents that describe the story, stage direction for actors and camera, and dialogue. Script writers, directors, and cinematographers have standardized the format and language that is used in script writing. Scripts contain a wealth of information about narrative patterns, cha...

  5. Implementation of quantum game theory simulations using Python

    Science.gov (United States)

    Madrid S., A.

    2013-05-01

    This paper provides some examples about quantum games simulated in Python's programming language. The quantum games have been developed with the Sympy Python library, which permits solving quantum problems in a symbolic form. The application of these methods of quantum mechanics to game theory gives us more possibility to achieve results not possible before. To illustrate the results of these methods, in particular, there have been simulated the quantum battle of the sexes, the prisoner's dilemma and card games. These solutions are able to exceed the classic bottle neck and obtain optimal quantum strategies. In this form, python demonstrated that is possible to do more advanced and complicated quantum games algorithms.

  6. Lua(Jit) for computing accelerator beam physics

    CERN Multimedia

    CERN. Geneva

    2016-01-01

    As mentioned in the 2nd developers meeting, I would like to open the debate with a special presentation on another language - Lua, and a tremendous technology - LuaJit. Lua is much less known at CERN, but it is very simple, much smaller than Python and its JIT is extremely performant. The language is a dynamic scripting language easy to learn and easy to embedded in applications. I will show how we use it in HPC for accelerator beam physics as a replacement for C, C++, Fortran and Python, with some benchmarks versus Python, PyPy4 and C/C++.

  7. Interactive Model-Centric Systems Engineering (IMCSE) Phase 1

    Science.gov (United States)

    2014-09-30

    and (2) a properly structured MySQL database populated by the input/output data of that model. The IVTea database structure has only seven...programming interface (API) for JavaScript-based simulation models. Unlike other programming languages such as Java , Python, and MATLAB, JavaScript

  8. A Python Script for Aligning the STIS Echelle Blaze Function

    Science.gov (United States)

    Baer, Malinda; Proffitt, Charles R.; Lockwood, Sean A.

    2018-01-01

    Accurate flux calibration for the STIS echelle modes is heavily dependent on the proper alignment of the blaze function for each spectral order. However, due to changes in the instrument alignment over time and between exposures, the blaze function can shift in wavelength. This may result in flux calibration inconsistencies of up to 10%. We present the stisblazefix Python module as a tool for STIS users to correct their echelle spectra. The stisblazefix module assumes that the error in the blaze alignment is a linear function of spectral order, and finds the set of shifts that minimizes the flux inconsistencies in the overlap between spectral orders. We discuss the uses and limitations of this tool, and show that its use can provide significant improvements to the default pipeline flux calibration for many observations.

  9. A JavaScript API for the Ice Sheet System Model (ISSM) 4.11: towards an online interactive model for the cryosphere community

    Science.gov (United States)

    Larour, Eric; Cheng, Daniel; Perez, Gilberto; Quinn, Justin; Morlighem, Mathieu; Duong, Bao; Nguyen, Lan; Petrie, Kit; Harounian, Silva; Halkides, Daria; Hayes, Wayne

    2017-12-01

    Earth system models (ESMs) are becoming increasingly complex, requiring extensive knowledge and experience to deploy and use in an efficient manner. They run on high-performance architectures that are significantly different from the everyday environments that scientists use to pre- and post-process results (i.e., MATLAB, Python). This results in models that are hard to use for non-specialists and are increasingly specific in their application. It also makes them relatively inaccessible to the wider science community, not to mention to the general public. Here, we present a new software/model paradigm that attempts to bridge the gap between the science community and the complexity of ESMs by developing a new JavaScript application program interface (API) for the Ice Sheet System Model (ISSM). The aforementioned API allows cryosphere scientists to run ISSM on the client side of a web page within the JavaScript environment. When combined with a web server running ISSM (using a Python API), it enables the serving of ISSM computations in an easy and straightforward way. The deep integration and similarities between all the APIs in ISSM (MATLAB, Python, and now JavaScript) significantly shortens and simplifies the turnaround of state-of-the-art science runs and their use by the larger community. We demonstrate our approach via a new Virtual Earth System Laboratory (VESL) website (http://vesl.jpl.nasa.gov, VESL(2017)).

  10. PyBus -- A Python Software Bus

    OpenAIRE

    Lavrijsen, W

    2005-01-01

    A software bus, just like its hardware equivalent, allows for the discovery, installation, configuration, loading, unloading, and run-time replacement of software components, as well as channeling of inter-component communication. Python, a popular open-source programming language, encourages a modular design on software written in it, but it offers little or no component functionality. However, the language and its interpreter provide sufficient hooks to implement a thin, integral layer...

  11. Programming Language Pragmatics

    CERN Document Server

    Scott, Michael L

    2005-01-01

    Thoroughly updated to reflect the most current developments in language design and implementation, the second edition*Addresses key developments in programming language design:+ Finalized C99 standard+ Java 5+ C# 2.0+ Java concurrency package (JSR 166) and comparable mechanisms in C#+ Java and C# generics*Introduces and discusses scripting languages throughout the book and in an entire new chapter that covers:+ Application domains: shell languages, text processing and report generation, mathematics and statistics, "glue" languages and general purpose scripting, extension languages, scripting t

  12. π Scope: python based scientific workbench with visualization tool for MDSplus data

    Science.gov (United States)

    Shiraiwa, S.

    2014-10-01

    π Scope is a python based scientific data analysis and visualization tool constructed on wxPython and Matplotlib. Although it is designed to be a generic tool, the primary motivation for developing the new software is 1) to provide an updated tool to browse MDSplus data, with functionalities beyond dwscope and jScope, and 2) to provide a universal foundation to construct interface tools to perform computer simulation and modeling for Alcator C-Mod. It provides many features to visualize MDSplus data during tokamak experiments including overplotting different signals and discharges, various plot types (line, contour, image, etc.), in-panel data analysis using python scripts, and publication quality graphics generation. Additionally, the logic to produce multi-panel plots is designed to be backward compatible with dwscope, enabling smooth migration for dwscope users. πScope uses multi-threading to reduce data transfer latency, and its object-oriented design makes it easy to modify and expand while the open source nature allows portability. A built-in tree data browser allows a user to approach the data structure both from a GUI and a script, enabling relatively complex data analysis workflow to be built quickly. As an example, an IDL-based interface to perform GENRAY/CQL3D simulations was ported on πScope, thus allowing LHCD simulation to be run between-shot using C-Mod experimental profiles. This workflow is being used to generate a large database to develop a LHCD actuator model for the plasma control system. Supported by USDoE Award DE-FC02-99ER54512.

  13. Stata Hybrids: Updates and Ideas

    Science.gov (United States)

    Fieldler, James

    2014-01-01

    At last year's Stata conference I presented two projects for using Python with Stata: a plugin that embeds the Python programming language within Stata and code for using Stata data sets in Python. In this talk I will describe some small improvements being made to these projects, and I will present other ideas for combining tools with Stata. Some of these ideas use Python, some use JavaScript and a web browser.

  14. Practical Analysis of the Dynamic Characteristics of JavaScript

    OpenAIRE

    Wei, Shiyi

    2015-01-01

    JavaScript is a dynamic object-oriented programming language, which is designed with flexible programming mechanisms. JavaScript is widely used in developing sophisticated software systems, especially web applications. Despite of its popularity, there is a lack of software tools that support JavaScript for software engineering clients. Dataflow analysis approximates software behavior by analyzing the program code; it is the foundation for many software tools. However, several unique features...

  15. JavaScript and interactive web pages in radiology.

    Science.gov (United States)

    Gurney, J W

    2001-10-01

    Web publishing is becoming a more common method of disseminating information. JavaScript is an object-orientated language embedded into modern browsers and has a wide variety of uses. The use of JavaScript in radiology is illustrated by calculating the indices of sensitivity, specificity, and predictive values from a table of true positives, true negatives, false positives, and false negatives. In addition, a single line of JavaScript code can be used to annotate images, which has a wide variety of uses.

  16. On the tradeoffs of programming language choice for numerical modelling in geoscience. A case study comparing modern Fortran, C++/Blitz++ and Python/NumPy.

    Science.gov (United States)

    Jarecka, D.; Arabas, S.; Fijalkowski, M.; Gaynor, A.

    2012-04-01

    The language of choice for numerical modelling in geoscience has long been Fortran. A choice of a particular language and coding paradigm comes with different set of tradeoffs such as that between performance, ease of use (and ease of abuse), code clarity, maintainability and reusability, availability of open source compilers, debugging tools, adequate external libraries and parallelisation mechanisms. The availability of trained personnel and the scale and activeness of the developer community is of importance as well. We present a short comparison study aimed at identification and quantification of these tradeoffs for a particular example of an object oriented implementation of a parallel 2D-advection-equation solver in Python/NumPy, C++/Blitz++ and modern Fortran. The main angles of comparison will be complexity of implementation, performance of various compilers or interpreters and characterisation of the "added value" gained by a particular choice of the language. The choice of the numerical problem is dictated by the aim to make the comparison useful and meaningful to geoscientists. Python is chosen as a language that traditionally is associated with ease of use, elegant syntax but limited performance. C++ is chosen for its traditional association with high performance but even higher complexity and syntax obscurity. Fortran is included in the comparison for its widespread use in geoscience often attributed to its performance. We confront the validity of these traditional views. We point out how the usability of a particular language in geoscience depends on the characteristics of the language itself and the availability of pre-existing software libraries (e.g. NumPy, SciPy, PyNGL, PyNIO, MPI4Py for Python and Blitz++, Boost.Units, Boost.MPI for C++). Having in mind the limited complexity of the considered numerical problem, we present a tentative comparison of performance of the three implementations with different open source compilers including CPython and

  17. Object oriented JavaScript

    CERN Document Server

    Stefanov, Stoyan

    2013-01-01

    You will first be introduced to object-oriented programming, then to the basics of objects in JavaScript. This book takes a do-it-yourself approach when it comes to writing code, because the best way to really learn a programming language is by writing code. You are encouraged to type code into Firebug's console, see how it works and then tweak it and play around with it. There are practice questions at the end of each chapter to help you review what you have learned.For new to intermediate JavaScript developer who wants to prepare themselves for web development problems solved by smart JavaSc

  18. An Interactive and Comprehensive Working Environment for High-Energy Physics Software with Python and Jupyter Notebooks

    Science.gov (United States)

    Braun, N.; Hauth, T.; Pulvermacher, C.; Ritter, M.

    2017-10-01

    Today’s analyses for high-energy physics (HEP) experiments involve processing a large amount of data with highly specialized algorithms. The contemporary workflow from recorded data to final results is based on the execution of small scripts - often written in Python or ROOT macros which call complex compiled algorithms in the background - to perform fitting procedures and generate plots. During recent years interactive programming environments, such as Jupyter, became popular. Jupyter allows to develop Python-based applications, so-called notebooks, which bundle code, documentation and results, e.g. plots. Advantages over classical script-based approaches is the feature to recompute only parts of the analysis code, which allows for fast and iterative development, and a web-based user frontend, which can be hosted centrally and only requires a browser on the user side. In our novel approach, Python and Jupyter are tightly integrated into the Belle II Analysis Software Framework (basf2), currently being developed for the Belle II experiment in Japan. This allows to develop code in Jupyter notebooks for every aspect of the event simulation, reconstruction and analysis chain. These interactive notebooks can be hosted as a centralized web service via jupyterhub with docker and used by all scientists of the Belle II Collaboration. Because of its generality and encapsulation, the setup can easily be scaled to large installations.

  19. A pythonic integrated solution for virtual prototyping of cyclotrons

    International Nuclear Information System (INIS)

    Qin Bin; Yang Jun; Xiong Yongqian; Chen Dezhi; Yu Tiaoqin; Dong Tianlin; Zhang Tianjue; Fan Mingwu

    2007-01-01

    Virtual prototyping (VP) is a novel technique in engineering, which is desired to be applied to cyclotron design and development. Some sub-prototyping components, including beam dynamics, magnet, RF system and control system of cyclotrons, have been developed separately, but an integrated platform which encapsulates these different components is required for global system optimization. Considering that the VP integrated platform is a large-scale software and has numerous loose-coupled components, this paper describes the pythonic approach to implement this platform. By mixing the high-level interpreted Python language and the compiled languages like Fortran/C/C++ in an effective method, this approach can achieve a combination of code efficiency, flexibility and compactness

  20. Writing analytic element programs in Python.

    Science.gov (United States)

    Bakker, Mark; Kelson, Victor A

    2009-01-01

    The analytic element method is a mesh-free approach for modeling ground water flow at both the local and the regional scale. With the advent of the Python object-oriented programming language, it has become relatively easy to write analytic element programs. In this article, an introduction is given of the basic principles of the analytic element method and of the Python programming language. A simple, yet flexible, object-oriented design is presented for analytic element codes using multiple inheritance. New types of analytic elements may be added without the need for any changes in the existing part of the code. The presented code may be used to model flow to wells (with either a specified discharge or drawdown) and streams (with a specified head). The code may be extended by any hydrogeologist with a healthy appetite for writing computer code to solve more complicated ground water flow problems. Copyright © 2009 The Author(s). Journal Compilation © 2009 National Ground Water Association.

  1. SunPy—Python for solar physics

    International Nuclear Information System (INIS)

    Community, The SunPy; Mumford, Stuart J; Freij, Nabil; Bennett, Samuel M; Christe, Steven; Ireland, Jack; Shih, Albert Y; Inglis, Andrew R; Pérez-Suárez, David; Liedtke, Simon; Hewett, Russell J; Mayer, Florian; Hughitt, Keith; Meszaros, Tomas; Malocha, Michael; Evans, John; Agrawal, Ankit; Leonard, Andrew J; Robitaille, Thomas P; Mampaey, Benjamin

    2015-01-01

    This paper presents SunPy (version 0.5), a community-developed Python package for solar physics. Python, a free, cross-platform, general-purpose, high-level programming language, has seen widespread adoption among the scientific community, resulting in the availability of a large number of software packages, from numerical computation (NumPy, SciPy) and machine learning (scikit-learn) to visualization and plotting (matplotlib). SunPy is a data-analysis environment specializing in providing the software necessary to analyse solar and heliospheric data in Python. SunPy is open-source software (BSD licence) and has an open and transparent development workflow that anyone can contribute to. SunPy provides access to solar data through integration with the Virtual Solar Observatory (VSO), the Heliophysics Event Knowledgebase (HEK), and the HELiophysics Integrated Observatory (HELIO) webservices. It currently supports image data from major solar missions (e.g., SDO, SOHO, STEREO, and IRIS), time-series data from missions such as GOES, SDO/EVE, and PROBA2/LYRA, and radio spectra from e-Callisto and STEREO/SWAVES. We describe SunPy's functionality, provide examples of solar data analysis in SunPy, and show how Python-based solar data-analysis can leverage the many existing tools already available in Python. We discuss the future goals of the project and encourage interested users to become involved in the planning and development of SunPy. (paper)

  2. Mastering Julia

    CERN Document Server

    Sherrington, Malcolm

    2015-01-01

    This hands-on guide is aimed at practitioners of data science. The book assumes some previous skills with Julia and skills in coding in a scripting language such as Python or R, or a compiled language such as C or Java.

  3. My Journey from Python to R

    OpenAIRE

    Lorgat, Mohamed Wasim

    2018-01-01

    A lightning talk of my personal experiences in programming, from childhood with languages including Game Maker and DarkBASIC, to now with Python and R. I highlight the underlying principle which, I argue, separates the R community from others.See the reference for further reading material along this line.

  4. A JavaScript API for the Ice Sheet System Model (ISSM 4.11: towards an online interactive model for the cryosphere community

    Directory of Open Access Journals (Sweden)

    E. Larour

    2017-12-01

    Full Text Available Earth system models (ESMs are becoming increasingly complex, requiring extensive knowledge and experience to deploy and use in an efficient manner. They run on high-performance architectures that are significantly different from the everyday environments that scientists use to pre- and post-process results (i.e., MATLAB, Python. This results in models that are hard to use for non-specialists and are increasingly specific in their application. It also makes them relatively inaccessible to the wider science community, not to mention to the general public. Here, we present a new software/model paradigm that attempts to bridge the gap between the science community and the complexity of ESMs by developing a new JavaScript application program interface (API for the Ice Sheet System Model (ISSM. The aforementioned API allows cryosphere scientists to run ISSM on the client side of a web page within the JavaScript environment. When combined with a web server running ISSM (using a Python API, it enables the serving of ISSM computations in an easy and straightforward way. The deep integration and similarities between all the APIs in ISSM (MATLAB, Python, and now JavaScript significantly shortens and simplifies the turnaround of state-of-the-art science runs and their use by the larger community. We demonstrate our approach via a new Virtual Earth System Laboratory (VESL website (http://vesl.jpl.nasa.gov, VESL(2017.

  5. Python 3 for Absolute Beginners

    CERN Document Server

    Hall, Tim

    2009-01-01

    There are many more people who want to study programming other than aspiring computer scientists with a passing grade in advanced calculus. This guide appeals to your intelligence and ability to solve practical problems, while gently teaching the most recent revision of the programming language Python. You can learn solid software design skills and accomplish practical programming tasks, like extending applications and automating everyday processes, even if you have no programming experience at all. Authors Tim Hall and J-P Stacey use everyday language to decode programming jargon and teach Py

  6. SBMLmod: a Python-based web application and web service for efficient data integration and model simulation.

    Science.gov (United States)

    Schäuble, Sascha; Stavrum, Anne-Kristin; Bockwoldt, Mathias; Puntervoll, Pål; Heiland, Ines

    2017-06-24

    Systems Biology Markup Language (SBML) is the standard model representation and description language in systems biology. Enriching and analysing systems biology models by integrating the multitude of available data, increases the predictive power of these models. This may be a daunting task, which commonly requires bioinformatic competence and scripting. We present SBMLmod, a Python-based web application and service, that automates integration of high throughput data into SBML models. Subsequent steady state analysis is readily accessible via the web service COPASIWS. We illustrate the utility of SBMLmod by integrating gene expression data from different healthy tissues as well as from a cancer dataset into a previously published model of mammalian tryptophan metabolism. SBMLmod is a user-friendly platform for model modification and simulation. The web application is available at http://sbmlmod.uit.no , whereas the WSDL definition file for the web service is accessible via http://sbmlmod.uit.no/SBMLmod.wsdl . Furthermore, the entire package can be downloaded from https://github.com/MolecularBioinformatics/sbml-mod-ws . We envision that SBMLmod will make automated model modification and simulation available to a broader research community.

  7. Probabilistic programming in Python using PyMC3

    Directory of Open Access Journals (Sweden)

    John Salvatier

    2016-04-01

    Full Text Available Probabilistic programming allows for automatic Bayesian inference on user-defined probabilistic models. Recent advances in Markov chain Monte Carlo (MCMC sampling allow inference on increasingly complex models. This class of MCMC, known as Hamiltonian Monte Carlo, requires gradient information which is often not readily available. PyMC3 is a new open source probabilistic programming framework written in Python that uses Theano to compute gradients via automatic differentiation as well as compile probabilistic programs on-the-fly to C for increased speed. Contrary to other probabilistic programming languages, PyMC3 allows model specification directly in Python code. The lack of a domain specific language allows for great flexibility and direct interaction with the model. This paper is a tutorial-style introduction to this software package.

  8. PyEEG: An Open Source Python Module for EEG/MEG Feature Extraction

    OpenAIRE

    Bao, Forrest Sheng; Liu, Xin; Zhang, Christina

    2011-01-01

    Computer-aided diagnosis of neural diseases from EEG signals (or other physiological signals that can be treated as time series, e.g., MEG) is an emerging field that has gained much attention in past years. Extracting features is a key component in the analysis of EEG signals. In our previous works, we have implemented many EEG feature extraction functions in the Python programming language. As Python is gaining more ground in scientific computing, an open source Python module for extracting ...

  9. PyCSP - Communicating Sequential Processes for Python

    DEFF Research Database (Denmark)

    Vinter, Brian; Bjørndalen, John Markus; Anshus, Otto Johan

    CSP presently supports the core CSP abstractions. We introduce the PyCSP library, its implementation, a few performance benchmarks, and show example code using PyCSP. An early prototype of PyCSP has been used in this year's Extreme Multiprogramming Class at the CS department, university of Copenhagen......The Python programming language is effective for rapidly specifying programs and experimenting with them. It is increasingly being used in computational sciences, and in teaching computer science. CSP is effective for describing concurrency. It has become especially relevant with the emergence...... of commodity multi-core architectures. We are interested in exploring how a combination of Python and CSP can benefit both the computational sciences and the hands-on teaching of distributed and parallel computing in computer science. To make this possible, we have developed PyCSP, a CSP library for Python. Py...

  10. PyEEG: an open source Python module for EEG/MEG feature extraction.

    Science.gov (United States)

    Bao, Forrest Sheng; Liu, Xin; Zhang, Christina

    2011-01-01

    Computer-aided diagnosis of neural diseases from EEG signals (or other physiological signals that can be treated as time series, e.g., MEG) is an emerging field that has gained much attention in past years. Extracting features is a key component in the analysis of EEG signals. In our previous works, we have implemented many EEG feature extraction functions in the Python programming language. As Python is gaining more ground in scientific computing, an open source Python module for extracting EEG features has the potential to save much time for computational neuroscientists. In this paper, we introduce PyEEG, an open source Python module for EEG feature extraction.

  11. Constructing Workflows from Script Applications

    Directory of Open Access Journals (Sweden)

    Mikołaj Baranowski

    2012-01-01

    Full Text Available For programming and executing complex applications on grid infrastructures, scientific workflows have been proposed as convenient high-level alternative to solutions based on general-purpose programming languages, APIs and scripts. GridSpace is a collaborative programming and execution environment, which is based on a scripting approach and it extends Ruby language with a high-level API for invoking operations on remote resources. In this paper we describe a tool which enables to convert the GridSpace application source code into a workflow representation which, in turn, may be used for scheduling, provenance, or visualization. We describe how we addressed the issues of analyzing Ruby source code, resolving variable and method dependencies, as well as building workflow representation. The solutions to these problems have been developed and they were evaluated by testing them on complex grid application workflows such as CyberShake, Epigenomics and Montage. Evaluation is enriched by representing typical workflow control flow patterns.

  12. HyDe: a Python Package for Genome-Scale Hybridization Detection.

    Science.gov (United States)

    Blischak, Paul D; Chifman, Julia; Wolfe, Andrea D; Kubatko, Laura S

    2018-03-19

    The analysis of hybridization and gene flow among closely related taxa is a common goal for researchers studying speciation and phylogeography. Many methods for hybridization detection use simple site pattern frequencies from observed genomic data and compare them to null models that predict an absence of gene flow. The theory underlying the detection of hybridization using these site pattern probabilities exploits the relationship between the coalescent process for gene trees within population trees and the process of mutation along the branches of the gene trees. For certain models, site patterns are predicted to occur in equal frequency (i.e., their difference is 0), producing a set of functions called phylogenetic invariants. In this paper we introduce HyDe, a software package for detecting hybridization using phylogenetic invariants arising under the coalescent model with hybridization. HyDe is written in Python, and can be used interactively or through the command line using pre-packaged scripts. We demonstrate the use of HyDe on simulated data, as well as on two empirical data sets from the literature. We focus in particular on identifying individual hybrids within population samples and on distinguishing between hybrid speciation and gene flow. HyDe is freely available as an open source Python package under the GNU GPL v3 on both GitHub (https://github.com/pblischak/HyDe) and the Python Package Index (PyPI: https://pypi.python.org/pypi/phyde).

  13. Respiratory disease in ball pythons (Python regius) experimentally infected with ball python nidovirus.

    Science.gov (United States)

    Hoon-Hanks, Laura L; Layton, Marylee L; Ossiboff, Robert J; Parker, John S L; Dubovi, Edward J; Stenglein, Mark D

    2018-04-01

    Circumstantial evidence has linked a new group of nidoviruses with respiratory disease in pythons, lizards, and cattle. We conducted experimental infections in ball pythons (Python regius) to test the hypothesis that ball python nidovirus (BPNV) infection results in respiratory disease. Three ball pythons were inoculated orally and intratracheally with cell culture isolated BPNV and two were sham inoculated. Antemortem choanal, oroesophageal, and cloacal swabs and postmortem tissues of infected snakes were positive for viral RNA, protein, and infectious virus by qRT-PCR, immunohistochemistry, western blot and virus isolation. Clinical signs included oral mucosal reddening, abundant mucus secretions, open-mouthed breathing, and anorexia. Histologic lesions included chronic-active mucinous rhinitis, stomatitis, tracheitis, esophagitis and proliferative interstitial pneumonia. Control snakes remained negative and free of clinical signs throughout the experiment. Our findings establish a causal relationship between nidovirus infection and respiratory disease in ball pythons and shed light on disease progression and transmission. Copyright © 2017 The Authors. Published by Elsevier Inc. All rights reserved.

  14. Google Script Adding Functionality to Your Google Apps

    CERN Document Server

    Ferreira, James

    2012-01-01

    How can you extend Google Apps to fit your organization's needs? This concise guide shows you how to use Google Scripts, the JavaScript-based language that provides a complete web-based development platform-with no downloads, configuration, or compiling required. You'll learn how to add functionality to Gmail, spreadsheets, and other Google services, or build data-driven apps that run from a spreadsheet, in a browser window, or within a Google Site. If you have some Java experience, getting started with Google Scripts is easy. Through code examples and step-by-step instructions, you'll learn

  15. Image processing using pulse-coupled neural networks applications in Python

    CERN Document Server

    Lindblad, Thomas

    2013-01-01

    Image processing algorithms based on the mammalian visual cortex are powerful tools for extraction information and manipulating images. This book reviews the neural theory and translates them into digital models. Applications are given in areas of image recognition, foveation, image fusion and information extraction. The third edition reflects renewed international interest in pulse image processing with updated sections presenting several newly developed applications. This edition also introduces a suite of Python scripts that assist readers in replicating results presented in the text and to further develop their own applications.

  16. The Effect of Script Similarity on Executive Control in Bilinguals

    Directory of Open Access Journals (Sweden)

    Emily L Coderre

    2014-09-01

    Full Text Available The need for executive control (EC during bilingual language processing is thought to enhance these abilities, conferring a ‘bilingual advantage’ on EC tasks. Recently, the reliability and robustness of the bilingual advantage has been questioned, with many variables reportedly affecting the size and presence of the bilingual advantage. This study investigates one further variable that may affect bilingual EC abilities: the similarity of a bilingual’s two languages. We hypothesize that bilinguals whose two languages have a larger degree of orthographic overlap will require greater EC to manage their languages compared to bilinguals who use two languages with less overlap. We tested three groups of bilinguals with language pairs ranging from high- to low-similarity (German-English (GE, Polish-English (PE, and Arabic-English (AE, respectively and a group of English monolinguals on a Stroop and Simon task. Two components of the bilingual advantage were investigated: an interference advantage, such that bilinguals have smaller interference effects than monolinguals; and a global RT advantage, such that bilinguals are faster overall than monolinguals. Between bilingual groups, these effects were expected to be modulated by script similarity. AE bilinguals showed the smallest Stroop interference effects, but the longest overall RTs in both tasks. These seemingly contradictory results are explained by the presence of cross-linguistic interference in the Stroop task. We conclude that similar-script bilinguals demonstrated more effective domain-general EC than different-script bilinguals, since high orthographic overlap creates more cross-linguistic activation and increases the daily demands on cognitive control. The role of individual variation is also discussed. These results suggest that script similarity is an important variable to consider in investigations of bilingual executive control abilities.

  17. JavaScript and jQuery for data analysis and visualization

    CERN Document Server

    Raasch, Jon; Ogievetsky, Vadim; Lowery, Joseph

    2014-01-01

    Go beyond design concepts-build dynamic data visualizations using JavaScript JavaScript and jQuery for Data Analysis and Visualization goes beyond design concepts to show readers how to build dynamic, best-of-breed visualizations using JavaScript-the most popular language for web programming. The authors show data analysts, developers, and web designers how they can put the power and flexibility of modern JavaScript libraries to work to analyze data and then present it using best-of-breed visualizations. They also demonstrate the use of each technique with real-world use cases, showing how to

  18. Developers@CERN Forum | Python at CERN | 30 – 31 May

    CERN Multimedia

    2016-01-01

    The Developers@CERN Forum is an event by developers for developers aimed at promoting knowledge- and experience-sharing (see here). The second forum will take place in the IT auditorium in the afternoons of 30 and 31 May.   With the topic “Python at CERN”, it will consist of a series of talks regarding the Python language, frameworks and tools used at CERN. Are you a Python guru or would you like to learn? Come and share your Python experiences with other developers! Submissions for presentations and workshops are open until 9 May at http://cern.ch/dev-forum. If you would like to stay informed about this or future events, please subscribe to the announcement e-group (just a few e-mails per year) here. 

  19. Culture, Ethics, Scripts, and Gifts.

    Science.gov (United States)

    Messerschmitt, Dorothy; Hafernik, Johnnie Johnson; Vandrick, Stephanie

    1997-01-01

    Discusses gift-giving patterns in different cultures, particularly in relation to teacher-student interactions in English-as-a-Second-Language (ESL) instruction. Situations in which gift-giving can raise ethical questions and how to teach culturally diverse students about this issue are highlighted. Script theory provides a theoretical basis for…

  20. Manipulation of Motivating Operations and Use of a Script-Fading Procedure to Teach Mands for Location to Children with Language Delays

    Science.gov (United States)

    Howlett, Melissa A.; Sidener, Tina M.; Progar, Patrick R.; Sidener, David W.

    2011-01-01

    The effects of contriving motivating operations (MOs) and script fading on the acquisition of the mand "Where's [object]?" were evaluated in 2 boys with language delays. During each session, trials were alternated in which high-preference items were present (abolishing operation [AO] trials) or missing (establishing operation [EO] trials) from…

  1. Status of parallel Python-based implementation of UEDGE

    Science.gov (United States)

    Umansky, M. V.; Pankin, A. Y.; Rognlien, T. D.; Dimits, A. M.; Friedman, A.; Joseph, I.

    2017-10-01

    The tokamak edge transport code UEDGE has long used the code-development and run-time framework Basis. However, with the support for Basis expected to terminate in the coming years, and with the advent of the modern numerical language Python, it has become desirable to move UEDGE to Python, to ensure its long-term viability. Our new Python-based UEDGE implementation takes advantage of the portable build system developed for FACETS. The new implementation gives access to Python's graphical libraries and numerical packages for pre- and post-processing, and support of HDF5 simplifies exchanging data. The older serial version of UEDGE has used for time-stepping the Newton-Krylov solver NKSOL. The renovated implementation uses backward Euler discretization with nonlinear solvers from PETSc, which has the promise to significantly improve the UEDGE parallel performance. We will report on assessment of some of the extended UEDGE capabilities emerging in the new implementation, and will discuss the future directions. Work performed for U.S. DOE by LLNL under contract DE-AC52-07NA27344.

  2. Head First HTML5 Programming Building Web Apps with JavaScript

    CERN Document Server

    Freeman, Eric

    2011-01-01

    HTML has been on a wild ride. Sure, HTML started as a mere markup language, but more recently HTML's put on some major muscle. Now we've got a language tuned for building web applications with Web storage, 2D drawing, offline support, sockets and threads, and more. And to speak this language you've got to go beyond HTML5 markup and into the world of the DOM, events, and JavaScript APIs. Now you probably already know all about HTML markup (otherwise known as structure) and you know all aboutCSS style (presentation), but what you've been missing is JavaScript (behavior). If all you know about

  3. Transliterating non-ASCII characters with Python

    Directory of Open Access Journals (Sweden)

    Seth Bernstein

    2013-10-01

    Full Text Available This lesson shows how to use Python to transliterate automatically a list of words from a language with a non-Latin alphabet to a standardized format using the American Standard Code for Information Interchange (ASCII characters. It builds on readers’ understanding of Python from the lessons “Viewing HTML Files,” “Working with Web Pages,” “From HTML to List of Words (part 1” and “Intro to Beautiful Soup.” At the end of the lesson, we will use the transliteration dictionary to convert the names from a database of the Russian organization Memorial from Cyrillic into Latin characters. Although the example uses Cyrillic characters, the technique can be reproduced with other alphabets using Unicode.

  4. Ascaridosis in captive reticulated python( Python reticulatus ) | Taiwo ...

    African Journals Online (AJOL)

    Two captive reticulated pythons, Python reticulatus, in the Zoological Gardens, University of Ibadan, Ibadan, Nigeria died and were submitted for necropsy at the Diagnostic Laboratory of the Department of Veterinary Pathology, University of Ibadan. Both pythons had been infected with Ascaridia galli for a long period of time ...

  5. Pythons in Burma: Short-tailed python (Reptilia: Squamata)

    Science.gov (United States)

    Zug, George R.; Gotte, Steve W.; Jacobs, Jeremy F.

    2011-01-01

    Short-tailed pythons, Python curtus species group, occur predominantly in the Malayan Peninsula, Sumatra, and Borneo. The discovery of an adult female in Mon State, Myanmar, led to a review of the distribution of all group members (spot-mapping of all localities of confirmed occurrence) and an examination of morphological variation in P. brongersmai. The resulting maps demonstrate a limited occurrence of these pythons within peninsular Malaya, Sumatra, and Borneo with broad absences in these regions. Our small samples limit the recognition of regional differentiation in the morphology of P. brongersmai populations; however, the presence of unique traits in the Myanmar python and its strong allopatry indicate that it is a unique genetic lineage, and it is described as Python kyaiktiyo new species.

  6. Building and documenting workflows with python-based snakemake

    NARCIS (Netherlands)

    J. Köster (Johannes); S. Rahmann (Sven)

    2012-01-01

    textabstractSnakemake is a novel workflow engine with a simple Python-derived workflow definition language and an optimizing execution environment. It is the first system that supports multiple named wildcards (or variables) in input and output filenames of each rule definition. It also allows to

  7. Teaching CS1 with Python GUI Game Programming

    Science.gov (United States)

    Wang, Hong

    2010-06-01

    Python is becoming a popular programming language in teaching freshman programming courses. The author designed a sequence of game programming labs using Pygame to further help engage students and to improve their programming skills. The class survey showed that the adoption of Pygame is successful.

  8. Pro Python

    CERN Document Server

    Alchin, Marty

    2010-01-01

    You've learned the basics of Python, but how do you take your skills to the next stage? Even if you know enough to be productive, there are a number of features that can take you to the next level in Python. Pro Python explores concepts and features normally left to experimentation, allowing you to be even more productive and creative. In addition to pure code concerns, Pro Python will develop your programming techniques and approaches, which will help make you a better Python programmer. Not only will this book help your code, it will also help you understand and interact with the many establ

  9. An introduction to statistics with Python with applications in the life sciences

    CERN Document Server

    Haslwanter, Thomas

    2016-01-01

    This textbook provides an introduction to the free software Python and its use for statistical data analysis. It covers common statistical tests for continuous, discrete and categorical data, as well as linear regression analysis and topics from survival analysis and Bayesian statistics. Working code and data for Python solutions for each test, together with easy-to-follow Python examples, can be reproduced by the reader and reinforce their immediate understanding of the topic. With recent advances in the Python ecosystem, Python has become a popular language for scientific computing, offering a powerful environment for statistical data analysis and an interesting alternative to R. The book is intended for master and PhD students, mainly from the life and medical sciences, with a basic knowledge of statistics. As it also provides some statistics background, the book can be used by anyone who wants to perform a statistical data analysis. .

  10. Game Development in Python with Pygame - 2D Platformgame for Raspberry Pi 3 driven arcademachine

    OpenAIRE

    Bryndum, Leonora; Hastrup, Jakob Scheunemann; Holm, Kevin Martin Lindemark; Kjær, Alberte Jeberg

    2017-01-01

    The purpose of this study, is to explore how to develop a 2D-arcade platform game for a Raspberry Pi 3 computer. This will be done with the programming language Python 3 and the game development framework Pygame. To do this, we investigate and learn about the Python 3 language and how this is structured. We investigate what an arcade game usually contains in the terms of programmatic content, and choose the focus points: Game Loop, Collisions, Physics, Animation, Level Design, Camera, Heads U...

  11. An OpenMI Implementation of a Water Resources System using Simple Script Wrappers

    Science.gov (United States)

    Steward, D. R.; Aistrup, J. A.; Kulcsar, L.; Peterson, J. M.; Welch, S. M.; Andresen, D.; Bernard, E. A.; Staggenborg, S. A.; Bulatewicz, T.

    2013-12-01

    This team has developed an adaption of the Open Modelling Interface (OpenMI) that utilizes Simple Script Wrappers. Code is made OpenMI compliant through organization within three modules that initialize, perform time steps, and finalize results. A configuration file is prepared that specifies variables a model expects to receive as input and those it will make available as output. An example is presented for groundwater, economic, and agricultural production models in the High Plains Aquifer region of Kansas. Our models use the programming environments in Scilab and Matlab, along with legacy Fortran code, and our Simple Script Wrappers can also use Python. These models are collectively run within this interdisciplinary framework from initial conditions into the future. It will be shown that by applying model constraints to one model, the impact may be accessed on changes to the water resources system.

  12. Python Introduction and Installation

    OpenAIRE

    William J. Turkel; Adam Crymble

    2012-01-01

    This first lesson in our section on dealing with Online Sources is designed to get you and your computer set up to start programming. We will focus on installing the relevant software – all free and reputable – and finally we will help you to get your toes wet with some simple programming that provides immediate results. In this opening module you will install the Python programming language, the Beautiful Soup HTML/XML parser, and a text editor. Screencaps provided here come from Komodo ...

  13. Java vs. Python Coverage of Introductory Programming Concepts: A Textbook Analysis

    Science.gov (United States)

    McMaster, Kirby; Sambasivam, Samuel; Rague, Brian; Wolthuis, Stuart

    2017-01-01

    In this research, we compare two languages, Java and Python, by performing a content analysis of words in textbooks that describe important programming concepts. Our goal is to determine which language has better textbook support for teaching introductory programming courses. We used the TextSTAT program to count how often our list of concept…

  14. An ESL Audio-Script Writing Workshop

    Science.gov (United States)

    Miller, Carla

    2012-01-01

    The roles of dialogue, collaborative writing, and authentic communication have been explored as effective strategies in second language writing classrooms. In this article, the stages of an innovative, multi-skill writing method, which embeds students' personal voices into the writing process, are explored. A 10-step ESL Audio Script Writing Model…

  15. Julia and Python in Astronomy: Better Together

    OpenAIRE

    Barbary, Kyle

    2016-01-01

    Astronomers love Python because it is open source, easy to learn, and has a tremendous ecosystem for scientific computing. The Julia programming language has many of those same characteristics. In this talk, I discuss Julia, its use in astronomy and the growing ecosystem of astronomy packages, particularly those managed by the JuliaAstro organization (http://JuliaAstro.github.io).

  16. TmiRUSite and TmiROSite scripts: searching for mRNA fragments with miRNA binding sites with encoded amino acid residues.

    Science.gov (United States)

    Berillo, Olga; Régnier, Mireille; Ivashchenko, Anatoly

    2014-01-01

    microRNAs are small RNA molecules that inhibit the translation of target genes. microRNA binding sites are located in the untranslated regions as well as in the coding domains. We describe TmiRUSite and TmiROSite scripts developed using python as tools for the extraction of nucleotide sequences for miRNA binding sites with their encoded amino acid residue sequences. The scripts allow for retrieving a set of additional sequences at left and at right from the binding site. The scripts presents all received data in table formats that are easy to analyse further. The predicted data finds utility in molecular and evolutionary biology studies. They find use in studying miRNA binding sites in animals and plants. TmiRUSite and TmiROSite scripts are available for free from authors upon request and at https: //sites.google.com/site/malaheenee/downloads for download.

  17. [Radiology information system using HTML, JavaScript, and Web server].

    Science.gov (United States)

    Sone, M; Sasaki, M; Oikawa, H; Yoshioka, K; Ehara, S; Tamakawa, Y

    1997-12-01

    We have developed a radiology information system using intranet techniques, including hypertext markup language, JavaScript, and Web server. JavaScript made it possible to develop an easy-to-use application, as well as to reduce network traffic and load on the server. The system we have developed is inexpensive and flexible, and its development and maintenance are much easier than with the previous system.

  18. Humoral regulation of heart rate during digestion in pythons (Python molurus and Python regius).

    Science.gov (United States)

    Enok, Sanne; Simonsen, Lasse Stærdal; Pedersen, Signe Vesterskov; Wang, Tobias; Skovgaard, Nini

    2012-05-15

    Pythons exhibit a doubling of heart rate when metabolism increases several times during digestion. Pythons, therefore, represent a promising model organism to study autonomic cardiovascular regulation during the postprandial state, and previous studies show that the postprandial tachycardia is governed by a release of vagal tone as well as a pronounced stimulation from nonadrenergic, noncholinergic (NANC) factors. Here we show that infusion of plasma from digesting donor pythons elicit a marked tachycardia in fasting snakes, demonstrating that the NANC factor resides in the blood. Injections of the gastrin and cholecystokinin receptor antagonist proglumide had no effect on double-blocked heart rate or blood pressure. Histamine has been recognized as a NANC factor in the early postprandial period in pythons, but the mechanism of its release has not been identified. Mast cells represent the largest repository of histamine in vertebrates, and it has been speculated that mast cells release histamine during digestion. Treatment with the mast cell stabilizer cromolyn significantly reduced postprandial heart rate in pythons compared with an untreated group but did not affect double-blocked heart rate. While this study indicates that histamine induces postprandial tachycardia in pythons, its release during digestion is not stimulated by gastrin or cholecystokinin nor is its release from mast cells a stimulant of postprandial tachycardia.

  19. DendroPy: a Python library for phylogenetic computing.

    Science.gov (United States)

    Sukumaran, Jeet; Holder, Mark T

    2010-06-15

    DendroPy is a cross-platform library for the Python programming language that provides for object-oriented reading, writing, simulation and manipulation of phylogenetic data, with an emphasis on phylogenetic tree operations. DendroPy uses a splits-hash mapping to perform rapid calculations of tree distances, similarities and shape under various metrics. It contains rich simulation routines to generate trees under a number of different phylogenetic and coalescent models. DendroPy's data simulation and manipulation facilities, in conjunction with its support of a broad range of phylogenetic data formats (NEXUS, Newick, PHYLIP, FASTA, NeXML, etc.), allow it to serve a useful role in various phyloinformatics and phylogeographic pipelines. The stable release of the library is available for download and automated installation through the Python Package Index site (http://pypi.python.org/pypi/DendroPy), while the active development source code repository is available to the public from GitHub (http://github.com/jeetsukumaran/DendroPy).

  20. New Version of SeismicHandler (SHX) based on ObsPy

    Science.gov (United States)

    Stammler, Klaus; Walther, Marcus

    2016-04-01

    The command line version of SeismicHandler (SH), a scientific analysis tool for seismic waveform data developed around 1990, has been redesigned in the recent years, based on a project funded by the Deutsche Forschungsgemeinschaft (DFG). The aim was to address new data access techniques, simplified metadata handling and a modularized software design. As a result the program was rewritten in Python in its main parts, taking advantage of simplicity of this script language and its variety of well developed software libraries, including ObsPy. SHX provides an easy access to waveforms and metadata via arclink and FDSN webservice protocols, also access to event catalogs is implemented. With single commands whole networks or stations within a certain area may be read in, the metadata are retrieved from the servers and stored in a local database. For data processing the large set of SH commands is available, as well as the SH scripting language. Via this SH language scripts or additional Python modules the command set of SHX is easily extendable. The program is open source, tested on Linux operating systems, documentation and download is found at URL "https://www.seismic-handler.org/".

  1. Python Scripts for Automation of Current-Voltage Testing of Semiconductor Devices (FY17)

    Science.gov (United States)

    2017-01-01

    investment required by the user with manual operation, only a fraction of the total devices fabricated on a sample are actually tested. In this...only moves the stage itself in 3 dimensions. It does not control the probes or stage rotation. It is important to note that the user must first attempt...measurements using the 4155C and the manual probe station. This script bypasses the original front panel operation of the 4155C and allows the user to set

  2. Architecture of collaborating frameworks simulation, visualisation, user interface and analysis

    CERN Document Server

    Pfeier, A; Ferrero-Merlino, B; Giannitrapani, R; Longo, F; Nieminen, P; Pia, M G; Santin, G

    2001-01-01

    The Anaphe project is an ongoing effort to provide an Object Oriented software environment for data analysis in HENP experiments. A range of commercial and public domain libraries is used to cover basic functionalities; on top of these libraries a set of HENP-specific C++ class libraries for histogram management, fitting, plotting and ntuple-like data analysis has been developed. In order to comply with the user requirements for a command-line driven tool, we have chosen to use a scripting language (Python) as the front-end for a data analysis tool. The loose coupling provided by the consequent use of (AIDA compliant) Abstract Interfaces for each component in combination with the use of shared libraries for their implementation provides an easy integration of existing libraries into modern scripting languages thus allowing for rapid application development. This integration is simplified even further using a specialised toolkit (SWIG) to create "shadow classes" for the Python language, which map the definitio...

  3. Anaphe - OO Libraries and Tools for Data Analysis

    CERN Document Server

    Couet, O; Molnar, Z; Moscicki, J T; Pfeiffer, A; Sang, M

    2001-01-01

    The Anaphe project is an ongoing effort to provide an Object Oriented software environment for data analysis in HENP experiments. A range of commercial and public domain libraries is used to cover basic functionalities; on top of these libraries a set of HENP-specific C++ class libraries for histogram management, fitting, plotting and ntuple-like data analysis has been developed. In order to comply with the user requirements for a command-line driven tool, we have chosen to use a scripting language (Python) as the front-end for a data analysis tool. The loose coupling provided by the consequent use of (AIDA compliant) Abstract Interfaces for each component in combination with the use of shared libraries for their implementation provides an easy integration of existing libraries into modern scripting languages thus allowing for rapid application development. This integration is simplified even further using a specialised toolkit (SWIG) to create "shadow classes" for the Python language, which map the definitio...

  4. Effects of peer-mediated implementation of visual scripts in middle school.

    Science.gov (United States)

    Ganz, Jennifer B; Heath, Amy K; Lund, Emily M; Camargo, Siglia P H; Rispoli, Mandy J; Boles, Margot; Plaisance, Lauren

    2012-05-01

    Although research has investigated the impact of peer-mediated interventions and visual scripts on social and communication skills in children with autism spectrum disorders, no studies to date have investigated peer-mediated implementation of scripts. This study investigated the effects of peer-implemented scripts on a middle school student with autism, intellectual impairments, and speech-language impairment via a multiple baseline single-case research design across behaviors. The target student demonstrated improvements in three communicative behaviors when implemented by a trained peer; however, behaviors did not generalize to use with an untrained typically developing peer.

  5. GNU Data Language (GDL) - a free and open-source implementation of IDL

    Science.gov (United States)

    Arabas, Sylwester; Schellens, Marc; Coulais, Alain; Gales, Joel; Messmer, Peter

    2010-05-01

    GNU Data Language (GDL) is developed with the aim of providing an open-source drop-in replacement for the ITTVIS's Interactive Data Language (IDL). It is free software developed by an international team of volunteers led by Marc Schellens - the project's founder (a list of contributors is available on the project's website). The development is hosted on SourceForge where GDL continuously ranks in the 99th percentile of most active projects. GDL with its library routines is designed as a tool for numerical data analysis and visualisation. As its proprietary counterparts (IDL and PV-WAVE), GDL is used particularly in geosciences and astronomy. GDL is dynamically-typed, vectorized and has object-oriented programming capabilities. The library routines handle numerical calculations, data visualisation, signal/image processing, interaction with host OS and data input/output. GDL supports several data formats such as netCDF, HDF4, HDF5, GRIB, PNG, TIFF, DICOM, etc. Graphical output is handled by X11, PostScript, SVG or z-buffer terminals, the last one allowing output to be saved in a variety of raster graphics formats. GDL is an incremental compiler with integrated debugging facilities. It is written in C++ using the ANTLR language-recognition framework. Most of the library routines are implemented as interfaces to open-source packages such as GNU Scientific Library, PLPlot, FFTW, ImageMagick, and others. GDL features a Python bridge (Python code can be called from GDL; GDL can be compiled as a Python module). Extensions to GDL can be written in C++, GDL, and Python. A number of open software libraries written in IDL, such as the NASA Astronomy Library, MPFIT, CMSVLIB and TeXtoIDL are fully or partially functional under GDL. Packaged versions of GDL are available for several Linux distributions and Mac OS X. The source code compiles on some other UNIX systems, including BSD and OpenSolaris. The presentation will cover the current status of the project, the key

  6. Server-side Statistics Scripting in PHP

    Directory of Open Access Journals (Sweden)

    Jan de Leeuw

    1997-06-01

    Full Text Available On the UCLA Statistics WWW server there are a large number of demos and calculators that can be used in statistics teaching and research. Some of these demos require substantial amounts of computation, others mainly use graphics. These calculators and demos are implemented in various different ways, reflecting developments in WWW based computing. As usual, one of the main choices is between doing the work on the client-side (i.e. in the browser or on the server-side (i.e. on our WWW server. Obviously, client-side computation puts fewer demands on the server. On the other hand, it requires that the client downloads Java applets, or installs plugins and/or helpers. If JavaScript is used, client-side computations will generally be slow. We also have to assume that the client is installed properly, and has the required capabilities. Requiring too much on the client-side has caused browsing machines such as Netscape Communicator to grow beyond all reasonable bounds, both in size and RAM requirements. Moreover requiring Java and JavaScript rules out such excellent browsers as Lynx or Emacs W3. For server-side computing, we can configure the server and its resources ourselves, and we need not worry about browser capabilities and configuration. Nothing needs to be downloaded, except the usual HTML pages and graphics. In the same way as on the client side, there is a scripting solution, where code is interpreted, or a ob ject-code solution using compiled code. For the server-side scripting, we use embedded languages, such as PHP/FI. The scripts in the HTML pages are interpreted by a CGI program, and the output of the CGI program is send to the clients. Of course the CGI program is compiled, but the statistics procedures will usually be interpreted, because PHP/FI does not have the appropriate functions in its scripting language. This will tend to be slow, because embedded languages do not deal efficiently with loops and similar constructs. Thus a first

  7. libNeuroML and PyLEMS: using Python to combine procedural and declarative modeling approaches in computational neuroscience.

    Science.gov (United States)

    Vella, Michael; Cannon, Robert C; Crook, Sharon; Davison, Andrew P; Ganapathy, Gautham; Robinson, Hugh P C; Silver, R Angus; Gleeson, Padraig

    2014-01-01

    NeuroML is an XML-based model description language, which provides a powerful common data format for defining and exchanging models of neurons and neuronal networks. In the latest version of NeuroML, the structure and behavior of ion channel, synapse, cell, and network model descriptions are based on underlying definitions provided in LEMS, a domain-independent language for expressing hierarchical mathematical models of physical entities. While declarative approaches for describing models have led to greater exchange of model elements among software tools in computational neuroscience, a frequent criticism of XML-based languages is that they are difficult to work with directly. Here we describe two Application Programming Interfaces (APIs) written in Python (http://www.python.org), which simplify the process of developing and modifying models expressed in NeuroML and LEMS. The libNeuroML API provides a Python object model with a direct mapping to all NeuroML concepts defined by the NeuroML Schema, which facilitates reading and writing the XML equivalents. In addition, it offers a memory-efficient, array-based internal representation, which is useful for handling large-scale connectomics data. The libNeuroML API also includes support for performing common operations that are required when working with NeuroML documents. Access to the LEMS data model is provided by the PyLEMS API, which provides a Python implementation of the LEMS language, including the ability to simulate most models expressed in LEMS. Together, libNeuroML and PyLEMS provide a comprehensive solution for interacting with NeuroML models in a Python environment.

  8. libNeuroML and PyLEMS: using Python to combine imperative and declarative modelling approaches in computational neuroscience

    Directory of Open Access Journals (Sweden)

    Michael eVella

    2014-04-01

    Full Text Available NeuroML is an XML-based model description language, which provides a powerful common data format for defining and exchanging models of neurons and neuronal networks. In the latest version of NeuroML, the structure and behavior of ion channel, synapse, cell,and network model descriptions are based on underlying definitions provided in LEMS, a domain-independent language for expressing hierarchical mathematical models of physical entities. While declarative approaches for describing models have led to greater exchange of model elements among software tools in computational neuroscience, a frequent criticism of XML-based languages is that they are difficult to work with directly. Here we describe two APIs (Application Programming Interfaces written in Python (http://www.python.org, which simplify the process of developing and modifying models expressed in NeuroML and LEMS. The libNeuroML API provides a Python object model with a direct mapping to all NeuroML concepts defined by the NeuroML Schema, which facilitates reading and writing the XML equivalents. In addition, it offers a memory-efficient, array-based internal representation, which is useful for handling large-scale connectomics data. The libNeuroML API also includes support for performing common operations that are required when working with NeuroML documents. Access to the LEMS data model is provided by the PyLEMS API, which provides a Python implementation of the LEMS language, including the ability to simulate most models expressed in LEMS. Together, libNeuroML and PyLEMS provide a comprehensive solution for interacting with NeuroML models in a Python environment.

  9. Internationalization and Localization in Python

    CERN Multimedia

    CERN. Geneva

    2016-01-01

    Internationalization and Localization are increasingly important in an interconnected world. Regardless of that, developers tend to treat them as secondary issues, very often choosing to address them properly when it's already too late. The fact that most programming language standard libraries choose to ignore the matter doesn't help either. In this talk we will present some useful Python libraries and tools that can help you internationalize and localize your code with minimal effort. We will also describe some common pitfalls and problems.

  10. Pythran: enabling static optimization of scientific Python programs

    Science.gov (United States)

    Guelton, Serge; Brunet, Pierrick; Amini, Mehdi; Merlini, Adrien; Corbillon, Xavier; Raynaud, Alan

    2015-01-01

    Pythran is an open source static compiler that turns modules written in a subset of Python language into native ones. Assuming that scientific modules do not rely much on the dynamic features of the language, it trades them for powerful, possibly inter-procedural, optimizations. These optimizations include detection of pure functions, temporary allocation removal, constant folding, Numpy ufunc fusion and parallelization, explicit thread-level parallelism through OpenMP annotations, false variable polymorphism pruning, and automatic vector instruction generation such as AVX or SSE. In addition to these compilation steps, Pythran provides a C++ runtime library that leverages the C++ STL to provide generic containers, and the Numeric Template Toolbox for Numpy support. It takes advantage of modern C++11 features such as variadic templates, type inference, move semantics and perfect forwarding, as well as classical idioms such as expression templates. Unlike the Cython approach, Pythran input code remains compatible with the Python interpreter. Output code is generally as efficient as the annotated Cython equivalent, if not more, but without the backward compatibility loss.

  11. An ERP investigation of visual word recognition in syllabary scripts.

    Science.gov (United States)

    Okano, Kana; Grainger, Jonathan; Holcomb, Phillip J

    2013-06-01

    The bimodal interactive-activation model has been successfully applied to understanding the neurocognitive processes involved in reading words in alphabetic scripts, as reflected in the modulation of ERP components in masked repetition priming. In order to test the generalizability of this approach, in the present study we examined word recognition in a different writing system, the Japanese syllabary scripts hiragana and katakana. Native Japanese participants were presented with repeated or unrelated pairs of Japanese words in which the prime and target words were both in the same script (within-script priming, Exp. 1) or were in the opposite script (cross-script priming, Exp. 2). As in previous studies with alphabetic scripts, in both experiments the N250 (sublexical processing) and N400 (lexical-semantic processing) components were modulated by priming, although the time course was somewhat delayed. The earlier N/P150 effect (visual feature processing) was present only in "Experiment 1: Within-script priming", in which the prime and target words shared visual features. Overall, the results provide support for the hypothesis that visual word recognition involves a generalizable set of neurocognitive processes that operate in similar manners across different writing systems and languages, as well as pointing to the viability of the bimodal interactive-activation framework for modeling such processes.

  12. Implementing Cooperative Behavior & Control Using Open Source Technology Across Heterogeneous Vehicles

    Science.gov (United States)

    2015-03-26

    cooperative control algorithms used for multiple SUAS to perform surveillance using equal angular spacing from the ground target [16]. The algorithm...allows each SUAS in the surveillance mission to loiter around a target at an equal angular spacing from one another on the same loiter path. This...Planner has included. For instance, Mission Planner has the ability to run Python scripts. Python is a programming language like Java . With the

  13. Ruby in a nutshell a desktop quick reference

    CERN Document Server

    Matsumoto, Yukihiro

    2002-01-01

    Ruby is an absolutely pure object-oriented scripting language written in C and designed with Perl and Python capabilities in mind. While its roots are in Japan, Ruby is slowly but surely gaining ground in the US. The goal of Yukihiro Matsumoto, creator of Ruby and author of this book, is to incorporate the strengths of languages like Perl, Python, Lisp and Smalltalk. Ruby is a genuine attempt to combine the best of everything in the scripting world. Since 1993, Ruby mailing lists have been established, Web pages have formed, and a community has grown around it. The language itself is very good at text processing and is notable for its broad object orientation. Ruby is portable and runs under GNU/Linux (and other Unices) as well as DOS, MS Windows and Mac. With Ruby in a Nutshell, Matsumoto offers a practical reference to the features of this new language including the command-line options, syntax, built-in variables, functions, and many commonly used classes and modules. This guide covers the current stable ...

  14. Text Mining in Python through the HTRC Feature Reader

    Directory of Open Access Journals (Sweden)

    Peter Organisciak

    2016-11-01

    Full Text Available We introduce a toolkit for working with the 13.6 million volume Extracted Features Dataset from the HathiTrust Research Center. You will learn how to peer at the words and trends of any book in the collection, while developing broadly useful Python data analysis skills. The HathiTrust holds nearly 15 million digitized volumes from libraries around the world. In addition to their individual value, these works in aggregate are extremely valuable for historians. Spanning many centuries and genres, they offer a way to learn about large-scale trends in history and culture, as well as evidence for changes in language or even the structure of the book. To simplify access to this collection the HathiTrust Research Center (HTRC has released the Extracted Features dataset (Capitanu et al. 2015: a dataset that provides quantitative information describing every page of every volume in the collection. In this lesson, we introduce the HTRC Feature Reader, a library for working with the HTRC Extracted Features dataset using the Python programming language. The HTRC Feature Reader is structured to support work using popular data science libraries, particularly Pandas. Pandas provides simple structures for holding data and powerful ways to interact with it. The HTRC Feature Reader uses these data structures, so learning how to use it will also cover general data analysis skills in Python.

  15. Fixing the Sorting Algorithm for Android, Java and Python

    NARCIS (Netherlands)

    C.P.T. de Gouw (Stijn); F.S. de Boer (Frank)

    2015-01-01

    htmlabstractTim Peters developed the Timsort hybrid sorting algorithm in 2002. TimSort was first developed for Python, a popular programming language, but later ported to Java (where it appears as java.util.Collections.sort and java.util.Arrays.sort). TimSort is today used as the default sorting

  16. Scikit-learn: Machine Learning in Python

    OpenAIRE

    Pedregosa, Fabian; Varoquaux, Gaël; Gramfort, Alexandre; Michel, Vincent; Thirion, Bertrand; Grisel, Olivier; Blondel, Mathieu; Prettenhofer, Peter; Weiss, Ron; Dubourg, Vincent; Vanderplas, Jake; Passos, Alexandre; Cournapeau, David; Brucher, Matthieu; Perrot, Matthieu

    2011-01-01

    International audience; Scikit-learn is a Python module integrating a wide range of state-of-the-art machine learning algorithms for medium-scale supervised and unsupervised problems. This package focuses on bringing machine learning to non-specialists using a general-purpose high-level language. Emphasis is put on ease of use, performance, documentation, and API consistency. It has minimal dependencies and is distributed under the simplified BSD license, encouraging its use in both academic ...

  17. Scikit-learn: Machine Learning in Python

    OpenAIRE

    Pedregosa, Fabian; Varoquaux, Gaël; Gramfort, Alexandre; Michel, Vincent; Thirion, Bertrand; Grisel, Olivier; Blondel, Mathieu; Louppe, Gilles; Prettenhofer, Peter; Weiss, Ron; Dubourg, Vincent; Vanderplas, Jake; Passos, Alexandre; Cournapeau, David; Brucher, Matthieu

    2012-01-01

    Scikit-learn is a Python module integrating a wide range of state-of-the-art machine learning algorithms for medium-scale supervised and unsupervised problems. This package focuses on bringing machine learning to non-specialists using a general-purpose high-level language. Emphasis is put on ease of use, performance, documentation, and API consistency. It has minimal dependencies and is distributed under the simplified BSD license, encouraging its use in both academic and commercial settings....

  18. AutoWIG: automatic generation of python bindings for C++ libraries

    Directory of Open Access Journals (Sweden)

    Pierre Fernique

    2018-04-01

    Full Text Available Most of Python and R scientific packages incorporate compiled scientific libraries to speed up the code and reuse legacy libraries. While several semi-automatic solutions exist to wrap these compiled libraries, the process of wrapping a large library is cumbersome and time consuming. In this paper, we introduce AutoWIG, a Python package that wraps automatically compiled libraries into high-level languages using LLVM/Clang technologies and the Mako templating engine. Our approach is automatic, extensible, and applies to complex C++ libraries, composed of thousands of classes or incorporating modern meta-programming constructs.

  19. MTpy - Python Tools for Magnetotelluric Data Processing and Analysis

    Science.gov (United States)

    Krieger, Lars; Peacock, Jared; Thiel, Stephan; Inverarity, Kent; Kirkby, Alison; Robertson, Kate; Soeffky, Paul; Didana, Yohannes

    2014-05-01

    We present the Python package MTpy, which provides functions for the processing, analysis, and handling of magnetotelluric (MT) data sets. MT is a relatively immature and not widely applied geophysical method in comparison to other geophysical techniques such as seismology. As a result, the data processing within the academic MT community is not thoroughly standardised and is often based on a loose collection of software, adapted to the respective local specifications. We have developed MTpy to overcome problems that arise from missing standards, and to provide a simplification of the general handling of MT data. MTpy is written in Python, and the open-source code is freely available from a GitHub repository. The setup follows the modular approach of successful geoscience software packages such as GMT or Obspy. It contains sub-packages and modules for the various tasks within the standard work-flow of MT data processing and interpretation. In order to allow the inclusion of already existing and well established software, MTpy does not only provide pure Python classes and functions, but also wrapping command-line scripts to run standalone tools, e.g. modelling and inversion codes. Our aim is to provide a flexible framework, which is open for future dynamic extensions. MTpy has the potential to promote the standardisation of processing procedures and at same time be a versatile supplement for existing algorithms. Here, we introduce the concept and structure of MTpy, and we illustrate the workflow of MT data processing, interpretation, and visualisation utilising MTpy on example data sets collected over different regions of Australia and the USA.

  20. Applications of custom scripting in digital micrograph: general image manipulation and utilities

    International Nuclear Information System (INIS)

    Mitchell, D.R.G.

    2002-01-01

    Full text: The Gatan Imaging Filter (GIF) uses a charge coupled device (CCD) camera to capture images and spectra. Image capture and manipulation is achieved through Gatan's Digital Micrograph software. This has many capabilities built-in, and can be further extended through installation of custom scripts. These are typically short programs written in a powerful scripting language, which permits many aspects of image acquisition and subsequent manipulation to be controlled by the user. Custom scripts can be added to the normal pull down menus, producing a very flexible and easy to use environment. The scripts described here demonstrate how custom scripting can enhance the functionality of a modem analytical TEM equipped with, in this instance, a GIF. However, scripting will enhance any TEM using a CCD camera controlled through Digital Micrograph. The examples shown here include: a) a script to rotationally average a selected area diffraction pattern and produce a calibrated radial intensity profile, b) a utility script which monitors and graphically displays the CCD temperature as a function of time and c) a simple script to propagate image spatial calibrations to uncalibrated images, such as EFTEM images. Other scripts by the author along with some scripting resources are also discussed. Copyright (2002) Australian Society for Electron Microscopy Inc

  1. TypeScript revealed

    CERN Document Server

    Maharry, Dan

    2013-01-01

    TypeScript Revealed is a quick 100-page guide to Anders Hejlsberg's new take on JavaScript. With this brief, fast-paced introduction to TypeScript, .NET, Web and Windows 8 application developers who are already familiar with JavaScript will easily get up to speed with TypeScript and decide whether or not to start incorporating it into their own development. TypeScript is 'JavaScript for Application-scale development'; a superset of JavaScript that brings to it an additional object-oriented-like syntax familiar to .NET programmers that compiles down into simple, clean JavaScript that any browse

  2. DOM Scripting

    CERN Document Server

    Keith, J

    2011-01-01

    In this Second Edition of the popular DOM Scripting: Web Design with JavaScript and the Document Object Model, comes a modern revision to include current best practices and guidelines. There is also full coverage of HTML5 in a new, dedicated chapter, and details on JavaScript libraries and how they can help your scripting. The book gives you everything you need to start using JavaScript and the Document Object Model to enhance your web pages with client-side dynamic effects and user-controlled animation. It shows you how JavaScript, HTML5, and Cascading Style Sheets (CSS) work together to crea

  3. [Lecture Games] Python programming game

    OpenAIRE

    Johnsen, Andreas Lyngstad; Ushakov, Georgy

    2011-01-01

    Pythia is a programming game that allows the player to change pieces of theirenvironment through use of the programming language Python. The idea is that thegame could be used as a part of teaching simple programming to first year universitystudents. The game should be fun enough for the students to keep playing, teachenough for it to earn a place as a teaching tool, and it should be usable by allstudents. It should also be possible for a teacher to create their own content for theg...

  4. Endocardial fibrosarcoma in a reticulated python (Python reticularis).

    Science.gov (United States)

    Gumber, Sanjeev; Nevarez, Javier G; Cho, Doo-Youn

    2010-11-01

    A female, reticulated python (Python reticularis) of unknown age was presented with a history of lethargy, weakness, and distended coelom. Physical examination revealed severe dystocia and stomatitis. The reticulated python was euthanized due to a poor clinical prognosis. Postmortem examination revealed marked distention of the reproductive tract with 26 eggs (10-12 cm in diameter), pericardial effusion, and a slightly firm, pale tan mass (3-4 cm in diameter) adhered to the endocardium at the base of aorta. Based on histopathologic and transmission electron microscopic findings, the diagnosis of endocardial fibrosarcoma was made.

  5. Professional JavaScript Frameworks Prototype,YUI, ExtJS, Dojo and MooTools

    CERN Document Server

    Orchard, Leslie M; Koon, Scott

    2009-01-01

    As the industry-standard, must-know scripting language, JavaScript is supported by all major browsers and is increasingly the foundation of new web development technologies such as Ajax and JSON. This book offers a selection of some of the most active and most used JavaScript frameworks available, replete with practical examples and explanations of what each framework does best. You'll look at common web development tasks and discover how each framework approaches that set of tasks, as well as learn how to use the features of each framework and avoid potential pitfalls.

  6. Automation in the Teaching of Descriptive Geometry and CAD. High-Level CAD Templates Using Script Languages

    Science.gov (United States)

    Moreno, R.; Bazán, A. M.

    2017-10-01

    The main purpose of this work is to study improvements to the learning method of technical drawing and descriptive geometry through exercises with traditional techniques that are usually solved manually by applying automated processes assisted by high-level CAD templates (HLCts). Given that an exercise with traditional procedures can be solved, detailed step by step in technical drawing and descriptive geometry manuals, CAD applications allow us to do the same and generalize it later, incorporating references. Traditional teachings have become obsolete and current curricula have been relegated. However, they can be applied in certain automation processes. The use of geometric references (using variables in script languages) and their incorporation into HLCts allows the automation of drawing processes. Instead of repeatedly creating similar exercises or modifying data in the same exercises, users should be able to use HLCts to generate future modifications of these exercises. This paper introduces the automation process when generating exercises based on CAD script files, aided by parametric geometry calculation tools. The proposed method allows us to design new exercises without user intervention. The integration of CAD, mathematics, and descriptive geometry facilitates their joint learning. Automation in the generation of exercises not only saves time but also increases the quality of the statements and reduces the possibility of human error.

  7. Wrapping Python around MODFLOW/MT3DMS based groundwater models

    Science.gov (United States)

    Post, V.

    2008-12-01

    Numerical models that simulate groundwater flow and solute transport require a great amount of input data that is often organized into different files. A large proportion of the input data consists of spatially-distributed model parameters. The model output consists of a variety data such as heads, fluxes and concentrations. Typically all files have different formats. Consequently, preparing input and managing output is a complex and error-prone task. Proprietary software tools are available that facilitate the preparation of input files and analysis of model outcomes. The use of such software may be limited if it does not support all the features of the groundwater model or when the costs of such tools are prohibitive. Therefore a Python library was developed that contains routines to generate input files and process output files of MODFLOW/MT3DMS based models. The library is freely available and has an open structure so that the routines can be customized and linked into other scripts and libraries. The current set of functions supports the generation of input files for MODFLOW and MT3DMS, including the capability to read spatially-distributed input parameters (e.g. hydraulic conductivity) from PNG files. Both ASCII and binary output files can be read efficiently allowing for visualization of, for example, solute concentration patterns in contour plots with superimposed flow vectors using matplotlib. Series of contour plots are then easily saved as an animation. The subroutines can also be used within scripts to calculate derived quantities such as the mass of a solute within a particular region of the model domain. Using Python as a wrapper around groundwater models provides an efficient and flexible way of processing input and output data, which is not constrained by limitations of third-party products.

  8. The spectacle of the ball python (Python regius)

    DEFF Research Database (Denmark)

    Da Silva, Mari-Ann Otkjær; Heegaard, Steffen; Wang, Tobias

    2014-01-01

    A detailed morphological description of the spectacle of the ball python (Python regius) is provided. The eyes of 21 snakes were examined by light microscopy and/or transmission electron microscopy. Additionally, eyes of nine live snakes were examined using optical coherence tomography (OCT...

  9. Acariasis on pet Burmese python, Python molurus bivittatus in Malaysia.

    Science.gov (United States)

    Mariana, A; Vellayan, S; Halimaton, I; Ho, T M

    2011-03-01

    To identify the acari present on pet Burmese pythons in Malaysia and to determine whether there is any potential public health risk related to handling of the snakes. Two sub-adult Burmese pythons kept as pets for a period of about 6 to 7 months by different owners, were brought to an exotic animal practice for treatment. On a complete medical examination, some ticks and mites (acari) were detected beneath the dorsal and ventral scales along body length of the snakes. Ticks were directly identified and mites were mounted prior to identification. A total of 12 ticks represented by 3 males, 2 females and 7 nymphal stages of Rhipicephalus sanguineus (R. sanguineus) were extracted from the first python while the other one was with 25 female Ophionyssus natricis (O. natricis) mesostigmatid mites. Only adult female mites were found. These mites are common ectoparasites of Burmese pythons. Both the acarine species found on the Burmese pythons are known vectors of pathogens. This is the first record that R. sanguineus has been reported from a pet Burmese python in Malaysia. Copyright © 2011 Hainan Medical College. Published by Elsevier B.V. All rights reserved.

  10. A Pythonic Approach for Computational Geosciences and Geo-Data Processing

    Science.gov (United States)

    Morra, G.; Yuen, D. A.; Lee, S. M.

    2016-12-01

    Computational methods and data analysis play a constantly increasing role in Earth Sciences however students and professionals need to climb a steep learning curve before reaching a sufficient level that allows them to run effective models. Furthermore the recent arrival and new powerful machine learning tools such as Torch and Tensor Flow has opened new possibilities but also created a new realm of complications related to the completely different technology employed. We present here a series of examples entirely written in Python, a language that combines the simplicity of Matlab with the power and speed of compiled languages such as C, and apply them to a wide range of geological processes such as porous media flow, multiphase fluid-dynamics, creeping flow and many-faults interaction. We also explore ways in which machine learning can be employed in combination with numerical modelling. From immediately interpreting a large number of modeling results to optimizing a set of modeling parameters to obtain a desired optimal simulation. We show that by using Python undergraduate and graduate can learn advanced numerical technologies with a minimum dedicated effort, which in turn encourages them to develop more numerical tools and quickly progress in their computational abilities. We also show how Python allows combining modeling with machine learning as pieces of LEGO, therefore simplifying the transition towards a new kind of scientific geo-modelling. The conclusion is that Python is an ideal tool to create an infrastructure for geosciences that allows users to quickly develop tools, reuse techniques and encourage collaborative efforts to interpret and integrate geo-data in profound new ways.

  11. OMPC: an Open-Source MATLAB-to-Python Compiler.

    Science.gov (United States)

    Jurica, Peter; van Leeuwen, Cees

    2009-01-01

    Free access to scientific information facilitates scientific progress. Open-access scientific journals are a first step in this direction; a further step is to make auxiliary and supplementary materials that accompany scientific publications, such as methodological procedures and data-analysis tools, open and accessible to the scientific community. To this purpose it is instrumental to establish a software base, which will grow toward a comprehensive free and open-source language of technical and scientific computing. Endeavors in this direction are met with an important obstacle. MATLAB((R)), the predominant computation tool in many fields of research, is a closed-source commercial product. To facilitate the transition to an open computation platform, we propose Open-source MATLAB((R))-to-Python Compiler (OMPC), a platform that uses syntax adaptation and emulation to allow transparent import of existing MATLAB((R)) functions into Python programs. The imported MATLAB((R)) modules will run independently of MATLAB((R)), relying on Python's numerical and scientific libraries. Python offers a stable and mature open source platform that, in many respects, surpasses commonly used, expensive commercial closed source packages. The proposed software will therefore facilitate the transparent transition towards a free and general open-source lingua franca for scientific computation, while enabling access to the existing methods and algorithms of technical computing already available in MATLAB((R)). OMPC is available at http://ompc.juricap.com.

  12. MANIPULATION OF MOTIVATING OPERATIONS AND USE OF A SCRIPT-FADING PROCEDURE TO TEACH MANDS FOR LOCATION TO CHILDREN WITH LANGUAGE DELAYS

    OpenAIRE

    Howlett, Melissa A; Sidener, Tina M; Progar, Patrick R; Sidener, David W

    2011-01-01

    The effects of contriving motivating operations (MOs) and script fading on the acquisition of the mand “Where's [object]?” were evaluated in 2 boys with language delays. During each session, trials were alternated in which high-preference items were present (abolishing operation [AO] trials) or missing (establishing operation [EO] trials) from their typical locations. Both participants learned to mand during EO trials and not to mand during AO trials during training. Generalization of manding...

  13. morphforge: a toolbox for simulating small networks of biologically detailed neurons in Python

    Directory of Open Access Journals (Sweden)

    Michael James Hull

    2014-01-01

    Full Text Available The broad structure of a modelling study can often be explained over a cup of coffee, butconverting this high-level conceptual idea into graphs of the final simulation results may requiremany weeks of sitting at a computer. Although models themselves can be complex, oftenmany mental resources are wasted working around complexities of the software ecosystemsuch as fighting to manage files, interfacing between tools and data formats, finding mistakesin code or working out the units of variables. morphforge is a high-level, Python toolboxfor building and managing simulations of small populations of multicompartmental biophysicalmodel neurons. An entire in silico experiment, including the definition of neuronal morphologies,channel descriptions, stimuli, visualisation and analysis of results can be written within a singleshort Python script using high-level objects. Multiple independent simulations can be createdand run from a single script, allowing parameter spaces to be investigated. Consideration hasbeen given to the reuse of both algorithmic and parameterisable components to allow bothspecific and stochastic parameter variations. Some other features of the toolbox include: theautomatic generation of human-readable documentation (e. g. PDF-files about a simulation; thetransparent handling of different biophysical units; a novel mechanism for plotting simulationresults based on a system of tags; and an architecture that supports both the use of establishedformats for defining channels and synapses (e. g. MODL files, and the possibility to supportother libraries and standards easily. We hope that this toolbox will allow scientists to quicklybuild simulations of multicompartmental model neurons for research and serve as a platform forfurther tool development.

  14. Optimizing Python-based ROOT I/O with PyPy's Tracing JIT

    CERN Multimedia

    CERN. Geneva

    2012-01-01

    The Python programming language allows objects and classes to respond dynamically to the execution environment. Most of this, however, is made possible through language hooks which by definition can not be optimized and thus tend to be slow. The PyPy implementation of Python includes a tracing just in time compiler (JIT), which allows similar dynamic responses but at the interpreter-, rather than the application-level. Therefore, it is possible to fully remove the hooks, leaving only the dynamic response, in the optimization stage for hot loops, if the types of interest are opened up to the JIT. A general opening up of types to the JIT, based on reflection information, has already been developed (cppyy). The work described in this paper takes it one step further by customizing access to ROOT I/O to the JIT, allowing for automatic selective reading, judicious caching, and buffer tuning.

  15. Adventures in Python

    CERN Document Server

    Richardson, Craig

    2015-01-01

    The complete beginner's guide to Python, for young people whowant to start today Adventures in Python is designed for 11-to 15-year oldswho want to teach themselves Python programming, but don't knowwhere to start. Even if you have no programming experience at all,this easy to follow format and clear, simple instruction will getyou up and running quickly. The book walks you through nineprojects that teach you the fundamentals of programming in general,and Python in particular, gradually building your skills until youhave the confidence and ability to tackle your own projects. Videoclips accom

  16. Programming biological models in Python using PySB.

    Science.gov (United States)

    Lopez, Carlos F; Muhlich, Jeremy L; Bachman, John A; Sorger, Peter K

    2013-01-01

    Mathematical equations are fundamental to modeling biological networks, but as networks get large and revisions frequent, it becomes difficult to manage equations directly or to combine previously developed models. Multiple simultaneous efforts to create graphical standards, rule-based languages, and integrated software workbenches aim to simplify biological modeling but none fully meets the need for transparent, extensible, and reusable models. In this paper we describe PySB, an approach in which models are not only created using programs, they are programs. PySB draws on programmatic modeling concepts from little b and ProMot, the rule-based languages BioNetGen and Kappa and the growing library of Python numerical tools. Central to PySB is a library of macros encoding familiar biochemical actions such as binding, catalysis, and polymerization, making it possible to use a high-level, action-oriented vocabulary to construct detailed models. As Python programs, PySB models leverage tools and practices from the open-source software community, substantially advancing our ability to distribute and manage the work of testing biochemical hypotheses. We illustrate these ideas using new and previously published models of apoptosis.

  17. Efficient construction of approximate call graphs for JavaScript IDE services

    DEFF Research Database (Denmark)

    Feldthaus, Asger; Schäfer, Max; Sridharan, Manu

    2013-01-01

    The rapid rise of JavaScript as one of the most popular programming languages of the present day has led to a demand for sophisticated IDE support similar to what is available for Java or C#. However, advanced tooling is hampered by the dynamic nature of the language, which makes any form of stat...

  18. Approaching the largest ‘API’: extracting information from the Internet with Python

    Directory of Open Access Journals (Sweden)

    Jonathan E. Germann

    2018-02-01

    Full Text Available This article explores the need for libraries to algorithmically access and manipulate the world’s largest API: the Internet. The billions of pages on the ‘Internet API’ (HTTP, HTML, CSS, XPath, DOM, etc. are easily accessible and manipulable. Libraries can assist in creating meaning through the datafication of information on the world wide web. Because most information is created for human consumption, some programming is required for automated extraction. Python is an easy-to-learn programming language with extensive packages and community support for web page automation. Four packages (Urllib, Selenium, BeautifulSoup, Scrapy in Python can automate almost any web page for all sized projects. An example warrant data project is explained to illustrate how well Python packages can manipulate web pages to create meaning through assembling custom datasets.

  19. Python profiling 101

    CERN Multimedia

    CERN. Geneva

    2014-01-01

    Python code is much easier to write than C, yet much less efficient. It's often assumed that Python is not performance-oriented and therefore making effort to optimize it doesn't pay off. While in many cases it's true, at a certain moment of a development, especially right before reaching production-ready state, it might turn out that a Python code runs slowly and one needs to find a culprit. In this talk I'll not tell how to make your program faster. Instead, I'll show different techniques to look for the bottlenecks in the code. The presentation will be built around a live demo using real-life Python code.

  20. Apprendre à programmer avec Python

    CERN Document Server

    Swinnen, Gérard

    2009-01-01

    Quel meilleur choix pour apprendre la programmation qu'un langage moderne et élégant tel que Python, aussi bon pour le développement d'applications web que pour la réalisation de scripts système ou l'analyse de fichiers textuels ? Un support de cours réputé et adopté par de nombreux enseignants, avec 40 pages d'exercices corrigés Reconnu et utilisé par les enseignants de nombreuses écoles et IUT, complété d'exercices accompagnés de leurs corrigés, cet ouvrage original et érudit est une référence sur tous les fondamentaux de la programmation : choix d'une structure de données, paramétrage, modularité, orientation objet et héritage, conception d'interface, multithreading et gestion d'événements, protocoles de communication et gestion réseau, formulaires web et (GI, bases de données) jusqu'à la désormais indispensable norme Unicode (le format UTF-8).

  1. Learning Python network programming

    CERN Document Server

    Sarker, M O Faruque

    2015-01-01

    If you're a Python developer or a system administrator with Python experience and you're looking to take your first steps in network programming, then this book is for you. Basic knowledge of Python is assumed.

  2. Use of scripts and script-fading procedures and activity schedules to develop spontaneous social interaction in a three-year-old girl with autism

    Directory of Open Access Journals (Sweden)

    Anna Budzińska

    2014-05-01

    Full Text Available Autism entails serious deficiencies in communication and social behaviors. Individuals with autism, even those who have received intensive language intervention, are often viewed as lacking spontaneous language. In addition, some children with autism lack the ability of spontaneously seeking to share enjoyment, interests, or achievements with other people (e.g., a lack of showing, bringing, or pointing out objects of interest to other people. The aim of the study was to use ABA teaching techniques such as script and script fading procedure and activity schedule to teach three-year-old girl with autism spontaneous social interaction and shape joint attention skills. The result shows that ABA techniques were very effective in teaching many verbal skills such as answering questions, making requests, initiating conversation and asking question. Comparison made after implemented teaching procedure shows her initiating of joint attention skill (IJA is at the appropriate level for her age.

  3. Scalable Mobile Ad Hoc Network (MANET) to Enhance Situational Awareness in Distributed Small Unit Operations

    Science.gov (United States)

    2015-06-01

    computing the algorithm is written in Python, a simple terminal programming language. At the top of that script was the integration to ROS and the rest of...etError    (1) where the refresh frequency is represented by Network in units of Hz and the angular speed of the Marine’s sweep rate...starts with: Java , C++, Python, and more. There are literally thousands if not hundreds of thousands, of projects, platforms, sensors, actuators

  4. DAL Algorithms and Python

    CERN Document Server

    Aydemir, Bahar

    2017-01-01

    The Trigger and Data Acquisition (TDAQ) system of the ATLAS detector at the Large Hadron Collider (LHC) at CERN is composed of a large number of distributed hardware and software components. TDAQ system consists of about 3000 computers and more than 25000 applications which, in a coordinated manner, provide the data-taking functionality of the overall system. There is a number of online services required to configure, monitor and control the ATLAS data taking. In particular, the configuration service is used to provide configuration of above components. The configuration of the ATLAS data acquisition system is stored in XML-based object database named OKS. DAL (Data Access Library) allowing to access it's information by C++, Java and Python clients in a distributed environment. Some information has quite complicated structure, so it's extraction requires writing special algorithms. Algorithms available on C++ programming language and partially reimplemented on Java programming language. The goal of the projec...

  5. SPV: a JavaScript Signaling Pathway Visualizer.

    Science.gov (United States)

    Calderone, Alberto; Cesareni, Gianni

    2018-03-24

    The visualization of molecular interactions annotated in web resources is useful to offer to users such information in a clear intuitive layout. These interactions are frequently represented as binary interactions that are laid out in free space where, different entities, cellular compartments and interaction types are hardly distinguishable. SPV (Signaling Pathway Visualizer) is a free open source JavaScript library which offers a series of pre-defined elements, compartments and interaction types meant to facilitate the representation of signaling pathways consisting of causal interactions without neglecting simple protein-protein interaction networks. freely available under Apache version 2 license; Source code: https://github.com/Sinnefa/SPV_Signaling_Pathway_Visualizer_v1.0. Language: JavaScript; Web technology: Scalable Vector Graphics; Libraries: D3.js. sinnefa@gmail.com.

  6. SoS Notebook: An Interactive Multi-Language Data Analysis Environment.

    Science.gov (United States)

    Peng, Bo; Wang, Gao; Ma, Jun; Leong, Man Chong; Wakefield, Chris; Melott, James; Chiu, Yulun; Du, Di; Weinstein, John N

    2018-05-22

    Complex bioinformatic data analysis workflows involving multiple scripts in different languages can be difficult to consolidate, share, and reproduce. An environment that streamlines the entire processes of data collection, analysis, visualization and reporting of such multi-language analyses is currently lacking. We developed Script of Scripts (SoS) Notebook, a web-based notebook environment that allows the use of multiple scripting language in a single notebook, with data flowing freely within and across languages. SoS Notebook enables researchers to perform sophisticated bioinformatic analysis using the most suitable tools for different parts of the workflow, without the limitations of a particular language or complications of cross-language communications. SoS Notebook is hosted at http://vatlab.github.io/SoS/ and is distributed under a BSD license. bpeng@mdanderson.org.

  7. Evidence for cross-script abstract identities in learners of Japanese kana.

    Science.gov (United States)

    Schubert, Teresa; Gawthrop, Roderick; Kinoshita, Sachiko

    2018-05-07

    The presence of abstract letter identity representations in the Roman alphabet has been well documented. These representations are invariant to letter case (upper vs. lower) and visual appearance. For example, "a" and "A" are represented by the same abstract identity. Recent research has begun to consider whether the processing of non-Roman orthographies also involves abstract orthographic representations. In the present study, we sought evidence for abstract identities in Japanese kana, which consist of two scripts, hiragana and katakana. Abstract identities would be invariant to the script used as well as to the degree of visual similarity. We adapted the cross-case masked-priming letter match task used in previous research on Roman letters, by presenting cross-script kana pairs and testing adult beginning -to- intermediate Japanese second-language (L2) learners (first-language English readers). We found robust cross-script priming effects, which were equal in magnitude for visually similar (e.g., り/リ) and dissimilar (e.g., あ/ア) kana pairs. This pattern was found despite participants' imperfect explicit knowledge of the kana names, particularly for katakana. We also replicated prior findings from Roman abstract letter identities in the same participants. Ours is the first study reporting abstract kana identity priming (in adult L2 learners). Furthermore, these representations were acquired relatively early in our adult L2 learners.

  8. Development of a script for converting DICOM files to .TXT; Desenvolvimento de um script para conversao de arquivos DICOM para .TXT

    Energy Technology Data Exchange (ETDEWEB)

    Abrantes, Marcos E.S.; Oliveira, A.H. de, E-mail: marcosabrantes2003@yahoo.com.br [Universidade Federal de Minas Gerais (UFMG), Belo Horizonte, MG (Brazil). Departamento de Engenharia Nuclear; Abrantes, R.C., E-mail: abrantes.rafa1@gmail.com [Universidade Federal de Minas Gerais (UFMG), Belo Horizonte, MG (Brazil). Departamento de Engenharia Eletrica; Magalhaes, M.J., E-mail: mjuliano100@yahoo.com.br [Ambienttal Protecao Radiologica, Belo Horizonte, MG (Brazil)

    2014-07-01

    Background: with the increased use of computer simulation techniques for diagnosis or therapy in patients, the MCNP and SCMS software is being widely used. For use as SCMS data entry interface for the MCNP is necessary to perform transformation of DICOM images to text files. Objective: to produce a semi automatic script conversion DICOM images generated by Computerized Tomography or Magnetic Resonance, for .txt in the IMAGEJ software. Methodology: this study was developed in the IMAGEJ software platform with an Intel Core 2 Duo computer, CPU of 2.00GHz, with 2:00 GB of RAM for 32-bit system. Development of the script was held in a text editor using JAVA language. For script insertion in IMAGEJ the plug in tool of this software was used. After this, a window is open asking for the path of the files that will be read, first and last name of DICOM file to be converted, along with where the new files will be stored. Results: for the manual processing of DICOM conversion to .txt of cerebral computed tomography with 600 images requires a time of about 8 hours. The use of script allows conversion time reduction for 12 minutes. Conclusion: the script used demonstrates DICOM conversion ability to .txt and a significant improvement in time savings in processing.

  9. Developers@CERN Forums: Python

    CERN Multimedia

    CERN. Geneva

    2016-01-01

    The Developers@CERN Forums second edition took place at the end of May on the topic of Python. How do developers at CERN interact with Python? Which cutting-edge projects are using Python? What were the highlights of this most recent forum?

  10. JavaScript bible

    CERN Document Server

    Goodman, Danny; Novitski, Paul; Rayl, Tia Gustaffl

    2009-01-01

    The bestselling JavaScript reference, now updated to reflect changes in technology and best practices. As the most comprehensive book on the market, the JavaScript Bible is a classic bestseller that keeps you up to date on the latest changes in JavaScript, the leading technology for incorporating interactivity into Web pages. Part tutorial, part reference, this book serves as both a learning tool for building new JavaScript skills as well as a detailed reference for the more experienced JavaScript user. You'll get up-to-date coverage on the latest JavaScript practices that have been implemente

  11. The zoonotic implications of pentastomiasis in the royal python (python regius).

    Science.gov (United States)

    Ayinmode, Ab; Adedokun, Ao; Aina, A; Taiwo, V

    2010-09-01

    Pentastomes are worm-like endoparasites of the phylum Pentastomida found principally in the respiratory tract of reptiles, birds, and mammals. They cause a zoonotic disease known as pentastomiasis in humans and other mammals. The autopsy of a Nigerian royal python (Python regius) revealed two yellowish-white parasites in the lungs, tissue necrosis and inflammatory lesions. The parasite was confirmed to be Armillifer spp (Pentastomid); this is the first recorded case of pentastomiasis in the royal python (Python regius) in Nigeria. This report may be an alert of the possibility of on-going zoonotic transmission of pentastomiasis from snake to man, especially in the sub-urban/rural areas of Nigeria and other West African countries where people consume snake meat.

  12. PyXNAT: XNAT in Python

    OpenAIRE

    Yannick eSchwartz; Alexis eBarbot; Benjamin eThyreau; Vincent eFrouin; Gael eVaroquaux; Gael eVaroquaux; Aditya eSiram; Daniel eMarcus; Jean-Baptiste ePoline

    2012-01-01

    As neuroimaging databases grow in size and complexity, the time researchers spend investigating and managing the data increases to the expense of data analysis. As a result, investigators rely more and more heavily on scripting using high-level languages to automate data management and processing tasks. For this, a structured and programatic access to the data store is necessary. Web services are a first step toward this goal. They however lack in functionality and ease of use because they pr...

  13. Gala: A Python package for galactic dynamics

    Science.gov (United States)

    Price-Whelan, Adrian M.

    2017-10-01

    Gala is an Astropy-affiliated Python package for galactic dynamics. Python enables wrapping low-level languages (e.g., C) for speed without losing flexibility or ease-of-use in the user-interface. The API for Gala was designed to provide a class-based and user-friendly interface to fast (C or Cython-optimized) implementations of common operations such as gravitational potential and force evaluation, orbit integration, dynamical transformations, and chaos indicators for nonlinear dynamics. Gala also relies heavily on and interfaces well with the implementations of physical units and astronomical coordinate systems in the Astropy package (astropy.units and astropy.coordinates). Gala was designed to be used by both astronomical researchers and by students in courses on gravitational dynamics or astronomy. It has already been used in a number of scientific publications and has also been used in graduate courses on Galactic dynamics to, e.g., provide interactive visualizations of textbook material.

  14. ‘ShruthLaikh’: Employing Python to Develop Vocabulary Enhancing Application

    Directory of Open Access Journals (Sweden)

    2010-09-01

    Full Text Available This paper presents how the power of Python, its various modules and Artificial Intelligence techniques can be integrated into a very useful and effective English spelling-correcting and vocabulary-enhancing application. The objective is to use the Python interface for various functionalities like text to speech, graphical user interface and sqlite3 database to integrate them into a single useful tool. The application is named as “ShruthLaikh”, which is a Hindi word for dictations. It has been demonstrated how this simple yet intelligent tool can help users to absorb word spellings in a very effective manner at the same time enhancing their retaining power. It also proves how Python as a programming language can be utilized effectively for the creation of powerful and user-friendly applications that can assist in more ways than one in revolutionizing the educational scene in nations across the world and the role that Python can play in imparting education in an innovative way.

  15. Mastering Ext JS

    CERN Document Server

    Groner, Loiane

    2015-01-01

    If you are a developer who is familiar with Ext JS and want to augment your skills to create even better web applications, this is the book for you. Basic knowledge of JavaScript/HTML/CSS and any server-side language (PHP, Java, C#, Ruby, or Python) is required.

  16. Brian: a simulator for spiking neural networks in Python

    Directory of Open Access Journals (Sweden)

    Dan F M Goodman

    2008-11-01

    Full Text Available Brian is a new simulator for spiking neural networks, written in Python (http://brian.di.ens.fr. It is an intuitive and highly flexible tool for rapidly developing new models, especially networks of single-compartment neurons. In addition to using standard types of neuron models, users can define models by writing arbitrary differential equations in ordinary mathematical notation. Python scientific libraries can also be used for defining models and analysing data. Vectorisation techniques allow efficient simulations despite the overheads of an interpreted language. Brian will be especially valuable for working on non-standard neuron models not easily covered by existing software, and as an alternative to using Matlab or C for simulations. With its easy and intuitive syntax, Brian is also very well suited for teaching computational neuroscience.

  17. Brian: a simulator for spiking neural networks in python.

    Science.gov (United States)

    Goodman, Dan; Brette, Romain

    2008-01-01

    "Brian" is a new simulator for spiking neural networks, written in Python (http://brian. di.ens.fr). It is an intuitive and highly flexible tool for rapidly developing new models, especially networks of single-compartment neurons. In addition to using standard types of neuron models, users can define models by writing arbitrary differential equations in ordinary mathematical notation. Python scientific libraries can also be used for defining models and analysing data. Vectorisation techniques allow efficient simulations despite the overheads of an interpreted language. Brian will be especially valuable for working on non-standard neuron models not easily covered by existing software, and as an alternative to using Matlab or C for simulations. With its easy and intuitive syntax, Brian is also very well suited for teaching computational neuroscience.

  18. REDItools: high-throughput RNA editing detection made easy.

    Science.gov (United States)

    Picardi, Ernesto; Pesole, Graziano

    2013-07-15

    The reliable detection of RNA editing sites from massive sequencing data remains challenging and, although several methodologies have been proposed, no computational tools have been released to date. Here, we introduce REDItools a suite of python scripts to perform high-throughput investigation of RNA editing using next-generation sequencing data. REDItools are in python programming language and freely available at http://code.google.com/p/reditools/. ernesto.picardi@uniba.it or graziano.pesole@uniba.it Supplementary data are available at Bioinformatics online.

  19. Learning Python testing

    CERN Document Server

    Arbuckle, Daniel

    2014-01-01

    This book is ideal if you want to learn about the testing disciplines and automated testing tools from a hands-on, conversational guide. You should already know Python and be comfortable with Python 3.

  20. Semi-Automatic Rename Refactoring for JavaScript

    DEFF Research Database (Denmark)

    Feldthaus, Asger; Møller, Anders

    2013-01-01

    and interaction with the programmer. With this pragmatic approach, we can provide scalable and effective refactoring support for real-world code, including libraries and incomplete applications. Through a series of experiments that estimate how much manual effort our technique demands from the programmer, we show......Modern IDEs support automated refactoring for many programming languages, but support for JavaScript is still primitive. To perform renaming, which is one of the fundamental refactorings, there is often no practical alternative to simple syntactic search-and-replace. Although more sophisticated...... alternatives have been developed, they are limited by whole-program assumptions and poor scalability. We propose a technique for semi-automatic refactoring for JavaScript, with a focus on renaming. Unlike traditional refactoring algorithms, semi-automatic refactoring works by a combination of static analysis...

  1. NEURON and Python.

    Science.gov (United States)

    Hines, Michael L; Davison, Andrew P; Muller, Eilif

    2009-01-01

    The NEURON simulation program now allows Python to be used, alone or in combination with NEURON's traditional Hoc interpreter. Adding Python to NEURON has the immediate benefit of making available a very extensive suite of analysis tools written for engineering and science. It also catalyzes NEURON software development by offering users a modern programming tool that is recognized for its flexibility and power to create and maintain complex programs. At the same time, nothing is lost because all existing models written in Hoc, including graphical user interface tools, continue to work without change and are also available within the Python context. An example of the benefits of Python availability is the use of the xml module in implementing NEURON's Import3D and CellBuild tools to read MorphML and NeuroML model specifications.

  2. Building and documenting workflows with python-based snakemake

    OpenAIRE

    Köster, Johannes; Rahmann, Sven

    2012-01-01

    textabstractSnakemake is a novel workflow engine with a simple Python-derived workflow definition language and an optimizing execution environment. It is the first system that supports multiple named wildcards (or variables) in input and output filenames of each rule definition. It also allows to write human-readable workflows that document themselves. We have found Snakemake especially useful for building high-throughput sequencing data analysis pipelines and present examples from this area....

  3. Proposal of a Python interface to OpenMI, as the base for open source hydrological framework

    Directory of Open Access Journals (Sweden)

    Robert Szczepanek

    2012-03-01

    Full Text Available Hydrologists need simple, yet powerful, open source framework for developing and testing mathematical models. Such framework should ensure long-term interoperability and high scalability. This can be done by implementation of the existing, already tested standards. At the moment two interesting options exist: Open Modelling Interface (OpenMI and Object Modeling System (OMS. OpenMI was developed within the Fifth European Framework Programme for integrated watershed management, described in the Water Framework Directive. OpenMI interfaces are available for the C# and Java programming languages. OpenMI Association is now in the process of agreement with Open Geospatial Consortium (OGC, so the spatial standards existing in OpenMI 2.0 should be better implemented in the future. The OMS project is pure Java, object-oriented modeling framework coordinated by the U.S. Department of Agriculture. Big advantage of OMS compared to OpenMI is its simplicity of implementation. On the other hand, OpenMI seems to be more powerful and better suited for hydrological models. Finally, OpenMI model was selected as the base interface for the proposed open source hydrological framework.  The existing hydrological libraries and models focus usually on just one GIS package (HydroFOSS – GRASS or one operating system (HydroDesktop – Microsoft Windows. The new hydrological framework should break those limitations. To make hydrological models’ implementation as easy as possible, the framework should be based on a simple, high-level computer language. Low and mid-level languages, like Java (SEXTANTE or C (GRASS, SAGA were excluded, as too complicated for regular hydrologist. From popular, high-level languages, Python seems to be a good choice. Leading GIS desktop applications – GRASS and QGIS – use Python as second native language, providing well documented API. This way, a Python-based hydrological library could be easily integrated with any GIS package supporting

  4. Functional Python programming

    CERN Document Server

    Lott, Steven

    2015-01-01

    This book is for developers who want to use Python to write programs that lean heavily on functional programming design patterns. You should be comfortable with Python programming, but no knowledge of functional programming paradigms is needed.

  5. Python data visualization cookbook

    CERN Document Server

    Milovanovic, Igor

    2013-01-01

    This book is written in a Cookbook style targeted towards an advanced audience. It covers the advanced topics of data visualization in Python.Python Data Visualization Cookbook is for developers that already know about Python programming in general. If you have heard about data visualization but you don't know where to start, then this book will guide you from the start and help you understand data, data formats, data visualization, and how to use Python to visualize data.You will need to know some general programming concepts, and any kind of programming experience will be helpful, but the co

  6. A field test of attractant traps for invasive Burmese pythons (Python molurus bivittatus) in southern Florida

    Science.gov (United States)

    Reed, Robert N.; Hart, Kristen M.; Rodda, Gordon H.; Mazzotti, Frank J.; Snow, Ray W.; Cherkiss, Michael; Rozar, Rondald; Goetz, Scott

    2011-01-01

    Context: Invasive Burmese pythons (Python molurus bivittatus) are established over thousands of square kilometres of southern Florida, USA, and consume a wide range of native vertebrates. Few tools are available to control the python population, and none of the available tools have been validated in the field to assess capture success as a proportion of pythons available to be captured. Aims: Our primary aim was to conduct a trap trial for capturing invasive pythons in an area east of Everglades National Park, where many pythons had been captured in previous years, to assess the efficacy of traps for population control. We also aimed to compare results of visual surveys with trap capture rates, to determine capture rates of non-target species, and to assess capture rates as a proportion of resident pythons in the study area. Methods: We conducted a medium-scale (6053 trap nights) experiment using two types of attractant traps baited with live rats in the Frog Pond area east of Everglades National Park. We also conducted standardised and opportunistic visual surveys in the trapping area. Following the trap trial, the area was disc harrowed to expose pythons and allow calculation of an index of the number of resident pythons. Key results: We captured three pythons and 69 individuals of various rodent, amphibian, and reptile species in traps. Eleven pythons were discovered during disc harrowing operations, as were large numbers of rodents.

  7. BioServices: a common Python package to access biological Web Services programmatically.

    Science.gov (United States)

    Cokelaer, Thomas; Pultz, Dennis; Harder, Lea M; Serra-Musach, Jordi; Saez-Rodriguez, Julio

    2013-12-15

    Web interfaces provide access to numerous biological databases. Many can be accessed to in a programmatic way thanks to Web Services. Building applications that combine several of them would benefit from a single framework. BioServices is a comprehensive Python framework that provides programmatic access to major bioinformatics Web Services (e.g. KEGG, UniProt, BioModels, ChEMBLdb). Wrapping additional Web Services based either on Representational State Transfer or Simple Object Access Protocol/Web Services Description Language technologies is eased by the usage of object-oriented programming. BioServices releases and documentation are available at http://pypi.python.org/pypi/bioservices under a GPL-v3 license.

  8. Flow-sensitive type recovery in linear-log time

    DEFF Research Database (Denmark)

    Adams, Michael D.; Keep, Andrew W.; Midtgaard, Jan

    2011-01-01

    The flexibility of dynamically typed languages such as JavaScript, Python, Ruby, and Scheme comes at the cost of run-time type checks. Some of these checks can be eliminated via control-flow analysis. However, traditional control-flow analysis (CFA) is not ideal for this task as it ignores flow...

  9. Leveraging Python to improve ebook metadata selection, ingest, and management

    Directory of Open Access Journals (Sweden)

    Kelly Thompson

    2017-10-01

    Full Text Available Libraries face many challenges in managing descriptive metadata for ebooks, including quality control, completeness of coverage, and ongoing management. The recent emergence of library management systems that automatically provide descriptive metadata for e-resources activated in system knowledge bases means that ebook management models are moving toward both greater efficiency and more complex implementation and maintenance choices. Automated and data-driven processes for ebook management have always been desirable, but in the current environment, they become necessary. In addition to initial selection of a record source, automation can be applied to quality control processes and ongoing maintenance in order to keep manual, eyes-on work to a minimum while providing the best possible discovery and access. In this article, we describe how we are using Python scripts to address these challenges.

  10. Optimizing python-based ROOT I/O with PyPy's tracing just-in-time compiler

    Science.gov (United States)

    Tlp Lavrijsen, Wim

    2012-12-01

    The Python programming language allows objects and classes to respond dynamically to the execution environment. Most of this, however, is made possible through language hooks which by definition can not be optimized and thus tend to be slow. The PyPy implementation of Python includes a tracing just in time compiler (JIT), which allows similar dynamic responses but at the interpreter-, rather than the application-level. Therefore, it is possible to fully remove the hooks, leaving only the dynamic response, in the optimization stage for hot loops, if the types of interest are opened up to the JIT. A general opening up of types to the JIT, based on reflection information, has already been developed (cppyy). The work described in this paper takes it one step further by customizing access to ROOT I/O to the JIT, allowing for fully automatic optimizations.

  11. Optimizing python-based ROOT I/O with PyPy's tracing just-in-time compiler

    International Nuclear Information System (INIS)

    Lavrijsen, Wim TLP

    2012-01-01

    The Python programming language allows objects and classes to respond dynamically to the execution environment. Most of this, however, is made possible through language hooks which by definition can not be optimized and thus tend to be slow. The PyPy implementation of Python includes a tracing just in time compiler (JIT), which allows similar dynamic responses but at the interpreter-, rather than the application-level. Therefore, it is possible to fully remove the hooks, leaving only the dynamic response, in the optimization stage for hot loops, if the types of interest are opened up to the JIT. A general opening up of types to the JIT, based on reflection information, has already been developed (cppyy). The work described in this paper takes it one step further by customizing access to ROOT I/O to the JIT, allowing for fully automatic optimizations.

  12. SCRIPTED INSTRUCTION IN EFL CLASSES: AN OPPORTUNITY OR A DRAWBACK?

    Directory of Open Access Journals (Sweden)

    Annur Rofiq

    2017-04-01

    Full Text Available Scripted Instruction (SI can be simply defined as an instructional activity which is based on a prepared script. It has been evident in the USA since the last decades in response to students‘ low achievement especially on reading or literacy and numeracy. Pros and cons for SI have been around disputing its significance on teachers‘ professional development and students‘ learning achievement. Studies came up with contradictory findings. On one side, students and teachers are found to get benefits from SI. On the other side, SI is believed to inhibit teachers‘ talent, abilities, and development of professional expertise, as the script tightly controls what the teachers should say and do during the instruction. This paper discusses the feasibility of SI in English language teaching. Experiences at the Teacher Professional Education and Training (PLPG program at Universitas Jember, Indonesia reveal that most English teachers are still weak at both pedagogical and professional competence. As a stepping stone, conversation gambits can be used to develop scripts. Teachers - senior teachers and teachers - teacher educators collaboration is required for script development. SI is assumed to make both English teachers and students ―save and sounds‖ during the teaching and learning activities and get meaningful experiences from the activities.

  13. Python requests essentials

    CERN Document Server

    Chandra, Rakesh Vidya

    2015-01-01

    If you are a Python administrator or developer interested in interacting with web APIs and have a passion for creating your own web applications, this is the book for you. Basic knowledge of Python programming, APIs, and web services will be an advantage.

  14. Dem Generation from Close-Range Photogrammetry Using Extended Python Photogrammetry Toolbox

    Science.gov (United States)

    Belmonte, A. A.; Biong, M. M. P.; Macatulad, E. G.

    2017-10-01

    Digital elevation models (DEMs) are widely used raster data for different applications concerning terrain, such as for flood modelling, viewshed analysis, mining, land development, engineering design projects, to name a few. DEMs can be obtained through various methods, including topographic survey, LiDAR or photogrammetry, and internet sources. Terrestrial close-range photogrammetry is one of the alternative methods to produce DEMs through the processing of images using photogrammetry software. There are already powerful photogrammetry software that are commercially-available and can produce high-accuracy DEMs. However, this entails corresponding cost. Although, some of these software have free or demo trials, these trials have limits in their usable features and usage time. One alternative is the use of free and open-source software (FOSS), such as the Python Photogrammetry Toolbox (PPT), which provides an interface for performing photogrammetric processes implemented through python script. For relatively small areas such as in mining or construction excavation, a relatively inexpensive, fast and accurate method would be advantageous. In this study, PPT was used to generate 3D point cloud data from images of an open pit excavation. The PPT was extended to add an algorithm converting the generated point cloud data into a usable DEM.

  15. Python geospatial development essentials

    CERN Document Server

    Bahgat, Karim

    2015-01-01

    This book is ideal for Python programmers who are tasked with or wish to make a special-purpose GIS application. Analysts, political scientists, geographers, and GIS specialists seeking a creative platform to experiment with cutting-edge spatial analysis, but who are still only beginners in Python, will also find this book beneficial. Familiarity with Tkinter application development in Python is preferable but not mandatory.

  16. Practical static analysis of JavaScript applications in the presence of frameworks and libraries

    DEFF Research Database (Denmark)

    Madsen, Magnus; Livshits, Benjamin; Fanning, Michael

    2013-01-01

    and complex libraries and frameworks, often written in a combination of JavaScript and native code such as C and C++. Stubs have been commonly employed as a partial specification mechanism to address the library problem; however, they are tedious to write, incomplete, and occasionally incorrect. However......JavaScript is a language that is widely-used for both web- based and standalone applications such as those in the upcoming Windows 8 operating system. Analysis of JavaScript has long been known to be challenging due to its dynamic nature. On top of that, most JavaScript applications rely on large......, the manner in which library code is used within applications often sheds light on what library APIs return or consume as parameters. In this paper, we propose a technique which combines pointer analysis with use analysis to handle many challenges posed by large JavaScript libraries. Our approach enables...

  17. A method for generating stochastic 3D tree models with Python in Autodesk Maya

    Directory of Open Access Journals (Sweden)

    Nemanja Stojanović

    2016-12-01

    Full Text Available This paper introduces a method for generating 3D tree models using stochastic L-systems with stochastic parameters and Perlin noise. L-system is the most popular method for plant modeling and Perlin noise is extensively used for generating high detailed textures. Our approach is probabilistic. L-systems with a random choice of parameters can represent observed objects quite well and they are used for modeling and generating realistic plants. Textures and normal maps are generated with combinations of Perlin noises what make these trees completely unique. Script for generating these trees, textures and normal maps is written with Python/PyMEL/NumPy in Autodesk Maya.

  18. Python geospatial development

    CERN Document Server

    Westra, Erik

    2013-01-01

    This is a tutorial style book that will teach usage of Python tools for GIS using simple practical examples and then show you how to build a complete mapping application from scratch. The book assumes basic knowledge of Python. No knowledge of Open Source GIS is required.Experienced Python developers who want to learn about geospatial concepts, work with geospatial data, solve spatial problems, and build mapbased applications.This book will be useful those who want to get up to speed with Open Source GIS in order to build GIS applications or integrate GeoSpatial features into their existing ap

  19. scikit-image: image processing in Python.

    Science.gov (United States)

    van der Walt, Stéfan; Schönberger, Johannes L; Nunez-Iglesias, Juan; Boulogne, François; Warner, Joshua D; Yager, Neil; Gouillart, Emmanuelle; Yu, Tony

    2014-01-01

    scikit-image is an image processing library that implements algorithms and utilities for use in research, education and industry applications. It is released under the liberal Modified BSD open source license, provides a well-documented API in the Python programming language, and is developed by an active, international team of collaborators. In this paper we highlight the advantages of open source to achieve the goals of the scikit-image library, and we showcase several real-world image processing applications that use scikit-image. More information can be found on the project homepage, http://scikit-image.org.

  20. scikit-image: image processing in Python

    Directory of Open Access Journals (Sweden)

    Stéfan van der Walt

    2014-06-01

    Full Text Available scikit-image is an image processing library that implements algorithms and utilities for use in research, education and industry applications. It is released under the liberal Modified BSD open source license, provides a well-documented API in the Python programming language, and is developed by an active, international team of collaborators. In this paper we highlight the advantages of open source to achieve the goals of the scikit-image library, and we showcase several real-world image processing applications that use scikit-image. More information can be found on the project homepage, http://scikit-image.org.

  1. Interactive Light Stimulus Generation with High Performance Real-Time Image Processing and Simple Scripting

    Directory of Open Access Journals (Sweden)

    László Szécsi

    2017-12-01

    Full Text Available Light stimulation with precise and complex spatial and temporal modulation is demanded by a series of research fields like visual neuroscience, optogenetics, ophthalmology, and visual psychophysics. We developed a user-friendly and flexible stimulus generating framework (GEARS GPU-based Eye And Retina Stimulation Software, which offers access to GPU computing power, and allows interactive modification of stimulus parameters during experiments. Furthermore, it has built-in support for driving external equipment, as well as for synchronization tasks, via USB ports. The use of GEARS does not require elaborate programming skills. The necessary scripting is visually aided by an intuitive interface, while the details of the underlying software and hardware components remain hidden. Internally, the software is a C++/Python hybrid using OpenGL graphics. Computations are performed on the GPU, and are defined in the GLSL shading language. However, all GPU settings, including the GPU shader programs, are automatically generated by GEARS. This is configured through a method encountered in game programming, which allows high flexibility: stimuli are straightforwardly composed using a broad library of basic components. Stimulus rendering is implemented solely in C++, therefore intermediary libraries for interfacing could be omitted. This enables the program to perform computationally demanding tasks like en-masse random number generation or real-time image processing by local and global operations.

  2. Interactive Light Stimulus Generation with High Performance Real-Time Image Processing and Simple Scripting.

    Science.gov (United States)

    Szécsi, László; Kacsó, Ágota; Zeck, Günther; Hantz, Péter

    2017-01-01

    Light stimulation with precise and complex spatial and temporal modulation is demanded by a series of research fields like visual neuroscience, optogenetics, ophthalmology, and visual psychophysics. We developed a user-friendly and flexible stimulus generating framework (GEARS GPU-based Eye And Retina Stimulation Software), which offers access to GPU computing power, and allows interactive modification of stimulus parameters during experiments. Furthermore, it has built-in support for driving external equipment, as well as for synchronization tasks, via USB ports. The use of GEARS does not require elaborate programming skills. The necessary scripting is visually aided by an intuitive interface, while the details of the underlying software and hardware components remain hidden. Internally, the software is a C++/Python hybrid using OpenGL graphics. Computations are performed on the GPU, and are defined in the GLSL shading language. However, all GPU settings, including the GPU shader programs, are automatically generated by GEARS. This is configured through a method encountered in game programming, which allows high flexibility: stimuli are straightforwardly composed using a broad library of basic components. Stimulus rendering is implemented solely in C++, therefore intermediary libraries for interfacing could be omitted. This enables the program to perform computationally demanding tasks like en-masse random number generation or real-time image processing by local and global operations.

  3. Practical Maya programming with Python

    CERN Document Server

    Galanakis, Robert

    2014-01-01

    ""Practical Maya Programming with Python"" is a practical tutorial packed with plenty of examples and sample projects which guides you through building reusable, independent modules and handling unexpected errors. If you are a developer looking to build a powerful system using Python and Maya's capabilities, then this book is for you. Practical Maya Programming with Python is perfect for intermediate users with basic experience in Python and Maya who want to better their knowledge and skills.

  4. Enhanced OpenModelica Python Interface

    OpenAIRE

    Bajracharya, Sudeep

    2016-01-01

    OMPython is a Python library for OpenModelica, which provides a Python interface to OpenModelica. This thesis significantly improves OMPython by an enhanced, more powerful and easier to use API. It presents how a user can use the Python interface to simulate and access Modelica models using Python objects. The enhanced OMPython includes the list of functions that have been implemented such as getXXXNames(), getXXXValues(), setXXXValues(), getXXXOptions(), setXXXOptions(), and simulate(), etc....

  5. Python penetration testing essentials

    CERN Document Server

    Mohit

    2015-01-01

    If you are a Python programmer or a security researcher who has basic knowledge of Python programming and want to learn about penetration testing with the help of Python, this book is ideal for you. Even if you are new to the field of ethical hacking, this book can help you find the vulnerabilities in your system so that you are ready to tackle any kind of attack or intrusion.

  6. Anaphe - OO libraries and tools for data analysis

    International Nuclear Information System (INIS)

    Couet, O.; Ferrero-Merlino, B.; Molnar, Z.; Moscicki, J.T.; Pfeiffer, A.; Sang, M.

    2001-01-01

    The Anaphe project is an ongoing effort to provide an Object Oriented software environment for data analysis in HENP experiments. A range of commercial and public domain libraries is used to cover basic functionalities; on top of these libraries a set of HENP-specific C++ class libraries for histogram management, fitting, plotting and ntuple-like data analysis has been developed. In order to comply with the user requirements for a command-line driven tool, the authors have chosen to use a scripting language (Python) as the front-end for a data analysis tool. The loose coupling provided by the consequent use of (AIDA compliant) Abstract Interfaces for each component in combination with the use of shared libraries for their implementation provides an easy integration of existing libraries into modern scripting languages thus allowing for rapid application development. This integration is simplified even further using a specialised toolkit (SWIG) to create 'shadow classes' for the Python language, which map the definitions of the Abstract Interfaces almost at a one-to-one level. The authors will give an overview of the architecture and design choices and will present the current status and future developments of the project

  7. A Python-based interface to examine motions in time series of solar images

    Science.gov (United States)

    Campos-Rozo, J. I.; Vargas Domínguez, S.

    2017-10-01

    Python is considered to be a mature programming language, besides of being widely accepted as an engaging option for scientific analysis in multiple areas, as will be presented in this work for the particular case of solar physics research. SunPy is an open-source library based on Python that has been recently developed to furnish software tools to solar data analysis and visualization. In this work we present a graphical user interface (GUI) based on Python and Qt to effectively compute proper motions for the analysis of time series of solar data. This user-friendly computing interface, that is intended to be incorporated to the Sunpy library, uses a local correlation tracking technique and some extra tools that allows the selection of different parameters to calculate, vizualize and analyze vector velocity fields of solar data, i.e. time series of solar filtergrams and magnetograms.

  8. Cross-language activation in same-script and different-script trilinguals

    NARCIS (Netherlands)

    Poarch, G.J.; Hell, J.G. van

    2014-01-01

    In a picture naming study, we examined cross-language activation during speech production in three groups of trilinguals: L3-immersed German-English-Dutch, non-L3-immersed Dutch-English-German, and L3-immersed Russian-English-German trilinguals. All trilinguals named pictures with cognate and

  9. Simple proteomics data analysis in the object-oriented PowerShell.

    Science.gov (United States)

    Mohammed, Yassene; Palmblad, Magnus

    2013-01-01

    Scripting languages such as Perl and Python are appreciated for solving simple, everyday tasks in bioinformatics. A more recent, object-oriented command shell and scripting language, Windows PowerShell, has many attractive features: an object-oriented interactive command line, fluent navigation and manipulation of XML files, ability to consume Web services from the command line, consistent syntax and grammar, rich regular expressions, and advanced output formatting. The key difference between classical command shells and scripting languages, such as bash, and object-oriented ones, such as PowerShell, is that in the latter the result of a command is a structured object with inherited properties and methods rather than a simple stream of characters. Conveniently, PowerShell is included in all new releases of Microsoft Windows and therefore already installed on most computers in classrooms and teaching labs. In this chapter we demonstrate how PowerShell in particular allows easy interaction with mass spectrometry data in XML formats, connection to Web services for tools such as BLAST, and presentation of results as formatted text or graphics. These features make PowerShell much more than "yet another scripting language."

  10. Mitigating Spreadsheet Model Risk with Python Open Source Infrastructure

    OpenAIRE

    Beavers, Oliver

    2018-01-01

    Across an aggregation of EuSpRIG presentation papers, two maxims hold true: spreadsheets models are akin to software, yet spreadsheet developers are not software engineers. As such, the lack of traditional software engineering tools and protocols invites a higher rate of error in the end result. This paper lays ground work for spreadsheet modelling professionals to develop reproducible audit tools using freely available, open source packages built with the Python programming language, enablin...

  11. VPython: Python plus Animations in Stereo 3D

    Science.gov (United States)

    Sherwood, Bruce

    2004-03-01

    Python is a modern object-oriented programming language. VPython (http://vpython.org) is a combination of Python (http://python.org), the Numeric module from LLNL (http://www.pfdubois.com/numpy), and the Visual module created by David Scherer, all of which have been under continuous development as open source projects. VPython makes it easy to write programs that generate real-time, navigable 3D animations. The Visual module includes a set of 3D objects (sphere, cylinder, arrow, etc.), tools for creating other shapes, and support for vector algebra. The 3D renderer runs in a parallel thread, and animations are produced as a side effect of computations, freeing the programmer to concentrate on the physics. Applications include educational and research visualization. In the Fall of 2003 Hugh Fisher at the Australian National University, John Zelle at Wartburg College, and I contributed to a new stereo capability of VPython. By adding a single statement to an existing VPython program, animations can be viewed in true stereo 3D. One can choose several modes: active shutter glasses, passive polarized glasses, or colored glasses (e.g. red-cyan). The talk will demonstrate the new stereo capability and discuss the pros and cons of various schemes for display of stereo 3D for a large audience. Supported in part by NSF grant DUE-0237132.

  12. Optlang: An algebraic modeling language for mathematical optimization

    DEFF Research Database (Denmark)

    Jensen, Kristian; Cardoso, Joao; Sonnenschein, Nikolaus

    2016-01-01

    Optlang is a Python package implementing a modeling language for solving mathematical optimization problems, i.e., maximizing or minimizing an objective function over a set of variables subject to a number of constraints. It provides a common native Python interface to a series of optimization...

  13. Smashing Nodejs JavaScript Everywhere

    CERN Document Server

    Rauch, Guillermo

    2012-01-01

    Learn to make more efficient apps, with just one language! Smashing Node.js: JavaScript Everywhere equips you with the necessary tools to understand Node.js and its uses in developing efficient web apps. With more traditional web servers becoming obsolete, having knowledge on servers that achieve high scalability and optimal resource consumption using Node.js is the key to your app development success. Teaching you the essentials to making event-driven server-side apps, this book demonstrates how you can use less space and take less time for communication between web client and server.Contains

  14. Learning Python design patterns

    CERN Document Server

    Zlobin, Gennadiy

    2013-01-01

    This book takes a tutorial-based and user-friendly approach to covering Python design patterns. Its concise presentation means that in a short space of time, you will get a good introduction to various design patterns.If you are an intermediate level Python user, this book is for you. Prior knowledge of Python programming is essential. Some knowledge of UML is also required to understand the UML diagrams which are used to describe some design patterns.

  15. Mastering object-oriented Python

    CERN Document Server

    Lott, Steven F

    2014-01-01

    This book follows a standard tutorial approach with approximately 750 code samples spread through the 19 chapters. This amounts to over 5,900 lines of code that illustrate each concept.This book is aimed at programmers who have already learned the basics of object-oriented Python and need to write more sophisticated, flexible code that integrates seamlessly with the rest of Python. This book assumes a computer science background, with experience of common Python design patterns.

  16. Development of a script for converting DICOM files to .TXT

    International Nuclear Information System (INIS)

    Abrantes, Marcos E.S.; Oliveira, A.H. de

    2014-01-01

    Background: with the increased use of computer simulation techniques for diagnosis or therapy in patients, the MCNP and SCMS software is being widely used. For use as SCMS data entry interface for the MCNP is necessary to perform transformation of DICOM images to text files. Objective: to produce a semi automatic script conversion DICOM images generated by Computerized Tomography or Magnetic Resonance, for .txt in the IMAGEJ software. Methodology: this study was developed in the IMAGEJ software platform with an Intel Core 2 Duo computer, CPU of 2.00GHz, with 2:00 GB of RAM for 32-bit system. Development of the script was held in a text editor using JAVA language. For script insertion in IMAGEJ the plug in tool of this software was used. After this, a window is open asking for the path of the files that will be read, first and last name of DICOM file to be converted, along with where the new files will be stored. Results: for the manual processing of DICOM conversion to .txt of cerebral computed tomography with 600 images requires a time of about 8 hours. The use of script allows conversion time reduction for 12 minutes. Conclusion: the script used demonstrates DICOM conversion ability to .txt and a significant improvement in time savings in processing

  17. Airlift Operation Modeling Using Discrete Event Simulation (DES)

    Science.gov (United States)

    2009-12-01

    test and debug GUI applications that run on mobile phones, set-top boxes, and PDAs, with support for JavaFX Mobile and the Java ME SDK 3.0 Platform...and • create open-source projects and host them on Kenai.com. NetBeans features language-aware editors for JavaFX , JavaScript, CSS, Python, PHP

  18. Simulation with Python on transverse modes of the symmetric confocal resonator

    Science.gov (United States)

    Wang, Qing Hua; Qi, Jing; Ji, Yun Jing; Song, Yang; Li, Zhenhua

    2017-08-01

    Python is a popular open-source programming language that can be used to simulate various optical phenomena. We have developed a suite of programs to help teach the course of laser principle. The complicated transverse modes of the symmetric confocal resonator can be visualized in personal computers, which is significant to help the students understand the pattern distribution of laser resonator.

  19. Postprandial increase of oleoylethanolamide mobilization in small intestine of the Burmese python (Python molurus)

    DEFF Research Database (Denmark)

    Astarita, Giuseppe; Rourke, Bryan C; Andersen, Johnnie Bremholm

    2006-01-01

    to the induction of between-meal satiety. Here we examined whether feeding-induced OEA mobilization also occurs in Burmese pythons (Python molurus), a species of ambush-hunting snakes that consumes huge meals after months of fasting and undergoes massive feeding-dependent changes in gastrointestinal hormonal...... release and gut morphology. Using liquid-chromatography/mass-spectrometry (LC/MS), we measured OEA levels in the gastrointestinal tract of fasted (28 days) and fed (48h after feeding) pythons. We observed a nearly 300-fold increase in OEA levels in the small intestine of fed compared to fasted animals......-unsaturated, but not polyunsaturated fatty-acid ethanolamides (FAE) in the small intestine of fed pythons. The identification of OEA and other FAEs in the gastrointestinal tract of Python molurus suggests that this class of lipid messengers may be widespread among vertebrate groups and may represent an evolutionarily ancient means...

  20. Amebiasis in four ball pythons, Python reginus.

    Science.gov (United States)

    Kojimoto, A; Uchida, K; Horii, Y; Okumura, S; Yamaguch, R; Tateyama, S

    2001-12-01

    Between September 13th and November 18th in 1999, four ball pythons, Python reginus kept in the same display, showed anorexia and died one after another. At necropsy, all four snakes had severe hemorrhagic colitis. Microscopically, all snakes had severe necrotizing hemorrhagic colitis, in association with ameba-like protozoa. Some of the protozoa had macrophage-like morphology and others formed protozoal cysts with thickened walls. These protozoa were distributed throughout the wall in the large intestine. Based on the pathological findings, these snakes were infested with a member of Entamoeba sp., presumably with infection by Entamoeba invadens, the most prevalent type of reptilian amoebae.

  1. Cross-script and within-script priming in alcoholic Korsakoff patients.

    Science.gov (United States)

    Komatsu, Shin-Ichi; Mimura, Masaru; Kato, Motoichiro; Kashima, Haruo

    2003-04-01

    In two experiments, alcoholic Korsakoff patients and control subjects studied a list of Japanese nouns written in either Hiragana or Kanji script. Word-fragment completion and recognition tests were then administered in Hiragana. When the writing script was changed between study and test phases, repetition priming in word-fragment completion was significantly attenuated but was still reliable against baseline performance. This was confirmed for both Korsakoff patients and control subjects. In contrast, the script change had little effect on recognition memory, which was severely impaired in Korsakoff patients. The results suggest that repetition priming is mediated by two different implicit processes, one that is script-specific and the other that is assumed to operate at a more abstract level.

  2. Python and Roles of Variables in Introductory Programming: Experiences from Three Educational Institutions

    Science.gov (United States)

    Nikula, Uolevi; Sajaniemi, Jorma; Tedre, Matti; Wray, Stuart

    2007-01-01

    Students often find that learning to program is hard. Introductory programming courses have high drop-out rates and students do not learn to program well. This paper presents experiences from three educational institutions where introductory programming courses were improved by adopting Python as the first programming language and roles of…

  3. JavaScript DNA translator: DNA-aligned protein translations.

    Science.gov (United States)

    Perry, William L

    2002-12-01

    There are many instances in molecular biology when it is necessary to identify ORFs in a DNA sequence. While programs exist for displaying protein translations in multiple ORFs in alignment with a DNA sequence, they are often expensive, exist as add-ons to software that must be purchased, or are only compatible with a particular operating system. JavaScript DNA Translator is a shareware application written in JavaScript, a scripting language interpreted by the Netscape Communicator and Internet Explorer Web browsers, which makes it compatible with several different operating systems. While the program uses a familiar Web page interface, it requires no connection to the Internet since calculations are performed on the user's own computer. The program analyzes one or multiple DNA sequences and generates translations in up to six reading frames aligned to a DNA sequence, in addition to displaying translations as separate sequences in FASTA format. ORFs within a reading frame can also be displayed as separate sequences. Flexible formatting options are provided, including the ability to hide ORFs below a minimum size specified by the user. The program is available free of charge at the BioTechniques Software Library (www.Biotechniques.com).

  4. An Introduction to Programming for Bioscientists: A Python-Based Primer.

    Directory of Open Access Journals (Sweden)

    Berk Ekmekci

    2016-06-01

    Full Text Available Computing has revolutionized the biological sciences over the past several decades, such that virtually all contemporary research in molecular biology, biochemistry, and other biosciences utilizes computer programs. The computational advances have come on many fronts, spurred by fundamental developments in hardware, software, and algorithms. These advances have influenced, and even engendered, a phenomenal array of bioscience fields, including molecular evolution and bioinformatics; genome-, proteome-, transcriptome- and metabolome-wide experimental studies; structural genomics; and atomistic simulations of cellular-scale molecular assemblies as large as ribosomes and intact viruses. In short, much of post-genomic biology is increasingly becoming a form of computational biology. The ability to design and write computer programs is among the most indispensable skills that a modern researcher can cultivate. Python has become a popular programming language in the biosciences, largely because (i its straightforward semantics and clean syntax make it a readily accessible first language; (ii it is expressive and well-suited to object-oriented programming, as well as other modern paradigms; and (iii the many available libraries and third-party toolkits extend the functionality of the core language into virtually every biological domain (sequence and structure analyses, phylogenomics, workflow management systems, etc.. This primer offers a basic introduction to coding, via Python, and it includes concrete examples and exercises to illustrate the language's usage and capabilities; the main text culminates with a final project in structural bioinformatics. A suite of Supplemental Chapters is also provided. Starting with basic concepts, such as that of a "variable," the Chapters methodically advance the reader to the point of writing a graphical user interface to compute the Hamming distance between two DNA sequences.

  5. An Introduction to Programming for Bioscientists: A Python-Based Primer.

    Science.gov (United States)

    Ekmekci, Berk; McAnany, Charles E; Mura, Cameron

    2016-06-01

    Computing has revolutionized the biological sciences over the past several decades, such that virtually all contemporary research in molecular biology, biochemistry, and other biosciences utilizes computer programs. The computational advances have come on many fronts, spurred by fundamental developments in hardware, software, and algorithms. These advances have influenced, and even engendered, a phenomenal array of bioscience fields, including molecular evolution and bioinformatics; genome-, proteome-, transcriptome- and metabolome-wide experimental studies; structural genomics; and atomistic simulations of cellular-scale molecular assemblies as large as ribosomes and intact viruses. In short, much of post-genomic biology is increasingly becoming a form of computational biology. The ability to design and write computer programs is among the most indispensable skills that a modern researcher can cultivate. Python has become a popular programming language in the biosciences, largely because (i) its straightforward semantics and clean syntax make it a readily accessible first language; (ii) it is expressive and well-suited to object-oriented programming, as well as other modern paradigms; and (iii) the many available libraries and third-party toolkits extend the functionality of the core language into virtually every biological domain (sequence and structure analyses, phylogenomics, workflow management systems, etc.). This primer offers a basic introduction to coding, via Python, and it includes concrete examples and exercises to illustrate the language's usage and capabilities; the main text culminates with a final project in structural bioinformatics. A suite of Supplemental Chapters is also provided. Starting with basic concepts, such as that of a "variable," the Chapters methodically advance the reader to the point of writing a graphical user interface to compute the Hamming distance between two DNA sequences.

  6. J Is for JavaScript: A Direct-Style Correspondence between Algol-Like Languages and JavaScript Using First-Class Continuations

    DEFF Research Database (Denmark)

    Danvy, Olivier; Shan, Chung-chieh; Zerny, Ian Steven

    2009-01-01

    . This tension arises especially when the domain calls for complex control structures. We illustrate this tension by revisiting Landin’s original correspondence between Algol and Church’s lambda-notation. We translate domain-specific programs with lexically scoped jumps to JavaScript. Our translation produces...... us to conclude that translations should preserve not just the data structures and the block structure of a source program, but also its control structure. We thus identify a new class of use cases for control structures in JavaScript, namely the idiomatic translation of control structures from DSLs....... the same block structure and binding structure as in the source program, à la Abdali. The target code uses a control operator in direct style, à la Landin. In fact, the control operator used is almost Landin’s J—hence our title. Our translation thus complements a continuation-passing translation à la...

  7. ChromaStarPy: A Stellar Atmosphere and Spectrum Modeling and Visualization Lab in Python

    Science.gov (United States)

    Short, C. Ian; Bayer, Jason H. T.; Burns, Lindsey M.

    2018-02-01

    We announce ChromaStarPy, an integrated general stellar atmospheric modeling and spectrum synthesis code written entirely in python V. 3. ChromaStarPy is a direct port of the ChromaStarServer (CSServ) Java modeling code described in earlier papers in this series, and many of the associated JavaScript (JS) post-processing procedures have been ported and incorporated into CSPy so that students have access to ready-made data products. A python integrated development environment (IDE) allows a student in a more advanced course to experiment with the code and to graphically visualize intermediate and final results, ad hoc, as they are running it. CSPy allows students and researchers to compare modeled to observed spectra in the same IDE in which they are processing observational data, while having complete control over the stellar parameters affecting the synthetic spectra. We also take the opportunity to describe improvements that have been made to the related codes, ChromaStar (CS), CSServ, and ChromaStarDB (CSDB), that, where relevant, have also been incorporated into CSPy. The application may be found at the home page of the OpenStars project: http://www.ap.smu.ca/OpenStars/.

  8. The fast azimuthal integration Python library: pyFAI.

    Science.gov (United States)

    Ashiotis, Giannis; Deschildre, Aurore; Nawaz, Zubair; Wright, Jonathan P; Karkoulis, Dimitrios; Picca, Frédéric Emmanuel; Kieffer, Jérôme

    2015-04-01

    pyFAI is an open-source software package designed to perform azimuthal integration and, correspondingly, two-dimensional regrouping on area-detector frames for small- and wide-angle X-ray scattering experiments. It is written in Python (with binary submodules for improved performance), a language widely accepted and used by the scientific community today, which enables users to easily incorporate the pyFAI library into their processing pipeline. This article focuses on recent work, especially the ease of calibration, its accuracy and the execution speed for integration.

  9. Retention of katakana as foreign scripts: The effects of mnemonics and spatial ability

    Directory of Open Access Journals (Sweden)

    Sachiko Matsunaga

    2009-01-01

    Full Text Available This paper reports the results of an experiment, which showed that: (a regardless of their Ll script type (Roman or nonRoman, learners of Japanese as a foreign language did not benefit from the conventional mnemonics for the short-term or long-term retention of katakana (introduced after hiragana; (b only the spatial ability of the Roman group (whose L1 employed Roman scripts had significant correlations with their immediate recall performances. By comparing these results with those of Matsunaga's (2003, 2005 studies on hiragana, this paper discusses: (a changes in learning strategies, (b the role of the spatial ability, (c the possibility of L1 script recognition strategy transfer, (d the role of practice, and (e pedagogical implications and suggestions for future studies.

  10. Hemodynamic consequences of cardiac malformations in two juvenile ball pythons (Python regius).

    Science.gov (United States)

    Jensen, Bjarke; Wang, Tobias

    2009-12-01

    Two cases of bifid ventricles and cardiac malformations in juvenile ball python (Python regius) were investigated by blood pressure measurements and macro- and microscopic sectioning. A study of a normal ball python was included for reference. In both cases, all cardiac chambers were enlarged and abnormally shaped. Internal assessment of the ventricles revealed a pronounced defect of the muscular ridge, which normally is responsible for separating the systemic and pulmonary circuits. Consistent with the small muscular ridge, systolic pressures were identical in the pulmonary and systemic arteries, but, the snakes, nevertheless, lived to reach body weights severalfold of their hatchling weight.

  11. Unilateral microphthalmia or anophthalmia in eight pythons (Pythonidae)

    DEFF Research Database (Denmark)

    Da Silva, Mari-Ann Otkjær; Berthelsen, MF; Wang, T

    2015-01-01

    OBJECTIVE: To provide morphological descriptions of microphthalmia or anophthalmia in eight pythons using microcomputerized tomography (μCT), magnetic resonance imaging (MRI), and histopathology. ANIMALS STUDIED: Seven Burmese pythons (Python bivittatus) and one ball python (P. regius) with clini......OBJECTIVE: To provide morphological descriptions of microphthalmia or anophthalmia in eight pythons using microcomputerized tomography (μCT), magnetic resonance imaging (MRI), and histopathology. ANIMALS STUDIED: Seven Burmese pythons (Python bivittatus) and one ball python (P. regius...... macroscopic anomalies. CONCLUSIONS: Eight pythons with unilateral left-sided microphthalmia or anophthalmia had one normal eye and a left orbit with malformed or incompletely developed ocular structures along with remnants of fetal structures. These cases lend further information to a condition that is often...

  12. Parallel programming with Python

    CERN Document Server

    Palach, Jan

    2014-01-01

    A fast, easy-to-follow and clear tutorial to help you develop Parallel computing systems using Python. Along with explaining the fundamentals, the book will also introduce you to slightly advanced concepts and will help you in implementing these techniques in the real world. If you are an experienced Python programmer and are willing to utilize the available computing resources by parallelizing applications in a simple way, then this book is for you. You are required to have a basic knowledge of Python development to get the most of this book.

  13. Report on the observed response of Javan lutungs (Trachypithecus auratus mauritius) upon encountering a reticulated python (Python reticulatus).

    Science.gov (United States)

    Tsuji, Yamato; Prayitno, Bambang; Suryobroto, Bambang

    2016-04-01

    We observed an encounter between a reticulated python (Python reticulatus) and a group of wild Javan lutungs (Trachypithecus auratus mauritius) at the Pangandaran Nature Reserve, West Java, Indonesia. A python (about 2 m in length) moved toward a group of lutungs in the trees. Upon seeing the python, an adult male and several adult female lutungs began to emit alarm calls. As the python approached, two adult and one sub-adult female jumped onto a branch near the python and began mobbing the python by shaking the branch. During the mobbing, other individuals in the group (including an adult lutung male) remained nearby but did not participate. The python then rolled into a ball-like shape and stopped moving, at which point the lutungs moved away. The total duration of the encounter was about 40 min, during which time the lutungs stopped feeding and grooming. Group cohesiveness during and after the encounter was greater than that before the encounter, indicating that lutungs adjust their daily activity in response to potential predation risk.

  14. Generation of Test Questions from RDF Files Using PYTHON and SPARQL

    Science.gov (United States)

    Omarbekova, Assel; Sharipbay, Altynbek; Barlybaev, Alibek

    2017-02-01

    This article describes the development of the system for the automatic generation of test questions based on the knowledge base. This work has an applicable nature and provides detailed examples of the development of ontology and implementation the SPARQL queries in RDF-documents. Also it describes implementation of the program generating questions in the Python programming language including the necessary libraries while working with RDF-files.

  15. Pynamic: the Python Dynamic Benchmark

    Energy Technology Data Exchange (ETDEWEB)

    Lee, G L; Ahn, D H; de Supinksi, B R; Gyllenhaal, J C; Miller, P J

    2007-07-10

    Python is widely used in scientific computing to facilitate application development and to support features such as computational steering. Making full use of some of Python's popular features, which improve programmer productivity, leads to applications that access extremely high numbers of dynamically linked libraries (DLLs). As a result, some important Python-based applications severely stress a system's dynamic linking and loading capabilities and also cause significant difficulties for most development environment tools, such as debuggers. Furthermore, using the Python paradigm for large scale MPI-based applications can create significant file IO and further stress tools and operating systems. In this paper, we present Pynamic, the first benchmark program to support configurable emulation of a wide-range of the DLL usage of Python-based applications for large scale systems. Pynamic has already accurately reproduced system software and tool issues encountered by important large Python-based scientific applications on our supercomputers. Pynamic provided insight for our system software and tool vendors, and our application developers, into the impact of several design decisions. As we describe the Pynamic benchmark, we will highlight some of the issues discovered in our large scale system software and tools using Pynamic.

  16. GMES: A Python package for solving Maxwell’s equations using the FDTD method

    Science.gov (United States)

    Chun, Kyungwon; Kim, Huioon; Kim, Hyounggyu; Jung, Kil Su; Chung, Youngjoo

    2013-04-01

    This paper describes GMES, a free Python package for solving Maxwell’s equations using the finite-difference time-domain (FDTD) method. The design of GMES follows the object-oriented programming (OOP) approach and adopts a unique design strategy where the voxels in the computational domain are grouped and then updated according to its material type. This piecewise updating scheme ensures that GMES can adopt OOP without losing its simple structure and time-stepping speed. The users can easily add various material types, sources, and boundary conditions into their code using the Python programming language. The key design features, along with the supported material types, excitation sources, boundary conditions and parallel calculations employed in GMES are also described in detail. Catalog identifier: AEOK_v1_0 Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AEOK_v1_0.html Program obtainable from: CPC Program Library, Queen’s University, Belfast, N. Ireland Licensing provisions: GNU General Public License v3.0 No. of lines in distributed program, including test data, etc.: 17700 No. of bytes in distributed program, including test data, etc.: 89878 Distribution format: tar.gz Programming language: C++, Python. Computer: Any computer with a Unix-like system with a C++ compiler, and a Python interpreter; developed on 2.53 GHz Intel CoreTM i3. Operating system: Any Unix-like system; developed under Ubuntu 12.04 LTS 64 bit. Has the code been vectorized or parallelized?: Yes. Parallelized with MPI directives (optional). RAM: Problem dependent (a simulation with real valued electromagnetic field uses roughly 0.18 KB per Yee cell.) Classification: 10. External routines: SWIG [1], Cython [2], NumPy [3], SciPy [4], matplotlib [5], MPI for Python [6] Nature of problem: Classical electrodynamics Solution method: Finite-difference time-domain (FDTD) method Additional comments: This article describes version 0.9.5. The most recent version can be downloaded at the GMES

  17. Installing Python Modules with pip

    OpenAIRE

    Fred Gibbs

    2013-01-01

    This lesson shows you how to download and install Python modules. There are many ways to install external modules, but for the purposes of this lesson, we’re going to use a program called pip. As of Python 2.7.9 and newer, pip is installed by default. This tutorial will be helpful for anyone using older versions of Python (which are still quite common).

  18. JavaScript programmer's reference

    CERN Document Server

    Valentine, Thomas

    2013-01-01

    JavaScript Programmer's Reference is an invaluable resource that won't stray far from your desktop (or your tablet!). It contains detailed information on every JavaScript object and command, and combines that reference with practical examples showcasing how you can use those commands in the real world. Whether you're just checking the syntax of a method or you're starting out on the road to JavaScript mastery, the JavaScript Programmer's Reference will be an essential aid.  With a detailed and informative tutorial section giving you the ins and outs of programming with JavaScript and the DOM f

  19. Screening_mgmt: a Python module for managing screening data.

    Science.gov (United States)

    Helfenstein, Andreas; Tammela, Päivi

    2015-02-01

    High-throughput screening is an established technique in drug discovery and, as such, has also found its way into academia. High-throughput screening generates a considerable amount of data, which is why specific software is used for its analysis and management. The commercially available software packages are often beyond the financial limits of small-scale academic laboratories and, furthermore, lack the flexibility to fulfill certain user-specific requirements. We have developed a Python module, screening_mgmt, which is a lightweight tool for flexible data retrieval, analysis, and storage for different screening assays in one central database. The module reads custom-made analysis scripts and plotting instructions, and it offers a graphical user interface to import, modify, and display the data in a uniform manner. During the test phase, we used this module for the management of 10,000 data points of various origins. It has provided a practical, user-friendly tool for sharing and exchanging information between researchers. © 2014 Society for Laboratory Automation and Screening.

  20. An object oriented Python interface for atomistic simulations

    Science.gov (United States)

    Hynninen, T.; Himanen, L.; Parkkinen, V.; Musso, T.; Corander, J.; Foster, A. S.

    2016-01-01

    Programmable simulation environments allow one to monitor and control calculations efficiently and automatically before, during, and after runtime. Environments directly accessible in a programming environment can be interfaced with powerful external analysis tools and extensions to enhance the functionality of the core program, and by incorporating a flexible object based structure, the environments make building and analysing computational setups intuitive. In this work, we present a classical atomistic force field with an interface written in Python language. The program is an extension for an existing object based atomistic simulation environment.

  1. The influence of cross-language similarity on within- and between-language Stroop effects in trilinguals

    NARCIS (Netherlands)

    Heuven, W.J.B. van; Conklin, K.; Coderre, E.L.; Guo, T.; Dijkstra, A.F.J.

    2011-01-01

    This study investigated effects of cross-language similarity on within- and between-language Stroop interference and facilitation in three groups of trilinguals. Trilinguals were either proficient in three languages that use the same-script (alphabetic in German–English–Dutch trilinguals), two

  2. CS Circles: An In-Browser Python Course for Beginners

    OpenAIRE

    Pritchard, David; Vasiga, Troy

    2012-01-01

    Computer Science Circles is a free programming website for beginners that is designed to be fun, easy to use, and accessible to the broadest possible audience. We teach Python since it is simple yet powerful, and the course content is well-structured but written in plain language. The website has over one hundred exercises in thirty lesson pages, plus special features to help teachers support their students. It is available in both English and French. We discuss the philosophy behind the cour...

  3. JavaScript for Absolute Beginners

    CERN Document Server

    McNavage, T

    2010-01-01

    If you are new to both JavaScript and programming, this hands-on book is for you. Rather than staring blankly at gobbledygook, you'll explore JavaScript by entering and running hundreds of code samples in Firebug, a free JavaScript debugger. Then in the last two chapters, you'll leave the safety of Firebug and hand-code an uber cool JavaScript application in your preferred text editor. Written in a friendly, engaging narrative style, this innovative JavaScript tutorial covers the following essentials: * Core JavaScript syntax, such as value types, operators, expressions, and statements provide

  4. The language scripts of pre-school children and of the language ...

    African Journals Online (AJOL)

    It reflects on the lessons learnt from a language stimulation programme implemented by a dedicated volunteer in a childcare centre in an isolated farming valley in the Stellenbosch area. Some children attending this centre received deliberate language stimulation in a small-group setting on a weekly basis for 18 weeks ...

  5. Re-imagining a Stata/Python combination

    OpenAIRE

    James Fiedler

    2013-01-01

    At last year’s Stata Conference, I presented some ideas for combining Stata and Python within a single interface. Two methods were presented; in one, Python was used to automate Stata, and in the other, Python was used to send simulated keystrokes to the Stata GUI. The first method has the drawback of only working in Windows, and the second can be slow and subject to character input limits. In this talk I will demonstrate a method for achieving interaction between Stata and Python which does ...

  6. Challenges to a molecular approach to prey identification in the Burmese python, Python molurus bivittatus

    Science.gov (United States)

    Falk, Bryan; Reed, Robert N.

    2015-01-01

    Molecular approaches to prey identification are increasingly useful in elucidating predator–prey relationships, and we aimed to investigate the feasibility of these methods to document the species identities of prey consumed by invasive Burmese pythons in Florida. We were particularly interested in the diet of young snakes, because visual identification of prey from this size class has proven difficult. We successfully extracted DNA from the gastrointestinal contents of 43 young pythons, as well as from several control samples, and attempted amplification of DNA mini-barcodes, a 130-bp region of COX1. Using a PNA clamp to exclude python DNA, we found that prey DNA was not present in sufficient quality for amplification of this locus in 86% of our samples. All samples from the GI tracts of young pythons contained only hair, and the six samples we were able to identify to species were hispid cotton rats. This suggests that young Burmese pythons prey predominantly on small mammals and that prey diversity among snakes of this size class is low. We discuss prolonged gastrointestinal transit times and extreme gastric breakdown as possible causes of DNA degradation that limit the success of a molecular approach to prey identification in Burmese pythons

  7. A python based interface for the tandem-linac control system

    International Nuclear Information System (INIS)

    Ajith Kumar, B.P.

    2011-01-01

    The control system for the Tandem-LINAC accelerator system at IUAC is a client-server design running on a network of PCs under the GNU/Linux operating system. The computers connected to the devices in the accelerator run a server program. The computers providing the user interface runs different kinds of client programs that communicates to the servers over a TCT/IP network to control/monitor the accelerator parameters. Both the programs were written in C language and some programming expertise was required to write the client programs. The addition of a Python language interface has enabled the users to write programs for specific tasks like data logging and partial automation of the operation with minimal effort. (author)

  8. Health Information in Multiple Languages

    Science.gov (United States)

    ... gov/languages/languages.html Health Information in Multiple Languages To use the sharing features on this page, please enable JavaScript. Use these ... Bethesda, MD 20894 U.S. Department of Health and Human Services National Institutes of Health Page last updated on 4 June 2018

  9. Teacher Learning by Script

    Science.gov (United States)

    Reeves, Jenelle

    2010-01-01

    Scripted instruction (SI) programs, which direct teachers to teach, even to talk, from a standardized written script, are roundly criticized for inhibiting teacher creativity and teacher learning. In fact, such programs utilize scripting for exactly that reason: to reduce teacher interference with (and presumed weakening of) the prescribed…

  10. Pipe dream? Envisioning a grassroots Python ecosystem of open, common software tools and data access in support of river and coastal biogeochemical research (Invited)

    Science.gov (United States)

    Mayorga, E.

    2013-12-01

    Practical, problem oriented software developed by scientists and graduate students in domains lacking a strong software development tradition is often balkanized into the scripting environments provided by dominant, typically proprietary tools. In environmental fields, these tools include ArcGIS, Matlab, SAS, Excel and others, and are often constrained to specific operating systems. While this situation is the outcome of rational choices, it limits the dissemination of useful tools and their integration into loosely coupled frameworks that can meet wider needs and be developed organically by groups addressing their own needs. Open-source dynamic languages offer the advantages of an accessible programming syntax, a wealth of pre-existing libraries, multi-platform access, linkage to community libraries developed in lower level languages such as C or FORTRAN, and access to web service infrastructure. Python in particular has seen a large and increasing uptake in scientific communities, as evidenced by the continued growth of the annual SciPy conference. Ecosystems with distinctive physical structures and organization, and mechanistic processes that are well characterized, are both factors that have often led to the grass-roots development of useful code meeting the needs of a range of communities. In aquatic applications, examples include river and watershed analysis tools (River Tools, Taudem, etc), and geochemical modules such as CO2SYS, PHREEQ and LOADEST. I will review the state of affairs and explore the potential offered by a Python tool ecosystem in supporting aquatic biogeochemistry and water quality research. This potential is multi-faceted and broadly involves accessibility to lone grad students, access to a wide community of programmers and problem solvers via online resources such as StackExchange, and opportunities to leverage broader cyberinfrastructure efforts and tools, including those from widely different domains. Collaborative development of such

  11. Session Types Go Dynamic or How to Verify Your Python Conversations

    Directory of Open Access Journals (Sweden)

    Rumyana Neykova

    2013-12-01

    Full Text Available This paper presents the first implementation of session types in a dynamically-typed language - Python. Communication safety of the whole system is guaranteed at runtime by monitors that check the execution traces comply with an associated protocol. Protocols are written in Scribble, a choreography description language based on multiparty session types, with addition of logic formulas for more precise behaviour properties. The presented framework overcomes the limitations of previous works on the session types where all endpoints should be statically typed so that they do not permit interoperability with untyped participants. The advantages, expressiveness and performance of dynamic protocol checking are demonstrated through use case and benchmarks.

  12. PySSM: A Python Module for Bayesian Inference of Linear Gaussian State Space Models

    Directory of Open Access Journals (Sweden)

    Christopher Strickland

    2014-04-01

    Full Text Available PySSM is a Python package that has been developed for the analysis of time series using linear Gaussian state space models. PySSM is easy to use; models can be set up quickly and efficiently and a variety of different settings are available to the user. It also takes advantage of scientific libraries NumPy and SciPy and other high level features of the Python language. PySSM is also used as a platform for interfacing between optimized and parallelized Fortran routines. These Fortran routines heavily utilize basic linear algebra and linear algebra Package functions for maximum performance. PySSM contains classes for filtering, classical smoothing as well as simulation smoothing.

  13. Node web development

    CERN Document Server

    Herron, David

    2013-01-01

    Presented in a simple, step-by-step format, this book is an introduction to web development with Node.This book is for anybody looking for an alternative to the ""P"" languages (Perl, PHP, Python), or anyone looking for a new paradigm of server-side application development.The reader should have at least a rudimentary understanding of JavaScript and web application development.

  14. A Python library for FAIRer access and deposition to the Metabolomics Workbench Data Repository.

    Science.gov (United States)

    Smelter, Andrey; Moseley, Hunter N B

    2018-01-01

    The Metabolomics Workbench Data Repository is a public repository of mass spectrometry and nuclear magnetic resonance data and metadata derived from a wide variety of metabolomics studies. The data and metadata for each study is deposited, stored, and accessed via files in the domain-specific 'mwTab' flat file format. In order to improve the accessibility, reusability, and interoperability of the data and metadata stored in 'mwTab' formatted files, we implemented a Python library and package. This Python package, named 'mwtab', is a parser for the domain-specific 'mwTab' flat file format, which provides facilities for reading, accessing, and writing 'mwTab' formatted files. Furthermore, the package provides facilities to validate both the format and required metadata elements of a given 'mwTab' formatted file. In order to develop the 'mwtab' package we used the official 'mwTab' format specification. We used Git version control along with Python unit-testing framework as well as continuous integration service to run those tests on multiple versions of Python. Package documentation was developed using sphinx documentation generator. The 'mwtab' package provides both Python programmatic library interfaces and command-line interfaces for reading, writing, and validating 'mwTab' formatted files. Data and associated metadata are stored within Python dictionary- and list-based data structures, enabling straightforward, 'pythonic' access and manipulation of data and metadata. Also, the package provides facilities to convert 'mwTab' files into a JSON formatted equivalent, enabling easy reusability of the data by all modern programming languages that implement JSON parsers. The 'mwtab' package implements its metadata validation functionality based on a pre-defined JSON schema that can be easily specialized for specific types of metabolomics studies. The library also provides a command-line interface for interconversion between 'mwTab' and JSONized formats in raw text and a

  15. Windows PowerShell Cookbook The Complete Guide to Scripting Microsoft's New Command Shell

    CERN Document Server

    Holmes, Lee

    2010-01-01

    Do you know how to use Windows PowerShell to navigate the filesystem and manage files and folders? Or how to retrieve a web page? This introduction to the PowerShell language and scripting environment provides more than 430 task-oriented recipes to help you solve the most complex and pressing problems, and includes more than 100 tried-and-tested scripts that intermediate to advanced system administrators can copy and use immediately. You'll find hands-on tutorials on fundamentals, common tasks, and administrative jobs that you can apply whether you're on a client or server version of Windows

  16. A Python Implementation of an Intermediate-Level Tropical Circulation Model and Implications for How Modeling Science is Done

    Science.gov (United States)

    Lin, J. W. B.

    2015-12-01

    Historically, climate models have been developed incrementally and in compiled languages like Fortran. While the use of legacy compiledlanguages results in fast, time-tested code, the resulting model is limited in its modularity and cannot take advantage of functionalityavailable with modern computer languages. Here we describe an effort at using the open-source, object-oriented language Pythonto create more flexible climate models: the package qtcm, a Python implementation of the intermediate-level Neelin-Zeng Quasi-Equilibrium Tropical Circulation model (QTCM1) of the atmosphere. The qtcm package retains the core numerics of QTCM1, written in Fortran, to optimize model performance but uses Python structures and utilities to wrap the QTCM1 Fortran routines and manage model execution. The resulting "mixed language" modeling package allows order and choice of subroutine execution to be altered at run time, and model analysis and visualization to be integrated in interactively with model execution at run time. This flexibility facilitates more complex scientific analysis using less complex code than would be possible using traditional languages alone and provides tools to transform the traditional "formulate hypothesis → write and test code → run model → analyze results" sequence into a feedback loop that can be executed automatically by the computer.

  17. The Zoonotic Implications of Pentastomiasis in the Royal Python (Python Regius)

    OpenAIRE

    Ayinmode, AB; Adedokun, AO; Aina, A; Taiwo, V

    2010-01-01

    Pentastomes are worm-like endoparasites of the phylum Pentastomida found principally in the respiratory tract of reptiles, birds, and mammals. They cause a zoonotic disease known as pentastomiasis in humans and other mammals. The autopsy of a Nigerian royal python (Python regius) revealed two yellowish-white parasites in the lungs, tissue necrosis and inflammatory lesions. The parasite was confirmed to be Armillifer spp (Pentastomid); this is the first recorded case of pentastomiasis in the r...

  18. Ultrasonographic anatomy of the coelomic organs of boid snakes (Boa constrictor imperator, Python regius, Python molurus molurus, and Python curtus).

    Science.gov (United States)

    Banzato, Tommaso; Russo, Elisa; Finotti, Luca; Milan, Maria C; Gianesella, Matteo; Zotti, Alessandro

    2012-05-01

    To determine the ultrasonographic features of the coelomic organs of healthy snakes belonging to the Boidae and Pythonidae families. 16 ball pythons (Python regius; 7 males, 8 females, and 1 sexually immature), 10 Indian rock pythons (Python molurus molurus; 5 males, 4 females, and 1 sexually immature), 12 Python curtus (5 males and 7 females), and 8 boa constrictors (Boa constrictor imperator; 4 males and 4 females). All snakes underwent complete ultrasonographic evaluation of the coelomic cavity; chemical restraint was not necessary. A dorsolateral approach to probe placement was chosen to increase image quality and to avoid injury to the snakes and operators. Qualitative and quantitative observations were recorded. The liver, stomach, gallbladder, pancreas, small and large intestines, kidneys, cloaca, and scent glands were identified in all snakes. The hemipenes were identified in 10 of the 21 (48%) male snakes. The spleen was identified in 5 of the 46 (11%) snakes, and ureters were identified in 6 (13%). In 2 sexually immature snakes, the gonads were not visible. One (2%) snake was gravid, and 7 (15%) had small amounts of free fluid in the coelomic cavity. A significant positive correlation was identified between several measurements (diameter and thickness of scent glands, gastric and pyloric walls, and colonic wall) and body length (snout to vent) and body weight. The study findings can be used as an atlas of the ultrasonographic anatomy of the coelomic cavity in healthy boid snakes. Ultrasonography was reasonably fast to perform and was well tolerated in conscious snakes.

  19. Development and Evaluation of a Python Telecare System Based on a Bluetooth Body Area Network

    Directory of Open Access Journals (Sweden)

    Morón MJ

    2011-01-01

    Full Text Available This paper presents a prototype of a telemonitoring system, based on a BAN (Body Area Network that is integrated by a Bluetooth (BT pulse oximeter, a GPS (Global Positioning System unit, and a smartphone. The smartphone is the hardware platform for running a Python software that manages the Bluetooth piconet formed by the sensors. Thus the smartphone forwards the data received from the Bluetooth devices, encoded into JSON (JavaScript Object Notation, to a central server. This server provides universal access to the information of the patient's location and health status through a web application based on AJAX (Asynchronous JavaScript and XML technology. Additionally, for the described prototype, the study presents some performance analyses about several topics that are of great interest for the applicability of the prototype: (i the technique used to forward the patient's location and health status, (ii the power consumption of the smartphone (which is compared with the measurements of an equivalent software developed for Java Micro Edition platform, and (iii the web browser compatibility of the web application developed for the control and monitoring of the patients.

  20. Script Templates: A Practical Approach to Script Training in Aphasia

    Science.gov (United States)

    Kaye, Rosalind C.; Cherney, Leora R.

    2016-01-01

    Purpose: Script training for aphasia involves repeated practice of relevant phrases and sentences that, when mastered, can potentially be used in other communicative situations. Although an increasingly popular approach, script development can be time-consuming. We provide a detailed summary of the evidence supporting this approach. We then…

  1. Scraping EDGAR with Python

    Science.gov (United States)

    Ashraf, Rasha

    2017-01-01

    This article presents Python codes that can be used to extract data from Securities and Exchange Commission (SEC) filings. The Python program web crawls to obtain URL paths for company filings of required reports, such as Form 10-K. The program then performs a textual analysis and counts the number of occurrences of words in the filing that…

  2. Functional-light JavaScript balanced, pragmatic FP in JavaScript

    CERN Document Server

    Simpson, Kyle

    2017-01-01

    Functional-Light JavaScript is a balanced, pragmatic exploration of Functional Programming in JavaScript. Functional Programming (FP) is an incredibly powerful paradigm for structuring code that yields more robust, verifiable, and readable programs. If you've ever tried to learn FP but struggled with terms like "monad", mathematical concepts like category theory, or symbols like (lambda), you're not alone. Functional-Light programming distills the most vital aspects of FP—function purity, value immutability, composition, and more!—down to approachable JavaScript patterns. Rather than the all-or-nothing dogmatism often encountered in FP, this book teaches you how to improve your programs line by line.

  3. CLIMLAB: a Python-based software toolkit for interactive, process-oriented climate modeling

    Science.gov (United States)

    Rose, B. E. J.

    2015-12-01

    Global climate is a complex emergent property of the rich interactions between simpler components of the climate system. We build scientific understanding of this system by breaking it down into component process models (e.g. radiation, large-scale dynamics, boundary layer turbulence), understanding each components, and putting them back together. Hands-on experience and freedom to tinker with climate models (whether simple or complex) is invaluable for building physical understanding. CLIMLAB is an open-ended software engine for interactive, process-oriented climate modeling. With CLIMLAB you can interactively mix and match model components, or combine simpler process models together into a more comprehensive model. It was created primarily to support classroom activities, using hands-on modeling to teach fundamentals of climate science at both undergraduate and graduate levels. CLIMLAB is written in Python and ties in with the rich ecosystem of open-source scientific Python tools for numerics and graphics. The IPython notebook format provides an elegant medium for distributing interactive example code. I will give an overview of the current capabilities of CLIMLAB, the curriculum we have developed thus far, and plans for the future. Using CLIMLAB requires some basic Python coding skills. We consider this an educational asset, as we are targeting upper-level undergraduates and Python is an increasingly important language in STEM fields. However CLIMLAB is well suited to be deployed as a computational back-end for a graphical gaming environment based on earth-system modeling.

  4. Size, but not experience, affects the ontogeny of constriction performance in ball pythons (Python regius).

    Science.gov (United States)

    Penning, David A; Dartez, Schuyler F

    2016-03-01

    Constriction is a prey-immobilization technique used by many snakes and is hypothesized to have been important to the evolution and diversification of snakes. However, very few studies have examined the factors that affect constriction performance. We investigated constriction performance in ball pythons (Python regius) by evaluating how peak constriction pressure is affected by snake size, sex, and experience. In one experiment, we tested the ontogenetic scaling of constriction performance and found that snake diameter was the only significant factor determining peak constriction pressure. The number of loops applied in a coil and its interaction with snake diameter did not significantly affect constriction performance. Constriction performance in ball pythons scaled differently than in other snakes that have been studied, and medium to large ball pythons are capable of exerting significantly higher pressures than those shown to cause circulatory arrest in prey. In a second experiment, we tested the effects of experience on constriction performance in hatchling ball pythons over 10 feeding events. By allowing snakes in one test group to gain constriction experience, and manually feeding snakes under sedation in another test group, we showed that experience did not affect constriction performance. During their final (10th) feedings, all pythons constricted similarly and with sufficiently high pressures to kill prey rapidly. At the end of the 10 feeding trials, snakes that were allowed to constrict were significantly smaller than their non-constricting counterparts. © 2016 Wiley Periodicals, Inc.

  5. QlikView scripting

    CERN Document Server

    Floyd, Matt

    2013-01-01

    This mini book offers information about QlikView scripting written in an easy-to-understand manner, and covers QlikView scripting from basic to advanced features in a compact format.If you are a basic orintermediate developer with some knowledge of QlikView applications and a basic understanding of QlikView scripting and data extraction and manipulation, this book will be great for you. If you are an advanced user, you can also use this book as a reference guide and teaching aid. If you are a QlikView project team member such as a business user, data/ETL professional, project manager, orsystem

  6. "Prefacing the Script" as an Ethical Response to State-Mandated Abortion Counseling.

    Science.gov (United States)

    Buchbinder, Mara; Lassiter, Dragana; Mercier, Rebecca; Bryant, Amy; Lyerly, Anne Drapkin

    Laws governing abortion provision are proliferating throughout the United States, yet little is known about how these laws affect providers. We investigated the experiences of abortion providers in North Carolina practicing under the 2011 Women's Right to Know Act, which mandates that women receive counseling with specific, state-prescribed information at least 24 hours prior to an abortion. We focus here on a subset of the data to examine one strategy by which providers worked to minimize moral conflicts generated by the counseling procedure. Drawing on Erving Goffman's work on language and social interaction, we highlight how providers communicated moral objections and layered meanings through a practice that we call prefacing the script . We conducted semi-structured interviews with 31 physicians, nurses, physician assistants, and clinic managers who provide abortion care in North Carolina. Audio-recorded interviews were transcribed verbatim and analyzed using an inductive, iterative analytic approach, which included reading for context, interpretive memo-writing, and focused coding. Roughly half of the participants (14/31) reported that they or the clinicians who performed the counseling in their institution routinely prefaced the counseling script with qualifiers, disclaimers, and apologies that clarified their relationship to the state-mandated content. We identified three performative functions of this practice: 1) enacting a frame shift from a medical to a legal interaction, 2) distancing the speaker from the authorial voice of the counseling script, and 3) creating emotional alignment. Prefacing state-mandated abortion counseling scripts constitutes a practical strategy providers use to balance the obligation to comply with state law with personal and professional responsibilities to provide tailored care, emotional support, and serve the patient's best interests. Our findings suggest that language constitutes a powerful resource for navigating and

  7. VarPy: A python library for volcanology and rock physics data analysis

    Science.gov (United States)

    Filgueira, Rosa; Atkinson, Malcom; Bell, Andrew; Snelling, Brawen; Main, Ian

    2014-05-01

    The increasing prevalence of digital instrumentation in volcanology and rock physics is leading to a wealth of data, which in turn is increasing the need for computational analyses and models. Today, these are largely developed by each individual or researcher. The introduction of a shared library that can be used for this purpose has several benefits: 1. when an existing function in the library meets a need recognised by a researcher it is usually much less effort than developing ones own code; 2. once functions are established and multiply used they become better tested, more reliable and eventually trusted by the community; 3. use of the same functions by different researchers makes it easier to compare results and to compare the skill of rival analysis and modelling methods; and 4. in the longer term the cost of maintaining these functions is shared over a wide community and they therefore have greater duration. Python is a high-level interpreted programming language, with capabilities for object-oriented programming. Often scientists choose this language to program their programs because of the increased productivity it provides. Although, there are many software tools available for interactive data analysis and development, there are not libraries designed specifically for volcanology and rock physics data. Therefore, we propose a new Python open-source toolbox called "VarPy" to facilitate rapid application development for rock physicists and volcanologists, which allow users to define their own workflows to develop models, analyses and visualisations. This proposal is triggered by our work on data assimilation in the NERC EFFORT (Earthquake and Failure Forecasting in Real Time) project, using data provided by the NERC CREEP 2 experimental project and volcanic experiments from INVG observatory Etna and IGN observatory Hierro as a test cases. In EFFORT project we are developing a scientist gateway which offers services for collecting and sharing volcanology

  8. Anatomy of the python heart.

    Science.gov (United States)

    Jensen, Bjarke; Nyengaard, Jens R; Pedersen, Michael; Wang, Tobias

    2010-12-01

    The hearts of all snakes and lizards consist of two atria and a single incompletely divided ventricle. In general, the squamate ventricle is subdivided into three chambers: cavum arteriosum (left), cavum venosum (medial) and cavum pulmonale (right). Although a similar division also applies to the heart of pythons, this family of snakes is unique amongst snakes in having intracardiac pressure separation. Here we provide a detailed anatomical description of the cardiac structures that confer this functional division. We measured the masses and volumes of the ventricular chambers, and we describe the gross morphology based on dissections of the heart from 13 ball pythons (Python regius) and one Burmese python (P. molurus). The cavum venosum is much reduced in pythons and constitutes approximately 10% of the cavum arteriosum. We suggest that shunts will always be less than 20%, while other studies conclude up to 50%. The high-pressure cavum arteriosum accounted for approximately 75% of the total ventricular mass, and was twice as dense as the low-pressure cavum pulmonale. The reptile ventricle has a core of spongious myocardium, but the three ventricular septa that separate the pulmonary and systemic chambers--the muscular ridge, the bulbuslamelle and the vertical septum--all had layers of compact myocardium. Pythons, however, have unique pads of connective tissue on the site of pressure separation. Because the hearts of varanid lizards, which also are endowed with pressure separation, share many of these morphological specializations, we propose that intraventricular compact myocardium is an indicator of high-pressure systems and possibly pressure separation.

  9. Unilateral microphthalmia or anophthalmia in eight pythons (Pythonidae).

    Science.gov (United States)

    Da Silva, Mari-Ann O; Bertelsen, Mads F; Wang, Tobias; Pedersen, Michael; Lauridsen, Henrik; Heegaard, Steffen

    2015-01-01

    To provide morphological descriptions of microphthalmia or anophthalmia in eight pythons using microcomputerized tomography (μCT), magnetic resonance imaging (MRI), and histopathology. Seven Burmese pythons (Python bivittatus) and one ball python (P. regius) with clinically normal right eyes and an abnormal or missing left eye. At the time of euthanasia, four of the eight snakes underwent necropsy. Hereafter, the heads of two Burmese pythons and one ball python were examined using μCT, and another Burmese python was subjected to MRI. Following these procedures, the heads of these four pythons along with the heads of an additional three Burmese pythons were prepared for histology. All eight snakes had left ocular openings seen as dermal invaginations between 0.2 and 2.0 mm in diameter. They also had varying degrees of malformations of the orbital bones and a limited presence of nervous, glandular, and muscle tissue in the posterior orbit. Two individuals had small but identifiable eyes. Furthermore, remnants of the pigmented embryonic framework of the hyaloid vessels were found in the anophthalmic snakes. Necropsies revealed no other macroscopic anomalies. Eight pythons with unilateral left-sided microphthalmia or anophthalmia had one normal eye and a left orbit with malformed or incompletely developed ocular structures along with remnants of fetal structures. These cases lend further information to a condition that is often seen in snakes, but infrequently described. © 2014 American College of Veterinary Ophthalmologists.

  10. Mastering JavaScript high performance

    CERN Document Server

    Adams, Chad R

    2015-01-01

    If you are a JavaScript developer with some experience in development and want to increase the performance of JavaScript projects by building faster web apps, then this book is for you. You should know the basic concepts of JavaScript.

  11. Scripting InDesign CS34 with JavaScript

    CERN Document Server

    Kahrel, Peter

    2009-01-01

    Updated: August 2010. Author Peter Kahrel updated this Short Cut to cover InDesign CS5. InDesign provides a powerful setof tools for producing beautifuldocuments. While you can certainlydo all your work by hand throughInDesign's graphical interface, thereare many times when it's much easier towrite a script. Once you've automateda task, you can run it over the wholedocument, ensuring consistency, orjust when you need it, simplifying andspeeding your layout process. All ittakes is a bit of JavaScript knowledgeand a willingness to explore InDesign'sprogramming features.

  12. pypk - A Python extension module to handle chemical kinetics in plasma physics modeling

    Directory of Open Access Journals (Sweden)

    2008-06-01

    Full Text Available PLASMAKIN is a package to handle physical and chemical data used in plasma physics modeling and to compute gas-phase and gas-surface kinetics data: particle production and loss rates, photon emission spectra and energy exchange rates. A large number of species properties and reaction types are supported, namely: gas or electron temperature dependent collision rate coefficients, vibrational and cascade levels, evaluation of branching ratios, superelastic and other reverse processes, three-body collisions, radiation imprisonment and photoelectric emission. Support of non-standard rate coefficient functions can be handled by a user-supplied shared library.

    The main block of the PLASMAKIN package is a Fortran module that can be included in an user's program or compiled as a shared library, libpk. pypk is a new addition to the package and provides access to libpk from Python programs. It is build on top of the ctypes foreign function library module and is prepared to work with several Fortran compilers. However pypk is more than a wrapper and provides its own classes and functions taking advantage of Python language characteristics. Integration with Python tools allows substantial productivity gains on program development and insight on plasma physics problems.

  13. Building machine learning systems with Python

    CERN Document Server

    Coelho, Luis Pedro

    2015-01-01

    This book primarily targets Python developers who want to learn and use Python's machine learning capabilities and gain valuable insights from data to develop effective solutions for business problems.

  14. SMS Language and College Writing :The languages of the College Texters

    Directory of Open Access Journals (Sweden)

    Norizul Azida Darus

    2010-03-01

    Full Text Available Many students have become avid texters and are seriously reinventing language to accommodate the 160-character limit of short messages. They are more interested in getting their messages across and thus becoming less concerned about correct spelling, grammar and punctuation. Since texting has become a way of life of many students, it is feared that the SMS language can affect students’ written performance. This research examines the effects of frequent usage of text messaging (SMS on undergraduates academic writing. For the purpose of the study, 264 Diploma students of UiTM Perlis were selected as participants. They were 94 male texters and 170 female texters aged between 18 – 22 years old who were taking three different English courses namely Preparatory English, Mainstream English 1 and Mainstream English 2. The data includes participants’ SMS messages, class assignments and examinations scripts which were analyzed in order to detect the existence of SMS language by using measuring instruments of Orthographic forms (Shortis, 2001. The findings reveal that there were few occurrences of SMS language in students’ examinations scripts among weak students.

  15. Refinement Types for TypeScript

    OpenAIRE

    Vekris, Panagiotis; Cosman, Benjamin; Jhala, Ranjit

    2016-01-01

    We present Refined TypeScript (RSC), a lightweight refinement type system for TypeScript, that enables static verification of higher-order, imperative programs. We develop a formal core of RSC that delineates the interaction between refinement types and mutability. Next, we extend the core to account for the imperative and dynamic features of TypeScript. Finally, we evaluate RSC on a set of real world benchmarks, including parts of the Octane benchmarks, D3, Transducers, and the TypeScript co...

  16. Detection of nidoviruses in live pythons and boas.

    Science.gov (United States)

    Marschang, Rachel E; Kolesnik, Ekaterina

    2017-02-09

    Nidoviruses have recently been described as a putative cause of severe respiratory disease in pythons in the USA and Europe. The objective of this study was to establish the use of a conventional PCR for the detection of nidoviruses in samples from live animals and to extend the list of susceptible species. A PCR targeting a portion of ORF1a of python nidoviruses was used to detect nidoviruses in diagnostic samples from live boas and pythons. A total of 95 pythons, 84 boas and 22 snakes of unknown species were included in the study. Samples tested included oral swabs and whole blood. Nidoviruses were detected in 27.4% of the pythons and 2.4% of the boas tested. They were most commonly detected in ball pythons (Python [P.] regius) and Indian rock pythons (P. molurus), but were also detected for the first time in other python species, including Morelia spp. and Boa constrictor. Oral swabs were most commonly tested positive. The PCR described here can be used for the detection of nidoviruses in oral swabs from live snakes. These viruses appear to be relatively common among snakes in captivity in Europe and screening for these viruses should be considered in the clinical work-up. Nidoviruses are believed to be an important cause of respiratory disease in pythons, but can also infect boas. Detection of these viruses in live animals is now possible and can be of interest both in diseased animals as well as in quarantine situations.

  17. Manipulating Strings in Python

    Directory of Open Access Journals (Sweden)

    William J. Turkel

    2012-07-01

    Full Text Available This lesson is a brief introduction to string manipulation techniques in Python. Knowing how to manipulate strings plays a crucial role in most text processing tasks. If you’d like to experiment with the following lessons, you can write and execute short programs as we’ve been doing, or you can open up a Python shell / Terminal to try them out on the command line.

  18. ObsPy: A Python toolbox for seismology - Sustainability, New Features, and Applications

    Science.gov (United States)

    Krischer, L.; Megies, T.; Sales de Andrade, E.; Barsch, R.; MacCarthy, J.

    2016-12-01

    ObsPy (https://www.obspy.org) is a community-driven, open-source project dedicated to offer a bridge for seismology into the scientific Python ecosystem. Amongst other things, it provides Read and write support for essentially every commonly used data format in seismology with a unified interface. This includes waveform data as well as station and event meta information. A signal processing toolbox tuned to the specific needs of seismologists. Integrated access to the largest data centers, web services, and databases. Wrappers around third party codes like libmseed and evalresp. Using ObsPy enables users to take advantage of the vast scientific ecosystem that has developed around Python. In contrast to many other programming languages and tools, Python is simple enough to enable an exploratory and interactive coding style desired by many scientists. At the same time it is a full-fledged programming language usable by software engineers to build complex and large programs. This combination makes it very suitable for use in seismology where research code often must be translated to stable and production ready environments, especially in the age of big data. ObsPy has seen constant development for more than six years and enjoys a large rate of adoption in the seismological community with thousands of users. Successful applications include time-dependent and rotational seismology, big data processing, event relocations, and synthetic studies about attenuation kernels and full-waveform inversions to name a few examples. Additionally it sparked the development of several more specialized packages slowly building a modern seismological ecosystem around it. We will present a short overview of the capabilities of ObsPy and point out several representative use cases and more specialized software built around ObsPy. Additionally we will discuss new and upcoming features, as well as the sustainability of open-source scientific software.

  19. Experimentally derived salinity tolerance of hatchling Burmese pythons (Python molurus bivittatus) from the Everglades, Florida (USA)

    Science.gov (United States)

    Hart, Kristen M.; Schofield, Pamela J.; Gregoire, Denise R.

    2012-01-01

    In a laboratory setting, we tested the ability of 24 non-native, wild-caught hatchling Burmese pythons (Python molurus bivittatus) collected in the Florida Everglades to survive when given water containing salt to drink. After a one-month acclimation period in the laboratory, we grouped snakes into three treatments, giving them access to water that was fresh (salinity of 0, control), brackish (salinity of 10), or full-strength sea water (salinity of 35). Hatchlings survived about one month at the highest marine salinity and about five months at the brackish-water salinity; no control animals perished during the experiment. These results are indicative of a "worst-case scenario", as in the laboratory we denied access to alternate fresh-water sources that may be accessible in the wild (e.g., through rainfall). Therefore, our results may underestimate the potential of hatchling pythons to persist in saline habitats in the wild. Because of the effect of different salinity regimes on survival, predictions of ultimate geographic expansion by non-native Burmese pythons that consider salt water as barriers to dispersal for pythons may warrant re-evaluation, especially under global climate change and associated sea-level-rise scenarios.

  20. Lightweight computational steering of very large scale molecular dynamics simulations

    International Nuclear Information System (INIS)

    Beazley, D.M.

    1996-01-01

    We present a computational steering approach for controlling, analyzing, and visualizing very large scale molecular dynamics simulations involving tens to hundreds of millions of atoms. Our approach relies on extensible scripting languages and an easy to use tool for building extensions and modules. The system is extremely easy to modify, works with existing C code, is memory efficient, and can be used from inexpensive workstations and networks. We demonstrate how we have used this system to manipulate data from production MD simulations involving as many as 104 million atoms running on the CM-5 and Cray T3D. We also show how this approach can be used to build systems that integrate common scripting languages (including Tcl/Tk, Perl, and Python), simulation code, user extensions, and commercial data analysis packages

  1. Brainlab: A Python Toolkit to Aid in the Design, Simulation, and Analysis of Spiking Neural Networks with the NeoCortical Simulator.

    Science.gov (United States)

    Drewes, Rich; Zou, Quan; Goodman, Philip H

    2009-01-01

    Neuroscience modeling experiments often involve multiple complex neural network and cell model variants, complex input stimuli and input protocols, followed by complex data analysis. Coordinating all this complexity becomes a central difficulty for the experimenter. The Python programming language, along with its extensive library packages, has emerged as a leading "glue" tool for managing all sorts of complex programmatic tasks. This paper describes a toolkit called Brainlab, written in Python, that leverages Python's strengths for the task of managing the general complexity of neuroscience modeling experiments. Brainlab was also designed to overcome the major difficulties of working with the NCS (NeoCortical Simulator) environment in particular. Brainlab is an integrated model-building, experimentation, and data analysis environment for the powerful parallel spiking neural network simulator system NCS.

  2. Trypanosoma cf. varani in an imported ball python (Python reginus) from Ghana.

    Science.gov (United States)

    Sato, Hiroshi; Takano, Ai; Kawabata, Hiroki; Une, Yumi; Watanabe, Haruo; Mukhtar, Maowia M

    2009-08-01

    Peripheral blood from a ball python (Python reginus) imported from Ghana was cultured in Barbour-Stoenner-Kelly (BSK) medium for Borrelia spp. isolation, resulting in the prominent appearance of free, and clusters of, trypanosomes in a variety of morphological forms. The molecular phylogenetic characterization of these cultured trypanosomes, using the small subunit rDNA, indicated that this python was infected with a species closely related to Trypanosoma varani Wenyon, 1908, originally described in the Nile monitor lizard (Varanus niloticus) from Sudan. Furthermore, nucleotide sequences of glycosomal glyceraldehyde-3-phosphate dehydrogenase gene of both isolates showed few differences. Giemsa-stained blood smears, prepared from the infected python 8 mo after the initial observation of trypanosomes in hemoculture, contained trypomastigotes with a broad body and a short, free flagellum; these most closely resembled the original description of T. varani, or T. voltariae Macfie, 1919 recorded in a black-necked spitting cobra (Naja nigricollis) from Ghana. It is highly possible that lizards and snakes could naturally share an identical trypanosome species. Alternatively, lizards and snakes in the same region might have closely related, but distinct, Trypanosoma species as a result of sympatric speciation. From multiple viewpoints, including molecular phylogenetic analyses, reappraisal of trypanosome species from a wide range of reptiles in Africa is needed to clarify the relationship of recorded species, or to unmask unrecorded species.

  3. Mastering Unity scripting

    CERN Document Server

    Thorn, Alan

    2015-01-01

    Mastering Unity Scripting is an advanced book intended for students, educators, and professionals familiar with the Unity basics as well as the basics of scripting. Whether you've been using Unity for a short time or are an experienced user, this book has something important and valuable to offer to help you improve your game development workflow.

  4. IRISpy: Analyzing IRIS Data in Python

    Science.gov (United States)

    Ryan, Daniel; Christe, Steven; Mumford, Stuart; Baruah, Ankit; Timothy, Shelbe; Pereira, Tiago; De Pontieu, Bart

    2017-08-01

    IRISpy is a new community-developed open-source software library for analysing IRIS level 2 data. It is written in Python, a free, cross-platform, general-purpose, high-level programming language. A wide array of scientific computing software packages have already been developed in Python, from numerical computation (NumPy, SciPy, etc.), to visualization and plotting (matplotlib), to solar-physics-specific data analysis (SunPy). IRISpy is currently under development as a SunPy-affiliated package which means it depends on the SunPy library, follows similar standards and conventions, and is developed with the support of of the SunPy development team. IRISpy’s has two primary data objects, one for analyzing slit-jaw imager data and another for analyzing spectrograph data. Both objects contain basic slicing, indexing, plotting, and animating functionality to allow users to easily inspect, reduce and analyze the data. As part of this functionality the objects can output SunPy Maps, TimeSeries, Spectra, etc. of relevant data slices for easier inspection and analysis. Work is also ongoing to provide additional data analysis functionality including derivation of systematic measurement errors (e.g. readout noise), exposure time correction, residual wavelength calibration, radiometric calibration, and fine scale pointing corrections. IRISpy’s code base is publicly available through github.com and can be contributed to by anyone. In this poster we demonstrate IRISpy’s functionality and future goals of the project. We also encourage interested users to become involved in further developing IRISpy.

  5. The cultural life script as cognitive schema: How the life script shapes memory for fictional life stories

    DEFF Research Database (Denmark)

    Koppel, Jonathan Mark; Berntsen, Dorthe

    2014-01-01

    with the life script, memory for its valence was reconstructed to fit the script (in Study 2); and, third, intrusions in recall were disproportionately for life script events (in Study 3), though that was not the case in recognition (in Study 1). We conclude that the life script serves as a cognitive schema...

  6. Selected Landscape Plants. Slide Script.

    Science.gov (United States)

    McCann, Kevin

    This slide script, part of a series of slide scripts designed for use in vocational agriculture classes, deals with commercially important woody ornamental landscape plants. Included in the script are narrations for use with a total of 253 slides illustrating 92 different plants. Several slides are used to illustrate each plant: besides a view of…

  7. AUX: a scripting language for auditory signal processing and software packages for psychoacoustic experiments and education.

    Science.gov (United States)

    Kwon, Bomjun J

    2012-06-01

    This article introduces AUX (AUditory syntaX), a scripting syntax specifically designed to describe auditory signals and processing, to the members of the behavioral research community. The syntax is based on descriptive function names and intuitive operators suitable for researchers and students without substantial training in programming, who wish to generate and examine sound signals using a written script. In this article, the essence of AUX is discussed and practical examples of AUX scripts specifying various signals are illustrated. Additionally, two accompanying Windows-based programs and development libraries are described. AUX Viewer is a program that generates, visualizes, and plays sounds specified in AUX. AUX Viewer can also be used for class demonstrations or presentations. Another program, Psycon, allows a wide range of sound signals to be used as stimuli in common psychophysical testing paradigms, such as the adaptive procedure, the method of constant stimuli, and the method of adjustment. AUX Library is also provided, so that researchers can develop their own programs utilizing AUX. The philosophical basis of AUX is to separate signal generation from the user interface needed for experiments. AUX scripts are portable and reusable; they can be shared by other researchers, regardless of differences in actual AUX-based programs, and reused for future experiments. In short, the use of AUX can be potentially beneficial to all members of the research community-both those with programming backgrounds and those without.

  8. Python tools for Visual Studio

    CERN Document Server

    Wang, Cathy

    2014-01-01

    This is a hands-on guide that provides exemplary coverage of all the features and concepts related to PTVS.The book is intended for developers who are aiming to enhance their productivity in Python projects with automation tools that Visual Studio provides for the .Net community. Some basic knowledge of Python programming is essential.

  9. Language and Literacy: The Case of India.

    Science.gov (United States)

    Sridhar, Kamal K.

    Language and literacy issues in India are reviewed in terms of background, steps taken to combat illiteracy, and some problems associated with literacy. The following facts are noted: India has 106 languages spoken by more than 685 million people, there are several minor script systems, a major language has different dialects, a language may use…

  10. Photodermatitis and photokeratoconjunctivitis in a ball python (Python regius) and a blue-tongue skink (Tiliqua spp.).

    Science.gov (United States)

    Gardiner, David W; Baines, Frances M; Pandher, Karamjeet

    2009-12-01

    A male ball python (Python regius) and a female blue tongue skink (Tiliqua spp.) of unknown age were evaluated for anorexia, lethargy, excessive shedding, corneal opacity (python), and weight loss (skink) of approximately three weeks' duration. These animals represented the worst affected animals from a private herpetarium where many animals exhibited similar signs. At necropsy, the python had bilateral corneal opacity and scattered moderate dysecdysis. The skink had mild dysecdysis, poor body condition, moderate intestinal nematodiasis, and mild liver atrophy. Microscopic evaluation revealed epidermal erosion and ulceration, with severe epidermal basal cell degeneration and necrosis, and superficial dermatitis (python and skink). Severe bilateral ulcerative keratoconjunctivitis with bacterial colonization was noted in the ball python. Microscopic findings within the skin and eyes were suggestive of ultraviolet (UV) radiation damage or of photodermatitis and photokeratoconjunctivitis. Removal of the recently installed new lamps from the terrariums of the surviving reptiles resulted in resolution of clinical signs. Evaluation of a sample lamp of the type associated with these cases revealed an extremely high UV output, including very-short-wavelength UVB, neither found in natural sunlight nor emitted by several other UVB lamps unassociated with photokeratoconjunctivitis. Exposure to high-intensity and/or inappropriate wavelengths of UV radiation may be associated with significant morbidity, and even mortality, in reptiles. Veterinarians who are presented with reptiles with ocular and/or cutaneous disease of unapparent cause should fully evaluate the specifics of the vivarium light sources. Further research is needed to determine the characteristics of appropriate and of toxic UV light for reptiles kept in captivity.

  11. Which programming language should follow Scratch? JavaScript?

    OpenAIRE

    Bevčič, Mateja

    2017-01-01

    Pupils start with Scratch programming already in the second triennium of primary school. Scratch is a visual programming language where users learn basic programming by stacking blocks of commands. The problems then arise when switching to text-based programming as this represents a great and demanding step for pupils. It is for this very reason very important which programming language and environment we select as we try to make this step as easy as possible for pupils. Pyt...

  12. Pylogeny: an open-source Python framework for phylogenetic tree reconstruction and search space heuristics

    Directory of Open Access Journals (Sweden)

    Alexander Safatli

    2015-06-01

    Full Text Available Summary. Pylogeny is a cross-platform library for the Python programming language that provides an object-oriented application programming interface for phylogenetic heuristic searches. Its primary function is to permit both heuristic search and analysis of the phylogenetic tree search space, as well as to enable the design of novel algorithms to search this space. To this end, the framework supports the structural manipulation of phylogenetic trees, in particular using rearrangement operators such as NNI, SPR, and TBR, the scoring of trees using parsimony and likelihood methods, the construction of a tree search space graph, and the programmatic execution of a few existing heuristic programs. The library supports a range of common phylogenetic file formats and can be used for both nucleotide and protein data. Furthermore, it is also capable of supporting GPU likelihood calculation on nucleotide character data through the BEAGLE library.Availability. Existing development and source code is available for contribution and for download by the public from GitHub (http://github.com/AlexSafatli/Pylogeny. A stable release of this framework is available for download through PyPi (Python Package Index at http://pypi.python.org/pypi/pylogeny.

  13. High Performance JavaScript

    CERN Document Server

    Zakas, Nicholas

    2010-01-01

    If you're like most developers, you rely heavily on JavaScript to build interactive and quick-responding web applications. The problem is that all of those lines of JavaScript code can slow down your apps. This book reveals techniques and strategies to help you eliminate performance bottlenecks during development. You'll learn how to improve execution time, downloading, interaction with the DOM, page life cycle, and more. Yahoo! frontend engineer Nicholas C. Zakas and five other JavaScript experts -- Ross Harmes, Julien Lecomte, Steven Levithan, Stoyan Stefanov, and Matt Sweeney -- demonstra

  14. JavaScript Web Applications

    CERN Document Server

    MacCaw, Alex

    2011-01-01

    Building rich JavaScript applications that bring a desktop experience to the Web requires moving state from the server to the client side-not a simple task. This hands-on book takes proficient JavaScript developers through all the steps necessary to create state-of-the-art applications, including structure, templating, frameworks, communicating with the server, and many other issues. Throughout the book, you'll work with real-world example applications to help you grasp the concepts involved. Learn how to create JavaScript applications that offer a more responsive and improved experience. U

  15. JavaScript programming pushing the limits

    CERN Document Server

    Raasch, Jon

    2013-01-01

    Take your JavaScript knowledge as far as it can go JavaScript has grown up, and it's a hot topic. Newer and faster JavaScript VMs and frameworks built upon them have increased the popularity of JavaScript for server-side web applications, and rich JS applications are being developed for mobile devices. This book delivers a compelling tutorial, showing you how to build a real-world app from the ground up. Experienced developers who want to master the latest techniques and redefine their skills will find this deep dive into JavaScript's hidden functionalities gives them the tools to

  16. Python and computer vision

    Energy Technology Data Exchange (ETDEWEB)

    Doak, J. E. (Justin E.); Prasad, Lakshman

    2002-01-01

    This paper discusses the use of Python in a computer vision (CV) project. We begin by providing background information on the specific approach to CV employed by the project. This includes a brief discussion of Constrained Delaunay Triangulation (CDT), the Chordal Axis Transform (CAT), shape feature extraction and syntactic characterization, and normalization of strings representing objects. (The terms 'object' and 'blob' are used interchangeably, both referring to an entity extracted from an image.) The rest of the paper focuses on the use of Python in three critical areas: (1) interactions with a MySQL database, (2) rapid prototyping of algorithms, and (3) gluing together all components of the project including existing C and C++ modules. For (l), we provide a schema definition and discuss how the various tables interact to represent objects in the database as tree structures. (2) focuses on an algorithm to create a hierarchical representation of an object, given its string representation, and an algorithm to match unknown objects against objects in a database. And finally, (3) discusses the use of Boost Python to interact with the pre-existing C and C++ code that creates the CDTs and CATS, performs shape feature extraction and syntactic characterization, and normalizes object strings. The paper concludes with a vision of the future use of Python for the CV project.

  17. Ball python nidovirus: a candidate etiologic agent for severe respiratory disease in Python regius.

    Science.gov (United States)

    Stenglein, Mark D; Jacobson, Elliott R; Wozniak, Edward J; Wellehan, James F X; Kincaid, Anne; Gordon, Marcus; Porter, Brian F; Baumgartner, Wes; Stahl, Scott; Kelley, Karen; Towner, Jonathan S; DeRisi, Joseph L

    2014-09-09

    A severe, sometimes fatal respiratory disease has been observed in captive ball pythons (Python regius) since the late 1990s. In order to better understand this disease and its etiology, we collected case and control samples and performed pathological and diagnostic analyses. Electron micrographs revealed filamentous virus-like particles in lung epithelial cells of sick animals. Diagnostic testing for known pathogens did not identify an etiologic agent, so unbiased metagenomic sequencing was performed. Abundant nidovirus-like sequences were identified in cases and were used to assemble the genome of a previously unknown virus in the order Nidovirales. The nidoviruses, which were not previously known to infect nonavian reptiles, are a diverse order that includes important human and veterinary pathogens. The presence of the viral RNA was confirmed in all diseased animals (n = 8) but was not detected in healthy pythons or other snakes (n = 57). Viral RNA levels were generally highest in the lung and other respiratory tract tissues. The 33.5-kb viral genome is the largest RNA genome yet described and shares canonical characteristics with other nidovirus genomes, although several features distinguish this from related viruses. This virus, which we named ball python nidovirus (BPNV), will likely establish a new genus in Torovirinae subfamily. The identification of a novel nidovirus in reptiles contributes to our understanding of the biology and evolution of related viruses, and its association with lung disease in pythons is a promising step toward elucidating an etiology for this long-standing veterinary disease. Ball pythons are popular pets because of their diverse coloration, generally nonaggressive behavior, and relatively small size. Since the 1990s, veterinarians have been aware of an infectious respiratory disease of unknown cause in ball pythons that can be fatal. We used unbiased shotgun sequencing to discover a novel virus in the order Nidovirales that was

  18. Python Materials Genomics (pymatgen): A robust, open-source python library for materials analysis

    OpenAIRE

    Ong, Shyue Ping; Richards, William Davidson; Jain, Anubhav; Hautier, Geoffroy; Kocher, Michael; Cholia, Shreyas; Gunter, Dan; Chevrier, Vincent L.; Persson, Kristin A.; Ceder, Gerbrand

    2012-01-01

    We present the Python Materials Genomics (pymatgen) library, a robust, open-source Python library for materials analysis. A key enabler in high-throughput computational materials science efforts is a robust set of software tools to perform initial setup for the calculations (e.g., generation of structures and necessary input files) and post-calculation analysis to derive useful material properties from raw calculated data. The pymatgen library aims to meet these needs by (1) defining core Pyt...

  19. Python for finance

    CERN Document Server

    Yan, Yuxing

    2014-01-01

    Python is a free and powerful tool which can be used to build a financial calculator and price options, and can also explain many trading strategies and test various hypotheses. In addition to that, real-world data can be used to run CAPM (Capital Asset Pricing Model), the Fama-French 3-factor model, estimate VaR (Value at Risk), and estimate spread, illiquidity, and liquidity. This book explores the basics of programming in Python. It is a step-by-step tutorial that will teach you, with the help of concise, practical programs, how to run various statistic tests. With this book, you will learn

  20. Reading English with Japanese in mind: Effects of frequency, phonology, and meaning in different-script bilinguals

    NARCIS (Netherlands)

    Miwa, K.; Dijkstra, A.F.J.; Bolger, P.; Baayen, R.H.

    2014-01-01

    Previous priming studies suggest that, even for bilinguals of languages with different scripts, non-selective lexical activation arises. This lexical decision eye-tracking study examined contributions of frequency, phonology, and meaning of L1 Japanese words on L2 English word lexical decision

  1. Brainlab: a Python toolkit to aid in the design, simulation, and analysis of spiking neural networks with the NeoCortical Simulator

    Directory of Open Access Journals (Sweden)

    Richard P Drewes

    2009-05-01

    Full Text Available Neuroscience modeling experiments often involve multiple complex neural network and cell model variants, complex input stimuli and input protocols, followed by complex data analysis. Coordinating all this complexity becomes a central difficulty for the experimenter. The Python programming language, along with its extensive library packages, has emerged as a leading ``glue'' tool for managing all sorts of complex programmatictasks. This paper describes a toolkit called Brainlab, written in Python, that leverages Python's strengths for the task of managing the general complexity of neuroscience modeling experiments. Brainlab was also designed to overcome the major difficulties of working with the NCS environment in particular. Brainlab is an integrated model building, experimentation, and data analysis environment for the powerful parallel spiking neural network simulator system NCS (the NeoCortical Simulator.

  2. Let's Write a Script.

    Science.gov (United States)

    Harding, T. E.

    Some problems of writing scripts for radio and/or television are discussed, with examples provided to illustrate the rules. Writing both fictional scripts and documentaries are considered. Notes are also included to help the freelance writer who wishes to sell his work. (RH)

  3. A comparison of common programming languages used in bioinformatics.

    Science.gov (United States)

    Fourment, Mathieu; Gillings, Michael R

    2008-02-05

    The performance of different programming languages has previously been benchmarked using abstract mathematical algorithms, but not using standard bioinformatics algorithms. We compared the memory usage and speed of execution for three standard bioinformatics methods, implemented in programs using one of six different programming languages. Programs for the Sellers algorithm, the Neighbor-Joining tree construction algorithm and an algorithm for parsing BLAST file outputs were implemented in C, C++, C#, Java, Perl and Python. Implementations in C and C++ were fastest and used the least memory. Programs in these languages generally contained more lines of code. Java and C# appeared to be a compromise between the flexibility of Perl and Python and the fast performance of C and C++. The relative performance of the tested languages did not change from Windows to Linux and no clear evidence of a faster operating system was found. Source code and additional information are available from http://www.bioinformatics.org/benchmark/. This benchmark provides a comparison of six commonly used programming languages under two different operating systems. The overall comparison shows that a developer should choose an appropriate language carefully, taking into account the performance expected and the library availability for each language.

  4. Introducing Python tools for magnetotellurics: MTpy

    Science.gov (United States)

    Krieger, L.; Peacock, J.; Inverarity, K.; Thiel, S.; Robertson, K.

    2013-12-01

    Within the framework of geophysical exploration techniques, the magnetotelluric method (MT) is relatively immature: It is still not as widely spread as other geophysical methods like seismology, and its processing schemes and data formats are not thoroughly standardized. As a result, the file handling and processing software within the academic community is mainly based on a loose collection of codes, which are sometimes highly adapted to the respective local specifications. Although tools for the estimation of the frequency dependent MT transfer function, as well as inversion and modelling codes, are available, the standards and software for handling MT data are generally not unified throughout the community. To overcome problems that arise from missing standards, and to simplify the general handling of MT data, we have developed the software package "MTpy", which allows the handling, processing, and imaging of magnetotelluric data sets. It is written in Python and the code is open-source. The setup of this package follows the modular approach of successful software packages like GMT or Obspy. It contains sub-packages and modules for various tasks within the standard MT data processing and handling scheme. Besides pure Python classes and functions, MTpy provides wrappers and convenience scripts to call external software, e.g. modelling and inversion codes. Even though still under development, MTpy already contains ca. 250 functions that work on raw and preprocessed data. However, as our aim is not to produce a static collection of software, we rather introduce MTpy as a flexible framework, which will be dynamically extended in the future. It then has the potential to help standardise processing procedures and at same time be a versatile supplement for existing algorithms. We introduce the concept and structure of MTpy, and we illustrate the workflow of MT data processing utilising MTpy on an example data set collected over a geothermal exploration site in South

  5. Creating CAD designs and performing their subsequent analysis using opensource solutions in Python

    Science.gov (United States)

    Iakushkin, Oleg O.; Sedova, Olga S.

    2018-01-01

    The paper discusses the concept of a system that encapsulates the transition from geometry building to strength tests. The solution we propose views the engineer as a programmer who is capable of coding the procedure for working with the modeli.e., to outline the necessary transformations and create cases for boundary conditions. We propose a prototype of such system. In our work, we used: Python programming language to create the program; Jupyter framework to create a single workspace visualization; pythonOCC library to implement CAD; FeniCS library to implement FEM; GMSH and VTK utilities. The prototype is launched on a platform which is a dynamically expandable multi-tenant cloud service providing users with all computing resources on demand. However, the system may be deployed locally for prototyping or work that does not involve resource-intensive computing. To make it possible, we used containerization, isolating the system in a Docker container.

  6. Pro JavaScript for web apps

    CERN Document Server

    Freeman, Adam

    2012-01-01

    JavaScript is the engine behind every web app, and a solid knowledge of it is essential for all modern web developers. Pro JavaScript for Web Apps gives you all of the information that you need to create professional, optimized, and efficient JavaScript applications that will run across all devices. It takes you through all aspects of modern JavaScript application creation, showing you how to combine JavaScript with the new features of HTML5 and CSS3 to make the most of the new web technologies. The focus of the book is on creating professional web applications, ensuring that your app provides

  7. A Python object-oriented framework for the CMS alignment and calibration data

    CERN Document Server

    Dawes, Joshua Heneage

    2017-01-01

    The Alignment, Calibrations and Databases group at the CMS Experiment delivers Alignment and Calibration Conditions Data to a large set of workflows which process recorded event data and produce simulated events. The current infrastructure for releasing and consuming Conditions Data was designed in the two years of the first LHC long shutdown to respond to use cases from the preceding data-taking period. During the second run of the LHC, new use cases were defined. For the consumption of Conditions Metadata, no common interface existed for the detector experts to use in Python-based custom scripts, resulting in many different querying and transaction management patterns. A new framework has been built to address such use cases: a simple object-oriented tool that detector experts can use to read and write Conditions Metadata when using Oracle and SQLite databases, that provides a homogeneous method of querying across all services. The tool provides mechanisms for segmenting large sets of conditions while relea...

  8. FMC: a one-liner Python program to manage, classify and plot focal mechanisms

    Science.gov (United States)

    Álvarez-Gómez, José A.

    2014-05-01

    The analysis of earthquake focal mechanisms (or Seismic Moment Tensor, SMT) is a key tool on seismotectonics research. Each focal mechanism is characterized by several location parameters of the earthquake hypocenter, the earthquake size (magnitude and scalar moment tensor) and some geometrical characteristics of the rupture (nodal planes orientations, SMT components and/or SMT main axes orientations). The aim of FMC is to provide a simple but powerful tool to manage focal mechanism data. The data should be input to the program formatted as one of two of the focal mechanisms formatting options of the GMT (Generic Mapping Tools) package (Wessel and Smith, 1998): the Harvard CMT convention and the single nodal plane Aki and Richards (1980) convention. The former is a SMT format that can be downloaded directly from the Global CMT site (http://www.globalcmt.org/), while the later is the simplest way to describe earthquake rupture data. FMC is programmed in Python language, which is distributed as Open Source GPL-compatible, and therefore can be used to develop Free Software. Python runs on almost any machine, and has a wide support and presence in any operative system. The program has been conceived with the modularity and versatility of the classical UNIX-like tools. Is called from the command line and can be easily integrated into shell scripts (*NIX systems) or batch files (DOS/Windows systems). The program input and outputs can be done by means of ASCII files or using standard input (or redirection "") and pipes ("|"). By default FMC will read the input and write the output as a Harvard CMT (psmeca formatted) ASCII file, although other formats can be used. Optionally FMC will produce a classification diagram representing the rupture type of the focal mechanisms processed. In order to count with a detailed classification of the focal mechanisms I decided to classify the focal mechanism in a series of fields that include the oblique slip regimes. This approximation

  9. Building probabilistic graphical models with Python

    CERN Document Server

    Karkera, Kiran R

    2014-01-01

    This is a short, practical guide that allows data scientists to understand the concepts of Graphical models and enables them to try them out using small Python code snippets, without being too mathematically complicated. If you are a data scientist who knows about machine learning and want to enhance your knowledge of graphical models, such as Bayes network, in order to use them to solve real-world problems using Python libraries, this book is for you. This book is intended for those who have some Python and machine learning experience, or are exploring the machine learning field.

  10. a performance analysis for evaluation of programming languages ...

    African Journals Online (AJOL)

    Mohammed et al.

    PROGRAMMING LANGUAGES BASED ON MOBILE COMPUTING. FOR NIGERIA ... Finally, Vb.net is suitable for data Transfer using upload scheme. Keywords: ... INTRODUCTION .... java, Julia, python, matlab, mathematica and Ruby by.

  11. Energy scripts and spaces

    NARCIS (Netherlands)

    van der Schoor, Tineke

    2016-01-01

    Demand Conference Lancaster 2016 Workshop 9. Space, site and scale in the making of energy demand Abstract: Energy scripts and spaces Tineke van der Schoor, Hanze University of Applied Sciences, Groningen Technology is infused with scripts that indicate how we as users should behave around, live in

  12. Associations between anxiety and love scripts.

    Science.gov (United States)

    Gawda, Barbara

    2012-08-01

    Relations between trait anxiety and love scripts expressed in narratives were examined to assess how anxiety affects the perception of love. Stories about love (N = 160) written by 80 men and 80 women were analyzed. The content of the scripts was evaluated in terms of descriptions of actors, partners, expressed emotions of actor and of partner, importance of love, and the ending of the scenario. To test the differences between men and women on content of scripts and associations between trait anxiety level and frequencies of love script elements, a two-way analysis of variance was used. The main effect for sex was significant. There was an effect of trait anxiety on content of love scripts: high anxiety was associated with more frequent negative descriptions of the actor as well as more frequent negative descriptions of the partner's emotions, only in scripts written by women.

  13. SAE2.py: a python script to automate parameter studies using SCREAMER with application to magnetic switching on Z

    International Nuclear Information System (INIS)

    Orndorff-Plunkett, Franklin

    2011-01-01

    The SCREAMER simulation code is widely used at Sandia National Laboratories for designing and simulating pulsed power accelerator experiments on super power accelerators. A preliminary parameter study of Z with a magnetic switching retrofit illustrates the utility of the automating script for optimizing pulsed power designs. SCREAMER is a circuit based code commonly used in pulsed-power design and requires numerous iterations to find optimal configurations. System optimization using simulations like SCREAMER is by nature inefficient and incomplete when done manually. This is especially the case when the system has many interactive elements whose emergent effects may be unforeseeable and complicated. For increased completeness, efficiency and robustness, investigators should probe a suitably confined parameter space using deterministic, genetic, cultural, ant-colony algorithms or other computational intelligence methods. I have developed SAE2 - a user-friendly, deterministic script that automates the search for optima of pulsed-power designs with SCREAMER. This manual demonstrates how to make input decks for SAE2 and optimize any pulsed-power design that can be modeled using SCREAMER. Application of SAE2 to magnetic switching on model of a potential Z refurbishment illustrates the power of SAE2. With respect to the manual optimization, the automated optimization resulted in 5% greater peak current (10% greater energy) and a 25% increase in safety factor for the most highly stressed element.

  14. PyROOT: Seamless Melting of C++ and Python

    CERN Multimedia

    CERN. Geneva

    2016-01-01

    With ROOT it's possible to use any C++ library from Python without writing any bindings nor dictionaries: loading the library and injecting the relevant headers in the ROOT C++ interpreter is enough to guarantee interactive usage from within Python. Just in time (JIT) compilation of C++ code and immediate utilisation of C++ entities from within Python is also supported. Thanks to the ROOT type system and C++ interpreter and JIT compiler, complete Python/C++ interoperability is achieved. In this contribution we explain how this mechanism is general enough to make any library written in C or C++ usable from within Python and how concepts such as template metaprogramming are mapped in Python. We review the basics of the JIT compilation capabilities provided by the Clang based ROOT interpreter, Cling, and the way in which some of the information of the Abstract Syntax Tree (AST) built by Clang is stored by the ROOT type system. The way in which ROOT manages the automatic loading of libraries and parsing of neces...

  15. Introduction of the Python script STRinNGS for analysis of STR regions in FASTQ or BAM files and expansion of the Danish STR sequence database to 11 STRs

    DEFF Research Database (Denmark)

    Friis, Susanne L; Buchard, Anders; Rockenbauer, Eszter

    2016-01-01

    This work introduces the in-house developed Python application STRinNGS for analysis of STR sequence elements in BAM or FASTQ files. STRinNGS identifies sequence reads with STR loci by their flanking sequences, it analyses the STR sequence and the flanking regions, and generates a report with the......This work introduces the in-house developed Python application STRinNGS for analysis of STR sequence elements in BAM or FASTQ files. STRinNGS identifies sequence reads with STR loci by their flanking sequences, it analyses the STR sequence and the flanking regions, and generates a report...

  16. Eye movement control in reading unspaced text: the case of the Japanese script.

    Science.gov (United States)

    Kajii, N; Nazir, T A; Osaka, N

    2001-09-01

    The present study examines the landing-site distributions of the eyes during natural reading of Japanese script: a script that mixes three different writing systems (Kanji, Hiragana, and Katakana) and that misses regular spacing between words. The results show a clear preference of the eyes to land at the beginning rather than the center of the word. In addition, it was found that the eyes land on Kanji characters more frequently than on Hiragana or Katakana characters. Further analysis for two- and three-character words indicated that the eye's landing-site distribution differs depending on type of the characters in the word: the eyes prefer to land at the word beginning only when the initial character of the word is a Kanji character. For pure Hiragana words, the proportion of initial fixations did not differ between character positions. Thus, as already indicated by Kambe (National Institute of Japanese Language Report 85 (1986) 29), the visual distinctiveness of the three Japanese scripts plays a role in guiding eye movements in reading Japanese.

  17. The effect of written text on comprehension of spoken English as a foreign language.

    Science.gov (United States)

    Diao, Yali; Chandler, Paul; Sweller, John

    2007-01-01

    Based on cognitive load theory, this study investigated the effect of simultaneous written presentations on comprehension of spoken English as a foreign language. Learners' language comprehension was compared while they used 3 instructional formats: listening with auditory materials only, listening with a full, written script, and listening with simultaneous subtitled text. Listening with the presence of a script and subtitles led to better understanding of the scripted and subtitled passage but poorer performance on a subsequent auditory passage than listening with the auditory materials only. These findings indicated that where the intention was learning to listen, the use of a full script or subtitles had detrimental effects on the construction and automation of listening comprehension schemas.

  18. Social scripts and stark realities: Kenyan adolescents' abortion discourse.

    Science.gov (United States)

    Mitchell, Ellen M H; Halpern, Carolyn Tucker; Kamathi, Eva Muthuuri; Owino, Shirley

    2006-01-01

    This study explores students' narratives and discourses about adolescent pregnancy and abortion elicited via internet-based open-ended questions posed in response to a cartoon vignette. We report on content analysis of recommendations and strategies for how to manage the unplanned pregnancy of a fictional young couple and in their own personal lives. The responses of 614 young people were analysed. Strategies vary widely. They include giving birth, adoption, running away, abortion, denial, and postponement until discovery. Young people were also queried about unplanned pregnancy resolution among their peers. Discourse analysis reveals competing social scripts on abortion. Florid condemnation of abortion acts in the hypothetical cases contrasts with more frank and sober description of peers' real life abortion behaviour. Students' language is compared with that found in official curricula. The rhetorical devices, moralizing social scripts and dubious health claims about abortion in students' online narratives mirror the tenor and content of their academic curricula as well as Kenyan media presentation of the issue. The need for factual information, dispassionate dialogue and improved contraceptive access is considerable.

  19. Predators in training: operant conditioning of novel behavior in wild Burmese pythons (Python molurus bivitattus).

    Science.gov (United States)

    Emer, Sherri A; Mora, Cordula V; Harvey, Mark T; Grace, Michael S

    2015-01-01

    Large pythons and boas comprise a group of animals whose anatomy and physiology are very different from traditional mammalian, avian and other reptilian models typically used in operant conditioning. In the current study, investigators used a modified shaping procedure involving successive approximations to train wild Burmese pythons (Python molurus bivitattus) to approach and depress an illuminated push button in order to gain access to a food reward. Results show that these large, wild snakes can be trained to accept extremely small food items, associate a stimulus with such rewards via operant conditioning and perform a contingent operant response to gain access to a food reward. The shaping procedure produced robust responses and provides a mechanism for investigating complex behavioral phenomena in massive snakes that are rarely studied in learning research.

  20. Python based high-level synthesis compiler

    Science.gov (United States)

    Cieszewski, Radosław; Pozniak, Krzysztof; Romaniuk, Ryszard

    2014-11-01

    This paper presents a python based High-Level synthesis (HLS) compiler. The compiler interprets an algorithmic description of a desired behavior written in Python and map it to VHDL. FPGA combines many benefits of both software and ASIC implementations. Like software, the mapped circuit is flexible, and can be reconfigured over the lifetime of the system. FPGAs therefore have the potential to achieve far greater performance than software as a result of bypassing the fetch-decode-execute operations of traditional processors, and possibly exploiting a greater level of parallelism. Creating parallel programs implemented in FPGAs is not trivial. This article describes design, implementation and first results of created Python based compiler.