목록전체 글 (39)
Studio KimHippo :D
보호되어 있는 글입니다.

# -*- coding : utf-8 -*- # NOTE : 집합 자료형 # NOTE # 집합 자료형은 중복된 값은 저장되지 않는다. # 집합 자료형은 순서가 없다. s1 = set([1, 2, 3]) s2 = set('Hello') print(s1) print(s2) l1 = list(s1) t1 = tuple(s1) print(s1) print(l1) print(t1) # NOTE # 집합 자료형은 인덱싱이나 슬라이싱을 할 때 리스트나 튜플로 바꿔서 해야한다. print(l1[0]) print(t1[:2]) # NOTE : 집합 연산 s3 = set([1, 2, 3, 4, 5, 6]) s4 = set([4, 5, 6, 7, 8, 9]) # NOTE : 교집합 print(s3 & s4) print(s4..

# -*- coding : utf-8 -*- # NOTE : 딕셔너리 자료형 # NOTE # 딕셔너리 자료형은 키와 밸류로 구성됨. dic = {'name' : 'pey', 'phone' : '0119993323', 'birth' : '1118'} dic2 = {1 : 'hi'} dic3 = {'a' : [1, 2, 3]} print(dic) print(dic2) print(dic3) # NOTE : 딕셔너리 쌍 추가, 삭제 # NOTE : 쌍 추가 dic4 = {1:'a'} dic4[2] = 'b' dic4['name'] = 'pey' print(dic4) # NOTE : 쌍 삭제 del dic4['name'] print(dic4) # NOTE : Key를 이용해 value얻기 dic5 = {'pey'..

# -*- coding : utf-8 -*- # NOTE : 튜플 자료형 # NOTE : 리스트와 튜플의 차이 # 리스트 : 값을 수정, 삭제, 삽입 할 수 있음. # 튜플 : 값을 수정, 삭제, 삽입 할 수 없음. # NOTE : 단지 하나의 요소를 가질 때에는 반드시 ,가 있어야함. tup1 = (1,) tup2 = 1, 2, 3 # = (1, 2, 3) tup3 = ('a', 'b', ('ab', 'cd')) print(tup1) print(tup2) print(tup3) # NOTE : 튜플 인덱싱, 슬라이싱 tup4 = (1, 2, 'a', 'b') print(tup4[0]) print(tup4[3]) print(tup4[1:]) print(tup4[:2]) # NOTE : 튜플 관련함수 # N..

필요 패키지로드 # -*- coding: utf-8 -*- from keras.layers import Dense, Activation,Flatten from keras.datasets import fashion_mnist from keras.models import Sequential from keras.utils import np_utils import matplotlib.pyplot as plt import tensorflow as tf import seaborn as sns import numpy as np sns.set() plt.style.use('ggplot') 데이터셋 생성 # NOTE : 데이터셋 생성 (train_img, train_lab), (test_img, test_lab) = f..
보호되어 있는 글입니다.

필요 패키지 from bs4 import BeautifulSoup as bs from pprint import pprint import requests as req from time import sleep import winsound as ws import os 클래스 부분 class advanced_kim_crawl: def __init__(self, in_url): self.url = in_url def get_parser(self): html = req.get(self.url) self.soup = bs(html.content, 'lxml') return self.soup def get_obj(self, selector, number_of_data): soup = self.get_parser() i..

Data field from : https://www.kaggle.com/c/bike-sharing-demand/data datetime - hourly date + timestamp season - 1 = spring, 2 = summer, 3 = fall, 4 = winter holiday - whether the day is considered a holiday workingday - whether the day is neither a weekend nor holiday weather 1: Clear, Few clouds, Partly cloudy, Partly cloudy 2: Mist + Cloudy, Mist + Broken clouds, Mist + Few clouds, Mist 3: Lig..