Skip to content

Instantly share code, notes, and snippets.

View miyconst's full-sized avatar

Kostiantyn Cherniavskyi miyconst

View GitHub Profile
@miyconst
miyconst / deepseek-r1-test.cs
Created February 25, 2025 11:26
DeepSeek R1 AI Test code piece
// For YouTube video:
// https://youtu.be/UnPZHwVCQdo
public IEnumerable<T> Flatten(T parent)
where T : IParent
{
yield return parent;
foreach (T child in parent.Children)
{
foreach (T grand in Flatten(child))
@miyconst
miyconst / DictionaryTest.cs
Created September 28, 2019 12:34
Simple performance comparison between C# Dictionary and if / switch statements
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace DictionaryTest
{
class Program
{
/* CPU: AMD Ryzen Threadripper 1950x @ 4.0 Ghz
* Count: 100000000
@miyconst
miyconst / Cyriller.CyrName.Program.cs
Created November 12, 2018 06:16
Пример склонения личных имен и фамилий с использованием класса Cyriller.CyrName.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/* https://github.com/miyconst/Cyriller */
namespace CyrillerTest
{
class Program