原创 RocketMQ的簡介

 1.1: RocketMQ 的好處 1、 先進先出的數據結構 2、 應用解耦: 高內聚, 低耦合 3、 峯值的削峯 4、 數據的分發    接入MQ的流程, 不再是原來的同步了, 而是異步操作

原创 python 簡單的生產者和消費者模型

# !/usr/bin/env Python3 # -*- coding: utf-8 -*- # @Author : zsc # @FILE : 簡單的隊列的生產者和消費者.py # @Time : 2020/7/

原创 xlwt 模塊操作 excel表格, 填充顏色

# 1、xlwt 模塊的初級使用 import xlwt # 創建一個workbook 設置編碼 workbook = xlwt.Workbook(encoding='utf-8') # 創建一個worksheet# 創建一個workb

原创 pandas 中reindex的使用

pandas中的reindex方法可以爲series和dataframe添加或者刪除索引。 方法:serise.reindex()、dataframe.reindex() 如果新添加的索引沒有對應的值,則默認爲nan。如果減少索引,就相

原创 多進程簡單使用

 多進程map函數: import time import multiprocessing # 使用多進程移動文件 def move(each_img): print(each_img) time.sleep(1)

原创 git 基於某個分支進行創建

1、拷貝源代碼 git clone git@git地址  cd 項目目錄 2、根據已有分支創建新的分支 git checkout -b yourbranchname origin/oldbranchname 3、推送到git g

原创 爬蟲 cookie的時效性

# -*- coding: utf-8 -*- """ 加載cookies文件,使用requests庫爬取數據並動態更新cookies,可以使cookies不失效 """ import pickle import time impo

原创 APScheduler 定時任務框架

APScheduler是一個 Python 定時任務框架,提供了基於日期、固定時間間隔以及 crontab 類型的任務,並且可以持久化任務、並以 daemon 方式運行應用。 安裝: $ pip install apscheduler

原创 git 代碼提交---多人開發同一個分支

本地修改 git stash 暫存 git pull origin branchname git stash pop 暫存內容恢復 # 有可能修改衝突 git add . git commit -m "" git push origi

原创 最新的chromedriver

ChromeDriver Version    Chrome Version 78.0.3904.11    78 77.0.3865.40    77 77.0.3865.10    77 76.0.3809.126    76 76.

原创 ubantu apt 更新異常APT::Update::Post-Invoke-Success

ubantu apt 更新異常APT::Update::Post-Invoke-Success   Ubuntu 16.04出現:Problem executing scripts APT::Update::Post-Invoke-Su

原创 pandas之DataFrame取行列(df.loc(),df.iloc())以及索引

import pandas as pd import numpy as np df = pd.DataFrame(np.arange(24).reshape(6,4),index=list("ABCDEF"),columns=list(

原创 linux下更新apt-get源

使用阿里雲的開源鏡像 https://opsx.alibaba.com/mirror  找到ubuntu 在ubuntu下執行命令 sudo mv /etc/apt/sources.list /etc/apt/sources.list_

原创 pandas 讀取redis

# !/usr/bin/env Python3 # -*- coding: utf-8 -*- # @Author : zsc # @FILE : redis獲取.py # @Time : 2020/6/11 12:

原创 簡單的日誌應用

import logging from logging import handlers class Logger(object): # 日誌級別關係映射 level_relations = { 'de