用 Python 给自己的头像加一个小国旗或者小月饼

如何用 Python 代码绘制赏月美景? 利用下班的空暇时间写了一段关于中秋节的代码,可以实现自动绘制山川、运毒和月亮,以及写出美好的诗句,让你深切陶醉于中秋佳节的节日气氛中。本文中主要是使用到了Python中的turtle库、time库以及pygame库,可以更好的实现动态的效果。我们可以使用 turtle 库绘制月亮、云朵、山以及古诗,游戏模块使用 pygame 库,配上美美的背景音乐。 1. 导入所需要的库(turtle 库、time 库、pygame 库) 1 '''2 Function: 中秋赏月3 Author: 向阳逐梦4 '' 阅读详情

今天是国庆节也是中秋节,首先祝大家节日快乐,本文我们使用 Python 来给自己的头像加一个小国旗或小月饼。

很多人学习python,不知道从何学起。
很多人学习python,掌握了基本语法过后,不知道在哪里寻找案例上手。
很多已经做案例的人,却不知道如何去学习更加高深的知识。
那么针对这三类人,我给大家提供一个好的学习平台,免费领取视频教程,电子书籍,以及课程的源代码!
QQ群:961562169

国旗

对于国旗,我们可以使用 Python 来画一个,用到的 Python 库是大家比较熟悉的 turtle,我们的五星红旗组成元素包括:红底、一颗黄的主星和四颗黄的副星。

首先画一个长方形的红底,代码实现如下:

turtle.setup(600, 400, 0, 0)
turtle.bgcolor("red")

效果如下:

接着画一颗主星,代码实现如下:

turtle.fillcolor("yellow")
turtle.color('yellow')
turtle.speed(10)
# 主星
turtle.begin_fill()
turtle.up()
turtle.goto(-280,100)
turtle.down()
for i in range (5):
    turtle.forward(150)
    turtle.right(144)
turtle.end_fill()

效果如下:

最后画四颗副星,代码实现如下:

# 副星1
turtle.begin_fill()
turtle.up()
turtle.goto(-100,180)
turtle.setheading(305)
turtle.down()
for i in range (5):
    turtle.forward(50)
    turtle.left(144)
turtle.end_fill()
# 副星2
turtle.begin_fill()
turtle.up()
turtle.goto(-50,110)
turtle.setheading(30)
turtle.down()
for i in range (5):
    turtle.forward(50)
    turtle.right(144)
turtle.end_fill()
# 副星3
turtle.begin_fill()
turtle.up()
turtle.goto(-40,50)
turtle.setheading(5)
turtle.down()
for i in range (5):
    turtle.forward(50)
    turtle.right(144)
turtle.end_fill()
# 副星4
turtle.begin_fill()
turtle.up()
turtle.goto(-100,10)
turtle.setheading(300)
turtle.down()
for i in range (5):
    turtle.forward(50)
    turtle.left(144)
turtle.end_fill()

最终效果如下:

月饼

对于月饼也可以用 Python 来画一个,月饼组成元素主要包括:外层圆形的花纹轮廓、内层轮廓和文字。

首先来画外层圆形的花纹轮廓,代码实现如下:

turtle.speed(100)
turtle.color("#F5E16F")
for i in range(20):
    # 顺时针移动18度
    turtle.right(18)
    turtle.begin_fill()
    # 向前移动的距离
    turtle.forward(220)
    # 画半径为 40 的半圆
    turtle.circle(40, 180)
    # 画完半圆之后回到(0,0)
    turtle.goto(0, 0)
    turtle.right(360)
    turtle.end_fill()

效果如下:

再接着画内层轮廓,代码实现如下:

# 设置画笔粗细
turtle.pensize(20)
# 填充颜色(外部、内部)
turtle.color("#F5E16F", "#FF9933")
goto(0, -200)
# 准备开始填充
turtle.begin_fill()
turtle.circle(200)
# 填充结束
turtle.end_fill()
turtle.right(360)
turtle.color('#F5E16F')
goto(0, -180)
for i in range(12):
    turtle.begin_fill()
    turtle.circle(60, 120)
    turtle.left(180)
    turtle.circle(60, 120)
    turtle.end_fill()

效果如下:

最后来添加文字,比如豆沙馅的就添加豆沙两个字,代码实现如下:

turtle.color("#F5E16F")
turtle.write("豆沙", font=("隶书", 60, "bold"))

最终效果如下:

头像加国旗(月饼)

最后,我们将刚才画好的国旗或月饼加到自己的头像上,用到的 Python 库是 OpenCV,安装使用 pip install opencv-python 命令即可,如果速度太慢,可以使用 pip install -i https://mirrors.aliyun.com/pypi/simple/ opencv-python 加速下载安装。

这个功能实现起来也比较简单,只需十几行 Python 代码就可以搞定,代码实现如下:

# 读取头像和国旗图案
img_head = cv2.imread('head.jpg')
img_flag = cv2.imread('flag.png')
# 获取头像和国旗图案宽度
w_head, h_head = img_head.shape[:2]
w_flag, h_flag = img_flag.shape[:2]
# 计算图案缩放比例
scale = w_head / w_flag / 4
# 缩放图案
img_flag = cv2.resize(img_flag, (0, 0), fx=scale, fy=scale)
# 获取缩放后新宽度
w_flag, h_flag = img_flag.shape[:2]
# 按 3 个通道合并图片
for c in range(0, 3):
    img_head[w_head - w_flag:, h_head - h_flag:, c] = img_flag[:, :, c]
# 保存最终结果
cv2.imwrite('new_head.jpg', img_head)

假如我的原头像如下:

给头像加个小国旗,效果如下:

给头像加个小月饼,效果如下:

python画“中国”二字加五星红旗 视频演示: # 中国国旗 import turtle#导入海龟笔库 turtle.up()#拿起笔 turtle.goto(-300, 220)#起始坐标 turtle.speed(4) turtle.down()#落笔准备画 turtle.begin_fill()#填充颜色为 红 turtle.fillcolor("red") turtle.pencolor("red") for i in range(2):#循环画出正方形 turtle.forward(500) turtle.ri 阅读详情

相关推荐

美国国旗检测

一家工厂生产美国国旗,但是偶尔会出现缺少星星或是整条条纹的错误,现在设计一种算法,用以检测,并返回结果

Python绘制小月亮

今天是中秋节,学习如何用Python画出一个月亮。

简简单单 5847

猜国旗_附程序源代码

北大青鸟猜国旗项目,自己写的,请大家指教!!!

使用Python Turtle画一个小人发射爱心

使用Python Turtle画一个小人发射爱心

m0_57206390的博客 5515

世界各国或地区旗帜圆形PNG格式图标

漂亮的图标对于在程序或网站的中的使用,能极大地提高软件产品的层次。本人所提供的图标在网站开发中经常被使用,希望对你有所帮助!

260多个世界各国国旗图标集_sketch素材下载.zip

260多个世界各国国旗图标集.sketch素材下载 Icon、sketch、世界各国、全球国旗、国旗图标集

python的turtle画小人_利用Python如何画一颗心、小人发射爱心

源码:#!/usr/bin/env python# -*- coding:utf-8 -*-import turtleimport time# 画心形圆弧def hart_arc():for i in range(200):turtle.right(1)turtle.forward(2)def move_pen_position(x, y):turtle.hideturtle() # 隐藏画笔(...

weixin_27215337的博客 2177

给我一面国旗 python帮你实现

主要为大家详细介绍了Python之给我一面国旗的实现代码,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

Python第三方库turtle画小人发射爱心

废话不多说直接上代码 import turtle as tr def Mini_people(): tr.pensize(3) tr.up() tr.goto(-200, 165) # 脖子坐标 tr.down() tr.circle(75) # 半径为75的脑袋 tr.right(90) tr.forward(175) # 身体的长度175像素 tr.right(45) tr.forward(100) # 腿长100像素

Breezing的博客 1839

高速串行信号仿真避坑指南:为什么你的SIwave Xnet设置了却不出结果?

本文深入解析SIwave中Xnet功能在高速串行信号仿真中的常见问题,包括模型缺失、网络不完整和端口设置错误等关键误区。通过详细的电路元件模型验证、网络完整性检查及端口配置指南,帮助工程师有效解决仿真不出结果的问题,提升信号完整性分析效率。

weixin_29218963的博客 257

LangGraph实战:用Plan-and-Execute模式5步搭建智能问答机器人(附Tavily搜索集成)

本文详细介绍了如何利用LangGraph的Plan-and-Execute模式,通过规划、执行、动态调整三个核心阶段,构建一个能够处理复杂多步骤问题的智能问答机器人。文章提供了从环境配置、状态管理到核心节点(规划、执行、重新规划)实现的完整实战指南,并集成了Tavily搜索工具,展示了如何将智能任务规划应用于实际信息查询场景。

weixin_29258297的博客 346

在python中输入圆的半_python半圆

广告关闭腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元!问题描述 turtle是python中的一种可视化工具库,可以用来画各种图形,也可以上色。 那么如何用turtle来画一个简单好看的爱心呢,以下给出的具体方法...图3.2画笔准备画一个半径120的半圆,和一个圆心角为70半径360的弧。? 图3.3半个爱心将画笔左转38度,顺序重复...

weixin_39585378的博客 1876

NeuroMaster库:ATmega328P上轻量级脑机接口控制方案

脑机接口(BCI)设备控制是嵌入式系统在神经科学应用中的关键环节,其核心在于低资源平台上的确定性通信与实时状态管理。基于UART的私有协议需兼顾时序精度、CRC校验鲁棒性与中断安全,尤其在ATmega328P等无DMA、无浮点单元的MCU上,必须绕过高层抽象库,直操作寄存器以保障115200bps下的帧同步稳定性。此类设计显著提升设备级指令下发(如启动采集、电池查询)与反馈响应的可预测性,广泛应用于教育机器人、便携式生物反馈终端及多传感器协调系统。NeuroMaster库正是面向这一技术需求的典型实践。

weixin_42168902的博客 509

Python浪漫之画一个圆月亮

Python浪漫之画一个圆月亮

m0_70545163的博客 581

Claude订阅支付失败怎么办?Pro与Code付款路径及风控排查指南

跨境订阅支付涉及发卡行、卡组织、收单行、支付网关等多环节链路,任一环节的风控评分不足都可能导致扣款被拒。支付网关通常从发卡地区、IP归属、账单地址、设备指纹和历史交易等维度综合评估交易风险,信息自洽度越高,通过率越高。理解这一原理后,开发者可更高效地排查订阅失败原因,并在Claude Pro对话功能与Claude Code开发工具等不同场景中选择匹配的支付路径。订阅后的续费管理与额度确认同样影响长期使用体验。

weixin_26848497的博客 238

Arcgis 10.3 与 ArcGIS Engine 10.3 安装与破解

Arcgis 10.3 与 ArcGIS Engine 10.3 安装与破解

weixin_52127098的博客 4743

python绘制梅尔谱图_画一个心送给心爱的小姐姐,Python绘图库Turtle

Python绘图库TurtleTurtle介绍Turtle是Python内嵌的绘制线、圆以及其他形状(包括文本)的图形模块。一个Turtle实际上是一个对象,在导入Turtle模块时,就创建了对象,然后,可以调用Turtle对象的各种方法完成不同的操作。当创建一个Turtle对象时,它的位置被设定在(0,0)处——窗口的中心,而且它的方向被设置为向右。Turtle模块用笔来绘制图形,就像在现实的纸...

weixin_39606177的博客 610

AWVS安装与使用教程

Acunetix Web Vulnerability Scanner(简称AWVS)是一款知名的自动化网络漏洞扫描工具,它通过网络爬虫测试你的网站安全,检测流行安全漏洞。它可以扫描任何可通过Web浏览器访问的和遵循HTTP/HTTPS规则的Web站点和Web应用程序。适用于任何中小型和大型企业的内联网、外延网和面向客户、雇员、厂商和其它人员的Web网站。WVS可以通过检查SQL注入攻击漏洞、XSS跨站脚本攻击漏洞等漏洞来审核Web应用程序的安全性。

qq_59607911的博客 4102

用Python Turtle画一个中国结

首先,我们需要了解turtle模块。中国结,作为中华民族传统文化的象征之一,以其独特的编织技艺和深厚的文化内涵,深受人们喜爱。今天,我们就来用Python的turtle模块,尝试绘制一个充满韵味的中国结。通过用Python的turtle模块绘制中国结,我们不仅可以锻炼编程能力,还可以更深入地了解中华民族传统文化的魅力。运行效果:可以看到,我们生成了一个800 x 800的正方形框,我们将在正方形框中画我们的中国结。(1)首先,我们需要导入turtle模块,并设置窗口大小,颜色,画笔粗细,等参数。

青岛打工人 2285

Oracle EBS 帐套(Ledger/SOB)如何定义会计主体、如何支撑多准则 / 多报告、组织与帐套的绑定关系、以及项目落地时的设计差异。下面从实现逻辑、核心要素、组织模型、多账簿、科目设计、项

本文对比了Oracle EBS R12与SAP S/4HANA在帐套(Ledger)设计上的核心差异。Oracle采用4C架构(科目/币种/日历/准则),帐套作为独立会计主体,主辅账物理隔离;SAP则以公司代码为主体,通过平行分类账在同一凭证中实现多准则核算。关键差异体现在:Oracle强调边界隔离,适合差异大的集团;SAP注重统一视图,适合实时合并需求。实施时需注意:Oracle避免过度建账套,SAP需统筹科目与维度设计。两者分别体现了"盒子"与"滤镜"的设计哲学。

金牌架构师 421

【专栏必读】王道考研408操作系统+Linux系统编程万字笔记使用说明及章节导航

王道408考研操作系统)第一章计算机系统概述-第一节1、2:操作系统概念、概念和特征1:理解fork的作用prinf("还没有执行fork函数的本进程为:%d\n" , getpid());//其返回值是pid类型的 sleep(1);if(ret > 0) //父进程返回的是子进程ID {printf("我是父进程,我的id是:%d,我的孩子id是%d\n" , getpid() , ret);sleep(1);} } else if(ret == 0) //子进程fork返回值是0 {.........

快乐江湖的博客 3万+

Python浪漫之画明亮的月亮

Python浪漫之画明亮的月亮

m0_70545163的博客 683

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

github的吉祥物

GitHub的吉祥物Octocat的来历可以追溯到2007年,当时设计师Simon Oxley为一个客户项目设计了一个章鱼猫的形象。Octocat迅速成为GitHub的标志性形象,被广泛用于GitHub的品牌推广、宣传和产品设计中。Octocat这个名字是由"octo"(代表八个触手)和"cat"(代表猫)组成,形象上是一个带有八只触手的猫头。这个设计结合了章鱼和猫的元素,创造出了一个独特且有趣的形象。章鱼猫(Octocat)是GitHub的吉祥物,形象是一个下半身为章鱼的爪子,上本身为猫头的卡通形象。

Jonathan的博客 3195

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

如何用python来画出标准的五星红旗

如何用python画出标准的五星红旗?

m0_60535108的博客 5547

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

python 人像素描_谁说程序员不懂浪漫的,直接用 Python 给女朋友画张素描

现在总有人说什么程序员不够浪漫!天真,你以为是真的不够浪漫吗?其实我们只是没时间而已,每天都这么忙,不是开发程序就是修bug,都要聪明绝顶了,哪还有精力搞浪漫,不过,等我们有时间了,那就没有你们普通人什么事儿了?就比如最近就有一个小伙伴上热搜了!原因是他用Python给他可爱的女朋友画了一幅素描!而且不到30行代码,也不需要ps。成功哄了女朋友!让我们也来一起学学,然后给你女朋友一个惊喜吧!前提是...

weixin_32589453的博客 1442

如何用Python代码绘制赏月美景?

再过几天就是八月十五了,又迎来了一年一度的中秋节。在我国大部分地区,中秋节是仅次于春节的传统节日、象征着团圆安康。在这天,天上的月亮会格外的大、格外的圆,我们吃到嘴里的月饼也比平常要甜。

shiwei0813的博客 6005
上一篇: python快手爬虫:解决粉丝数、 关注数等字体加密
下一篇: 30 个Python代码实现的常用功能,精心整理版
Python_sn
博客等级 码龄6年 326粉丝 290原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址