Skip to content

Instantly share code, notes, and snippets.

View aplavin's full-sized avatar

Alexander Plavin aplavin

View GitHub Profile
# Subscribe (watch) all my GitHub repos I'm not already watching.
# "Mine" = everything I own (incl. forks) + org repos I have admin on.
# (GitHub exposes no repo "creator", so admin permission is the proxy for org repos.)
set -euo pipefail
export GH_ME=$(gh api /user -q .login)
# My repos: owned by me (incl. forks) or an org repo I administer.
mine=$(gh api "/user/repos?affiliation=owner,organization_member&per_page=100" --paginate \
-q '.[] | select(.owner.login==env.GH_ME or .permissions.admin==true) | .full_name' | sort)
@aplavin
aplavin / startup.jl
Created January 22, 2025 02:50
startup.jl with BasicAutoloads for many useful packages
insert!(LOAD_PATH, 2, mktempdir())
if isinteractive()
import BasicAutoloads
BasicAutoloads.register_autoloads([
# dev tools:
["@btime", "@benchmark"] => :(using BenchmarkTools),
["@b", "@be"] => :(using Chairmarks),
["@descend", "@descend_code_typed", "@descend_code_warntype"] => :(using Cthulhu),
@aplavin
aplavin / mywidgets.py
Created August 20, 2016 15:51
ipywidgets extensions
import ipywidgets as iw
import traitlets
class SelectionSliderBtns(iw.Box):
description = traitlets.Unicode()
value = traitlets.Any()
options = traitlets.Union([traitlets.List(), traitlets.Dict()])
def __init__(self, **kwargs):
@aplavin
aplavin / stats.ipynb
Last active August 29, 2015 14:04
Статистика набора 2011, МФТИ, ФУПМ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.