Difference between revisions of "ICalico"
Doug Blank (Talk | contribs) (→Notebook Extensions) |
Doug Blank (Talk | contribs) (→Notebook Extensions) |
||
Line 34: | Line 34: | ||
'''Document Tools:''' | '''Document Tools:''' | ||
− | !ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-document-tools-1.0.zip | + | <code>!ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-document-tools-1.0.zip</code> |
'''Cell Tools:''' | '''Cell Tools:''' | ||
− | !ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-cell-tools-1.0.zip | + | <code>!ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-cell-tools-1.0.zip</code> |
After successfully installing the package, you can run the following command in your notebook to load the desired extensions for that notebook only: | After successfully installing the package, you can run the following command in your notebook to load the desired extensions for that notebook only: |
Revision as of 15:48, 31 July 2014
ICalico is a new method of interacting with Calico. In addition, a host of new functionality is available.
What is ICalico? It is a graphical user interface (GUI) to Calico through a web browser. Everything currently runs locally, so it isn't something on the world wide web, but rather a interface to write code using the browser as the GUI. You'll need ipython and Calico 3 or greater to use. Technically, ICalico is a "IPython kernel". However, IPython can operate using any of a number of languages, including the Calico stable of languages.
To get an idea of what ICalico is, see the sample notebooks here:
http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Index.ipynb
Contents
Installation
- Install IPython version 2.0.0 or greater
- http://ipython.org/install.html - We suggest using the Anaconda installer for its ease of use
- If you do not use Anaconda, you may have to build zmq from source
- Make sure that ipython is in your path (type "ipython" at a console prompt)
- Anaconda will do this for you. You may have to logout, close/open terminal window, or reboot after installing
- On Windows, if you need to manually set your path, use something like:
PATH=%PATH%;c:\Python27\Scripts
- http://ipython.org/install.html - We suggest using the Anaconda installer for its ease of use
- Install Calico version 3.0.0 or greater
- Calico Download
- Put Calico where it will live before going on (IPython will look for it at this location in the future)
- Start IPython with Calico profile
-
icalico
-
- To Stop IPython Server
- Make sure to save your notebook in browser (control+s)
- Shutdown server in console window: control+break on Windows; control+c on Linux/Mac
A web page should open up which will allow you to enter scripts and Calico "magic" commands (see below).
Notebook Extensions
To install notebook extensions, run each of the following commands once for each extension you wish to install.
Spell Checking:
!ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-spell-check-1.0.zip
Document Tools:
!ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-document-tools-1.0.zip
Cell Tools:
!ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-cell-tools-1.0.zip
After successfully installing the package, you can run the following command in your notebook to load the desired extensions for that notebook only:
%%javascript
IPython.load_extensions('calico-spell-check', 'calico-document-tools', 'calico-cell-tools');
OR you can add the following line to the end of your custom.js file (located: .ipython/profile_default/static/custom) to load the extensions for all of your notebooks:
IPython.load_extensions('calico-spell-check', 'calico-document-tools', 'calico-cell-tools');
Trouble shooting
If a webpage opens, you should be able to open a Notebook (either old or make a new one). On the new Notebook page, you should see:
- the purple Calico butterfly logo in the upper-left corner
- if you type
calico
in a cell and evaluate it (control+enter) it should respond back with the Calico version number, like <Calico version 3.0.0, language Python>
If a webpage does not open, some things to check:
- Is
ipython
on your path? - Do you have a default web browser?
- On Linux and Mac, is
mono
on your path?
Other questions? Please ask on the calico-users mailing list.
NOTE: If you move the Calico folder, you should re-create a new Calico profile. In a Terminal:
-
cd Calico
-
calico --create-profile
Getting Started
For an introduction to this manner of interacting with programs, please see:
http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Index.ipynb
Editing
Each cell in a notebook can be one of the following:
- Code
- If the cell is marked Code, then you can enter commands (from Python by default). Press shift/control/alt Enter to evaluate.
- Markdown
- If the cell is marked as Markdown, then you can use Markdown syntax, including some LaTeX commands (surround the math expression with dollar signs, e.g., $\mu$).
- Raw text
- Heading 1 through 6
You can change what type of data is in a cell by changing it in the menu selection.
You can drag and drop images onto a notebook when editing.
Starting with ICalico 3.0.1, the last statement in a Python cell is also an output result.
Magics
ICalico magics are "meta" commands: commands for the ICalico system, separate from any Calico language.
- One preceding percent sign indicates a "magic line command" (applies to just the line)
- Two preceding percent signs indicates a "magic cell command" (applies to just the cell)
- Three preceding percent sign indicates a "magic notebook command" (applies from here to rest of notebook)
Any cell can have any number of magic commands, but they must all appear first, before any code.
The magic line commands are:
%connect_info | show ICalico JSON connection information |
%download url [file] | download a URL to a file |
%edit FILENAME | edit a file in an external editor |
%lang | get information on current language |
%lang LANG EXPRESSION | evaluate the EXPRESSION in the given LANGUAGE |
%magic | get information on magic meta-commands |
%nuget COMMAND ARGS... | perform a NuGet command, such as install. See http://www.nuget.org/ for more details. |
%qtconsole | start a qtconsole |
%run FILENAME | run a file (language determined by extension) |
The magic cell commands are:
%%dot [options] | create a GraphViz dot diagram with contents of cell; options may include {"preprocess": False} to skip the dot processing |
%%file FILENAME | create a filename with contents of cell |
%%html | treat the cell as HTML |
%%javascript | treat the cell as Javascript data |
%%latex | treat the cell as Latex |
%%lang LANGUAGE | change language for just this cell |
%%rich_display | output the cell data/return value as HTML |
%%svg | treat the cell as SVG data |
%%time | time how long it takes to run this cell |
The magic notebook commands are:
%%%lang LANGUAGE | change default language for rest of notebook (until changed again) |
%%%time | turn on/off "sticky time"; when on will use %%time for each cell, until turned off |
%%%rich_display | turn on/off "sticky rich display"; when on will use HTML for lists, arrays, and dictionaries |
Examples:
%%latex \begin{eqnarray} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{eqnarray}
Shell Commands
If you start a cell with "!" (the bang character) then the rest of the line will be used as a shell command and arguments.
Unix Examples:
!ls !ls | cat -n !pwd
DOS Examples:
!dir
Display Functions
These are available from the Calico: calico object:
- animate(item[, item]*) - redisplay one or more items with little jitter (for animating a display)
- display(item[, item]*) - display one or more items to the notebook output area
- display_html(item)
- display_javascript(item)
- display_json(item)
- display_svg(item)
- display_png(item)
- display_jpeg(item)
- display_latex(item)
- display_pdf(item)
Examples:
for i in range(10): calico.animate(image) calico.display_json(json_data)
Rich Media Objects
All of the rich media objects are available from the Calico: calico object.
- Audio(URI)
- HTML(string)
- Javascript(string)
- Latex(string)
- Math(string)
- Table()
- Image(URI)
- YouTubeVideo(id, width, height)
- IFrame(src)
- SVG(xml)
- FileLink(filename)
- FileLinks(directory)
- VimeoVideo(id)
Examples:
calico.display(calico.HTML("<b>This is bold!</b>"))
calico.HTML('<iframe src=http://en.mobile.wikipedia.org/?useformat=mobile width=700 height=350></iframe>')
calico.Latex(""" \\begin{eqnarray} \\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\ \\nabla \\times \vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\ \\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \\end{eqnarray} """)
Widgets
Widgets allow for creating interactive interfaces, when connected to an executing kernel. All of the widgets are available from the Calico: calico object.
- AccordionWidget
- BoundedFloatTextWidget
- BoundedIntTextWidget
- ButtonWidget
- CameraWidget
- CheckboxWidget
- ContainerWidget
- DropdownWidget
- FloatProgressWidget
- FloatSliderWidget
- FloatTextWidget
- HTMLWidget
- ImageWidget
- IntProgressWidget
- IntSliderWidget
- IntTextWidget
- LatexWidget
- PasswordWidget
- PopupWidget
- RadioButtonsWidget
- SelectWidget
- TabWidget
- TextWidget
- TextareaWidget
- ToggleButtonWidget
- ToggleButtonsWidget
Those above that are container widgets:
- AccordionWidget
- ContainerWidget
- PopupWidget
- TabWidget
All of these widgets have display() and animate() methods.
widget.display() widget.animate()
w1 = calico.AccordionWidget(children=[calico.ButtonWidget()]) w2 = calico.BoundedFloatTextWidget(description="BoundedFloatTextWidget") w3 = calico.BoundedIntTextWidget(description="BoundedIntTextWidget") w4 = calico.ButtonWidget(description="ButtonWidget") w5 = calico.CameraWidget() # broken w6 = calico.CheckboxWidget("CheckboxWidget") w7 = calico.ContainerWidget(children=[calico.ButtonWidget()]) w8 = calico.DropdownWidget("DropDownWidget") w9 = calico.FloatProgressWidget(description="FloatProgressWidget") w10 = calico.FloatSliderWidget(description="FloatSliderWidget") w11 = calico.FloatTextWidget(description="FloatTextWidget") w12 = calico.HTMLWidget("<b>Hello World!</b>", "HTMLWidget") w13 = calico.ImageWidget(format="svg", _b64value="iVBORw0KGgoAAAANSUhEUgAAAQYAAAF0CAYAAADB35f2AAAABmJLR0QA/wD/AP+gvaeTAAAYAElEQVR4nO3df3xcdZ3v8ffnTJJpaNlCERbayg/rUgXZXaSQzCSwqZd11ZUfulKwSavoPhYVcK+P9brch8ACKi7q3rt3AV103UqTFAz3rrAo7gpuupDMJLUVf/BLAfnVlB/S8qulnSRzPvePpgt6mjY/zpwzybyef/Bg0jnfz+dkJu/5njPnhwQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6bG0G5gJ1vS2zWmYs+u8wO2nH8wX7027H8Sns9j8doXBH2TNb16RL+5Mu59qEaTdwExQP2fX37nbmrJU6O7P/2Ha/SAeXYXcCeZWNPN/Hjb/P2n3U00Ihglwt+PH/neOm/+DOzOtWWF3GDRIktzmpNtMdSEYJiIMLpA0Mvbo1HXF3AfSbAfT111sfr/clo89HA3Nv5hqQ1WGT74J6io2f0VufzX28MkG6S0zdZt0TW/bQZn6kTdnMuWDprJ8uZ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="IntProgressWidget") w15 = calico.IntSliderWidget(description="IntSliderWidget") w16 = calico.IntTextWidget(description="IntTextWidget") w17 = calico.LatexWidget("$x = \\frac{1}{2}$", description="LatexWidget") w18 = calico.PasswordWidget(description="PasswordWidget") #broken w19 = calico.PopupWidget(description="PopupWidget", children=[calico.ButtonWidget()]) w20 = calico.RadioButtonsWidget(description="RadioButtonsWidget") w21 = calico.SelectWidget(description="SelectWidget") w22 = calico.TabWidget(children=[calico.ButtonWidget("B1"), calico.ButtonWidget("B2")]) w23 = calico.TextWidget(description="TextWidget") w24 = calico.TextareaWidget(description="TextareaWidget") w25 = calico.ToggleButtonWidget(description="ToggleButtonWidget") w26 = calico.ToggleButtonsWidget(description="ToggleButtonsWidget")
for i in range(1, 27): var = "w%s" % i calico.display(globals()[var])
See http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Python/Sprites%20and%20Widgets.ipynb for an example.
Charts
In addition, there is Javascript-based charting thanks to Google:
data = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 10124] l = calico.GoogleChart("LineChart", data, {'vAxis': {'logScale': 1}}) calico.display(l) data = [(i, 2*i + 5) for i in range(100)] c = calico.GoogleChart("ColumnChart", ['x', 'y'], data) calico.display(c)
The format is
GoogleChart(TYPE-OF-CHART, KEY-LIST, DATA-LIST, OPTION-DICTIONARY)
- TYPE-OF-CHART: A string that corresponds to the kind of chart: "ScatterChart", "LineChart", "BarChart", "ColumnChart", "PieChart", "Histogram", and most of the other charts google makes available.
- KEY-LIST: A list of column titles. This argument is optional.
- DATA-LIST: The data you want to graph as either a one-dimensional or two-dimensional list (an IList) of items. The google charts expect the data as a table.
- OPTIONS-DICTIONARY: A dictionary (an IDictionary) of the options for the chart (e.g. color, size). This argument is optional.
More examples can be found in this example notebook.
ICalico
ICalico is a full IPython kernel. "icalico" will install a Calico profile into IPython. That means you can do the following:
To use ICalico in a console (similar to "calico --repl" but with all magics, etc):
ipython console --profile calico
To use ICalico in a graphical console (similar to notebook, but without browser):
ipython qtconsole --profile calico
ICalico Development
- ICalico_Development - ICalico Development