gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker
Macbook Pro 2015 Python 3.7
| Framework | Server | Req/s | Max latency | +/- Stdev |
|---|
gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker
Macbook Pro 2015 Python 3.7
| Framework | Server | Req/s | Max latency | +/- Stdev |
|---|
You can check here for getting the latest version. Change the wget url to download newer versions.
| import uuid | |
| import boto3 | |
| from decimal import Decimal | |
| from functools import partial | |
| from django.db import models | |
| from django.conf import settings | |
| class UUIDModel(models.Model): | |
| """ |
| import collections | |
| def dict_merge(dct, merge_dct): | |
| """ Recursive dict merge. Inspired by :meth:``dict.update()``, instead of | |
| updating only top-level keys, dict_merge recurses down into dicts nested | |
| to an arbitrary depth, updating keys. The ``merge_dct`` is merged into | |
| ``dct``. | |
| :param dct: dict onto which the merge is executed | |
| :param merge_dct: dct merged into dct |
| TTL=300 | |
| HOSTED_ZONE_ID= | |
| REVERSE_HOSTED_ZONE_ID= | |
| INSTANCE_ID= | |
| REGION= |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| CELERYD_HIJACK_ROOT_LOGGER = False | |
| def setup_task_logger(logger=None, **kwargs): | |
| logger.propagate = 1 | |
| from celery import signals | |
| signals.setup_logging.connect(lambda **kwargs: True) | |
| signals.after_setup_task_logger.connect(setup_task_logger) |
| // includes bindings for fetching/fetched | |
| var PaginatedCollection = Backbone.Collection.extend({ | |
| initialize: function() { | |
| _.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage', 'filtrate', 'sort_by'); | |
| typeof(options) != 'undefined' || (options = {}); | |
| typeof(this.limit) != 'undefined' || (this.limit = 20); | |
| typeof(this.offset) != 'undefined' || (this.offset = 0); | |
| typeof(this.filter_options) != 'undefined' || (this.filter_options = {}); | |
| typeof(this.sort_field) != 'undefined' || (this.sort_field = ''); |
| """ | |
| The MIT License (MIT) | |
| Copyright (c) 2011 Numan Sachwani | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| this software and associated documentation files (the "Software"), to deal in | |
| the Software without restriction, including without limitation the rights to | |
| use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
| of the Software, and to permit persons to whom the Software is furnished to do | |
| so, subject to the following conditions: |