This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.5 | |
ADD app /app | |
RUN pip install --upgrade pip | |
RUN pip install https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.5.0/tensorflow-1.5.0-cp35-none-linux_armv7l.whl | |
RUN pip install -r /app/requirements.txt | |
# Expose the port | |
EXPOSE 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Position : IEquatable<Position> | |
{ | |
public double Latitude { get; set; } | |
public double Longitude { get; set; } | |
public bool Equals([AllowNull] Position other) | |
=> (Latitude, Longitude) == (other?.Latitude, other?.Longitude); | |
public override bool Equals(object obj) => Equals(obj as Position); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
namespace System.Threading | |
{ | |
public class AsyncLock : IDisposable | |
{ | |
private readonly SemaphoreSlim semaphoreSlim = new SemaphoreSlim(1, 1); | |
public async Task<AsyncLock> LockAsync() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var frullino = 0; frullino < 42; frullino++) | |
{ | |
System.Console.WriteLine("Taggia"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DateOnlyConverter : JsonConverter<DateOnly> | |
{ | |
private readonly string serializationFormat; | |
public DateOnlyConverter() : this(null) | |
{ | |
} | |
public DateOnlyConverter(string? serializationFormat) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TimeOnlyConverter : JsonConverter<TimeOnly> | |
{ | |
private readonly string serializationFormat; | |
public TimeOnlyConverter() : this(null) | |
{ | |
} | |
public TimeOnlyConverter(string? serializationFormat) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DateOnlyConverter : ValueConverter<DateOnly, DateTime> | |
{ | |
public DateOnlyConverter() : base( | |
dateOnly => dateOnly.ToDateTime(TimeOnly.MinValue), | |
dateTime => DateOnly.FromDateTime(dateTime)) | |
{ | |
} | |
} | |
public class DateOnlyComparer : ValueComparer<DateOnly> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TimeOnlyConverter : ValueConverter<TimeOnly, TimeSpan> | |
{ | |
public TimeOnlyConverter() : base( | |
timeOnly => timeOnly.ToTimeSpan(), | |
timeSpan => TimeOnly.FromTimeSpan(timeSpan)) | |
{ | |
} | |
} | |
public class TimeOnlyComparer : ValueComparer<TimeOnly> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#@ template hostSpecific="true" debug="false" #> | |
<#@ assembly name="Microsoft.EntityFrameworkCore" #> | |
<#@ assembly name="Microsoft.EntityFrameworkCore.Design" #> | |
<#@ assembly name="Microsoft.EntityFrameworkCore.Relational" #> | |
<#@ assembly name="Microsoft.Extensions.DependencyInjection.Abstractions" #> | |
<#@ parameter name="EntityType" type="Microsoft.EntityFrameworkCore.Metadata.IEntityType" #> | |
<#@ parameter name="Options" type="Microsoft.EntityFrameworkCore.Scaffolding.ModelCodeGenerationOptions" #> | |
<#@ parameter name="NamespaceHint" type="System.String" #> | |
<#@ parameter name="ProjectDefaultNamespace" type="System.String" #> | |
<#@ import namespace="System.Collections.Generic" #> |
OlderNewer