Skip to content

Instantly share code, notes, and snippets.

$ python run_job.py -n 5 -g 60 -c 12 --simulator_procs 10 --use_sync --name breakout --short
args.offline: False
('bash command: ', 'srun -A luna -N 5 -n 5 -c 12 -t 55:00 distributed_tensorpack_mkl.sh 61216 30065 Breakout-v0 adam 1 "3nodes 12cores" "breakout_1517329773.87" 0.00015 128 60 0 None 256 10 1 uniform normal False . True 1 False /net/archive/groups/plggluna/intel_2/logs/ 1e-08 0.9 0.999 0 False False False False 120 False')
srun: job 9511741 queued and waiting for resources
srun: job 9511741 has been allocated resources
SLURM_JOB_ID 9511741 ; SLURM_JOB_NAME distributed_tensorpack_mkl.sh ; SLURM_JOB_NODELIST p[0111-0112,0115,0574,0576] ; SLURMD_NODENAME p0112 ; SLURM_JOB_NUM_NODES 5
SLURM_JOB_ID 9511741 ; SLURM_JOB_NAME distributed_tensorpack_mkl.sh ; SLURM_JOB_NODELIST p[0111-0112,0115,0574,0576] ; SLURMD_NODENAME p0111 ; SLURM_JOB_NUM_NODES 5
SLURM_JOB_ID 9511741 ; SLURM_JOB_NAME distributed_tensorpack_mkl.sh ; SLURM_JOB_NODELIST p[0111-0112,0115,0574,0576] ; SLURMD_NODENAME p0115 ;
@AdamStelmaszczyk
AdamStelmaszczyk / enca
Last active February 14, 2018 19:28
To have Polish characters in subtitles
Usually the encoding is "MS-Windows code page 1250", but we want UTF-8.
sudo apt-get install enca
enconv -L polish -x utf8 subtitles.srt
To check file encoding use -m:
enconv -L polish -m subtitles.srt
@AdamStelmaszczyk
AdamStelmaszczyk / run.py
Created May 12, 2020 18:38
Python Speed Coding Challenge source code
# The MIT License
#
# Copyright (c) 2020 Adam Stelmaszczyk
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#!/usr/bin/python
import sys
import re
import os
from collections import defaultdict
PARTNER_PENALTY = 2
OPPONENT_PENALTY = 1
1A2B
3C4D
5E6F
7G8H
9I10J
11K12L
1K12J
2L3A
4B5C
#!/usr/bin/python
import sys
import re
import os
from collections import defaultdict
PARTNER_PENALTY = 2
OPPONENT_PENALTY = 1