Skip to content

Instantly share code, notes, and snippets.

@avivzk2
avivzk2 / sqlalchemy_conftest.py
Created June 18, 2020 13:32 — forked from kissgyorgy/sqlalchemy_conftest.py
Python: py.test fixture for SQLAlchemy test in a transaction, create tables only once!
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from myapp.models import BaseModel
import pytest
@pytest.fixture(scope='session')
def engine():
return create_engine('postgresql://localhost/test_database)
@avivzk2
avivzk2 / pylucene_install.sh
Last active January 12, 2020 20:01
PyLucene 7.5.0 Install Steps (Ubuntu 18.04)
# Tested on Ubuntu 18.04
# with Python 3.6
# Instructions: Run it line by line and follow the instructions in the comments (just one)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3 python3-dev python3-pip build-essential git
sudo -H pip3 install --upgrade pip
@avivzk2
avivzk2 / Preferences.sublime-settings
Created September 14, 2017 08:21
Sublime Text 3 Settings File
{
"bold_folder_labels": true,
"caret_style": "solid",
"color_scheme": "Packages/One Dark Color Scheme/One Dark.tmTheme",
"fold_buttons": true,
"font_options": "subpixel_antialias",
"font_size": 10,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@avivzk2
avivzk2 / user_settings
Last active January 13, 2016 15:40
Sublime-Text 3 User-Settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme",
"font_options": "subpixel_antialias",
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"