Skip to content

Instantly share code, notes, and snippets.

View seungwonpark's full-sized avatar

Seung-won Park seungwonpark

View GitHub Profile
@seungwonpark
seungwonpark / kakaotalk-inspect.tex
Created September 7, 2018 15:27
카카오톡 프로필사진 프레임의 방정식 찾아내기
\documentclass{standalone}
\usepackage{tikz}
\usepackage{amsmath, amssymb}
\usepackage{graphicx}
\begin{document}
\begin{tikzpicture}[scale=1.6]
\node at (0,0) {$ \left|x\right|^{n}+\left|y\right|^{n}=1 $};
\node at (0,-0.3) {\includegraphics[scale=0.5]{n.pdf}};
\node at (0,-0.5) {\includegraphics[scale=0.5]{therefore.pdf}};
@seungwonpark
seungwonpark / ipsc-2016-L-hard.py
Created July 31, 2018 07:24
Solution of IPSC 2016 Prob No.L
# Solution of IPSC 2016 Prob No.L
# Modified version of official solution at https://ipsc.ksp.sk
# Modified by Seungwon Park (github.com/seungwonpark)
# CC BY-SA 3.0
# directory structure:
# C:.
# │ train.py
# └─l
# ├─alphabet
@seungwonpark
seungwonpark / tf-sin-regression.py
Last active September 8, 2018 05:43
Sin wave regression using TensorFlow
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
X = tf.placeholder(tf.float32)
Y = tf.placeholder(tf.float32)
xs = np.arange(-20,21).reshape(41, 1)
ys = np.sin(xs).reshape(41, 1)
@seungwonpark
seungwonpark / so-gdpr-hider.js
Last active July 11, 2018 01:46
StackOverflow GDPR consent banner hider
// hide annoying GDPR banner at stackoverflow / stackexchange
// add this script at tampermonkey
// ==UserScript==
// @name StackOverflow GDPR consent banner hider
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Hide GDPR consent banner
// @author Seungwon Park (veydpz)
// @match https://*.stackexchange.com/*
// @match https://stackoverflow.com/*

Keybase proof

I hereby claim:

  • I am seungwonpark on github.
  • I am veydpz (https://keybase.io/veydpz) on keybase.
  • I have a public key ASDCtDMnApPfO6OroOaw5qsDgj4tk-TUyL8kmVLwftWZJgo

To claim this, I am signing this object:

% Original: https://git.io/vQwmS
% convert -delay 4 -loop 0 -density 400 -alpha remove joi-style-mag.pdf joi-style-mag.gif
% !TeX program = lualatex
\RequirePackage{luatex85}
\documentclass[multi=my]{standalone}
\usepackage{tikz}
\usepackage{luacode}
\usepackage{graphicx}
\definecolor{joired}{RGB}{218,11,49}
\definecolor{joigreen}{RGB}{18,136,104}
@seungwonpark
seungwonpark / cube-animate.tex
Last active February 2, 2018 17:02
Drawing cube with TikZ using perspective projection
% convert -delay 2 -loop 0 -density 1000 -alpha remove cube.pdf cube.gif
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usepackage{pgffor}
\usetikzlibrary{calc}
\def\sintheta{0.8660254037844386}
\def\costheta{0.5}
\def\sinphi{0.9396926207859083}
\def\cosphi{0.3420201433256688}
\def\cube{1}
@seungwonpark
seungwonpark / toroid-v2.tex
Last active February 2, 2018 12:09
Drawing toroid with TikZ using perspective projection
\documentclass{standalone}
\usepackage{tikz}
\def\camtheta{60}
\def\camphi{70}
%\def\p{((3+cos(16*\t))*cos(\t))}
%\def\q{((3+cos(16*\t))*sin(\t))}
%\def\r{sin(16*\t)}
%\def\w{\p*sin(\camtheta)*cos(\camphi) + \q*sin(\camtheta)*sin(\camphi) + \r*cos(\camtheta)}
\def\rot{32} % # of toroid revolution.
\def\dist{20} % distance of camera and origin
@seungwonpark
seungwonpark / pss-crawler.py
Last active September 8, 2018 06:27
효자동사진관 사진 크롤러
# open.pss.go.kr image crawler
# n=150: 2017-12-28, Conversation with future scientists
import requests
import re
import os
baseurl = 'http://open.pss.go.kr'
for n in range(151):
# n = 150
req = requests.get(baseurl + '/picture/view/?no=%d' % n)
@seungwonpark
seungwonpark / protractor.tex
Created November 12, 2017 16:07
TikZ - protractor drawing
\documentclass{standalone}
\usepackage{tikz}
\usepackage{ifthen}
\usepackage{intcalc}
\begin{document}
\begin{tikzpicture}
\draw (6,0) arc [radius=6, start angle=0, end angle=180] -- (-6,-0.5) -- (6,-0.5) -- cycle;
\foreach \i in {0,10,...,180}{
\draw[red] (\i:5.2) -- (\i:6);
\node[red, rotate=-90+\i] at (\i:5) {\i};