Skip to content

Instantly share code, notes, and snippets.

@glw
glw / find-and-cp-all-files
Created February 17, 2022 15:56
find and copy all files of a particular name without directory structure
find ./ -name 'G0*' -type f -exec cp -t /media/sf_Z_DRIVE/fpcc-trails/trails-2021/ --force --backup=t '{}' +
@glw
glw / psycopg.py
Last active July 12, 2022 19:56
psycopg2 quick n easy connect to db
import geopandas as gpd
import psycopg2
# import psycopg2.extras
# If you want to use yaml create a config file
import yaml
# yaml config file load
config = yaml.safe_load(open("config.yaml"))
@glw
glw / lidar_install.sh
Created January 12, 2023 21:28
Lidar software installs
https://help.ubuntu.com/community/CompilingEasyHowTo
sudo checkinstall << which puts the program in the package manager for clean, easy removal later. This replaces the old sudo make install command.
# gdal
# las-perf
git clone https://github.com/hobu/laz-perf.git \
cd laz-perf \
mkdir build \
cd build \
@glw
glw / install_pyenv.sh
Created August 1, 2023 05:57
Install pyenv on WSL (Ubuntu)
# Install pyenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
# other install directions https://github.com/pyenv/pyenv
# Install dependencies
sudo apt-get install -y git make gcc build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev