Skip to content

Instantly share code, notes, and snippets.

@gengwg
gengwg / nvml_cgroupv2_fix.md
Last active May 9, 2025 06:14
Fix jobs originally seeing the GPUs fine, suddenly nvml goes away after a few hours

NOTE: This seems fixed our cluster. BUT I do see some still reporting cgroup2 having same issue, for example here. So YMMV.

DISCLAIMER: This seems works in our env. may not work in others. I'm still not sure what is the real root cause(s) yet. Not even 100% sure it full fixes in our env - it's been good for 2 weeks. But if it reappears, (for example, under certain use cases. high load or something), I'll be doomed.

TLDR

Switching to cgroup v2 seems fixed the nvml suddenly go away in pod issue.

Problem

@iarigby
iarigby / download_assignments.js
Last active September 12, 2022 03:52
Download all assignments from google classroom (student work window)
/**
HOW TO USE
1. go to assignment submissions (classwork > click assignment > student work)
2. open developer console ( F12 or right click > inspect element > console in top)
3. copy and paste this code, assignments will be downloaded in 5 second intervals
NOTE: CHANGE auth_user IF NECESSARY
if you are signed in to multiple google accounts, you need to select whichever you use for classroom
(ie freeuni account). If that account is the default one, leave at 0. Otherwise, sign in to gmail with that account
and the number will be displayed in url bar (https://mail.google.com/mail/u/$number), enter that
@Bertbk
Bertbk / .gitlab-ci.yml
Created October 3, 2019 08:31
Gitlab CI for Hugo (+ Academic theme)
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SSL_NO_VERIFY: "true"
pages:
image: monachus/hugo:latest
before_script:
- apt-get update -y -qq
- apt-get install git -y -qq
- git submodule update --init --recursive
@emxsys
emxsys / wget_google_drive_download.md
Last active April 4, 2025 16:46
Download Google Drive files with WGET

How to download files from Google Drive with WGET

Step 1. Get the ID of the file to download

  1. Get a shareable link from Google Drive by right-clicking the file and selecting Get Shareable Link.

  2. Examine the link to get the file's ID. Example:

    https://docs.google.com/open?id=[ID]

Step 2. Download the file with WGET

  1. Build the download URL using the ID obtained in Step 1. Example:
@alexpchin
alexpchin / Setting_upa_new_repo.md
Last active May 3, 2025 05:28
Create a new repository on the command line

Setting up a new Git Repo

##Create a new repository on the command line

touch README.md
git init
git add README.md
git commit -m "first commit"

git remote add origin [email protected]:alexpchin/.git

@rjzak
rjzak / PyUtils.cpp
Last active May 15, 2024 21:06
Convert between Python list/tuples and C++ vectors
#include <Python.h> // Must be first
#include <vector>
#include <stdexcept>
#include "PyUtils.h"
using namespace std;
// =====
// LISTS
// =====