Skip to content

Instantly share code, notes, and snippets.

View usmcamp0811's full-sized avatar

Matt usmcamp0811

View GitHub Profile
@usmcamp0811
usmcamp0811 / podman-shell.nix
Created February 3, 2024 17:31 — forked from adisbladis/podman-shell.nix
Use podman within a nix-shell
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };
###############################
## Dell XPS 15 9570 (0x087C) ##
###############################
{ config, lib, pkgs, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.kernelModules = [ "kvm-intel" "i915" ];
boot.kernelParams = [
@usmcamp0811
usmcamp0811 / arch-base-install.sh
Created July 20, 2021 18:27
simple arch setup script
#!/bin/sh
echo "Installing Base Packages from the Arch main repositories"
sudo pacman -S $(curl https://raw.githubusercontent.com/usmcamp0811/dotfiles/wopr/pkglist-base | cut -d ' ')
echo "Installing Base Packages from AUR"
sudo pacman -S $(curl https://raw.githubusercontent.com/usmcamp0811/dotfiles/wopr/pkglist-aur-base | cut -d ' ')
@usmcamp0811
usmcamp0811 / Benchy.gcode
Last active July 2, 2020 21:09
My current Cura configuration generated this gcode. Something is wrong and I don't know what. Can you help please.
;FLAVOR:Marlin
;TIME:7063
;Filament used: 4.92822m
;Layer height: 0.2
;MINX:108.627
;MINY:103.906
;MINZ:0.2
;MAXX:169.749
;MAXY:135.252
;MAXZ:48
@usmcamp0811
usmcamp0811 / gmm_mean_visualization.py
Created September 29, 2019 19:09
Something to visualize the guassians of a gmm model
import holoviews as hv
from sklearn.preprocessing import MinMaxScaler
from holoviews import opts
hv.extension('bokeh')
test = DiscretizerGMM(data=X["X"].values, merge_right_of_elbow=False, n_components=20, name="X")
gmm_df = test.gmm_df(sort="weights")
scale = MinMaxScaler()
gmm_df["weights"] = scale.fit_transform(np.reshape(gmm_df["weights"].values, (-1,1)))
def gmm_mean_plot(gmm_df, n_std=1):
mean_lines = []
@usmcamp0811
usmcamp0811 / input.ipynb
Last active February 22, 2019 00:56
An attempt at getting papermill to work with Julia Notebooks.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@usmcamp0811
usmcamp0811 / arma3.log
Created January 19, 2019 20:06
Arma3 Joystick Crash Log
System Information:
OS Version:
Linux Distribution: Manjaro Linux
Kernel Version: 4.19.14-1-MANJARO #1 SMP PREEMPT Wed Jan 9 17:17:37 UTC 2019
Hardware Info:
Machine Type Gigabyte Technology Co., Ltd. Z170X-Gaming 7 Default string
CPU Type GenuineIntel x86_64
CPU Info Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
CPU Speed 4200 MHz
@usmcamp0811
usmcamp0811 / MorletWavelets.lgt.py
Last active November 9, 2018 17:04
A simple notebook to explore Morlet Wavelets in Time and in Frequency
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .lgt.py
# format_name: light
# format_version: '1.3'
# jupytext_version: 0.8.4
# kernelspec:
# display_name: Python 3.6 (TF)
@usmcamp0811
usmcamp0811 / ctable_append.py
Created October 1, 2018 17:34
concat two or more ctables along the 0 axis.
def ctable_append(cts):
"""
A function to append multiple ctables and clean up the disk entries along the 0 axis
similar to pd.concat([df1, df2], axis=0)
:param cts: a string containing the root directory path or a list of ctables
:return: ctable
"""
import shutil
@usmcamp0811
usmcamp0811 / load_dfs_in_dask.py
Created September 25, 2018 14:45
Quick test to see if loading Feather files into Dask was any better or worse than Parquet files in Dask. They seem to be comparable in performance and not much extra code for the Feather files.
import os
import feather
from tqdm import tqdm
import dask
import datetime
from dask import delayed
from dask import visualize
import pandas as pd
import dask.dataframe as dd