Create a parallel profile
ipython profile create --parallel --profile=slurm
cd into ~/.ipython/profile_slurm/
// ==UserScript== | |
// @name Disable Back Button | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Disables the back button for specified URLs | |
// @author You | |
// @match https://app.dataannotation.tech/workers/tasks/* | |
// @grant none | |
// ==/UserScript== | |
// Replace "your-target-website-url-here" with the actual URLs you want to target |
PROJECT(LatexProject NONE) | |
CMAKE_MINIMUM_REQUIRED(VERSION 3.11) | |
FIND_PACKAGE(LATEX) | |
IF(LATEX_FOUND) | |
IF(LUALATEX__FOUND) | |
MESSAGE(STATUS "lualatex found - ${LUALATEX_COMPILER}") | |
ENDIF() | |
IF(BIBTEX_FOUND) | |
MESSAGE(STATUS "bibtex found - ${BIBTEX_COMPILER}") |
#!/bin/zsh | |
# A version of the 'timeout' command that works with shell functions | |
# | |
# Usage: | |
# source timeout_fn.sh | |
# timeout_fn DURATION COMMAND [ARG]... | |
timeout_fn () { | |
local timeout=$1 | |
shift |
# Local: | |
# https://stackoverflow.com/questions/21151178/shell-script-to-check-if-specified-git-branch-exists | |
# test if the branch is in the local repository. | |
# return 1 if the branch exists in the local, or 0 if not. | |
function is_in_local() { | |
local branch=${1} | |
local existed_in_local=$(git branch --list ${branch}) | |
if [[ -z ${existed_in_local} ]]; then | |
echo 0 |
# First, we need to find our device. BEFORE inserting your USB drive, run the | |
# following: | |
diskutil list | |
# This will output a bunch of info about all of the disk drives connected to | |
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is | |
# some number starting at 0. Now, insert your USB drive and run the command | |
# again. You should see a new entry. Make note of the name (ie, /dev/diskX). | |
diskutil list |
# - Find Boost | |
# | |
# Copyright (c) 2016 Thiago Perrotta | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
# the Software, and to permit persons to whom the Software is furnished to do so, | |
# subject to the following conditions: |
# for gist naming purposes |
# according to http://jdfreder-notebook.readthedocs.org/en/docs/examples/Notebook/Importing%20Notebooks.html | |
import io, os, sys, types | |
from IPython import get_ipython | |
from IPython.nbformat import current | |
from IPython.core.interactiveshell import InteractiveShell | |
def find_notebook(fullname, path=None): | |
"""find a notebook, given its fully qualified name and an optional path | |
This turns "foo.bar" into "foo/bar.ipynb" |
Useful tip from the late creator of matplotlib, John Hunter.
http://matplotlib.1069221.n5.nabble.com/dynamically-add-subplots-to-figure-td23571.html
import matplotlib.pyplot as plt
# start with one
fig = plt.figure()
ax = fig.add_subplot(111)