Python – 图像处理 – OpenCV常用操作
安装
1 2 3 |
pip install opencv-python pip install numpy |
获取图片 生成空白图片 [crayon阅读更多Python – 图像处理 – OpenCV常用操作[…]
安装
1 2 3 |
pip install opencv-python pip install numpy |
获取图片 生成空白图片 [crayon阅读更多Python – 图像处理 – OpenCV常用操作[…]
帮助链接 https://help.aliyun.com/knowledge_detail/41344.htm阅读更多ubuntu配置vpn[…]
无法提供摘要。这是一篇受保护的文章。
直接上代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# -*- coding:utf-8 -*- from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import smtplib # 输入Email地址和口令: from_addr = input('From: ') password = input('Password: ') # 输入收件人地址: to_addr = input('To: ') # 输入SMTP服务器地址: smtp_server = input('SMTP server: ') msg = MIMEMultipart() msg['Subject'] = 'duangduang!' msg['From'] = from_addr msg['To'] = to_addr content = ''' 你好, 这是一封自动发送的邮件。 http://www.xyu.ink ''' txt = MIMEText(content, 'plain', 'utf-8') msg.attach(txt) server = smtplib.SMTP(smtp_server, 25) # SMTP协议默认端口是25,SSL默认端口465/994,如果报错请尝试465端口 server.set_debuglevel(1) server.login(from_addr, password) server.sendmail(from_addr, [to_addr], msg.as_string()) server.quit() |
安装git mac和ubuntu下应该都是自带git的,如果没有可以用下面的指令安装。windows下建议阅读更多GitHub – 常用git命令和开源许可协议[…]
安装显卡驱动 https://blog.csdn.net/wangsidadehao/article/deta阅读更多Ubuntu + CUDA9.0 + tensorflow-gpu 安装过程[…]
服务器
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
#encoding=utf-8 import sys import socket def start_tcp_server(ip, port): # create socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_address = (ip, port) # bind port print 'starting listen on ip %s, port %s' % server_address sock.bind(server_address) # starting listening, allow only one connection try: sock.listen(1) except socket.error, e: print "fail to listen on port %s" % e sys.exit(1) while True: print "waiting for connection" client, addr = sock.accept() print 'having a connection' client.send('>') while True: try: s = client.recv(255) except: print "disconnected." print "waiting for connection" client, addr = sock.accept() print 'having a connection' s = client.recv(255) if s: s = s.strip() print ( 'receive %s' % s) client.send('>') else: print "disconnected." print "waiting for connection" client, addr = sock.accept() print 'having a connection' if __name__ == '__main__': start_tcp_server('127.0.0.1', 8000) |
客户端 [crayon-67815e阅读更多Python – 实现tcp服务器和客户端[…]
用远程服务器作为代理浏览网页 这种方法适用于要用远程服务器的网络环境浏览网页的情况。 下载plink 阅读更多用SSH隧道直接浏览网页[…]