- A simple note for how to start multi-node-training on slurm scheduler with PyTorch.
- Useful especially when scheduler is too busy that you cannot get multiple GPUs allocated, or you need more than 4 GPUs for a single job.
- Requirement: Have to use PyTorch DistributedDataParallel(DDP) for this purpose.
- Warning: might need to re-factor your own code.
- Warning: might be secretly condemned by your colleagues because using too many GPUs.
Discover gists
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>🔥 Make a photo booth app in about 15 lines of JavaScript</title> | |
<link rel="icon" href="https://fav.farm/🎥" /> | |
</head> | |
<body> |
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
// put this in a file where your service worker used to live, like yourdomain.com/service-worker.js. You can find out this path in the SW dev tools of your browser | |
self.addEventListener('install', (e) => { | |
console.log('[Service Worker] Installing Service Worker ...', e); | |
self.skipWaiting(); | |
}); | |
self.addEventListener('activate', (e) => { | |
console.log('[ServiceWorker] Activate'); | |
self.registration |
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
/** | |
* Removes all not starred repls one by one | |
* from list on https://repl.it/repls page | |
* | |
* Open browser console, put code in it | |
* and hit enter: | |
*/ | |
const iterationsLimit = 1000 | |
let iterationIndex = 0, |
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
// Turn all HTML <a> elements into client side router links, no special framework-specific <Link> component necessary! | |
// Example using the Next.js App Router. | |
import { useRouter } from 'next/navigation'; | |
import { useEffect } from 'react'; | |
function useLinkHandler() { | |
let router = useRouter(); | |
useEffect(() => { | |
let onClick = e => { |
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
# Have you ever had multiple branches stacked on top of each other waiting for code review | |
# and need to merge origin/master (or some other change) up the chain through each of them. | |
# This script will do that! | |
# Example: merge_through_each master branch_parent branch_child branch_grand_child | |
run_command () { | |
echo "" | |
echo "running: $@" | |
if ! $@ |
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
/** | |
* Open Script Editor, change the current language to JavaScript, and paste the following code. | |
* You can also save the script as an app for faster access and run. | |
* | |
* By default, password-protected notes' content will be empty. | |
* For exporting protected notes as well, unlock them first. | |
* | |
* Based on: https://macmost.com/export-all-of-the-notes-on-your-mac-using-a-script.html, | |
* extends it with support for writing non-ASCII characters. | |
*/ |
Great Apps for Mac, iPhone, and iPad. Please submit any recommendations you have here. If you want a pretty, shareable list (most likely with less apps) share this link
Arc - Productivity Focused Browser (Mac, iPhone)
Brave - Privacy Focused Browser (Mac, iPhone, iPad)
Orion - Safari alternative that supports Chrome extensions (Mac, iPhone, iPad)
NewerOlder