Git Product home page Git Product logo

icsharp.kernel's Introduction

Build Status License

ICSharp.Kernel

This is a Roslyn based C# kernel for Jupyter. View the Feature Notebook for features that are currently working in this kernel.

Building

Open ICSharpKernel.sln in Visual Studio 2017 on Windows or Mac and Build, or from the command line type msbuild.

Installation (Windows)

  1. Install Anaconda
  2. Install Jupyter
  3. Download current release v1.0-beta
  4. Unzip the release and run icsharp.exe
  5. If Jupyter is not launched then start manually jupyter notebook

Manual Installation (Mac)

  1. Install Anaconda
  2. Install Jupyter
  3. Install Mono (tested 4.2.4)
  4. Download current release v1.0-beta
  5. Unzip the release then run mono icsharp.exe
  6. If Jupyter is not launched then start manually jupyter notebook

Manual Installation (Linux)

TBA

Todo

  • Make Plotly work.
  • Make intellisense work.

Notes

The code is based on IfSharp kernel.

icsharp.kernel's People

Contributors

gyurisc 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

icsharp.kernel's Issues

Plotly extension method does not work in .csx

The following errors are happening when trying to call Svg or Png extension methods:

+// (9,1): error CS1929: 'PlotlyChart' does not contain a definition for 'Png' and the best extension method overload 'Png(PlotlyChart)' requires a receiver of type 'PlotlyChart'
+public static BinaryOutput Png(this PlotlyChart chart) =>

  • new BinaryOutput() { ContentType = "text/html", Data = chart.GetPngHtml() };

+// (9,1): error CS1929: 'PlotlyChart' does not contain a definition for 'Svg' and the best extension method overload 'Svg(PlotlyChart)' requires a receiver of type 'PlotlyChart'
+public static BinaryOutput Svg(this PlotlyChart chart) =>

  • new BinaryOutput() { ContentType = "text/html", Data = chart.GetSvgHtml() };

How to import 3rd party dlls?

I copied my dll to the icsharp.exe folder and using it with error "error CS0246: The type or namespace name 'xxx' could not be found (are you missing a using directive or an assembly reference?"

Notebook gets loaded and dont work

I have followed all the steps and I have got C# kernel in my notebook, but my notebook is getting loaded and not working. No error message is also getting displayed

CSharp for Jupyter Notebook

之前说有机会就说下Linux下如何搭建C#版的交互编程,今天写篇文章还债^_^

Win下比较简单,可以自己看官方文档https://github.com/zabirauf/icsharp/wiki/Installation下面逆天带搭建搭建下Linux下的环境(官方方法有问题)

CSharp交互式编程

1.安装mono部分组件

先看看官方仓库

安装mono部分组件,写段shell脚本,然后bash installmono.sh 直接执行

代码如下:

# add Ubuntu 18.04 repository
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
# 更新一下
sudo apt-get update -y
# 安装 mono-complete
sudo apt-get install mono-complete -y
# 安装 mono-dbg
sudo apt-get install mono-dbg -y                 
# 安装 mono-runtime-dbg
sudo apt-get install mono-runtime-dbg -y
# 导入证书
mozroots --import --machine --sync
# 查看mono版本
mono --version

看到这个就代表安装完成了

2.安装Jupyter-notebook

这部之前说过了,你安装了conda之后什么都有了,可以参考之前我写的一篇文章:

Anaconda For Linux

3.环境配置

下载release包:
https://github.com/gyurisc/icsharp.kernel/releases/download/v1.0-beta/icsharp_kernel_v1.0.zip

然后移动到/opt/目录下(装软件一般都放这)
现在你可以运行icsharp了:mono icsharp.exe

4.编写代码

新建一个C#的ipynb文件

输入代码,shift+回车运行

其他的自己摸索摸索吧,先这样了~

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.