Skip to content

Instantly share code, notes, and snippets.

View MeinLiX's full-sized avatar
🇺🇦

Yurii Hrohul MeinLiX

🇺🇦
  • Ukraine
  • 09:08 (UTC +03:00)
View GitHub Profile
@MeinLiX
MeinLiX / Program.cs
Created April 13, 2022 23:13
TecomTech MLS build: .NET 6
using System.Text;
var g_local = g("1+x3+x4", bitRate: 4);
List<bool> register0 = new() { true, true, true, true };
printShiftRegister(g_local, @default: true);
printShiftRegister(g_local);
printTable(g_local, register0, 20);
@MeinLiX
MeinLiX / Program.cs
Created April 13, 2022 21:12
TecomTechLab build: .NET 6
using System.Text.RegularExpressions;
int variable = 2;
const int BITNESS = 16;
List<bool> result = new();
List<List<int>> hadamar = GetHadamard(BITNESS);
List<int> w = hadamar[variable - 1];
Regex.Replace(
@MeinLiX
MeinLiX / SpeechToText.cs
Created January 20, 2022 15:02
Speech to Text (GCP) Telegram Bot
using Google.Cloud.Speech.V1;
using Telegram.Bot;
using static Google.Cloud.Speech.V1.RecognitionConfig.Types;
dotenv.net.DotEnv.Load();
string TELEGRAM_BOT_TOKEN = Environment.GetEnvironmentVariable("TELEGRAM_BOT_TOKEN") ?? throw new NullReferenceException("TELEGRAM_BOT_TOKEN");
string GOOGLE_APPLICATION_CREDENTIALS = Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS") ?? throw new NullReferenceException("GOOGLE_APPLICATION_CREDENTIALS");
string GOOGLE_APPLICATION_PROJECT_ID = Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_PROJECT_ID") ?? throw new NullReferenceException("GOOGLE_APPLICATION_PROJECT_ID");
string GetTestFromSpeech(string FilePath)
{
RecognitionConfig config = new()
@MeinLiX
MeinLiX / GCloud Commands
Last active November 20, 2021 16:54
Prime count solutions for PARCS
Після команди створення проекту, потрібно зайти на аккаунт клауда та підключити білінг до створеного проекту.
gcloud auth login;
gcloud projects create my-parcs;
gcloud projects list;
gcloud config set project my-parcs;
@MeinLiX
MeinLiX / TPRquest3AandB.cs
Last active October 29, 2021 19:26
CHEATS for MODULE .NET 6 (.NET 5+)
#region QUEST 3A
Console.WriteLine("\n\n3.A QUEST:\n");
table a_table = new();
a_table.rows = new()
{
new row(Xtype.X1, Xtype.X1),
new row(Xtype.X2, Xtype.X2),
new row(Xtype.X3, Xtype.X3),
new row(Xtype.X1X2, Xtype.X1),
@MeinLiX
MeinLiX / Mat.java
Created October 24, 2021 22:05
mat
import java7.util.regex.Pattern;
public class MatMatcher {
private String[] words = new String[]{
//ass(es)?
"a[\\W_]*s[\\W_]*s(?:[\\W_]*e[\\W_]*s)?",
//fuck(ing)?
"f[\\W_]*u[\\W_]*c[\\W_]*k(?:[\\W_]*i[\\W_]*n[\\W_]*g)?",
//ж(ыд(у|ов)?|оп(а(х)?|у|ой))
"ж[\\W_]*(?:[ыиiu][\\W_]*[дd](?:[\\W_]*[уыаyiau]|[\\W_]*[оo0][\\W_]*[вbv])?|[оo0][\\W_]*[пnp][\\W_]*(?:[аa](?:[\\W_]*[хxh])?|[уеыeyiu]|[оo0][\\W_]*[йj]))",
@MeinLiX
MeinLiX / RAMloader.cs
Created October 12, 2021 15:32
RAM loader .net 6
using System;
using System.Collections.Generic;
using System.Threading;
List<byte[]> buffer = new List<byte[]>();
List<string> Args = new(args);
bool showMessage = Args.Contains("-msg");
bool mbArg = false;
int maxMB = 0;
@MeinLiX
MeinLiX / ProcessLoader.cs
Last active October 12, 2021 15:45
Procces loader .net 6
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Threading;
Enumerable.Range(1, 7).ToList().ForEach(n =>
{
static BigInteger factorial(BigInteger a, BigInteger b)
{
@MeinLiX
MeinLiX / StateExample.cs
Created June 7, 2021 10:31
State Example .NET 5
using System;
try
{
Client server = new (new Idle());
server.Click();
server.Success();
server.Click();
server.Failure();
server.Retry();
@MeinLiX
MeinLiX / MutexTest.cs
Last active June 7, 2021 10:28
Mutex test c#
using System;
using System.Diagnostics;
using System.Threading;
namespace Project
{
class Program
{
private static readonly Mutex m = new ();
private const int N = 1000;