Skip to content

Instantly share code, notes, and snippets.

View jamesbraza's full-sized avatar
😋

James Braza jamesbraza

😋
View GitHub Profile
@pylover
pylover / inspections.txt
Last active April 22, 2024 07:47 — forked from ar45/inspections.txt
PyCharm inspections
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |'
# noinspection PyPep8
# noinspection PyPep8Naming
# noinspection PyTypeChecker
# noinspection PyAbstractClass
# noinspection PyArgumentEqualDefault
# noinspection PyArgumentList
# noinspection PyAssignmentToLoopOrWithParameter
# noinspection PyAttributeOutsideInit
@danielrichman
danielrichman / postgresqlhandler.py
Last active May 8, 2021 18:19
python postgres log handler
import logging
import traceback
import psycopg2
class PostgreSQLHandler(logging.Handler):
"""
A :class:`logging.Handler` that logs to the `log` PostgreSQL table
Does not use :class:`PostgreSQL`, keeping its own connection, in autocommit
mode.