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
| """ | |
| fasterrcnn 에서 동작하도록 하기 위해서는 keras_cv 에 다음 패치 필요: | |
| keras_cv/layers/object_detection/anchor_generator.py | |
| line 258: | |
| stride = self.stride | |
| # make sure range of `cx` is within limit of `image_width` with | |
| # `stride`, also for sizes where `image_width % stride != 0`. |
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 | |
| set -e; set -u | |
| COMMON_SUBDOMAINS="www mail mx a.mx smtp pop imap blog en ftp ssh login" | |
| EXTENDED="" | |
| while :; do case "$1" in | |
| --) shift; break ;; | |
| -x) EXTENDED=y; shift ;; | |
| -s) NS="$2"; shift 2 ;; | |
| *) break ;; |
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 | |
| mkdir -p "${GITEA_CUSTOM}/tmp/render-notebook" | |
| exec 2>> "${GITEA_CUSTOM}/tmp/render-notebook/trace.txt" | |
| ## DEBUG: echo params & envs | |
| ## PARAMS: | |
| echo "=== Script: $(dirname $0)" 1>&2 | |
| echo "=== Date: $(date +'%Y-%m-%d %H:%M:%S')" 1>&2 | |
| echo "=== Args:" "$@" 1>&2 |
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
| : | |
| set -x | |
| CONDA_PREFIX=${CONDA_PREFIX-$1} | |
| save_LD_LIBRARY_PATH="$(echo LD_LIBRARY_PATH__$(echo $CONDA_DEFAULT_ENV | tr .- __))" | |
| ## find libdevice for XLA_FLAGS ## workaround for error: "libdevice not found at ./libdevice.10.bc" | |
| if test -f $CONDA_PREFIX/lib/libdevice.*.bc | |
| then |
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
| # mpl_korfont.py | |
| # coding: utf-8 | |
| # gist: https://gist.github.com/rhee-elten/d36d1e907e66a9a548fdbfdceb2c469a | |
| import sys | |
| from os.path import isfile, basename, realpath | |
| """ | |
| font size comparison (kB): | |
| 1300 NanumBarunGothicSubset.ttf |
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
| @rem netsh interface portproxy example | |
| @echo off | |
| setlocal | |
| @rem C:\Windows\System32\bash.exe -c "sudo /usr/sbin/service ssh start" | |
| wsl sudo /usr/sbin/service ssh start | |
| for /f %%i in ('wsl hostname -I') do set IP=%%i | |
| netsh.exe interface portproxy delete v4tov4 listenport=2222 listenaddress=127.0.0.1 protocol=tcp |
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/env python | |
| # coding: utf-8 | |
| # In[ ]: | |
| ## gist: https://gist.github.com/rhee-elten/25f4776422b39af00db92b9291232b33/ | |
| # ## 2020.12.11_2 데이터에서 100개를 샘플로 가져와서 로컬에 1/2 사이즈로 저장 |
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/env python | |
| # coding: utf-8 | |
| # In[2]: | |
| ## 한글폰트 설정 | |
| get_ipython().run_line_magic('run', '-n mpl_korfont.py') | |
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
| # 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 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/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 |