Skip to content

Instantly share code, notes, and snippets.

View jorpic's full-sized avatar

Max Taldykin jorpic

  • Formal Methods
  • In transit
View GitHub Profile
@jorpic
jorpic / alg1.js
Created January 18, 2015 23:30
Subset Sum Problem
subsetSumExact = (function () {
'use strict';
// This allows conveniet access to array of bits
// with indices in the range [min, max].
function BitSet(min, max, arr) {
var size = max - min + 1;
var data = arr || new Uint32Array(Math.ceil(size/32));
this.set = function (i) {
@jorpic
jorpic / random-fact.sh
Created June 23, 2015 17:35
Get random fact from wikipedia
#!/bin/bash -e
API="http://en.wikipedia.org/w/api.php\
?action=query\
&prop=extracts\
&format=json\
&exsentences=2\
&explaintext=\
&exsectionformat=plain\
&rawcontinue=\
&generator=random\
@jorpic
jorpic / README.md
Last active August 29, 2015 14:23
pg insert benchmark

Тест на использование PG в качестве key-value storage для записей фиксированного размера. Замерялась bulk вставка и выбрка записей. Результаты примерно такие: img

На oracle 10g цифры на порядок другие.

@jorpic
jorpic / check.py
Created July 3, 2015 13:55
Check password for ethereum wallet
#!/usr/bin/env python
# ref. http://bitcoin.stackexchange.com/questions/30727
# partially copy-pasted from https://github.com/ethereum/pyethsaletool
import pbkdf2 as PBKDF2
import python_sha3
import aes
import sys
import json
@jorpic
jorpic / 1-README.md
Last active August 29, 2015 14:24
pg update benchmark

Тест проводился для 2.5 млн записей.

При записи изменений в один поток:

  • 90% запросов укладывается в 140мс;
  • 95% запросов укладывается в 240мс;
  • максимальное время выполнения запроса 489мс.

При записи изменений в два потока:

  • 90% запросов укладывается в 300мс;
  • 95% запросов укладывается в 375мс;
@jorpic
jorpic / index.html
Last active December 5, 2015 19:30
FM logo
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Raleway:500' rel='stylesheet' type='text/css'>
<style>
section {
display: flex;
align-items: center;
justify-content: center;
@jorpic
jorpic / index.html
Last active March 27, 2016 09:43
Haskell Meetup 2015-12-06
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Raleway:500' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.0.0/styles/github.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.0.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.0.0/languages/haskell.min.js"></script>
<style>
@jorpic
jorpic / readme.md
Last active January 11, 2016 11:49
Udacity — Intro to DevOps

https://www.udacity.com/course/intro-to-devops--ud611

1

Classical process organization divides team into groups according to their responsibilities (biz, dev, qa, ops). Building walls between those groups forces sequential communication: one team finishes their part then passes result to the next team. And no matter how efficient is the process within single group, this could lead to higher latency when reacting to bugs or changes.

@jorpic
jorpic / README.md
Last active January 16, 2016 21:48
M102: MongoDB for DBAs
@jorpic
jorpic / README.md
Created January 22, 2016 21:26
M202: MongoDB Advanced Deployment and Operations