Script to update Python version for projects with pyenv & poetry
This script intended to be run for projects which,
- Has
.pyenv-version
file (Python version managed by pyenv) - Can be installed with
make install
(ormake install-api
)
Script to update Python version for projects with pyenv & poetry
This script intended to be run for projects which,
.pyenv-version
file (Python version managed by pyenv)make install
(or make install-api
)from django.conf import settings | |
from django.db import models | |
from django.utils.encoding import smart_str | |
if hasattr(settings, 'USE_CPICKLE'): | |
import cPickle as pickle | |
else: | |
import pickle | |
""" | |
============= | |
stringmethods | |
============= | |
Make possible to use all Python string methods as Django template filters. Also | |
provide custom template tag ``{% stringmethod %}`` to use methods with more | |
than one argument, like ``format``, ``count`` and other. | |
Restrictions |
Checking env_base virtual environment... | |
ordereddict exists | |
minimock exists | |
0.9 | |
Checking env_child virtual environment... | |
ordereddict exists | |
minimock exists | |
0.8 |
#!/bin/bash | |
# | |
# Tiny shell script to run ``pip-check`` cmd inside of venv or fallback to | |
# global ``pip-check`` after. | |
# | |
# `pip-check <https://github.com/bartTC/pip-check/>`_ is a tool for checking | |
# outdated versions installed in your Python virtual environment or global | |
# site packages. | |
# | |
# Usage |
#!/usr/bin/env python | |
# | |
# Import posts from Posterous backup to Blogger account. | |
# | |
# Requirements | |
# ============ | |
# | |
# * `Python <http://www.python.org/>` 2.6 or 2.7 | |
# * `GData <http://pypi.python.org/pypi/gdata>`_ 2.0.17 or higher | |
# |
#!/usr/bin/env python | |
import copy | |
import sys | |
import time | |
from argparse import ArgumentParser | |
from random import choice | |
from string import digits, letters |
#!/usr/bin/env python | |
# | |
# Rates calculator. | |
# | |
# Requirements | |
# ============ | |
# | |
# * `Python <http://www.python.org/>`_ 2.7 | |
# | |
# Installation |
$ DRIVER=couchbase THREADS=10 make benchmark | |
env/bin/python ./benchmark.py | |
324 operations completed in 2.1607 s | |
2256 operations completed in 10.7558 s | |
1068 operations completed in 5.7570 s | |
2037 operations completed in 9.5393 s | |
2493 operations completed in 11.0871 s | |
2910 operations completed in 12.1000 s | |
2961 operations completed in 12.1318 s | |
2193 operations completed in 10.3703 s |
from flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
class App(Flask): | |
""" | |
Custom ``Flask`` class. | |
""" | |
def register_blueprint(self, mixed, **kwargs): | |
""" |