位运算基础 set bit: mask |= (1 << puzzle[i]) submask : `submask |= (submask - 1) & mask 位置掩码 https://leetcode-cn.com/problems/subsets/ 先来看78题 子集 给你一个整数数组nu ...
分类:
其他好文 时间:
2021-02-27 13:07:24
阅读次数:
0
为什么不用:pd.read_excel ? 因为 pd 使用 openpyxl 读取excel文件,有时候xlsx文件是由ApachIO产生的读取进去会出错,换个方式,用xlwings(基于pywin32?)。 传说会更快吗,没有测试速度,可以自行测试。 代码: import xlwings as ...
import matplotlib.pyplot as plt # 定义一个画图函数 def sinplot(flip = 1): x = np.linspace(0,10,100) for i in range(1,4): y = np.sin(x + i * 0.5) * (4 - i) * f ...
分类:
其他好文 时间:
2021-02-24 13:05:31
阅读次数:
0
import pandas as pd import numpy as np if __name__ == '__main__': pd.options.display.max_columns = 999 orders = pd.read_excel("C:/Users/18124/Desktop/ ...
分类:
其他好文 时间:
2021-02-19 13:19:32
阅读次数:
0
数据读取 import pandas as pd features=['accommodates','bathrooms','bedrooms','beds','price','minimum_nights','maximum_nights','number_of_reviews'] dc_list ...
分类:
其他好文 时间:
2021-02-18 13:58:41
阅读次数:
0
第一个Mybatis程序 一、创建数据库、数据表 sql语句如下: create database mybatis; use mybatis; create table user( id int primary key auto_increment , name varchar(50) not nu ...
分类:
其他好文 时间:
2021-02-18 13:32:04
阅读次数:
0
from pandas import Series import numpy as np data = Series(np.random.randn(10), index=[['a','a','a','b','b','b','c','c','d','d'], [1,2,3,1,2,3,1,2,2,3 ...
分类:
其他好文 时间:
2021-02-17 15:05:05
阅读次数:
0
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import string import random num=int(sys.argv[1]) #随机生成一个MAC地址 def creat_mac(): MAC='41-AF' hex_nu ...
分类:
系统相关 时间:
2021-02-17 14:53:26
阅读次数:
0
figure语法说明 figure(num=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True) num: 图像编号或名称,数字为编号 ,字符串为名称 figsize: 指定figure的宽和高,单位为 ...
分类:
其他好文 时间:
2021-02-17 14:19:28
阅读次数:
0
文件持久化存储 目录 文件持久化存储 脑图 文件的操作 with 语句 OS模块 json模块 存储为Excel文件 脑图 文件的操作 import os import platform # 1. 获取操作系统类型 print(os.name) # 2. 获取主机信息,windows系统使用plat ...
分类:
编程语言 时间:
2021-02-17 14:15:59
阅读次数:
0