会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
凯旋.Lau
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
14
下一页
2021年1月17日
python---复杂度、斐波那切数列、汉诺塔
摘要: 时间复杂度 用来估计算法运行时间的一个式子. 一般来说, 时间复杂度高的算法比复杂度低的算法慢. 常见的时间复杂度: O(1) < O(logn) < O(n) < O(nlogn) < O(n2) < O(n2logn) < O(n3) 快速判断时间复杂度 循环减半的过程 > O(
阅读全文
posted @ 2021-01-17 10:44 凯旋.Lau
阅读(209)
评论(0)
推荐(0)
2020年11月23日
python---导入模块和包
摘要: 导入模块和包 导入模块 import的过程中发生了哪些事情? 寻找模块 如果找到,开辟一块空间,执行这个模块 把这个模块中用到的名字都收录到开辟的空间中 创建一个变量来引用这个模块的空间 注意: 模块不会被重复导入 模块和文件之间的内存空间始终是隔离的 模块名字必须符合变量命名规范 模块之间不能循环
阅读全文
posted @ 2020-11-23 17:13 凯旋.Lau
阅读(91)
评论(0)
推荐(0)
python---logging模块
摘要: logging模块的使用 简单配置 import logging # 简单配置 logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s: %(me
阅读全文
posted @ 2020-11-23 14:27 凯旋.Lau
阅读(68)
评论(0)
推荐(0)
2020年11月10日
机器学习---kmeans聚类的python实现
摘要: """ Name: study_kmeans.py Author: KX-Lau Time: 2020/11/6 16:59 Desc: 实现kmeans聚类 """ import math import numpy as np import matplotlib.pyplot as plt fro
阅读全文
posted @ 2020-11-10 17:43 凯旋.Lau
阅读(267)
评论(0)
推荐(0)
NLP---word2vec的python实现
摘要: import logging from gensim.models import word2vec import multiprocessing # 配置日志 logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s'
阅读全文
posted @ 2020-11-10 17:42 凯旋.Lau
阅读(354)
评论(0)
推荐(0)
2020年11月7日
matplotlib---Annotation标注
摘要: import numpy as np import matplotlib.pyplot as plt x = np.linspace(-3, 3, 50) y = 2 * x + 1 plt.figure(figsize=(8, 5)) ax = plt.gca() ax.spines['right
阅读全文
posted @ 2020-11-07 16:43 凯旋.Lau
阅读(197)
评论(0)
推荐(0)
matplotlib---legend图例
摘要: import numpy as np import matplotlib.pyplot as plt x = np.linspace(-3, 3, 50) y1 = 2 * x + 1 y2 = x * x plt.figure(num=3, figsize=(8, 5)) # 设置范围 plt.x
阅读全文
posted @ 2020-11-07 16:39 凯旋.Lau
阅读(133)
评论(0)
推荐(0)
matplotlib---设置坐标轴
摘要: import matplotlib.pyplot as plt import numpy as np # 一维数组, 元素为从-3到3之间均匀地产生50个点 x = np.linspace(-3, 3, 50) y1 = 2 * x + 1 y2 = x ** 2 # num=3表示图片上方标题,
阅读全文
posted @ 2020-11-07 16:37 凯旋.Lau
阅读(2225)
评论(0)
推荐(0)
2020年10月14日
windows下右键新建md文件
摘要: windows下右键新建md文件 打开注册表 win键+R打开运行对话框, 输入regedit, 打开注册表编辑器. 修改注册表 在磁盘的任意位置新建一个文件, 后缀名为reg, 并写入一下内容 [HKEY_CLASSES_ROOT\.md] @="Typora.exe" [HKEY_CLASSES
阅读全文
posted @ 2020-10-14 13:10 凯旋.Lau
阅读(192)
评论(0)
推荐(0)
2020年9月25日
爬虫---scrapy分布式和增量式
摘要: 分布式 概念: 需要搭建一个分布式的机群, 然后在每一台电脑中执行同一组程序, 让其对某一网站的数据进行联合分布爬取. 原生的scrapy框架不能实现分布式的原因 调度器不能被共享, 管道也不能被共享. scrapy + scrapy-redis 可以实现分布式 scrapy-redis组件的作用:
阅读全文
posted @ 2020-09-25 11:23 凯旋.Lau
阅读(149)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
14
下一页
公告