自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (1)
  • 收藏
  • 关注

原创 flask 更新数据库

找到调用了Migrate的文件 (此处为manager.py)python manager.py db migrate -m "修改内容"python manager.py db upgrade

2021-02-16 18:17:43 160

原创 flask + vue项目遇到的坑(一)Please edit configuration/connection/logging...\\alembic.ini ‘ before proceeding

修复方法很简单,将数据库中存在的表删除就好了

2021-01-30 12:40:48 1173

原创 Python 数据处理 - Numpy 03 - 数组形状操作

1. reshapearr = arr.reshape(shape)import numpy as npreshapeArr = np.arange(1, 10, 1)print(reshapeArr) # [1 2 3 4 5 6 7 8 9]newArr = reshapeArr.reshape((3, 3))print(newArr) # [[1 2 3]# [4 5 6]# [7 8 9]]' 注意如果改变reshape前的数组的值,reshape之后的数组也会被改变

2020-08-16 20:44:26 213

原创 Python 数据处理 - Numpy 02 - N维数组的数据类型

Let’s take a look at all the data types of array with n dimension.import numpy as npprint((set(np.typeDict.values())))'''{<class 'numpy.complex64'>, <class 'numpy.uint16'>, <class 'numpy.bytes_'>, <class 'numpy.float16'>, <cla

2020-08-16 15:38:36 276

原创 Python 数据处理 - Numpy 01 - 创建数组(矩阵)对象

Numpy 模块调用方式:import numpy as np1. 创建一个 Normal 的数组np.array():将list 或 tuple 转换为数组对象import numpy as np' 1.1 创建一维数组 '' List 版本 'numList = list(range(3)) # [0, 1, 2]numArr1 = np.array(numList)print(numArr1) # 打印结果为 [0 1 2],是一维矩阵' tuple同理 'numTuple =

2020-08-16 13:44:21 632

原创 Python 基础学习 --- Note 11 --- 类 (class)

1. 创建类class People: def __init__(self, name, gender): ''' construct function ''' self.name = name self.gender = genderSaxon = People('Saxon', 'Male')print(Saxon.name) # Saxonprint(Saxon.gender) # Male2. 继承Student 继承 Peopleclass People: def

2020-08-15 23:32:09 91

原创 Python 基础学习 --- Note 10 --- 自定义函数 (def)

1. def 基本样式注意:x 和 y 是 required 参数,必须都传入def add(x, y): ''' @params: x, y: element to add @return: x + y: The addition of x + y ''' return x + y # 如果不写返回值,默认为 None2. default parameterdef sayHello(name = 'Saxon'): print('hello ' + name)sayHello()

2020-08-15 20:04:42 167

原创 Python 基础学习 --- Note 09 --- 迭代 (range, iter, next, zip)

1. rangeWhole Parameters of range:range(start, end, step = 1)for i in range(1, 10, 2): print(i)# 1# 3# 5# 7# 9print(list(range(1, 10, 2))# [1, 3, 5, 7, 9]2. iter & next序列化对象 (iterable object ) 除了可以使用索引 (index)来进行迭代,还可以使用迭代器(iter) 来迭代

2020-08-15 19:25:57 501

原创 Python 基础学习 --- Note 08 --- 控制语句

1. if 条件判断randomSet = {'Saxon', 18}if 18 in randomSet: print('Wow Saxon, you are so 年轻')else: print('impossible')2. Loop2.1 For loop' loop list 'loopList = ['Saxon', 18, 'Perfect']for item in loopList: print(item, end=' & ') # Saxon & 1

2020-08-15 17:28:56 70

原创 Python 基础学习 --- Note 07 --- 集合(set)

set 是无序的,而且元素不会重复1. 创建集合NB: Set could remove duplication automatically!newSet = {1, 2, 3}duplicatedSet = {'Saxon', 'GirlFriend', 'GirlFriend'}print(duplicatedSet) # {'GirlFriend', 'Saxon'}2. set basic operation2.1 ‘in’ OperationInOperationSet =.

2020-08-14 00:02:44 304

原创 Python 基础学习 --- Note 06 --- 字典(dict)

1. 创建字典1.1 创建空字典emptyDict1 = dict()empryDict2 = {}1.2 创建有初始值的字典iniDict = {'name': Saxon, 'GPA': 4.00, 'Age': 18}2. 获取字典的值iniDict = {'name': 'Saxon', 'GPA': 4.00, 'Age': 18}print(iniDict['name']) # Saxonprint(iniDict['GPA']) # 4.0print(iniDict['

2020-08-11 23:57:47 285

原创 Python 基础学习 --- Note 05 --- 元组(tuple)

NB: 元组的元素不能被修改1 创建元组1.1 创建空元组emptyTuple1 = tuple()emptyTuple2 = ()1.2 创建仅包含一个元素的元组' 注意有逗号 'oneElementTuple = (1, ) ' 如果没有逗号 'errorOneTuple = (1)print(errorOneTuple == 1) # True1.3 创建包含多个元素的元组normalTuple = (1, 2, 3, 'saxon')2. 获取元组的值 (切片同.

2020-08-10 19:25:32 93

原创 Python 基础学习 --- Note 04 --- 列表(list)

1. 创建列表1.1 创建空列表emptyList1 = list()emptyList2 = []1.2 创建有初始值的列表intList = [1, 2, 3, 4, 5]strList = ['a', 'b', 'c']tupleList = [(1, 2), (2, 3), (3, 3)]dictList = [{'you': 'perfect'}, {'saxon': 4.0, 'general': 3.99}]setList = [{1, 2}, {'a', 'b'}, {'

2020-08-10 18:10:39 201

原创 Python 基础学习 --- Note 03 --- 数据结构

数据结构 逻辑结构 线性结构(Array, LinkList, Stack, Queue) 非线性结构(Tree, Graph) 物理(存储)结构 顺序结构 链式结构 索引结构 散列结构 数据运算 插入 删除 修改 查找 排序 ...

2020-08-10 12:04:20 88

原创 Python 基础学习 --- Note 02 --- Type & 运算符

Note: No need to define data type in python!!!1. Test data type type()print(type('hello')) # stringprint(type(1)) # integerprint(type(2.2)) # floatprint(type(1 == 2)) # boolean2. Algorithm operator + - * / // % **2.1 floor division //: 向下取整3 // .

2020-08-08 19:17:29 140

原创 Python 基础学习 --- Note 01 --- 基础语法

非常尴尬有些部分用英文写的,现在就先这样吧,以后再改回来Lec01 - Basic grammar practice1. Run .py file (seems that can only be used in Jupyter Lab)%run + File Address%run ./hello.py (hello.py 是相同文件夹下的另一个文件)hello.py: print('hello world')# output: hello world2. printprint('h.

2020-08-08 18:56:46 203

原创 Ubuntu 云服务器更新Django项目

1、本地上传代码到git(除了settings类文件)2、服务器端拉取代码3、更新服务器# 查看 uwsgi 进程ps -ef|grep uwsgi# 关闭 uwsgi 进程killall -9 uwsgi# 启动 uwsgiuwsgi --ini uwsgi.ini# 重启 nginxnginx -s reload...

2020-07-15 23:02:07 110

原创 Vue lib (自己用的)

记录自己在vue道路上使用的库百度地图vue组件https://dafrok.github.io/vue-baidu-map/#/zh/start/base

2020-06-03 17:56:28 151

原创 git基本操作fetch master分支与push当前分支

切换到自己分支后的操作1. 拉取master到当前分支2. push代码到当前分支的码云2.1 暂存代码2.2 commit代码2.3 push到码云1. 拉取master到当前分支git fetch origin mastergit merge FETCH_HEAD2. push代码到当前分支的码云2.1 暂存代码git add -A (全部暂存)2.2 commit代码git ...

2020-04-27 17:03:09 762

原创 git分支操作 添加分支

没有顺序,大家需要哪个拿哪个1. git clone1.1 如果直接使用cmdgit clone 仓库地址 克隆目标路径1.2 如果直接在空文件夹打开git bash(不需要指定目标路径,会自动克隆到当前文件夹)git clone 仓库地址2. git 分支操作2.1 查看当前所在分支git branch2.2 切换分支git checkout 分支名2.3 添加...

2020-04-01 21:21:09 3870

factory.zip

自己用Django搭建的简易工厂记账项目(仅表格功能),前端用的INSPINIA2.9(不完全),完成了简易的前后端交互,有引入外部的时间插件。

2020-08-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除