https://github.com/spotify/docker-cassandra
This describes the method to obtain and run the spotify/cassandra
single-node instance on ubuntu 16.04 where docker is already installed.
- Obtain image
sudo docker pull spotify/cassandra
python3 install | |
------------------------ | |
1. install dependencies:: | |
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel li | |
2. Configure/build make:: |
https://github.com/spotify/docker-cassandra
This describes the method to obtain and run the spotify/cassandra
single-node instance on ubuntu 16.04 where docker is already installed.
sudo docker pull spotify/cassandra
# docker build -t ubuntu1604py36 | |
FROM ubuntu:16.04 | |
RUN apt-get update && \ | |
apt-get install -y software-properties-common && \ | |
add-apt-repository ppa:jonathonf/python-3.6 | |
RUN apt-get update | |
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv | |
RUN apt-get install -y git |
from PyPDF2 import PdfFileReader, PdfFileMerger | |
pdfs_to_merge = [ | |
# Page numbers are 0 start | |
# (FILEPATH, (START_PAGE, UNTIL_PAGE)) -- If None, all pages output | |
(None, (0, 5), | |
] | |
# Creating an object where pdf pages are appended to |
""" | |
Retrieve github archieve data from: | |
https://www.githubarchive.org/ | |
""" | |
import datetime | |
from concurrent.futures import ThreadPoolExecutor | |
from tqdm import tqdm |
import requests | |
METADATA_URL = 'http://169.254.169.254/latest/meta-data/' | |
class AmiMetaDataManager: | |
""" | |
Provides a simple wrapper around the AWS ec2 instance metadata interface | |
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html | |
""" |
Assumes you already have a sphinx project installed and a project created
make html
By default this command will build documentation to
_build/html
import json | |
from functools import wraps | |
import redis | |
REDIS_HOST = 'localhost' | |
REDIS_PORT = 6379 | |
REDIS_CONNECTION_POOL = redis.ConnectionPool(host=REDIS_HOST, port=REDIS_PORT) | |
CACHE_EXPIRE_SECONDS = 5000 |