Skip to content

Instantly share code, notes, and snippets.

View MeinLiX's full-sized avatar
🇺🇦

Yurii Hrohul MeinLiX

🇺🇦
  • Ukraine
  • 21:29 (UTC +03:00)
View GitHub Profile
@MeinLiX
MeinLiX / ParallelFn.cs
Last active June 7, 2021 10:29
Parallel fn and operation ||
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Project
{
class Program
{
private struct FnProp
{
@MeinLiX
MeinLiX / DinningPhilosophers.cs
Last active June 7, 2021 10:29
Dining philosophers problem C#
using System;
using System.Collections.Generic;
using System.Threading;
namespace Project
{
class Program
{
private static List<Fork> fork = new ();
@MeinLiX
MeinLiX / SourceBFParser.cs
Last active May 18, 2021 19:04
Example parse status code by brute force web pages. C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
namespace ParseCorrectPages
{
class Source
{
@MeinLiX
MeinLiX / Factorial C# MPI.net .cs
Last active June 7, 2021 09:14
.net 5, MPI factorial
using System;
using System.Diagnostics;
using System.Numerics;
MPI.Environment.Run(ref args, comm =>
{
if (comm.Rank == 0)
{
BigInteger x = BigInteger.Parse(args[0]);
BigInteger res = 1;
static void Parser()
{
var src = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
if (src == null) throw new Exception();
src = Path.Combine(src, "..\\..\\..\\assets", "blocks.json");
var blocks = JsonConvert.DeserializeObject<Dictionary<string, Lava.Blocks.json.BlockInfo>>(File.ReadAllText(src));
List<string> b = new List<string>();