Skip to content

Instantly share code, notes, and snippets.

View nesteruk's full-sized avatar
🍸
retired

Dmitri Nesteruk nesteruk

🍸
retired
  • Mesa Funds
View GitHub Profile
using System.Collections;
using System.Collections.Generic;
namespace DotNetDesignPatternDemos.Structural.Proxy
{
class Creature
{
public byte Age;
public int X, Y;
}
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
namespace PatternDemoCore
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 {}
@nesteruk
nesteruk / CSharpInProcessCompiler
Created August 23, 2012 11:40
C# in-process compiler
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using Microsoft.CSharp;
namespace ActiveMesa.R2P.Infrastructure
{
#%%
from math import *
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 1001)
f = lambda z: z * sin(z)
y = np.sin(x) * x
#plt.plot(x, y)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include <array>
#include <chrono>
#include <immintrin.h>
#include <random>
#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);
#[derive(Debug)]
struct Person
{
name: String,
position: String
}
impl Default for Person
{
fn default() -> Self {
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