摘要: 1. 开启内核隔离后只能通过注册表关闭 2. 开启内核隔离后, 默认会启动hybrid-v, 这个东西和虚拟机是冲突的, 这样就用不了虚拟机了. 3. 解决方法: 关闭内核隔离后, 再关闭已经开启的hybrid-v 基本参考下面, 可能要重复几次才能有效的关闭hybrid-v Powering on 阅读全文
posted @ 2019-03-11 23:09 酱_油 阅读(3242) 评论(0) 推荐(0) 编辑
摘要: 下载socat 在客户端: socat file:`tty`,raw,echo=0 tcp-listen:4444 在服务端: socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444 如此即可创建功能完全的反向she 阅读全文
posted @ 2019-03-11 23:08 酱_油 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 笔记本电脑电池坏了, 换了块电池, 顺手装了一下这个电源管理软件. https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html 阅读全文
posted @ 2019-03-11 23:07 酱_油 阅读(221) 评论(0) 推荐(0) 编辑
摘要: dataparallel not working on nvidia gpus and amd cpus https://github.com/pytorch/pytorch/issues/13045 问题: 多卡运行时, 网络会卡在那里不能运行. 系统是 AMD Ryzen5 1600x 和 两张 阅读全文
posted @ 2019-03-11 23:06 酱_油 阅读(4396) 评论(0) 推荐(0) 编辑
摘要: Sort和UnSort的小技巧: 记录sortidx,对sortidx再从小到大排序就可以得到用于还原的unsortidx. 对于序列A: 阅读全文
posted @ 2019-03-11 19:48 酱_油 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 在PyCharm中进行代码调试的时候, 设置修改的模块自动重新载入是非常方便的 阅读全文
posted @ 2019-03-11 19:44 酱_油 阅读(876) 评论(0) 推荐(0) 编辑
摘要: PySide2是QT官方出的Python的QT封装, 不过默认安装运行时候会有一些小问题, 可能是系统里已经安装过其他版本QT的原因, 会报错如下: 可以通过添加环境变量来解决: 阅读全文
posted @ 2019-03-11 19:42 酱_油 阅读(2426) 评论(0) 推荐(0) 编辑
摘要: 经常会有画图找不到合适颜色的尴尬情景, 在网上找到一张matplotlib可以用的颜色图: 阅读全文
posted @ 2019-03-11 19:39 酱_油 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 比较靠谱的方法, 通过构造UDP包获得本机IP地址 python -c "import socket;print([(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.A 阅读全文
posted @ 2019-03-11 19:32 酱_油 阅读(154) 评论(0) 推荐(0) 编辑
摘要: VSCode虽然好用, 但是有些用户体验实在非常差, 比如这种往上面弹的类型提示... 在用户设置中增加: "editor.parameterHints": false 阅读全文
posted @ 2019-03-11 19:31 酱_油 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 让树莓派可以开机就连接制定的wifi, 可以通过wpa_supplicant来实现. 在 /etc/wpa_supplicant 下写一个配置文件: wpa_supplicant.conf 内容如下: 如果不想写也可以通过wpa_cli来设置, 前面三行一定要保留下来. 阅读全文
posted @ 2019-03-11 19:29 酱_油 阅读(8775) 评论(0) 推荐(0) 编辑
摘要: 以 Ubuntu 16.04为例: Docker里的root密码是随机的, 用passwd来设置新的密码 安装完SSH_SERVER后, 默认是不能用root登录的. vi /etc/ssh/sshd_config将PermitRootLogin no 改为 PermitRootLogin yes将 阅读全文
posted @ 2019-03-11 19:27 酱_油 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 在双系统中,ntfs可能会应为windows的缓存而挂载失败.可用下面命令修复. Use ntfsfix in the terminal, even if you can't access Windows where XY is the partition, e.g. a2 (/dev/sda2) 阅读全文
posted @ 2019-03-11 19:27 酱_油 阅读(1899) 评论(0) 推荐(0) 编辑
摘要: 有时一个目录下的文件实在太多, ls的时候就卡住了. 其实, 如果不加排序的话, 就可以迅速的显示文件. 阅读全文
posted @ 2019-03-11 19:25 酱_油 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 升级过程: 直接do-release-update 就可以直接从16.04更新到18.04了. 中间会提升更新一些配置文件, 我大部分都选择了N. 然后就成功升级到18.04了, 显卡驱动什么的都没有问题!!! 以下记录之后可能会碰到的坑: DNS错误: 上网的时候出现了dns错误. 可能的原因: 阅读全文
posted @ 2019-03-11 17:14 酱_油 阅读(1168) 评论(0) 推荐(0) 编辑
摘要: 直接安装Synergy 不行的话加配置文件 已经预编译好的程序: http://www.afzaalace.com/synergy-stable-builds/ 阅读全文
posted @ 2019-03-11 17:13 酱_油 阅读(305) 评论(0) 推荐(0) 编辑
摘要: Ubuntu新建用户并加入SUDO组 新建用户: adduser xxxx 加入用户组: usermod -aG sudo username 阅读全文
posted @ 2019-03-11 17:11 酱_油 阅读(2726) 评论(0) 推荐(0) 编辑
摘要: 1. 安装 sudo apt install nfs-kernel-server 2. 配置 sudo vi /etc/exports /mnt/NewDisk *(rw,sync,no_root_squash,no_subtree_check) 3. 重启服务 sudo service nfs-k 阅读全文
posted @ 2019-03-11 17:10 酱_油 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 在安装显卡驱动时, 可能需要关闭GUI, 在终端中输入: 阅读全文
posted @ 2019-03-11 17:09 酱_油 阅读(1054) 评论(0) 推荐(0) 编辑
摘要: 兼容tar.gz 多线程的解压工具, 用于解压大文件时使用. https://zlib.net/pigz/ 方法: 1. 安装pigz 2. 使用tar时,选择pigz tar --use-compress-program=pigz xxxxxxxxxxxxx 阅读全文
posted @ 2019-03-11 17:03 酱_油 阅读(4326) 评论(0) 推荐(0) 编辑