본문 바로가기

전체 글822

Poetry로 프로젝트 패키지를 관리하자 Poetry는 왜 사용하는가? Poetry는 파이썬에서 종속성 관리 및 패키징을 위한 도구입니다. 즉, 프로젝트가 의존하고있는 라이브러리 패키지를 설치 및 삭제 등 효과적으로 관리할 수 있습니다. 때문에 Poetry는 pip의 requirements나 virtualenv를 대체할 수 있습니다. poetry를 pip로 설치하는 방법은 다음과 같습니다. pip install --user poetry 다른 경로의 설치 방법은 공식문서를 참고하기 바랍니다. installation Poetry로 프로젝트 생성하기 poetry를 설치했다면 이제 shell에서 poetry 명령어를 사용할 수 있습니다. poetry new project-name 위의 명령어를 통해 새로운 프로젝트를 생성할 수 있습니다. 생성된 프로젝.. 2022. 4. 11.
2022년 15주차 '생에 첫 Contribute' Weekly growth 이번 주는 개발자로서 첫 출근을 시작하였습니다! 짝짝짝~ 아직 부족한게 많지만 빠르게 배워서 한사람 몫을 해내고 싶습니다. 타입 파이썬 강의 완강 지난 주에 언급한 강의를 완강하였습니다. 아직은 익숙하지 않아서 실무에 적용하려면 많이 연습을 해봐야할 것 같습니다. 이번 주말에는 봄이 와서 그런지 늘어졌습니다... 일요일에는 친구와 알고리즘을 푸는데 많은 시간을 사용했습니다. 때문에 몇 가지 일들이 밀려버렸네요.. 오는 주에는 시간을 좀 더 부지런히 써야겠습니다. Algorithm 출근을 한 뒤로 출퇴근 시간에 알고리즘을 풀기로 했습니다. 시간을 아낄 수 있어서 좋은 것 같습니다. 이번 주를 마지막으로 알고리즘은 주간 회고에 기록하지 않겠습니다. 습관이 되었기 때문에 굳이 기록을 .. 2022. 4. 11.
Remove First and Last Character Part Two Description: This is a spin off of my first kata. You are given a string containing a sequence of character sequences separated by commas. Write a function which returns a new string containing the same character sequences except the first and the last ones but this time separated by spaces. If the input string is empty or the removal of the first and last items would cause the resulting string .. 2022. 4. 10.
Total amount of points Description: Our football team finished the championship. The result of each match look like "x:y". Results of all matches are recorded in the collection. For example: ["3:1", "2:2", "0:1", ...] Write a function that takes such collection and counts the points of our team in the championship. Rules for counting points for each match: if x > y: 3 points if x < y: 0 point if x = y: 1 point Notes: .. 2022. 4. 9.
Transportation on vacation Description: After a hard quarter in the office you decide to get some rest on a vacation. So you will book a flight for you and your girlfriend and try to leave all the mess behind you. You will need a rental car in order for you to get around in your vacation. The manager of the car rental makes you some good offers. Every day you rent the car costs $40. If you rent the car for 7 or more days,.. 2022. 4. 8.
Beginner - Lost Without a Map Description: Given an array of integers, return a new array with each value doubled. For example: [1, 2, 3] --> [2, 4, 6] Solution: 1. Get the elements out of the array. 2. Multiply the element by 2 and put it back into the array. 3. Return an array. def maps(a): return list(map(lambda x: x * 2, a)) The lambda function is an anonymous function and is suitable for simple calculations. 2022. 4. 7.