Skip to content

Instantly share code, notes, and snippets.

View agbragin's full-sized avatar

Anton Bragin agbragin

  • JetBrains GmbH
  • Munich, Germany
View GitHub Profile
@agbragin
agbragin / gist:d65bd5536f5c9a97d86c7f6600b102ab
Last active April 11, 2022 08:33
Test task code snippets
1.
=====
public class Fibo {
public static int fib(int n) {
if (n <= 2) return 1;
return fib(n-1) + fib(n-2);
}
}
@agbragin
agbragin / index.html
Created September 19, 2019 09:38
Scaling in Phaser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Phaser Test</title>
<script src="//cdn.jsdelivr.net/npm/phaser@3.19.0/dist/phaser.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/keypress/2.1.5/keypress.min.js"></script>
</head>
<body>
@agbragin
agbragin / hash_strategy.py
Created November 20, 2018 13:51
Checking hash by a hash strategy
import time
class Hashable:
def __init__(self, value, hash_strategy):
self.value = value
self.hash_strategy = hash_strategy
def __eq__(self, other):
return self.value == other.value
@agbragin
agbragin / hash.py
Created November 20, 2018 13:08
Hash timing
import time
class Hashable:
def __init__(self, value):
self.value = value
def __eq__(self, other):
return self.value == other.value
@agbragin
agbragin / template.py
Created November 20, 2018 12:17
Example of Template Pattern
from abc import ABC, abstractmethod
class NA(ABC):
def __init__(self, sequence):
if self._check_sequence(sequence):
self.sequence = sequence
def _check_sequence(self, sequence: str):
valid_symbols = self._get_valid_symbols()
@agbragin
agbragin / Untitled.py
Last active September 17, 2018 13:36
Python course lesson 1
def sheet_data(sheet):
out = list()
sheetIndex = 0
for X in range(1, s.nrows):
learner = s.row_values(X)
@agbragin
agbragin / 1000genomes.vcf
Last active April 25, 2017 08:35
Concentrate genome browser test VCF files
##fileformat=VCFv4.1
##FILTER=<ID=PASS,Description="All filters passed">
##fileDate=20150218
##reference=ftp://ftp.1000genomes.ebi.ac.uk//vol1/ftp/technical/reference/phase2_reference_assembly_sequence/hs37d5.fa.gz
##contig=<ID=1,length=249250621,assembly=b37>
##contig=<ID=2,length=243199373,assembly=b37>
##contig=<ID=3,length=198022430,assembly=b37>
##contig=<ID=4,length=191154276,assembly=b37>
##contig=<ID=5,length=180915260,assembly=b37>
##contig=<ID=6,length=171115067,assembly=b37>
@agbragin
agbragin / 3-column.bed
Last active April 25, 2017 08:03
Concentrate genome browser test BED files
chr1 19206 25958
chr1 30624 38972
chr1 104110 107779
chr1 176202 177333
chr1 363984 372016
chr1 767746 776319
chr2 55553 57603
chr2 77749 80138
chr2 193081 197187
chr2 395473 410097
https://github.com/apache/incubator-airflow
https://github.com/ssadedin/bpipe
https://github.com/bloomreach/briefly
https://github.com/monajemi/clusterjob
https://github.com/tburdett/Conan2
https://github.com/broadinstitute/cromwell
https://github.com/joergen7/cuneiform
https://github.com/googlegenomics/dockerflow
https://github.com/thieman/dagobah
https://github.com/Factual/drake
@agbragin
agbragin / Snakefile
Created April 2, 2017 10:45
Snakemake pipeline for Stepik course
# this should be the only path that you need to modify
BASE_PATH = "."
N_THREADS = 40
# annotation stuff
IDX = BASE_PATH + "/index"
ANNO = BASE_PATH + "/annotation"
ANNO_PREFIX = "Homo_sapiens.GRCh38.80"