Upload files to S3 with Python (keeping the original folder structure )

This is a sample script for uploading multiple files to S3 keeping the original folder structure. Doing this manually can be a bit tedious, specially if there are many files to upload located in different folders. This code will do the hard work for you, just call the function upload_files(‘/path/to/my/folder’). The param of the function must be the path of …

Compressing & Decompressing files

Compressing Or for .gz files: Compressing folder Sometimes you may get problems with absolute paths. For example, the following command will compress the whole structure /tmp/data/example/ (including tmp and data folders) within the file example.tgz. To avoid this just use -C, in the following example the full path will by replaced by the name of the last folder called “example“. …

Circumvent SSL errors when installing python packages via pip on OSX

Since I am using OS X “El Capitan” I started to have SSL issues when trying to install some packages: fatal error: ‘openssl/opensslv.h’ file not found The easiest fix would be using brew to detect the paths of the SSL library (of course brew and ssl must be already installed)