Skip to content

Instantly share code, notes, and snippets.

View minjejeon's full-sized avatar

Minje Jeon minjejeon

  • Bank of Korea
  • Seoul, Korea
View GitHub Profile
@minjejeon
minjejeon / 2016-07-18-rnn-lstm.md
Last active December 28, 2016 03:13
RNN, LSTM 관련글 링크
@minjejeon
minjejeon / custom.css
Created July 26, 2016 13:20
jupyter custom css
/*
Placeholder for custom user CSS
mainly to be overridden in profile/static/custom/custom.css
This will always be an empty file in IPython
*/
div.text_cell {
font-family: 'Malgun Gothic';
@minjejeon
minjejeon / min-char-rnn.py
Last active June 8, 2022 12:55 — forked from karpathy/min-char-rnn.py
min-char-rnn 한글 주석 추가
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD license
python 3에서 실행 가능하도록 수정, 한글 해설 추가
"""
import numpy as np
# 데이터를 불러오고, 글자-벡터 간 상호 변환 매핑 준비
data = open('input.txt', 'r').read() # 텍스트 파일 로드
@minjejeon
minjejeon / instPkgPlusDeps.R
Created August 25, 2016 02:43
R 패키지 다운로드
instPkgPlusDeps <- function(pkg, download = TRUE,
which = c("Depends", "Imports", "LinkingTo"),
inc.pkg = TRUE) {
stopifnot(require("tools")) ## load tools
ap <- available.packages() ## takes a minute on first use
## get dependencies for pkg recursively through all dependencies
deps <- package_dependencies(pkg, db = ap, which = which, recursive = TRUE)
## the next line can generate warnings; I think these are harmless
## returns the Priority field. `NA` indicates not Base or Recommended
pri <- sapply(deps[[1]], packageDescription, fields = "Priority")
@minjejeon
minjejeon / matplot_hangul.ipynb
Last active September 17, 2016 14:06
matplotlib 한글, inline svg 출력 세팅
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@minjejeon
minjejeon / useful_pandas_snippets.py
Created September 23, 2016 15:01 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
# List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
# Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
# Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(valuelist)]
@minjejeon
minjejeon / 1-import pandas
Created November 30, 2016 17:25
snippets for data analysis
import pandas as pd
import numpy as np
from pandas import DataFrame, Series
@minjejeon
minjejeon / gist:0e5562468f83274679e8bfa56fa1937e
Last active August 24, 2020 08:29 — forked from philippeowagner/gist:6530635
Having troubles with 'latin1_swedish_ci' on your MySQL Databases? Specially `OperationalError (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")`? No problem, fix it using Django's shell.This solution is based on this http://stackoverflow.com/questions/1073295/django-character-set-w…
from django.db import connection
from django.conf import settings
cursor = connection.cursor()
cursor.execute('SHOW TABLES')
results=[]
for row in cursor.fetchall():
results.append(row)
for row in results:
cursor.execute('ALTER TABLE %s CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;' % (row[0]))
@minjejeon
minjejeon / spark-cluster.cmd
Last active July 13, 2019 06:58
spark cluster on windows
start /b spark-master.cmd
timeout 2 > NUL
start /b spark-worker.cmd
@minjejeon
minjejeon / week2.ipynb
Created March 15, 2021 14:10
경영통계분석 week2 발표자료
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.