Skip to content

Instantly share code, notes, and snippets.

Avatar
🍸
retired

Dmitri Nesteruk nesteruk

🍸
retired
  • Mesa Funds
View GitHub Profile
View BlackScholesSimdPerformanceComparison.cpp
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include <array>
#include <chrono>
#include <immintrin.h>
#include <random>
View BlackScholesSimd.cpp
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include <immintrin.h>
// Standard normal probability density function
double norm_pdf(const double& x) {
return (1.0 / (pow(2 * M_PI, 0.5))) * exp(-0.5 * x * x);
View functional_builder.rs
#[derive(Debug)]
struct Person
{
name: String,
position: String
}
impl Default for Person
{
fn default() -> Self {
View BidirectionalObserver.cs
using System;
using System.ComponentModel;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using DotNetDesignPatternDemos.Annotations;
namespace DotNetDesignPatternDemos.Behavioral.Observer.Bidirectional
{
public class Product : INotifyPropertyChanged
View FourTwosProblem.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
namespace PatternDemoCore
View DeclarativeEventSubscriptions
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Autofac;
namespace DotNetDesignPatternDemos.Behavioral.Observer.ContainerWireup
{
public interface IEvent {}
View SoACompositeProxy
using System.Collections;
using System.Collections.Generic;
namespace DotNetDesignPatternDemos.Structural.Proxy
{
class Creature
{
public byte Age;
public int X, Y;
}
View CompositeProxy
using System;
using System.Linq;
namespace DotNetDesignPatternDemos.Structural.Proxy.Composite
{
// todo: publish
public class MasonrySettings
{
//public bool? All
//{
View gist:a8c2abbe39b000bdaf2db8f0bc68a056
using System;
using System.Diagnostics;
namespace DotNetDesignPatternDemos.Structural.Proxy.ValueProxy
{
[DebuggerDisplay("{value*100.0f}%")]
public struct Percentage
{
private readonly float value;
View RecursiveGenericMagic
using System;
using System.Linq;
namespace DotNetDesignPatternDemos.Structural.Adapter
{
// Vector2f, Vector3i
public interface IInteger
{
int Value { get; }
You can’t perform that action at this time.