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
| apt install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 \ | |
| libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 \ | |
| libxcb-xkb1 libxkbcommon-x11-0 libgl1-mesa-glx fontconfig \ | |
| libfontconfig libfontconfig1 libfontconfig1-dev | |
| python3 -m pip install pyyaml qtpy qtpy5 pyside2 imgviz termcolor requests |
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 | |
| WIFI_DEVICE=$(iw dev | grep Interface | head -n 1 | sed 's/.*Interface //') | |
| sudo dhclient -r $WIFI_DEVICE | |
| sudo dhclient $WIFI_DEVICE |
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/python3 | |
| import sys, cv2 | |
| video_file = sys.argv[1] | |
| video = cv2.VideoCapture(video_file) | |
| assert video.isOpened() | |
| frame_cnt = int(video.get(cv2.CAP_PROP_FRAME_COUNT)) | |
| def read_frame(pos): |
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
| FROM nvidia/cuda:11.3.0-cudnn8-devel-ubuntu18.04 | |
| RUN mkdir -p /home/root | |
| RUN apt update | |
| RUN apt upgrade -y | |
| RUN apt install -y apt-utils dialog | |
| RUN apt install -y bash-completion locate vim tmux unzip htop | |
| RUN apt install -y openssh-server # net-tools iputils-ping curl | |
| RUN apt install -y build-essential pkg-config gdb git | |
| RUN apt install -y libssl-dev libgoogle-glog-dev libgflags-dev |
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 -e | |
| if [ $# -eq 0 ]; then | |
| echo "Please specify an name for the new container!" | |
| exit | |
| fi | |
| indices="" | |
| for cid in $(docker container ls -a | sed 1,1d | awk '{print $1}'); do | |
| port=$(docker inspect --format='{{if .NetworkSettings.Ports}}{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}{{else}}{{"null"}}{{end}}' $cid) | |
| indices=$indices" "$port |
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
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| import torch.utils.checkpoint as checkpoint | |
| import numpy as np | |
| import math | |
| def drop_path(x, drop_prob: float = 0., training: bool = False, scale_by_keep: bool = True): | |
| """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). | |
| This is the same as the DropConnect impl I created for EfficientNet, etc networks, however, |
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
| /** | |
| * Copyright (C) DeepGlint, Inc - All Rights Reserved | |
| * Unauthorized copying of this file, via any medium is strictly prohibited | |
| * Proprietary and confidential | |
| * | |
| * CTimer for Code Profile | |
| * | |
| * Written by Devymex <yumengwang@deepglint.com>, Jan. 2019 | |
| */ |
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
| #include "NvEncoder/NvEncoderCuda.h" | |
| #include "NvEncoder/NvEncoderCLIOptions.h" | |
| #include "NvEncoder/NvCodecUtils.h" | |
| #include <cuda_runtime.h> | |
| extern "C" { | |
| #include <libavutil/opt.h> | |
| #include <libavcodec/avcodec.h> | |
| #include <libavformat/avformat.h> | |
| } |
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
| 下载镜像: | |
| docker pull <IMAGE_NAME> # https://hub.docker.com/r/nvidia/cuda | |
| 列出所有镜像 | |
| docker images | |
| 运行镜像(运行为一个容器) |
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 -e | |
| export TOOLCHAIN_ROOT=/heop/.tool/toolchain/arm-ca9-linux-gnueabihf-6.5 | |
| export SYSROOT=$TOOLCHAIN_ROOT/arm-ca9-linux-gnueabihf/sysroot | |
| export CC=$TOOLCHAIN_ROOT/bin/arm-linux-gcc | |
| export CXX=$TOOLCHAIN_ROOT/bin/arm-linux-g++ | |
| export AR=$TOOLCHAIN_ROOT/bin/arm-linux-ar | |
| export RANLIB=$TOOLCHAIN_ROOT/bin/arm-linux-ranlib | |
| mkdir -p build |