08 2019 档案
摘要:1.锁 # ### 锁 from multiprocessing import Lock,Process import json,time """ # 创建一把锁 lock = Lock() # 上锁 lock.acquire() print(123) # 解锁 lock.release() """
阅读全文
摘要:1.停止gitlab服务 2.下载汉化安装包 3.拷贝汉化包到gitlab上面 4.启动gitlab服务
阅读全文
摘要:本次pinpoint安装使用了docker环境安装,需要预先docker运行环境 1.安装docker环境 2.获取pinpoint-docker,安装命令 链接https://github.com/naver/pinpoint-docker/blob/1.8.4/docker-compose.ym
阅读全文
摘要:1.粘包现象 总结 : 导致黏包现象的两种情况 hello,worl d (1) 在发送端,发送数据太快,频繁发送 (2) 在接收端,接收数据太慢,延迟截取 # ### 服务端 import socket sk = socket.socket() sk.bind( ("127.0.0.1",9000
阅读全文
摘要:1.常见默认nginx.conf配置日志格式 log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_use
阅读全文
摘要:1.携带目录调转到后端,后端无目录,location配置如下 例子: i2.jusdacfj.com/ideas_edi/——10.0.2.137:7040/10.0.2.138:7040 location ^~/ideas_edi/ { ##携带"/" proxy_pass http://edi1
阅读全文
摘要:1.需要安装stream模块2.在nginx.conf默认配置文件添加如下配置即可stream { log_format tcp '$remote_addr [$time_local] ' '$protocol $status $bytes_sent $bytes_received ' '$sess
阅读全文
摘要:1.引入模块报错 from collections import Iterator,Iterable 报错: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop worki
阅读全文
摘要:一、基础介绍 1、简介 一个基于GIT的源码托管解决方案 基于rubyonrails开发 集成了nginx postgreSQL redis sidekiq等组件 2、安装要求 2g内存以上,有点占内存,我的2g内存创建项目适合就报503错误,调大一点就正常了 这里使用centos7 64位 3、默认用户 root/...
阅读全文
摘要:1.匹配单个字符 # ### 正则表达式 - 单个字符匹配 import re ''' findall 把匹配的结果直接返回到列表中 lst = re.findall("正则表达式","要匹配的字符串") ''' # 预定义字符集 # (1) \d 匹配数字 lst = re.findall("\d
阅读全文
摘要:1.继承 1.1 单继承# ### 继承 """ (1) 单继承 (2) 多继承 至少2个类,子类和父类 一个类继承另外一个类,当前类是子类 (衍生类) 被继承的这个类是父类.(基类,超类) python 所有类的父类都是object """ # 1.子父继承后,子类可以使用父类的公有方法 clas
阅读全文
摘要:#!/usr/bin/env python #-*- coding:utf-8 -*- from email import encoders from email.header import Header from email.mime.text import MIMEText from email
阅读全文
摘要:def hebing(): ##合并所需行 file1path = 'Task_name.txt' file2path = 'Last_Run_Time.txt' file_1 = open(file1path,'r') file_2 = open(file2path,'r') list1 = [] for line in fil...
阅读全文
摘要:if TaskName: ##若是TaskName存在,进行其他的操作 file1 = open('Task_name.txt','a+') line1=line.split(':')[1].lstrip() #line1=line.split(':') file1.writelines(line1
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- import time import requests import json import os import traceback import logging class WeChat: def __init__(self): self.CORPID = 'ww750dfdfde43613c3' #企业
阅读全文
摘要:1.模块 1.1 pickle模块 # ### pickle 序列化模块 import pickle """ 序列化: 把不能够直接存储的数据变得可存储 反序列化: 把数据恢复成原本的数据格式 serialize 序列化 unserialize 反序列化 """ # 正常情况下,不能够直接把容器类型
阅读全文

浙公网安备 33010602011771号