Skip to content

Instantly share code, notes, and snippets.

View RobotOptimist's full-sized avatar

James RobotOptimist

View GitHub Profile
@RobotOptimist
RobotOptimist / Dockerfile
Last active March 30, 2021 12:00
ML.NET Natural Language Processing
FROM jmacivor/dotnet-binder:0.1.1
ARG NB_USER=jovyan
ARG NB_UID=1000
USER $NB_USER
ENV HOME=/home/$NB_USER
WORKDIR $HOME
@RobotOptimist
RobotOptimist / Restaurant_Reviews.tsv
Last active March 30, 2021 11:43
Python Sentiment Analysis
Review Liked
Wow... Loved this place. 1
Crust is not good. 0
Not tasty and the texture was just nasty. 0
Stopped by during the late May bank holiday off Rick Steve recommendation and loved it. 1
The selection on the menu was great and so were the prices. 1
Now I am getting angry and I want my damn pho. 0
Honeslty it didn't taste THAT fresh.) 0
The potatoes were like rubber and you could tell they had been made up ahead of time being kept under a warmer. 0
The fries were great too. 1
@RobotOptimist
RobotOptimist / packageUpdater.ps1
Created March 8, 2021 20:57
PowerShell get nuget versions and update package.config
$nugetValues = Find-Package -Source "The Feed" | Select-Object Name, Version
$filePath = "muh\path\mmkay\packages.config"
[xml]$file = Get-Content -Path $filePath
foreach ($package in $file.packages.package) {
$nugetVersion = ($nugetValues | Where-Object Name -eq $package.id | Select-Object Version).Version
$nugetVersion
if ($null -ne $nugetVersion -and $nugetVersion -ne '') {
$package.version = $nugetVersion
@RobotOptimist
RobotOptimist / Dockerfile
Last active December 21, 2020 01:59
ML.NET polynomial regression
FROM jmacivor/dotnet-binder:0.1.1
ARG NB_USER=jovyan
ARG NB_UID=1000
USER $NB_USER
ENV HOME=/home/$NB_USER
WORKDIR $HOME
Position Level Salary
Business Analyst 1 45000
Junior Consultant 2 50000
Senior Consultant 3 60000
Manager 4 80000
Country Manager 5 110000
Region Manager 6 150000
Partner 7 200000
Senior Partner 8 300000
C-level 9 500000
@RobotOptimist
RobotOptimist / Dockerfile
Last active December 16, 2020 17:59
Wealth Disparity By Luck
FROM jmacivor/dotnet-binder:0.1.1
ARG NB_USER=jovyan
ARG NB_UID=1000
USER $NB_USER
ENV HOME=/home/$NB_USER
WORKDIR $HOME
@RobotOptimist
RobotOptimist / 50_Startups.csv
Last active December 6, 2020 12:58
ML.NET Multiple Linear Regression
R&D Spend Administration Marketing Spend State Profit
165349.2 136897.8 471784.1 New York 192261.83
162597.7 151377.59 443898.53 California 191792.06
153441.51 101145.55 407934.54 Florida 191050.39
144372.41 118671.85 383199.62 New York 182901.99
142107.34 91391.77 366168.42 Florida 166187.94
131876.9 99814.71 362861.36 New York 156991.12
134615.46 147198.87 127716.82 California 156122.51
130298.13 145530.06 323876.68 Florida 155752.6
120542.52 148718.95 311613.29 New York 152211.77
@RobotOptimist
RobotOptimist / 50_Startups.csv
Last active December 3, 2020 18:43
Python Multiple Linear Regression
165349.2 136897.8 471784.1 New York 192261.83
162597.7 151377.59 443898.53 California 191792.06
153441.51 101145.55 407934.54 Florida 191050.39
144372.41 118671.85 383199.62 New York 182901.99
142107.34 91391.77 366168.42 Florida 166187.94
131876.9 99814.71 362861.36 New York 156991.12
134615.46 147198.87 127716.82 California 156122.51
130298.13 145530.06 323876.68 Florida 155752.6
120542.52 148718.95 311613.29 New York 152211.77
@RobotOptimist
RobotOptimist / Dockerfile
Created November 22, 2020 20:01
Binder Dotnet Dockerfile For Base Image
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-focal
USER root
RUN cd /tmp
# now get the key:
RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
# now install that key
RUN apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
# now remove the public key file exit the root shell
RUN rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
@RobotOptimist
RobotOptimist / Dockerfile
Last active November 22, 2020 19:56
MLNET Simple Regression
FROM jmacivor/dotnet-binder:0.1.1
ARG NB_USER=jovyan
ARG NB_UID=1000
USER $NB_USER
ENV HOME=/home/$NB_USER
WORKDIR $HOME