2.5云计算python作业

我的云计算作业2 【代码】我的云计算作业2。 阅读详情

1.使用正则完成下列内容的匹配
- 匹配陕西省区号 029-12345
- 匹配邮政编码 745100
- 匹配邮箱 lijian@xianoupeng.com
- 匹配身份证号 62282519960504337X

import re
# 定义各类内容的正则表达式
patterns = {
    "陕西省区号": r"^029-\d{5,}$",
    "邮政编码": r"^\d{6}$",
    "邮箱": r"^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$",
    "身份证号": r"^\d{17}[\dXx]$"
}
test_cases = {
    "陕西省区号": ["029-12345", "029-678901"],
    "邮政编码": ["745100", "100000"],
    "邮箱": ["lijian@xianoupeng.com", ],
    "身份证号": ["62282519960504337X"]
}

def match_content():
    for content_type, pattern in patterns.items():
        print(f"\n===== 匹配【{content_type}】=====")
        regex = re.compile(pattern)
        for case in test_cases[content_type]:
            result = "匹配成功" if regex.match(case) else "匹配失败"
            print(f"{case} → {result}")

match_content()

从触觉到视觉:GelSight传感器的工作原理与实战应用指南 本文深入解析了GelSight光学触觉传感器的核心工作原理,它通过将物理接触转化为视觉图像,为机器人提供了高精度的触觉感知。文章详细介绍了其在工业微观缺陷检测、机器人灵巧操作等领域的实战应用,并提供了从系统搭建到算法开发的完整指南,帮助工程师将这一前沿技术落地于实际项目。 阅读详情

相关推荐

Unable to negotiate with XXXX port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

打开ssh_config此文件,滑动到最下面,新增自己git主机地址(这里我直接默认*)执行命令 git clone git@xxxxxxxxxxxxx.git。代码仓库已经添加了ssh公钥之后,克隆代码到本地时就报了这个问题。首先是找到git安装目录(根据自己安装时选项,找到这个目录)再进入ssh目录,找到 ssh_config 配置文件。配置完成后,保存配置文件后再次去clone代码。直接复制下面这一段到文件中最底部位置即可。然后进入 etc目录,找到ssh目录。终于可以克隆下来了。

萌兔兔MMQ!! 3353

云计算作业

答: Python动态类型特性:变量类型由赋值决定,运行中可灵活改变类型。如 a = 5 (整型),之后 a = "abc" (转为字符串型 )。

YJSren123456的博客 1120

TT电机、310电机、370电机在智能小车与机器人中的性能对比与选型指南

本文深入对比了TT电机、310电机和370电机在智能小车与机器人项目中的核心性能差异。文章从尺寸、扭矩、转速、电压电流等关键参数入手,结合不同应用场景(如入门小车、竞技机器人、机械臂),提供了清晰的选型指南和驱动控制建议,帮助开发者根据项目需求选择最合适的电机方案。

weixin_29065015的博客 408

云计算python课第二次作业

答:嵌套循环是在一个循环体内包含另一个完整的循环结构。原理:外层循环每执行一次,内层循环会完整执行所有迭代。

WhvEE的博客 676

DataEaseV2.9 本地开发环境搭建与调试指南

本文详细指导如何搭建DataEase V2.9的本地开发环境,涵盖从软件准备、源码获取、数据库初始化到在IDEA中配置、编译和调试的全过程。重点解决了本地运行环境的关键配置与常见问题,帮助开发者高效开启DataEase的定制化开发与二次开发。

weixin_29290863的博客 141

论文阅读—Square Attack: a query-efficient black-box adversarial attack via random search

论文阅读—Square Attack: a query-efficient black-box adversarial attack via random search 发表位置 ECCV 2020 摘要 作者提出了一种基于得分的黑盒Square attack,该模型不依赖于模型的局部梯度信息,因此可以绕过梯度隐藏防御攻击。Square Attack是一种随机搜索方法,它在随机位置选择局部的方形更新,使得每次迭代时扰动近似位于可行集的边界。 背景 当涉及到对安全至关重要的机器学习应用时,对抗性的例子尤其值得

yayayamaomaoya的博客 2493

Python语言的云计算

在实现云计算的过程中,开发者需要选择合适的云计算平台。

2501_90485516的博客 437

FLUKA软件在Ubuntu的安装指南(亲测有效)

FLUKA其强大的蒙特卡洛模拟能力使得用户能够模拟复杂的辐射相互作用过程

chencheng1127的博客 2885

Python程序设计 作业2

简述Python语言的优缺点,并举例说明部分应用领域。 优点: 1.简单易学。 Python对于没有编程功底的⼈员来说,不但入门容易,而且将来深入下去,可以编写那些非常非常复杂的程序。相对于其他的语言来说,Python的代码更加简洁,相同的功能,使用Python语言,代码量要远低于其他编程语言。 2.开发效率非常高。 Python有非常强大的第三方库,基本上你想通过计算机实现任何功能,Python官方库里都有相应的模块进行支持,直接下载调用后,在基础库的基础上再进行开发,大大降低开发周期,避免重复造轮子.

如许的博客 1440

AIR780E二次开发点灯(LuatOS)

Air780E的LuatOS点灯教程,二次开发教程,可用于所有ec618平台,无需SDK

rootuseres的博客 1万+

VMware16虚拟机:下载和安装教程

VMware16 虚拟机 下载和安装教程

MQ0522的博客 20万+

大作业合集

今天开始整理大作业。 大一 用 英语描述 安装Apache 云计算开放实验   主要为云计算资源调度优化算法的C语言代码实现。算法包括:Min-min, Min-max, RelativeCost, Sufferage, PenaltyBased, ListSufferage, TPB。最后对7个算法进行分类总结。现在看看当时的文档,还是非常简陋。 p...

大美mixer的博客 2869

1、微软 Intune 全面指南:配置、管理与自动化

本文全面介绍了微软 Intune 的配置、管理和自动化操作,涵盖用户与设备管理、安全策略设置、跨平台应用部署、合规性监控及报告分析等内容。通过详细的操作步骤、自动化脚本示例和流程优化建议,帮助技术人员高效掌握 Intune 在混合办公环境中的实际应用,并展望其未来发展趋势。

ii567的博客 359

【亲测免费】 探索LSF Python API:高效管理作业的利器

探索LSF Python API:高效管理作业的利器 在当今的计算密集型环境中,高效管理和调度作业是确保系统性能和资源利用率的关键。IBM Spectrum LSF Python API为这一挑战提供了一个强大的解决方案。本文将深入介绍这一开源项目的核心功能、技术特点以及应用场景,帮助您更好地理解和利用这一工具。 项目介绍 LSF Python API 是一组Python封装库,允许用户直接从Py...

gitblog_00583的博客 479

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

IEM模型,地表粗糙度模拟

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

云计算作业2

答:嵌套循环就是在一个循环内部还包含着另一个循环的结构工作原理:外层循环每执行一次,内层循环就会完整执行一次。

2401_86194191的博客 460

深度学习工具包 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")

云计算第四次作业

【代码】云计算第四次作业。

2401_88094907的博客 174

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

作业一(python初认识)

一、python发展历史 1989,为了度过圣诞假期,Guido开始编写Python语言编译器。Python这个名字来自Guido的喜爱的电视连续剧《蒙蒂蟒蛇的飞行马戏团》。他希望新的语言Python能够满足他在C和Shell之间创建全功能、易学、可扩展的语言的愿景。今天,世界上有将近600种编程语言,但也有20种流行语言。如果你听说过TIOBE排名,你知道编程语言的普遍流行。这是过去...

baiwang9518的博客 272

云计算作业1

*答:**变量不需要提前声明类型,返回值也没有类型约束。

2401_86194191的博客 635

云计算pyhton第一次作业

【代码】云计算pyhton第一次作业。

MuQiu_LY的博客 181

云计算第二次作业

【代码】云计算第二次作业。

2401_88094907的博客 136

云计算python第一次作业

【代码】云计算python第一次作业。

2401_88094907的博客 221

云计算python第六次作业

1.讲控制台用户登录注册购买英雄案例

weixin_75191505的博客 141

python相关作业5

(1)解释 Linux 中的符号链接和硬链接硬链接 (Hard Link) 特点: 硬链接是文件系统中同一个 inode(索引节点)的多个文件名 每个硬链接都是文件的一个直接引用,它们共享相同的 inode 和数据块 删除其中一个硬链接并不会影响其他硬链接对文件的访问 只有当所有硬链接都被删除时,文件的数据块才会被真正释放 硬链接不能跨文件系统,也不能链接到目录(除了特殊情况) 软链接 (Symbolic Link / Soft Link) 特点: 软链接是一个特殊的文件,它包含了指向另一个文件或目录的路径

2302_80953964的博客 1060
上一篇: 2.3云计算python作业
下一篇: 云计算lvs项目知识点总结
UseLessQQ
博客等级 码龄3年 73粉丝 42原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值