Skip to content

Instantly share code, notes, and snippets.

View BeibinLi's full-sized avatar

Beibin Li BeibinLi

View GitHub Profile
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
import random
import math
#
# Shorthand:
# "pd_" as a variable prefix means "partial derivative"
# "d_" as a variable prefix means "derivative"
# "_wrt_" is shorthand for "with respect to"
# "w_ho" and "w_ih" are the index of weights from hidden to output layer neurons and input to hidden layer neurons respectively
#
;; Edit the .spacemacs file directly on gist.github.com
;; https://gist.github.com/BeibinLi/60ce9703cc67070ef3d6619f2ef529aa/edit
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
;; IMPORTANT NOTE: in Windows, you should set HOME variable to "C:/Users/beibin"
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
@BeibinLi
BeibinLi / .emacs
Created June 1, 2017 23:55
Emacs Configuration File
;; .emacs
;; Emacs Setting for Beibin Li
;; Date Modified: 05/31/2017
;;;;;;;;;;;;;;;;;;;;;;;;;; Package ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Add source to packages
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
@BeibinLi
BeibinLi / .vimrc
Last active April 10, 2020 20:19
My Vim Configuration
" My gist page for this configuration file is at:
" https://gist.github.com/BeibinLi/1407e6507a185410b909
" setup vimrc encoding to accept special characters. (useful for "eol")
:scriptencoding utf-8
:set encoding=utf-8"
" ================ Begin of Vundle Config ========================