Skip to content

Instantly share code, notes, and snippets.

View chanshing's full-sized avatar

Shing Chan chanshing

  • University of Oxford
  • Oxford
  • 21:45 (UTC +01:00)
  • LinkedIn in/shingc
View GitHub Profile
@chanshing
chanshing / .bashrc
Last active May 23, 2022 21:32
Minimal .bashrc with color prompt, git prompt & git autocomplete
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
@chanshing
chanshing / make_capture24.py
Created December 7, 2021 15:03
Make window chunks for Capture-24 dataset
import re
import glob
import os
import numpy as np
import pandas as pd
from tqdm.auto import tqdm
DEVICE_HZ = 100 # Hz
WINDOW_SEC = 10 # seconds
# WINDOW_OVERLAP_SEC = 5 # seconds
@chanshing
chanshing / .tmux.conf
Last active March 6, 2024 14:31
tmux configuration file
# List of plugins
# Make sure install tpm:
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Allows for faster key repetition
# NOTE: Don't set this to zero: https://github.com/microsoft/WSL/issues/5931
@chanshing
chanshing / .flake8
Last active April 26, 2022 10:25
flake8: put in .config/flake8
[flake8] # Modified from PyTorch project
select = B,C,E,F,P,T4,W,B9
max-line-length = 120
# C408 ignored because we like the dict keyword argument syntax
# E501 is not flexible enough, we're using B950 instead
ignore =
E203,E265,E305,E402,E501,E721,E741,F405,F821,F841,F999,W503,W504,C408,E302,W291,E303,
# shebang has extra meaning in fbcode lints, so I think it's not worth trying
# to line this up with executable bit
EXE001,
@chanshing
chanshing / .inputrc
Last active February 12, 2024 12:03
inputrc
# Use Vi, not Emacs, style editing
set editing-mode vi
set completion-ignore-case on
set completion-map-case on
set mark-symlinked-directories on
set show-all-if-ambiguous on
set match-hidden-files off
# Keymaps for when we're in command mode
set keymap vi-command