9

Random Ravings of a Red Headed Code Monkey

 3 years ago
source link: http://bloggemdano.blogspot.com/2021/02/f-in-google-colab-notebooks.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

F# in Google Colab Notebooks

.NET Interactive
.NET Interactive is a tool provided by Microsoft which among other things makes it easy to use .NET (C#, F#, and PowerShell) in Jupyter Notebooks.
Google Colab
Google Colab is a free, cloud hosted Jupyter notebook environment that includes access to GPUs. The Colab environment provides kernels for R, Python 2, Python 3, and Swift by default.
F# on Colab
Colab doesn't currently offer a streamlined option for adding additional kernels. However, enabling .NET via .NET Interactive is relatively easy to accomplish.
1. In Colab upload an IPython Notebook (*.ipynb) file that includes the kernelspec set to ".net-fsharp"
2. Execute code to install the .NET SDK and .NET Interactive. Wait for all steps to complete. Note: A message will appear indicating that .net-fsharp is an unrecognized runtime. This can be ignored.
3. In the Colab File menu, select "Runtime" -> "Change runtime type" then "Save" on the resulting popup window.
4. You can now execute F# in new code cells. 
A Gist with the full example is below:

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK