and or not 优先级,()> not > and > or print(3>4 or 4<3 and 1==1) # F print(1 < 2 and 3 < 4 or 1>2) # T print(2 > 1 and 3 < 4 or 4 > 5 and 2 < 1) # T print ...
分类:
编程语言 时间:
2020-06-06 21:21:32
阅读次数:
67
1.安装 1.1下载:https://www.anaconda.com/products/individual#linux 1.2安装: bash Anaconda3-2019.03-Linux-x86_64.sh 一路回车,在合适位置按照提示输入yes;在最后提示是否将该路径加入到环境里面,默认是 ...
分类:
系统相关 时间:
2020-06-06 20:11:20
阅读次数:
134
基础操作 import sqlalchemy import threading import datetime from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine f ...
分类:
数据库 时间:
2020-06-06 20:08:55
阅读次数:
84
相信接触过Python的小伙伴们都知道运行Python脚本程序的方式有多种,目前主要的方式有:交互式环境运行、命令行窗口运行、开发工具上运行等,其中在不同的操作平台上还互不相同。今天,小编讲些Python基础的内容,以Windows下交互式环境为依托,演示Python程序的运行。 一般来说,顺利安装 ...
分类:
编程语言 时间:
2020-06-06 18:40:40
阅读次数:
56
代码实现: goods = {'吉他':{'wei':1,'val':1500} ,'音响':{'wei':4,'val':3000},'电脑':{'wei':3,'val':2000}} def bag(goods,con): # con: 背包容量, goods,商品 # 获取最轻的物品重量 m ...
分类:
编程语言 时间:
2020-06-06 18:37:28
阅读次数:
72
rocketmq第三方库只支持mac和Linux,需注意!! #*encoding=utf-8 from rocketmq.client import PullConsumer consumer = PullConsumer('CID_XXX') consumer.set_namesrv_addr( ...
分类:
编程语言 时间:
2020-06-06 18:34:00
阅读次数:
298
Python中读取文件的方式有许多种,往往数据量大的情况令人苦恼。之前一篇博客https://www.cnblogs.com/xiaolan-Lin/p/12014686.html我说会发大文件读取的后续。 那么后续来啦! 1 import pandas as pd 2 # 采用块读取功能,读取cs ...
分类:
编程语言 时间:
2020-06-06 18:28:44
阅读次数:
176
一、Django框架基本结构与使用 1、安装 pip install django #安装 pip show django #查看安装的路径,然后添加django-admin.py文件路径的环境变量 2、创建工程 切换到需要创建工程的目录执行:django-admin startproject 工程 ...
分类:
移动开发 时间:
2020-06-06 18:23:56
阅读次数:
98
需要的库:matplotlib 用法: import matplotlib.pyplot as plt plt.plot(x, y) #x, y是两个列表 plt.show() 例子: import matplotlib.pyplot as plt x = [1, 2, 3] y = [2, 3, ...
分类:
编程语言 时间:
2020-06-06 18:20:56
阅读次数:
113
import json from Db import Db db = Db() ''' 参考配置文件 { "file": "test.json", "path": "data", "table": "tk_bill", "comitcount": 50, "map": { "trade_id": " ...
分类:
数据库 时间:
2020-06-06 18:16:37
阅读次数:
221