본문 바로가기

분류 전체보기258

[ERROR]노마드 코더 / xhr poll error / socket.io / admin ui 노마드 코더 줌 클론 강의를 그대로 진행하다보면 socket.io의 admin ui 를 실행했을때 xhr poll error 가 발생합니다. 1. https://admin.socket.io 에 접속한다. 2. 아래와 같이 세팅한다. Server URL : http://localhost:3000 * 맨 끝 슬래시가 있으면 안됩니다. [X] http://localhost:3000/ Advanced options: 체크 WebSocket only?: 체크 Admin namespace: /admin (기본설정) 설정 코드는 다음과 같습니다. import { Server } from 'socket.io' import { instrument } from '@socket.io/admin-ui' ... const ht.. 2023. 1. 26.
python 9일차 / 웹스크래핑 풀버전 폴더 구조 main.py extractors / indeed.py extractors / wwr.py 설치 $ pip install beautifulsoup4 $ pip install selenium # main.py from extractors.wwr import extract_wwr_jobs from extractors.indeed import extract_indeed_job keyword = input("What do you want to search for? ") file = open(f"{keyword}.csv", "w", encoding="utf-8-sig") wwr = extract_wwr_jobs(keyword) indeed = extract_indeed_job(keyword) jobs .. 2023. 1. 11.
python 8일차 / indeed / selenium / chromedriver / beautifulsoup / None (data-type) from requests import get from bs4 import BeautifulSoup from extractors.wwr import extract_wwr_jobs # function 을 import # from 폴더명.파일명 import function명 # jobs = extract_wwr_jobs("python") # print(jobs) # base_url = "https://kr.indeed.com/jobs?q=" # search_term = "python" # response = get(f"{base_url}{search_term}") # print(response) # if response.status_code != 200: # print("Fail") # else: # prin.. 2023. 1. 10.
python 7일차 웹 스크래핑 / beautifulsoup 4 / find / find_all / requests / response status_code # 5.0 웹 스크래핑 # beautiful soup (웹사이트의 데이터를 받아올 수 있게 해주는 python 라이블러리) # 5.1 다운로드 # $ pip install beautifulsoup4 # https://www.crummy.com/software/BeautifulSoup/bs4/doc/#quick-start # 5.2 주의사항 # 웹스크래핑으로 상업적 이용시 주의해야한다. from requests import get from bs4 import BeautifulSoup base_url ="https://weworkremotely.com/remote-jobs/search?term=" search_term ="vue" reseponse = get(f"{base_url}{search_term}").. 2023. 1. 10.
[vue]컴포넌트 자세히 알아보기 1. 섹션 소개 컴포넌트 등록 및 스타일에 대해 Component Registration & Styling 컴포넌트를 스타일링 하는 방법과 특정 스타일이 특정 컴포넌트에만 영향을 미치도록 하는 방법도 알아본다 슬롯과 동적 컴포넌트 Slots & Dynamic Components 컴포넌트 이름과 프로젝트 폴더 구조 Naming & Folder structure 2. 전역 컴포넌트Global Components와 지역 컴포넌트Local Components main.js에서 app.component('the-header', TheHeader); 처럼 설정하는건 vue앱의 전역에서 사용할 수 있는 컴포넌트다. 하지만 컴포넌트를 등록하는 방법 중에서 가장 좋은 방법은 아니다. 한가지 잠재적 단점이 있다. 모든 컴.. 2023. 1. 10.
python 6일차 / for ~ in ~ / for loop / requests / status_code # 4.5 For Loops websites = ( "google.com", "airbnb.com", "https://twitter.com", "facebook.com", "https://tictoc.com" ) websites[0] # tuple 의 갯수만큼 반복 for website in websites: print("Hello", website) # 일반적으로 tuple이나 list를 만들 때 복수형으로 만든다 # websites, movies, users, photos ,... # for 에서는 단수형으로 쓴다. # website, movie, user, photo # 4.6 URL Formatting for website in websites: if not website.startswith("h.. 2023. 1. 6.
python 5일차 / method / list / tuple / dictionary # 4.0 Methods # python 에는 3가지 데이터 구조가 있다. # list # tuple # dictionary # 자료구조 Data structure란 무엇일까? # 데이터를 구조화 하고 싶을 때 사용한다. # list # days_of_week = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] # print(days_of_week) name = "solyi" print(name.upper()) # 대문자로 출력 # upper() 외에도 엄 청 많 은 function 들이 결합되어있다. # "solyi"는 string 인데 내부에 많은 function 을 가지고 있다. # 이것들을 function 이 아닌 method 라고 부른다. # capita.. 2023. 1. 5.
console.log / console.table / console.error / console.info / console.debug / console.warn / console.log() console.group() console.groupEnd() console.table() console.dir() console.error() console.info() console.debug() console.warn() console.clear() const arr = [ { name: 'solyi', birthday: '5/15' }, { name: 'may', birthday: '11/7' } ] console.table(arr) console.info("인포메세지~"); console.debug("디버그~~"); console.warn("와닝와닝~"); console.error("에러메세지~"); console.debug 는 상세 메세지에서 따로 볼 수 있다. 2023. 1. 4.
python 4일차 / and / or / while / input() / int() / import library # 3.3 And & Or # input() 입력 받는 function # int() 값을 숫자로 변경하는 function age = int(input("How old are you? ")) print("user answer : ", age) print(type(age)) # class 'str' if age = 18 and age pc_choice: print("Lower!") elif user_choice 2023. 1. 3.
python 3일차 / if / elif / else # 3.0 if # if condition: # "write the code to run" if 10 == 10: print("True!!") a = "solyi" if a == "solyi": print("YES!") # 3.1 Else & Elif if 10 > 5: print("True") # else 는 옵션이다 무조건 사용해야하는 것은 아님 password_correct = False # True if password_correct: print("Here is your money.") else: print("Wrong password.") # elif (== else if) # else와 마찬가지로 반드시 써야하는것은 아님 winner = 10 if winner > 10: print("winne.. 2023. 1. 2.
python 2일차 / function / def / parameters / arguments / return values / format / f"" # 2.4 Functions # function 을 정의할 때 def 를 쓴다. # 변수와 마찬가지로 숫자로 시작하면 안되고 스네이크 케이스를 쓴다 def say_hello(user_name, user_age): # parameter print("hello", user_name, "how r u ?") print("you are", user_age, "years old.") # 2.5 Identation # python에선 공백이 매우 중요하다. # 코드를 두칸 띄워줘야 그 코드가 어떤것 안에 들어가 있는걸 알수있다. def say_bye(): print("bye~") say_bye() # 2.6 Parameters # parameter: function의 괄호 안에서 쓰는 인자 # argument: f.. 2023. 1. 2.
Python 1일차 / 변수 / string / bool # 2.0 Hello world print("Hello world!") # 2.1 Variables 변수 a = 2 b = 3 c = a + b c = 1 #파이썬은 위에서 아래로 코드를 읽는다. print(c) # 변수는 숫자나 기호가 아닌 글자로 시작 해야한다. # 변수명에는 띄어쓰기를 사용할 수 없다. # python에서는 스네이크 케이스로 작성한다. myAge = 77 # camelCase는 javascript에서 많이 사용된다. my_age = 77 # python 에서는 스네이크 케이스를 많이 쓴다. print(myAge) print(my_age) # 2.2 Booleans and Strings my_name = "solyi" print(my_name) # True, False 는 첫 글자를 .. 2023. 1. 2.
[vue]컴포넌트 통신 세션8: 컴포넌트 통신 Component Communication & Reusable 1. 이번 세션 학습 컴포넌트로 UI를 구성하는 방법 어떻게 컴포넌트끼리 통신하는지, 컴포넌트 사이에서 어떻게 데이터를 주고 받는지 어떤 접근법이 있고, 어떻게 선택 해야하는지 2. 외부에서 데이터 받아오기 중요!같은 컴포넌트를 여러번 사용할때 매번 다른 데이터로 설정한다는 개념 props property의 약자로 커스텀 html 속성을 의미한다. props 로 설정한 것을 vue가 인식하게 하려면 받는 component 에서 props 를 추가해주어야한다. 가장 단순하게 받는 방법은 [ ] array 이다. props: [], 그 다음 모든 커스텀 속성을 추가해준다. props: [ 'name', 'phoneNumbe.. 2023. 1. 2.
반응형