#LaTeX in IPython Notebook
With this extension you can use LaTeX-style references within IPython (Notebook) while still using markdown for formatting.
Required:
- ipython-dev
- biblio-py
- markdown
function gcm | |
# Check if llm is installed, if not, install it | |
if not type -q llm | |
echo "'llm' is not installed. Attempting to install it using pip..." | |
if pip install llm | |
echo "'llm' installed successfully." | |
else | |
echo "Failed to install 'llm'. Please install it manually and try again." | |
return 1 | |
end |
# ----------------------------------------------------------------------------- | |
# AI-powered Git Commit Function | |
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
# 1) gets the current staged changed diff | |
# 2) sends them to an LLM to write the git commit message | |
# 3) allows you to easily accept, edit, regenerate, cancel | |
# But - just read and edit the code however you like | |
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
gcm() { |
""" | |
Export a Conda environment with --from-history, but also append | |
Pip-installed dependencies | |
Exports only manually-installed dependencies, excluding build versions, but | |
including Pip-installed dependencies. | |
Lots of issues requesting this functionality in the Conda issue tracker, no | |
sign of progress (as of March 2020). |
from __future__ import print_function, division | |
from timeit import default_timer as timer | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from numba import njit | |
w = 400 | |
h = 300 |
## | |
## Copy & Paste Tool for images to PowerPoint(.pptx) | |
## | |
import pptx | |
import pptx.util | |
import glob | |
import scipy.misc | |
OUTPUT_TAG = "MY_TAG" |
import numpy as np | |
import matplotlib.pyplot as plt | |
w = 400 | |
h = 300 | |
from numba import autojit | |
@autojit | |
def normalize(x): |
#LaTeX in IPython Notebook
With this extension you can use LaTeX-style references within IPython (Notebook) while still using markdown for formatting.
Required:
# This script was created to convert a directory full | |
# of markdown files into rst equivalents. It uses | |
# pandoc to do the conversion. | |
# | |
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/ | |
# 2. Copy this script into the directory containing the .md files | |
# 3. Ensure that the script has execute permissions | |
# 4. Run the script | |
# | |
# By default this will keep the original .md file |
#!/bin/sh | |
# make sure requirements.txt is up to date with every commit | |
# by comparing the output of pip freeze | |
pip freeze | diff requirements.txt - > /dev/null | |
if [ $? != 0 ] | |
then | |
echo "Missing python module dependencies in requirements.txt. Run 'pip freeze > requirements.txt' to update." | |
exit 1 | |
fi |