Skip to content

Instantly share code, notes, and snippets.

View RobotOptimist's full-sized avatar

James RobotOptimist

View GitHub Profile
@RobotOptimist
RobotOptimist / image-from-builtin-content-type.md
Created February 12, 2020 14:19
Sitefinity code snippits and explanations

get an image from a built in content type

For news and events content items you can't use the built in GetRelatedItems or anything like you would with a Dynamic Content Item. Instead you have to do this to get a related item, this is for an Image (in cshtml):

@model Telerik.Sitefinity.Frontend.Mvc.Models.ContentDetailsViewModel

@using Telerik.Sitefinity.Libraries.Model
@RobotOptimist
RobotOptimist / Salary_Data.csv
Last active November 18, 2020 16:30
Simple Regression in Python
YearsExperience Salary
1.1 39343.00
1.3 46205.00
1.5 37731.00
2.0 43525.00
2.2 39891.00
2.9 56642.00
3.0 60150.00
3.2 54445.00
3.2 64445.00
@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
@RobotOptimist
RobotOptimist / 50_Startups.csv
Last active December 3, 2020 18:43
Python 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 6, 2020 12:58
ML.NET 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
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 / 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
@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 / 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 / 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