Skip to content

Instantly share code, notes, and snippets.

View ginomessmer's full-sized avatar

Gino Messmer ginomessmer

View GitHub Profile
using System;
using System.IO;
using Microsoft.ML;
using Microsoft.ML.Data;
var dataPath = Path.Combine(Environment.CurrentDirectory, "skills.csv");
var mlContext = new MLContext();
var dataView = mlContext.Data.LoadFromTextFile<SkillData>(dataPath, ',', true);
const string featuresColumnName = "Features";
@ginomessmer
ginomessmer / SkillDatingMatrixFactorization.Program.cs
Created March 15, 2021 20:12
SkillDatingMatrixFactorization
using Microsoft.ML;
using Microsoft.ML.Data;
using Microsoft.ML.Trainers;
using System;
using System.IO;
// In machine learning, the columns that are used to make a prediction are called Features,
// and the column with the returned prediction is called the Label.
// We want to predict interest ratings => Label
@ginomessmer
ginomessmer / AddGameCommand.cs
Created November 13, 2020 10:22
C# 9 Design Pattern Samples
public record AddGameCommand(string Title, DateTime ReleaseDate, TimeSpan HoursPlayed)
{
public class AddGameCommandHandler
{
// ...
public void Handle(AddGameCommand request)
{
_db.Add("game", request);
}
}
@ginomessmer
ginomessmer / readme.json
Last active July 12, 2020 19:15
Readme Content
{
}
version: '3.8'
services:
gateway:
networks:
- traefik
- default
deploy:
labels:
- "traefik.enable=true"
version: '3.8'
services:
gateway:
image: unidash/gateway
build:
context: .
dockerfile: Unidash.Gateway/Dockerfile
auth:
version: '3.8'
services:
traefik:
image: traefik:v2.2
ports:
- "80:80"
- "443:443"
command:
- --api.insecure=true # set to 'false' on production
@ginomessmer
ginomessmer / docker-compose.dev.yml
Last active June 27, 2020 14:31
Unidash Back-End Docker Stack
version: '3.4'
services:
gateway:
networks:
- traefik
- default
deploy:
labels:
- "traefik.enable=true"
using Unidash.Auth.Domain.UserAggregate;
using MediatR;
namespace Unidash.Auth.Users.Queries
{
public class FindUserQuery : IRequest<User>
{
public string Id { get; set; }
public FindUserQuery(string id)
using MediatR;
namespace Unidash.Auth.Users.Commands
{
public class CreateUserCommand : IRequest
{
public string Id { get; private set; }
public string DisplayName { get; private set; }