Skip to content

Instantly share code, notes, and snippets.

@dmohl
dmohl / fsharp_keras_net.ipynb
Last active February 25, 2021 14:29
F# Keras.NET Text Sentiment Analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmohl
dmohl / gist:3e50ea69c3d31288b3e955c3f4193fb0
Last active February 16, 2021 21:39
GCloud Notebook Instance Creation
gcloud beta notebooks instances create dotnet-interactive-docker \
--container-repository=gcr.io/REPLACE_WITH_PROJECT_ID/interactive/dotnet-interactive \
--container-tag=latest \
--machine-type=n1-standard-4 \
--location=us-central1-b
@dmohl
dmohl / gist:c0baab54613fd75eda777319a71414d3
Created February 16, 2021 21:33
GCP Build .NET Interactive Docker Image
gcloud builds submit --tag gcr.io/REPLACE_WITH_PROJECT_ID/interactive/dotnet-interactive:latest
@dmohl
dmohl / Dockerfile
Created February 16, 2021 21:32
.NET Interactive Dockerfile
# Specifies base image and tag
FROM gcr.io/deeplearning-platform-release/base-cpu:latest
ENV \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
# Enable correct mode for dotnet watch (only mode supported in a container)
DOTNET_USE_POLLING_FILE_WATCHER=true \
# Skip extraction of XML docs - generally not useful within an image/container - helps performance
NUGET_XMLDOC_MODE=skip \
@dmohl
dmohl / install_net_interactive
Created February 15, 2021 23:54
Install .NET Interactive
dotnet tool install -g --add-source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" Microsoft.dotnet-interactive --version 1.0.155302
export PATH=$PATH:$HOME/.dotnet/tools
dotnet interactive jupyter install
@dmohl
dmohl / install_net_sdk
Created February 15, 2021 23:54
Install .NET SDK
wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update;
sudo apt-get install -y dotnet-sdk-3.1
@dmohl
dmohl / fsharp_colab_example.ipynb
Last active February 15, 2021 20:40
fsharp_colab_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ViewModels;assembly=FsEmptyWindowsApp1"
xmlns:fsxaml="http://github.com/fsprojects/FsXaml"
Title="MVVM and XAML Type provider" Height="200" Width="400">
<Window.DataContext>
<local:MainViewModel/>
</Window.DataContext>
<Grid>
@dmohl
dmohl / FsXamlExXaml.fs
Last active August 29, 2015 14:10
FsXaml XAML example
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<TextBlock Margin="5" Text="Enter Your Name:" FontSize="16" Grid.Row="0" Grid.ColumnSpan="2" />
@dmohl
dmohl / gist:01d1448a902f2c6d83cc
Created December 1, 2014 03:14
FsXaml ViewModel
namespace ViewModels
open System
open System.Windows
open FSharp.ViewModule
open FSharp.ViewModule.Validation
open FsXaml
type MainView = XAML<"MainWindow.xaml", true>