Skip to content

Instantly share code, notes, and snippets.


Andrey Alekseenko al42and

  • Stockholm, Sweden
View GitHub Profile
View local_accessors.cpp
#include <CL/sycl.hpp>
#include <iostream>
using mode = sycl::access_mode;
using sycl::access::fence_space;
using sycl::access::target;
static constexpr int blockSize = 32;
static constexpr int numBlocks = 8;
View in_order_not_really.cpp
#include <iostream>
#include <vector>
#include <CL/sycl.hpp>
using namespace cl;
int main() {
sycl::device dev{sycl::gpu_selector{}};
sycl::queue q{dev, sycl::property_list{sycl::property::queue::in_order{}}};
View test_sqrt.cpp
#include <CL/sycl.hpp>
#include <iostream>
static inline float mySqrt(float x) {
return cl::sycl::native::sqrt(x);
return cl::sycl::sqrt(x);
al42and /
Created Feb 16, 2017
Get total time to complete all tests from PCMS code checker system
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import tabulate
from configparser import ConfigParser
import os
import requests
from bs4 import BeautifulSoup
al42and /
Last active Feb 10, 2017
The (Not So) Ultimate Guide Of Reading Till EOF

Как читать до конца файла / EOF


while (! std::cin.eof ()) {
  std::cin >> q >> v >> rho;


al42and / homework1.tex
Created Sep 20, 2016
Homework 1 solution for Calculus 1 course at Innopolis University, 2016
View homework1.tex
\usepackage[russian]{babel} % Cyrillics!
\usepackage{cmap} % Copypastable cyrillics!
\usepackage{amsmath} % Multiline equations
\usepackage{mathtools} % Disable numbering equations by default
\usepackage{indentfirst} % Indent first paragraph in chapter
al42and /
Last active Jan 5, 2021 — forked from lambdalisue/
An install script of VMD to Ubuntu
# An install script which help you to install VMD in Ubuntu 16.04
# Authors: Alisue ( Al42and (
# License: MIT License
# Copyright, 2015, allright reserved.
al42and /
Created Jan 19, 2016
Kittler-Illingworth Thresholding
import numpy as np
def Kittler(im, out):
The reimplementation of Kittler-Illingworth Thresholding algorithm by Bob Pepin
Works on 8-bit images only
Original Matlab code:
Paper: Kittler, J. & Illingworth, J. Minimum error thresholding. Pattern Recognit. 19, 41–47 (1986).
h,g = np.histogram(im.ravel(),256,[0,256])
al42and / ttwym.myo
Last active Aug 29, 2015
Throw Trucks With Your Mind Connector for Myo armband
View ttwym.myo
scriptId = 'com.aland.ttwym'
scriptDetailsUrl = ''
scriptTitle = 'Throw Trucks With Your Mind Connector'
--Andrey Alekseenko - Jan 23, 2015
--Make a fist to activate powers
--Move hand to aim
--doubleTap to lock/unlock.
al42and /
Created Jan 8, 2014
This code snippet is a part of stackexchange answer
#!/usr/bin/env python
#-*- encoding: utf-8 -*-
# This code is a part of stackexchange answer
# License: cc-wiki with attribution required
import numpy as np
HR = 550 # GHash/s, own hashrate