One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| """Downloading mp3""" | |
| from bs4 import BeautifulSoup | |
| import re | |
| import requests | |
| import urllib | |
| from os import system | |
| r = requests.get("http://") |
| .PHONY: test install pep8 release clean | |
| test: pep8 | |
| py.test --cov -l --tb=short --maxfail=1 program/ | |
| install: | |
| python setup.py develop | |
| pep8: | |
| @flake8 program --ignore=F403 --exclude=junk |
| import email | |
| def get_decoded_email_body(message_body): | |
| """ Decode email body. | |
| Detect character set if the header is not set. | |
| We try to get text/plain, but if there is not one then fallback to text/html. | |
| :param message_body: Raw 7-bit message body input e.g. from imaplib. Double encoded in quoted-printable and latin-1 |
$ python3
>>> Python 3.6.4
get-pip.py from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py$ python3
>>> Python 3.6.4
get-pip.py from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py| #!/usr/bin/env bash | |
| sudo apt-get update | |
| sudo apt-get install \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ |
| #A SQLAlchemy Cheat Sheet | |
| ###Introduction | |
| ##Basic Models | |
| One model is used to describe one database table. For example: | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import scoped_session,sessionmaker | |
| from zope.sqlalchemy import ZopeTransactionExtension | |
| from sqlalchemy import ( |
| from flask.views import MethodView | |
| from flask import jsonify, request, abort, make_response, current_app | |
| from flask_jwt_extended import jwt_required | |
| from agent import Agent | |
| from web.extensions import csrf | |
| from web.blueprints.data.models import Utterance | |
| class SlackAPI(MethodView): | |
| """ |
| import os | |
| print os.environ['HOME'] | |
| # Or you can see a list of all the environment variables using: | |
| os.environ | |
| #As sometimes you might need to see a complete list! | |
| # using get will return `None` if a key is not present rather than raise a `KeyError` | |
| print os.environ.get('KEY_THAT_MIGHT_EXIST') |