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 argparse | |
from pathlib import Path | |
from PIL import Image, ImageDraw, ImageFont | |
def parse_args() -> argparse.Namespace: | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-w", "--width", dest="width", type=int, default=80) | |
parser.add_argument("-l", "--level", dest="level", type=int, default=16) |
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
'''Convert image to braille text''' | |
import argparse | |
from PIL import Image | |
def parse_args(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-t", "--th", default=127, type=int, dest="threadh") | |
parser.add_argument("-w", "--width", default=120, type=int, dest="width") |
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
// vi: filetype=objc | |
#import <Foundation/Foundation.h> | |
NSDictionary<NSNumber*,NSNumber*> * makeTransformer(); | |
NSString* choseongWithString(NSString* text); | |
NSDictionary<NSNumber*,NSNumber*> * makeTransformer() | |
{ |
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
@echo off | |
@setlocal | |
set infile=%1 | |
set outfile=%2 | |
shift & shift | |
set fps=10 | |
set w=320 | |
:loop | |
IF NOT "%1"=="" ( | |
IF "%1"=="-fps" ( |
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 io | |
import pickle | |
import random | |
import time | |
from multiprocessing import Process | |
import zmq | |
def pub_main(port=7777): |
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 time | |
from functools import wraps | |
def timeit(f): | |
@wraps(f) | |
def inner(*x, **y): | |
a = time.monotonic() | |
r = f(*x, **y) | |
b = time.monotonic() |
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
@echo off | |
@setlocal | |
@set start_time="0:0" | |
@set filters="fps=20,scale=320:-1:flags=lanczos" | |
@set palette="__palette.png" | |
@ffmpeg -v warning -ss %start_time% -i %1 ^ | |
-vf "%filters%,palettegen"^ | |
-y %palette% | |
@ffmpeg -v warning -ss %start_time% -i %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
// vi: filetype=vimdesc textwidth=70 colorcolumn=70 | |
도움말은 `:h[elp]` 명령으로 열 수 있다. 보통 가로로 분할된 창으로 | |
열리면서 도움말 화면이 표시된다. | |
도움말 화면 내에서의 이동은 기본적인 이동방법을 그대로 사용할 수 있다. | |
실제로 vim 도움말 파일은 읽기전용 속성의 텍스트 파일이며 내부적으로 각 | |
토픽을 연결하는 링크(태그)가 정의되어 있다. 따라서 `h`, `j`, `k`, `l` | |
을 사용한 커서 이동 및 그외 여러 스크롤 이동, 검색등의 명령을 모두 사 | |
용할 수 있다. |
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
" using `<Plug>` map | |
mes clear | |
let s:save_cpo = &cpo | |
set cpo&vim | |
function! s:highlightSelection() | |
let l:temp = @@ | |
normal! gvy | |
let @/ = '\V'. substitute(escape(@@, '\'), "\n", '\n', 'g') |
NewerOlder