Skip to content

Instantly share code, notes, and snippets.

View e673's full-sized avatar

Andrey e673

  • Lomonosov Moscow State University
  • Moscow, Russia
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
using System.Diagnostics;
using System.IO;
using System.Net.Sockets;
using System.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
using static Console;
#include <thread>
#include <condition_variable>
#include <mutex>
#include <atomic>
#include <stdio.h>
#include <vector>
#include <chrono>
#include <Windows.h>
std::atomic<int> completed_count;
#include <thread>
#include <condition_variable>
#include <mutex>
#include <atomic>
#include <stdio.h>
#include <vector>
#include <chrono>
std::condition_variable worker_start, worker_complete;
std::mutex worker_mutex, master_mutex;
#include <thread>
#include <condition_variable>
#include <mutex>
#include <atomic>
#include <stdio.h>
#include <vector>
std::condition_variable worker_start, worker_complete;
std::mutex worker_mutex, master_mutex;
std::atomic<int> scheduled_task = 0;
@e673
e673 / abp.ini
Created July 14, 2017 16:38
abp.ini
# Adblock Plus preferences
version=5
[Subscription]
url=~fl~
title=Ad Blocking Rules
defaults=blocking
[Subscription filters]
||lol.bash.org.ru^
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace Experiments
{
class ExpressionUtil
{$APPTYPE CONSOLE}
uses SysUtils;
var F: text;
T: text;
S: TSearchRec;
Zal4,Zal2: integer;
Z: array [1..4] of integer;
@e673
e673 / img_perf
Created January 16, 2017 20:56
Float vs Byte performance in C++
const int N = 512;
Image<float> img1f(N, N), img2f(N, N);
Image<byte> img1b(N, N), img2b(N, N);
for (int j = 0; j < img1f.Height(); j++)
for (int i = 0; i < img1f.Width(); i++)
{
img1f(i, j) = img2f(i, j) = 3 * i + j;
img1b(i, j) = img2b(i, j) = 3 * i + j;