随笔分类 -  Python

programming language
摘要:# encoding: utf-8 # 版权所有 2024 ©涂聚文有限公司 # 许可信息查看: # 描述: https://github.com/Broham/suncalcPy # Author : geovindu,Geovin Du 涂聚文. # IDE : PyCharm 2023.1 p 阅读全文
posted @ 2024-05-15 18:04 ®Geovin Du Dream Park™ 阅读(41) 评论(0) 推荐(0)
摘要:binary_num = '10000001' ones_complement = '' for bit in binary_num: ones_complement += '0' if bit == '1' else '1' print(ones_complement) #加上1 binary_n 阅读全文
posted @ 2024-05-12 22:20 ®Geovin Du Dream Park™ 阅读(28) 评论(0) 推荐(0)
摘要:import os import socket import struct from unidecode import unidecode import re import json import requests from bs4 import BeautifulSoup import gzip 阅读全文
posted @ 2024-04-30 15:45 ®Geovin Du Dream Park™ 阅读(54) 评论(0) 推荐(0)
摘要:def unGz(file_name): """ ungz zip file import gzip :param file_name: :return: """ f_name = file_name.replace(".gz", "") #获取文件的名称,去掉 g_file = gzip.Gzip 阅读全文
posted @ 2024-04-29 20:52 ®Geovin Du Dream Park™ 阅读(36) 评论(0) 推荐(0)
摘要:''' 引用类库 import re import string ''' @staticmethod def strSplit(textSource: str, patterns: str) -> list: """ 分割字符串 :param textSource: 需要进行分割的字符串 :para 阅读全文
posted @ 2024-04-28 11:57 ®Geovin Du Dream Park™ 阅读(22) 评论(0) 推荐(0)
摘要:import pdf2docx; #pip install pdf2docx https://github.com/ArtifexSoftware/pdf2docx pdf2docx.parse("CreateTwoColumnPDF.pdf","1.docx"); us_english Engli 阅读全文
posted @ 2024-04-10 15:12 ®Geovin Du Dream Park™ 阅读(12) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2024 涂聚文有限公司 # 许可信息查看: # 描述: # Author : geovindu,Geovin Du 涂聚文. # IDE : PyCharm 2023.1 python 3.11 # Datetime : 2024/1/13 10: 阅读全文
posted @ 2024-01-13 10:44 ®Geovin Du Dream Park™ 阅读(398) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2024 ©涂聚文有限公司 # 许可信息查看: # 描述: # Author : geovindu,Geovin Du 涂聚文. # IDE : PyCharm 2023.1 python 3.11 # Datetime : 2024/1/11 10 阅读全文
posted @ 2024-01-11 20:03 ®Geovin Du Dream Park™ 阅读(235) 评论(0) 推荐(0)
摘要:from xpinyin import Pinyin #https://github.com/lxneng/xpinyin def print_hi(name): # Use a breakpoint in the code line below to debug your script. prin 阅读全文
posted @ 2024-01-06 21:57 ®Geovin Du Dream Park™ 阅读(17) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2023 涂聚文有限公司 # 许可信息查看: # 描述:https://docs.python.org/3/library/string.html # Author : geovindu,Geovin Du 涂聚文. # IDE : PyCharm 阅读全文
posted @ 2023-12-17 20:49 ®Geovin Du Dream Park™ 阅读(27) 评论(0) 推荐(0)
摘要:openweathermap.json { "coord": { "lon": 114.0683, "lat":22.5455 } , "weather":[ { "id": 803, "main":"Clouds", "description":"多云", "icon":"04d" } ], "b 阅读全文
posted @ 2023-12-14 22:13 ®Geovin Du Dream Park™ 阅读(50) 评论(0) 推荐(0)
摘要:from typing import List import json class Student(object): def __init__(self, first_name: str, last_name: str): self.first_name = first_name self.last 阅读全文
posted @ 2023-12-14 20:29 ®Geovin Du Dream Park™ 阅读(22) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2023 ©涂聚文有限公司 # 许可信息查看: word covert pdf # 描述:pip install pywin32 # # pip install PyPDF2 # Author : geovindu,Geovin Du 涂聚文. # 阅读全文
posted @ 2023-10-26 15:39 ®Geovin Du Dream Park™ 阅读(38) 评论(0) 推荐(0)
摘要:browser = webdriver.Firefox()edge=webdriver.Edge()safari=webdriver.Safari()chrome=webdriver.Chrome() https://pypi.org/project/selenium/ 案例1: # encodin 阅读全文
posted @ 2023-10-26 10:50 ®Geovin Du Dream Park™ 阅读(57) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2023 涂聚文有限公司 # 许可信息查看: # 描述: # Author : geovindu,Geovin Du 涂聚文. # IDE : PyCharm 2023.1 python 311 # Datetime : 2023/9/30 6:56 阅读全文
posted @ 2023-09-30 08:37 ®Geovin Du Dream Park™ 阅读(187) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2023 涂聚文有限公司 # 许可信息查看: # 描述: # Author : geovindu,Geovin Du 涂聚文. # IDE : PyCharm 2023.1 python 311 # Datetime : 2023/9/21 21:2 阅读全文
posted @ 2023-09-29 06:58 ®Geovin Du Dream Park™ 阅读(24) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2023 ©涂聚文有限公司 # 许可信息查看: # 描述: Dijkstras Algorithm in Python 迪杰斯特拉算法 最短路径算法 # Author : geovindu,Geovin Du 涂聚文. # IDE : PyCharm 阅读全文
posted @ 2023-09-28 08:28 ®Geovin Du Dream Park™ 阅读(17) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2023 ©涂聚文有限公司 # 许可信息查看:Huffman Coding Huffman Coding 霍夫曼编码 ( Huffman coding ) 是一种可变长的前缀码 # 描述: # Author : geovindu,Geovin Du 阅读全文
posted @ 2023-09-27 00:06 ®Geovin Du Dream Park™ 阅读(23) 评论(0) 推荐(0)
摘要:# encoding: utf-8 # 版权所有 2023 涂聚文有限公司 # 许可信息查看:Python Sorting Algorithms # 描述: * https://www.programiz.com/dsa/counting-sort # * https://www.geeksforg 阅读全文
posted @ 2023-09-23 23:46 ®Geovin Du Dream Park™ 阅读(45) 评论(0) 推荐(0)
摘要:ubuntu 升级至python 3.11 sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.11 python3.11 --version root@ubuntu:/home/py 阅读全文
posted @ 2023-09-21 22:44 ®Geovin Du Dream Park™ 阅读(12) 评论(0) 推荐(0)