Skip to content

Instantly share code, notes, and snippets.

View MarkFilus's full-sized avatar

Mark Filus MarkFilus

View GitHub Profile
@MarkFilus
MarkFilus / child_process.py
Created December 18, 2018 19:18
run as child process function decorator - multiprocessing python
from multiprocessing import Pipe, Process
def child_process(func):
"""Makes the function run as a separate process. Needed for
keras classifier with gridsearchcv to work on multiple datasets"""
def wrapper(*args, **kwargs):
def worker(conn, func, args, kwargs):
conn.send(func(*args, **kwargs))
conn.close()
parent_conn, child_conn = Pipe()
@MarkFilus
MarkFilus / 1_Install_cactus.md
Last active October 11, 2018 17:29
Install Cactus on Ubuntu 16.04

Installing Cactus on Ubuntu 16.04

This assumes you've already installed anaconda python (miniconda is enough and you do not need admin to install).

Install apt dependencies

sudo apt -y update
sudo apt -y install build-essential pkg-config libbz2-dev libtokyocabinet-dev libkyototycoon-dev kyototycoon libkyotocabinet-dev

Download from Github