일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- download
- Windows 10
- python3
- shakeratos
- error
- Deep Learning
- CUDA
- raspberry pi
- install
- dataset
- ubuntu
- object detection
- colaboratory
- keras
- urllib
- FIle
- 딥러닝
- TensorFlow
- windows
- Anaconda
- YouTube 8M
- dlib
- gpu memory
- face_recognition
- ppc64le
- colab
- Jupyter notebook
- linux
- pyTorch
- python
- Today
- Total
목록request (2)
Shakerato
1. Basic code of urlretrieve to download a fileurllib.request.urlretrieve(source_url, destination_path) 2. Advanced code of urlretrive to display the download percentage.def download_file(source_url, destination_path): """Downloads `source_url` onto `destionation_path`.""" def _progress(count, block_size, total_size): sys.stderr.write('\r>> Downloading %s %.1f%%' % ( source_url, float(count * bl..
import urllib.request as urllib2import timeimport logging def fileDownload(url, file_name): logging.basicConfig(level=logging.INFO) logger = logging.getLogger('[fileDownload]') num_of_retries = 3 time_interval = 2 for retrycnt in range(num_of_retries): try: u = urllib2.urlopen(url) break except Exception as e: logger.error(' Faild to download: ' + str(e) + ', Number of remaining attempts: ' \ + ..