- 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
# Created on Wed May 8 14:12:20 2024 | |
# @author: Aaron Huang | |
#--------------------------------------------------------------------------------- | |
# install signal library | |
install.packages("signal") | |
library("signal") | |
convolution <- function(x,h){ |
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
function validVideoId(id) { | |
var img = new Image(); | |
img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg"; | |
img.onload = function () { | |
checkThumbnail(this.width); | |
} | |
} | |
function checkThumbnail(width) { | |
//HACK a mq thumbnail has width of 320. |
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
#!/bin/bash | |
VERSION="1.1.8" | |
info() { | |
echo -e "\033[32m[Info]\033[0m $1" | |
} | |
error() { | |
echo -e "\033[31m[Error]\033[0m $1" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true
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
Alpine.directive('typed', (el, { expression, modifiers }, { evaluateLater, effect, cleanup }) => { | |
const getStrings = evaluateLater(expression); | |
const modifierValue = (key, fallback) => { | |
if (-1 === modifiers.indexOf(key)) { | |
return fallback; | |
} | |
const value = modifiers[modifiers.indexOf(key) + 1]; | |
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
/** | |
* @author Jui-Shan (Jenny) Liang <jsliang.tw@gmail.com> | |
* @param {Object} tp the `tp` object of the Templater plugin | |
* @param {Object} options options for configuring the year to generate the MOC and the file name format | |
* @param {string} options.YEAR what year to generate the MOC; default to the current year | |
* @param {string} options.YEARLY_FORMAT filename format of yearly notes; format reference: https://momentjs.com/docs/#/displaying/format/ | |
* @param {string} options.QUARTER_FORMAT filename format of quarterly notes; format reference: https://momentjs.com/docs/#/displaying/format/ | |
* @param {string} options.MONTH_FORMAT filename format of monthly notes; format reference: https://momentjs.com/docs/#/displaying/format/ | |
* @param {string} options.WEEK_FORMAT filename format of weekly notes; format reference: https://momentjs.com/docs/#/displaying/format/ | |
* @param {string} options.DAY_FORMAT filename format of daily notes; format reference: https://momentjs.com/docs/#/displaying/format/ |
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
<php | |
class NameClass { | |
/** | |
* Genera numero secuencial de solicitud | |
*/ | |
public function getNextOrderNumber() | |
{ | |
// Get the last created order | |
$lastOrder = TuModelo::orderBy('created_at', 'desc')->first(); |
NewerOlder