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
import os | |
import django | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ru4you.settings") | |
django.setup() | |
from sorl.thumbnail import get_thumbnail | |
import logging | |
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
class VTPaginator(dict): | |
def __init__(self, num_rows, **kwargs): | |
defaults = { | |
'offset': 0, | |
'limit': 10, | |
'view_num': 11, | |
'splitter': '...', | |
'view_one_page': False, | |
'min_limit': 10, | |
'max_limit': 50, |
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
'use strict'; | |
(function ($) { | |
... | |
// обычно все нестандартные атрибуты в дату пихают | |
var is_support_event = supportsInputEvent() | |
var is_supprot_event_change = supportsPropertyChangeEvent() | |
... | |
function _getBaseScrollHeight(jq_item){ | |
// вообще она так то как ф-я не нужна 1 раз используется | |
// as - префикс autoresize, на всяк пожарный ) или имени себя делай, довольно часто в дату подмазывают из других |
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
import tqdm | |
import psycopg2 | |
import random | |
from multiprocessing import Pool | |
def go(): | |
conn = psycopg2.connect("dbname=postgres user=postgres host=127.0.0.1") | |
conn.set_session(autocommit=True) |