Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥

Anthony Belyaev avbelyaev

🔥
View GitHub Profile
View tp.sql
-- 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
View gist:8e9d410a544d095c67c5c2f4bbedb9cb
(?!\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 
View Helm-quotes.md

Given the following template template.yml:

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

And the following value-file values.yaml:

foo:
 bar: 2e0
View docker-compose.yaml
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 / docker-compose.yaml
Last active Jan 30, 2020
databases: PostgreSQL 10, PgAdmin4, SqlServer 2019, Oracle 11XE, Sybase 16
View docker-compose.yaml
version: '3.1'
services:
xpostgres:
image: postgres:10.10
environment:
POSTGRES_DB: ics
POSTGRES_USER: ics
POSTGRES_PASSWORD: ics
ports:
@avbelyaev
avbelyaev / MinioAdapter.java
Created Jul 5, 2019
Minio. upload file via "presigned put object link"
View MinioAdapter.java
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);
View bio.py
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 / blink.ino
Last active Feb 23, 2019
Arduino UNO blinker
View blink.ino
@avbelyaev
avbelyaev / convolution.m
Last active Apr 19, 2019
magaz 22feb. fourier, convolution, skeletonize
View convolution.m
% 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);