17
2020
11
Colab yahoo stock
import gspread_dataframe as gdimport osfrom google.colab import drivefrom google.colab import filesimport gspreadimport pandas as pdfrom google.colab import authauth.authenticate_user()from oauth2client.client import GoogleCredentialsdrive.mount('
作者:kerek | 分类:Programme | 浏览:43 | 评论:0
15
2020
11
request head randomly
import reimport timeimport randomimport requestsimport pandas as pdfrom retrying import retryfrom concurrent.futures import ThreadPoolExecutorstart = time.clock() # 开始计时# 请求头池user_agent = [ "Mozilla/4.0 (compatible; MSIE 6.0;
作者:kerek | 分类:Programme | 浏览:31 | 评论:0
12
2020
11
beautifulsoup find elements
https://yanwei-liu.medium.com/python%E7%88%AC%E8%9F%B2%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98-%E4%B8%80-beautifulsoup-1ee011df8768
e.g.
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc, 'html.parse
作者:kerek | 分类:Programme | 浏览:45 | 评论:0
11
2020
11
dict storage method
while True: # theme of your home page print("--------Staff Info. Management System---------") print("-----1、Adding staff information-----") print("-----2、Removing staff inor
作者:kerek | 分类:Programme | 浏览:41 | 评论:0
11
2020
11
design 5730 LED
5V power sourcewhite LED operating voltage 3.2V, I = 0.15A (150mA)voltage of resistor (U) V=5V-3.2V=1.8Vresistor to be chosen R=V/I=1.8V/0.15A(150mA)=12Ω 1/2Wpower of resistor to be chosen P=UI=1.8V*0.15A=0.27W&nbs
作者:kerek | 分类:Programme | 浏览:41 | 评论:0
09
2020
11
Google Colab + Google spreadsheet
install module first --->!pip install --upgrade gspreadSaving data to Google Sheetsfrom google.colab import authauth.authenticate_user()import gspreadfrom oauth2client.client import GoogleCredentia
作者:kerek | 分类:Programme | 浏览:38 | 评论:0
09
2020
11
Colab links to Gdrive
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null!apt-get update -qq 2>&1 > /dev/null!apt-get -y install -qq google-dri
作者:kerek | 分类:Programme | 浏览:36 | 评论:0
08
2020
11
teaching materials
作者:kerek | 分类:Programme | 浏览:85 | 评论:0
26
2020
10
Google sheet crawler
# -*- coding: UTF-8 -*-import gspreadfrom oauth2client.service_account import ServiceAccountCredentialsimport requestsimport lxmlfrom bs4 import BeautifulSoupscopes = ["https://spreadsheets.google.com/feeds"]credentials = ServiceAccountCred
作者:kerek | 分类:Programme | 浏览:52 | 评论:0
13
2020
10
Cron scheduled jobs
https://blog.csdn.net/aaronjny/article/details/80551696https://my.oschina.net/xiaomijiejie/blog/1537522https://tendcode.com/article/hello-crontab/crontab可以用来实现linux下的定时任务,这里记录crontab在ubuntu上的配置使用以及简单测试。1.开启日志服务器rsyslog对crontab的支持打开终端,输入:cd /etc/rsysl
作者:kerek | 分类:Programme | 浏览:51 | 评论:2