Skip to content

Instantly share code, notes, and snippets.

View ghammock's full-sized avatar
🖥️
Always Computer-ing

Gary Hammock ghammock

🖥️
Always Computer-ing
View GitHub Profile
@ghammock
ghammock / apply_v_vectorize.py
Created May 14, 2025 19:48
This mini-project shows the massive performance gain of using numpy vectorization over pandas.Series.apply()
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Gary Hammock, 2022
# SPDX-License-Identifier: MIT
#
# This script shows the massive speed up between using Pandas/NumPy `apply()` and
# using vectorization.
from functools import wraps
@ghammock
ghammock / gnome-terminal-profiles.adoc
Created June 24, 2021 15:00
Export / Import Gnome Terminal Profiles

Export Gnome Terminal Profile

List profiles

dconf dump /org/gnome/terminal/legacy/profiles:/

Determine the terminal profile string for the profile you will need. This is the terminal profile that I will export:

@ghammock
ghammock / bash-colors.md
Created June 22, 2021 05:58 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

@ghammock
ghammock / Flake8.txt
Created August 12, 2019 21:46 — forked from tossmilestone/Flake8.txt
Flake8 integrated with PyCharm
How to manually setup flake8 as PyCharm external tool
File / Settings / Tools / External Tools / Add
Name: Flake8
Program: $PyInterpreterDirectory$/python
Parameters: -m flake8 --max-complexity 10 --ignore E501 $FilePath$
Working directory: $ProjectFileDir$
Output Filters / Add
Name: Filter 1
@ghammock
ghammock / .screenrc
Last active December 9, 2019 20:42
My .screenrc file
# My GNU screen configuration file
# Gary Hammock
defscrollback 10000
termcapinfo screen-256color ti@:te@
# Lets me click on a pane to activate instead of C-a <tab>-ing everywhere.
mousetrack on
# I like to have four, equally-sized panes
@ghammock
ghammock / gist:24897ca77f807726e5eb9b990a6bbf78
Created August 11, 2018 00:23 — forked from bhurlow/gist:3043629
Linux Screen Cheat Sheets
–ctrl a c -> cre­ate new win­dow
–ctrl a A -> set win­dow name
–ctrl a w -> show all win­dow
–ctrl a 1|2|3|… -> switch to win­dow n
–ctrl a ” -> choose win­dow
–ctrl a ctrl a -> switch between win­dow
–ctrl a d -> detach win­dow
–ctrl a ? -> help
–ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ] -> paste from buffer