Skip to content

Instantly share code, notes, and snippets.

View seungwonpark's full-sized avatar

Seung-won Park seungwonpark

View GitHub Profile
@seungwonpark
seungwonpark / taegeukgi.tex
Created November 12, 2017 09:36
TikZ로 그린 태극기
% taegeukgi.tex
% Taeguekgi(태극기)
% Author: Seungwon Park (swpark.me)
% Date: 2017.11.12
% 국기 그리는 법은 아래의 행정안전부 지침을 따랐습니다.
% http://www.mois.go.kr/frt/sub/a06/b08/nationalIcon_2_2/screen.do
\documentclass{standalone}
\usepackage{tikz}
% CIE color space is replaced with RGB, using colorpicker.
\definecolor{taegeuk-red}{RGB}{199, 32, 50}
@seungwonpark
seungwonpark / imyeoni.tex
Last active October 26, 2017 08:12
이면이면이면이면이면이면
% Author : Seungwon Park (swpark.me)
% convert -delay 2 -loop 0 -density 1000 -alpha remove imyeoni.pdf imyeoni.gif
% emoji: convert -delay 2 -loop 0 -density 120 -alpha remove imyeoni.pdf imyeoni.gif
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usepackage{amsmath,amssymb}
\usepackage{kotex}
\begin{document}
\foreach \ani in {0,3,...,57}{
\begin{tikzpicture}
@seungwonpark
seungwonpark / cf-hint-hider.js
Created August 23, 2017 13:44
CF Hint Hider
// ==UserScript==
// @name CF Hint Hider
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide algorithm hint at Codeforces
// @author Seungwon Park (veydpz)
// @match http://codeforces.com/problemset
// @grant none
// ==/UserScript==
@seungwonpark
seungwonpark / joi-style.tex
Created July 6, 2017 12:19
JOI style profile picture
% !TeX program = lualatex
\RequirePackage{luatex85}
\documentclass{standalone}
\usepackage{tikz}
\usepackage{luacode}
\usepackage{graphicx}
\definecolor{joired}{RGB}{218,11,49}
\definecolor{joigreen}{RGB}{18,136,104}
\definecolor{joiyellow}{RGB}{250,210,49}
\definecolor{joiblue}{RGB}{15,105,180}
@seungwonpark
seungwonpark / haafor-calculator.py
Created June 24, 2017 13:47
HAAFOR Challenge calculator
import numpy as np
# grouping = [[0,3],[1,2]]
# filename = 'hfc_20170614_example.csv'
# grouping = [[x for x in range(200*y, 200*(y+1))] for y in range(10)]
with open('random.csv', 'a') as f2:
while(1):
grouping_rand = np.random.permutation(2000)
@seungwonpark
seungwonpark / square-wave.tex
Created June 6, 2017 16:18
Fourier Series of Square Wave
% Fourier Series of Square Wave - illustrated and computed by TeX.
% Author : Seungwon Park (swpark.me)
% convert -delay 10 -loop 0 -density 400 -alpha remove square-wave.pdf square-wave.gif
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{amsmath,amssymb}
\usepackage{centernot}
\begin{document}
\foreach \angle in {0,4,...,360}{
\documentclass{article}
\newcount\x
\newcount\i
\def\collatz#1{
\x #1 \relax
\calccollatz
}
\def\calccollatz{
\ifnum\x=1
\the\x
@seungwonpark
seungwonpark / happyBday-LaTeX.tex
Created May 27, 2017 02:36
생일축하해-\LaTeX style
\documentclass{standalone}
\usepackage{kotex}
\makeatletter
\DeclareRobustCommand{\stdLaTeXbDay}{생\kern-.36em
{%
\sbox\z@ T%
\vbox to\ht0{\hbox{$\m@th$%
\csname S@\f@size\endcsname
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
@seungwonpark
seungwonpark / New_Profile_Picture_4.tex
Created March 30, 2017 15:58
Profile picture(made with tikz)
\documentclass{standalone}
\usepackage{tikz,pgffor}
\usetikzlibrary{spy}
\begin{document}
\begin{tikzpicture}
[spy using overlays={circle, magnification=1.0,size=150}]
\fill[color=black] (0,0) rectangle (10,10);
\filldraw[fill=white, draw=black] (5,5) circle [radius=5];
\foreach \i in {5,15,...,355}{
\fill[black] (5,5) -- ( {5+5*cos(\i)} , {5+5*sin(\i)} ) arc [start angle = \i, end angle = \i+5, radius = 5] -- (5,5);
@seungwonpark
seungwonpark / gshs_fake_outpass.tex
Created December 4, 2016 10:04
gshs_fake_outpass
% !TeX program = xelatex
% TeXlive 2016, mactex 2016 기준
\documentclass[12pt]{article}
\usepackage[%
left=51.9mm,%
right=71.0mm,%
top=12.5mm,%
bottom=25.4mm,%
headheight=0mm,%
headsep=0mm,%