일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- install
- error
- YouTube 8M
- python
- CUDA
- ubuntu
- Windows 10
- keras
- object detection
- face_recognition
- Jupyter notebook
- shakeratos
- urllib
- raspberry pi
- gpu memory
- 딥러닝
- colaboratory
- dlib
- pyTorch
- linux
- ppc64le
- python3
- dataset
- windows
- Anaconda
- FIle
- TensorFlow
- download
- colab
- Deep Learning
- Today
- Total
목록urllib (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: ' \ + ..