会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
BOYE
Believe in yourself,Nothing is impossible
博客园
首页
新随笔
新文章
联系
管理
订阅
上一页
1
2
3
4
5
6
···
29
下一页
2024年4月12日
awk 时间戳格式化
摘要: awk 'BEGIN{aa=strftime("%a","1370210542");print aa}' #Mon awk 'BEGIN{aa=strftime("%Y-%m-%d %H:%M:%S","1370210542");print aa}' #2013-06-03 06:02:22 awk
阅读全文
posted @ 2024-04-12 09:29 boye169
阅读(10)
评论(0)
推荐(0)
编辑
2024年4月10日
展开嵌套列表
摘要: 模拟数据 data = [[1,2,6],[4],[5,8,7],[11,9],[10]] # 模拟数据 方式1:for循环 from collections.abc import Iterablesum_data = [] for i in data: if isinstance(i,Iterab
阅读全文
posted @ 2024-04-10 17:35 boye169
阅读(4)
评论(0)
推荐(0)
编辑
2024年3月27日
还款计算,提前还款
摘要: #coding:utf-8 import sys from prettytable import PrettyTable import math ''' 月利率 = 年利率/12 1.等额本息计算公式:每月还款金额 =〔贷款本金×月利率×(1+月利率)^还款月数〕÷〔(1+月利率)^还款月数 - 1
阅读全文
posted @ 2024-03-27 14:25 boye169
阅读(4)
评论(0)
推荐(0)
编辑
mysql 视图的创建
摘要: 概述 MySQL视图是一个虚拟表,其内容由查询定义。同真实的表一样,视图包含一系列带有名称的列和行数据。但是,视图并不在数据库中以存储的数据值集形式存在。行和列数据来自由定义视图的查询所引用的表,并且在引用视图时动态生成。 对其中所引用的基础表来说,MySQL视图的作用类似于筛选。定义视图的筛选可以
阅读全文
posted @ 2024-03-27 10:49 boye169
阅读(21)
评论(0)
推荐(0)
编辑
2024年3月21日
贷款计算
摘要: #coding:utf-8 import sys from prettytable import PrettyTable ''' 月利率 = 年利率/12 1.等额本息计算公式:每月还款金额 =〔贷款本金×月利率×(1+月利率)^还款月数〕÷〔(1+月利率)^还款月数 - 1〕 每月利息 = 每月还
阅读全文
posted @ 2024-03-21 16:38 boye169
阅读(3)
评论(0)
推荐(0)
编辑
2024年3月14日
python string模块
摘要: 介绍 ascii_letters --所有字母的字符串ascii_lowercase --小写字母的字符串ascii_uppercase --大写字母的字符串digits --十进制数字的字符串hexdigits --十六进制数字的字符串octdigits --八进制数字的字符串punctuatio
阅读全文
posted @ 2024-03-14 14:41 boye169
阅读(4)
评论(0)
推荐(0)
编辑
2024年2月23日
lxml
摘要: 下载安装 https://pypi.python.org/pypi/lxml/3.4.2#downloadspip install lxml 基本语法 2.1 表达式 描述 nodename 选取此节点的所有子节点。 / 从根节点选取。 // 从匹配选择的当前节点选择文档中的节点,而不考虑它们的位置
阅读全文
posted @ 2024-02-23 17:35 boye169
阅读(4)
评论(0)
推荐(0)
编辑
2024年2月1日
python 魔术方法
摘要: __init__、__new__、__del__ 构造方法__new__ 触发时机: 实例化对象时自动触发(在__init__之前触发) 参数:至少一个cls 接收当前类,其他参数根据初始化方法参数决定 返回值:必须返回一个对象实例,没有返回值,则实例化对象的结果为None 作用:实例化对象 注意:
阅读全文
posted @ 2024-02-01 15:33 boye169
阅读(4)
评论(0)
推荐(0)
编辑
2024年1月31日
python 实现下载大文件
摘要: #coding:utf-8 import requests def request_big_data(url): name = url.split('/')[-1] r = requests.get(url,stream=True) #stream =True 设置为流读取 with open("d
阅读全文
posted @ 2024-01-31 10:18 boye169
阅读(68)
评论(0)
推荐(0)
编辑
2024年1月30日
Python正则表达式之:(?P<name>) (?P=name) 及 \g<name> 三者的使用区别
摘要: import re s="2023-12-23 14:34:56|liming|20230789" parren="(?P<time>^\d+-\d+-\d+\s\d+:\d+:\d+)\|(?P<name>[\w]+)\|(?P<number>\d+)$" g=re.search(parren,s
阅读全文
posted @ 2024-01-30 15:09 boye169
阅读(5)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
5
6
···
29
下一页
公告