Skip to content

Instantly share code, notes, and snippets.

View NikolayIT's full-sized avatar

Nikolay Kostov NikolayIT

View GitHub Profile
@NikolayIT
NikolayIT / LinearRegression.cs
Created March 17, 2017 13:43
Linear regression implementation in pure C# with example of Bulgarian population prediction
namespace LinearRegression
{
using System;
using System.Diagnostics;
public static class Program
{
public static void Main()
{
var xValues = new double[]
@NikolayIT
NikolayIT / SimpleHttpServerWithTcpListener.cs
Created September 16, 2018 12:26
Simple HTTP server in .NET Core using TcpListener
namespace SimpleHttpServer
{
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
public static class Program
{
public static void Main(string[] args)
using System;
using System.Diagnostics;
using System.IO;
public interface IHtmlToPdfConverter
{
byte[] Convert(string basePath, string htmlCode, FormatType formatType, OrientationType orientationType);
}
public class HtmlToPdfConverter : IHtmlToPdfConverter
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace ExpressionEvaluator
{
class Program
{
static void Main(string[] args)
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Net;
using System.Net.Http;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.Extensions.Configuration;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.AspNetCore.Mvc.Rendering;
"use strict";
var page = require('webpage').create(),
system = require('system'),
address,
output;
console.log('Usage: rasterize.js [URL] [filename] [paperformat] [orientation]');
address = system.args[1];
output = system.args[2];
private readonly IViewRenderService viewRenderService;
private readonly IHtmlToPdfConverter htmlToPdfConverter;
private readonly IHostingEnvironment environment;
public DashboardController(
IViewRenderService viewRenderService,
IHtmlToPdfConverter htmlToPdfConverter,
IHostingEnvironment environment)
{
this.viewRenderService = viewRenderService;
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
public static class Program
{
private const string BookUrlPattern = "http://it-ebooks.info/book/{0}/";
using Encog;
using Encog.ML.Data;
using Encog.ML.Data.Basic;
using Encog.ML.Train;
using Encog.Neural.Networks;
using Encog.Neural.Networks.Layers;
using Encog.Neural.Networks.Training.Propagation.Resilient;
using System;
using System.Collections.Generic;
using Encog.Engine.Network.Activation;