python 串行执行和并行执行实例


Posted in Python onApril 30, 2020

我就废话不多说了,大家还是直接看代码吧!

#coding=utf-8
 
import threading
 
import time
 
import cx_Oracle
 
from pprint import pprint
 
import csv
 
print time.asctime()
 
table_name = "dbtest.csv"
 
f = open(table_name + ".csv", "w")
 
conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
cursor = conn.cursor()
 
def query01():
 
  tname = threading.current_thread()
 
  aa=10
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
def query02():
 
  tname = threading.current_thread()
 
  aa=20
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
def query03():
 
  tname = threading.current_thread()
 
  aa=30
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
def query04():
 
  tname = threading.current_thread()
 
  aa=40
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
def query05():
 
  tname = threading.current_thread()
 
  aa=50
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
def query06():
 
  tname = threading.current_thread()
 
  aa=60
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
def query07():
 
  tname = threading.current_thread()
 
  aa=70
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  return row
 
  cursor.close()
 
def query08():
 
  tname = threading.current_thread()
 
  aa=80
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
def query09():
 
  tname = threading.current_thread()
 
  aa=90
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
def query10():
 
  tname = threading.current_thread()
 
  aa=100
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close() 
 
 
threads = []
 
t1 = threading.Thread(target=query01, name='query01')
 
threads.append(t1)
 
t2 = threading.Thread(target=query02, name='query02')
 
threads.append(t2)
 
t2 = threading.Thread(target=query03, name='query03')
 
threads.append(t2)
 
t2 = threading.Thread(target=query04, name='query04')
 
threads.append(t2)
 
t2 = threading.Thread(target=query05, name='query05')
 
threads.append(t2)
 
t2 = threading.Thread(target=query06, name='query06')
 
threads.append(t2)
 
t2 = threading.Thread(target=query07, name='query07')
 
threads.append(t2)
 
t2 = threading.Thread(target=query08, name='query08')
 
threads.append(t2)
 
t2 = threading.Thread(target=query09, name='query09')
 
threads.append(t2)
 
t2 = threading.Thread(target=query10, name='query10')
 
threads.append(t2) 
 
if __name__ == '__main__':
 
  for t in threads:
 
    # t.setDaemon(True)
 
    t.start()
 
    # t.run()
 
    # t.start()
 
    # print '3333333'
 
    print threading.current_thread()
 
    # print t.is_alive()
 
    # print '3333333'
 
    t.join()
 
  print "all over "
 
  print time.asctime() 
 
 
C:\Python27\python.exe C:/Users/tlcb/PycharmProjects/untitled/a2.py
 
Wed Mar 28 11:08:19 2018
 
<_MainThread(MainThread, started 18744)>
 
[(10, '10boobook10', '10aaaaaaaaaaaa10', '10bbbbbbbbbbbbbbbbb10'), (10, '10sssssssss10', 'tlcb', 'tlcb'), (10, '10boobook10', '10aaaaaaaaaaaa10', '10bbbbbbbbbbbbbbbbb10')]
 
<_MainThread(MainThread, started 18744)>
 
[(20, '20boobook20', '20aaaaaaaaaaaa20', '20bbbbbbbbbbbbbbbbb20'), (20, '20boobook20', '20aaaaaaaaaaaa20', '20bbbbbbbbbbbbbbbbb20'), (20, '20boobook20', '20aaaaaaaaaaaa20', '20bbbbbbbbbbbbbbbbb20')]
 
<_MainThread(MainThread, started 18744)>
 
[(30, '30boobook30', '30aaaaaaaaaaaa30', '30bbbbbbbbbbbbbbbbb30'), (30, '30boobook30', '30aaaaaaaaaaaa30', '30bbbbbbbbbbbbbbbbb30'), (30, '30boobook30', '30aaaaaaaaaaaa30', '30bbbbbbbbbbbbbbbbb30')]
 
<_MainThread(MainThread, started 18744)>
 
[(40, '40boobook40', '40aaaaaaaaaaaa40', '40bbbbbbbbbbbbbbbbb40'), (40, '40boobook40', '40aaaaaaaaaaaa40', '40bbbbbbbbbbbbbbbbb40'), (40, '40boobook40', '40aaaaaaaaaaaa40', '40bbbbbbbbbbbbbbbbb40')]
 
<_MainThread(MainThread, started 18744)>
 
[(50, '50boobook50', '50aaaaaaaaaaaa50', '50bbbbbbbbbbbbbbbbb50'), (50, '50boobook50', '50aaaaaaaaaaaa50', '50bbbbbbbbbbbbbbbbb50'), (50, '50boobook50', '50aaaaaaaaaaaa50', '50bbbbbbbbbbbbbbbbb50')]
 
<_MainThread(MainThread, started 18744)>
 
[(60, '60boobook60', '60aaaaaaaaaaaa60', '60bbbbbbbbbbbbbbbbb60'), (60, '60boobook60', '60aaaaaaaaaaaa60', '60bbbbbbbbbbbbbbbbb60'), (60, '60boobook60', '60aaaaaaaaaaaa60', '60bbbbbbbbbbbbbbbbb60')]
 
<_MainThread(MainThread, started 18744)>
 
<_MainThread(MainThread, started 18744)>
 
[(80, '80boobook80', '80aaaaaaaaaaaa80', '80bbbbbbbbbbbbbbbbb80'), (80, '80boobook80', '80aaaaaaaaaaaa80', '80bbbbbbbbbbbbbbbbb80'), (80, '80boobook80', '80aaaaaaaaaaaa80', '80bbbbbbbbbbbbbbbbb80')]
 
<_MainThread(MainThread, started 18744)>
 
[(90, '90boobook90', '90aaaaaaaaaaaa90', '90bbbbbbbbbbbbbbbbb90'), (90, '90boobook90', '90aaaaaaaaaaaa90', '90bbbbbbbbbbbbbbbbb90'), (90, '90boobook90', '90aaaaaaaaaaaa90', '90bbbbbbbbbbbbbbbbb90')]
 
<_MainThread(MainThread, started 18744)>
 
[(100, '100boobook100', '100aaaaaaaaaaaa100', '100bbbbbbbbbbbbbbbbb100'), (100, '100boobook100', '100aaaaaaaaaaaa100', '100bbbbbbbbbbbbbbbbb100'), (100, '100boobook100', '100aaaaaaaaaaaa100', '100bbbbbbbbbbbbbbbbb100')]
 
all over 
 
Wed Mar 28 11:08:34 2018 
 
Process finished with exit code 0 
 
 
这个时候是串行 花费了15秒 
 
 
多线程跑:
 
#coding=utf-8
 
import threading
 
import time
 
import cx_Oracle
 
from pprint import pprint
 
import csv
 
print time.asctime()
 
table_name = "dbtest.csv"
 
f = open(table_name + ".csv", "w") 
 
 
def query01():
 
  tname = threading.current_thread()
 
  aa=10
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query02():
 
  tname = threading.current_thread()
 
  aa=20
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query03():
 
  tname = threading.current_thread()
 
  aa=30
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query04():
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  tname = threading.current_thread()
 
  aa=40
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query05():
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  tname = threading.current_thread()
 
  aa=50
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query06():
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  tname = threading.current_thread()
 
  aa=60
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query07():
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  tname = threading.current_thread()
 
  aa=70
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query08():
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  tname = threading.current_thread()
 
  aa=80
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query09():
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  tname = threading.current_thread()
 
  aa=90
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close()
 
def query10():
 
  conn = cx_Oracle.connect('tlcbuser/tlcbuser@20.5.101.31/tlyy')
 
  cursor = conn.cursor()
 
  tname = threading.current_thread()
 
  aa=100
 
  # cursor.execute("SELECT * FROM TEST100 WHERE ID = %s", [aa])
 
  cursor.prepare("""SELECT * FROM TEST100 WHERE ID=:id""")
 
  cursor.execute(None,{'id':aa})
 
  row = cursor.fetchall()
 
  print row
 
  return row
 
  cursor.close()
 
  conn.close() 
 
 
threads = []
 
t1 = threading.Thread(target=query01, name='query01')
 
threads.append(t1)
 
t2 = threading.Thread(target=query02, name='query02')
 
threads.append(t2)
 
t2 = threading.Thread(target=query03, name='query03')
 
threads.append(t2)
 
t2 = threading.Thread(target=query04, name='query04')
 
threads.append(t2)
 
t2 = threading.Thread(target=query05, name='query05')
 
threads.append(t2)
 
t2 = threading.Thread(target=query06, name='query06')
 
threads.append(t2)
 
t2 = threading.Thread(target=query07, name='query07')
 
threads.append(t2)
 
t2 = threading.Thread(target=query08, name='query08')
 
threads.append(t2)
 
t2 = threading.Thread(target=query09, name='query09')
 
threads.append(t2)
 
t2 = threading.Thread(target=query10, name='query10')
 
threads.append(t2) 
 
 
if __name__ == '__main__':
 
  for t in threads:
 
    # t.setDaemon(True)
 
    t.start()
 
    # t.run()
 
    # t.start()
 
    # print '3333333'
 
    print threading.current_thread()
 
    # print t.is_alive()
 
    # print '3333333'
 
  t.join()
 
  print "all over "
 
  print time.asctime() 
 
 
C:\Python27\python.exe C:/Users/tlcb/PycharmProjects/untitled/a2.py
 
Wed Mar 28 11:12:47 2018
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
<_MainThread(MainThread, started 22500)>
 
[(40, '40boobook40', '40aaaaaaaaaaaa40', '40bbbbbbbbbbbbbbbbb40'), (40, '40boobook40', '40aaaaaaaaaaaa40', '40bbbbbbbbbbbbbbbbb40'), (40, '40boobook40', '40aaaaaaaaaaaa40', '40bbbbbbbbbbbbbbbbb40')]
 
[(60, '60boobook60', '60aaaaaaaaaaaa60', '60bbbbbbbbbbbbbbbbb60'), (60, '60boobook60', '60aaaaaaaaaaaa60', '60bbbbbbbbbbbbbbbbb60'), (60, '60boobook60', '60aaaaaaaaaaaa60', '60bbbbbbbbbbbbbbbbb60')]
 
[(80, '80boobook80', '80aaaaaaaaaaaa80', '80bbbbbbbbbbbbbbbbb80'), (80, '80boobook80', '80aaaaaaaaaaaa80', '80bbbbbbbbbbbbbbbbb80'), (80, '80boobook80', '80aaaaaaaaaaaa80', '80bbbbbbbbbbbbbbbbb80')]
 
[(50, '50boobook50', '50aaaaaaaaaaaa50', '50bbbbbbbbbbbbbbbbb50'), (50, '50boobook50', '50aaaaaaaaaaaa50', '50bbbbbbbbbbbbbbbbb50'), (50, '50boobook50', '50aaaaaaaaaaaa50', '50bbbbbbbbbbbbbbbbb50')]
 
[(10, '10boobook10', '10aaaaaaaaaaaa10', '10bbbbbbbbbbbbbbbbb10'), (10, '10sssssssss10', 'tlcb', 'tlcb'), (10, '10boobook10', '10aaaaaaaaaaaa10', '10bbbbbbbbbbbbbbbbb10')]
 
[(20, '20boobook20', '20aaaaaaaaaaaa20', '20bbbbbbbbbbbbbbbbb20'), (20, '20boobook20', '20aaaaaaaaaaaa20', '20bbbbbbbbbbbbbbbbb20'), (20, '20boobook20', '20aaaaaaaaaaaa20', '20bbbbbbbbbbbbbbbbb20')]
 
[(30, '30boobook30', '30aaaaaaaaaaaa30', '30bbbbbbbbbbbbbbbbb30'), (30, '30boobook30', '30aaaaaaaaaaaa30', '30bbbbbbbbbbbbbbbbb30'), (30, '30boobook30', '30aaaaaaaaaaaa30', '30bbbbbbbbbbbbbbbbb30')]
 
[(100, '100boobook100', '100aaaaaaaaaaaa100', '100bbbbbbbbbbbbbbbbb100'), (100, '100boobook100', '100aaaaaaaaaaaa100', '100bbbbbbbbbbbbbbbbb100'), (100, '100boobook100', '100aaaaaaaaaaaa100', '100bbbbbbbbbbbbbbbbb100')]
 
[(90, '90boobook90', '90aaaaaaaaaaaa90', '90bbbbbbbbbbbbbbbbb90'), (90, '90boobook90', '90aaaaaaaaaaaa90', '90bbbbbbbbbbbbbbbbb90'), (90, '90boobook90', '90aaaaaaaaaaaa90', '90bbbbbbbbbbbbbbbbb90')]
 
all over 
 
Wed Mar 28 11:12:55 2018 
 
Process finished with exit code 0 
 
此时花了 8秒

补充知识:python logging定制logstash的json日志格式

最近一直在折腾日志的收集,现在算是收尾了。 写一篇算python优化logstash的方案。

其实大家都知道logstash调用grok来解析日志的话,是要消耗cpu的成本的,毕竟是需要正则的匹配的。

根据logstash调优的方案,咱们可以预先生成json的格式。 我这边基本是python的程序,怎么搞尼 ?

有两种方法,第一种方法是生成json后,直接打入logstash的端口。 还有一种是生成json写入文件,让logstash做tail操作的时候,把一行的日志数据直接载入json就可以了。

python下的日志调试用得时logging,改成json也是很好改得。 另外不少老外已经考虑到这样的需求,已经做了python logstash的模块。

import logging
import logstash
import sys

host = 'localhost'

test_logger = logging.getLogger('python-logstash-logger')
test_logger.setLevel(logging.INFO)
test_logger.addHandler(logstash.LogstashHandler(host, 5959, version=1))
# test_logger.addHandler(logstash.TCPLogstashHandler(host, 5959, version=1))

test_logger.error('python-logstash: test logstash error message.')
test_logger.info('python-logstash: test logstash info message.')
test_logger.warning('python-logstash: test logstash warning message.')

# add extra field to logstash message
extra = {
  'test_string': 'python version: ' + repr(sys.version_info),
  'test_boolean': True,
  'test_dict': {'a': 1, 'b': 'c'},
  'test_float': 1.23,
  'test_integer': 123,
  'test_list': [1, 2, '3'],
}
test_logger.info('python-logstash: test extra fields', extra=extra)

python-logstash自带了amqp的方案

import logging
import logstash

# AMQP parameters
host = 'localhost'
username = 'guest'
password= 'guest'
exchange = 'logstash.py'

# get a logger and set logging level
test_logger = logging.getLogger('python-logstash-logger')
test_logger.setLevel(logging.INFO)

# add the handler
test_logger.addHandler(logstash.AMQPLogstashHandler(version=1,
                          host=host,
                          durable=True,
                          username=username,
                          password=password,
                          exchange=exchange))

# log
test_logger.error('python-logstash: test logstash error message.')
test_logger.info('python-logstash: test logstash info message.')
test_logger.warning('python-logstash: test logstash warning message.')

try:
  1/0
except:
  test_logger.exception('python-logstash: test logstash exception with stack trace')

不管怎么说,最后生成的格式是这样就可以了。

{
  "@source"=>"unknown",
  "@type"=>"nginx",
  "@tags"=>[],
  "@fields"=>{
    "remote_addr"=>"192.168.0.1",
    "remote_user"=>"-",
    "body_bytes_sent"=>"13988",
    "request_time"=>"0.122",
    "status"=>"200",
    "request"=>"GET /some/url HTTP/1.1",
    "request_method"=>"GET",
    "http_referrer"=>"http://www.example.org/some/url",
    "http_user_agent"=>"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1"
  },
  "@timestamp"=>"2012-08-23T10:49:14+02:00"
}

我这里简单提一下,这个模块用的不是很满意,我在python下把日志打成了json字符串,我原本以为会像grok那样,在Es里面,我的这条日志是个字段的结构,而不是这个日志都在message里面…. 我想大家应该明白了我的意思,这样很是不容易在kibana的搜索…

在kibana搜索,我经常上 source:xxx AND level:INFO 结果正像上面描述的那样,整条日志,都在@message里面。

以上这篇python 串行执行和并行执行实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持三水点靠木。

Python 相关文章推荐
从零学Python之引用和类属性的初步理解
May 15 Python
在Python中用get()方法获取字典键值的教程
May 21 Python
Python实现破解猜数游戏算法示例
Sep 25 Python
Python中static相关知识小结
Jan 02 Python
Python模块文件结构代码详解
Feb 03 Python
Python使用googletrans报错的解决方法
Sep 25 Python
详解Python做一个名片管理系统
Mar 14 Python
Django 模型类(models.py)的定义详解
Jul 19 Python
pandas read_excel()和to_excel()函数解析
Sep 19 Python
使用 Python 清理收藏夹里已失效的网站
Dec 03 Python
python中tkinter窗口位置\坐标\大小等实现示例
Jul 09 Python
python函数指定默认值的实例讲解
Mar 29 Python
Django Channel实时推送与聊天的示例代码
Apr 30 #Python
Django ORM 查询表中某列字段值的方法
Apr 30 #Python
Python pip install如何修改默认下载路径
Apr 29 #Python
Django 5种类型Session使用方法解析
Apr 29 #Python
PyQt5连接MySQL及QMYSQL driver not loaded错误解决
Apr 29 #Python
Python退出时强制运行一段代码的实现方法
Apr 29 #Python
pyinstaller将含有多个py文件的python程序做成exe
Apr 29 #Python
You might like
PHP启动windows应用程序、执行bat批处理、执行cmd命令的方法(exec、system函数详解)
2014/10/20 PHP
php抓取并保存网站图片的实现代码
2015/10/28 PHP
PHP中让json_encode不自动转义斜杠“/”的方法
2017/02/28 PHP
PHP面向对象五大原则之单一职责原则(SRP)详解
2018/04/04 PHP
PHP+MySQL实现模糊查询员工信息功能示例
2018/06/01 PHP
W3C Group的JavaScript1.8 新特性介绍
2009/05/19 Javascript
由JavaScript技术实现的web小游戏(不含网游)
2010/06/12 Javascript
struts2+jquery+json实现异步加载数据(自写)
2013/06/24 Javascript
仿百度的关键词匹配搜索示例
2013/09/25 Javascript
Node.js中的事件驱动编程详解
2014/08/16 Javascript
Jquery使用css方法改变样式实例
2015/05/18 Javascript
jquery不常用方法汇总
2015/07/26 Javascript
怎么通过onclick事件获取js函数返回值(代码少)
2015/07/28 Javascript
基于jquery实现全屏滚动效果
2015/11/26 Javascript
使用DeviceOne实现微信小程序功能
2016/12/29 Javascript
JavaScript中localStorage对象存储方式实例分析
2017/01/12 Javascript
JS实现自定义状态栏动画文字效果示例
2017/10/12 Javascript
ES6 如何改变JS内置行为的代理与反射
2019/02/11 Javascript
element-ui组件中input等的change事件中传递自定义参数
2019/05/22 Javascript
vue之debounce属性被移除及处理详解
2019/11/13 Javascript
Vue引入Stylus知识点总结
2020/01/16 Javascript
[48:23]DOTA2上海特级锦标赛主赛事日 - 4 败者组第四轮#1COL VS EG第一局
2016/03/05 DOTA
[08:53]DOTA2-DPC中国联赛 正赛 PSG.LGD vs LBZS 选手采访
2021/03/11 DOTA
Python设计模式之单例模式实例
2014/04/26 Python
Python3读取文件常用方法实例分析
2015/05/22 Python
在Python中执行系统命令的方法示例详解
2017/09/14 Python
python保存二维数组到txt文件中的方法
2018/11/15 Python
python 日期排序的实例代码
2019/07/11 Python
任意存:BOXFUL
2018/05/21 全球购物
Dr. Martens马汀博士法国官网:马丁靴鼻祖
2020/01/15 全球购物
工作表扬信的范文
2014/01/10 职场文书
经验丰富大学生村干部自我鉴定
2014/01/22 职场文书
工程采购员岗位职责
2014/03/09 职场文书
设立有限责任公司出资协议书
2014/11/01 职场文书
SQL Server中锁的用法
2022/05/20 SQL Server
MySQL运行报错:“Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”解决方法
2022/06/14 MySQL