91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 28.3MB
    文件類型: .zip
    金幣: 2
    下載: 1 次
    發布日期: 2023-07-23
  • 語言: Python
  • 標簽: face++??

資源簡介

python項目-face++人臉識別考勤機-python_GUI-automatic_weather-face_gensui-python_game-python_LAN-python_multithreading-python_mysql-python_opencv_tracking-python_pachong

資源截圖

代碼片段和文件信息

__author__?=?‘luyi‘
import?os
import?urllib.request
import?urllib.parse
import?json
class?weather(object):
????#?獲取城市代碼的uri
????code_uri?=?“http://apistore.baidu.com/microservice/cityinfo?cityname=“
????#?獲取天氣信息的uri
????weather_uri?=?“http://apistore.baidu.com/microservice/weather?cityid=“
????#?主處理邏輯
????def?mainHandle(self):
????????#city_name?=?input(“輸入你要查詢的天氣:“)
????????fileHandle?=?open?(?‘test.txt‘?‘r‘?)?
????????city_name?=?fileHandle.read()?
????????fileHandle.close()?
????????uri?=?self.code_uri?+?urllib.parse.quote(city_name)
????????#獲取該城市天氣情況的網址
????????print(“查詢中請等待“)
????????ret?=?json.loads(urllib.request.urlopen(uri).read().decode(“utf8“))
????????if?ret[‘errNum‘]?!=?0:
????????????print(ret[‘retMsg‘])
????????????return?False
????????#查詢失敗
????????else:
????????#查詢成功使用json解析
????????#需要更詳細信息,請看百度api的說明文檔。使用方法類似。
????????????weather_uri?=?self.weather_uri?+?ret[‘retData‘][‘cityCode‘]
????????????data?=?json.loads(urllib.request.urlopen(weather_uri).read().decode(“utf8“))
????????????if?data[‘errNum‘]?==?0:
????????????????ret_data?=?data[‘retData‘]
????????????????output?=?“城市名:“?+?city_name?+?“\r\n“
????????????????output?+=?“更新時間:“?+?ret_data[“date“]?+?“?“?+?ret_data[“time“]?+?“\r\n“
????????????????output?+=?“天氣:“?+?ret_data[“weather“]?+?“?[“?+?ret_data[“WD“]?+?ret_data[“WS“]?+?“]\r\n“
????????????????output?+=?“當前溫度:“?+?ret_data[“temp“]?+?“?(“?+?ret_data[“h_tmp“]?+?“?--->?“?+?ret_data[“l_tmp“]?+?“)\r\n“

????????????????print(output)
????????????????
????????????????fileHandle?=?open?(?‘weather.txt‘?‘r‘?)?
????????????????begin?=?fileHandle.read()
????????????????print(begin)
????????????????fileHandle?=?open?(?‘weather.txt‘?‘w‘?)?
????????????????fileHandle.write(output)?
????????????????fileHandle.close()
????????????????
????????????????return?True
????????????else:
????????????????print(data[‘errMsg‘])
????????????????return?False
if?__name__?==?“__main__“:
????weather?=?weather()
????weather.mainHandle()
????a?=?input(“按任意鍵退出“)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-08-04?10:37??python項目\
?????文件?????????155??2016-03-22?19:39??python項目\README.md
?????目錄???????????0??2017-08-09?17:03??python項目\The_python_code-master\
?????目錄???????????0??2017-08-03?15:02??python項目\automatic_weather\
?????文件????????2197??2016-03-22?19:39??python項目\automatic_weather\1.天氣查詢.py
?????文件????????2888??2016-03-22?19:39??python項目\automatic_weather\QQ圖片20160120185818.png
?????文件???????66612??2016-03-22?19:39??python項目\automatic_weather\QQ圖片20160120185825.jpg
?????文件????????8098??2016-03-22?19:39??python項目\automatic_weather\QQ截圖20160123135304.png
?????文件????????1836??2016-03-22?19:39??python項目\automatic_weather\get_ip.py
?????文件????????1571??2016-03-22?19:39??python項目\automatic_weather\get_yuyin_hecheng.py
?????文件??????405552??2016-03-22?19:39??python項目\automatic_weather\mpg123.exe
?????目錄???????????0??2017-08-03?15:02??python項目\automatic_weather\picture\
?????文件????????2888??2016-03-22?19:39??python項目\automatic_weather\picture\QQ圖片20160120185818.png
?????文件???????66612??2016-03-22?19:39??python項目\automatic_weather\picture\QQ圖片20160120185825.jpg
?????文件????????8098??2016-03-22?19:39??python項目\automatic_weather\picture\QQ截圖20160123135304.png
?????文件?????????342??2016-03-22?19:39??python項目\automatic_weather\test.py
?????文件???????????4??2016-03-22?19:39??python項目\automatic_weather\test.txt
?????文件????????2330??2016-03-22?19:39??python項目\automatic_weather\urllib.request_urllib2.txt
?????文件?????????107??2016-03-22?19:39??python項目\automatic_weather\weather.txt
?????文件????????1898??2016-03-22?19:39??python項目\automatic_weather\天氣查詢.py
?????目錄???????????0??2017-08-03?15:02??python項目\face++人臉識別考勤機\
?????目錄???????????0??2017-08-03?15:02??python項目\face++人臉識別考勤機\LAN-jiankong\
?????文件?????????355??2016-03-22?19:39??python項目\face++人臉識別考勤機\LAN-jiankong\lianxuzhibo.py
?????文件?????????806??2016-03-22?19:39??python項目\face++人臉識別考勤機\LAN-jiankong\live-image-server.py
?????文件?????????929??2016-03-22?19:39??python項目\face++人臉識別考勤機\LAN-jiankong\zhibo.py
?????文件????????1726??2016-03-22?19:39??python項目\face++人臉識別考勤機\README.md
?????文件????????1726??2016-03-22?19:39??python項目\face++人臉識別考勤機\README.md~
?????目錄???????????0??2017-08-03?15:02??python項目\face++人臉識別考勤機\__pycache__\
?????文件???????11741??2016-03-22?19:39??python項目\face++人臉識別考勤機\__pycache__\facepp.cpython-34.pyc
?????文件????????3241??2016-03-22?19:39??python項目\face++人臉識別考勤機\admin.py
?????文件?????????219??2016-03-22?19:39??python項目\face++人臉識別考勤機\apikey.cfg
............此處省略495個文件信息

評論

共有 條評論