上一页 1 2 3 4 5 6 ··· 14 下一页
摘要: class Student(): # 添加数据 (在原有的基础上添加, 不覆盖以前的数据) def add_data(self, **kwargs): f = open("data", "a") f.write(str(kwargs) + "\n") f.close() # 覆盖以前的数据 def edit_da... 阅读全文
posted @ 2018-11-25 18:51 Bob__Zhang 阅读(268) 评论(0) 推荐(0) 编辑
摘要: #coding=utf-8 import smtplib from email.header import Header from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.image import MIMEImage class Send_Em... 阅读全文
posted @ 2018-11-25 15:30 Bob__Zhang 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 高级查询 子条件查询 _score: 标记匹配程度, 旨在判断目标文档和查询条件匹配的有多好POST http://127.0.0.1:9200/book/_search{ "query": { "match": { "title": "ElasticSearch入门" } }}模糊匹配: 会把包含 阅读全文
posted @ 2018-10-21 20:24 Bob__Zhang 阅读(144) 评论(0) 推荐(0) 编辑
摘要: ElasticSearch 基础 索引创建 1. RESTFUL APIAPI 基本格式: http://<ip>:<port>/<索引>/<类型>/<文档id>常用的HTTP动词: GET/PUT/POST/DELETE2. PUT 127.0.0.1:9200/peoplejson结构:{ "s 阅读全文
posted @ 2018-10-21 19:42 Bob__Zhang 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Linux文件管理 pwd 查看当前目录路径. 当前目录.. 上层目录ls 查看当前目录下的文件ls -la 查看当前目录下的隐藏文件touch 文件名 创建文件rm 删除文件mv 被移动的文件 移动到的目录 移动文件mv 被修改的文件名 新的文件名 重命名文件mv 被移动和修改的文件名 移动到的目 阅读全文
posted @ 2018-08-27 22:52 Bob__Zhang 阅读(504) 评论(0) 推荐(0) 编辑
摘要: mongodb 基本操作创建数据库 use 数据库名查看数据库 show dbs统计数据库信息 db.stats()删除当前数据库 db.dropDatabase()查看当前数据库下的集合名称 db.getCollectionNames()查看数据库用户角色权限 show roles基操插入文档 d 阅读全文
posted @ 2018-08-14 23:13 Bob__Zhang 阅读(263) 评论(0) 推荐(0) 编辑
摘要: mysql 相关函数 数学函数 绝对值函数 abs()圆周率函数 PI()开平方根函数 sqrt()求余函数 mod(x, y) 返回x除以y的余数获取整数的函数 ceil(x), ceiling(x), 向上取整, floor(x) 向下取整获取随机数的函数 rand(), 产生0-1之间的随机小 阅读全文
posted @ 2018-08-11 09:55 Bob__Zhang 阅读(1047) 评论(0) 推荐(0) 编辑
摘要: from pandas import Series, DataFrame, Index import numpy as np # 层次化索引 对数据重塑和分组操作很有用 data = Series(np.random.randn(10), index=[['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'd', 'd'], ... 阅读全文
posted @ 2018-08-10 00:40 Bob__Zhang 阅读(153) 评论(0) 推荐(0) 编辑
摘要: from pandas import Series, DataFrame, Index import numpy as np from numpy import nan as NA obj = Series(range(3), index=['a', 'b', 'c']) print(obj) index = obj.index print(index) print(index[1:]) # ... 阅读全文
posted @ 2018-08-10 00:38 Bob__Zhang 阅读(172) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd import numpy as np # 自动创建索引 obj = pd.Series([4, 7, -5, 2]) print(obj, type(obj)) print(obj.values) print(obj.index) # 自己创建索引 obj2 = pd.Series([2, 5, -32, 3], index=['a', 'b', 'c'... 阅读全文
posted @ 2018-08-10 00:36 Bob__Zhang 阅读(186) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 14 下一页