上一页 1 2 3 4 5 6 7 8 9 ··· 68 下一页
摘要: code >>> import sys >>> sys.version_info sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0) >>> 阅读全文
posted @ 2020-12-23 22:18 anobscureretreat 阅读(320) 评论(0) 推荐(0) 编辑
摘要: code pip3 install mitmproxy 阅读全文
posted @ 2020-12-23 22:16 anobscureretreat 阅读(80) 评论(0) 推荐(0) 编辑
摘要: os.remove() 方法用于删除指定路径的文件。如果指定的路径是一个目录,将抛出OSError。 code #!/usr/bin/python3 import os, sys # 列出目录 print ("目录为: %s" %os.listdir(os.getcwd())) # 移除 os.re 阅读全文
posted @ 2020-12-23 22:15 anobscureretreat 阅读(230) 评论(0) 推荐(0) 编辑
摘要: os.rename() 方法用于命名文件或目录,从 src 到 dst,如果dst是一个存在的目录, 将抛出OSError。 code #!/usr/bin/python3 import os, sys # 列出目录 print ("目录为: %s"%os.listdir(os.getcwd())) 阅读全文
posted @ 2020-12-23 22:13 anobscureretreat 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Code import unittest class SimplisticTest(unittest.TestCase): def test(self): a = 'a' b = 'a' self.assertEqual(a, b) Output macname@MacdeMacBook-Pro c 阅读全文
posted @ 2020-12-23 22:10 anobscureretreat 阅读(116) 评论(0) 推荐(0) 编辑
摘要: client.py from socket import * import os def main(): # 建立套接字 tcp_socket = socket(AF_INET, SOCK_STREAM) # 接收用输入的服务器端的ip和端口 tcp_ip = input("请输入ip:") tcp 阅读全文
posted @ 2020-12-23 22:06 anobscureretreat 阅读(282) 评论(0) 推荐(0) 编辑
摘要: code #coding=utf-8 import os import random import time def test(book_type,book_id): #获取指定长度的随机数字 #支持16进制数的最大的长度为9 random_str_length=random.randint(3,6 阅读全文
posted @ 2020-12-23 22:01 anobscureretreat 阅读(128) 评论(0) 推荐(0) 编辑
摘要: code Traceback (most recent call last): File "test.py", line 190, in <module> cursor.execute(sql) sqlite3.OperationalError: near "s": syntax error cod 阅读全文
posted @ 2020-12-23 21:57 anobscureretreat 阅读(1223) 评论(0) 推荐(0) 编辑
摘要: code import sys,os sys.path.append("/".join(os.path.dirname(os.path.abspath(__file__)).split("/")[:-1])+'/lib') from selenium import webdriver import 阅读全文
posted @ 2020-12-23 21:55 anobscureretreat 阅读(91) 评论(0) 推荐(0) 编辑
摘要: code import sys,os sys.path.append("/".join(os.path.dirname(os.path.abspath(__file__)).split("/")[:-1])+'/lib') from selenium import webdriver import 阅读全文
posted @ 2020-12-23 21:51 anobscureretreat 阅读(104) 评论(0) 推荐(0) 编辑
摘要: code import sys,os sys.path.append("/".join(os.path.dirname(os.path.abspath(__file__)).split("/")[:-1])+'/lib') from selenium import webdriver import 阅读全文
posted @ 2020-12-23 21:50 anobscureretreat 阅读(69) 评论(0) 推荐(0) 编辑
摘要: code #!/usr/bin/python3 import smtplib from email.mime.text import MIMEText from email.header import Header from email.mime.multipart import MIMEMulti 阅读全文
posted @ 2020-12-23 21:47 anobscureretreat 阅读(450) 评论(0) 推荐(0) 编辑
摘要: code #!/usr/bin/python3 import smtplib from email.mime.text import MIMEText from email.header import Header # 第三方 SMTP 服务 mail_host="smtp.mxhichina.co 阅读全文
posted @ 2020-12-23 21:41 anobscureretreat 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 问题描述: 在阿里云的自带centos上运行python manage.py runserver的时候报错: django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17). 阅读全文
posted @ 2020-12-23 21:38 anobscureretreat 阅读(74) 评论(0) 推荐(0) 编辑
摘要: code from selenium.webdriver.common.action_chains import ActionChains from selenium import webdriver driver = webdriver.Chrome() asleep(driver) driver 阅读全文
posted @ 2020-12-23 21:36 anobscureretreat 阅读(129) 评论(0) 推荐(0) 编辑
摘要: code from selenium.webdriver.common.action_chains import ActionChains from selenium import webdriver driver = webdriver.Chrome() asleep(driver) driver 阅读全文
posted @ 2020-12-23 21:35 anobscureretreat 阅读(1078) 评论(0) 推荐(0) 编辑
摘要: code import sys,os sys.path.append("/".join(os.path.dirname(os.path.abspath(__file__)).split("/")[:-1])+'/lib') from selenium import webdriver import 阅读全文
posted @ 2020-12-23 21:17 anobscureretreat 阅读(306) 评论(0) 推荐(0) 编辑
摘要: code pip3 install lxml 阅读全文
posted @ 2020-12-23 21:14 anobscureretreat 阅读(118) 评论(0) 推荐(0) 编辑
摘要: code #安装pipenv pip3 install pipenv #安装虚拟环境 pipenv install #进入虚拟环境 pipenv shell #查看当前环境依赖 pip3 list #安装包 pipenv install flask #卸载包 pipenv uninstall fla 阅读全文
posted @ 2020-12-23 21:12 anobscureretreat 阅读(210) 评论(0) 推荐(0) 编辑
摘要: code python -V pip -V 阅读全文
posted @ 2020-12-23 21:11 anobscureretreat 阅读(256) 评论(0) 推荐(0) 编辑
摘要: python socket 实现点对点聊天,包括文字,语音,无声视频 client #!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : newclient.py @Time : 2020/01/13 14:17:16 @Author 阅读全文
posted @ 2020-12-23 21:09 anobscureretreat 阅读(92) 评论(0) 推荐(0) 编辑
摘要: code class ListNode: def __init__(self,x): self.val=x self.next=None def listToListNode(input): # Generate list from the input numbers = [int(x) for x 阅读全文
posted @ 2020-12-23 21:07 anobscureretreat 阅读(437) 评论(0) 推荐(0) 编辑
摘要: code pytest pytest_lean2.py -o log_cli=true -o log_cli_level=INFO 阅读全文
posted @ 2020-12-23 21:05 anobscureretreat 阅读(129) 评论(0) 推荐(0) 编辑
摘要: code import sqlite3 cx = sqlite3.connect("/Users/macname/Downloads/temp/ibook/db.sqlite3") if(cx): print("success") for i in range(1,70): cx.execute(" 阅读全文
posted @ 2020-12-23 21:03 anobscureretreat 阅读(647) 评论(0) 推荐(0) 编辑
摘要: code open -a Google\ Chrome 阅读全文
posted @ 2020-12-23 21:00 anobscureretreat 阅读(1494) 评论(0) 推荐(0) 编辑
摘要: code from flask import Flask, send_from_directory import os cur_dir=os.path.dirname(__file__) app = Flask(__name__) @app.route("/download") def index( 阅读全文
posted @ 2020-12-23 19:12 anobscureretreat 阅读(451) 评论(0) 推荐(0) 编辑
摘要: code http://www.htmleaf.com/js/jquery/jquery-1.9.1.html 阅读全文
posted @ 2020-12-23 16:39 anobscureretreat 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Index.html <!DOCTYPE html> <html> <head> <link href="/static/css/style.css" rel="stylesheet"> <script src="http://code.jquery.com/jquery-2.0.3.min.js" 阅读全文
posted @ 2020-12-23 16:37 anobscureretreat 阅读(94) 评论(0) 推荐(0) 编辑
摘要: index.html <!DOCTYPE html> <html> <head> <link href="/static/css/style.css" rel="stylesheet"> <script src="https://cdnjs.cloudflare.com/ajax/libs/reac 阅读全文
posted @ 2020-12-23 16:35 anobscureretreat 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 接收json class Root(object): @cherrypy.expose @cherrypy.tools.json_in() def index(self): data = cherrypy.request.json print(data) 返回json import cherrypy 阅读全文
posted @ 2020-12-23 16:32 anobscureretreat 阅读(202) 评论(0) 推荐(0) 编辑
摘要: code import cherrypy class MyCookieApp(object): @cherrypy.expose def set(self): cookie = cherrypy.response.cookie cookie['cookieName'] = 'cookieValue' 阅读全文
posted @ 2020-12-23 16:31 anobscureretreat 阅读(118) 评论(0) 推荐(0) 编辑
摘要: code cherrypy.log("hello there") test.py import logging import logging.config import cherrypy logger = logging.getLogger() db_logger = logging.getLogg 阅读全文
posted @ 2020-12-23 16:24 anobscureretreat 阅读(182) 评论(0) 推荐(0) 编辑
摘要: tut12.py import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return "Hello world!" @cherrypy. 阅读全文
posted @ 2020-12-23 16:20 anobscureretreat 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 目录结构 index.html <!DOCTYPE html> <html> <head> <link href="/static/css/style.css" rel="stylesheet"> <script src="http://code.jquery.com/jquery-2.0.3.mi 阅读全文
posted @ 2020-12-23 16:16 anobscureretreat 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 目录结构 code import os, os.path import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return """<h 阅读全文
posted @ 2020-12-23 16:10 anobscureretreat 阅读(74) 评论(0) 推荐(0) 编辑
摘要: This is why /static/css/style.css is found in public/css/style.css code import os, os.path import random import string import cherrypy class StringGen 阅读全文
posted @ 2020-12-23 16:08 anobscureretreat 阅读(148) 评论(0) 推荐(0) 编辑
摘要: code import random import string import cherrypy @cherrypy.expose class StringGeneratorWebService(object): @cherrypy.tools.accept(media='text/plain') 阅读全文
posted @ 2020-12-23 15:59 anobscureretreat 阅读(150) 评论(0) 推荐(0) 编辑
摘要: code import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return """<html> <head></head> <body 阅读全文
posted @ 2020-12-23 15:55 anobscureretreat 阅读(119) 评论(0) 推荐(0) 编辑
摘要: code import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return """<html> <head></head> <body 阅读全文
posted @ 2020-12-23 15:53 anobscureretreat 阅读(96) 评论(0) 推荐(0) 编辑
摘要: code import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return "Hello world!" @cherrypy.expo 阅读全文
posted @ 2020-12-23 15:51 anobscureretreat 阅读(131) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 68 下一页