목록분류 전체보기 (90)
비전공개미 개발노트
# sns.py import seaborn as sns import matplotlib.pyplot as plt import numpy as np import pandas as pd iris = sns.load_dataset("iris") titanic = sns.load_dataset("titanic") tips = sns.load_dataset("tips") flights = sns.load_dataset("flights") x = iris.petal_length.values # # sns.rugplot(x) # sns.rugplot(data=iris, x="petal_length") # sns.kdeplot(x) # sns.distplot(x, kde=True, rug=True) # sns.hist..
# pdplot.py import numpy as np import pandas as pd import matplotlib.pyplot as plt np.random.seed(0) #seed값을 기준으로 랜덤값이 만들어진다(숫자에 큰 의미는 없음) df = pd.DataFrame(np.random.randn(100, 3), index=pd.date_range("12/1/2022", periods=100), #date_range("월/일/년도") columns=["A", "B", "C"]).cumsum() # print(df.tail()) # df.plot() # plt.xlabel("Time") # plt.ylabel("Value") # plt.title("Income") import seaborn as..
# Pandas import pandas as pd # Series s = pd.Series([1, 0, -4, 6, -7, -3, 5, 3, -9, 2]) print(s) print(type(s)) print(s.index) print(s.values) print(type(s.values)) s.index = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] print(s) # 값과 index를 같이 출력 / ([값], [인덱스]) s = pd.Series([1, 0, -4, 6, -7, -3, 5, 3, -9, 2], ["a", "f", "c", "d", "e", "b", "g", "h", "i", "j"]) print(s) print(s.index) # 값 ..
# -*- coding: utf-8 -*- # Numpy import numpy as np for str in dir(np): print(str) print(help(np)) print(help(np.dtype)) b = [i for i in range(15)] print(b) a = np.arange(15).reshape(3,5) print(a) print(a.shape) print(a.ndim) print(a.dtype) print(a.itemsize) print(a.size) print(type(a)) t = (10, 20, 30, 40, 50) print(type(t)) tt = np.array(t) print(type(tt)) s = {10, 20, 30, 40, 50} print(type(s)..
22.11.08 수업내용 Oracle xe버전을 설치해보자 https://www.oracle.com/database/technologies/xe-prior-release-downloads.html 세번째에 리눅스버전인 Oracle Database 11gR2 Express Edition for Linux x64 를 다운로드를 클릭하고 로그인하면 1) oracle-xe-11.2.0-1.0.x86_64.rpm.zip 다운로드된다. 리눅스에서 2) unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip 으로 압축을 풀어준다. 우분투에서는 rpm(CentOS계열 설치파일)으로 설치가 되지 않기 때문에 rpm파일을 deb로 변환해줘야 하는데 변환해주는 패키지를 먼저 설치한다 3) apt-get ..
case (입력값에 따라서 문구를 출력 switch문과 동일) #!/bin/bash case $1 in 1) echo "one";; 2) echo "two";; 3) echo "three";; *) echo "number";; #나머지 esac exit 0 file (fname이 파일인지 폴더인지 구분) #!/bin/bash fname=/root/a.txt if [ -e $fname ]; then if [ -f $fname ]; then tail -5 $fname #fname파일내용을 뒤에서 다섯번째줄까지만 출력 else echo directory #파일이 아니고 폴더일경우 directory문구 출력 fi else echo "no exist" #파일이 없을경우 fi exit 0 -d filename : ..
첫번째 #!/bin/bash read a #read로 a의 값을 입력받는다 if [ $a -gt 100 ] then echo "100이하로 입력" elif [ $a -ge 90 ] then echo A elif [ $a -ge 80 ] then echo B elif [ $a -ge 70 ] then echo C elif [ $a -ge 60 ] then echo D elif [ $a -lt 0 ] then echo "0위로 입력" else echo F fi exit 0 두번째 #!/bin/bash echo "score :" read a if [ $a -lt 0 ] || [ $a -gt 100 ] then echo error else if [ $a -ge 90 ]; then #한줄로 작성시 ;세미콜론으로 ..
#!/bin/bash #bash를 사용하겠다는 의미(기본선언) echo "name :" $USER #사용자출력 echo "home :" $HOME #홈디렉토리 출력 #변수사용 a=Hello #변수명과 값 사이에 공백이 없도록 작성한다(공백시 출력안됨) a="Hello World" #공백이 있는 값은 ""로 묶어준다 a=100+200 #100+200=300이라는 값을 출력하지 않고 문자열로 인식하여 100+200을 출력한다 a=`expr 100 + 200` #숫자연산을 사용하려면 `expr`을 사용하고 연산자 사이에 띄어쓰기 필수 echo $a #변수 출력시 echo를 입력하고 변수앞에 $표시를 붙여준다 # 연산중에 ()와 *는 앞에 역슬래시를 붙여준다 ex) \( \) \* exit 0 #정상종료