当前位置: 首页 > news >正文

Python编程:创意爱心表白代码集

在寻找一种特别的方式来表达你的爱意吗?使用Python编程,你可以创造出独一无二的爱心图案,为你的表白增添一份特别的浪漫。这里为你精选了六种不同风格的爱心表白代码,让你的创意和情感通过代码展现出来。

话不多说,咱直接上代码!

目录

    • 1. 紫色浪漫:心形表白
    • 2. 爱意满满:Love2 I Love You
    • 3. 红色热情:心形与文字结合
    • 4. 爱的箭矢:一箭穿心效果
    • 5. 一箭穿心文字版
    • 6. 爱心一行代码:简洁表白

1. 紫色浪漫:心形表白

在这里插入图片描述

#1-1导入turtle模块进行设计
import turtle
import time#1-2画心形圆弧
def hart_arc():for i in range(200):turtle.right(1)turtle.forward(2)def move_pen_position(x, y):turtle.hideturtle()  # 隐藏画笔(先)turtle.up()  # 提笔turtle.goto(x, y)  # 移动画笔到指定起始坐标(窗口中心为0,0)turtle.down()  # 下笔turtle.showturtle()  # 显示画笔love = "听闻小姐治家有方,鄙人余生愿闻其详?" #input("请输入表白话语:")
signature = "先生" #input("请签署你的名字:")
date= "" #input("请写上日期:")if love == '':love = 'I Love You'#1-3初始化
turtle.setup(width=800, height=500)  # 窗口(画布)大小
turtle.color('black', 'Pink')  # 画笔颜色
turtle.pensize(5)  # 画笔粗细
turtle.speed(100)  # 描绘速度
# 初始化画笔起始坐标
move_pen_position(x=0, y=-180)  # 移动画笔位
turtle.left(140)  # 向左旋转140度turtle.begin_fill()  # 标记背景填充位置#1-4画图和展示
turtle.forward(224)  # 向前移动画笔,长度为224
# 画爱心圆弧
hart_arc()  # 左侧圆弧
turtle.left(120)  # 调整画笔角度
hart_arc()  # 右侧圆弧
# 画心形直线( 右下方 )
turtle.forward(224)turtle.end_fill()  # 标记背景填充结束位置move_pen_position(x=70, y=160)  # 移动画笔位置
turtle.left(185)  # 向左旋转180度
turtle.circle(-110,185)  # 右侧圆弧
# 画心形直线( 右下方 )
#turtle.left(20)  # 向左旋转180度
turtle.forward(50)
move_pen_position(x=-180, y=-180)  # 移动画笔位置
turtle.left(180)  # 向左旋转140度# 画心形直线( 左下方 )
turtle.forward(600)  # 向前移动画笔,长度为224# 在心形中写上表白话语
move_pen_position(0,50)  # 表白语位置
turtle.hideturtle()  # 隐藏画笔
turtle.color('#CD5C5C', 'pink')  # 字体颜色
# font:设定字体、尺寸(电脑下存在的字体都可设置)  align:中心对齐
turtle.write(love, font=('Arial', 20, 'bold'), align="center")# 签写署名和日期
if (signature != '') & (date != ''):turtle.color('red', 'pink')time.sleep(2)move_pen_position(220, -180)turtle.hideturtle()  # 隐藏画笔turtle.write(signature, font=('Arial', 20), align="center")move_pen_position(220, -220)turtle.hideturtle()  # 隐藏画笔turtle.write(date, font=('Arial', 20), align="center")#1-5点击窗口关闭程序
window = turtle.Screen()
window.exitonclick()

2. 爱意满满:Love2 I Love You

在这里插入图片描述

import turtle as t
import math as mtif __name__ == "__main__":t.screensize(800,600,'white')t.pensize(10)t.speed(10)#爱心1t.color('black','pink')t.begin_fill()for i in range(-90,90,5):x=mt.cos(mt.radians(i))y=float(pow(mt.cos(mt.radians(i)),2/3))+float(mt.sin(mt.radians(i)))t.penup()# print(int(x*50)+10,int(y*50)+10)t.goto(int(x*50)+50,int(y*50)+30)t.pendown()t.forward(1)t.penup()t.goto(-int(x*50)+50,int(y*50)+30)t.pendown()t.forward(1)t.penup()t.end_fill()#爱心2t.goto(0,10)t.penup()t.begin_fill()for i in range(0,360,5):r=60*(1-mt.sin(mt.radians(i)))t.penup()t.left(5)t.forward(r)t.pendown()t.forward(1)t.penup()t.backward(r+1)t.pendown()t.end_fill()#Lt.penup()t.goto(-200,0)t.left(90)t.begin_fill()t.pendown()t.forward(100)t.right(90)t.forward(20)t.right(90)t.forward(80)t.left(90)t.forward(40)t.right(90)t.forward(20)t.right(90)t.forward(60)t.end_fill()#ot.penup()t.goto(-80,0)t.pendown()t.begin_fill()t.circle(-50)t.end_fill()t.penup()t.color('pink','black')t.begin_fill()t.goto(-80,20)t.pendown()t.circle(-30)t.end_fill()t.color('black','pink')#Et.penup()t.goto(120, 0)t.right(180)t.left(90)t.begin_fill()t.pendown()t.forward(100)#上t.right(90)t.forward(60)#横t.right(90)t.forward(20)#竖t.right(90)t.forward(40)#横t.left(90)t.forward(20)#竖t.left(90)t.forward(40)#横t.right(90)t.forward(20)t.right(90)t.forward(40)t.left(90)t.forward(20)t.left(90)t.forward(40)t.right(90)t.forward(20)t.right(90)t.forward(60)t.end_fill()t.mainloop()

3. 红色热情:心形与文字结合

在这里插入图片描述

import turtle as tdef face(x, y):           #脸t.setheading(-90)t.penup()t.goto(x, y)t.pendown()t.backward(15)   # 左脸t.circle(70,-80)t.setheading(80)   # 左耳t.circle(-150, 15)t.circle(-15, 180)t.setheading(-115)t.circle(-150, 13)t.setheading(10)t.circle(-100,10)t.setheading(70)    # 右耳t.circle(-150, 20)t.circle(-15, 180)t.circle(-150, 16)t.setheading(10)t.setheading(160)   # 右脸t.circle(60, -130)t.setheading(-75)t.forward(40)def word(x, y):             # “如何骗人”t.pensize(2)t.pencolor("black")t.setheading(0)t.penup()t.goto(x, y)t.pendown()t.forward(10)   # “如”t.penup()t.setheading(90)t.forward(8)t.pendown()t.setheading(-120)t.forward(15)t.setheading(-45)t.forward(12)t.penup()t.setheading(80)t.forward(15)t.pendown()t.setheading(-125)t.forward(16)t.penup()t.setheading(42)t.forward(16)t.pendown()t.setheading(-90)t.forward(10)t.penup()t.backward(11)t.pendown()t.setheading(0)t.forward(8)t.setheading(-90)t.forward(10)t.penup()t.setheading(180)t.forward(8)t.pendown()t.setheading(0)t.forward(8)t.penup()        # “何”t.goto(x+7,y-18)t.pendown()t.setheading(-135)t.forward(13)t.penup()t.goto(x+5, y - 20)t.pendown()t.setheading(-90)t.forward(16)t.penup()t.goto(x+11, y-18)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x+12, y-22)t.pendown()t.setheading(-90)t.forward(8)t.penup()t.goto(x + 12, y - 22)t.pendown()t.setheading(0)t.forward(6)t.setheading(-90)t.forward(8)t.penup()t.goto(x + 11, y - 31)t.pendown()t.setheading(0)t.forward(6)t.penup()t.goto(x + 21, y - 19)t.pendown()t.setheading(-90)t.forward(18)t.setheading(145)t.forward(5)t.penup()           # “骗”t.goto(x + 40, y+3)t.pendown()t.setheading(0)t.forward(10)t.setheading(-90)t.forward(7)t.penup()t.goto(x + 45, y + 3)t.pendown()t.setheading(-90)t.forward(10)t.setheading(0)t.forward(7)t.setheading(-100)t.forward(10)t.setheading(145)t.forward(4)t.penup()t.goto(x+38, y-12)t.pendown()t.setheading(0)t.forward(11)t.penup()t.goto(x+57, y+9)t.pendown()t.setheading(-45)t.forward(4)t.penup()t.goto(x+54, y+3)t.pendown()t.setheading(0)t.forward(13)t.setheading(-90)t.forward(5)t.setheading(180)t.forward(12)t.penup()t.goto(x + 54, y + 3)t.pendown()t.setheading(90)t.circle(90,-10)t.penup()t.goto(x + 56, y-5)t.pendown()t.setheading(-90)t.forward(11)t.penup()t.goto(x + 56, y - 5)t.pendown()t.setheading(0)t.forward(13)t.setheading(-90)t.forward(12)t.setheading(145)t.forward(4)t.penup()t.goto(x + 56, y - 10)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x + 56, y - 10)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x + 60, y - 4)t.pendown()t.setheading(-90)t.forward(10)t.penup()t.goto(x + 64, y - 4)t.pendown()t.setheading(-90)t.forward(10)t.penup()          # “人”t.goto(x + 60, y - 19)t.pendown()t.setheading(70)t.circle(50, -30)t.penup()t.goto(x + 56, y - 27)t.pendown()t.setheading(130)t.circle(-50, -20)def book(x,y):           #书t.setheading(-90)t.penup()t.goto(x, y)t.fillcolor("red")t.begin_fill()t.pendown()t.forward(60)t.setheading(0)t.circle(-100, 25)t.setheading(90)t.forward(59)t.setheading(-25)t.circle(-100, -25)t.penup()t.setheading(-14)t.forward(46)t.pendown()t.setheading(15)t.circle(-100, 25)t.setheading(-90)t.forward(58)t.setheading(-11)t.circle(-105, -25)t.end_fill()def eyes(x, y):         # 五官t.setheading(-20)t.penup()t.goto(x, y)t.pendown()t.forward(10)t.setheading(0)t.penup()t.forward(10)t.pendown()t.setheading(20)t.forward(10)t.setheading(-160)t.penup()t.forward(50)t.pendown()t.setheading(0)t.forward(15)t.penup()t.forward(25)t.pendown()t.forward(18)t.setheading(-145)t.penup()t.forward(45)t.pendown()t.setheading(0)t.forward(10)def cheek(x, y):          #腮红t.setheading(0)for i in range(1, 4):t.color("pink")t.pensize(4)t.penup()t.right(110)t.goto(x, y)t.pendown()t.forward(9)t.left(110)x += 9t.pencolor("black")def hands(x,y):     # 小手手t.penup()t.goto(x, y)t.pendown()t.fillcolor("white")t.begin_fill()t.circle(10)t.end_fill()t.penup()t.setheading(5)t.forward(120)t.pendown()t.fillcolor("white")t.begin_fill()t.setheading(-165)t.forward(35)t.circle(10,180)t.forward(15)t.end_fill()def heart(x,y,z):      # 爱心t.setheading(110)t.pensize(2)t.pencolor("black")t.penup()t.goto(x,y)t.pendown()t.fillcolor("red")t.begin_fill()     #左半边t.circle(50,180)t.circle(180,37)t.left(46)      #右半边t.circle(180,37)t.circle(50, 182)t.end_fill()def main():"""主函数"""t.pensize(0)t.speed(6)face(-95, 55)eyes(-45, 110)cheek(-80, 80)cheek(0, 80)book(-110, 55)hands(-110,5)word(-100,35)heart(150,0,1)t.hideturtle()t.exitonclick()if __name__ == "__main__":main()

4. 爱的箭矢:一箭穿心效果

在这里插入图片描述

import turtle as tt.color('white','red')t.begin_fill()t.width(5)t.left(135)t.fd(100)t.right(180)t.circle(50,-180)t.left(90)t.circle(50,-180)t.right(180)t.fd(100)t.pu()t.goto(50,-30)t.pd()t.right(90)t.fd(100)t.right(180)t.circle(50,-180)t.left(90)t.circle(50,-180)t.right(180)t.fd(100)t.end_fill()t.hideturtle()t.pu()t.goto(250,-70)t.pd()t.color('black')t.width(5)t.left(70)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.fd(20)t.left(145)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.fd(20)t.left(145)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.width(3)t.fd(220)t.right(90)t.pu()t.fd(10)t.pd()t.left(90)t.circle(10,180)t.circle(10,-90)t.right(90)t.fd(-10)t.pu()t.fd(90)t.left(90)t.fd(10)t.left(90)t.pd()t.circle(10,180)t.circle(10,-90)t.left(90)t.fd(100)t.begin_fill()t.left(30)t.fd(15)t.right(35)t.fd(50)t.right(150)t.fd(50)t.right(62)t.fd(25)t.end_fill()t.done()

5. 一箭穿心文字版

在这里插入图片描述

from turtle import *
import turtle
from tkinter import *
import subprocess
import os
import random as randef Circlemove(size):for i in range(200):right(1)forward(1 * size)def Heart(x, y, size):setturtle(x, y)speed(0.6)color('red', 'pink')begin_fill()left(140)forward(111.65 * size)Circlemove(size)left(120)Circlemove(size)forward(111.65 * size)end_fill()penup()def setturtle(x, y):penup()goto(x, y)pendown()def Line():speed(0.6)pensize(10)setheading(0)setturtle(-300, 0)left(12)forward(210)setturtle(80, 80)forward(150)def LineHead():pensize(1)speed(0.5)color('red', 'red')begin_fill()left(120)forward(20)right(150)forward(35)right(120)forward(35)right(150)forward(20)end_fill()def SavePicture():ts = getscreen()ts.getcanvas().postscript(file="520.ps", colormode='color')window = turtle.Screen()window.exitonclick()def main():Love_Words = ["我喜欢的样子,你都有。"]Love_Letter = ["有你陪伴的日子,真好。", "遇见你,此生甚幸。"]Random_Number = ran.randint(0, len(Love_Words) - 1)setup(800, 600, 0, 0)getscreen().tracer(30, 0)hideturtle()pensize(3)color('black', 'pink')Heart(0, -25, 0.75)home()Heart(-80, -50, 1)Line()LineHead()pencolor("purple")speed(0.6)j = 0for i in Love_Words[Random_Number]:j = j + 1setturtle(j * 25 - 250, -150 + ran.randint(-1, 1) * 7)write(i, font=("楷体", 25, "normal"))j = 0pencolor("purple")for i in Love_Letter:j = j + 1setturtle(-400, 275 - j * 27)write(i, font=("楷体", 25, "normal"))pencolor('black')SavePicture()if __name__ == '__main__':main()

6. 爱心一行代码:简洁表白

在这里插入图片描述

print('\n'.join([''.join([('Love'[(x-y) % len('Love')] if ((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3 <= 0 else ' ') for x in range(-30, 30)]) for y in range(30, -30, -1)]))
👇 源码资料获取 · 技术与交流 👇

在这里插入图片描述

相关文章:

Python编程:创意爱心表白代码集

在寻找一种特别的方式来表达你的爱意吗&#xff1f;使用Python编程&#xff0c;你可以创造出独一无二的爱心图案&#xff0c;为你的表白增添一份特别的浪漫。这里为你精选了六种不同风格的爱心表白代码&#xff0c;让你的创意和情感通过代码展现出来。 话不多说&#xff0c;咱…...

腾讯IM SDK:TUIKit发送多张图片

一、问题描述 在使用腾讯IM DEMO&#xff08;https://github.com/TencentCloud/chat-uikit-vue.git&#xff09;时发现其只支持发送一张图片&#xff1a; 二、解决方案 // src\TUIKit\components\TUIChat\message-input-toolbar\image-upload\index.vue<inputref"inp…...

《本地部署开源大模型》在Ubuntu 22.04系统下ChatGLM3-6B高效微调实战

在Ubuntu 22.04系统下ChatGLM3-6B高效微调实战 无论是在单机单卡&#xff08;一台机器上只有一块GPU&#xff09;还是单机多卡&#xff08;一台机器上有多块GPU&#xff09;的硬件配置上启动ChatGLM3-6B模型&#xff0c;其前置环境配置和项目文件是相同的。如果大家对配置过程还…...

Python 脚本来自动发送每日电子邮件报告

安装必要的库 我们将使用 smtplib 发送邮件&#xff0c;以及 email.mime 来创建电子邮件内容。另外&#xff0c;为了让脚本自动定时运行&#xff0c;可以使用操作系统的计划任务工具&#xff08;如 Linux 的 cron 或 Windows 的 Task Scheduler&#xff09;。 创建邮件内容 使…...

大语言模型与ChatGPT:深入探索与应用

文章目录 1. 前言2. 大语言模型的概述2.1 什么是大语言模型&#xff1f;2.2 Transformer架构的核心2.3 预训练与微调 3. ChatGPT的架构与技术背景3.1 GPT模型的演进3.2 ChatGPT的工作原理 4. ChatGPT的实际应用4.1 日常对话助手4.2 内容生成与写作4.3 编程辅助4.4 教育与学习辅…...

【从零开始的LeetCode-算法】3164.优质数对的总数 II

给你两个整数数组 nums1 和 nums2&#xff0c;长度分别为 n 和 m。同时给你一个正整数 k。 如果 nums1[i] 可以被 nums2[j] * k 整除&#xff0c;则称数对 (i, j) 为 优质数对&#xff08;0 < i < n - 1, 0 < j < m - 1&#xff09;。 返回 优质数对 的总数。 示…...

FastDFS VS MinIO:文件存储与对象存储的抉择(包含SpringBoot集成FastDFS范例)

FastDFS vs MinIO&#xff1a;文件存储与对象存储的抉择&#xff08;包含SpringBoot集成FastDFS范例&#xff09; 我坐在窗边&#xff0c;随着飞机穿过云层&#xff0c;在云层之上滑翔。可以清晰的看到飞机在天空留下的痕迹&#xff0c;不知道那是蔚蓝中的纯白&#xff0c;还是…...

【Redis】缓存预热、雪崩、击穿、穿透、过期删除策略、内存淘汰策略

Redis常见问题总结&#xff1a; Redis常见问题总结Redis缓存预热Redis缓存雪崩Redis缓存击穿Redis缓存穿透 Redis 中 key 的过期删除策略数据删除策略 Redis内存淘汰策略一、Redis对过期数据的处理&#xff08;一&#xff09;相关配置&#xff08;二&#xff09;内存淘汰流程&a…...

【LeetCode】每日一题 2024_10_15 三角形的最大高度(枚举、模拟)

前言 每天和你一起刷 LeetCode 每日一题~ LeetCode 启动&#xff01; 题目&#xff1a;三角形的最大高度 代码与解题思路 久违的简单题 这道题读完题目其实不难想到有两条路可以走&#xff1a; 1、题目很明显只有两种情况&#xff0c;枚举是第一个球是红球还是蓝球这两种情…...

2024版最新网络安全工程师入门教程(非常详细)从零基础入门到精通,看完这一篇就够了

前言 想要成为网络安全工程师&#xff0c;却苦于没有方向&#xff0c;不知道从何学起的话&#xff0c;下面这篇 网络安全入门 教程可以帮你实现自己的网络安全工程师梦想&#xff0c;如果想学&#xff0c;可以继续看下去&#xff0c;文章有点长&#xff0c;希望你可以耐心看到…...

vue中关于router.beforeEach()的用法

router.beforeEach()是Vue.js中的路由守卫&#xff0c;用于在路由跳转前进行校验、取消、重定向等操作。 基本使用&#xff1a; const router new VueRouter({ ... })router.beforeEach((to, from, next) > {// ... }) to: 即将要进入的目标路由对象 from: 当前导航正要…...

C++模板初阶,只需稍微学习;直接起飞;泛型编程

&#x1f913;泛型编程 假设像以前交换两个函数需要&#xff0c;函数写很多个或者要重载很多个&#xff1b;那么有什么办法实现一个通用的函数呢&#xff1f; void Swap(int& x, int& y) {int tmp x;x y;y tmp; } void Swap(double& x, double& y) {doubl…...

【数据结构 | 红黑树】红黑树的性质和插入结点时的调整

文章目录 红黑树红黑树插入时的调整&#xff1f;1. 插入结点是根结点2. 插入结点的叔叔是红色3. 插入结点的叔叔是黑色LL 型RR型LR型RL型 红黑树 前提&#xff1a;二叉搜索树&#xff08;左 < 根 < 右&#xff09;—— 左根右根和**叶子&#xff08;NULL&#xff09;**都…...

mysql学习教程,从入门到精通,SQL导入数据(44)

1.SQL 导出数据 以下是一个关于如何使用 SQL 导出数据的示例。这个示例将涵盖从一个关系数据库管理系统&#xff08;如 MySQL&#xff09;中导出数据到 CSV 文件的基本步骤。 1.1、前提条件 你已经安装并配置好了 MySQL 数据库。你有访问数据库的权限。你知道要导出的表名。…...

【SpringAI】(二)让你的Java程序接入大模型——适合Java宝宝的大模型应用开发

开始之前&#xff0c;如果你对大模型完全没了解过&#xff0c;建议阅读之前的大模型入门文章&#xff1a; 【SpringAI】&#xff08;一&#xff09;从实际场景入门大模型——适合Java宝宝的大模型应用开发 那么今天就开始写一个基于Spring AI程序的HelloWord!将大模型接入到咱…...

音频剪辑在线工具 —— 让声音更精彩

你是否曾梦想过拥有自己的声音创作空间&#xff0c;却苦于复杂的音频编辑软件&#xff1f;接下来&#xff0c;让我们一同揭开这些音频剪辑在线工具的神秘面纱&#xff0c;看看它们如何帮助你实现从录音到发布的无缝衔接。 1.福昕音频剪辑 链接直达>>https://www.foxits…...

​http短连接和长连接​

参考短连接和长连接 短连接&#xff1a;客户端向服务器每进行一次Http操作&#xff0c;都需建立一次连接&#xff0c;任务完成后&#xff0c;断开连接&#xff1b;长连接&#xff1a;建立长连接后&#xff0c;传输数据的连接将不会中断&#xff0c;客户端每次访问服务器时都会…...

日志分析删除

日志分析 场景 运维嫌弃生产环境打印日志过多&#xff0c;而且日志存储需要费用&#xff0c;让我们减少打印日志大小&#xff0c;所以需要分析日志在哪里打印的过多 解决方案 读取生产日志文件&#xff0c;统计分析打印日志的地方&#xff0c;最后删除代码中打印日志的地方…...

DART: Implicit Doppler Tomography for Radar Novel View Synthesis 笔记

Link&#xff1a;https://wiselabcmu.github.io/dart/ Publish&#xff1a; 2024CVPR Abstract DART主要任务就是用来合成雷达距离多普勒图像range-droppler&#xff0c;可用于生成高质量的断层扫描图像。 Related Work 1 Radar Simulation 基于模型的方法 任务&#xff…...

redis-cli执行lua脚本

连接redis服务器命令 redis-cli -h 10.10.xx.xx -p 6380 -a password执行lua脚本传递KEY VALUE redis-cli -h 10.10.xx.xx -p 6380 -a password key1 key2 , arg1 arg2key和参数通过逗号分割&#xff0c;逗号前后必须有一个空格 如下执行lua脚本示例&#xff1a; -- script.…...

《从零掌握MIPI CSI-2: 协议精解与FPGA摄像头开发实战》-- CSI-2 协议详细解析 (一)

CSI-2 协议详细解析 (一&#xff09; 1. CSI-2层定义&#xff08;CSI-2 Layer Definitions&#xff09; 分层结构 &#xff1a;CSI-2协议分为6层&#xff1a; 物理层&#xff08;PHY Layer&#xff09; &#xff1a; 定义电气特性、时钟机制和传输介质&#xff08;导线&#…...

蓝桥杯 2024 15届国赛 A组 儿童节快乐

P10576 [蓝桥杯 2024 国 A] 儿童节快乐 题目描述 五彩斑斓的气球在蓝天下悠然飘荡&#xff0c;轻快的音乐在耳边持续回荡&#xff0c;小朋友们手牵着手一同畅快欢笑。在这样一片安乐祥和的氛围下&#xff0c;六一来了。 今天是六一儿童节&#xff0c;小蓝老师为了让大家在节…...

WEB3全栈开发——面试专业技能点P2智能合约开发(Solidity)

一、Solidity合约开发 下面是 Solidity 合约开发 的概念、代码示例及讲解&#xff0c;适合用作学习或写简历项目背景说明。 &#x1f9e0; 一、概念简介&#xff1a;Solidity 合约开发 Solidity 是一种专门为 以太坊&#xff08;Ethereum&#xff09;平台编写智能合约的高级编…...

Unit 1 深度强化学习简介

Deep RL Course ——Unit 1 Introduction 从理论和实践层面深入学习深度强化学习。学会使用知名的深度强化学习库&#xff0c;例如 Stable Baselines3、RL Baselines3 Zoo、Sample Factory 和 CleanRL。在独特的环境中训练智能体&#xff0c;比如 SnowballFight、Huggy the Do…...

关键领域软件测试的突围之路:如何破解安全与效率的平衡难题

在数字化浪潮席卷全球的今天&#xff0c;软件系统已成为国家关键领域的核心战斗力。不同于普通商业软件&#xff0c;这些承载着国家安全使命的软件系统面临着前所未有的质量挑战——如何在确保绝对安全的前提下&#xff0c;实现高效测试与快速迭代&#xff1f;这一命题正考验着…...

20个超级好用的 CSS 动画库

分享 20 个最佳 CSS 动画库。 它们中的大多数将生成纯 CSS 代码&#xff0c;而不需要任何外部库。 1.Animate.css 一个开箱即用型的跨浏览器动画库&#xff0c;可供你在项目中使用。 2.Magic Animations CSS3 一组简单的动画&#xff0c;可以包含在你的网页或应用项目中。 3.An…...

华为OD机考-机房布局

import java.util.*;public class DemoTest5 {public static void main(String[] args) {Scanner in new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别while (in.hasNextLine()) { // 注意 while 处理多个 caseSystem.out.println(solve(in.nextLine()));}}priv…...

JavaScript 数据类型详解

JavaScript 数据类型详解 JavaScript 数据类型分为 原始类型&#xff08;Primitive&#xff09; 和 对象类型&#xff08;Object&#xff09; 两大类&#xff0c;共 8 种&#xff08;ES11&#xff09;&#xff1a; 一、原始类型&#xff08;7种&#xff09; 1. undefined 定…...

逻辑回归暴力训练预测金融欺诈

简述 「使用逻辑回归暴力预测金融欺诈&#xff0c;并不断增加特征维度持续测试」的做法&#xff0c;体现了一种逐步建模与迭代验证的实验思路&#xff0c;在金融欺诈检测中非常有价值&#xff0c;本文作为一篇回顾性记录了早年间公司给某行做反欺诈预测用到的技术和思路。百度…...

【C++】纯虚函数类外可以写实现吗?

1. 答案 先说答案&#xff0c;可以。 2.代码测试 .h头文件 #include <iostream> #include <string>// 抽象基类 class AbstractBase { public:AbstractBase() default;virtual ~AbstractBase() default; // 默认析构函数public:virtual int PureVirtualFunct…...