RICARDO CARVALHO | Curriculum Vitae
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
Alternatives to Python: Julia
Crossing Language Barriers with , SciPy, and thon Steven G. Johnson MIT Applied Mathemacs Where I’m coming from… [ google “Steven Johnson MIT” ] Computaonal soPware you may know… … mainly C/C++ libraries & soPware … Nanophotonics … oPen with Python interfaces … (& Matlab & Scheme & …) jdj.mit.edu/nlopt www.w.org jdj.mit.edu/meep erf(z) (and erfc, erfi, …) in SciPy 0.12+ & other EM simulators… jdj.mit.edu/book Confession: I’ve used Python’s internal C API more than I’ve coded in Python… A new programming language? Viral Shah Jeff Bezanson Alan Edelman julialang.org Stefan Karpinski [begun 2009, “0.1” in 2013, ~20k commits] [ 17+ developers with 100+ commits ] [ usual fate of all First reacBon: You’re doomed. new languages ] … subsequently: … probably doomed … sll might be doomed but, in the meanBme, I’m having fun with it… … and it solves a real problem with technical compuBng in high-level languages. The “Two-Language” Problem Want a high-level language that you can work with interacBvely = easy development, prototyping, exploraon ⇒ dynamically typed language Plenty to choose from: Python, Matlab / Octave, R, Scilab, … (& some of us even like Scheme / Guile) Historically, can’t write performance-criBcal code (“inner loops”) in these languages… have to switch to C/Fortran/… (stac). [ e.g. SciPy git master is ~70% C/C++/Fortran] Workable, but Python → Python+C = a huge jump in complexity. Just vectorize your code? = rely on mature external libraries, operang on large blocks of data, for performance-criBcal code Good advice! But… • Someone has to write those libraries. • Eventually that person may be you. -
Data Visualization in Python
Data visualization in python Day 2 A variety of packages and philosophies • (today) matplotlib: http://matplotlib.org/ – Gallery: http://matplotlib.org/gallery.html – Frequently used commands: http://matplotlib.org/api/pyplot_summary.html • Seaborn: http://stanford.edu/~mwaskom/software/seaborn/ • ggplot: – R version: http://docs.ggplot2.org/current/ – Python port: http://ggplot.yhathq.com/ • Bokeh (live plots in your browser) – http://bokeh.pydata.org/en/latest/ Biocomputing Bootcamp 2017 Matplotlib • Gallery: http://matplotlib.org/gallery.html • Top commands: http://matplotlib.org/api/pyplot_summary.html • Provides "pylab" API, a mimic of matlab • Many different graph types and options, some obscure Biocomputing Bootcamp 2017 Matplotlib • Resulting plots represented by python objects, from entire figure down to individual points/lines. • Large API allows any aspect to be tweaked • Lengthy coding sometimes required to make a plot "just so" Biocomputing Bootcamp 2017 Seaborn • https://stanford.edu/~mwaskom/software/seaborn/ • Implements more complex plot types – Joint points, clustergrams, fitted linear models • Uses matplotlib "under the hood" Biocomputing Bootcamp 2017 Others • ggplot: – (Original) R version: http://docs.ggplot2.org/current/ – A recent python port: http://ggplot.yhathq.com/ – Elegant syntax for compactly specifying plots – but, they can be hard to tweak – We'll discuss this on the R side tomorrow, both the basics of both work similarly. • Bokeh – Live, clickable plots in your browser! – http://bokeh.pydata.org/en/latest/ -
Ipython: a System for Interactive Scientific
P YTHON: B ATTERIES I NCLUDED IPython: A System for Interactive Scientific Computing Python offers basic facilities for interactive work and a comprehensive library on top of which more sophisticated systems can be built. The IPython project provides an enhanced interactive environment that includes, among other features, support for data visualization and facilities for distributed and parallel computation. he backbone of scientific computing is All these systems offer an interactive command mostly a collection of high-perfor- line in which code can be run immediately, without mance code written in Fortran, C, and having to go through the traditional edit/com- C++ that typically runs in batch mode pile/execute cycle. This flexible style matches well onT large systems, clusters, and supercomputers. the spirit of computing in a scientific context, in However, over the past decade, high-level environ- which determining what computations must be ments that integrate easy-to-use interpreted lan- performed next often requires significant work. An guages, comprehensive numerical libraries, and interactive environment lets scientists look at data, visualization facilities have become extremely popu- test new ideas, combine algorithmic approaches, lar in this field. As hardware becomes faster, the crit- and evaluate their outcome directly. This process ical bottleneck in scientific computing isn’t always the might lead to a final result, or it might clarify how computer’s processing time; the scientist’s time is also they need to build a more static, large-scale pro- a consideration. For this reason, systems that allow duction code. rapid algorithmic exploration, data analysis, and vi- As this article shows, Python (www.python.org) sualization have become a staple of daily scientific is an excellent tool for such a workflow.1 The work. -
Writing Mathematical Expressions with Latex
APPENDIX A Writing Mathematical Expressions with LaTeX LaTeX is extensively used in Python. In this appendix there are many examples that can be useful to represent LaTeX expressions inside Python implementations. This same information can be found at the link http://matplotlib.org/users/mathtext.html. With matplotlib You can enter the LaTeX expression directly as an argument of various functions that can accept it. For example, the title() function that draws a chart title. import matplotlib.pyplot as plt %matplotlib inline plt.title(r'$\alpha > \beta$') With IPython Notebook in a Markdown Cell You can enter the LaTeX expression between two '$$'. $$c = \sqrt{a^2 + b^2}$$ c= a+22b 537 © Fabio Nelli 2018 F. Nelli, Python Data Analytics, https://doi.org/10.1007/978-1-4842-3913-1 APPENDIX A WRITING MaTHEmaTICaL EXPRESSIONS wITH LaTEX With IPython Notebook in a Python 2 Cell You can enter the LaTeX expression within the Math() function. from IPython.display import display, Math, Latex display(Math(r'F(k) = \int_{-\infty}^{\infty} f(x) e^{2\pi i k} dx')) Subscripts and Superscripts To make subscripts and superscripts, use the ‘_’ and ‘^’ symbols: r'$\alpha_i > \beta_i$' abii> This could be very useful when you have to write summations: r'$\sum_{i=0}^\infty x_i$' ¥ åxi i=0 Fractions, Binomials, and Stacked Numbers Fractions, binomials, and stacked numbers can be created with the \frac{}{}, \binom{}{}, and \stackrel{}{} commands, respectively: r'$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$' 3 3 æ3 ö4 ç ÷ 4 è 4ø Fractions can be arbitrarily nested: 1 5 - x 4 538 APPENDIX A WRITING MaTHEmaTICaL EXPRESSIONS wITH LaTEX Note that special care needs to be taken to place parentheses and brackets around fractions. -
Ipython Documentation Release 0.10.2
IPython Documentation Release 0.10.2 The IPython Development Team April 09, 2011 CONTENTS 1 Introduction 1 1.1 Overview............................................1 1.2 Enhanced interactive Python shell...............................1 1.3 Interactive parallel computing.................................3 2 Installation 5 2.1 Overview............................................5 2.2 Quickstart...........................................5 2.3 Installing IPython itself....................................6 2.4 Basic optional dependencies..................................7 2.5 Dependencies for IPython.kernel (parallel computing)....................8 2.6 Dependencies for IPython.frontend (the IPython GUI).................... 10 3 Using IPython for interactive work 11 3.1 Quick IPython tutorial..................................... 11 3.2 IPython reference........................................ 17 3.3 IPython as a system shell.................................... 42 3.4 IPython extension API..................................... 47 4 Using IPython for parallel computing 53 4.1 Overview and getting started.................................. 53 4.2 Starting the IPython controller and engines.......................... 57 4.3 IPython’s multiengine interface................................ 64 4.4 The IPython task interface................................... 78 4.5 Using MPI with IPython.................................... 80 4.6 Security details of IPython................................... 83 4.7 IPython/Vision Beam Pattern Demo............................. -
Easybuild Documentation Release 20210907.0
EasyBuild Documentation Release 20210907.0 Ghent University Tue, 07 Sep 2021 08:55:41 Contents 1 What is EasyBuild? 3 2 Concepts and terminology 5 2.1 EasyBuild framework..........................................5 2.2 Easyblocks................................................6 2.3 Toolchains................................................7 2.3.1 system toolchain.......................................7 2.3.2 dummy toolchain (DEPRECATED) ..............................7 2.3.3 Common toolchains.......................................7 2.4 Easyconfig files..............................................7 2.5 Extensions................................................8 3 Typical workflow example: building and installing WRF9 3.1 Searching for available easyconfigs files.................................9 3.2 Getting an overview of planned installations.............................. 10 3.3 Installing a software stack........................................ 11 4 Getting started 13 4.1 Installing EasyBuild........................................... 13 4.1.1 Requirements.......................................... 14 4.1.2 Using pip to Install EasyBuild................................. 14 4.1.3 Installing EasyBuild with EasyBuild.............................. 17 4.1.4 Dependencies.......................................... 19 4.1.5 Sources............................................. 21 4.1.6 In case of installation issues. .................................. 22 4.2 Configuring EasyBuild.......................................... 22 4.2.1 Supported configuration -
A Novel Application of Fuzzy Set Theory and Topic Model in Sentence Extraction for Vietnamese Text
IJCSNS International Journal of Computer Science and Network Security, VOL.10 No.8, August 2010 41 A Novel Application of Fuzzy Set Theory and Topic Model in Sentence Extraction for Vietnamese Text Ha Nguyen Thi Thu 1† and Nguyen Thien Luan2††, †Department of Computer Science, Electric Power University ,235 Hoang Quoc Viet, Ha noi, Viet Nam ††Faculty of Information Technology, Le Qui Don Technical University,100 Hoang Quoc Viet, Ha Noi, Viet Nam Summary on the method of calculating the frequency of words in Vietnamese language has common characteristics with some sentences is not appropriate . On the other hand, study on Asian languages such as Chinese, Japanese, Korean ... They do Vietnamese text summary is now something new, corpus not define words based on spaces. In this article, we present a for Vietnamese text summarization or word segmentation method that application of Fuzzy set theory and topic model to is still limited. extract sentences in Vietnamese texts which have been categorized by topic. This method based on identification of important features as : length of sentence, weight of terms in We studied Vietnamese text that categorized by topic and sentences, position of sentences ..., then extracting important found that with each different theme, weight of words sentences according to the ratio, this ratio indicate which (hereafter called terms) would depend on the different sentences in original text will be extracted. We also built a topics. Therefore, we have built sets of terms for each system based on this method and experiments have obtained topic and applied Fuzzy theory in determining degree of good results, satisfying the given requirements. -
Intro to Jupyter Notebook
Evan Williamson University of Idaho Library 20160302 Introducing Jupyter Notebook for Python and R Three questions: http://goo.gl/forms/uYRvebcJkD Try Jupyter https://try.jupyter.org/ Install Jupyter ● Get Python (suggested: Anaconda, Py3, 64bit, https://www.continuum.io/downloads ) ● Manually install (if necessary), http://jupyter.readthedocs.org/en/latest/install.html pip3 install jupyter Install R for Jupyter ● Get R, https://cran.cnr.berkeley.edu/ (suggested: RStudio, https://www.rstudio.com/products/RStudio/#Desktop ) ● Open R console and follow: http://irkernel.github.io/installation/ Start a Notebook ● Open terminal/command prompt jupyter notebook ● Notebook will open at http://127.0.0.1:8888 ● Exit by closing the browser, then typing Ctrl+C in the terminal window Create Slides ● Open terminal/command prompt jupyter nbconvert slideshow.ipynb --to slides --post serve ● Note: “post serve” locally serves the file so you can give a presentation in your browser. If you only want to convert, leave this option off. The resulting HTML file must be served to render correctly. Slides use Reveal.js, http://lab.hakim.se/revealjs/ Reference ● Jupyter docs, http://jupyter.readthedocs.org/en/latest/index.html ● IPython docs, http://ipython.readthedocs.org/en/stable/index.html ● List of kernels, https://github.com/ipython/ipython/wiki/IPythonkernelsforotherlanguages ● A gallery of interesting IPython Notebooks, https://github.com/ipython/ipython/wiki/AgalleryofinterestingIPythonNotebooks ● Markdown basics, -
Numpy for MATLAB Users – Mathesaurus
NumPy for MATLAB users Help MATLAB/Octave Python Description doc help() Browse help interactively help -i % browse with Info help help or doc doc help Help on using help help plot help(plot) or ?plot Help for a function help splines or doc splines help(pylab) Help for a toolbox/library package demo Demonstration examples Searching available documentation MATLAB/Octave Python Description lookfor plot Search help files help help(); modules [Numeric] List available packages which plot help(plot) Locate functions Using interactively MATLAB/Octave Python Description octave -q ipython -pylab Start session TAB or M-? TAB Auto completion foo(.m) execfile('foo.py') or run foo.py Run code from file history hist -n Command history diary on [..] diary off Save command history exit or quit CTRL-D End session CTRL-Z # windows sys.exit() Operators MATLAB/Octave Python Description help - Help on operator syntax Arithmetic operators MATLAB/Octave Python Description a=1; b=2; a=1; b=1 Assignment; defining a number a + b a + b or add(a,b) Addition a - b a - b or subtract(a,b) Subtraction a * b a * b or multiply(a,b) Multiplication a / b a / b or divide(a,b) Division a .^ b a ** b Power, $a^b$ power(a,b) pow(a,b) rem(a,b) a % b Remainder remainder(a,b) fmod(a,b) a+=1 a+=b or add(a,b,a) In place operation to save array creation overhead factorial(a) Factorial, $n!$ Relational operators MATLAB/Octave Python Description a == b a == b or equal(a,b) Equal a < b a < b or less(a,b) Less than a > b a > b or greater(a,b) Greater than a <= b a <= b or less_equal(a,b) -
P19 Layout 1
THURSDAY, MARCH 19, 2015 SPORTS Leverkusen nerves prove costly again SPAIN: Bayer Leverkusen failed once more goal, hopes of finally ending their losing to hold their nerve in a crucial game, going run in the round of 16 were ignited. out on penalties against Atletico Madrid in Roger Schmidt’s team have been play- the Champions League last 16. ing a good season in the Bundesliga, sitting Leverkusen, nicknamed ‘Neverkusen’ for in fourth place with their exciting brand of narrowly missing out on silverware over quick, counter-attacking football with the the years, last reached the quarter-finals of addition of Calhanoglu and Karim Bellarabi the competition in 2002 when they went all this season. the way to the final before losing to Real The Spanish champions, losing finalists Madrid. last season, were in no way spectacular in Not many favored Leverkusen to the first leg and were on the backfoot again advance but after their first leg 1-0 win in on Tuesday until they scored following Germany courtesy of Hakan Calhanoglu’s some sloppy defending midway through the first half. But Leverkusen failed to make posses- sion count and then missed three penalties Matches on TV in the shootout after the game ended 1-0 after extra time. (Local Timings) Their opponents were equally bad from the spot, missing two penalties themselves UEFA Europa League before striker Stefan Kiessling sent a wild effort over the crossbar with the Bundesliga side’s fifth penalty to send Dinamo v SSC Napoli 20:00 Atletico through. beIN SPORTS 1 HD “We were not courageous enough,” said beIN SPORTS 11 HD Leverkusen defender Gonzalo Castro. -
Sage Tutorial (Pdf)
Sage Tutorial Release 9.4 The Sage Development Team Aug 24, 2021 CONTENTS 1 Introduction 3 1.1 Installation................................................4 1.2 Ways to Use Sage.............................................4 1.3 Longterm Goals for Sage.........................................5 2 A Guided Tour 7 2.1 Assignment, Equality, and Arithmetic..................................7 2.2 Getting Help...............................................9 2.3 Functions, Indentation, and Counting.................................. 10 2.4 Basic Algebra and Calculus....................................... 14 2.5 Plotting.................................................. 20 2.6 Some Common Issues with Functions.................................. 23 2.7 Basic Rings................................................ 26 2.8 Linear Algebra.............................................. 28 2.9 Polynomials............................................... 32 2.10 Parents, Conversion and Coercion.................................... 36 2.11 Finite Groups, Abelian Groups...................................... 42 2.12 Number Theory............................................. 43 2.13 Some More Advanced Mathematics................................... 46 3 The Interactive Shell 55 3.1 Your Sage Session............................................ 55 3.2 Logging Input and Output........................................ 57 3.3 Paste Ignores Prompts.......................................... 58 3.4 Timing Commands............................................ 58 3.5 Other IPython -
Portugal Dio Un Baño a España, Que Sólo Reaccionó Tras El 0-1 Y Se Topó Dos Veces Con Los Palos
4 MUNDO DEPORTIVO Lunes 21 de junio de 2004 GRUPO A Portugal-Grecia-España-Rusia ESPAÑA-PORTUGAL 0-1 LA CRÓNICA Javier Gascón (Lisboa) A casa y sin excusas Portugal dio un baño a España, que sólo reaccionó tras el 0-1 y se topó dos veces con los palos España, 0 ñoles que acudieron al José Alva- Casillas (3); Puyol (2), Iván Helguera (2), Juanito (2), Raúl Bravo lade intentaban reanimar a la se- (1); Albelda (1), Xabi Alonso (1); Joaquín (2), Raúl (1), Vicente lección, pero el entusiasmo de los (2); Fernando Torres (3) 34.000 restantes empujaba a Portu- Sustituciones Baraja (1) por Albelda (min. 66); Luque (1) por Joaquín (min. gal. Sólo Fernando Torres, con ca- 72); Morientes (1) por Juanito (min. 80) balgadas en solitario, inquietaba Entrenador a la zaga lusa. Fue el único de los Iñaki Sáez jóvenes que no acusó la presión. Portugal, 1 Un entrenador más valiente hu- Ricardo (3); Miguel (3), Jorge Andrade (3). Ricardo Carvalho (4), biese hecho un cambio en el minu- Nuno Valente (2); Maniche (3), Costinha (3); Figo (3), Deco (4), Cristiano Ronaldo (4); Pauleta (1) to 30, Pero Iñaki Sáez debió pensar Sustituciones que si el marcador reflejaba un Nuno Gomes (3) por Pauleta (min. 46); Petit (2) por Figo (min. empate y Torres había rozado el 78); Fernando Couto (s.c.) por Cristiano Ronaldo (min. 85) gol con un cabezazo tras un saque Entrenador Luiz Felipe Scolari de esquina es que no había tanta Gol superioridad portuguesa. Grave 0-1, Nuno Gomes (min. 57) error.