Skip to content

Instantly share code, notes, and snippets.

View franccesco's full-sized avatar
🧑‍🍳
Cooking Code

Franccesco Orozco franccesco

🧑‍🍳
Cooking Code
View GitHub Profile
@yiidtw
yiidtw / logging_to_console.py
Created May 31, 2019 10:27
python logging snippet
#!/usr/local/bin/python3-aisoc
# -*- coding: utf-8 -*-
import logging
import sys
# set formatter
logging_formatter = logging.Formatter(' %(levelname)s %(asctime)s %(message)s', "%Y-%m-%d %H:%M:%S")
# set handler
@kunanit
kunanit / pandas_postgres.py
Created April 24, 2017 14:36
Read postgres database table into pandas dataframe
import pandas as pd
from sqlalchemy import create_engine
# follows django database settings format, replace with your own settings
DATABASES = {
'production':{
'NAME': 'dbname',
'USER': 'user',
'PASSWORD': 'pass',
'HOST': 'rdsname.clqksfdibzsj.us-east-1.rds.amazonaws.com',
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 6, 2024 04:11
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@cato-
cato- / verify_cert.py
Last active May 21, 2019 16:00
Python script to check the status of ssl certificates
#!/usr/bin/env python
#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <dev@robertweidlich.de> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return.
# ----------------------------------------------------------------------------
#