-
Create the submodule:
git submodule add -b master <git@github.com:MYSUBMODULE.git> <path/to/MYSUBMODULE>
This creates the submodule and makes it track submodule's
master
branch. You can change the branch name if you want to track a different branch. -
Change some settings. In the parent repo:
# make it so that git status will include changes to submodules.
This file contains 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
def save(filepath, fig=None): | |
''' | |
Save the current figure in matplotlib with no whitespace in pdf format | |
''' | |
import matplotlib.pyplot as plt | |
if not fig: | |
fig = plt.gcf() | |
plt.subplots_adjust(0,0,1,1,0,0) | |
for ax in fig.axes: |
- Install virtualenv and virtualenvwrapper
python3.7 -m pip install virtualenv virtualenvwrapper
- Add the following files to
~/.bashrc
or~/.bash_profile
to setup the virtualenv and projects directory. Change the path to python3.7 if in a different path.export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3.7 export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/projects
This file contains 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
# This is a general-purpose function to ask Yes/No questions in Bash, either | |
# with or without a default answer. It keeps repeating the question until it | |
# gets a valid answer. | |
ask() { | |
# https://gist.github.com/davejamesmiller/1965569 | |
local prompt default reply | |
if [ "${2:-}" = "Y" ]; then | |
prompt="Y/n" |
NewerOlder