Skip to content

Instantly share code, notes, and snippets.

View avbelyaev's full-sized avatar
🔥

Anthony Belyaev avbelyaev

🔥
  • London
View GitHub Profile
@avbelyaev
avbelyaev / convolution.m
Last active April 19, 2019 16:47
magaz 22feb. fourier, convolution, skeletonize
% with all respect to Maria
SobelD = [1 2 1; 0 0 0; -1 -2 -1]; %ядро или оператор собеля для свертки down
SobelR = [-1 0 1; -2 0 2; -1 0 1]; %ядро или оператор собеля для свертки right
P = imread('BioID_0508.pgm'); %исходное изображение
C1 = conv2(SobelD, P); %conv2 оператор свертки
C2 = conv2(SobelR, P);
@avbelyaev
avbelyaev / blink.ino
Last active February 23, 2019 10:49
Arduino UNO blinker
import openbabel as ob
import pybel
ASPIRIN = "CC(=O)OC1=CC=CC=C1C(=O)O"
SALICIL = "C1=CC=C(C(=C1)C(=O)O)O"
smiles = [ASPIRIN, SALICIL]
mols = [pybel.readstring("smi", x) for x in smiles]
for mol in mols:
@avbelyaev
avbelyaev / MinioAdapter.java
Created July 5, 2019 11:49
Minio. upload file via "presigned put object link"
public class MinioAdapter {
private MinioClient minio;
public MinioAdapter() {
try {
this.minio = new MinioClient(MINIO_URL, MINIO_ACCESS_KEY, MINIO_SECRET);
} catch (InvalidPortException | InvalidEndpointException e) {
throw new IllegalStateException("Could not start Minio client", e);
@avbelyaev
avbelyaev / docker-compose.yaml
Last active January 30, 2020 20:33
databases: PostgreSQL 10, PgAdmin4, SqlServer 2019, Oracle 11XE, Sybase 16
version: '3.1'
services:
xpostgres:
image: postgres:10.10
environment:
POSTGRES_DB: ics
POSTGRES_USER: ics
POSTGRES_PASSWORD: ics
ports:
version: '2'
# works great with AWS free tier
services:
plex:
container_name: plex
image: plexinc/pms-docker
restart: unless-stopped
environment:
- TZ=Europe/London
@avbelyaev
avbelyaev / Helm-quotes.md
Created December 29, 2020 00:10
Helm quotes

Given the following template template.yml:

data:
  FOO_BAR: {{ .Values.foo.bar | quote }}

And the following value-file values.yaml:

foo:
  bar: 2e0
(?!\s\d\sмес)(\s\d\s)

neg. lookahead ?!xxx should match everything but xxx

thus in the below, 4 мес should not match

фывыфлоол 3 Каша ылвоаыд ывлдао 4 мес еукфывфыв 4 мышвофы 6 ыф 7 ajsdas 
@avbelyaev
avbelyaev / tp.sql
Last active September 29, 2021 20:44
TP
-- create table tmp2(
-- foo int
-- )
-- insert into tmp values (1),(2),(4),(4),(5),(null);
-- insert into tmp2 values (1),(3),(4),(4),(5),(5),(null);
-- select tmp.foo, tmp2.foo
-- from tmp