Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| import time | |
| def RateLimited(maxPerSecond): | |
| minInterval = 1.0 / float(maxPerSecond) | |
| def decorate(func): | |
| lastTimeCalled = [0.0] | |
| def rateLimitedFunction(*args,**kargs): | |
| elapsed = time.clock() - lastTimeCalled[0] | |
| leftToWait = minInterval - elapsed | |
| if leftToWait>0: |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
To remove a submodule you need to:
Install portaudio using homebrew (or method of your choice)
brew install portaudiocreate $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:
[build_ext]
| from __future__ import with_statement | |
| from alembic import context | |
| from sqlalchemy import engine_from_config, pool, MetaData, Table, ForeignKeyConstraint | |
| from logging.config import fileConfig | |
| # this is the Alembic Config object, which provides | |
| # access to the values within the .ini file in use. | |
| config = context.config | |
| # Interpret the config file for Python logging. |
| word | category | strength | |
|---|---|---|---|
| anal | sexual | 2 | |
| anus | general | 1 | |
| arrse | general | 1 | |
| arse | general | 1 | |
| ass | general | 1 | |
| ass-fucker | aggressive | 2 | |
| asses | general | 1 | |
| assfucker | aggressive | 2 | |
| assfukka | aggressive | 2 |
Prerequisites : the letsencrypt CLI tool
This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.
You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge.
Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.
I redirect all HTTP requests on HTTPS, so my nginx config looks like :
server {
| # I know dict's have `.get()`, this example was made to break if the key is not | |
| # there to show the use of multiple try/except's | |
| # Yes I know that having the except and else on 1 line each does not fit with PEP8 standards. | |
| # But when you have many of them it helps reduce the size of the file and is no harder to read | |
| data = {'some_key': 'key value'} | |
| key_data = None | |
| for _ in range(1): | |
| try: | |
| key_data = data['someKey'] |