This commit is contained in:
Diego 2019-11-05 18:31:46 +00:00
Родитель bc4c33b285
Коммит e6a046f574
7 изменённых файлов: 102 добавлений и 129 удалений

Просмотреть файл

@ -1,25 +1,23 @@
# Share your notebooks on [Binder](https://mybinder.org/)
###### How to share your .NET Jupyter Notebook
If you want to share notebooks you have made using .Net kernels one easy way is to generate a binder image that everyone can open and execute.
## How to share your .NET Jupyter Notebook
If you want to share notebooks you have made using the .NET Jupyter kernel, one easy way is to generate a Binder image that anyone can run on the web.
Requisites:
### Prerequisites:
* A Github repo and at least one notebook to share
* **Dockerfile** to create the binder image
* **Nuget.Config** file to provide package source to use in notebooks
* A GitHub repo and at least one notebook to share
* **Dockerfile** to create the Binder image
* A **Nuget.Config** file to provide package sources needed by your notebooks
You can use the Dockerfile and Nuget.Config files from the folder `Binder Dependecies` to get started.
## Steps
### Setup instructions
The repo file structure should look something like this.
The repo file structure should look something like this:
<img src ="https://user-images.githubusercontent.com/375556/67017073-19137180-f0f1-11e9-9744-b5f8ec532e32.png" width = "30%">
The Dockerfile will install dotnet sdk
,then copy the notebooks and Nuget.config to folder under the notebook user
The Dockerfile will install the .NET SDK, then copy the notebooks and Nuget.config to the notebooks folder.
```docker
# Copy notebooks
@ -36,31 +34,31 @@ USER ${USER}
Now push your changes to [github](https://github.com/).
Open a browser on [MyBinder homepage](https://mybinder.org/).
Open a browser to [Binder](https://mybinder.org/).
<img src ="https://user-images.githubusercontent.com/375556/67016428-16fce300-f0f0-11e9-98e7-d066ecb91049.png" width="70%">
Put your repository url and branch
Enter your repository URL and branch.
<img src = "https://user-images.githubusercontent.com/375556/67016633-66dbaa00-f0f0-11e9-8a6d-c7191de3142e.png" width="70%">
Press **launch** to test your binder.
Press launch to test your binder.
During development it is useful to use a commit hash so that you can test different commits at the same time.
During development it is useful to use a commit hash so that you can even test different commits at the same time.
When happy with the result expand the section to reveal the link and badge code so you can now embed it in your blogs and posts.
When you're happy with the result, expand the section to reveal the badge code, which you can embed in your blogs and posts.
<img src = "https://user-images.githubusercontent.com/375556/67016821-bd48e880-f0f0-11e9-8c79-4fc97a06741a.png" width = "70%">
## Start in jupyter Lab
Binder will start with jupyter notebook ux, if you want to default to jupyter lab then add `?urlpath=lab` query parameter to the url of your badge.
## Start in Jupyter Lab
For example turn
By default, Binder will start with the Jupyter Notebook frontend. If you prefer to use JupyterLab, just add the query parameter `?urlpath=lab` to the URL in your badge.
For example, change this:
```[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dotnet/try/master)```
into
into this:
```[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dotnet/try/master?urlpath=lab)```

Просмотреть файл

@ -1,30 +0,0 @@
# Try .NET <img src ="https://user-images.githubusercontent.com/2546640/56708992-deee8780-66ec-11e9-9991-eb85abb1d10a.png" width="80px" alt="dotnet bot in space" align ="right">
|| [**Basics**](#basics) • [**Experiences**](#experiences) || [**Setup**](#setup) • [**Getting Started**](#getting-started) || [**Samples**](https://github.com/dotnet/try-samples) ||
![Try_.NET Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/try/try-ci?branchName=master)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=495&branchName=master)
## Basics
**What is Try .NET**: Try .NET is an interactive documentation generator for .NET Core.
**Please Note**: At the moment Try .NET only works with C# documentation.
## Experiences
Use Try .NET to create executable C# snippets for your websites or, interactive markdown files that users can run on their machine.
**Websites**
Microsoft Docs uses Try .NET to create interactive documentation. Users can run and edit code all in the browser.
<img src ="https://user-images.githubusercontent.com/2546640/57144765-c850cc00-6d8f-11e9-982d-50d2b6dc3591.gif" width = "80%">
**Interactive .NET documentation**
Try .NET enables .NET developers to create interactive markdown files.
To make your markdown files interactive, you will need to [.NET Core 3.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0), the dotnet try global tool and [Visual Studio](https://visualstudio.microsoft.com/) / [VS Code](https://code.visualstudio.com/)(or any other editor of your choice).
<img src ="https://user-images.githubusercontent.com/2546640/57158389-47a2c780-6db1-11e9-96ad-8c6e9ab52853.png" width = "80%">
To get started follow [setup](DotNetTryLocal.md) instructions

Просмотреть файл

@ -1,43 +1,42 @@
# Getting started with dotnet try
## Setup
Before you get can start creating interactive documentation, you will need to install the following:
- [.NET Core 3.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0)
- [dotnet try global tool](https://www.nuget.org/packages/dotnet-try/)
Before you get can started creating interactive documentation, you will need to install the following:
`dotnet tool install --global dotnet-try`
- The [.NET Core 3.0 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0)
- The [.NET Core 2.1 SDK](https://dotnet.microsoft.com/download/dotnet-core/2.1)
- The [dotnet try](https://www.nuget.org/packages/dotnet-try/) global tool
Updating to the latest version of the tool is easy just run the command below
Updating to the latest version of the tool is easy. Run the following command:
`dotnet tool update -g dotnet-try`
Once you have successfully installed `dotnet try` global tool, enter the command `dotnet try -h` you will see a list of commands:
| Command | Purpose |
|----------------|----------------------------------------|
| `demo` | Learn how to create Try .NET content with an interactive demo |
| `verify` | Verify Markdown files in the target directory and its children. |
```console
> dotnet tool update -g dotnet-try
```
## Installing preview builds from `master`
To install the latest preview build from master, first uninstall the existing version of the tool:
`dotnet tool uninstall -g dotnet-try`
```console
> dotnet tool uninstall -g dotnet-try
```
Then, install from the preview package feed:
Then install from the preview package feed:
`dotnet tool install -g --add-source "https://dotnet.myget.org/F/dotnet-try/api/v3/index.json" dotnet-try`
```console
> dotnet tool install -g --add-source "https://dotnet.myget.org/F/dotnet-try/api/v3/index.json" dotnet-try
```
## Getting Started
You can get started using either one of the options below.
**Option1**: `dotnet try demo`
### Option1: `dotnet try demo`
- Create a new folder.
- `cd` to your new folder.
- Run command `dotnet try demo` : This will load our interactive dotnet try getting started tutorial.
<img src = "https://user-images.githubusercontent.com/2546640/68031087-4c2d3780-fc91-11e9-803f-228116e6afa2.png" width ="80%">
The tutorials below work you through the following:
- Creating a new Try .NET project.
- Display interactive snippets using C# regions.
- Creating Sessions
@ -45,15 +44,16 @@ The tutorials below work you through the following:
- Passing Arguments
- Using read only snippets
**Option 2**: Starting from scratch.
### Option 2: Starting from scratch.
1. Go to the terminal and create a folder called `mydoc`.
2. `cd` to the `mydoc` folder and create a new console app with the following command
```console
> dotnet new console -o myApp
2. `cd` to the `mydoc` folder and create a new console app with the following command:
```console
> dotnet new console -o myApp
```
This will create a console app with the files `myApp.csproj` and `Program.cs`.
3. Open `mydoc`folder in Visual Studio Code.
3. Open the `mydoc` folder in Visual Studio Code.
4. Create a file called `doc.md`. Inside that file, add some text and a code fence:
@ -63,13 +63,13 @@ This will create a console app with the files `myApp.csproj` and `Program.cs`.
```cs --source-file ./myApp/Program.cs --project ./myApp/myApp.csproj
```
````
5. Now, navigate back to the `mydoc` folder and run the following command:
5. Now, navigate to the `mydoc` folder in your console and run the following command:
```console
> dotnet try
```
You have created your first C# interactive developer experience. You should now be able to run your console app and see the result in the browser.
**Option 3**: Explore our [samples Repo](https://github.com/dotnet/try-samples).
### Option 3: Explore our [samples repo](https://github.com/dotnet/try-samples).
- Clone the [dotnet/try-samples](https://github.com/dotnet/try-samples) repo.
- Follow the quick steps listed [here](https://github.com/dotnet/try-samples#basics) to get started.

Просмотреть файл

@ -1,9 +1,8 @@
# Jupyter Notebooks with .NET Core | Preview 1 <img src ="https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Jupyter_logo.svg/207px-Jupyter_logo.svg.png" width="38px" alt="dotnet bot in space" align ="right">
The documentation provide in this repo shows you how you can try, create and share .NET Jupyter Notebooks.
There are several ways to get started using .NET with Jupyter.
Guide to getting started with .NET Notebooks
- [Try .NET Jupyter notebooks](NotebooksOnBinder.md) : try our lastest online using binder.
- [Create your notebook on your machine](NotebooksLocalExperience.md) : Get started locally.
- [Share your .NET Notebook](CreateBinder.md) : Create your own binder and share with others.
- [Try sample .NET notebooks online using Binder](NotebooksOnBinder.md).
- [Create and run .NET notebooks on your machine](NotebooksLocalExperience.md).
- [Share your own .NET notebooks with others online using Binder](CreateBinder.md).

Просмотреть файл

@ -1,50 +1,57 @@
# Create .NET Jupyter Notebooks
##### Getting started locally on your machine
### Installation
## Installing the .NET kernel for Jupyter
Requirements
- [.NET 3.0 SDK](https://dotnet.microsoft.com/download) (follow the setup for your OS)
- [Jupyter](https://jupyter.org/install) : JupyterLab can be installed using [Anaconda](https://www.anaconda.com/distribution) or `conda` or `pip`. For more details on how to do this please checkout the [offical Jupyter installation](https://jupyter.org/install) guide.
First, make sure you have the following installed:
### Install the .NET Kernel
- Open Command Prompt or if you have Anaconda installed use Anaconda Prompt
- Install the dotnet try global tool
- The [.NET 3.0 SDK](https://dotnet.microsoft.com/download).
- **Jupyter**. Jupyter can be installed using [Anaconda](https://www.anaconda.com/distribution).
`dotnet tool install -g dotnet-try --add-source https://dotnet.myget.org/F/dotnet-try/api/v3/index.json`
- Open the Anaconda Prompt and verify that Jupyter is installed:
*Please note: If you have the `dotnet try` global tool already installed, you will need to uninstall before grabbing the kernel enabled version of the dotnet try global tool.*
- Check to see if jupyter is installed
```console
> jupyter kernelspec list
python3 ~\jupyter\kernels\python3
```
`jupyter kernelspec list`
- Next, in an ordinary console, install the `dotnet try` global tool:
```console
> dotnet tool install -g dotnet-try
```
- Install the .NET kernel by running the following within your Anaconda Prompt:
```console
> dotnet try jupyter install
[InstallKernelSpec] Installed kernelspec .net-csharp in ~\jupyter\kernels\.net-csharp
.NET kernel installation succeeded
[InstallKernelSpec] Installed kernelspec .net-fsharp in ~\jupyter\kernels\.net-fsharp
.NET kernel installation succeeded
```
- Install the kernel
- You can verify the installation by running the following again in the Anaconda Prompt:
`dotnet try jupyter install`
```console
> jupyter kernelspec list
.net-csharp ~\jupyter\kernels\.net-csharp
.net-fsharp ~\jupyter\kernels\.net-fsharp
python3 ~\jupyter\kernels\python3
```
<img src ="https://user-images.githubusercontent.com/2546640/63954737-93106e00-ca51-11e9-8c72-939f3f558d05.png" width = "50%">
- Test installation
## Using Jupyter with .NET
`jupyter kernelspec list`
To launch JupyterLab, you can either type `jupyter lab` in the Anaconda Prompt or launch a notebook using the Anaconda Navigator.
You should see the `.net-csharp` and `.net-fsharp` listed.
<img src ="https://user-images.githubusercontent.com/2546640/67889556-76fa7d00-fb25-11e9-9d23-e4178642b721.png" width ="70%">
Once Jupyter Lab has launched in your browser, you have the option to create a notebook for C# or F#.
* To start a new notebook, you can either type `jupyter lab` Anaconda prompt or launch a notebook using the Anaconda Navigator.
* Once Jupyter Lab has launched in your preferred browser, you have the option to create a **C# and F# notebook**.
<img src = "https://user-images.githubusercontent.com/2546640/67889988-3b13e780-fb26-11e9-91a1-48d5972b5df2.png" width = "70%">
<img src = "https://user-images.githubusercontent.com/2546640/67889988-3b13e780-fb26-11e9-91a1-48d5972b5df2.png" width = "70%">
Once the notebook opens, you can start working with .NET in the language you chose.
- Now you can write .NET
<img src = "https://user-images.githubusercontent.com/2546640/67981834-db860c80-fbf7-11e9-89b5-29d2480ed1fa.png" width = "70%">
<img src = "https://user-images.githubusercontent.com/2546640/67981834-db860c80-fbf7-11e9-89b5-29d2480ed1fa.png" width = "70%">
For more information on the .NET notebook experience, please check out our samples and documentation on [Binder](https://mybinder.org/v2/gh/dotnet/try/master?urlpath=lab).
For more information on our APIs via C# and F#, please check out our documentation on [binder](https://mybinder.org/v2/gh/dotnet/try/master?urlpath=lab) or in dotnet/try repo in the NotebookExamples folder.
<img src = "https://user-images.githubusercontent.com/2546640/67980555-120e5800-fbf5-11e9-9c00-0d021b1ed21c.png" width = "40%">
Now that you have created your .NET notebook, you probably want to share it with others. In the [next document](CreateBinder.md), you will learn how to share your .NET notebook with others using binder.
Happy sharing!
Once you've created a .NET notebook, you might want to share it with others. In the [next document](CreateBinder.md), you will learn how to share your .NET notebook with others using binder.

Просмотреть файл

@ -1,6 +1,6 @@
# Use our latest version on [Binder](https://mybinder.org/)
###### Zero install - try our .NET Jupyter Notebook.
## Zero install - try our .NET Jupyter Notebook.
**Requirement :** A browser

Просмотреть файл

@ -1,41 +1,40 @@
# Try .NET <img src ="https://user-images.githubusercontent.com/2546640/56708992-deee8780-66ec-11e9-9991-eb85abb1d10a.png" width="80px" alt="dotnet bot in space" align ="right">
|| [**Contribution Guidelines**](#contribution) || [**Table of content**](#table-of-content) || [**Customers & Partners**](#customers--partners) ||
|| [**Contribution Guidelines**](#contribution) || [**Table of content**](#table-of-contents) || [**Customers & Partners**](#customers--partners) ||
![Try_.NET Enabled](https://img.shields.io/badge/Try_.NET-Enabled-501078.svg)
[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/try/try-ci?branchName=master)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=495&branchName=master)
**Welcome to the Try .NET repo.**
## Welcome to the Try .NET repo.
Try .NET provides developers and content with tools to create interactive experiences.
Try .NET provides developers and content authors with tools to create interactive experiences.
There are different flavors of Try .NET interactive experiences from the web with blazor(as seen on [Microsoft docs](https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/intro-to-csharp/hello-world)), interactive documentation generator for .NET core with [dotnet try global tool](DotNetTry.md), and [.NET Jupyter Notebooks](Notebook.md).
There are different flavors of Try .NET interactive experiences, from the web experience powered by Blazor (as seen on [Microsoft docs](https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/intro-to-csharp/hello-world)), to interactive documentation for .NET Core with the [dotnet try global tool](DotNetTry.md), to [.NET Jupyter Notebooks](Notebook.md).
### Flavors of Try .NET
**Try .NET Online**
## Flavors of Try .NET
### Try .NET Online
<img src="https://user-images.githubusercontent.com/2546640/57144765-c850cc00-6d8f-11e9-982d-50d2b6dc3591.gif" width="60%">
**Interactive .NET Core documentation with `dotnet try global tool`**
### Interactive .NET Core documentation with the `dotnet try` global tool
<img src="https://user-images.githubusercontent.com/2546640/57158389-47a2c780-6db1-11e9-96ad-8c6e9ab52853.png" width="52%">
**Jupyter Notebooks with .NET**
### Jupyter Notebooks with .NET
<img src="https://user-images.githubusercontent.com/2546640/67889988-3b13e780-fb26-11e9-91a1-48d5972b5df2.png" width="60%">
<img src="https://user-images.githubusercontent.com/2546640/67912370-1b99b080-fb60-11e9-9839-0058d02488cf.png" width="52%">
Our interactive experience powers the online interactive .NET documentation, [dotnet try global tool](DotNetTry.md) and [Notebooks](Notebook.md).
## Table of Content
## Table of Contents
- [Getting Started with Try .NET](DotNetTry.md): Interactive documentation generator for .NET Core.
- [Getting started with .NET Jupyter Notebooks](Notebook.md) : Write and run .NET code in Jupyter Notebooks
## Contribution Guidelines
As we are still in the early stages of our development, we are unable to take any feature PRs at the moment but, we do intend to do this in the future.
Please feel free to file any bugs reports under our issues. And if you have any feature suggestion, please submit them under our issues using the community suggestions label.
As we are still in the early stages of our development, we are unable to take any feature PRs at the moment, but we intend to do so in the future.
If you find an issue or have a feature suggestion, please open an [issue](https://github.com/dotnet/try/issues/new/choose). And if you have any feature suggestions, please submit them using the "community suggestions" label.
## Customers & Partners
| Microsoft Docs | [Azure Synapse Analytics ](https://azure.microsoft.com/en-us/services/synapse-analytics/) |Azure HDInsight (HDI) |