Giter Site home page Giter Site logo

dgrechka / ifsharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fsprojects/ifsharp

0.0 2.0 0.0 14.44 MB

F# for Jupyter Notebooks

License: Other

Jupyter Notebook 91.42% Batchfile 0.02% F# 5.51% Shell 0.03% Inno Setup 0.08% Python 0.01% JavaScript 2.11% CSS 0.70% C# 0.13%

ifsharp's Introduction

IfSharp, Jupyter and F# Azure Notebooks

This is the F# implementation for Jupyter. View the Feature Notebook for some of the features that are included.

You can use Jupyter F# Notebooks for free (with free server-side execution) at Azure Notebooks. If you select "Show me some samples", then there is an "Introduction to F#" which guides you through the language and its use in Jupyter.

Build status: Build status (master/Windows) Build Status (master/Travis)

Compatibility

IfSharp supports Jupyter 4.0-5.2 and works with both Python 2.X and Python 3.X

If you need IPython 1.x or 2.x support please see the archived https://github.com/fsprojects/IfSharp/tree/ipython-archive

Automatic Installation

Previous releases for the IPython notebook are here: release repository. Automatic installs for Jupyter will be provided in the future.

Running inside a Docker container

There is a Docker file for running the F# kernel v. 3.0.0-alpha in a container. Build the container with:

docker build -t ifsharp:3.0.0-alpha .

Run it with:

docker run -d -v your_local_notebooks_dir:/notebooks -p your_port:8888 ifsharp:3.0.0-alpha

The container exposes a volume called notebooks where the files get saved. On Linux, connect to the notebook on http://localhost:your_port and, on Windows, use http://your_docker_machine:your_port.

Manual Installation (Windows)

  1. Download Anaconda for Python 3.6
  2. Launch Anaconda3-4.4.0-Windows-x86_64.exe (or later exe should work, file an issue if you have issues) Click through the installation wizard, choosing the given install location. At the 'advanced installation options' screen shown below, select "Add Anaconda to my PATH environment variable". The installer warns against this step, as it can clash with previously installed software, however it's currently essential for running IfSharp. Now install.

This should also install Jupyter: you may check this by entering 'jupyter notebook' into the Anaconda console window. If Jupyter does not launch (it should launch in the browser), install using 'pip install jupyter', or by following Jupyter instructions.

Installation screenshot


  1. Download current zip release of IfSharp v3.0.0-beta3
  2. Run IfSharp.exe (IfSharp application icon).

Jupyter will start and a notebook with F# can be selected. This can be run via "jupyter notebook" in future

Troubleshooting

If the launch fails in the console window, check that the Anaconda version used is currently added to the path. If not, uninstalling Anaconda and reinstalling using instructions 1-

Manual Installation (Mac)

  1. Install Jupyter via pip or Anaconda etc.
  2. Install Mono (tested Mono 5.10.0.1)
  3. Download current IfSharp zip release v3.0.0-beta3
  4. Unzip the release then run mono ifsharp.exe

Jupyter will start and a notebook with F# can be selected. This can be run via "jupyter notebook" in future

Manual Installation (Linux)

  1. Install Jupyter via pip or Anaconda etc.
  2. Install Mono (Tested mono 5.2) and F# (tested 4.1).
  3. Download the current IfSharp zip release v3.0.0-beta3
  4. Unzip the release then run mono ifsharp.exe (this sets up the Jupyter kernel files in ~/.local/share/jupyter/kernels/ifsharp/)

Jupyter will start and a notebook with F# can be selected. This can be run via "jupyter notebook" in future

Manual Installation (Linux - HDInsights)

  1. Follow instructions to install or update Mono on HDInsights.
  2. SSH into the HDInsights cluster.
  3. Download the current Ifsharp zip release v3.0.0-beta3 with the following commands:
# create ifsharp folder under /tmp
mkdir ifsharp
cd ifsharp
wget https://github.com/fsprojects/IfSharp/releases/download/v3.0.0-beta3/IfSharp.v3.0.0-beta3.zip
unzip IfSharp.v3.0.0-beta3.zip
chmod +x ifsharp.exe
  1. From the Azure portal, open your cluster. See List and show clusters for the instructions. The cluster is opened in a new portal blade.

  2. From the Quick links section, click Cluster dashboards to open the Cluster dashboards blade. If you don't see Quick Links, click Overview from the left menu on the blade.

  3. Click Jupyter Notebook. If prompted, enter the admin credentials for the cluster.

    [!NOTE] You may also reach the Jupyter notebook on Spark cluster by opening the following URL in your browser. Replace CLUSTERNAME with the name of your cluster:

    https://CLUSTERNAME.azurehdinsight.net/jupyter

  4. Click New, and then click Terminal.

  5. In the terminal window cd into the /tmp/ifsharp/ folder and using mono, run the installer:

cd /tmp/ifsharp
mono ifsharp.exe
  1. Back on the Jupyter homepage, click New and you will now see the F# kernel installed.

Screens

Intellisense

Intellisense Example #1


Intellisense Example #2


Intellisense Example #4 #r Directive


Intellisense Example #5 #load Directive


Integrated NuGet

NuGet Example

Inline Error Messages

Inline Error Message

ifsharp's People

Contributors

cgravill avatar npmurphy avatar rickasaurus avatar prosconi avatar sylvanc avatar dsyme avatar frelon avatar luminescent avatar cdrnet avatar dcharbon avatar pblasucci avatar smoothdeveloper avatar williamberryiii avatar algunion avatar nrolland avatar jancura avatar agnescameron avatar smcl avatar

Watchers

James Cloos avatar Dmitry A. Grechka avatar

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.