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
#!/usr/bin/env python3 | |
import argparse, os, gc, json, random, csv | |
os.environ.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True") | |
# os.environ.setdefault("CUDA_LAUNCH_BLOCKING", "1") | |
import numpy as np | |
import torch | |
import torch.nn.functional as F | |
from datasets import load_dataset |
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
Definition of a norm\n• Assigns a positive number to each non-zero vector\n• Is only zero if the vector is an all-zero vector\n• Think of it as a function\nNorm properties\n• Homogeneity: ∥αx∥ = |α|∥x∥, for x ∈ RN and α ∈ R\n• Subadditivity: ∥x + y∥ ≤ ∥x∥ + ∥y∥, for x, y ∈ RN\n• Separability: x = 0 if and only if ∥x∥ = 0 |
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
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
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
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
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
void reheapDown(int i) { | |
int left = i*2 +1; | |
int right = i*2 +2; | |
if (right < size) { | |
int largerChild; | |
if (heap[left] >= heap[right]) { | |
largerChild = left; | |
} else { | |
largerChild = right; |
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
net_graph "1" | |
net_graphproportionalfont "0.5" | |
rate "786432" | |
hud_scaling "1" | |
cl_cmdrate "128" | |
cl_updaterate "128" | |
snd_menumusic_volume "0" // (disables menu music) | |
snd_mix_async "1" // (allows for shorter lookahead buffer (snd_mixahead), improves performance) |
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
ffmpeg -re -i .mkv -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -strict -2 -b:a 160k -ac 2 -ar 44100 -f flv rtmp:// | |
ffmpeg -re -i .mkv -c copy -f flv rtmp:// |
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
ffmpeg -re -i /home/steam/trans/new/1.mkv -c:v libx264 -preset veryfast -maxrate 3000k \ | |
-bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 \ | |
-ar 44100 -f flv rtmp:// |
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
------------------------------------------------- | |
nench.sh v2018.04.14 -- https://git.io/nench.sh | |
benchmark timestamp: 2019-01-07 18:06:49 UTC | |
------------------------------------------------- | |
Processor: QEMU Virtual CPU version (cpu64-rhel6) | |
CPU cores: 2 | |
Frequency: 2999.998 MHz | |
RAM: 1.9G | |
Swap: 1.0G |
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
https://openbenchmarking.org/result/1901043-KH-GAY61175664 | |
https://openbenchmarking.org/result/1901048-KH-EXTRAVMTE51 | |
compare: https://www.phoronix.com/scan.php?page=article&item=intel-7700k-linux&num=3 | |
------------------------------------------------- | |
nench.sh v2018.04.14 -- https://git.io/nench.sh | |
benchmark timestamp: 2019-01-05 02:29:59 UTC | |
------------------------------------------------- |
NewerOlder