This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
release: ./entrypoint.sh run alembic -c site.ini upgrade head | |
web: ./entrypoint.sh run pserve site.ini |
{"help": "https://catalog.data.gov/api/3/action/help_show?name=package_search", "success": true, "result": {"count": 48, "sort": "views_recent desc", "facets": {}, "results": [{"license_title": "License not specified", "maintainer": "New Media", "relationships_as_object": [], "private": false, "maintainer_email": "newmedia@whitehouse.gov", "num_tags": 5, "id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "metadata_created": "2016-07-02T10:06:26.199575", "metadata_modified": "2016-07-02T10:06:26.199575", "author": null, "author_email": null, "state": "active", "version": null, "creator_user_id": "47303a9e-1187-4290-85a3-1fc02dc49e4a", "type": "dataset", "resources": [{"cache_last_updated": null, "package_id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "webstore_last_updated": null, "id": "3a8a0ad1-19e7-4153-bb2f-d70cf88aaaf8", "size": null, "state": "active", "hash": "", "description": "", "format": "CSV", "tracking_summary": {"total": 32, "recent": 1}, "last_modified": null, "url_type": null, "no_real_name": "True", |
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
An example of using the Watson Speech to Text API to translate a podcast from ProPublica: How a Reporter Pierced the Hype Behind Theranos
This is just a simpler demo of the same technique I demonstrate to make automated video supercuts in this repo: https://github.com/dannguyen/watson-word-watcher
The transcription takes just a few minutes (less if you parallelize the requests to IBM) and is free...but it isn't perfect by any means. It doesn't fare super well on proper nouns:
Picking the right architecture = Picking the right battles + Managing trade-offs
from pyramid.security import NO_PERMISSION_REQUIRED | |
def includeme(config): | |
config.add_directive( | |
'add_cors_preflight_handler', add_cors_preflight_handler) | |
config.add_route_predicate('cors_preflight', CorsPreflightPredicate) | |
config.add_subscriber(add_cors_to_response, 'pyramid.events.NewResponse') | |
class CorsPreflightPredicate(object): |
Most projects on GitHub have a main repository that's the focal point of activity. For example, the Example organization has the Example.com repository:
https://github.com/example/example.com
Developers of Example.com typically call this the 'upstream' repository. We'll come back to it in a moment.
from sqlalchemy import ( | |
Column, | |
Index, | |
Integer, | |
Text, | |
) | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import engine_from_config |