会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Adamanter
冷灯看剑,剑上几番功名?炉香无须计苍生,纵一川烟逝,万丈云埋,孤阳还照古陵。
博客园
首页
联系
订阅
管理
上一页
1
2
3
4
5
6
···
17
下一页
2019年8月16日
md:markdown:基本操作
摘要: markdown的印象笔记效果图 标题(#+空格) 序号和星星 斜体/粗体/下划线/删除线/分割线/引用文本 添加待办事项 格式描述 插入链接 插入图片 表格 ##### table| 参数 |解释 |例子 || | | || cat | 输出文件内容 | cat test.txt || wc |
阅读全文
posted @ 2019-08-16 11:34 Adamanter
阅读(489)
评论(0)
推荐(0)
2019年6月19日
elk或者ELK初使用日志从安装到展示
摘要: 1 elk是什么 pass 2 使用docker-compose搭建elk系统的链接 github使用人数很多的连接地址:https://github.com/deviantony/docker-elk/ 3 发送的日志在logstash接收到必须是json 发送时可以logger.info("he
阅读全文
posted @ 2019-06-19 12:01 Adamanter
阅读(264)
评论(0)
推荐(0)
2019年6月11日
Linux防火墙
摘要: 1.查看防火墙状态 systemctl status firewalld firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running) 2.查看防火墙是否开机启动 systemctl is-enabled firewalld 3.关闭防火
阅读全文
posted @ 2019-06-11 17:57 Adamanter
阅读(106)
评论(0)
推荐(0)
检测TCP/UDP端口的连通性
摘要: 1 TCP端口的连通性 TC端口的连通性,一般通过telnet检测: TCP协议是面向连接的,可以直接通过telnet命令连接 yum install telnet -y telnet localhost 5001 或者有服务的curl curl -XGET localhost:5001 2 UDP
阅读全文
posted @ 2019-06-11 11:32 Adamanter
阅读(2734)
评论(0)
推荐(0)
2019年6月4日
ssh链接不断开
摘要: cd /etc/ssh # 查看sshd_config中关于客户端活动状态的配置 grep ClientAlive sshd_config # 默认配置如下 # ---------------------------- #ClientAliveInterval 0 #ClientAliveCountMax 3 # ---------------------------- # ClientAliv...
阅读全文
posted @ 2019-06-04 18:03 Adamanter
阅读(237)
评论(0)
推荐(0)
2019年4月24日
mongoengine.NotUniqueError
摘要: from mongoengine.errors import NotUniqueError try: pass # 保存字段到数据库 result = formalReturn(201, 'upload success', data=None) return jsonify(result), 201 except No...
阅读全文
posted @ 2019-04-24 11:44 Adamanter
阅读(357)
评论(0)
推荐(0)
2019年4月19日
docker es官方镜像 安装es使用
摘要: 官方镜像: docker pull docker.elastic.co/elasticsearch/elasticsearch:6.5.4 要设置/root/data/esdata可读写 docker run --name es_test_01 -p 9200:9200 -p 9300:9300 -
阅读全文
posted @ 2019-04-19 14:11 Adamanter
阅读(4812)
评论(0)
推荐(1)
2019年4月17日
centos安装python以及pip
摘要: 安装python以及包管理工具yum install python36yum install python36-pip
阅读全文
posted @ 2019-04-17 14:38 Adamanter
阅读(99)
评论(0)
推荐(0)
2019年4月13日
根据python字典的key的权重进行排序
摘要: # coding=utf-8 # 僵尸标签显示次序: # 性别:女士/男士 # 人种:白人/亚洲人/黑人/阿拉伯人 # 季节:春秋/夏季/冬季 # 场景:街头/都市(其它不显示) # 风格:预留(暂时没有) # 年龄组:儿童/老人(成人不显示) # 眼镜:太阳镜/眼镜(无不显示) # 人物:刘诗诗 # 秀场:2019秋冬高级成衣 # 品牌:Topshop Unique # 影视:知否(暂时没有...
阅读全文
posted @ 2019-04-13 18:08 Adamanter
阅读(656)
评论(0)
推荐(0)
async模块生产者消费者模型
摘要: # coding=utf-8 import asyncio async def consumer(n, q): print('consumer {}: starting'.format(n)) while True: print('consumer {}: waiting for item'.format(n)) item = await ...
阅读全文
posted @ 2019-04-13 18:01 Adamanter
阅读(932)
评论(0)
推荐(0)
async模块原始异步
摘要: # coding=utf-8 import asyncio import aiohttp async def myfunc(url): async with aiohttp.ClientSession() as session: payload = {'image_url': url} async with session.post('http:/...
阅读全文
posted @ 2019-04-13 17:54 Adamanter
阅读(194)
评论(0)
推荐(0)
根据url获取图片md5和format
摘要: url = "https://app-s3.aifashion.com/sssdska45565646.jpg" def get_hash_from_url(upload_url): format = upload_url.rsplit(".")[-1] s1 = upload_url.rsplit(".")[-2] md5 = s1.rsplit('/')[-1]...
阅读全文
posted @ 2019-04-13 17:53 Adamanter
阅读(995)
评论(0)
推荐(0)
DFA算法敏感词过滤
摘要: sensetive_words.txt
阅读全文
posted @ 2019-04-13 17:44 Adamanter
阅读(795)
评论(0)
推荐(0)
简单多进程(python3)
摘要: import time from multiprocessing import Pool from tqdm import tqdm # 简单多进程 def hello_world(name): time.sleep(1) sentence = "hello world " + name return '{}'.format(sentence) def main(...
阅读全文
posted @ 2019-04-13 17:38 Adamanter
阅读(160)
评论(0)
推荐(0)
order:对数据进行大写字母排序展示给前端
摘要: from xpinyin import Pinyin pin = Pinyin() from collections import OrderedDict def deal_conversion(tags): """ 将标签中的值得中文名处理为拼音,英文名不变 :param tags: :return: """ _tags = [] ...
阅读全文
posted @ 2019-04-13 17:29 Adamanter
阅读(431)
评论(0)
推荐(0)
ES-es-ElasticSearch:打破默认取回10条,scroll连续取回
摘要: import random import json import datetime import time from pymongo import MongoClient from pymongo import MongoClient, ASCENDING, UpdateOne, InsertOne, DeleteOne, ReplaceOne from pymongo.errors impor...
阅读全文
posted @ 2019-04-13 16:32 Adamanter
阅读(3568)
评论(0)
推荐(0)
1970年构造ObjectId()时间戳为负
摘要: import time import datetime from bson.objectid import ObjectId from collections import Iterator class MyIter(Iterator): def __next__(self): return ObjectId() published_at = datetime.da...
阅读全文
posted @ 2019-04-13 16:23 Adamanter
阅读(288)
评论(0)
推荐(0)
pymongo查询技巧
摘要: from pymongo import MongoClientmdb = MongoClient('120.xxx.xxx.xxx:20002', username='xxx', password='xxx')# 数据240万# no_cursor_timeout=True代表连接不中断,连续取#
阅读全文
posted @ 2019-04-13 16:12 Adamanter
阅读(1287)
评论(0)
推荐(0)
ES-es-ElasticSearch:python操作
摘要: es创建索引 es搜索 es类实现
阅读全文
posted @ 2019-04-13 15:52 Adamanter
阅读(655)
评论(0)
推荐(0)
python获取crc32
摘要: import zlib post_id = "65fe4882de661f4a6e25391c790b6b86" post_id_crc32= zlib.crc32(post_id.encode("utf-8")) print(post_id_crc32) # 3217366125
阅读全文
posted @ 2019-04-13 15:42 Adamanter
阅读(3160)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
17
下一页
公告