Automatic Scripts

Sometimes, we need to create and run some scripts to do some common tasks automatically. There are some options in our pockets on the basis of scripts.

1. Use Shell scripts:

The shell scripts can get the parameters and use predefined  and special variables to run command for the tasks like file operation,database operation and text handling.

To refresh my memory, special variables are highlighted here: $0=> The name of the command being executed;$n=>There variables correspond to the arguments with which a script was invoked; $#=>The number of arguments supplied to a script; $*=>All the arguments are double quoted;$@=>All the arguments are individually double quoted;$?=>The exit status of the last command executed;$$=>The process number of the current shell.

2. Use shell with Java;

In this way, java business source codes are needed to compile into jar class with depended libraries. Shell scripts invoke the java bin to run java codes.

3.Use other scripts like PHP, Perl and Python;

They are usually installed with the Linux system installation.You will enjoy them if you like them.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Transferred 349/355 items from pretrained weights AMP: running Automatic Mixed Precision (AMP) checks with YOLOv8n... Traceback (most recent call last): File "C:\Users\as729\.conda\envs\mypytorch\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\as729\.conda\envs\mypytorch\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\as729\.conda\envs\mypytorch\Scripts\yolo.exe\__main__.py", line 7, in <module> File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\cfg\__init__.py", line 410, in entrypoint getattr(model, mode)(**overrides) # default args from model File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\engine\model.py", line 372, in train self.trainer.train() File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\engine\trainer.py", line 192, in train self._do_train(world_size) File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\engine\trainer.py", line 276, in _do_train self._setup_train(world_size) File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\engine\trainer.py", line 219, in _setup_train self.amp = torch.tensor(check_amp(self.model), device=self.device) File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\utils\checks.py", line 416, in check_amp assert amp_allclose(YOLO('yolov8n.pt'), im) File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\engine\model.py", line 106, in __init__ self._load(model, task) File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\engine\model.py", line 155, in _load self.model, self.ckpt = attempt_load_one_weight(weights) File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\nn\tasks.py", line 622, in attempt_load_one_weight ckpt, weight = torch_safe_load(weight) # load ckpt File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\ultralytics\nn\tasks.py", line 561, in torch_safe_load return torch.load(file, map_location='cpu'), file # load File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\torch\serialization.py", line 801, in load File "C:\Users\as729\.conda\envs\mypytorch\lib\site-packages\torch\serialization.py", line 287, in __init__ RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory 出现了什么问题 怎么解决
07-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值