Skip to content

Instantly share code, notes, and snippets.

View seongilp's full-sized avatar
๐Ÿฅ•

Seongil Park seongilp

๐Ÿฅ•
View GitHub Profile
@seongilp
seongilp / DefaultKeyBinding.dict
Created December 24, 2023 17:04 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
import sys
import os
import matplotlib.pyplot as plt
import numpy as np
import importlib
import pickle
# put nn_layers to your working directory (or set appropriate paths)
import nn_layers as nnl
@seongilp
seongilp / hw4.py
Last active June 13, 2021 00:24
hw4.py
from functools import cached_property
import numpy as np
from numpy.lib.format import descr_to_dtype
from skimage.util.shape import view_as_windows
#######
# if necessary, you can define additional functions which help your implementation,
# and import proper libraries for those functions.
#######
import sys
import os
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
import scipy.special as sp
import time
from scipy.optimize import minimize
from collections import Counter
@seongilp
seongilp / sfg.py
Last active March 16, 2021 12:43
ํฌ๋กค๋ง
# ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
import requests
from bs4 import BeautifulSoup
import telegram
from apscheduler.schedulers.blocking import BlockingScheduler
# ๊ฒ€์ƒ‰ ํ‚ค์›Œ๋“œ
search_word = '์‹ ํ•œ์€ํ–‰'
# ํ…”๋ ˆ๊ทธ๋žจ ๋ด‡ ์ƒ์„ฑ
@seongilp
seongilp / m1.sh
Created December 23, 2020 11:29
์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ๊ฐ€ M1 ๋„ค์ดํ‹ฐ๋ธŒ ์ธ์ง€ ์•„๋‹Œ์ง€ ์•Œ์ˆ˜์žˆ๋Š” ํ„ฐ๋ฏธ๋„ ๋ช…๋ น์–ด
์™€์ด์”จ
84
2020-12-23 20:14:55
221.โ™ก.64.179
๋Œ“๊ธ€์— ์งˆ๋ฌธ์ด ํ•œ๋ถ„ ๊ณ„์…”์„œ ๋„์›€ ๋˜์‹œ๋ผ๊ณ  ์˜ฌ๋ ค๋ด…๋‹ˆ๋‹ค.
์•„์‹œ๋Š”๋ถ„๋“ค์€ ์•„์‹œ๊ฒ ์ง€๋งŒ์š”. ๋น„๊ฐœ๋ฐœ์ž์ธ ์ผ๋ฐ˜์ธ๋ถ„๋“ค๋„ ์•„์‹œ๋ฉด ํŽธํ•ด์„œ...
@seongilp
seongilp / brew.sh
Created December 22, 2020 23:17
homebrew on m1
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
sudo mkdir -p /opt/homebrew
sudo chown -R $(whoami):staff /opt/homebrew
cd /opt
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
alias ibrew='arch -x86_64 /usr/local/bin/brew'
@seongilp
seongilp / m1anaconda.sh
Created December 21, 2020 07:09
M1 anaconda
wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
arch -x86_64 /bin/bash
conda create --name test python jupyter numpy matplotlib scipy
conda install -c anaconda scikit-learn
conda install -c conda-forge lightgbm
conda activate test
pip install pandas opencv-python torch
@seongilp
seongilp / test.py
Last active October 16, 2020 23:09
10์›” 16์ผ ์ˆ˜์—…
# 10/16
# high order function
# map, filter, fold
def hd(l): return l[0]
def tl(l): return l[1:len(l)]
def inc_all(l):
if l == []:
@seongilp
seongilp / test.py
Last active October 11, 2020 03:23
10์›” 10์ผ ์ˆ˜์—…
# Exercise 1: Sum from 1 to n
# Write a recursive function that computes the sum from 1 to n.
# >>> sum(10)
# 55
# >>> sum(100)
# 5050
def sum(n):
if n==1: return 1
else:
return n+sum(n-1)