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