Skip to content

Instantly share code, notes, and snippets.

View ZediWards's full-sized avatar
:octocat:
building

Zach Edwards ZediWards

:octocat:
building
View GitHub Profile
@ZediWards
ZediWards / logger.py
Last active March 10, 2025 05:11
Python logging
# ref https://realpython.com/python-logging/
import logging
# filter for logging handler - console_handler_debugs
def show_only_debugs(record):
return record.levelname == 'DEBUG'
# instantiate logger and handlers
@ZediWards
ZediWards / main.py
Created March 5, 2025 07:08
SQLAlchemy notes
import uuid
from io import StringIO
import pandas as pd
import sqlalchemy as sql
import sqlalchemy.dialects.mssql as mssql
from sqlalchemy import (
Column,
Identity,
Integer,
@ZediWards
ZediWards / main.py
Created March 3, 2025 06:56
Python / Pandas read write
import csv
import json
import sys
from io import StringIO
import pandas as pd
import requests
# setting path for vscode interactive window
sys.path.append('/home/<user>/Code/python_playground')
@ZediWards
ZediWards / keybindings.json
Last active November 12, 2024 04:05
VS Code Settings
// Place your key bindings in this file to override the defaults
[
// NAVIGATION
{
"key": "ctrl+shift+n",
"command": "workbench.action.terminal.new",
"when": "terminalFocus | editorFocus"
},
{
"key": "ctrl+shift+j",
@ZediWards
ZediWards / gist:5b8b4902505de948daafa209639efd53
Created December 7, 2020 05:38
ERROR: error checking context: 'can't stat '/home/location/to/pgdata''.
The problem is that the curent user is not the owner of the directory. I got the same problem in Ubuntu, this line solves the issue:
sudo chown -R $USER <path-to-folder>