Skip to content

Instantly share code, notes, and snippets.

View seongilp's full-sized avatar
🥕

Seongil Park seongilp

🥕
View GitHub Profile
@seongilp
seongilp / test.py
Created September 25, 2020 11:21
9월 25일 수업
# DO NOT ADD ANY 'import' STATEMENT
# Problem 1
a0, a1, a2, a3, a4, x = 1, 2, 3, 4, 5, 6 # python 에서는 이렇게 초기화도 가능하다. packing
y = (a4 * x**4) + (a3 * x**3) + (a2 * x**2) + (a1 * x) + a0 # TODO
print("Value of The Quartic Fomula:", y) #7465
# Problem 2
def gcd(a, b):
# TODO - 유클리드 호제법 사용
@seongilp
seongilp / test.py
Last active September 24, 2020 02:34
9월 18일 수업
import random
def largest(l):
m = None
for i in l:
if m == None or i > m:
m = i
return m
#return max(l)
@seongilp
seongilp / gist:2911f4da2b405475140bbc37b7c34dab
Last active October 1, 2020 07:53
데이터 분석 환경 구축
cat pip.conf
[global]
index-url=http://ftp.daumkakao.com/pypi/simple
trusted-host=ftp.daumkakao.com
kaggle.json
{"username":"zihado","key":"307ff45220156b72c231b4a966b8c6bf"}
docker run -d -p 8888:8888 -v "$PWD":/home/jovyan/work --name ds-notebook jupyter/datascience-notebook
@seongilp
seongilp / pip.conf
Created June 23, 2020 11:22
pypi kakao mirror
~/.pip/pip.conf
[global]
index-url=http://ftp.daumkakao.com/pypi/simple
trusted-host=ftp.daumkakao.com
```
$ git clone https://
$ git branch develop
$ git checkout -b develop
$ git merge
$ git remote -v
$ git fetch
$ git push
$ git commit -a -m "hello"
```
@seongilp
seongilp / cloudSettings
Last active March 5, 2022 16:08
Jupyter에서 한글 폰트
{"lastUpload":"2022-03-05T16:07:58.551Z","extensionVersion":"v3.4.3"}
* https://httpbin.org/
* https://reqbin.com/
curl -fsSL https://get.docker.com/ | sudo sh
sudo usermod -aG docker $USER

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# https://github.com/docker/compose/releases/download/1.27.2/docker-compose-Linux-x86_64
sudo chmod +x /usr/local/bin/docker-compose

# check (re-login)
docker version
@seongilp
seongilp / k3s-multipass.sh
Created April 6, 2020 03:12 — forked from lucj/k3s-multipass.sh
Setup a k3s kubernetes cluster using Multipass VMs
for node in node1 node2 node3;do
multipass launch -n $node
done
# Init cluster on node1
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
# Get node1's IP
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}')
@seongilp
seongilp / parallels_tools_ubuntu_new_kernel_fix.md
Created March 29, 2020 05:39 — forked from rudolfratusinski/parallels_tools_ubuntu_new_kernel_fix.md
Parallels Tools fix for Ubuntu 18.04 and other Linux distributions with Kernel version >= 4.15

Preparation

  • In open Ubuntu 18.04 machine click Parallels Actions -> "Install Parallels Tools"

  • A "Parallels Tools" CD will popup on your Ubuntu desktop.

  • Open it by double mouse click, copy all the content to a new, empty directory on a desktop, name it for e.g. "parallels_fixed"

  • Open terminal, change directory to parallels_fixed (cd ~/Desktop/parallels_fixed)

  • Make command line installer executable (chmod +x install)

  • Change directory to "installer" (cd installer)

  • Make few other scripts executable: chmod +x installer.* *.sh prl_*