Skip to content

Instantly share code, notes, and snippets.

@pardusnimr
pardusnimr / hocr_parse.py
Created May 14, 2023 10:38 — forked from mndrake/hocr_parse.py
HOCR output parsing from pytesseract
#!/usr/bin/env python
# coding: utf-8
# In[11]:
# dependencies
import pytesseract
from bs4 import BeautifulSoup
from PIL import Image
@pardusnimr
pardusnimr / django-postgresql-gunincorn-nginx-pyenv-ubuntu-16.04.md
Created September 26, 2022 11:30
How to deploy a Django app with PostgreSQL + Gunicorn + Nginx using pyenv on Ubuntu Server 16.04

How to deploy a Django app with PostgreSQL + Gunicorn + Nginx using pyenv on Ubuntu Server 16.04

This guide shows how to setup a production environment for a Django application using PostgreSQL as database, Gunicorn as application server and Nginx as http server using Ubuntu Server 14.04 as Operative System.

Install PosgreSQL, Nginx, Git and Circus

Install PostgreSQL and Nginx using:

sudo apt-get install -y postgresql-9.5 postgresql-contrib-9.5 postgresql-server-dev-9.5 nginx git circus make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils python-setuptools