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 | |
| """ | |
| Alipay mini-program 0.data unpacker. | |
| Observation: the provided 0.data is a ustar TAR archive (uncompressed). | |
| This script safely lists or extracts its contents. | |
| Usage examples: | |
| - List: python unpack.py --list 0.data | |
| - Extract: python unpack.py 0.data -o 0.data.out |
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
| def pad(x:torch.Tensor, shape:torch.Size, mode='right with zero'): | |
| p = [0]*len(shape)*2 | |
| for i, s in enumerate(shape): | |
| p[2*(len(shape)-1-i)+1] = s - x.size(i) | |
| return torch.nn.functional.pad(x, p) |
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
| #!/bin/bash | |
| #SBATCH -J MyModel | |
| #SBATCH -n 1 # Number of cores | |
| #SBATCH -t 1-00:00 # Runtime in D-HH:MM | |
| #SBATCH -o JOB%j.out # File to which STDOUT will be written | |
| #SBATCH -e JOB%j.out # File to which STDERR will be written | |
| #SBATCH --mail-type=BEGIN | |
| #SBATCH [email protected] | |
| secs_to_human(){ |
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 not A_IsAdmin ;running by administrator | |
| { | |
| Run *RunAs "%A_ScriptFullPath%" | |
| ExitApp | |
| } |