摘要:
# coding=utf-8 # 僵尸标签显示次序: # 性别:女士/男士 # 人种:白人/亚洲人/黑人/阿拉伯人 # 季节:春秋/夏季/冬季 # 场景:街头/都市(其它不显示) # 风格:预留(暂时没有) # 年龄组:儿童/老人(成人不显示) # 眼镜:太阳镜/眼镜(无不显示) # 人物:刘诗诗 # 秀场:2019秋冬高级成衣 # 品牌:Topshop Unique # 影视:知否(暂时没有... 阅读全文
摘要:
# 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 ... 阅读全文
摘要:
# 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:/... 阅读全文
摘要:
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]... 阅读全文
摘要:
sensetive_words.txt 阅读全文
摘要:
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(... 阅读全文
摘要:
from xpinyin import Pinyin pin = Pinyin() from collections import OrderedDict def deal_conversion(tags): """ 将标签中的值得中文名处理为拼音,英文名不变 :param tags: :return: """ _tags = [] ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
from pymongo import MongoClientmdb = MongoClient('120.xxx.xxx.xxx:20002', username='xxx', password='xxx')# 数据240万# no_cursor_timeout=True代表连接不中断,连续取# 阅读全文
摘要:
es创建索引 es搜索 es类实现 阅读全文
摘要:
import zlib post_id = "65fe4882de661f4a6e25391c790b6b86" post_id_crc32= zlib.crc32(post_id.encode("utf-8")) print(post_id_crc32) # 3217366125 阅读全文
摘要:
# coding=utf-8 import os import json import connexion from flask import jsonify app = connexion.FlaskApp(__name__, specification_dir='.') application = app.app # 测试配置 # application.config['SQLA... 阅读全文
摘要:
# python3.6# coding=utf-8words = "\u9a8c\u8bc1\u7801\u68c0\u67e5\u6210\u529f"print(words, type(words))# 验证码检查成功 <class 'str'>words = b"\u9a8c\u8bc1\u7 阅读全文