import pandas as pd
from glob import glob
if __name__ == "__main__":
files = glob("./data/**/**/*")
df_list = []
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def compute_error_for_line_given_points(b, m, points): | |
total_error = 0 | |
for i in range(0, len(points)): | |
x = points[i, 0] | |
y = points[i, 1] | |
total_error += (y - (m * x + b)) ** 2 | |
return total_error / float(len(points)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
import time | |
def generate_data(): | |
rng = np.random.RandomState(1) | |
X = 10 * rng.rand(200) | |
y = 2 * X - 5 + rng.randn(200) | |
return X, y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xunit; | |
using DSWithAlgo.DS.LinkedList.SingleLinkedList; | |
namespace DSWithAlgo.Tests.LinkedList | |
{ | |
public static class LinkedListTests | |
{ | |
[Fact] | |
public static void Add() | |
{ |
$ sudo apt install postgresql postgresql-contrib
$ sudo service postgresql start
$ sudo -i -u postgres # postgres에 접속
# create user sd password 'qwer1234' superuser;
# create database sd owner sd;
$ sudo vi vi /etc/postgresql/14/main/pg_hba.conf => `peer`을 `md5`로 수정
$ sudo apt-get -y install postgresql-14-cron
$ sudo vi /etc/postgresql/14/main/postgresql.conf
- Terminal 개발 환경 설정
- Python 설치 및 설정
- VSCode 설치 및 설정
- 폰트 설치(D2Coding)
www.google.com
>d2coding
검색 > https://github.com/naver/d2codingfont에서 다운로드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from IPython.display import set_matplotlib_formats, display | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import mglearn | |
from mglearn import plot_helpers | |
from cycler import cycler | |
set_matplotlib_formats('pdf', 'png') | |
plt.rcParams['savefig.dpi'] = 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
def back_substitution(U,Y): | |
''' | |
back_substitution(U,Y) | |
back_substitution은 역치환을 수행하여 UX = Y의 해를 구합니다. | |
U가 전체 순위인지 확인하기 위해 오류를 검사하지 않습니다. |
OlderNewer