Programming218 python 으로 asdict, from_dict 직접 구현 편의를 위해서 dict을 많이 사용하지만 변수들이 많아지면 class화 해서 사용하는 것이 좋다. 아래 처럼 dataclass 사용시 입력값을 request의 json으로 받거나 dict으로 변환했을 때 class의 파라미터에 셋하는 from_dict 구현내용이다. 구현된 asdict 대신에 dataclasses.asdict 을 사용해도 된다. 아래의 asdict는 조건들을 추가하고 싶어서 만든 것이다. from dataclasses import dataclass, fields @dataclass class AppRawData: sessionId: str = "" deviceId: str = "" uuid: str = "" view_url: str = "" event_name: str = "" event.. 2023. 12. 18. neo-vim 설치 - CoC, Python - 실시간자동완성 적용 vi를 IDE 처럼 사용해보자 설치 brew install nvim brew install cmake brew install luarocks brew install pkg-config nodeJs 설치 #mac brew install node@18 brew unlink node brew link --overwrite node@18 #linux curl -sL install-node.now.sh/lts | sudo bash #linux yarn 설치 #mac brew install yarn #linux curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ sta.. 2023. 5. 27. Rust 간단한 웹서버 HttpServer 올리기 제목 그대로 간단하게 Rust로 웹서버 올리기 - hello world! 찍어보기 프로젝트 생성 $ cargo new rust-actix-api Cargo.toml 에 crate 추가 [dependencies] actix-web = "3.3.2" main.rs 수정 use actix_web::{web, App, HttpResponse, HttpServer, Responder}; async fn index() -> impl Responder { HttpResponse::Ok().body("Hello world!") } async fn get_data(web::Path(id): web::Path) -> impl Responder { let data = format!("get_data {id}"); HttpR.. 2023. 4. 19. AWS CodeWhisperer 개인 무료 - copilot 대체 AWS에서 copilot 대체 가능?한 서비스를 제공합니다. 개인은 무료. 이메일 주소만 있으면 사용가능합니다. 바로 셋팅함. https://aws.amazon.com/ko/blogs/aws/amazon-codewhisperer-free-for-individual-use-is-now-generally-available/ Amazon CodeWhisperer, Free for Individual Use, is Now Generally Available | Amazon Web Services Today, Amazon CodeWhisperer, a real-time AI coding companion, is generally available and also includes a CodeWhisperer Ind.. 2023. 4. 17. git log - 콘솔에서 그래프로 깃로그 확인 git log --graph --pretty=oneline --abbrev-commit --all 2023. 4. 14. ERD 표기 방법 / 논리적 설계, 물리적 설계 / 테이블 정의 2. 논리적 설계 2.1 ERD (ERD로 작성) (새발표기법) 2.2 TABLE 기술서 TABLE 테이블명 설명 구독자 회원의 정보 저장 출판사 관리자의 정보 저장 Reader TABLE 한글 필드명 설명 고객번호 회원에게 부여된 고유 번호(FK) 이름 회원의 이름 나이 회원의 나이 성별 회원의 성별 주소 도 회원 주소지의 도 시 회원 주소지의 도 구 회원 주소지의 도 동 회원 주소지의 도 상세 회원 주소지의 나머지 상세 주소 구독기간 회원의 구독 기간 총구독기간 회원의 총 구독 기간 연락처 회원의 연락처 Publisher TABLE 한글 필드명 설명 고객번호 회원에게 부여된 고유 번호 발행호 출판사에서 출간한 책의 발행 호 발송일 출판사에서 출간한 책의 전체 발송날짜 비밀번호 출판사(관리자)임을 인증.. 2023. 4. 13. 이전 1 2 3 4 5 6 ··· 37 다음