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
#!/usr/bin/env python | |
# coding: utf-8 | |
## cuda_select_best_memfree.py 는 python2 에서도 실행되면 좋겠다. (시스템 파이썬 사용) | |
## gist https://gist.github.com/rhee-elten/223124ba106e7b9927078a4a1a8c320e | |
from __future__ import print_function | |
import sys | |
import os | |
import subprocess | |
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
: | |
if ! -z "$DEVPI_FORWARD" | |
then | |
docker run -dit --restart unless-stopped \ | |
-p 3141:3141 \ | |
--name devpi alpine/socat:1.7.4.4 \ | |
tcp-listen:3141,fork,reuseaddr tcp-connect:$DEVPI_FORWARD:3141 | |
else | |
docker run -dit --restart unless-stopped \ | |
-p 3141:3141 \ |
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
: | |
<<EEE >/dev/null | |
https://github.com/EpicWink/proxpi | |
Environment variables | |
PROXPI_INDEX_URL: index URL, default: https://pypi.org/simple/ | |
PROXPI_INDEX_TTL: index cache time-to-live in seconds, default: 30 minutes. Disable index-cache by setting this to 0 | |
PROXPI_EXTRA_INDEX_URLS: extra index URLs (comma-separated) |
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
""" | |
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 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 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 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 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 | |
import sys | |
from os.path import isfile, basename | |
""" | |
font size comparison (kB): | |
1300 NanumBarunGothicSubset.ttf | |
1328 d2coding-subset.ttf |
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
@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 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 -*- | |
# %% | |
# # !jupytext exp-hough-circle.ipynb --to py:percent -o- | tee exp-hough-circle_.py | |
# # !jupyter nbconvert exp-hough-circle.ipynb --to html | |
# %% [markdown] | |
# ## utility 함수 로딩 | |
# %% | |
# %run ../ml-workspace-common/ml-workspace-common.py |
NewerOlder