edit ~/.profile or ~/.bashrc add the last line below
export VIRTUALENVWRAPPER_PYTHON=`which python`
export VIRTUALENVWRAPPER_VIRTUALENV=`which virtualenv`
source `which virtualenvwrapper.sh`
execute by . ~/.profile or ~/.basrhrc
| #!/bin/bash | |
| mkdir -p outdir | |
| for i in *.mp4 *.mkv; do | |
| printf "save as outdir/${i%%.*}.mp3" | |
| ffmpeg -i "$i" "outdir/${i%%.*}.mp3" | |
| done |
| """ | |
| This script was used to create the figures for http://jrsmith3.github.io/sample-logs-the-secret-to-managing-multi-person-projects.html from a PDF file containing some old CMU sample logs. | |
| """ | |
| import PyPDF2 | |
| from wand.image import Image | |
| import io | |
| import os |
| from django.http import HttpResponse | |
| def django_file_download_view(request): | |
| filepath = '/path/to/file.xlsx' | |
| with open(filepath, 'r') as fp: | |
| data = fp.read() | |
| filename = 'some-filename.xlsx' | |
| response = HttpResponse(mimetype="application/ms-excel") | |
| response['Content-Disposition'] = 'attachment; filename=%s' % filename # force browser to download file | |
| response.write(data) |
edit ~/.profile or ~/.bashrc add the last line below
export VIRTUALENVWRAPPER_PYTHON=`which python`
export VIRTUALENVWRAPPER_VIRTUALENV=`which virtualenv`
source `which virtualenvwrapper.sh`
execute by . ~/.profile or ~/.basrhrc
when trying start gunicorn
[2015-03-16 10:59:45 +0700] [79204] [INFO] Starting gunicorn 19.2.1
[2015-03-16 10:59:45 +0700] [79204] [ERROR] Connection in use: ('127.0.0.1', 8080)
ps -ax | grep gunicorn
79194 ttys000 0:00.33 /~/gunicorn -b 127.0.0.1:8080
#Konfigurasi Virtual Environment
vagrant up
vagrant ssh
pip install virtualenv