摘要: pip config set global.index-url https://mirrors.aliyun.com/pypi/simple 使用django 创建虚拟环境, 在创建的环境下下载django 创建项目(这里需要理解的是,我们只要在之前的虚拟环境下(这里为test),那么 就可以在任何 阅读全文
posted @ 2020-04-13 12:10 记得喝牛奶 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 股票数据地址:https://cn.investing.com/equities/moutai-historical-data 一.需要计算的 最大回撤率:亏损比率,评估风险 字符串转化为时间: pendulum库(字符串转时间,换算成周几) 实现代码: import requests import 阅读全文
posted @ 2020-04-11 11:26 记得喝牛奶 阅读(302) 评论(2) 推荐(0) 编辑
摘要: 一.HTTP协议基础: GET:本地有的话就不再去请求,常用于不怎么变化的界面以及请求不敏感的信息 POST:重复提交会有问题 https相比http更安全 二.抓包分析 添加header可以“伪装”自己为浏览器 使用cookie让自己登录 使用session可以保持会话信息(登录之后,保持登录状态 阅读全文
posted @ 2020-04-10 15:02 记得喝牛奶 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 一.函数定义 ''' 普通函数 ''' def func(a,b,c): print(a) print(b) print(c) func(12,c=25,b=50)#位置参数必须在关键字参数前面 print(' ') ''' 函数可带默认参数 ''' def func1(d,e=10):#默认参数 阅读全文
posted @ 2020-04-08 17:30 记得喝牛奶 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 一.基本语法包括练习题 x=(int)(input('输入:'))#默认为字符串 print('数字为:',x+3,end='') print(' hello') x=0 #格式化 a=25.2556 b='中国人' a=round(a,2) print('今年{}岁,我是{}'.format(a, 阅读全文
posted @ 2020-04-08 12:10 记得喝牛奶 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 封装与隐藏: 封装主要通过限定词实现: 比如,对于类中的某个变量不允许用户直接使用,而是需要通过调用方法赋值,因为有些限制(比如年龄不能为负数) public class test{ public static void main(String[] args) { man m=new man(); 阅读全文
posted @ 2020-04-07 14:22 记得喝牛奶 阅读(113) 评论(0) 推荐(0) 编辑
摘要: void SIR(ALGraph* G,int a,double inf,double rec,char* str) //传入的分别为网络,感染节点,感染率,恢复率,写入的文件 { double rate;//传入节点作为感染节点的感染规模 int infTatal=1;//感染节点总数 int I 阅读全文
posted @ 2020-04-04 12:28 记得喝牛奶 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 参考SIR模型原理: ①https://blog.csdn.net/Feng512275/article/details/82859526/ ②https://zhuanlan.zhihu.com/p/104072104?app=zhihulite 代码参考: https://github.com/ 阅读全文
posted @ 2020-03-28 18:08 记得喝牛奶 阅读(2212) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> int main() { char a[11]="hfjs"; char b[6]="ahnbl";//字符串末尾要放个'\0',所以真正的元素只能写5个 int i; printf("数 阅读全文
posted @ 2020-03-26 14:28 记得喝牛奶 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 一.面向对象的使用步骤: ①创建类 ②类的实例化 ③通过对象调用类的结构:对象.属性、对象.方法 二.面向对象的内存结构: 最主要的就是对象(包含类中的属性)在堆里,变量(包括局部变量)在栈里。栈里面的不同变量指向不同的对象。 JVM(JAVAZ虚拟机)中是运行的时候才加载到内存中(才有堆,栈什么的 阅读全文
posted @ 2020-03-26 10:58 记得喝牛奶 阅读(101) 评论(0) 推荐(0) 编辑