上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要: 把用户从某个组移除出去 gpasswd -d <user> <group> 把用户添加到某个组 usermod -aG <group> <user> 查看用户信息 id <user> 添加用户 useradd -m -s /bin/bash <userName> -m: 创建登录目录 -s指定登录s 阅读全文
posted @ 2022-12-21 13:29 王冰冰 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 我想在这种状态中执行js文件,用来调试一些代码,没找到现成的函数,只能是读取文件然后eval了 const fs=require('fs') var dstr='' fs.readFile('./run.js','utf8',function(err,datastr) { if (err) { co 阅读全文
posted @ 2022-12-15 23:52 王冰冰 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Promise对象构造时需要一个参数,这个参数必须是一个函数。 let prom = new Promise(function (resolve, reject) { console.log("Run"); // 进行费时间的异步操作 ... // if(success) { resolve(res 阅读全文
posted @ 2022-12-12 14:09 王冰冰 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 这个变量保存了一些直播间初始信息 window.__NEPTUNE_IS_MY_WAIFU__.roomInitRes.data.playurl_info.playurl.stream 进入直播间,F12在控制台执行: function getUrl(params) { // let stream 阅读全文
posted @ 2022-12-11 12:26 王冰冰 阅读(1449) 评论(0) 推荐(0) 编辑
摘要: linux: du -sh * 2>/dev/null | sort -hr Windows(cygwin/git...): du -sh * 2>NUL | sort -hr 注意这个sort要用git带的sort.exe而不是System32下面的sort 阅读全文
posted @ 2022-12-09 20:01 王冰冰 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 错误的重定向 错误的重定向: python train.py 2>&1 > output.log 这样会导致stdout被正确重定向到文件,但是stderr还在屏幕上。 应该先输出重定向再2>&1 set -euo pipefail -e 出错就退出 -u 变量未定义就退出 -o pipefail 阅读全文
posted @ 2022-12-02 18:05 王冰冰 阅读(16) 评论(0) 推荐(0) 编辑
摘要: awk的命令格式是: awk [options] <script> [file] 遍历file中的每行,并执行<script>中指定的命令。不指定file时默认从stdin读取。 awk -F ':' '{print $1}' /etc/passwd 这里-F ':'是options,指定字符串使用 阅读全文
posted @ 2022-12-02 11:45 王冰冰 阅读(40) 评论(0) 推荐(0) 编辑
摘要: # 所有可用显卡 export CUDA_VISIBLE_DEVICES=$1 # 转成了数组形式 all_cuda_devices=($(echo $CUDA_VISIBLE_DEVICES | sed 's/,/ /g')) # 你要跑的任务(我这里以GLUE的几个任务为例) if (($# > 阅读全文
posted @ 2022-12-01 21:38 王冰冰 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 0. 概念界定 关于分布式训练/多卡训练,我们首先明确一些概念: 并行(parallel) 多个卡训练,所有卡是一个进程或者是多个进程 分布式(Distributed) 多个卡训练,但是每张卡上都是一个单独的进程 但是,在下文中,为了表述的方便性,我们不严格区分“并行”和“分布式”两个概念,不论说并 阅读全文
posted @ 2022-11-29 11:39 王冰冰 阅读(2648) 评论(2) 推荐(0) 编辑
摘要: # 最新办法 编辑`~/.tmux.conf` ``` set -g default-terminal "screen-256color" ``` 一键命令: ``` echo set -g default-terminal \"screen-256color\" >> ~/.tmux.conf ` 阅读全文
posted @ 2022-11-03 19:40 王冰冰 阅读(315) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页