上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 38 下一页
摘要: 一. subprocess输出shell命令的值 方法1: #!/usr/bin/python3 # -*- coding: utf-8 -*- import os import subprocess # 与在命令窗口执行显示效果相同,如有彩色输出可保留,但不能返回结果 def run(comman 阅读全文
posted @ 2021-05-18 14:44 坚强的小蚂蚁 阅读(1371) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/xibuhaohao/p/10192052.html Django 从后台往前台传递数据时有多种方法可以实现。 最简单的后台是这样的: from django.shortcuts import render def main_page(request) 阅读全文
posted @ 2021-05-17 09:45 坚强的小蚂蚁 阅读(403) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/sui776265233/p/9636008.html 阅读目录 一、什么是Ajax 二、基于Jquery的Ajax实现方法 三、AJAX应用 四、文件上传 五、Ajax提交Json格式的数据 六、Django内置的serializers(把对象序列化 阅读全文
posted @ 2021-05-10 10:05 坚强的小蚂蚁 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 使用云服务器git clone某个项目时,遇到如下问题: fatal: Out of memory, malloc failed (tried to allocate 2000000000 bytes) 百度后找到如下解决方法: sudo mkdir -p /opt/temp sudo dd if= 阅读全文
posted @ 2021-05-07 12:23 坚强的小蚂蚁 阅读(666) 评论(0) 推荐(0) 编辑
摘要: 目标:导入networksolution域名下载的csv文件, 这个脚本文件要放在和manage.py同级目录下 import os, random, string, csv from datetime import datetime import pytz os.environ.setdefaul 阅读全文
posted @ 2021-04-29 15:11 坚强的小蚂蚁 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 查看一个域名的txt记录,其中_acme-challenge为主机记录,iot.inhandnetworks.com为域名 dig -t txt _acme-challenge.iot.inhandnetworks.com 阿里云申请免费域名时如果是www开头的域名,默认会把www省略 域名解析有许 阅读全文
posted @ 2021-04-26 16:04 坚强的小蚂蚁 阅读(359) 评论(0) 推荐(0) 编辑
摘要: url url(r'^grid/$', ChartView.as_view(), name='grid'), url(r'domain_overview/$', domain_overview), views from django.http import HttpResponse from pye 阅读全文
posted @ 2021-04-25 11:21 坚强的小蚂蚁 阅读(484) 评论(0) 推荐(0) 编辑
摘要: 方法1: import subprocess x = subprocess.check_output("docker ps | grep wget | awk -F '[ ]+' '{print $NF}' ", shell=True) #data = x.communicate() print(x 阅读全文
posted @ 2021-04-13 17:35 坚强的小蚂蚁 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 参考: https://blog.csdn.net/shadow_zed/article/details/109030821 显示命令的绝对路径(cmd) ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%cpu | head 只想看命令名字而不是命令的绝对路径(comm 阅读全文
posted @ 2021-04-13 11:09 坚强的小蚂蚁 阅读(635) 评论(0) 推荐(0) 编辑
摘要: 一个zabbix监控脚本 #!/bin/python3 # coding = utf-8 import time import os # 获得最新的报表 dir = "/mnt/elements/GEReports/zip/" file_lists = os.listdir(dir) file_li 阅读全文
posted @ 2021-04-12 14:53 坚强的小蚂蚁 阅读(95) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 38 下一页