Skip to content

Instantly share code, notes, and snippets.

View seungwonpark's full-sized avatar

Seung-won Park seungwonpark

View GitHub Profile

Use the following texts as a template for the issue that asks project maintainers to specify the license. Thank you for participating the [Free Software movement]!


Why should I specify the license?

I want to use this project, but the license of this code is currently unspecified. By the [Berne Convetion] and [WIPO Copyright Treaty], software published without a license does not grant people to benefit or redistribute in [most countries]. If you agree with the [Free Software movement], please specify the license of this project.

Which one?

  1. If you prefer a GPL-family license, GNU Affero General Public License is the perfect choice for this project since it is about server-side codes.
  2. If you prefer a permissive license, I think Apache-2.0/MIT Dual License is most suitable for this project.
@gciruelos
gciruelos / roundest.py
Last active February 17, 2020 01:18
What is the roundest country?
'''
Post: http://gciruelos.com/what-is-the-roundest-country.html
Compute and create table of the roundness of all the countries.
Needs file ne_10m_admin_0_sovereignty.
'''
import base64
import io
import math
import operator
@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@seungwonpark
seungwonpark / 19-3-4.cpp
Last active October 21, 2017 12:31
고급물리학 19-3-4, 29-3-2번 전산모사코드(RK4사용)
#include<stdio.h>
#include<math.h>
#define h 0.04
double a = 1; // alpha : (eB_0)/m
double e = 0.6666; // collison coefficient
double f1(double x,double y,double xv,double yv){ // dx/dt
return xv;
}
double f2(double x,double y,double xv,double yv){ // dy/dt
return yv;
@hletrd
hletrd / Allname.py
Last active August 18, 2022 15:25
#-*- coding: utf-8 -*-
a = list('ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅌㅍㅎ'.decode('utf-8'))
b = list('ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ'.decode('utf-8'))
e = list('ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ'.decode('utf-8'))
f = ['ㄱㅈ', 'ㄴㄱ', 'ㄷㄱ', 'ㄷㅂ', 'ㅁㅈ', 'ㅅㄱ', 'ㅅㅁ', 'ㅅㅂ', 'ㅅㅇ', 'ㅇㄱ', 'ㅈㄱ', 'ㅎㅂ']
f = map(lambda x: x.decode('utf-8'), f)
e.insert(0, '')
c = []
@karpathy
karpathy / min-char-rnn.py
Last active April 17, 2025 09:20
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@dlimpid
dlimpid / hangul_without_kotex.tex
Last active September 6, 2024 04:58
ko.TeX 없이 한글 LaTeX 문서 만들기
\documentclass[a4paper]{article}
% XeTeX 관련 =================================================================
% xltxtra Package가 fontspec을 부를 때 no-math 옵션을 주어 수식엔 영향을 주지 않게 함.
\PassOptionsToPackage{no-math}{fontspec}
\usepackage{xltxtra}
% Western과 CJK에 다른 글꼴을 사용하기 위한 패키지
\usepackage{xeCJK}