Skip to content

Instantly share code, notes, and snippets.

View ajvengo's full-sized avatar
🏠
Working from home

Vladimir Rapatskii ajvengo

🏠
Working from home
View GitHub Profile
@ajvengo
ajvengo / index.html
Created November 9, 2018 10:54 — forked from TimothyGu/index.html
for-of loop vs forEach (https://jsbench.github.io/#cec5fd6009b622c72311e8f447e101be) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>for-of loop vs forEach</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@ajvengo
ajvengo / main.cpp
Created October 2, 2017 14:14
Team with max efficiency
#include <vector>
#include <algorithm>
#include <cstddef>
#include <iostream>
#include <exception>
#include <iterator>
typedef std::vector<size_t> TVector;
// max sum[v]
@ajvengo
ajvengo / Dockerfile
Last active November 15, 2017 11:46
Debian stretch + python, curl, jq, datamash to run performance tests scripts
FROM debian:stretch-slim as zstd
MAINTAINER Vladimir Rapatskiy <rapatsky@gmail.com>
WORKDIR /tmp
RUN set -ex; \
apt-get -q update; \
apt-get install -yq --no-install-recommends ca-certificates curl gcc make libc6-dev zlib1g-dev; \
apt-get clean; \
curl -sSL https://github.com/facebook/zstd/archive/v1.3.2.tar.gz | tar xz; \
cd zstd-1.3.2; \
CFLAGS="-march=sandybridge -O3 -flto" make -j$(nproc); \
@ajvengo
ajvengo / Dockerfile
Created August 12, 2017 15:15
Debian based python3 stack: lmfit, matplotlib, numpy, pandas, scipy, seaborn
FROM debian:stretch-slim
MAINTAINER Vladimir Rapatskiy <rapatsky@gmail.com>
RUN apt-get update && \
apt-get install -qq --no-install-recommends \
libopenblas-base \
python3-lmfit \
python3-seaborn && \
apt-get clean
@ajvengo
ajvengo / Dockerfile
Last active August 12, 2017 14:39
Alpine based python2 stack: scipy, numpy, seaborn, pandas, lmfit, matplotlib
FROM alpine:edge
MAINTAINER Vladimir Rapatskiy <rapatsky@gmail.com>
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >>/etc/apk/repositories && \
apk update && \
apk add --no-cache \
py-matplotlib \
py-scipy \
py2-pip && \
@ajvengo
ajvengo / copy_vs_move_test.cpp
Created April 7, 2017 19:49
Test copyable vs movable arguments for overloaded functions
#include <type_traits>
#include <iostream>
using namespace std;
// must be used for movable arguments only
void f(int&& x) {
using X = decltype(x);
cout << __PRETTY_FUNCTION__ << ' ' << std::is_rvalue_reference<X>::value << endl;
}