Skip to content

Commit

Permalink
update smp
Browse files Browse the repository at this point in the history
  • Loading branch information
kennymckormick committed May 25, 2022
1 parent ac01a9e commit 18d2775
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyskl/smp.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,11 @@ def gen_bash(cfgs, num_gpus, gpus_per_task=1):
)
timestamp = time.strftime('%m%d%H%M%S', time.localtime())
mwlines(cmds, f'train_{timestamp}_{i}.sh')

def h2r(value):
value = value.lstrip('#')
lv = len(value)
return tuple(int(value[i:i + lv // 3], 16) for i in range(0, lv, lv // 3))

def r2h(rgb):
return '#%02x%02x%02x' % rgb

0 comments on commit 18d2775

Please sign in to comment.