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
import Foundation | |
class StreamReader { | |
let encoding: String.Encoding | |
let chunkSize: Int | |
let fileHandle: FileHandle | |
var buffer: Data | |
let delimPattern : Data | |
var isAtEOF: Bool = false | |
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
" .vimrc | |
" Author: Steve Losh <steve@stevelosh.com> | |
" Source: http://bitbucket.org/sjl/dotfiles/src/tip/vim/ | |
" | |
" This file changes a lot. I'll try to document pieces of it whenever I have | |
" a few minutes to kill. | |
" Preamble ---------------------------------------------------------------- {{{ | |
" Dear /bin/bash: fuck you and your bullshit, arcane command-line behaviour. |
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
// Adobe Illustrator Javascript to save multiple ai files into JPEG file. | |
// code by sooop | |
var defaultFolder = new Folder('C:/'); // 폴더 선택창에서 디폴트 폴더 | |
var targetFolder = new Folder(); | |
var sourceFiles; | |
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
function EditorInstance(key) | |
{ | |
// class variables | |
var _self = this; | |
this.key = key || _newKey(); | |
this.wrapper = null; | |
this.editor = null; | |
this.fileManager = null; | |
// internal property |
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
@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
/** | |
초성 중성 종성 분리 하기 | |
유니코드 한글은 0xAC00 으로부터 | |
초성 19개, 중상21개, 종성28개로 이루어지고 | |
이들을 조합한 11,172개의 문자를 갖는다. | |
한글코드의 값 = ((초성 * 21) + 중성) * 28 + 종성 + 0xAC00 | |
(0xAC00은 'ㄱ'의 코드값) |
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
#include <stdio.h> | |
#include <stdlib.h> // for calloc() | |
#include <string.h> // for strcpy() . not necessary because compiler will automatically include string.h. (with warning) | |
#define MAXNUM 50 | |
int main(void) | |
{ | |
char **arrs; // declare arrs with pointer of char pointer. | |
arrs = (char**)calloc(MAXNUM, sizeof(char*)); // allocate 50*4bytes to arrs. it holds address of each string array. |
NewerOlder