#!/bin/bash
# --- set your monitor below
if [ $1 -eq 0 ]
then
monitor=DP-3
elif [ $1 -eq 1 ]
then
monitor=HDMI-0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env fish | |
| ######################################################################### | |
| # Based on the bash script in https://github.com/jackokaiser/dot_profiles | |
| ######################################################################### | |
| function find_git_repos | |
| set ignore_pattern "(3|(t|T)hi)rd_?(p|P)arty" | |
| if test (count $argv) -gt 0 | |
| if test $argv[1] = "-a" | |
| set ignore_pattern "*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import numpy as np | |
| import open3d as o3d | |
| from skimage.color import rgb2lab | |
| from dataclasses import dataclass | |
| @dataclass | |
| class O3DRANSACPlaneFitter: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set fish_prompt_pwd_dir_length 7 | |
| set fish_prompt_pwd_full_dirs 1 | |
| set SYNC_DIR /mnt/sync | |
| function s3_to_local_path | |
| echo $SYNC_DIR/(string replace -r 's3://' '' $argv[1]) | |
| return 0 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import json | |
| from typing import List, Tuple | |
| import boto3 | |
| from smart_open import open | |
| from botocore.exceptions import ClientError | |
| def load_json(path_to_json: str) -> dict: | |
| with open(path_to_json) as file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Comments in Vimscript start with a `"`. | |
| " | |
| " If you open this file in Vim, it'll be syntax highlighted for you. | |
| " Vim is based on Vi. Setting `nocompatible` switches from the default | |
| " Vi-compatibility mode and enables useful Vim functionality. This | |
| " configuration option turns out not to be necessary for the file named | |
| " '~/.vimrc', because Vim automatically enters nocompatible mode if that file | |
| " is present. But we're including it here just in case this config file is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -g mouse on | |
| set-option -g prefix C-z | |
| bind-key \\ split-window -h # Split panes horizontal | |
| bind-key - split-window -v # Split panes vertically | |
| set -sg escape-time 10 | |
| set-option -g default-terminal "screen-256color" | |
| set-option -sa terminal-overrides ',screen-256color:RGB' | |
| set -g default-command /usr/bin/fish | |
| set -g default-shell /usr/bin/fish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Learning GAN | |
| ### From this tutorial: https://towardsdatascience.com/build-a-super-simple-gan-in-pytorch-54ba349920e4 (code at https://github.com/nbertagnolli/pytorch-simple-gan) | |
| import torch | |
| import torch.nn as nn | |
| import numpy as np | |
| import math | |
| class Generator(nn.Module): | |
| def __init__(self, input_length, middle_length, output_length): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pyautogui, time, math | |
| from matplotlib import pyplot as plt | |
| import numpy as np | |
| from numpy.polynomial import polynomial as P | |
| from pynput import mouse, keyboard | |
| def on_press1(key): | |
| if key == keyboard.Key.esc: | |
| return False # stop listener | |
| try: |