일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 우분투
- 편스토랑
- 파이썬
- 자연어처리
- ubuntu
- Git
- Baekjoon
- leetcode
- Kaggle
- 프로그래머스 파이썬
- 백준
- AI 경진대회
- github
- Real or Not? NLP with Disaster Tweets
- 금융문자분석경진대회
- 프로그래머스
- programmers
- 더현대서울 맛집
- hackerrank
- PYTHON
- dacon
- 데이콘
- 코로나19
- SW Expert Academy
- gs25
- Docker
- 캐치카페
- ChatGPT
- 편스토랑 우승상품
- 맥북
- Today
- Total
목록
반응형
2020/12/06 (2)
솜씨좋은장씨
최근 제가 만든 코드의 실행 속도를 측정해야하는 일이 있었습니다. 다양한 방법이 있지만 저는 datetime을 활용하여 측정해보았습니다. datetime을 활용하는 방법은 다음과 같습니다. import datetime 먼저 datetime 라이브러리를 import 합니다. start_time = datetime.datetime.now() # ( 측정을 하고자 하는 코드 ) end_time = datetime.datetime.now() datetime.datetime.now( ) 를 활용하여 코드 실행 전, 후 시간을 가져옵니다. elapsed_time = end_time - start_time 그 다음 코드 실행 후 시간에서 코드 실행 전 시간을 빼줍니다. 여기서 얻은 elapsed_time을 활용하여 ..
You are given the array paths, where paths[i] = [cityAi, cityBi] means there exists a direct path going from cityAi to cityBi. Return the destination city, that is, the city without any path outgoing to another city. It is guaranteed that the graph of paths forms a line without any loop, therefore, there will be exactly one destination city. Example 1: Input: paths = [["London","New York"],["New..