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 logging | |
import os | |
ABSOLUTE_PATH = lambda x: os.path.abspath(os.path.join(os.path.abspath(os.path.dirname(__file__)), x)) | |
# For Django 1.7.7 sqlite and spatialite | |
# Uses monkeypatch | |
# | |
# Runs tests as: | |
# 1. Create initial db and apply all migrations if it does not exists |
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 time | |
from copy import copy | |
from celery.events.snapshot import evcam | |
from qiwichain import settings as novtest_settings | |
from qiwichain.celery import app | |
DATABASES = copy(novtest_settings.DATABASES) |
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 subprocess | |
import unittest | |
from datetime import timedelta | |
from random import SystemRandom | |
from celery import Celery | |
from kombu import Exchange | |
from kombu import Queue |
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
"""SocksiPy - Python SOCKS module. | |
Version 1.00 | |
Copyright 2006 Dan-Haim. All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright notice, |
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 random | |
import re | |
import socket | |
import ssl | |
from urllib.parse import urlparse | |
from urllib.request import urlopen | |
import socks | |
from shared.enum import StrEnum |
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 dramatiq import Worker | |
from dramatiq.brokers.stub import StubBroker | |
from dramatiq.worker import _WorkerThread, _ConsumerThread | |
class EagerBroker(StubBroker): | |
def __init__(self, *args, **kwargs): | |
super(EagerBroker, self).__init__(*args, **kwargs) | |
self.worker = Worker(self, worker_timeout=100) |
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 django.contrib.admin import TabularInline | |
from django.contrib.admin.utils import flatten_fieldsets | |
from django.contrib.contenttypes.models import ContentType | |
from django.db import models | |
from django.forms import BaseInlineFormSet, BaseModelFormSet | |
from django_fsm_log.models import StateLog | |
# Making possible to show django inline model admin without actual foreign key to parent model | |
# Works by making new model that has required FK (just to pass startup checks) and overriding actual queryset generated in FormSet | |
# For Django 1.7.7 |
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 Bulma's core | |
@import "../../node_modules/bulma/sass/utilities/_all"; | |
// Import Bulma and Buefy styles | |
@import "../../node_modules/bulma/bulma.sass"; | |
@import "../../node_modules/buefy/src/scss/buefy"; |