GithubHelp home page GithubHelp logo

ipython-books / cookbook-2nd Goto Github PK

View Code? Open in Web Editor NEW
935.0 49.0 253.0 46.82 MB

IPython Cookbook, Second Edition, by Cyrille Rossant, Packt Publishing 2018

Home Page: http://ipython-books.github.io/

License: Other

Python 31.21% Makefile 12.00% Shell 5.74% CSS 24.79% HTML 26.27%
python ipython jupyter jupyter-notebook data-science data-analysis data-mining machine-learning visualization data-visualization computing numerical-computation

cookbook-2nd's Introduction

IPython Cookbook, Second Edition (2018)

IPython Cookbook, Second Edition IPython Interactive Computing and Visualization Cookbook, Second Edition (2018), by Cyrille Rossant, contains over 100 hands-on recipes on high-performance numerical computing and data science in the Jupyter Notebook.

This repository contains the sources of the book (in Markdown, CC-BY-NC-ND license).

Get the code as Jupyter notebooks
Get the Google Chrome extension to see LaTeX equations on GitHub
Buy the book

Contents

Recipes marked with an asterisk * are only available in the book.

Contributing

For any comment, question, or error, please open an issue or propose a pull request.

Presentation

Python is one of the leading open source platforms for data science and numerical computing. IPython and the associated Jupyter Notebook offer efficient interfaces to Python for data analysis and interactive visualization, and they constitute an ideal gateway to the platform.

IPython Interactive Computing and Visualization Cookbook, Second Edition contains many ready-to-use, focused recipes for high-performance scientific computing and data analysis, from the latest IPython/Jupyter features to the most advanced tricks, to help you write better and faster code. You will apply these state-of-the-art methods to various real-world examples, illustrating topics in applied mathematics, scientific modeling, and machine learning.

The first part of the book covers programming techniques: code quality and reproducibility, code optimization, high- performance computing through just-in-time compilation, parallel computing, and graphics card programming. The second part tackles data science, statistics, machine learning, signal and image processing, dynamical systems, and pure and applied mathematics

cookbook-2nd's People

Contributors

chrrrisw avatar guoci avatar isaactrevino avatar rossant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookbook-2nd's Issues

Example in 7.6 is only correct for Plate Carree

Hi,
nice work, however I believe that the KDE example in 7.6 is not quite correct, with the errors apparent if you choose any other projection than Plate Carree (x=longitude, y=latitude).

Specifically the first call to scatter:

ax.scatter(x, y, color='r', s=.5, alpha=.25)

should be something like:

ax.scatter(x, y, color='r', s=.5, alpha=.25, transform=ccrs.Geodetic())

as your source data is in lon/lat.

If you were to replace the whole cell with:

mcrs = ccrs.Mercator()
ax = plt.axes(projection=mcrs)
ax.stock_img()
ax.scatter(x, y, color='r', s=.5, alpha=.25, transform=ccrs.Geodetic())

then the data does not display correctly without the transform argument.

In the cell with:

geo = ccrs.Geodetic()
h = geo.transform_points(crs, x, y)[:, :2].T

you are actually transforming the data from Plate Carree to Geodetic, not the other way around. This, again, is only working because x=lon, y=lat.

Hope this make sense,
Regards,
Chris.

Binder not working

Hi there, it seems the Binder button for the notebooks isn't working:

Step 41/51 : RUN conda env update -p ${NB_PYTHON_PREFIX} -f "environment.yml" && conda clean --all -f -y && conda list -p ${NB_PYTHON_PREFIX}
---> Running in 9349de55aa95
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed

ResolvePackageNotFound:

  • pyproj==1.9.5.1=py36_0
  • holoviews==1.9.0=py36h01658e4_0
  • cudatoolkit==8.0=3
  • util-linux==2.21=0
  • proj4==4.9.3=5
  • libiconv==1.15=0
  • geos==3.6.2=1
  • libdap4==3.19.2=1
  • libpq==9.5.4=0
  • libgdal==2.0.0=1

Removing intermediate container 9349de55aa95
The command '/bin/sh -c conda env update -p ${NB_PYTHON_PREFIX} -f "environment.yml" && conda clean --all -f -y && conda list -p ${NB_PYTHON_PREFIX}' returned a non-zero code: 1

Synthetizer not working

Hello, I have tried the synthetizer notebook, but it failed to work, both on my own computer and with the binder link provided. More precisely, while a call to "synth(440)" in an individual cell works as expected, clicking on the buttons, however, does not seem to trigger anything.
I made a workaround as follows.
First I created
out=widgets.Output()
Then instead of with widgets.Output() I wrote with out.
FInally in an another cell I displayed the output:
display(out)
This, however, creates a new widget each time a button is clicked. It can be circumvented by using clear_output(wait=True) after the call to 'synth', but this works only because here the duration of the sound is very short.
I'm interested in this, so if you have a better way of playing a sound (or several at the same time) without displaying unnecessary widgets, I'm all ear ;).

Nathaniel

small typing errors

Hallo some1 or two weeks ago , januari 2019I download all and am very content what you (?) did.
I found a small error in 6.1. Using matplotlib styles
matplotlib is imported as mpl but a few sections later
matplotlib was used in place of mpl ==>missing package
with a consequence of a missing () a bit later

Greets (a new beginner but very enthousiast about it)
PKHG = Peter K.H. Gragert

Error with temp_fft = sp.fftpack.fft(temp) when run in Jupyter Notebook

Hello, the code does not function for me when run in Jupyter Notebook. I replaced to_datetime with to_pydatetime. That fixed one error but now I am getting an error with temp_fft = sp.fftpack.fft(temp) it is throwing the error AttributeError: 'Series' object has no attribute 'flags'

I have updated Conda and scipy to the latest available and the error persists.
Thank you
-A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.