- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; Javier's .emacs file | |
;;; Javier Garcia | |
;;; 18 April 2017 | |
;;;;------------------------------------------- | |
;;;; GENERAL SETTINGS | |
;;;;------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pathlib | |
import logging | |
import re | |
FORMAT = '%(asctime)s %(levelname)-7s %(message)-70s %(name)s.%(funcName)s' | |
def setup_logging(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to create ansible basic project directory structure | |
# https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html | |
#production # inventory file for production servers | |
#staging # inventory file for staging environment | |
# | |
#group_vars/ |
Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py
:
def exclude_tables_from_config(config_):
tables_ = config_.get("tables", None)
if tables_ is not None:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Mar 28, 2016 | |
@author: Javier Garcia | |
''' | |
import numpy as np | |
from datetime import date | |
from scipy.optimize import newton | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
success: function(data) { | |
var blob=new Blob([data]); | |
var link=document.createElement('a'); | |
link.href=window.URL.createObjectURL(blob); | |
link.download="<FILENAME_TO_SAVE_WITH_EXTENSION>"; | |
link.click(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from pathlib import Path | |
from datetime import datetime | |
from typing import List | |
from contextlib import contextmanager | |
from sqlalchemy import create_engine, select | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.exc import SQLAlchemyError | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, DateTime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dotenv import dotenv_values | |
class Config: | |
""" | |
v0.2 | |
Config class for storing and accessing configurations. | |
This class loads configurations from different sources, such as '.env' files and environment variables, | |
and provides a convenient way to access the configuration values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from clickhouse_driver import Client, connect, errors | |
from clickhouse_driver.dbapi.cursor import Cursor | |
logger = logging.getLogger(__name__) | |
class ClickHouseDB: | |
""" | |
Class for working with a ClickHouse server | |
""" |