Page 1 of 1 [ 9 posts ] 

goatfish57
Veteran
Veteran

User avatar

Joined: 12 Nov 2015
Gender: Male
Posts: 619
Location: In a village in La Mancha whose name I cannot recall

17 Jan 2016, 6:02 am

Does anyone have experience using IPython Notebook or Jupyter?

I ran into the other day and it looks interesting. It is browser based and not a stand alone development environment.


_________________
Rdos: ND 133/200, NT 75/200

Not Diagnosed and Not Sure


Meistersinger
Veteran
Veteran

User avatar

Joined: 10 May 2012
Gender: Male
Posts: 3,700
Location: Beautiful(?) West Manchester Township PA

17 Jan 2016, 6:09 am

goatfish57 wrote:
Does anyone have experience using IPython Notebook or Jupyter?

I ran into the other day and it looks interesting. It is browser based and not a stand alone development environment.


Never heard of either. If the O/S is anything like Google Chromebook, I don't think that device would be very useful.



goatfish57
Veteran
Veteran

User avatar

Joined: 12 Nov 2015
Gender: Male
Posts: 619
Location: In a village in La Mancha whose name I cannot recall

17 Jan 2016, 6:13 am

I apologize for being to brief on the subject. It is a web base application that runs on Windows, Apple and Linux.

The IPython Notebook is an interactive computational environment, in which you can combine code execution, rich text, mathematics, plots and rich media, as shown in this example session:

The IPython notebook with embedded rich text, code, mathematics and figures.
It aims to be an agile tool for both exploratory computation and data analysis, and provides a platform to support reproducible research, since all inputs and outputs may be stored in a one-to-one way in notebook documents.

There are two components:

The IPython Notebook web application, for interactive authoring of literate computations, in which explanatory text, mathematics, computations and rich media output may be combined. Input and output are stored in persistent cells that may be edited in-place.
Plain text documents, called notebooks, for recording and distributing the results of the rich computations.
The Notebook app automatically saves the current state of the computation in the web browser to the corresponding notebook, which is just a standard text file with the extension .ipynb, stored in a working directory on your computer. This file can be easily put under version control and shared with colleagues.

Despite the fact that the notebook documents are plain text files, they use the JSON format in order to store a complete, reproducible copy of the current state of the computation inside the Notebook app.


_________________
Rdos: ND 133/200, NT 75/200

Not Diagnosed and Not Sure


goatfish57
Veteran
Veteran

User avatar

Joined: 12 Nov 2015
Gender: Male
Posts: 619
Location: In a village in La Mancha whose name I cannot recall

17 Jan 2016, 11:07 am

I downloaded anaconda and installed python 3.5, jupyter .... Make sure to run anaconda update --all.

The system takes 1.5 gig.

I am still looking for a good tutorial document.


_________________
Rdos: ND 133/200, NT 75/200

Not Diagnosed and Not Sure


Adamantium
Veteran
Veteran

User avatar

Joined: 6 Feb 2013
Age: 1024
Gender: Female
Posts: 5,863
Location: Erehwon

17 Jan 2016, 1:02 pm

Looks very cool. Thanks for posting about these projects! :D



goatfish57
Veteran
Veteran

User avatar

Joined: 12 Nov 2015
Gender: Male
Posts: 619
Location: In a village in La Mancha whose name I cannot recall

17 Jan 2016, 3:08 pm

Got a simple graphics program to work.

%matplotlib inline
# import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from pylab import *
x = np.linspace(0, 5, 10)
y = x ** 2
figure()
plot(x, y, 'r')
xlabel('x')
ylabel('y')
title('title')
show()

Jupyter draws a simple line graph below the code sample.

There are some good examples at:

Jupyter and Matplotlib


_________________
Rdos: ND 133/200, NT 75/200

Not Diagnosed and Not Sure


goatfish57
Veteran
Veteran

User avatar

Joined: 12 Nov 2015
Gender: Male
Posts: 619
Location: In a village in La Mancha whose name I cannot recall

18 Jan 2016, 8:27 am

Spent some time messing around with the configuration files.

Run these two commands.
ipython profile create
jupyter profile create

Set the notebook_dir variable in the jupyter config file to keep your files in a better place.

Simple list inversion with Python 3.5.1

forward = ["Green", "Eggs", "And", "Ham"]
backward = []
# while (entry = forward.pop()) : # I wish
# backard.push(entry)
#
for entry in forward : # list.pop equivalent statement
backward.insert(0,entry) # list.push
# print (entry)

print (forward)
print (backward)
backward.reverse()
print (backward)
forward.reverse()
print (forward)

Sorry, I could not figure out how to indent the code with this viewer


_________________
Rdos: ND 133/200, NT 75/200

Not Diagnosed and Not Sure


goatfish57
Veteran
Veteran

User avatar

Joined: 12 Nov 2015
Gender: Male
Posts: 619
Location: In a village in La Mancha whose name I cannot recall

19 Jan 2016, 6:19 am

Python is a fairly easy language to learn. I rewrote a recursive set enumerator from C++ to Python. I was surprised by the performance. The Python version of the set enumerator was very slow. My C++ version runs like a bat out of hell, even on my tablet.

Hopefully, data crunching and the math libraries do not have the same problems.


_________________
Rdos: ND 133/200, NT 75/200

Not Diagnosed and Not Sure


goatfish57
Veteran
Veteran

User avatar

Joined: 12 Nov 2015
Gender: Male
Posts: 619
Location: In a village in La Mancha whose name I cannot recall

19 Jan 2016, 8:12 am

Captured the screen with the code. Zoom the screen a bit to make it easier to read.

Image

Edit: The version for my Android tablet is written in Java


_________________
Rdos: ND 133/200, NT 75/200

Not Diagnosed and Not Sure