Skip to content

Instantly share code, notes, and snippets.

View cgobat's full-sized avatar
🔭

Caden Gobat cgobat

🔭
View GitHub Profile
@cgobat
cgobat / subprocess.md
Created September 2, 2022 17:44
Python subprocess quick reference guide

Python subprocess quick reference guide

Some methods for running shell commands from within Python, depending on what the expected behavior and desired output are.


Popen

class subprocess.Popen(args, bufsize=- 1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, group=None, extra_groups=None, user=None, umask=- 1, encoding=None, errors=None, text=None, pipesize=- 1)

@cgobat
cgobat / cspice_exes.py
Last active October 13, 2022 19:19
NAIF CSPICE executable utilities made available within Python
import os, sys, platform
import subprocess
CSPICE_dir = "/absolute/path/to/cspice/"
__doc__ = """
SPICE executables, made available from within Python.
Available executables:
""" + "\n".join([os.path.splitext(exe)[0] for exe in os.listdir(os.path.join(CSPICE_dir,"exe"))]) + """
"""
@cgobat
cgobat / github_intro.pdf
Last active February 24, 2022 01:17
Work-in-progress introduction to GitHub slide deck I created, aimed at peers
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cgobat
cgobat / activity recognition.ipynb
Last active February 20, 2022 01:54
Classifying physical activity using smartphone motion data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cgobat
cgobat / color_spectra.ipynb
Last active August 16, 2022 19:35
Color stuff with spectra
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cgobat
cgobat / IR_cam.py
Last active February 22, 2024 15:31
Software for Raspberry Pi to capture and overlay data from an AMG8833 infrared thermal camera with images from the RPi optical camera
#######################################################
#
# Thermal camera display for AMG8833 IR camera
#
# by Caden Gobat
# PHYS 2152 | The George Washington University
#
#######################################################
import time, sys
@cgobat
cgobat / named_colors.ipynb
Last active October 10, 2020 05:00
Named color options in matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cgobat
cgobat / holoviews_demo.ipynb
Last active October 10, 2020 05:00
Interactive plotting demonstration
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cgobat
cgobat / powerlaws.ipynb
Last active February 25, 2026 09:25
Overview of broken power law functions and fitting them to data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cgobat
cgobat / alternatives.md
Last active August 15, 2022 22:05
Digital privacy

Privacy-oriented solutions to common software needs

  • Signal Private Messenger
    • End-to-end encrypted open-source messaging app for desktop, Android, and iOS.
  • DuckDuckGo
    • Easy-to-use, non-tracking search engine that (for the most part) holds its own against the likes of Google in terms of search performace.
    • See deGoogle.md for alternatives to other Google services.
  • Tor Browser
    • The Onion Router: long considered the gold standard of internet privacy solutions. Routes you through an overlay network consisting of more than seven thousand relay nodes around the world to anonymize your traffic.
  • TAILS OS