This file contains 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 higher level module for using sockets (or Windows named pipes) | |
# | |
# multiprocessing/connection.py | |
# | |
# Copyright (c) 2006-2008, R Oudkerk | |
# Licensed to PSF under a Contributor Agreement. | |
# | |
__all__ = [ 'Client', 'Listener', 'Pipe', 'wait' ] |
This file contains 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
import os | |
import sys | |
from pathlib import Path | |
import fileinput | |
def get_all_files(parent_folder): | |
return list(Path(parent_folder).rglob("*")) | |
This file contains 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
import os | |
def shell(command): | |
stream = os.popen(command) | |
out = stream.read().split("\n")[:-1] | |
return out | |
def find_docker(pid: int): | |
if pid == -1: | |
return -1, "No Docker!" |
This file contains 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
from mmdet.registry import MODELS | |
from mmdet.utils import register_all_modules | |
from mmengine.config import Config | |
import torch | |
mmdet_config_path = 'configs/rtdetr/rtdetr_r18vd_dec3_8xb2-72e_coco.py' | |
model_weight_file = 'rtdetr_r50vd_6x_coco_mmdet.pth' | |
""" | |
# convert pdparams to torch tensors |