sudo pacman -Syu
sudo pacman -Sc
yay -Sc --aur
This file contains hidden or 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
# Reference: https://discuss.pytorch.org/t/why-are-saved-models-so-large/166324/2 | |
for name, param in model.named_parameters(): | |
size = int((param.nelement() * param.element_size()) / (1024 ** 2)) # MB = 1024^2 bytes | |
print(name, param.nelement(), param.element_size(), f"{size}MB") | |
# EXAMPLE OUTPUT: | |
# concept_branch.we.embedding.weight 120005700 4 457MB | |
# visual_branch.we.embedding.weight 120005700 4 457MB | |
# visual_branch.fc.weight 78300 4 0MB |
This file contains hidden or 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
round( | |
if( | |
prop("Budget") > 0, | |
if ( | |
prop("Spent") > 0, | |
prop("Spent") / prop("Budget"), | |
if ( | |
prop("Spent") < 0, | |
1 - abs(prop("Spent")) / prop("Budget"), |
This file contains hidden or 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":"Alan Turing", | |
"content":"La vera maturità della scienza della computazione arriverà quando avremo sviluppato macchine che non possono essere distinguibili da quelle umane." | |
}, | |
{ | |
"author":"Steve Jobs", | |
"content":"Design è non solo ciò che sembra e si sente. Design è come funziona." | |
}, | |
{ |
This file contains hidden or 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
if( | |
prop("Status") == "Not started", | |
if( | |
dateBetween( | |
now(), | |
prop("Created At"), | |
"days" | |
) < 1, | |
"⚡", | |
if ( |
This file contains hidden or 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
if(prop("Tasks Number") == 0 and prop("Events Number") == 0, "🎉", | |
if(prop("Tasks Number") <= 2 and prop("Events Number") <= 0, "☕️", | |
if(prop("Tasks Number") <= 2 and prop("Events Number") <= 1, "⚡️", | |
if(prop("Tasks Number") <= 3 and prop("Events Number") <= 2, "🌩", | |
if(prop("Tasks Number") <= 4 and prop("Events Number") <= 3, "💥", | |
🌋 | |
) | |
) | |
) | |
) |
This file contains hidden or 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 exists(s, x) { | |
for (let i = 0; i < s.length; i++) { | |
if (s[i] === x) | |
return true | |
} | |
return false | |
} | |
function insert(s, x) { | |
if (!exists(s, x)) |
This file contains hidden or 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
// A straightforward solution for "No Repeats Please" | |
// coding interview exercise at freecodecamp.org | |
// (https://www.freecodecamp.org/learn/coding-interview-prep/algorithms/no-repeats-please) | |
// | |
// Luca Parolari | |
// | |
// GitHub: github.com/lparolari | |
// Email: [email protected] | |
// Telegram: @lparolari |
This file contains hidden or 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
input: '00S00' | |
blank: ' ' | |
start state: init | |
table: | |
# we want to start with the tape centered in the separator symbol | |
init: | |
0: { R } | |
S: { L: start } | |
start: | |
0: { L } |
This file contains hidden or 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
name: binary addition | |
source code: | | |
# Adds two binary numbers together. | |
# Format: Given input a+b where a and b are binary numbers, | |
# leaves c b on the tape, where c = a+b. | |
# Example: '11+1' => '100 1'. | |
input: '1011+11001' | |
blank: ' ' | |
start state: right |
NewerOlder