a171898276
码龄10年
关注
提问 私信
  • 博客:7,938
    7,938
    总访问量
  • 暂无
    原创
  • 2,364,090
    排名
  • 0
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:广东省
  • 加入CSDN时间: 2015-05-05
博客简介:

a171898276的博客

查看详细资料
  • 原力等级
    当前等级
    0
    当前总分
    0
    当月
    0
个人成就
  • 获得0次点赞
  • 内容获得0次评论
  • 获得5次收藏
创作历程
  • 38篇
    2019年
  • 1篇
    2018年
创作活动更多

2024 博客之星年度评选报名已开启

博主的专属年度盛宴,一年仅有一次!MAC mini、大疆无人机、华为手表等精美奖品等你来拿!

去参加
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

就业DAY6_web服务器_正则表达式

# 匹配变量名是否符合要求import redef main(): names = ["name1", "_name", "2_name", "__name__", "___", "name!"] for name in names: ret = re.match("^[a-zA-Z_][a...
转载
发布博客 2019.09.09 ·
183 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

就业DAY5_多任务_进程,进程池,队列

import timeimport multiprocessingdef sing(): """"唱歌 5秒钟""" for i in range(5): print("----正在唱歌----") time.sleep(1)def dance(): """跳舞 子线程""" for ...
转载
发布博客 2019.09.05 ·
117 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

就业DAY4_多任务_线程

import timeimport threading# 定义一个全局变量def test(temp): temp.append(33) print("---in test g_num=%s" % str(temp))def test2(temp): print("---in test2 g_num=%s" % st...
转载
发布博客 2019.09.04 ·
104 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY16-飞机大战-精灵

import pygameclass GameSprite(pygame.sprite.Sprite): """飞机大战游戏精灵""" def __init__(self, image_name, speed = 1): # 调用父类的初始化方法 super().__init__() ...
转载
发布博客 2019.08.30 ·
570 阅读 ·
0 点赞 ·
0 评论 ·
3 收藏

基础DAY14-飞机大战-绘制图像

import pygamepygame.init()# 创建游戏窗口screen = pygame.display.set_mode((480, 700))# 加载backgroud.png创建背景bg = pygame.image.load("./images/background.png")# 将背景绘制在屏幕的(0,0)位置screen.bl...
转载
发布博客 2019.08.28 ·
218 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY14-飞机大战-创建游戏主窗口

python -m pygame.examples.aliensimport pygamepygame.init()# 编写邮箱代码print("游戏代码")pygame.quit()初始化和退出import pygame# 定义hero_rect矩形描述英雄的位置和大小hero_rect = pygame...
转载
发布博客 2019.08.27 ·
204 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

python3 pip ipython 安装

1.安装Python3.6安装准备mkdir /usr/local/python3wget --no-check-certificate https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgztar -xzvf Python-3.6.0.tgzcd Python-3.6.0编译安装./configure...
转载
发布博客 2019.08.27 ·
426 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY14-eval

转载于:https://www.cnblogs.com/joycezhou/p/11420191.html
转载
发布博客 2019.08.27 ·
118 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY13-文本编码

  python2 字符串# *-* coding:utf8 *-*# 引号前面的u告诉解释器这是一个utf8编码格式的字符串hello_str = u"hello世界"print(hello_str)for c in hello_str: print(c)转载于:https://www.cnblogs.com/joycezhou/p/11420142.html...
转载
发布博客 2019.08.27 ·
95 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

就业DAY7_web服务器_tcp三次握手四次挥手,返回浏览器需要的页面http服务器

import socketdef servece_client(new_socket): """为这个客户端返回数据""" # 1 接收浏览器发送过来的请求,即http请求 # GET / HTTP/1.1 # ... request = new_socket.recv(1024...
转载
发布博客 2019.09.18 ·
200 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY13-文件

文本文件二进制文件# 打开文件file = open("README")# 读取文件text = file.read()print(text)# 关闭文件file.close()读取文件# 打开文件try: file = open("README")except Exception as result:...
转载
发布博客 2019.08.27 ·
130 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

就业DAY7_web服务器_http协议

import socketdef servece_client(new_socket): """为这个客户端返回数据""" # 1 接收浏览器发送过来的请求,即http请求 # GET / HTTP/1.1 # ... request = new_socket.recv(1024) print(request)...
转载
发布博客 2019.09.12 ·
195 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

就业DAY5_多任务_协程

判断是否可迭代In [4]: from collections import IterableIn [6]: isinstance(123,Iterable) Out[6]: FalseIn [11]: isinstance((123),Iterable) ...
转载
发布博客 2019.09.06 ·
125 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY12-包

from . import send_messagefrom . import receive_message__init__def receive(): return "这是来自100xx的短信"receive_messagedef send(text): print("正在发送%s" % text)s...
转载
发布博客 2019.08.26 ·
105 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

就业DAY3_多任务_线程

import threadingimport timedef test1(): for i in range(5): print("---test1----%d" % i) time.sleep(1) # 如果创建Thread时执行的函数,运行结束,意味着这个子线程结束了def test2...
转载
发布博客 2019.09.04 ·
89 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY11-模块import

import hm_01_测试模块1import hm_02_测试模块2hm_01_测试模块1.say_hello()dog = hm_01_测试模块1.Dog()print(dog)hm_02_测试模块2.say_hello()cat = hm_02_测试模块2.Cat()print(cat)print(hm_01_测试模块1.titl...
转载
发布博客 2019.08.23 ·
122 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY10-异常

捕获异常try:  ..except:  ...try: num = int(input("请输入整数:"))except: print("请输入整数")异常提示捕获未知错误try: # 提示用户输入一个整数 num = int(input("请输入一个整数")) # 使用 8 除以用户输入的...
转载
发布博客 2019.08.22 ·
105 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

就业DAY1_网络编程

知名端口 0-1023动态端口 1024-65535import socketdef main(): # 创建一个udp套接字 udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) while True: # 从键盘获取数据 s...
转载
发布博客 2019.08.31 ·
116 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY10-单例

class MusicPlayer(object): # * 元组 ** 字典 def __new__(cls, *args, **kwargs): # 使用类名创建对象,new方法会被自动调用 print("创建对象,分配空间") # 2 为对象分配空间 instranc...
转载
发布博客 2019.08.22 ·
86 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础DAY15-飞机大战-监听事件

import pygamepygame.init()# 创建游戏窗口screen = pygame.display.set_mode((480, 700))# 加载backgroud.png创建背景bg = pygame.image.load("./images/background.png")# 将背景绘制在屏幕的(0,0)位置screen....
转载
发布博客 2019.08.29 ·
236 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多