Skip to content

Instantly share code, notes, and snippets.

# ~/.config/systemd/user/arxiv_bot.service
[Unit]
Description=Slack Arxiv Bot
[Service]
ExecStart=VENV_PATH RUN_PY_PATH
WorkingDirectory=DIR_PATH
Restart=always
@juice500ml
juice500ml / requirements.txt
Created March 31, 2020 02:56
mma_crawler.service
requests
beautifulsoup4
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(figsize=(5, 5))
ax = fig.add_subplot(projection='3d')
k = 500
z = np.arange(0, k)
ax.scatter(
@juice500ml
juice500ml / count_files.py
Last active June 28, 2024 09:50
Counting files
from collections import defaultdict
import pkgutil
import os
import matplotlib as mpl
import matplotlib.pyplot as plt
from cycler import cycler
mpl.rcParams["axes.prop_cycle"] = cycler(color=["#648fff", "#785ef0", "#dc267f", "#fe6100", "#FFB000", "#648fff", "#dc267f", "#000000"])
def _size_count(fname):
@juice500ml
juice500ml / utils.sh
Created January 21, 2025 03:38
Use slurm to turn on various apps
tensorboard_slurm() {
local port="$1"
local exp_path="$2"
local session_tag="tensorboard_$(date +%s)"
if [[ -z "$port" || -z "$exp_path" ]]; then
echo "Usage: tensorboard_slurm <port> <path_to_experiment>"
return 1
fi