Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Artem Bashev Aristarhys

🏠
Working from home
Block or report user

Report or block Aristarhys

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Aristarhys
Aristarhys / vagrantfile
Last active Dec 22, 2018
Devbox vagrant file
View vagrantfile
# vagrant plugin install vagrant-alpine
# To fix pycharm helpers not found
# cd /home/vagrant/.pycharm_helpers/
# rm -rf check_all_test_suite.py
# tar -xvzf helpers.tar.gz
VM_MEMORY = 2048
VM_CPUS = 2
ENV["LC_ALL"] = "en_US.UTF-8"
@Aristarhys
Aristarhys / profiler.py
Last active Jun 27, 2019
Python line time and memory profiler
View profiler.py
# pip install memory_profiler line_profiler
# Usage:
# @profile
# def func(*args, **kwargs)
import pstats
import os
import sys
import gc
from memory_profiler import show_results as print_memory_profiler_stats
from memory_profiler import LineProfiler as MemoryProfiler
@Aristarhys
Aristarhys / post-receive
Last active Oct 8, 2018
Scapist deploy git hook
View post-receive
#!/bin/bash
PROJECT="scrapist"
TARGET_DIR="/usr/share/${PROJECT}"
GIT_DIR="/root/${PROJECT}.git"
ENV_DIR="/root/${PROJECT}.env"
ENV_PYTHON="${ENV_DIR}/bin/python"
ENV_PIP="${ENV_DIR}/bin/pip"
ROOT_DIR="${TARGET_DIR}/source"
PROJECT_DIR="${ROOT_DIR}/${PROJECT}"
FRONTEND_DIR="${ROOT_DIR}/clusterizator/frontend"
You can’t perform that action at this time.