![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
fklk
这个作者很懒,什么都没留下…
展开
-
读取EXCEL然后导出各列值的笛卡尔积——测试用例辅助
假设有以下信号:# -*- coding: utf-8 -*-"""Created on Sat Jan 1 22:49:04 2022@author: LENOVO"""import pandas as pdimport itertoolsdef PT(): print ("----------------***********-------------------------------") io = r'F:\pythonplay\signal.xls原创 2022-01-03 19:58:48 · 543 阅读 · 0 评论 -
禅道导出表格后统计bug数(by pandas)
假设有这样一个表格:bug.xlsximport pandas as pdimport matplotlib.pyplot as pltdf= pd.read_excel('bug.xlsx')#print(xx.head)#print(df.columns)#rint (df['创建者'])print ("----------------------------------------")df.rename(columns={"创建者": "Createer", "日期": "Date"原创 2020-09-26 18:07:47 · 1256 阅读 · 0 评论 -
Python regex[],()等
import relog = "[2020-Feb-28 09:44:59.111749] [INFO] [CHASSIS_DRIVE] [2020-02-28 09:44:44.655924] dif_pos=(13.0083,-0.00512981,-0.00623378) loading=(-363,436) drv_utliz=(155,147) obstacle=(0,0) cur_twist=(-1.27467,-0.00245437) tar_twist=(-1.28842,0.0034.原创 2020-06-30 11:44:50 · 107 阅读 · 0 评论 -
Numpy quick fork
The BasicsNumPy’s main object is the homogeneous multidimensional array. It is a table of elements (usually numbers), all of the same type, indexed by a tuple of non-negative integers. In NumPy dimensions are called axes.For example, the coordinates of a原创 2020-06-29 11:08:27 · 153 阅读 · 0 评论 -
Android 开发者学习路线2020_详细资料和解读
https://medium.com/mindorks/android-development-learning-path-2020-edition-3f464ac56dbf视频:https://www.youtube.com/watch?v=kKNgeeL3YOEA Complete Learning path for Android DeveloperI have been continuously getting requests on different channels to help原创 2020-05-18 10:36:24 · 1119 阅读 · 0 评论 -
爱家项目笔记
前后端分离:前后端分离为何要用Nginx?:https://www.jianshu.com/p/801f503cc9ee原创 2020-05-16 10:42:48 · 239 阅读 · 0 评论 -
python sqlite3煎蛋(简单程序)
在这里偷一个例子db(chinook.db) :https://www.sqlitetutorial.net/sqlite-sample-database/import sqlite3conn = sqlite3.connect('E:\practise\python\chinook.db')c = conn.cursor()c.execute('''SELECT * FROM emp...原创 2020-05-07 11:43:17 · 222 阅读 · 0 评论 -
WIN10 FLASK 安装 和第一个hello world
Microsoft Windows [版本 10.0.18362.778]© 2019 Microsoft Corporation。保留所有权利。C:\Users\pc>F:F:>cd python_ven_demoF:\python_ven_demo>F:\python_ven_demo>python -m venv .F:\python_ven_demo&g...原创 2020-05-05 15:42:18 · 1800 阅读 · 0 评论 -
operator.itemgetter,itertools import groupby
operator.itemgetter函数operator模块提供的itemgetter函数用于获取对象的哪些维的数据,参数为一些序号(即需要获取的数据在对象中的序号),下面看例子。>>> a = [1,2,3,4,5,6]>>> b = operator.itemgetter(1)>>> boperator.itemgetter(1...原创 2020-04-23 16:00:09 · 372 阅读 · 0 评论 -
Check if any String is empty in list,First Non-Empty String in list
预备知识:any()Any(x)判断x对象是否为空对象,如果都为空、0、false,则返回false,如果不都为空、0、false,则返回true请看https://docs.python.org/上的定义:any(iterable)如果 iterable 的任一元素为真则返回 True。 如果所有迭代器为空,返回 False。 等价于:def any(iterable): fo...原创 2020-04-22 11:45:52 · 226 阅读 · 0 评论 -
Python Property – The Problem and Solution
https://data-flair.training/blogs/python-property-problem-solution/>> class Song: def __init__(self ,title): self.title = title def show_title(self): print("I'm listening to ",self.title...原创 2020-04-02 18:00:37 · 171 阅读 · 0 评论 -
Decorators 装饰器
Everything in Python is an object:First of all let’s understand functions in Python:def hi(name="yasoob"): return "hi " + nameprint(hi())参考:http://book.pythontips.com/en/latest/decorators.h...原创 2020-03-18 17:55:13 · 152 阅读 · 0 评论 -
multiprocessing-坑与爬坑,LOCK,Queue 等
```python#coding=utf-8import multiprocessingdef worker(n): """worker function""" #获取当前线程的名字 name = multiprocessing.current_process().name print (name,'starting') print ('Worke...原创 2020-03-09 14:48:08 · 385 阅读 · 0 评论 -
list comprehension 和python 中替代switch-case的方法
>>> num = [x for x in range(100) if x%2 ==0]num[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70...原创 2020-03-03 16:01:28 · 169 阅读 · 0 评论 -
将一个word文档自动复制100份
import osfrom os.path import joinimport shutildef copy_file_to_dir(file,number): if os.path.exists(file): print ("fuck you ") current_dir= os.getcwd() for X in rang...原创 2020-02-15 15:33:18 · 5255 阅读 · 0 评论 -
python lambda拉姆达表达式
(lambda x:x+1)(50)51addone= lambda x:x+1addone(50)51sum = lambda x,y :x+ysum(5,9)14原创 2019-10-17 10:36:09 · 986 阅读 · 0 评论 -
generator and Iterator
gen_exp = (x ** 2 for x in range(10) if x % 2 == 0)for x in gen_exp:… print(x)04163664用圆括号代替 list comprehensions 的 方括号,就是generator :list_comp = [x ** 2 for x in range(10) if x % ...原创 2019-02-18 16:10:37 · 135 阅读 · 0 评论