码迷,mamicode.com
首页 >  
搜索关键字:python 报告模板生成笔记一    ( 135041个结果
python面对对象
一、类的初始 1.类的结构 class Human: """ 此类主要是构建人类 """ mind = '有思想' # 第一部分:静态属性 属性 静态变量 静态字段 dic = {} l1 = [] def work(self): # 第二部分:方法 函数 动态属性 print('人类会工作') c ...
分类:编程语言   时间:2021-03-08 14:14:08    阅读次数:0
快排----Python模板
quickSort def partition(arr,low, high): i=(low-1) p=arr[high] for j in range(low, high): if arr[j]<=p: i+=1 arr[i],arr[j]=arr[j],arr[i] arr[i+1],arr[h ...
分类:编程语言   时间:2021-03-08 14:00:56    阅读次数:0
元类、实现ORM
阅读目录: 元类 元类实现ORM 元类 1. 类也是对象 在大多数编程语言中,类就是一组用来描述如何生成一个对象的代码段。在Python中这一点仍然成立: >>> class ObjectCreator(object): … pass … >>> my_object = ObjectCreator( ...
分类:其他好文   时间:2021-03-08 13:48:08    阅读次数:0
Core Python | 2 - Core Python: Getting Started | 2.6 - Objects and Types | 2.6.4 - Python's Type System
Programming languages can be distinguished by several characteristics, but one of the most important is the nature of their type system. Python could ...
分类:编程语言   时间:2021-03-08 13:34:24    阅读次数:0
python——提取pdf中的指定页
from PyPDF2 import PdfFileWriter, PdfFileReader # 开始页 start_page = 0 # 截止页 end_page = 5 output = PdfFileWriter() pdf_file = PdfFileReader(open("3.pdf" ...
分类:编程语言   时间:2021-03-08 13:30:17    阅读次数:0
翻译:《实用的Python编程》04_00_Overview
目录 | 上一节 (3 程序组织) | 下一节 (5 Python对象的内部工作原理) 4. 类和对象 到目前为止,我们的程序仅使用了内置的 Python 数据类型。本节,我们介绍类(class)和对象(object)的概念。你将学习 class 语句,该语句允许你创建新的对象。我们还将介绍继承(i ...
分类:编程语言   时间:2021-03-08 13:26:35    阅读次数:0
用keras_bert实现多输出、参数共享模型
背景 在nlp领域,预训练模型bert可谓是红得发紫。 但现在能搜到的大多数都是pytorch写的框架,而且大多都是单输出模型。 所以,本文以 有相互关系的多层标签分类 为背景,用keras设计了多输出、参数共享的模型。 keras_bert基础应用 def batch_iter(data_path ...
分类:其他好文   时间:2021-03-08 13:18:36    阅读次数:0
PyTorch 1.8发布,支持AMD GPU和Python函数转换
近日,PyTorch 团队发布了 PyTorch 1.8 版本。该版本整合了自去年 10 月 1.7 版本发布以来的 3000 多次 commit,提供了编译、代码优化、科学计算前端 API 方面的主要更新和新特性。值得一提的是,该版本新增了对 AMD ROCm 的支持。 此外,PyTorch 1. ...
分类:编程语言   时间:2021-03-08 13:14:52    阅读次数:0
python文件操作
打开 在Python中,使用open函数,可以打开一个已经存在的文件,或者创建一个文件,语法如下: 变量(文件对象) = open(name,mode) name:是要打开的目标文件名的字符串(可以包含文件具体路径) mode:设置打开文件的模式(访问模式):只读、写入、追加等 打开文件模式 **注 ...
分类:编程语言   时间:2021-03-08 13:11:36    阅读次数:0
Core Python | 2 - Core Python: Getting Started | 2.4 - Introducing Strings, Collections, and Iteration | 2.4.4 - Bytes
Bytes are very similar to strings, except that rather than being sequences of Unicode code points, they are sequences of, well, bytes. As such, they a ...
分类:编程语言   时间:2021-03-06 14:52:54    阅读次数:0
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!