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
## gen() function for proc.stdout ( run_commands, vdl_run ) | |
## async read from proc.stdout | |
if True: | |
def gen(proc): | |
remains = b'' # remaining from prev read | |
while proc.poll() is None: | |
rlist, _, _ = select([proc.stdout],[],[],500) | |
if proc.stdout not in rlist: | |
continue | |
data = os.read(proc.stdout.fileno(), 16384) |
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
Windows Process List How To.txt | |
## https://www.nextofwindows.com/windows-tip-3-ways-to-print-a-list-of-running-processes | |
tasklist | |
tasklist /v /fi "sessionname eq console" /fo csv | |
PS C:\> get-process | out-file $env:userprofile\desktop\processes.txt | |
PS C:\> get-process-computername computername | |
PS C:\> get-process | out-printer |
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
: | |
export TF_FORCE_GPU_ALLOW_GROWTH=true | |
export CUDA_DEVICE_ORDER=PCI_BUS_ID | |
export CUDA_VISIBLE_DEVICES=0,1,2,3 | |
export TF_CPP_MIN_LOG_LEVEL=3 | |
# 참고: https://github.com/tensorflow/tensorflow/issues/22936#issuecomment-441790882 | |
# Would you mind running your code with the following environment variables set: | |
# TF_ENABLE_WHILE_V2=1 TF_ENABLE_COND_V2=1 ?? |
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
## monitor GPU usage in jupyter notebook -- rhee.elten@gmail.com | |
## https://gist.github.com/rhee-elten/1a1070e3a812ca863c3b937b5180b2f8 | |
# pylint: disable=invalid-name | |
# pylint: disable=using-constant-test | |
# pylint: disable=wrong-import-position | |
# pylint: disable=missing-class-docstring | |
# pylint: disable=missing-function-docstring | |
if 10: | |
import os |
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
////////////////////////// | |
cvat-ui/src/reducers/index.ts | |
292: | |
export interface ShareFileInfo { | |
// get this data from cvat-core | |
name: string; | |
type: 'DIR' | 'REG'; | |
mime_type: string; |
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 traceback import print_exc | |
import sys | |
import os | |
from os.path import relpath, realpath, basename, dirname, splitext | |
from time import perf_counter | |
import numpy as np | |
import cv2 | |
from sklearn.cluster import KMeans, MiniBatchKMeans | |
from glob import glob | |
import matplotlib.pyplot as plt |
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 traceback | |
_in_notebook = any( | |
( rstk[0].startswith("<ipython") | |
or "/site-packages/IPython/core/interactiveshell.py" in rstk[0] | |
) | |
for rstk in traceback.extract_stack()) |
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
#!/bin/sh | |
_image=nvidia/cuda:10.0-devel-centos7 # 1.15, 1.13 | |
#_image=nvidia/cuda:10.1-devel-centos7 # 2.4.1 | |
#_image=nvidia/cuda:11.3.1-devel-centos7 # 2.5 | |
_pwd="$(pwd)" | |
echo "=====================================" >> /tmp/ptxas_wrapper.log | |
echo "=== ptxas wrapper: $(date)" >> /tmp/ptxas_wrapper.log |
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
# coding: utf-8 | |
from __future__ import print_function, division, absolute_import | |
import sys | |
import os | |
import re | |
import fnmatch | |
from collections import OrderedDict as odict | |
from functools import lru_cache | |
import numpy as np | |
import cv2 |
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 cv2 | |
import pandas as pd | |
import numpy as np | |
""" | |
HoughCircles(image, method, dp, minDist[, circles[, param1[, param2[, minRadius[, maxRadius]]]]]) -> circles | |
. @brief Finds circles in a grayscale image using the Hough transform. | |
. |
OlderNewer