Skip to content

Instantly share code, notes, and snippets.

View StanislavVolodarskiy's full-sized avatar

Stanislav Volodarskiy StanislavVolodarskiy

View GitHub Profile
@StanislavVolodarskiy
StanislavVolodarskiy / decorate.cpp
Created December 13, 2020 18:44
To call function with unknown arguments
// g++ -std=c++14 -pedantic-errors decorate.cpp
#include <type_traits>
#include <utility>
#include <iostream>
template<typename T>
void print_args(const T &t) {
std::cout << t;
}
@StanislavVolodarskiy
StanislavVolodarskiy / remove_all.py
Created December 12, 2020 18:50
remove_all benchmark
import collections
import random
import time
def elapsed_time(f):
start = time.time()
result = f()
finish = time.time()
return result, finish - start
class IndexMaxHeap:
def __init__(self, n, max_size, value):
self._value = value
self._size = 0
self._heap = [0] * max_size
self._pos = [-1] * n
def size(self):
return self._size
@StanislavVolodarskiy
StanislavVolodarskiy / keras_tf_issue.py
Created March 3, 2017 12:39
Kerase, tensorflow and multithreading issue.
import threading
import tensorflow as tf
from keras.models import Sequential
from keras.layers import Dense
import keras.backend as K
model = Sequential()
model.add(Dense(output_dim=1, input_dim=1))
@StanislavVolodarskiy
StanislavVolodarskiy / CONTRIBUTING.md
Last active January 20, 2017 22:11
CONTRIBUTING proposal

Contributing guidelines

Contributing code

By contributing to the RELAAX repository through pull-request, comment, or otherwise, the contributor releases their content to the RELAAX license and copyright terms of the license.

If you have improvements to RELAAX, send us your pull requests! For those just getting started, Github has a howto.

We recommended you use an isolated Python environment to run RELAAX. Virtualenv or Anaconda are examples. If you're using the system's python environment, you may need to run pip install commands with sudo. On OSX / macOS, we recommend using Homebrew to install a current python version.

  • Install Docker

  • Clone RELAAX repo.

git clone git@github.com:deeplearninc/relaax.git