Skip to content

Instantly share code, notes, and snippets.

View sequoiap's full-sized avatar

Sequoia sequoiap

View GitHub Profile
import streamlit as st
import os
import sys
import importlib.util
# Parse command-line arguments.
if len(sys.argv) > 1:
folder = os.path.abspath(sys.argv[1])
else:
folder = os.path.abspath(os.getcwd())
import os
import signal
import subprocess
import sys
# Parse command-line arguments.
if len(sys.argv) > 1:
folder = os.path.abspath(sys.argv[1])
else:
folder = os.path.abspath(os.getcwd())
@jbwillis
jbwillis / auvsi_guide.md
Last active September 25, 2019 15:36
Guide for getting up and running with BYU AUVSI

This is a quick write up of how to get going with the AUVSI software. By no means is this complete, but these notes will help (hopefully).

Computer Set Up

These are the necessary steps for getting your computer ready to run the AUVSI software.

  • Install Ubuntu 18.04 as a dual-boot system along with your other operating system(s). I highly recommend dual booting rather than trying to use a Virtual Machine. I used a VM for the first few months of AUVSI but I started running into weird network and device issues, so I had to switch over to a dual boot system and essentially start over. I have a bootable USB with 18.04 on it, anyone who wants to use it is welcome to get it from me in the MAGICC lab. See https://howtoubuntu.org/how-to-install-ubuntu-18-04-bionic-beaver for more instructions. Note: Don't install any version besides 18.04 - ROS Melodic only officially supports 18.04 and all of the MAGICC lab code you'll be using is meant to run on Melodic.
  • On your Ubuntu 18.04 installation:
  • Install ROS Mel
@shaypal5
shaypal5 / .travis.yml
Last active November 28, 2023 19:45
Comprehensive Python testing on Travis CI
language: python
# ===== Linux ======
os: linux
dist: xenial
python:
- 2.7
- 3.6
- 3.7
- 3.8
- 3.9
@r00tdaemon
r00tdaemon / Install PyQt5 on Ubuntu with python3 .md
Last active May 4, 2024 04:08
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@8bit-pixies
8bit-pixies / changeslope.py
Last active May 21, 2022 09:26
Interactive tkinter matlibplot example.
import Tkinter
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure
class App:
def __init__(self, master):
# Create a container
frame = Tkinter.Frame(master)
# Create 2 buttons
self.button_left = Tkinter.Button(frame,text="< Decrease Slope",
import os, sys
markdown_name = sys.argv[1]
name = markdown_name.split(".")[0]
latex_name = name + ".tex"
os.system("pandoc -f markdown -t latex %s -o %s" % (markdown_name, latex_name))
with open(latex_name, "r") as latex_file:
latex_content = latex_file.read()
@dmeliza
dmeliza / scalebars.py
Last active February 7, 2023 00:33
matplotlib: add scale bars to axes
# -*- coding: utf-8 -*-
# -*- mode: python -*-
# Adapted from mpl_toolkits.axes_grid1
# LICENSE: Python Software Foundation (http://docs.python.org/license.html)
from matplotlib.offsetbox import AnchoredOffsetbox
class AnchoredScaleBar(AnchoredOffsetbox):
def __init__(self, transform, sizex=0, sizey=0, labelx=None, labely=None, loc=4,
pad=0.1, borderpad=0.1, sep=2, prop=None, barcolor="black", barwidth=None,
**kwargs):