07 2022 档案
摘要:#!/usr/bin/env python # -*- coding:utf-8 -*- import cv2 class SlideCrack(object): def __init__(self, gap, bg): """ init code :param gap: 缺口图片 :param b
阅读全文
摘要:# -*- coding: utf-8 -*- import io import json from pathlib import Path from PIL import Image import base64 import cv2 import time import requests sess
阅读全文
摘要:def sync_goods_producer(path): # doc_data = pandas.read_excel(path, skiprows=44, engine='xlrd') doc_data = pandas.read_excel(path,engine='xlrd') doc_d
阅读全文
摘要:import xlwt import pymongo import pandas as pd import xlsxwriter as xw # 连接mongodb数据库 client = pymongo.MongoClient("localhost") # 连接数据库 db = client["D
阅读全文
摘要:enumerate()是python的内置函数、适用于python2.x和python3.x enumerate在字典上是枚举、列举的意思 enumerate参数为可遍历/可迭代的对象(如列表、字符串) enumerate多用于在for循环中得到计数,利用它可以同时获得索引和值,即需要index和v
阅读全文
摘要:{ "_id" : ObjectId("5e908fa139cfeaaf0b97b57b"), "Name" : "Chris", "Age" : 21 } { "_id" : ObjectId("5e908fa939cfeaaf0b97b57c"), "Name" : "David", "Age"
阅读全文
摘要:###案例1 item1 = {} gender_areas = [] for ge in gender: # 男性 man = ge.split(":")[0].strip() or '' # print("man",man) # 男性比例 man_percent = ge.split(":")[
阅读全文
摘要:###1.插入数据 1. >>> import redis 2. 3. >>> conn = redis.Redis(host='192.168.8.176',port=6379) 4. 5. >>> pipe = conn.pipeline() 6. 7. >>> pipe.hset("hash_
阅读全文