自己写的几个简单常用的脚本

从零开始学写脚本【第一天】 废话我就不多说了,直接开干 新建一个项目 安装selenium selenium是浏览器自动化测试工具. 控制台输入 pip install selenium 下载Chromedriver 浏览器驱动,代码打开浏览器必须要有浏览器的驱动,不同版本的浏览器驱动也是不一样的 下载地址:http://chromedriver.storage.googleapis.com/index.html Google Chrome 浏览器 查看版本 我是... 阅读详情

自己写的几个简单常用的脚本

By:吴垠
Date:2007-02-01
Homepage:http://blog.csdn.net/wooin
Email:lazy_fox#msn.com
版权信息:该文章版权由吴垠和他可爱的老婆小包子所有。可在非商业目的下任意传播和复制。对于商业目的下对本文的任何行为需经作者同意。
联系方式:lazy.fox.wu#gmail.com


1.清除一个svn工作目录中的所有.svn文件夹,包括所有的子目录,使其成为一个普通的文件夹,不再受svn控制。
 1 #!/bin/sh
2 #################################################################################
3 # Filename: svn_clear
4 # Author: Wu Yin(吴垠)
5 # Email: lazy_fox@gmail.com
6 # Created: 2007-10-26
7 # Description: Clear a svn working copy, make it a nomal directory.
8 # Usage: svn_clear [PATH]
9 # "svn_clear" will remove all the ".svn" directory recursively
10 # from the PATH you gived. The current directory by default.
11 #################################################################################
12
13 WORK_PATH=$1
14 if [ -z "$WORK_PATH" ]; then
15 WORK_PATH="."
16 fi
17
18 for files in `tree -difa $WORK_PATH | grep '.svn$'`
19 do
20 echo "Cleaning" $files " ... "
21 rm -rf $files
22 done
23
2.在所给路径下,或但前路径下创建新的tag文件,或者重建现存的tag文件,tag文件包括Ctags文件和Cscope文件。运行该脚本后应该会生成或更新以下几个文件。
  cscope.in.out
  cscope.out
  cscope.po.out
  tags
 1 #!/bin/sh
2 #################################################################################
3 # Filename: tag_rebuild
4 # Author: Wu Yin(吴垠)
5 # Email: lazy_fox@gmail.com
6 # Created: 2007-9-19
7 # Description: Rebuild Ctags and Cscope files at the path you assign
8 # Usage: tag_rebuild [PATH]
9 # "tag_rebuild" will rebuild the Cscope tag file and Ctags
10 # tag file at the PATH you gived. The current directory by default.
11 # The following files will be created or rebuilded after you
12 # run "tag_rebuild".
13 # > cscope.in.out
14 # > cscope.out
15 # > cscope.po.out
16 # > tags
17 ################################################################################
18
19 WORK_PATH=$1
20 if [ -z "$WORK_PATH" ]; then
21 WORK_PATH="."
22 fi
23
24 cd $WORK_PATH
25
26 echo "Cscope ... " $WORK_PATH
27 cscope -bqR
28 echo "Ctags ... " $WORK_PATH
29 ctags -R --fields=+lS
30
  
  
  
  
  
  
  
  

 
用python写游戏脚本原来这么简单 前言 最近在玩儿公主连结,之前也玩儿过阴阳师这样的游戏,这样的游戏都会有个初始号这样的东西,或者说是可以肝的东西。 当然,作为一名程序员,肝这种东西完全可以用写代码的方式帮我们自动完成。游戏脚本其实并不高深,最简单的体验方法就是下载一个Airtest了,直接截几个图片,写几层代码,就可以按照自己的逻辑玩儿游戏了。 当然,本篇文章不是要讲Airtest这个怎么用,而是用原始的python+opencv来实现上面的操作。 这两天我写了一个公主连结刷初始号的程序,也不能算写游戏脚本的老手,这篇文章主要 阅读详情

相关推荐

【unity】几个常用脚本

1.让人物自动到达点击位置 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; public class Hero : MonoBehaviour { public NavMeshAgent agent; public Ani...

burningdzb的博客 4763

如何用python写游戏脚本?

前言 最近在玩儿公主连结,之前也玩儿过阴阳师这样的游戏,这样的游戏都会有个初始号这样的东西,或者说是可以肝的东西。 很多人学习python,不知道从何学起。 很多人学习python,掌握了基本语法过后,不知道在哪里寻找案例上手。 很多已经做案例的人,却不知道如何去学习更加高深的知识。 那么针对这三类人,我给大家提供一个好的学习平台,免费领取视频教程,电子书籍,以及课程的源代码! QQ群:101677771 当然,作为一名程序员,肝这种东西完全可以用写代码的方式帮我们自动完成。游戏脚本其实并不高深,最简

Python学习Q群696455390 1万+

【3dsMax】如何用VSocde写最简单的MaxScript脚本

今天学习了YivanLee大佬两年前写的MaxScript教程,附上链接:https://blog.csdn.net/qq_16756235/article/details/79084103

阿夜 4596

如何写SHELL脚本?尝试自己编写一个简单脚本

背景 现在多数的服务器都是Linux系统的,需要通过shell来进行操作,而利用shell脚本,可以大大提高开发维护的效率。 知识剖析 什么是shell shell是一个命令行解释器,它为用户提供了一个向Linux内核发送请求以便于运行程序的界面系统级程序,用户可以用shell来启动,挂起,停止甚至是编写一些程序。 shell还是一个功能强大的编程语言,易编写,易调试。shell是解释执...

Sterlingfox的博客 6351

自己编写的脚本

NULL 博文链接:https://ktc7000.iteye.com/blog/1754507

一个自己写的脚本

正在翻查的时候看到了这个…… 仔细检查一下发现还是有用的……

一篇文章教会你如何编写一个简单的Shell脚本

Shell 脚本是一种用于自动化执行一系列命令和操作的脚本文件。它使用的是 Shell 解释器(如 Bash、Korn Shell、Zsh 等)来解释和执行其中的命令。Shell 脚本通常用于编写简单的任务和工作流程,可以帮助我们进行系统管理、批量处理、自动化部署等任务。

来日可期的博客 1万+

自己编写的HFSS脚本

用于matlab控制HFSS建模的脚本,在原始脚本api基础上扩充了一些工具包

从零开始构建:Python自定义脚本自动化你的日常任务

Python 作为一种简洁且功能强大的编程语言,被广泛应用于各种自动化任务中。通过编写 Python 脚本,你可以轻松地将日常重复性工作自动化,例如文件操作、数据处理、网络爬虫、系统管理等。这篇博客将从零开始,带你构建自定义 Python 脚本,实现对一些常见任务的自动化。通过 Python 自定义脚本,你可以轻松实现日常任务的自动化。本文展示了三个典型的自动化任务:文件管理、邮件发送和网页爬取。你可以根据自己的需求,编写更多脚本并将它们整合到自动化工作流中,提升工作效率。

萧鼎的博客 3753

ORCAD原理图关联封装时出现ERROR(ORCIS-6245)、ERROR(ORCIS-6013)问题

1、当你进行如下操作时: 系统先是提示你出现ERROR(ORCIS-6245)然后再确定后再出现ERROR(ORCIS-6013)问题 是由于你的数据库的路径不对。 具体操作方法如下:1、先找到你的CAPTURE.INI文件。 2、用记事本打开CAPTURE.INI。找到下图路径 3、在你的Orcad capture CIS原理图软件中点击 Options------>CIS con...

weixin_42304393的博客 2万+

pgsql行列转换

‌是PostgreSQL中的一个函数,用于将一个字符串根据正则表达式进行分割,并将结果返回为一个表格,每个分割后的部分作为一行‌‌。string_agg() 函数是 PostgreSQL 中的一个聚合函数,用于将一个列中的值连接成一个字符串。

chimchim66的博客 3513

mongodb和shell脚本交互

再看第二个例子:这个例子也是使用EOF之间写mongo命令,下面的例子主要说明mongodb命令如何使用shell中的变量,即例子中的变量。linux,经常要使用shell脚本写一些mongodb的简单操作,我总结了工作中经常用的几个方法。上述例子中,两个EOF之间的语句,不能有空格,tab等,直接顶格写命令。再看第三个例子:稍微复杂点的例子,主要是说明。第四个例子,这个例子主要说明,find出来的。json数据如何解析。

路过我的生活呀 647

基于AutoDL复现A-LOAM

Ceres solver 是谷歌开发的一款用于非线性优化的库,在谷歌的开源激光雷达slam项目cartographer中被大量使用。在autodl上面租服务器,地区我租的重庆A区的,GPU我选择的是RTX4090,基础镜像选择的是Miniconda / conda3 / 3.8(ubuntu20.04)/11.6。在AutoDL中我使用的方式是先将该数据集先下载到自己的电脑上,然后再上传到虚拟机中。用MobaXterm解决该问题!搜到的一个解决方式:该问题属于ceres版本问题,将A-LOAM下的。

m0_61281610的博客 1948

分享几个常用的运维 shell 脚本

给大家分享几个常见的 Linux 运维脚本

s_alted的博客 5075

Windows下用Mingw+CMake搞定acados非线性求解器:从环境配置到Matlab联调全流程

本文详细介绍了在Windows平台下使用Mingw和CMake部署acados非线性求解器的全流程,包括环境配置、源码编译、Matlab联调及性能优化。通过实战指南,帮助开发者高效完成工具链搭建与求解器集成,显著提升工程优化与控制任务的执行效率。

ss78901的博客 982

Vek385评估板(二):板子联网 & memtester安装(LPDDR5X测试)

继上一篇文章:Vek385评估板(一):EDF成功烧录启动及一些问题。 本章完成最主要的两个功能:开发板联网+内存 memtester。因为我是做测试行业的,所以这两个是最想试的。内存测试,除了FPGA测,也可以系统级测,本次在versal上实现这个功能,主要是可以应急。在没有安卓、X86的情况下,可以使用本方案测试。 下一篇会继续做一些其他功能。

千歌叹尽执夏的博客 226

Python 写过的几个有趣的脚本

学习这件事从来都是讲方法、看行动的,如果你不知道编程的架构,那买一本python书,仔细研究目录,python有哪些部分组成就能一清二楚。github上有个python项目,里面提供了几百个(可能上千)小脚本,涉及到算法、文件、文本、图像、视频、音乐、爬虫、邮件、可视化、系统、下载等各种常用场景的处理脚本。用python写小脚本确实是一件好玩的事情,因为不是个大活儿,而且能解决眼边前十分繁琐的事情,这种轻松且便宜的代码颇受人民群众的欢迎~有点生活小妙招的意味。获得1万9的赞,说明颇有群众基础。

分享Python、数据分析、人工智能前沿知识 542

21、深入了解SELinux安全系统与/proc文件系统

本文深入探讨了SELinux安全系统与/proc文件系统的原理及实际应用。详细介绍了SELinux的安全上下文、域转换、运行模式、角色管理以及策略查看工具seinfo的使用;同时解析了/proc文件系统的结构与功能,涵盖进程信息查看、系统资源监控及性能优化方法。结合SELinux与/proc的协同应用,提供了系统问题排查流程与安全管理最佳实践,帮助用户提升Linux系统的安全性与稳定性。

ik678901234的博客 67

如何写一个Shell脚本及其简单语法讲解

Linux中.sh文件是脚本文件,一般都是bash脚本。文件后缀名为.sh,其中包含一系列要由操作系统的命令解释器执行的命令。在 Unix 和类 Unix 操作系统中,通常使用 Bourne Shell(sh)或其衍生的 Shell(如 Bash、Zsh)来执行这些脚本,本文叙述的都是Bash Shell脚本。

weixin_52465385的博客 4941

YooAsset 学习

YooAssets使用教程

weixin_44884538的博客 1664

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

用Python写游戏脚本原来这么简单

游戏这种东西完全可以用写代码的方式帮我们自动完成。游戏脚本其实并不高深,最简单的体验方法就是下载一个Airtest了,直接截几个图片,写几层代码,就可以按照自己的逻辑玩儿游戏了。 当然,本篇文章不是要讲Airtest这个怎么用,而是用原始的python+opencv来实现上面的操作。 这两天我写了一个公主连结刷初始号的程序,也不能算写游戏脚本的老手,这篇文章主要是分享一些基础的技术和使用上的心得吧。 准备工作 首先,我们要完成以下准备。 安卓设备一个:模拟器或者真机都可以。 安装ADB,并添

shunshunss的博客 1万+

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

使用脚本猫写一个简单的脚本

安装脚本猫,脚本教程、脚本使用,油猴脚本

Fadess的博客 6245

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

几个简单有趣的shell脚本

1.猜数字 #!/bin/bash # 脚本生成一个 100 以内的随机数,提示用户猜数字,根据用户的输入,提示用户猜对了, # 猜小了或猜大了,直至用户猜对脚本结束。 # RANDOM 为系统自带的系统变量,值为 0‐32767的随机数 # 使用取余算法将随机数变为 1‐100 的随机数 num=$[RANDOM%100+1] echo "$num" # 使用 read 提示用户猜数字 # 使用 if 判断用户猜数字的大小关系:‐eq(等于),‐ne(不等于),‐gt(大于),‐ge(大于

学习 记录 总结 分享 6479

python写简单的脚本-用python写游戏脚本原来这么简单

前言最近在玩儿公主连结,之前也玩儿过阴阳师这样的游戏,这样的游戏都会有个初始号这样的东西,或者说是可以肝的东西。当然,作为一名程序员,肝这种东西完全可以用写代码的方式帮我们自动完成。游戏脚本其实并不高深,最简单的体验方法就是下载一个Airtest了,直接截几个图片,写几层代码,就可以按照自己的逻辑玩儿游戏了。当然,本篇文章不是要讲Airtest这个怎么用,而是用原始的python+opencv来实...

weixin_37988176的博客 3394
上一篇: 也晒一下我的Linux玩具清单
下一篇: rpm vs. dpkg 常用參數對照
wooin
博客等级 码龄25年 925粉丝 29原创
评论 10
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值