01 2021 档案
摘要:axis的重点在于方向,而不是行和列。1表示横轴,方向从左到右;0表示纵轴,方向从上到下。(记忆:一横心) 当axis=1时,如果是求平均,那么是从左到右横向求平均;如果是拼接,那么也是左右横向拼接; 3.如果是drop列,那么也是横向发生变化,体现为列的减少。(有点难理解,删除math列,因为列减
阅读全文
摘要:发下这样没有实际用处,因为浏览器已经加载了js /** * 直接使用 */ var scripts = document.getElementsByTagName("script"); for (var i = 0; i < scripts.length; i++) { scripts[i].par
阅读全文
摘要:# 安装 pip install icecream # 使用 from icecream import ic # 可以配置函数 # import time # def unixTimestamp(): # return '%i |> ' % int(time.time()) # # ic.confi
阅读全文
摘要:import os def remove_filename(path_dir, start, end): files = [f for f in os.listdir(path_dir) if f.startswith(start) and f.endswith(end)] for file_nam
阅读全文
摘要:参考: # 安装 pip install djangorestframework pip install django-redis # 调试 http #官网教程1,pip install httpie 可以用来调试http https://blog.csdn.net/ppppfly/article
阅读全文
摘要:FBV # 1 def add_publisher(request): error_msg = "" # 如果是POST请求,我就取到用户填写的数据 if request.method == "POST": new_name = request.POST.get("publisher_name",
阅读全文
摘要:模板 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bootstrap 实例 - 模态框(Modal)插件</title> <link rel="stylesheet" href="http://cdn.static.runo
阅读全文
摘要:弹框模块内的submit不用绑定函数 form里面的input可以直接提交,textarea加上name属性也可以提交了 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>用户列表</title> <link href="http
阅读全文
摘要:弹框模块内的确定按钮不用绑定函数 // 触发按钮 <div class="am-btn-group am-btn-group-xs"> <button type="button" class="am-btn am-btn-default am-btn-xs am-text-secondary am-
阅读全文
摘要:from flask import Flask, request from flask.ext.restful import Api, Resource app = Flask(__name__) api = Api(app) USER_LIST = { '1': {'name':'Michael'
阅读全文
摘要:def is_hex(word): word= word.lower() for i in range(len(word)): if not( word[i].startswith('0x') or word[i].isdigit() or word[i] in ['a','b','c','d','
阅读全文
摘要:import platform os_platform = platform.platform() # Windows-10-10.0.18362-SP0
阅读全文
摘要:以下写法都可以 file = r'C:\config.yaml' file = 'C:\config.yaml' file = 'C:\\config.yaml' file = r'C:\\config.yaml' file = r'C:/config_auto_ui.yaml' file = 'C
阅读全文
摘要:基本命令 root@8a5fa5a8f6b8:/usr/bin# /usr/bin/mongo show dbs; use db_sys; show tables; db.users.find(); # select * from users ; https://www.cnblogs.com/Ta
阅读全文
摘要:# 进入容器 sudo docker exec -it 8a5fa5a8f6b8 /bin/bash https://www.cnblogs.com/xhyan/p/6593075.html # 获取 docker pull ubuntu
阅读全文
摘要:1.进程 守护进程随着主进程的代码结束而结束,注意是代码,主进程可能在等待其他的子进程 from multiprocessing import Process def func(): while True: time.sleep(0.2) print('OK') if __name=='__main
阅读全文
摘要:使用smb 下载文件 import smbclient # pip install smbprotocol import zlib import re import os smbclient.register_session("10.x.x.x", username="123", password=
阅读全文
摘要:yield():释放当前cpu的执行权 join():在线程a中调用 线程b的 b.join(),此时线程a就进入阻塞状态,直到线程b完全执行完以后,线程a才结束阻塞状态。 daemon = True 主进程退出了,还能继续运行 without join: + + + main-thread | |
阅读全文
摘要:https://www.crx4chrome.com/
阅读全文
摘要:from threading import Thread from threading import Event import time class ChildThread(Thread): myStopSignal = 0 def __init__(self, aStopSignal): Thre
阅读全文
浙公网安备 33010602011771号