This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FIXME: pyenv-virtualenv is increadibly slow with ~10 virtualenvs. | |
# FIXME: because of the injection to $PROMPT_COMMAND: _pyenv_virtualenv_hook. | |
# FIXME: because it calls `pyenv sh-activate` on every prompt, which is slow. | |
if which pyenv >/dev/null; then eval "$(pyenv init --no-rehash - )"; fi | |
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi | |
# This is a replacement hook for the pyenv-virtualenv, which triggers only on demand, | |
# and stays inactive on other cases -- to save the time on prompt generation. | |
__pyenv_local_file=.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
unset E2E # e2e covers everything, but this is not a fair coverage. | |
first=981e664e39955f38d9a279af24ee5be77c7e9a3e | |
last=b6e3ec407f46d8db0f1c5c15fce41359ac76ebf1 # or upstream/master | |
# Master-only commits (i.e. where "master" branch was on merges). | |
# These ones are fast, since it walks "first parent" way only | |
while read -r rev; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Special virtualenvs must be in PATH strictly after pyenv. Hence, add it before! | |
if which pyenv >/dev/null 2>&1 ; then | |
for name in power __user__ __z__ ; do | |
if pyenv prefix "$name" >/dev/null 2>&1 ; then | |
export PATH="$(pyenv prefix "$name")/bin:$PATH" | |
fi | |
done | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from multiprocessing import Lock | |
import mysql.connector | |
USER = "root" | |
PASSWD = "admin" | |
HOST = 'localhost' | |
DB = "db_test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Print all possible candidates for virtualenv relative to the directory $1. | |
# Used in venv_find() for every directory starting from the current and up to the root. | |
# | |
function venv_candidates () { | |
echo $1 | |
echo $1/.venv | |
echo $1/VENV | |
echo $1/ENV | |
echo $1.venv |
OlderNewer