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
// ==UserScript== | |
// @name Refresh/Clear NBViewer Cache | |
// @namespace https://peijunz.github.io | |
// @author Peijun Zhu | |
// @description Add a button to navigation bar to refresh/clear the cache of nbviewer | |
// @include *://nbviewer.jupyter.org/*.ipynb* | |
// @version 2.4.1 | |
// @grant none | |
// @icon https://github.com/jupyter/design/raw/master/logos/Square%20Logo/squarelogo-greytext-orangebody-greymoons/squarelogo-greytext-orangebody-greymoons.png | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Massive Reset for Lon-Capa | |
// @description One click button to reset whole section | |
// @namespace https://peijunz.github.io | |
// @author Peijun Zhu | |
// @include http://nplq1.phyast.pitt.edu/adm/grades | |
// @include http://homework.phyast.pitt.edu/adm/grades | |
// @version 2017.09.07.2 | |
// @grant none | |
// @icon http://www.courseweaver.com/images/lc_logo.png |
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
class Arrayify: | |
def __init__(self, f): | |
self.f = f | |
def __getitem__(self, i): | |
print("Getitem Called") | |
return self.f(i) | |
def f(x): | |
print("Computing...") | |
return ((x+1)*x)//2 |
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
## | |
## Manjaro Linux custom mirrorlist | |
## Generated on 2020-01-16 15:01 | |
## | |
## Please use 'pacman-mirrors -id' To reset custom mirrorlist | |
## Please use 'pacman-mirrors -c all' To reset custom mirrorlist | |
## To remove custom config run 'pacman-mirrors -c all' | |
## | |
## Country : United_States |
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
# Antigen: https://github.com/zsh-users/antigen | |
ANTIGEN="$HOME/.local/bin/antigen.zsh" | |
# Install antigen.zsh if not exist | |
if [ ! -f "$ANTIGEN" ]; then | |
echo "Installing antigen ..." | |
[ ! -d "$HOME/.local" ] && mkdir -p "$HOME/.local" 2> /dev/null | |
[ ! -d "$HOME/.local/bin" ] && mkdir -p "$HOME/.local/bin" 2> /dev/null | |
# [ ! -f "$HOME/.z" ] && touch "$HOME/.z" | |
URL="http://git.io/antigen" |