2
0
mirror of https://github.com/LCTT/TranslateProject.git synced 2025-02-16 00:21:12 +08:00

Merge pull request from LCTT/master

update 0726
This commit is contained in:
SamMa 2021-07-26 13:16:49 +08:00 committed by GitHub
commit a503dd813a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 1765 additions and 810 deletions
published
sources
translated

View File

@ -0,0 +1,50 @@
[#]: collector: "lujun9972"
[#]: translator: "Arzelan"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-13610-1.html"
[#]: subject: "6 evening rituals for working in tech"
[#]: via: "https://opensource.com/article/20/11/evening-rituals-working-tech"
[#]: author: "Jen Wike Huger https://opensource.com/users/jen-wike"
IT 人的 6 个晚上放松方式
======
> 在结束了一天的远程会议、邮件往来、写代码和其他协作工作后,你在晚上如何放松自己呢?
![](https://img.linux.net.cn/data/attachment/album/202107/24/100720afeq20kf2wfp4qwi.jpg)
这个奇怪的时代一方面给我们放慢脚步的机会,但另一方面来说,却比以前更忙了,尤其是当你除了照顾自己还要照顾家人的时候。俗话说,空杯子倒不出酒。所以,让我们看看在关上电脑或者完成最后一件工作之后,能为自己做些什么?
1、走出家门做几次深呼吸不要在乎是不是下雪天让新鲜的空气从肺部充满全身。如果可以的话在院子里走走或者去街上逛逛。
2、如果有时间的话给自己沏杯茶红茶含有咖啡因最好不要晚上喝可以喝绿茶或者花果茶然后在你穿上鞋或许还有外套时让它稍微凉一下。把茶倒在保温杯里在小区周围散散步。不用设置目标或者目的地就随便走走。如果你时间不充裕的话可以定一个 15 分钟的闹钟。
3、放一首突然想到的歌或者听之前想听但是一直没机会听的歌。
4、如果你有时间的话别在椅子上继续坐着可以站起来跳一段舞活动活动或者到床上平躺着躺着的时候什么也不要想放空自己让大脑休息休息。研究表明给大脑一段空白时间后可以更好的思考。
5、打开你的 [电子书应用][2] 或者拿起一本纸质书,看纸质书相对来说对眼睛好点。享受轻松的阅读,如果不能长时间阅读的话,起码给自己留出能阅读一个章节的时间。
6、制做一些美食。享受把从杂货店买到的基本的食材按照菜谱做成一份美味佳肴的成就感和兴奋感。
你也可以在晚上把其中一些综合起来做,好好放松。如果你是 IT 人,那么无论是在 [早上][3]、中午、晚上用这些方式放松都很有效,因为现在我们都是在家工作,远程办公,没有和同事面对面交流时的闲暇。
那么,你的晚上放松方式是什么?
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/evening-rituals-working-tech
作者:[Jen Wike Huger][a]
选题:[lujun9972][b]
译者:[Arzelan](https://github.com/Arzelan)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jen-wike
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDUCATION_jadud_farm-road.png?itok=of8IuSM5 "A farm road"
[2]: https://opensource.com/article/20/2/linux-ebook-readers
[3]: https://opensource.com/article/20/10/tech-morning-rituals

View File

@ -0,0 +1,197 @@
[#]: subject: (Configuring Vim as a Writing Tool)
[#]: via: (https://news.itsfoss.com/configuring-vim-writing/)
[#]: author: (Theena https://news.itsfoss.com/author/theena/)
[#]: collector: (lujun9972)
[#]: translator: (piaoshi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-13607-1.html)
将 Vim 配置成一个写作工具
======
> 我使用 Vim 来写小说。我是这样配置它的。
![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/05/Setting-Up-Vim-for-Writing.jpg?w=1200&ssl=1)
在我的第一个专栏中,我谈到了我为什么把 [我的写作工作迁移到了 Vim 上][1] —— 远离了现代写作者们的标准工具如文字处理器MS Word 及它的开源替代方案)、文本编辑器(记事本,因为直到去年我一直是 Windows 用户)和云存储技术。如果你是一个写作者,在继续下面的内容前,我建议你先阅读一下 [那篇文章的第一部分][1] 。
基本上可以说,你使用的设备越多,你需要的写作工具就越多,最终你的工作流程就越复杂。这一点对我来说是很贴切的,因为我有四台设备,包括一部安卓手机,一台日常用的运行 Linux 的主力笔记本电脑,还有两台旧的笔记本电脑,其中一台是 Mac我去户外拍摄时会带着它。
Vim 对于我和我的工作方式来说是一个完美的解决方案;虽然我不会说我的新的工作流程是现代写作者工作的最佳方式,但我可以说的是,对于写作者来说,拥有一个能在我们所有设备上工作的工具非常重要的,并且这个工具要足够强大以满足我们写作者每天从事的不同类型的写作需求。
从这个角度来看Vim 的主要优势是它是跨平台的 —— 无论在什么设备上Vim 都能工作。在苹果生态系统中使用 Vim 的情况我就不细说了,但粗略地看一下 [这个应用程序][2] 的评论,我就会知道,总会有人在各种地方使用 Vim不管他们使用的是什么设备。
现在我们假设你是一个想开始使用 Vim 的写作者。当你安装了它,你该从哪里开始呢?
我在这一部分给你的并不算是教程,而是一系列的建议,包含对一个用于诗歌写作的 `.vimrc` 配置文件的解读。只要有可能,我就会链接到我学习相应内容时用到的 YouTube 上的教程。
对于 Linux 用户来说,系统已经预装了 Vim —— 通过你喜欢的终端模拟器就可以启动它。对于 Windows 和 Mac 用户,你可以从 [Vim 官方网站][3] 下载它。
### 建议
**安装/启用 Vim 后**
* 通过终端打开 Vim Tutor。Mac 用户可以用这种方式启动,而 Windows 用户也可以用这种方法启动。[LCTT 译注:原文这里本应该有链接,可能作者忘记添加了。无论如何,在终端中, Linux 中的命令是 `vimtutor`Windows 在安装目录下找到 `vimtutor.bat` 命令并运行Mac应该与 Linux 一样?我没 Mac 呀!])在这个阶段,你不会使用 Vim 进行任何写作 —— 相反,你要每天花 15 分钟做 Vim 教程。不要多花一分钟或少花一分钟;看看在规定的 15 分钟内,你能在教程中取得多大的进展。你会发现,每天你都会在教程中取得更大的进步。在一个月内,你应该能够利用这些 15 分钟完成整个教程。
* 成为一个更好的打字员对 Vim 的使用来说有极大的好处。这不是必须的,但我正在重新学习打字,它的副作用是使 Vim 变得更加有用了。我每次都以花 15 分钟练习打字开始,作为进入 Vim 教程前的热身。
在每一天的开始,我分配了 30 分钟的时间做这两项练习进行热身,而每天晚上睡觉前再分配 30 分钟进行练习以让我安定下来。这样的做法帮我快速从旧的工具包过渡到了 Vim但你的安排可能有所不同。
我再次强调,**除了 Vim Tutor 之外**,上述步骤都是可选的;这完全取决于你个人的动机水平。
现在我们来到了这篇文章的重点:如何配置 Vim ,使它对写作者友好?
### 如何配置用于写作的 .vimrc
在开始之前,我想在这里提醒各位读者,我不是一个技术人员 —— 我是一个小说家 —— 你在下面看到的任何错误都是我自己的;我希望有经验的 Vim 用户能提供反馈,告诉我如何进一步完善我的配置文件。
下面是我的 `.vimrc` 文件。你可以从我的 [GitHub][4] 上下载,并进一步完善它:
```
syntax on
set noerrorbells " 取消 Vim 的错误警告铃声,关闭它以免打扰到我们
set textwidth=100 " 确保每一行不超过 100 字符
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set linebreak
set number
set showmatch
set showbreak=+++
set smartcase
set noswapfile
set undodir=~/.vim/undodir
set undofile
set incsearch
set spell
set showmatch
set confirm
set ruler
set autochdir
set autowriteall
set undolevels=1000
set backspace=indent,eol,start
" 下面的设置确保按写作者而不是程序员喜欢的方式折行
set wrap
nnoremap <F5> :set linebreak<CR>
nnoremap <C-F5> :set nolinebreak<CR>
call plug#begin('~/.vim/plugged')
" 这是颜色风格插件
Plug 'colepeters/spacemacs-theme.vim'
Plug 'sainnhe/gruvbox-material'
Plug 'phanviet/vim-monokai-pro'
Plug 'flazz/vim-colorschemes'
Plug 'chriskempson/base16-vim'
Plug 'gruvbox-community/gruvbox'
" 这是为了更容易的诗歌写作选择的一些插件
Plug 'dpelle/vim-LanguageTool'
Plug 'ron89/thesaurus_query.vim'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
Plug 'reedes/vim-pencil'
Plug 'reedes/vim-wordy'
" 这一部分是为了更容易地与机器集成,用了 vim-airline 这类插件
Plug 'vim-airline/vim-airline'
" 这一部分外理工作区和会话管理
Plug 'thaerkh/vim-workspace'
" 与上面插件相关, 下面的代码将你的所有的会话文件保存到一个你工作区之外的目录
let g:workspace_session_directory = $HOME . '/.vim/sessions/'
" 与上面插件相关,这是一个 Vim 活动的跟踪器
Plug 'wakatime/vim-wakatime'
" 一个干扰因素:我在这里使用了一些 Emacs 的功能,特别是 org-mode
Plug 'jceb/vim-orgmode'
" 这是文件格式相关插件
Plug 'plasticboy/vim-markdown'
call plug#end()
colorscheme pacific
set background=dark
if executable('rg')
let g:rg_derive_root='true'
endif
```
学习如何安装 Vim 插件时,这个[教程](https://www.youtube.com/watch?v=n9k9scbTuvQ)帮助了我。我使用 Vim Plugged 插件管理器是因为在我看来它是最简单、最优雅的。
![][5]
#### 对于写作者的 .vimrc 选项的整理
* `syntax on`:这可以确保 Vim 知道我在使用什么语法。做笔记、写这种文章时我主要使用 Markdown而在写小说的时候纯文本是我的首选格式。
* `set noerrorbells`:为了你的精神状态,我强烈建议打开这个选项。
* `set textwidth=100`:为了便于阅读,没有人愿意横向滚动一个文本文件。
* `set spell`:如果有拼写错误的话提醒你。
* `set wrap`:确保文本以写作者而不是程序员的方式进行折行。
你会注意到,我没有花更多时间讨论其他一些基本配置选项,因为我并不觉得那些对写作者来说有多重要。因为我做一些业余的编码工作,所以我的 `.vimrc` 配置反映了这一点。如果你只想在 Vim 上写作,那么上述配置就应该能让你顺利开始。
从这点上来说,你的 `.vimrc` 是一个活的文档,它能生动地反映你想用 Vim 做什么,以及你希望 Vim 如何为你做这些事情。
#### 关于插件的说明
第 43-98 行之间是我对插件的配置。如果你已经学习了关于如何安装 Vim 插件的教程,我强烈推荐你从以下专为写作开发的 Vim 插件开始:
* `vim-LanguageTool`
* `thesaurus_query.vim`
* `vim-pencil`
* `vim-wordy`
* `vim-goyo`
* `vim-markdown`
#### 总结
在这篇文章中,我们简单地[介绍](https://youtu.be/Pq3JMp3stxQ)了写作者可以怎样开始使用 Vim以及一个在写作工作中需要的 `.vimrc` 入门配置。除了我的 `.vimrc` 之外,我还将在这里链接到我在 GitHub 上发现的其他写作者的 `.vimrc`,它们是我自己配置时的灵感来源。
![][6]
请劳记,这只是一个写作者的 `.vimrc` 的入门配置。你会发现随着你的需求的发展Vim 也可以随之发展。因此,投入一些时间学习配置你的 `.vimrc` 是值得的。
在下一篇文章中,我将会检视我在写作时的工作流程的具体细节,这个工作流程中我使用了 Vim 和 Git 及 GitHub。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/configuring-vim-writing/
作者:[Theena][a]
选题:[lujun9972][b]
译者:[piaoshi](https://github.com/piaoshi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/theena/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/how-i-started-loving-vim/
[2]: https://apps.apple.com/us/app/ivim/id1266544660
[3]: https://www.vim.org/
[4]: https://github.com/MiragianCycle/dotfiles
[5]: https://i1.wp.com/i.ytimg.com/vi/n9k9scbTuvQ/hqdefault.jpg?w=780&ssl=1
[6]: https://i2.wp.com/i.ytimg.com/vi/Pq3JMp3stxQ/hqdefault.jpg?w=780&ssl=1

View File

@ -0,0 +1,40 @@
[#]: subject: (My family's Linux story)
[#]: via: (https://opensource.com/article/21/5/my-linux-story)
[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen)
[#]: collector: (lujun9972)
[#]: translator: (shiboi77)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-13614-1.html)
我家的 Linux 故事
======
> 我们在 Linux 的第一次尝试只是一个 apt-get 的距离。
![](https://img.linux.net.cn/data/attachment/album/202107/25/065040z2zt9lb9fc99kcho.jpg)
我在 Linux 的第一次尝试是那种“或许我应该试一试”的情况。
那是 1990 年代,我在一些软盘上找到了用某种打包方式打包的红帽发行版,我为家里的笔记本电脑买了第二个硬盘,然后开始安装它。这是一件有趣的实验,但是我记得当时家人还没有准备好在电脑上使用 Linux。转眼到了 2005 年,我最终放弃了这种做法,买了一台可爱的东芝笔记本电脑,来运行 Windows XP。在工作中我有一台有点年头的 SUN SPARCStation 5并且我不太喜欢当时整个 Solaris 的发展方向(基于 Motif 的桌面)。我真的想要用 GIMP 来完成一些这样或那样的项目,但是在 Solaris 上安装 GNOME 1.x也许是 1.4?)的曲折旅程是很有挑战性的。所以,我实际上是在考虑跳槽到 Windows XP。但是在我的家用机上用了几个月之后我发现我更不喜欢在 Solaris 上运行 GNOME所以我安装了 Ubuntu Hoary Hedgehog 5.04,随后在我的笔记本电脑上安装了 Breezy Badger 5.10。这太棒了,那台拥有 3.2GHz 奔腾处理器、2GB 内存和 100GB 的硬盘的机器就在我的 SPARCStation 5 旁边运行。
突然之间,我不再用拼凑起来的 Solaris 安装包来试图去让东西运行起来,而只是用 apt-get 就可以了。并且这个时机也很好。我家庭和我从 2006 年 8 月到 2007 年 7 月居住在法国格勒诺布尔,当时我的妻子在休假。因为有了运行 Linux 的东芝笔记本,我可以带着我的工作一起走。那个时候我在几个大的项目上做了大量的 GIS 数据处理,我发现我可以在 PostGIS / PostgreSQL 上做同样的事情,比我们在加拿大家中使用的昂贵得多的商业 GIS 软件要快得多。大家都很开心,尤其是我。
这一路上发生的有趣的事情是,我们把另外两台电脑带到了法国 —— 我妻子的类似的东芝电脑(运行 XP对她来说很好用和我们孩子最近新买的东芝牌笔记本电脑也运行 XP。也就在圣诞节过后他们有一些朋友过来无意中在他们的电脑上安装了一个讨厌的、无法清除的病毒。经过几个小时甚至几天后我的一个孩子问我“爸爸我们就不能安装和你电脑上一样的东西吗”然后三个新的 Linux 用户就这样产生了。我的儿子29 岁了,依然是一个快乐的 Linux 用户,我猜他有第四或第五台 Linux 笔记本电脑了,最后几台都是由 System 76 提供的。我的一个女儿三年前开始读法学院时被迫转换为 Windows因为她所在的学校有一个强制性的测试框架只能在 Windows 上运行,而且据称会检测虚拟机之类的东西(请不要让我开始骂人)。而我的另一个女儿被她的公司为她买的 Macbook Air 诱惑了。
哦,好吧,不可能全都赢了吧!
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/5/my-linux-story
作者:[Chris Hermansen][a]
选题:[lujun9972][b]
译者:[shiboi77](https://github.com/shiboi77)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/clhermansen
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)

View File

@ -3,24 +3,26 @@
[#]: author: "Sarvottam Kumar https://itsfoss.com/author/sarvottam/"
[#]: collector: "lujun9972"
[#]: translator: "mcfd"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-13608-1.html"
Hash Linux: 预配置 Xmonad、Awesome、i3 和 Bspwm 窗口管理器的 Arch Linux 衍生版
Hash Linux:预配置了四种平铺窗口管理器的 Arch Linux 衍生版
======
通过一些努力,[你可以安装 Arch Linux][1]。也可以在你的 Arch 系统上安装一个你选择的桌面环境或窗口管理器。
![](https://img.linux.net.cn/data/attachment/album/202107/23/112405tt57nu7neuddkk7k.jpg)
通过一些努力,[你能安装上 Arch Linux][1],也可以在你的 Arch 系统上安装一个你选择的桌面环境或窗口管理器。
这需要一些时间和精力,但肯定是可以实现的。但是,有一些项目可以减轻你的痛苦,为你提供一个预先配置好的桌面环境或窗口管理器的系统。[ArcoLinux][2] 就是这样一个例子。
最近,我发现了另一个项目,它只专注于在出色的 Arch 发行版上提供完善的窗口管理器的选择。
[Hash Project][3] 提供了四种预配置平铺式窗口管理器的 Arch 变体Awesome、 [Xmonad][4]、 i3、和 Bspwm。
[Hash 项目][3] 提供了四种预配置有平铺式窗口管理器的 Arch 变体Awesome、[Xmonad][4]、 i3 和 Bspwm。
如果你是一个初学窗口管理器的人Hash Project 绝对是你应该马上尝试的。不用先投入时间去配置它,你就可以探索窗口管理器的潜力,并习惯由键盘驱动的系统。
如果你是一个刚刚接触窗口管理器的人Hash 项目绝对是你应该马上尝试的。不用先投入时间去配置它,你就可以深入探索窗口管理器,并习惯由键盘驱动的系统。
在本文中,我将讨论我在使用 **Hash Linux Xmonad 版本** 时的部分体验,该版本采用 Linux 5.12的内核。
在本文中,我将讨论我在使用 **Hash Linux Xmonad 版本** 时的部分体验,该版本采用 Linux 5.12 的内核。
### 安装 Hash Linux
@ -28,7 +30,7 @@ Hash Linux 四个版本的 ISO 镜像均可 [下载][5] ,适用于 x86_64 系
为了避免在实体机上安装时出现的各种意外错误,我在 GNOME Boxes 中创建了一个 Hash Linux Xmonad 版本的虚拟机。
当我启动到 Hash Linux 时,我注意到两件事。 首先是一个面板,提供用于管理窗口和命令的快捷方式。 我将在安装后讨论它。 其次,是一个漂亮且易于使用的 GUI 安装程序。
当我启动到 Hash Linux 时,我注意到两件事。首先是一个面板,提供用于管理窗口和命令的快捷方式。我将在安装后讨论它。其次,是一个漂亮且易于使用的 GUI 安装程序。
![Hash Linux GUI Installer][6]
@ -40,7 +42,7 @@ Hash Linux 四个版本的 ISO 镜像均可 [下载][5] ,适用于 x86_64 系
![Hash Linux][8]
如果你曾经在你的 Linux 系统上安装过 Xmonad 窗口管理器,那么你重启后首先看到的是什么? 空白的屏幕吧。
如果你曾经在你的 Linux 系统上安装过 Xmonad 窗口管理器,那么你重启后首先看到的是什么?空白的屏幕吧。
如果你是一个初学者,或者你不知道默认的按键绑定,你会被卡在一个屏幕上。因此,在使用任何窗口管理器之前,你必须先阅读其键盘快捷键。
@ -48,17 +50,17 @@ Hash Linux 四个版本的 ISO 镜像均可 [下载][5] ,适用于 x86_64 系
因此为了简化和方便初学者Hash Linux 将重要的快捷键都钉在了桌面上。
所以,让我们先尝试其中的一些。从最重要的一个开始 `[Super]+Enter`,它可以打开默认的 termite 终端模拟器与 Z shell (ZSH)
所以,让我们先尝试其中的一些。从最重要的一个开始 `Super+Enter`,它可以打开默认的 termite 终端模拟器与 Z shellZSH
如果你多次点击它,你会发现默认情况下 Xmonad 遵循一个缩小布局,它首先将一个窗口固定在右边,然后以同样的方式将其余的全部安排在左边。
如果你多次按下它,你会发现默认情况下 Xmonad 遵循一个缩减布局,它首先将一个窗口固定在右边,然后以同样的方式将其余的全部安排在左边。
![Xmonad default layout][9]
按下 `[Super]+[Space]`,你也可以将当前的布局改为标签式布局。甚至你可以按下 `[Super]+[left+click]` 将窗口拖动。
按下 `Super+Space`,你也可以将当前的布局改为标签式布局。甚至你可以按下 `Super+leftclick` 将窗口拖动。
![Moved to float][10]
要退出当前的窗口,你可以按下 `[Super]+Q`。
要退出当前的窗口,你可以按下 `Super+Q`。
### Hash Linux 中的应用
@ -68,7 +70,7 @@ Hash Linux 四个版本的 ISO 镜像均可 [下载][5] ,适用于 x86_64 系
它还拥有大量的图形应用程序Firefox 89、Gparted、Nitrogen、Conky、Flameshot、Geany 和 CPU-X。
`[Super]+D` 是 Hash Linux 中打开应用程序搜索菜单的默认快捷键。
`Super+D` 是 Hash Linux 中打开应用程序搜索菜单的默认快捷键。
![Application search menu][12]
@ -88,17 +90,17 @@ Hash Theme Selector 是一个自制的 Hash Linux 应用程序,你可以用它
### 结束语
如果你想使用一个窗口管理器来代替桌面环境但又不想花很多时间来配置它Hash Project 可以节省你的时间。
如果你想使用一个窗口管理器来代替桌面环境但又不想花很多时间来配置它Hash 项目可以节省你的时间。
首先,它可以节省你大量的配置时间和精力,其次,它可以很轻松地让你适应使用键盘控制的系统。以后,你肯定可以学会根据自己的需要进行配置。
由于 Hash Linux 已经提供了4个带有不同的窗口管理器的 ISO你可以开始使用任何一个版本并找到你最喜欢的一个版本。总的来说它是一个[很好的 Arch Linux 衍生版][15]。
由于 Hash Linux 已经提供了 4 个带有不同的窗口管理器的 ISO你可以开始使用任何一个版本并找到你最喜欢的一个版本。总的来说它是一个 [很好的 Arch Linux 衍生版][15]。
最后我还要提一下,目前 Hash Linux 的官方[网站][3]并没有包含很多关于它的信息。
最后我还要提一下,目前 Hash Linux 的官方 [网站][3] 并没有包含很多关于它的信息。
![][16]
早期的[网站][17](我现在无法访问)也在发布信息中提到,在我上次访问时,其中包含了许多关于它的信息,包括配置细节等。
在发布信息中也提到了一个早期的 [网站][17](我现在无法访问),在我上次访问时,其中包含了许多关于它的信息,包括配置细节等。
不想入 Arch 的教,只想用平铺式窗口管理器?可以试试 [Regolith Linux][18] 。它是预先配置了 i3wm 的 Ubuntu。棒极了对吧
@ -109,7 +111,7 @@ via: https://itsfoss.com/hash-linux-review/
作者:[Sarvottam Kumar][a]
选题:[lujun9972][b]
译者:[mcfd](https://github.com/mcfd)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -3,14 +3,16 @@
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-13617-1.html)
在 Linux 上批量处理图像的 Converseen
======
Converseen 是一个免费的开源软件,用于批量图像转换。有了这个工具,你可以一次将多张图片转换成另一种格式,调整大小,改变它们的长宽比,旋转或翻转它们。
![](https://img.linux.net.cn/data/attachment/album/202107/25/215958jd5jl9q2jlzqvvg6.jpg)
Converseen 是一个用于批量图像转换的自由开源软件。有了这个工具,你可以一次将多张图片转换成另一种格式、调整大小、改变它们的长宽比、旋转或翻转它们。
对于像我这样的人来说,这是一个很方便的工具,我必须处理多个不同大小的截图,但在上传到网站之前必须调整它们的大小。
@ -26,7 +28,7 @@ Converseen 是一个免费的开源软件,用于批量图像转换。有了这
![][3]
你也可以选择将转换后的图像以不同的名称保存在同一目录或其他位置。你也可以覆盖现有的图像。
你也可以选择将转换后的图像以不同的名称保存在同一目录或其他位置也可以覆盖现有的图像。
你不能添加文件夹,但你可以一次选择并添加多个图像。
@ -66,11 +68,11 @@ sudo dnf install converseen
sudo pacman -Sy converseen
```
Converseen 也可用于 Windows 和 FreeBSD。你可以在项目网站的下载页面获得相关说明。
Converseen 也可在 Windows 和 FreeBSD 下使用。你可以在项目网站的下载页面获得相关说明。
[下载 Converseen][6]
- [下载 Converseen][6]
它的源码可在 GitHub 仓库[获取][7]。
它的源码可在 GitHub 仓库 [获取][7]。
如果你正在寻找一个更简单的方法来调整一张图片的大小,你可以使用这个巧妙的技巧,[在 Nautilus 文件管理器中用右键菜单调整图片大小和旋转图片][8]。
@ -83,7 +85,7 @@ via: https://itsfoss.com/converseen/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -3,22 +3,20 @@
[#]: author: (Yazan Monshed https://fedoramagazine.org/author/yazanalmonshed/)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-13615-1.html)
在 Fedora 上开始使用 Podman
如何在 Fedora 上使用 Podman
======
![][1]
来自 Podman 项目的 Podman 标志 <https://github.com/containers/podman/tree/main/logo>
[Podman][2] 是一个无守护程序的容器引擎,用于在你的 Linux 系统上开发、管理和运行 OCI 容器。在这篇文章中,我们将介绍 podman 以及如何用 nodejs 构建一个小型应用来使用它。该应用将是非常简单和干净的。
[Podman][2] 是一个无守护程序的容器引擎,用于在你的 Linux 系统上开发、管理和运行 OCI 容器。在这篇文章中,我们将介绍 Podman 以及如何用 nodejs 构建一个小型应用来使用它。该应用将是非常简单和干净的。
### 安装 Podman
如果你已经安装了 docker只需在终端输入 **alias docker=podman**,那么 Podman 的命令就与 [docker][3] 相同
Podman 的命令就与 [docker][3] 相同,如果你已经安装了 Docker只需在终端输入 `alias docker=podman`
在 Fedora 中Podman 是默认安装的。但是如果你因为任何原因没有安装,你可以用下面的命令安装它:
@ -26,9 +24,9 @@
sudo dnf install podman
```
对于 Fedora [silverblue][4] 用户,podman 已经安装在你的操作系统中了。
对于 Fedora [silverblue][4] 用户,Podman 已经安装在你的操作系统中了。
安装后,运行 hello world 镜像,以确保一切正常:
安装后,运行 hello world 镜像,以确保一切正常:
```
podman pull hello-world
@ -55,13 +53,13 @@ This message shows that your installation appears to be working correctly.
### 简单的 Nodejs 应用
首先,我们将创建一个文件夹 **webapp**,在终端输入以下命令
首先,我们将创建一个文件夹 `webapp`,在终端输入以下命令:
```
mkdir webapp && cd webapp
```
现在创建文件 **_package.json_**,该文件包括项目运行所需的所有依赖项。在文件 _package.json_ 中复制以下代码:
现在创建文件 `package.json`,该文件包括项目运行所需的所有依赖项。在文件 `package.json` 中复制以下代码:
```
{
@ -74,7 +72,7 @@ mkdir webapp && cd webapp
}
```
创建文件 _index.js_,并在其中添加以下代码:
创建文件 `index.js`,并在其中添加以下代码:
```
const express = require('express')
@ -89,11 +87,11 @@ app.listen(8081, () => {
});
```
你可以从[这里][5]下载源代码。
你可以从 [这里][5] 下载源代码。
### 创建 Dockerfile
首先,创建一个名为 _Dockerfile_ 的文件,并确保第一个字符是大写,而不是小写,然后在那里添加以下代码:
首先,创建一个名为 `Dockerfile` 的文件,并确保第一个字符是大写,而不是小写,然后在那里添加以下代码:
```
FROM node:alpine
@ -103,13 +101,13 @@ RUN npm install
CMD ["npm", "start"]
```
确保你在 _webapp_ 文件夹内,然后显示镜像,然后输入以下命令:
确保你在 `webapp` 文件夹内,然后显示镜像,然后输入以下命令:
```
podman build .
```
确保加了**点**。镜像在你的机器上被创建,你可以用以下命令显示它:
确保加了 `.`。镜像将在你的机器上创建,你可以用以下命令显示它:
```
podman images
@ -121,11 +119,11 @@ podman images
podman run -p 8080:8080 <image-name>
```
现在在你的浏览器中打开 _localhost:8080_,你会看到你的应用已经工作。
现在在你的浏览器中打开 `localhost:8080`,你会看到你的应用已经工作。
### 停止和删除容器
使用 _CTRL-C_ 退出容器,你可以使用容器 ID 来删除容器。获取 ID 并使用这些命令停止容器:
使用 `CTRL-C` 退出容器,你可以使用容器 ID 来删除容器。获取 ID 并使用这些命令停止容器:
```
podman ps -a
@ -138,7 +136,7 @@ podman stop <container_id>
podman rmi <image_id>
```
[官方网站][2]上阅读更多关于 podman 和它如何工作的信息。
[官方网站][2] 上阅读更多关于 Podman 和它如何工作的信息。
--------------------------------------------------------------------------------
@ -147,7 +145,7 @@ via: https://fedoramagazine.org/getting-started-with-podman-in-fedora/
作者:[Yazan Monshed][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,69 @@
[#]: subject: (Ubuntu 20.10 Reached End of Life, Time to Upgrade!)
[#]: via: (https://news.itsfoss.com/ubuntu-20-10-end-of-life/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: (zd200572)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-13611-1.html)
Ubuntu 20.10 到达生命终点,该升级啦!
======
> 哦Ubuntu 20.10 将不再收到任何更新。如果你还在使用它,你的系统将面临风险,请考虑升级到 Ubuntu 21.04
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/07/ubuntu-20-10-eof.png?w=1200&ssl=1)
Ubuntu 20.10Groovy Gorilla2021 年 7 月 22 日停止支持啦。它是一个非长期支持发行版本,[带来了一些令人兴奋的新特性][1]。
通常,非长期支持发行版维护 9 个月所以生命周期结束意味着Ubuntu 20.10 用户将没有安全和维护更新。
你也会错过已安装应用的更新,[使用 apt 命令][2] 安装新软件也会面临问题。如果不手动修改 `sources.list`(不推荐),使用软件中心也将是个问题。
支持周期的结束会影响所有的其他 Ubuntu 特色版本,像 Kubuntu、Lubuntu、MATE 等。
但是像 Linux Mint 和 elementary OS 这样的发行版不依赖于非长期支持发行版,你不必有任何担心。
使用下面的命令在终端 [检查下你安装的 Ubuntu 版本][3]是个好主意:
```
lsb_release -a
```
### 升级到 Ubuntu 21.04Hirsute Hippo正是时候
毫无疑问,你需要升级到 Ubuntu 21.04 才能获得最新的更新和安全改进。
[Ubuntu 21.10 版本][4] 将在几个月后发布,所以你也可以尝试到时升级到这个版本。
现在,你可以按照我们的 [Ubuntu 升级][5]教程来开始升级。
我推荐你备份一下,以防升级过程中出现问题。
如果你想重新安装,也可以。
### 还在用 Ubuntu 20.10?
从技术上来说,你可以继续使用不受支持的版本,如果你不想安全问题蔓延,建议还是升级到最新的版本,比如 Ubuntu 21.04。
Ubuntu 21.04 将会提供支持到 2022 年 1 月,升级前你可能想看下 [Ubuntu 21.04 的特性][6]。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/ubuntu-20-10-end-of-life/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[zd200572](https://github.com/zd200572)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-20-10-features/
[2]: https://itsfoss.com/apt-command-guide/
[3]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
[4]: https://news.itsfoss.com/ubuntu-21-10-release-schedule/
[5]: https://itsfoss.com/upgrade-ubuntu-version/
[6]: https://news.itsfoss.com/ubuntu-21-04-features/

View File

@ -1,73 +0,0 @@
[#]: subject: (Ubuntu 20.10 Reached End of Life, Time to Upgrade!)
[#]: via: (https://news.itsfoss.com/ubuntu-20-10-end-of-life/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Ubuntu 20.10 Reached End of Life, Time to Upgrade!
======
Ubuntu 20.10 (Groovy Gorilla) has reached its end of life today (July 22, 2021). It was a non-LTS release that [introduced some exciting features][1].
Usually, non-LTS releases are maintained for up to 9 months. So, with 20.10 reaching the end of life means there will be no security and maintenance updates for Ubuntu 20.10 users.
You will also miss out on updates to installed applications, and face issues installing new applications [using the apt command][2]. Using the Software Center is going to be a problem as well, without manually modifying sources.list (which is not recommended).
The end of life applies to all other Ubuntu flavors like Kubuntu, Lubuntu, MATE, etc.
While distributions like Linux Mint and elementary OS do not rely on non-LTS releases, you have nothing to worry about there.
It is also a good idea to [check your Ubuntu version][3] installed with this command in the terminal:
```
lsb_release -a
```
### Upgrade to Ubuntu 21.04 (Hirsute Hippo): Its Time!
It is a no-brainer that you need to upgrade to Ubuntu 21.04 to get the latest updates and security improvements.
[Ubuntu 21.10 release][4] is only a few months later—so you can try upgrading to it when that is available as well.
For now, you can follow our [Ubuntu upgrade][5] tutorial to get started.
I would recommend you to make a backup, in case things go bad with the upgrade process.
If you want to perform a fresh installation, you can do that as well.
### Still Using Ubuntu 20.10?
Technically, you can choose to keep using the unsupported version. However, if you do not want security issues to creep up, it is recommended to upgrade to the newest version available i.e Ubuntu 21.04.
Ubuntu 21.04 will be supported until January 2022. You might want to check out the [features in Ubuntu 21.04][6] before making the jump.
_How was your experience so far with Ubuntu 20.10? Have you upgraded yet? Let me know in the comments below._
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/ubuntu-20-10-end-of-life/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-20-10-features/
[2]: https://itsfoss.com/apt-command-guide/
[3]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
[4]: https://news.itsfoss.com/ubuntu-21-10-release-schedule/
[5]: https://itsfoss.com/upgrade-ubuntu-version/
[6]: https://news.itsfoss.com/ubuntu-21-04-features/

View File

@ -0,0 +1,237 @@
[#]: subject: (Top 7 Linux Laptops You Can Buy in 2021)
[#]: via: (https://news.itsfoss.com/best-linux-laptops-2021/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Top 7 Linux Laptops You Can Buy in 2021
======
Linux laptops are the perfect alternatives to macOS and Windows-powered laptops.
Technically, you can turn any laptop of your choice into a Linux machine by choosing to install any Linux distribution available.
But, here, our focus will be on the laptops that offer Linux out-of-the-box, ensuring the best compatibility and support no matter what kind of budget you have.
### Linux Laptops by Popular Brands
It is often the best choice for a consumer to opt for a Linux laptop built by a popular manufacturer.
You do not have to worry about the after-sales, warranty extensions, and service repairs.
Dell and Lenovo are usually the ones who provide laptops with Linux pre-installed.
Do note that everything is subject to availability depending on the country/region.
*_Pricing mentioned in this article is converted to USD for easy comparison, excluding shipping and other extras._
#### 1\. Lenovo Thinkpad X1 Carbon (Gen 8 / Gen 9)
![][1]
_**Pricing**: Starts at **$1535**_
The entire Thinkpad series by Lenovo is a popular choice among Linux users. It is built to last and offers good compatibility
However, it stays on the expensive side.
You will have three choices to go with depending on what you go for. If you are customizing a Gen 9 Thinkpad laptop, you will have Ubuntu 20.04 and Fedora 33 as your options to have installed.
For Gen 8 models, it seems that Fedora 33 is off the table, and it is Fedora 32 instead, along with Ubuntu 20.04.
All the variants are powered by Intel chipsets, 10th gen for Gen 8 and 11th gen for Gen 9.
Most of the other specifications remain similar with a 14-inch display (FHD, WQHD, and UHD options available), up to 32 GB RAM, 1 TB SSD, fingerprint reader, and Wi-Fi 6 support.
[Thinkpad X1 Carbon (Gen 9)][2]
[Thinkpad X1 Carbon (Gen 8)][3]
#### 2\. Dell XPS 13 Developers Edition
![][4]
_**Pricing**: Starts at **$1059**_
Dell XPS series is an impressive laptop lineup to consider running Linux.
It has been tailored to run Linux (Ubuntu 20.04) with developers in mind.
You get a 13.4-inch display (FHD and UHD options available), 11th gen i5/i7 processor, up to 32 GB RAM, 2 TB SSD, fingerprint reader, and Wi-FI 6 support.
[Dell XPS 13 Developer Edition][5]
### Laptops by Linux-only Manufacturers
If you do not want mainstream options but some unique choices to support Linux-only manufacturers in the process, there are a couple of them that you can consider.
#### 1\. System76 Gazelle
![][6]
_**Pricing**: Starts at **$1499**_
System76s laptop will come baked in with their Pop!_OS operating system which is based on Ubuntu but provides a **hassle-free out-of-the-box experience**.
It is safe to assume that System76 is like the Apple of Linux laptops who try their best to optimize Pop!_OS for their hardware offered.
They have total control over the software and hardware, so that should be some exciting product integration for end consumers.
Along with impressive essentials like 144 Hz 16.5-inch display, i7 11th gen processor, up to 8 TB NVMe SSD support—you also get an RTX 3050 GPU which should enable you to tackle a variety of demanding tasks on your laptop.
While there are some other laptops by System76, it was not available at the time of writing this. So, feel free to check out the official store page and order a customized configuration.
System76 Gazelle
#### 2\. Purism Laptop
![][7]
![][8]
_**Pricing**: Starts at **$1599**_
A laptop by Purism can be an option if you are a security-conscious user.
Librem 14 is one of their latest laptops that comes baked in with [PureOS][9] (also built by them).
While it may not offer the latest generation processors, you should be fine with the i7 10th Gen chip on board.
It supports up to 64 GB of RAM and features hardware kill switches to disable the webcam, headphone jack, Bluetooth, or wireless audio
[Librem 14][10]
#### 3\. TUXEDO Aura 15
![][7]
![][11]
_**Pricing**: Starts at **$899**_
If you want an AMD-powered laptop (with its last-gen processor Ryzen 7 4700U), Aura 15 by TUXEDO Computers is a great pick.
The key specifications include a Full HD display, up to 64 GB RAM, Wi-Fi 6 support, and an LTE module.
It comes with either Ubuntu or TUXEDO OS (based on Ubuntu Budgie) as per your customization.
[TUXEDO Aura 15][12]
#### 4\. TUXEDO Stellaris 15
![][7]
![][13]
_**Pricing**: Starts at **$2160**_
If you are looking for the latest and greatest powerhouse with options to get RTX 3080 on board, this should be a fantastic option.
It offers the latest Intel/Ryzen processor with the configuration choices and features a 3K-res display with a 165 Hz refresh rate.
Definitely not something that you would find convenient to travel with, but if you need the computing power, you can choose to go with it.
TUXEDO Stellaris 15
#### 5\. Slimbook Pro X
![][14]
_**Pricing:** Starts at **$1105**_
Slimbook focuses on lighter Laptop models that you can conveniently travel with.
It gives you the option to choose from a variety of distributions that include Ubuntu (_GNOME, KDE, MATE_), KDE Neon, Manjaro, and Fedora.
You get most of the essential specifications that include up to 2 TB SSD support, 64 GB of RAM, Full HD IPS display, and more.
While you get options for Intel and Ryzen (last-gen processors) coupled with Nvidia and Vega graphics respectively, only Ryzen was available in stock at the time of writing this.
Slimbook Pro X
#### 6\. Slimbook Essential
![][1]
_**Pric**__**ing:** Starts at **$646**_
An impressive option for a budget-friendly Linux laptop.
It offers both Ryzen and Intel variants (last-gen) to choose from. You should get the basic specifications that include up to 64 GB RAM, 2 TB SSD support, minus a great screen and dedicated graphics onboard.
[Slimbook Essential][15]
#### 7\. Jupiter 14 Pro by Juno Computers
![][16]
_**Pricing**: Starts at **$1199**_
Featuring the 11th gen Intel processors, Jupiter 14 by Juno Computers is a sweet deal with NVIDIA GTX 1650 on board.
It comes baked in with Ubuntu 20.04 with no other options to choose from.
The base configuration includes 16 GB RAM, which could make the value offering slightly better compared to some others.
You will find the ability to choose your region on their website (UK/Europe or US/Canada), make sure to utilize that.
[Jupiter Pro 14][17]
#### Honorable Mention: **PineBook Pro**
![][18]
PineBook Pro is an ARM-based laptop (with Manjaro ARM edition) that is budget-friendly and should work fine for a lot of basic tasks on Linux.
It is out of stock (until further notice) at the time of writing this. However, you might want to check that for yourself when you read this.
[Pinebook Pro][19]
### Wrapping Up
If you do not like the choices presented here, you may check out [other places from where you can by Linux laptops][20]. Depending on your budget, pick what you feel is best for you.
After all, everything comes with Linux baked in. Some give you the ability to choose from multiple distros but most of them stick to Ubuntu pre-installed.
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/best-linux-laptops-2021/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[2]: https://www.lenovo.com/us/en/laptops/thinkpad/thinkpad-x1/X1-Carbon-G9/p/22TP2X1X1C9
[3]: https://www.lenovo.com/us/en/laptops/thinkpad/thinkpad-x1/X1-Carbon-Gen-8-/p/22TP2X1X1C8
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ3MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[5]: https://www.dell.com/en-us/work/shop/dell-laptops-and-notebooks/new-xps-13-developer-edition/spd/xps-13-9310-laptop/ctox139w10p2c3000u
[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc4MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[8]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/07/librem14.png?resize=780%2C780&ssl=1
[9]: https://www.pureos.net
[10]: https://puri.sm/products/librem-14/
[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/07/tuxedo-aura-15.jpg?resize=780%2C780&ssl=1
[12]: https://www.tuxedocomputers.com/en/Linux-Hardware/Linux-Notebooks/15-16-inch/TUXEDO-Aura-15-Gen1.tuxedo
[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/07/tuxedo-stellaris.jpg?resize=780%2C780&ssl=1
[14]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQyMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[15]: https://slimbook.es/en/essential-en
[16]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ2OCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[17]: https://junocomputers.com/us/product/jupiter-14-pro/
[18]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[19]: https://www.pine64.org/pinebook-pro/
[20]: https://itsfoss.com/get-linux-laptops/

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (YungeG)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,49 +0,0 @@
[#]: collector: "lujun9972"
[#]: translator: "Arzelan"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: subject: "6 evening rituals for working in tech"
[#]: via: "https://opensource.com/article/20/11/evening-rituals-working-tech"
[#]: author: "Jen Wike Huger https://opensource.com/users/jen-wike"
6 evening rituals for working in tech
======
After a busy day of virtual meetings, emails, coding, and collaborating,
how do you wind down for the night?
![A farm road][1]
This strange time has given us, on one hand, the chance to slow down, yet on the other, it's busier than ever. Especially if you have others in your life to care for in addition to yourself. But you can't give from an empty cup, so, this list of evening rituals is focused on what you can do for yourself right after you turn the computer off, shut the laptop, or say goodbye to the last virtual meeting of the day.
1\. Head to the nearest door and take a big, deep belly breath in... and out. I don't care if it's snowing. Fill your lungs with fresh air. Stay for a while if you can -- take a lap around the yard, or walk down the street and back.
2\. If you have some time, make a cup of tea -- black (is caffeinated, so beware), green, or herbal -- and, let it cool down while you get your shoes (and maybe a jacket) on. Pop it in a favorite thermos, and take a stroll around your neighborhood. You don't have to have a plan or a place you're walking to. Set a timer for 15 minutes if you only have a short window.
3\. Turn on a song that pops into your head or the one you didn't get a chance to jam/relax to earlier today.
4\. If you have some time, stand up and dance it out or lay all the way down with your feet up. No more sitting. Don't think, just listen. Research shows giving your brain blank space helps you think and deal better later.
5\. Open your [reader app][2] or pick up a book (the latter is easier on your eyes), and fully indulge, letting the day slip away, or give yourself enough time to read at least one chapter.
6\. Make food that feels good. Maybe that means a few basic ingredients and simple instructions. Maybe that means putting together that new, complex meal you've been excited about since you picked up the items at the grocery store.
Can you combine some of these to get even more out of your evening ritual time? If you're working in tech, creating rituals like this—whether they're [in the morning][3], middle of your day, or evening—is critical as we live out a new normal working from home, taking meetings virtually, and missing the energy of in-person connections with colleagues. 
What is your evening ritual?
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/evening-rituals-working-tech
作者:[Jen Wike Huger][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jen-wike
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDUCATION_jadud_farm-road.png?itok=of8IuSM5 "A farm road"
[2]: https://opensource.com/article/20/2/linux-ebook-readers
[3]: https://opensource.com/article/20/10/tech-morning-rituals

View File

@ -1,218 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (tanloong)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Machine learning made easy with Python)
[#]: via: (https://opensource.com/article/21/1/machine-learning-python)
[#]: author: (Girish Managoli https://opensource.com/users/gammay)
Machine learning made easy with Python
======
Solve real-world machine learning problems with Naïve Bayes classifiers.
![arrows cycle symbol for failing faster][1]
Naïve Bayes is a classification technique that serves as the basis for implementing several classifier modeling algorithms. Naïve Bayes-based classifiers are considered some of the simplest, fastest, and easiest-to-use machine learning techniques, yet are still effective for real-world applications.
Naïve Bayes is based on [Bayes' theorem][2], formulated by 18th-century statistician [Thomas Bayes][3]. This theorem assesses the probability that an event will occur based on conditions related to the event. For example, an individual with [Parkinson's disease][4] typically has voice variations; hence such symptoms are considered related to the prediction of a Parkinson's diagnosis. The original Bayes' theorem provides a method to determine the probability of a target event, and the Naïve variant extends and simplifies this method.
### Solving a real-world problem
This article demonstrates a Naïve Bayes classifier's capabilities to solve a real-world problem (as opposed to a complete business-grade application). I'll assume you have basic familiarity with machine learning (ML), so some of the steps that are not primarily related to ML prediction, such as data shuffling and splitting, are not covered here. If you are an ML beginner or need a refresher, see _[An introduction to machine learning today][5]_ and _[Getting started with open source machine learning][6]_.
The Naïve Bayes classifier is [supervised][7], [generative][8], non-linear, [parametric][9], and [probabilistic][10].
In this article, I'll demonstrate using Naïve Bayes with the example of predicting a Parkinson's diagnosis. The dataset for this example comes from this [UCI Machine Learning Repository][11]. This data includes several speech signal variations to assess the likelihood of the medical condition; this example will use the first eight of them:
* **MDVP:Fo(Hz):** Average vocal fundamental frequency
* **MDVP:Fhi(Hz):** Maximum vocal fundamental frequency
* **MDVP:Flo(Hz):** Minimum vocal fundamental frequency
* **MDVP:Jitter(%)**, **MDVP:Jitter(Abs)**, **MDVP:RAP**, **MDVP:PPQ**, and **Jitter:DDP:** Five measures of variation in fundamental frequency
The dataset used in this example, shuffled and split for use, is available in my [GitHub repository][12].
### ML with Python
I'll use Python to implement the solution. The software I used for this application is:
* Python 3.8.2
* Pandas 1.1.1
* scikit-learn 0.22.2.post1
There are several open source Naïve Bayes classifier implementations available in Python, including:
* **NLTK Naïve Bayes:** Based on the standard Naïve Bayes algorithm for text classification
* **NLTK Positive Naïve Bayes:** A variant of NLTK Naïve Bayes that performs binary classification with partially labeled training sets
* **Scikit-learn Gaussian Naïve Bayes:** Provides partial fit to support a data stream or very large dataset
* **Scikit-learn Multinomial Naïve Bayes:** Optimized for discrete data features, example counts, or frequency
* **Scikit-learn Bernoulli Naïve Bayes:** Designed for binary/Boolean features
I will use [sklearn Gaussian Naive Bayes][13] for this example.
Here is my Python implementation of `naive_bayes_parkinsons.py`:
```
import pandas as pd
# Feature columns we use
x_rows=['MDVP:Fo(Hz)','MDVP:Fhi(Hz)','MDVP:Flo(Hz)',
        'MDVP:Jitter(%)','MDVP:Jitter(Abs)','MDVP:RAP','MDVP:PPQ','Jitter:DDP']
y_rows=['status']
# Train
# Read train data
train_data = pd.read_csv('parkinsons/Data_Parkinsons_TRAIN.csv')
train_x = train_data[x_rows]
train_y = train_data[y_rows]
print("train_x:\n", train_x)
print("train_y:\n", train_y)
# Load sklearn Gaussian Naive Bayes and fit
from sklearn.naive_bayes import GaussianNB
gnb = GaussianNB()
gnb.fit(train_x, train_y)
# Prediction on train data
predict_train = gnb.predict(train_x)
print('Prediction on train data:', predict_train)
# Accuray score on train data
from sklearn.metrics import accuracy_score
accuracy_train = accuracy_score(train_y, predict_train)
print('Accuray score on train data:', accuracy_train)
# Test
# Read test data
test_data = pd.read_csv('parkinsons/Data_Parkinsons_TEST.csv')
test_x = test_data[x_rows]
test_y = test_data[y_rows]
# Prediction on test data
predict_test = gnb.predict(test_x)
print('Prediction on test data:', predict_test)
# Accuracy Score on test data
accuracy_test = accuracy_score(test_y, predict_test)
print('Accuray score on test data:', accuracy_train)
```
Run the Python application:
```
$ python naive_bayes_parkinsons.py
train_x:
      MDVP:Fo(Hz)  MDVP:Fhi(Hz) ...  MDVP:RAP  MDVP:PPQ  Jitter:DDP
0        152.125       161.469  ...   0.00191   0.00226     0.00574
1        120.080       139.710  ...   0.00180   0.00220     0.00540
2        122.400       148.650  ...   0.00465   0.00696     0.01394
3        237.323       243.709  ...   0.00173   0.00159     0.00519
..           ...           ...           ...  ...       ...       ...        
155      138.190       203.522  ...   0.00406   0.00398     0.01218
[156 rows x 8 columns]
train_y:
      status
0         1
1         1
2         1
3         0
..      ...
155       1
[156 rows x 1 columns]
Prediction on train data: [1 1 1 0 ... 1]
Accuracy score on train data: 0.6666666666666666
Prediction on test data: [1 1 1 1 ... 1
 1 1]
Accuracy score on test data: 0.6666666666666666
```
The accuracy scores on the train and test sets are 67% in this example; its performance can be optimized. Do you want to give it a try? If so, share your approach in the comments below.
### Under the hood
The Naïve Bayes classifier is based on Bayes' rule or theorem, which computes conditional probability, or the likelihood for an event to occur when another related event has occurred. Stated in simple terms, it answers the question: _If we know the probability that event x occurred before event y, then what is the probability that y will occur when x occurs again?_ The rule uses a prior-prediction value that is refined gradually to arrive at a final [posterior][14] value. A fundamental assumption of Bayes is that all parameters are of equal importance.
At a high level, the steps involved in Bayes' computation are:
1. Compute overall posterior probabilities ("Has Parkinson's" and "Doesn't have Parkinson's")
2. Compute probabilities of posteriors across all values and each possible value of the event
3. Compute final posterior probability by multiplying the results of #1 and #2 for desired events
Step 2 can be computationally quite arduous. Naïve Bayes simplifies it:
1. Compute overall posterior probabilities ("Has Parkinson's" and "Doesn't have Parkinson's")
2. Compute probabilities of posteriors for desired event values
3. Compute final posterior probability by multiplying the results of #1 and #2 for desired events
This is a very basic explanation, and several other factors must be considered, such as data types, sparse data, missing data, and more.
### Hyperparameters
Naïve Bayes, being a simple and direct algorithm, does not need hyperparameters. However, specific implementations may provide advanced features. For example, [GaussianNB][13] has two:
* **priors:** Prior probabilities can be specified instead of the algorithm taking the priors from data.
* **var_smoothing:** This provides the ability to consider data-curve variations, which is helpful when the data does not follow a typical Gaussian distribution.
### Loss functions
Maintaining its philosophy of simplicity, Naïve Bayes uses a [0-1 loss function][15]. If the prediction correctly matches the expected outcome, the loss is 0, and it's 1 otherwise.
### Pros and cons
**Pro:** Naïve Bayes is one of the easiest and fastest algorithms.
**Pro:** Naïve Bayes gives reasonable predictions even with less data.
**Con:** Naïve Bayes predictions are estimates, not precise. It favors speed over accuracy.
**Con:** A fundamental Naïve Bayes assumption is the independence of all features, but this may not always be true.
In essence, Naïve Bayes is an extension of Bayes' theorem. It is one of the simplest and fastest machine learning algorithms, intended for easy and quick training and prediction. Naïve Bayes provides good-enough, reasonably accurate predictions. One of its fundamental assumptions is the independence of prediction features. Several open source implementations are available with traits over and above what are available in the Bayes algorithm.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/1/machine-learning-python
作者:[Girish Managoli][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/gammay
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_progress_cycle_momentum_arrow.png?itok=q-ZFa_Eh (arrows cycle symbol for failing faster)
[2]: https://en.wikipedia.org/wiki/Bayes%27_theorem
[3]: https://en.wikipedia.org/wiki/Thomas_Bayes
[4]: https://en.wikipedia.org/wiki/Parkinson%27s_disease
[5]: https://opensource.com/article/17/9/introduction-machine-learning
[6]: https://opensource.com/business/15/9/getting-started-open-source-machine-learning
[7]: https://en.wikipedia.org/wiki/Supervised_learning
[8]: https://en.wikipedia.org/wiki/Generative_model
[9]: https://en.wikipedia.org/wiki/Parametric_model
[10]: https://en.wikipedia.org/wiki/Probabilistic_classification
[11]: https://archive.ics.uci.edu/ml/datasets/parkinsons
[12]: https://github.com/gammay/Machine-learning-made-easy-Naive-Bayes/tree/main/parkinsons
[13]: https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.GaussianNB.html
[14]: https://en.wikipedia.org/wiki/Posterior_probability
[15]: https://en.wikipedia.org/wiki/Loss_function#0-1_loss_function

View File

@ -2,7 +2,7 @@
[#]: via: (https://opensource.com/article/21/5/linux-security-tools)
[#]: author: (Peter Gervase https://opensource.com/users/pgervase)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (MjSeven)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -2,7 +2,7 @@
[#]: via: (https://opensource.com/article/21/7/dnf-vs-apt)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (perfiffer )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,119 +0,0 @@
[#]: subject: (Run a Linux virtual machine in Podman)
[#]: via: (https://opensource.com/article/21/7/linux-podman)
[#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Run a Linux virtual machine in Podman
======
Use Podman Machine to create a basic Fedora CoreOS VM to use with
containers and containerized workloads.
![woman on laptop sitting at the window][1]
Fedora CoreOS is an automatically updating, minimal [rpm-ostree][2]-based operating system for running containerized workloads securely and at scale.
[Podman][3] "is a tool for managing containers and images, volumes mounted into those containers, and pods made from groups of containers. Podman is based on libpod, a library for container lifecycle management."
Magical things happen when you use [Podman Machine][4], a feature that helps you create a basic Fedora CoreOS virtual machine (VM) to use with containers and containerized workloads.
### Getting started with Podman Machine
The first step is to install Podman. If you already have the latest version of Podman installed, you can skip the step. On my Fedora 34 machine, I installed Podman with:
```
`$ sudo dnf install podman`
```
I'm using podman-3.2.2-1.fc34.x86_64.
### Initializing a Fedora CoreOS
Once Podman is installed, initialize it with:
```
podman machine init vm2
Downloading VM image: fedora-coreos-34.20210626.1.0-qemu.x86_64.qcow2.xz: done  
Extracting compressed file
```
This command creates `vm2` and downloads Fedora CoreOS's qcow2 file in .xz format and extracts it.
### Listing your VMs
It's always important to know your VMs and their status, and the `list` command helps with that. The following example shows the names of all my VMs, the date they were created, and the last time they were up:
```
podman machine list  
NAME                    VM TYPE         CREATED         LAST UP
podman-machine-default*  qemu           6 days ago      Currently running
vm2                     qemu            11 minutes ago  11 minutes ago
```
### Starting a VM
To start a VM, run:
```
podman machine start
Waiting for VM …
```
### SSHing into the VM
You can use secure shell (SSH) to access your VM and use it to run workloads without any setup hassles:
```
podman machine ssh  
Connecting to vm podman-machine-default. To close connection, use `~.` or `exit`
Fedora CoreOS 34.20210611.1.0
Tracker: <https://github.com/coreos/fedora-coreos-tracker>
Discuss: <https://discussion.fedoraproject.org/c/server/coreos/>
 
Last login: Wed Jun 23 13:23:36 2021 from 10.0.2.2
[core@localhost ~]$ uname -a
Linux localhost 5.12.9-300.fc34.x86_64 #1 SMP Thu Jun 3 13:51:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[core@localhost ~]$
```
Currently, Podman only supports running one VM at a time.
### Stopping your VM
To stop a running VM, use the `stop` command:
```
podman machine stop
[core@localhost ~]$ Connection to localhost closed by remote host.
Connection to localhost closed.
Error: exit status 255
```
I hope this helps you get started with Podman Machine. Give it a try, and let us know what you think in the comments.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/7/linux-podman
作者:[Sumantro Mukherjee][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sumantro
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop)
[2]: http://coreos.github.io/rpm-ostree/
[3]: https://github.com/containers/podman
[4]: http://docs.podman.io/en/latest/markdown/podman-machine.1.html

View File

@ -0,0 +1,95 @@
[#]: subject: (5 useful ways to manage Kubernetes with kubectl)
[#]: via: (https://opensource.com/article/21/7/kubectl)
[#]: author: (Alan Smithee https://opensource.com/users/alansmithee)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
5 useful ways to manage Kubernetes with kubectl
======
Learn kubectl to enhance how you interact with Kubernetes.
![Ship captain sailing the Kubernetes seas][1]
Kubernetes is software to help you run lots of containers in an organized way. Aside from providing tools to manage (or [orchestrate][2]) the containers you run, Kubernetes also helps those containers scale out as needed. With Kubernetes as your central control panel (or _control plane_), you need a way to manage Kubernetes, and the tool for that job is kubectl. The `kubectl` command lets you control, maintain, analyze, and troubleshoot Kubernetes clusters. As with many tools using the `ctl` (short for "control") suffix, such as systemctl and sysctl, kubectl has purview over a broad array of functions and tasks, so you end up using it a lot if you're running Kubernetes. It's a big command with lots of options, so here are five common tasks that kubectl makes easy.
### 1\. List and describe resources
Containers, by design, tend to multiply. Under certain conditions, they can multiply rapidly. This can get overwhelming if the only way you have to see running containers is `podman ps` or `docker ps`. With `kubectl get` and `kubectl describe`, you can get information about what pods are running and the containers they're handling. What's more is that you can get just the information you need by using options like `--namespace` or `name` or `--selector`.
The `get` subcommand is useful for a lot more than just pods and containers. It has information about nodes, namespaces, deployments, services, and replicas.
### 2\. Create resources
If you've only ever created deployments through a web user interface (UI) like one provided by OpenShift, OKD, or Kubernetes, but you're looking to take control of your cluster from your Linux terminal instead, then get ready to use `kubectl create`. The `kubectl create` command doesn't just instantiate a new app deployment, though. There are lots of other components available in Kubernetes that you can create, such as services, quotas, and [CronJobs][3].
A CronJob in Kubernetes can create a transient pod meant to perform some task on a schedule of your choice. They're not difficult to set up. Here's a CronJob to have a BusyBox image echo "hello world" every minute:
```
$ kubectl create cronjob \
hello-world \
\--image=busybox \
\--schedule="*/1 * * * *" -- echo "hello world"
```
### 3\. Edit files
You may have an understanding that objects in Kubernetes have accompanying configuration files, but rummaging through your filesystem to find the appropriate file can be troublesome. With `kubectl edit`, you can keep your mind on the objects and not on the files that define them. You can have `kubectl` find and open the file for you (it respects the `KUBE_EDITOR` environment variable, so you can set your editor to whatever you prefer):
```
$ KUBE_EDITOR=emacs \
kubectl edit cronjob/hello-world
```
### 4\. Trade files between containers
Newcomers to containers are often baffled by the concept of a shared system that they can't apparently access. They may learn about `exec` options in their container engine or in kubectl itself, but containers still can seem impervious when they can't just grab a file from or place a file into a container. Using the `kubectl cp` command, you can treat containers as if they were remote servers, making copying files to and from containers no more complex than an SSH command:
```
`$ kubectl cp foo my-pod:/tmp`
```
### 5\. Apply changes
Making changes to Kubernetes objects can be done at any time with the `kubectl apply` command. All you have to do is point the command to a configuration file:
```
`$ kubectl apply -f ./mypod.json`
```
Akin to running an Ansible playbook or a Bash script, `apply` makes it easy to "import" settings quickly into a running Kubernetes instance. For instance, the GitOps tool [ArgoCD][4] is surprisingly simple to install thanks to the `apply` subcommand:
```
$ kubectl create namespace argocd
$ kubectl apply -n argocd \
-f <https://raw.githubusercontent.com/argoproj/argo-cd/vx.y.z/manifests/install.yaml>
```
### Use kubectl
Kubectl is a powerful tool, and because it's a terminal command it can be scripted and used in many ways a web UI cannot. Learning kubectl is a great way to further your understanding of Kubernetes, containers, pods, and all the technologies that surround these important cloud innovations. [Download our kubectl cheat sheet][5] for a quick reference, complete with sample commands, to help you as you learn and remind you of the details once you're a pro.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/7/kubectl
作者:[Alan Smithee][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/alansmithee
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas)
[2]: https://opensource.com/article/20/11/orchestration-vs-automation
[3]: https://opensource.com/article/20/11/kubernetes-jobs-cronjobs
[4]: https://argoproj.github.io/argo-cd/
[5]: https://opensource.com/downloads/kubectl-cheat-sheet

View File

@ -0,0 +1,146 @@
[#]: subject: (28 books recommended by open source technologists to read right now)
[#]: via: (https://opensource.com/article/21/7/open-source-books)
[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
28 books recommended by open source technologists to read right now
======
Members of the Opensource.com community share what books they are
enjoying reading.
![Ceramic mug of tea or coffee with flowers and a book in front of a window][1]
Did you get our [summer reading list][2]?
It may not be the season of summer where you are, but summer reading lists are quintessential and somewhat cozy no matter what part of the world you live in. I love the idea of a cool breeze, a lounge chair, a drink, and a snack... all wrapped up together with a good book to pour over.
Fiction and non-fiction. Dramas, mysteries, science, romance... let us know in the comments what you're reading.
* * *
I'm working through _[How to Measure Anything][3]_, which is pretty cool. Recommended! —Moshe Zadka
For science fiction lovers, I recommend Luis McMaster Bujold's _[Vorkosigan Saga][4]_. I had never heard of her until reading Larry Wall's lecture _[Perl, the first postmodern computer language][5]_: "Note how we still periodically hear the phrase 'serious literature'. This is literature that is supposedly about Real Life. Let me tell you something. The most serious literature Ive ever read is by Lois McMaster Bujold. Any of you read her? Its also the funniest literature Ive ever read. Its also space opera. 'Genre fiction,' sneers the Modernist. Meaning it follows certain conventions. So what? Nobody in the world can mix gravity and levity the way Bujold does in her Vorkosigan books. Its oh so definitely about real life. So what if it follows space opera conventions. Sonnets follow certain conventions too, but I dont see them getting sneered at much these days. Certainly, they were always called 'serious'."
So, I started with the [_Vor Game_][6] and then couldn't stop until I finished all of the series. Moving, funny, entertaining. —Petr Beranek
I finished reading _[The Sleep Revolution][7]_ by Arianna Huffington last week. Currently reading _[The Devil in the White City][8]_ by Erik Larson. —Lauren Maffeo
I'm currently reading [_Nemesis Games_][9] (book 5 in _The Expanse_sci-fi series).
Next on my reading list is [_Greater Good_][10] (book 2 in the_Star Wars: Thrawn Ascendency_series). I fell into the Star Wars books a few years ago, and have been reading them in between other books on my reading list. I loved the original _Thrawn_ series, the _Ahsoka_ book, the _Darth Bane_ series, and the _Darth Plagueis_ book. Some are not so great, like _Outbound Flight_ (didn't get into it), _Master &amp; Apprentice_ (kind of dull), and _Light of the Jedi_ (the first in the "High Republic" series). And then there are some in the middle, like the _Tarkin_ book (interesting character) and _Lords of the Sith_ (predictable, but good).
McCloud's _[Understanding Comics][11]_ is a great book! I read it when I was working on my Master's degree, about 8 years ago, during my independent study on visual rhetoric. My instructor and I found it to be a very useful reference in how images communicate.
Another one: _[Picture This][12]_ by Molly Bang. I thumbed through that so many times when learning about icons (same visual rhetoric class) that some of the pages started falling out. —Jim Hall
Sometimes, I wonder what I haven't been reading, because I always have a book or two or three on my Kindle.
I am a huge reader of SciFi and Fantasy, so I just finished the Hugo and Nebula winner, [_A Memory Called Empire_][13]. It has a fascinating premise and good characterizations, but I thought the writing would be a little stronger. Like Ancillary Justice, this book explores the idea of colonization. But in the case of A Memory Called Empire the colonizers look a lot like the Aztec Empire writ large. Oh, and this empire is obsessed with complicated poetry. Citizens use poems to encrypt email and provide travelogues.
My favorite book in a while is _[All Systems Red][14]_, the first book in The Murderbot Diaries, by Martha Wells. Imagine that you have an artificial human, who's a little bit of a clone and a little bit of a robot. She's sentient and self-aware, can destroy a human or a building in seconds flat, and has overwritten her governor program, but really she just wants to curl up in her cubby and binge-watch her favorite infotainment. Oh, and she has social anxiety. Except for the part about being able to destroy a spaceship, she's a lot like me.
I'm also currently reading Brandon Sanderson's [_Words of Radiance_][15]. —Ingrid Towey
One of the best recent books I read was _[Bomber Mafia][16]_ by Malcolm Gladwell. It was a fascinating read. I also read *[Persist][17] *by Elizabeth Warren which I found interesting. I just started reading [_While Justice Sleeps_][18] by Stacey Abrams. I recently read "Killing Crazy Horse" by Bill O'Reilly and "The Soul of a Woman" by Isabel Allende. That book was so compelling that I bought copies for my daughter and daughter-in-law. —Don Watkins
Im currently reading the new Christine Morgan novel _[Trench Mouth][19]_, having just finished the original *Metropolis *(the one Fritz Lang adapted the movie from), and next up is _Cultish: The Language of Fanaticism_ by Amanda Montell. Ive also got _Workplace Jazz_ and _Culture is the Bass_ by Gerold Leonard in there, and am eagerly awaiting _Final Girl Support Group_ by Grady Hendrix, which will be out next month. —Kevin Sonney
I've got two books I'm reading: _[Laziness Does Not Exist][20]_ by Devon Price. This is a look at how the over-emphasis on productivity has gone too far in our culture. And, [_His Truth is Marching On_][21] by Jon Meacham. This is a look at the life and experience of John Lewis. —Steve Morris
My year-round reading continues to be mainly books from Project Gutenberg. Recently I've read a number of books by Hillaire Belloc, mainly his commentaries on various topics ("On Anything", "On Everything" to name two). I also enjoy reading things by GK Chesterton. It can be hard to decide what the real point is that he is trying to make as he complains about this or that, but he's entertaining nonetheless.
Currently, I'm reading _[Thirty Strange Stories][22]_ by HG Wells. I've also read a number of his commentaries, which are quite good generally. It seems that most books I read come from the late 19th or very early 20th century.
**[Read next: [10 must-read technology books for 2021][23]]**
A book I would recommend if you've never read it is _[Candide][24]_ by Voltaire. I went through it hopping back and forth from the English to the French versions. The French seemed just a bit more entertaining.
I do all this with my tablet. Something I've really gotten attached to is the ability to highlight some word or phrase, then immediately be able to look it up on the internet on the tablet, or translate with an app. —Greg Pittman
I recommend: _[Mastermind][25]_ by Maria Konnikova, and _[The Mind Map Book][26]_ by Tony Buzan —Hüseyin GÜÇ
I've been reading a lot of work-related books through a couple of work bookclubs. One I'm reading now that I really like is _[No Hard Feelings][27]_ by Fosslien and Duffy-West. It's a light read that talks about the ways emotions show up at work, and how to manage (your and other people's) emotions at work.
Outside work, I've been reading some books on design. _[Understanding Comics][11]_ by Scott McCloud is my current read, and I recently finished the very enjoyable _[How Design Makes the World][28]_ by Scott Berkun, simultaneously a great lit review of books on the design of everyday things around us, and an overview of how (conscious and unconscious) design decisions impact our lives, and how we can improve the world by being aware of when we make our own design decisions.
Finally, I have also been reading some historical non-fiction. Most recently, I loved _[The Guns of August][29]_ by Barbara Tuchman about the outbreak and early days of World War One. And I'm looking forward to reading "How the Irish Became White" (a book I heard about from Christine Dunbar-Hester, who wrote the book Bryan recommended) about the evolution of the Irish cultural identity through the 19th and 20th century. —Dave Neary
A little out of the how-to corner: I am currently reading [_Learn You a Haskell for Great Good!_][30] It is a beginner's guide to the Haskell programming language, a very strange thing from my viewpoint. —Stephan Avenwedde
Here in Vancouver, Canada we have hit summer weather as well as passing the solstice; today we're expecting a high of 26ºC and by late in the week we may hit 30ºC (which is unusually warm hereabouts). But lovely, for sure. And I'm looking forward to kicking back in the late afternoon with a nice cool beverage and a good book, so just in time for the summer reading list!
My colleagues in Chile are in quarantine right now and it's winter there. The Mapuche new year We Tripantu and the Aymara Willkakuti are upon us, a time of reflection, celebration, and anticipation of the year to come: all, I am sure, hoping for better! There is also the winter school vacation that in theory runs from the 12th to the 23rd of July, which in a normal year would give an opportunity for digging into the recommendations on the summer reading list after a day of chasing the kids around a park or skiing or sledding in the mountains. For anyone interested, here is a short English article on [Willkakuti in Bolivia][31], and here is another on [We Tripantu in Argentina and Chile][32]. —Chris Hermansen
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/7/open-source-books
作者:[Jen Wike Huger][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jen-wike
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tea-cup-mug-flowers-book-window.jpg?itok=JqThhl51 (Ceramic mug of tea or coffee with flowers and a book in front of a window)
[2]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list
[3]: https://openlibrary.org/books/OL7596184M/How_to_Measure_Anything
[4]: https://en.wikipedia.org/wiki/Vorkosigan_Saga
[5]: http://www.wall.org/~larry/pm.html
[6]: https://en.wikipedia.org/wiki/The_Vor_Game
[7]: https://www.ariannahuffington.com/the-sleep-revolution/
[8]: https://eriklarsonbooks.com/book/the-devil-in-the-white-city/
[9]: https://en.wikipedia.org/wiki/Nemesis_Games
[10]: https://starwars.fandom.com/wiki/Thrawn_Ascendancy:_Greater_Good
[11]: https://en.wikipedia.org/wiki/Understanding_Comics
[12]: https://www.mollybang.com/Pages/picture.html
[13]: https://en.wikipedia.org/wiki/A_Memory_Called_Empire
[14]: https://en.wikipedia.org/wiki/All_Systems_Red
[15]: https://stormlightarchive.fandom.com/wiki/Words_of_Radiance
[16]: https://en.wikipedia.org/wiki/Bomber_Mafia
[17]: https://us.macmillan.com/books/9781250799241
[18]: https://www.penguinrandomhouse.com/books/648021/while-justice-sleeps-by-stacey-abrams/
[19]: https://www.fantasticfiction.com/m/christine-morgan/trench-mouth.htm
[20]: https://bookshop.org/books/laziness-does-not-exist/9781982140106
[21]: https://www.penguinrandomhouse.com/books/606295/his-truth-is-marching-on-by-jon-meacham/
[22]: http://www.gutenberg.org/ebooks/59774
[23]: https://enterprisersproject.com/article/2021/1/10-technology-books-must-read-2021
[24]: https://en.wikipedia.org/wiki/Candide
[25]: https://www.mariakonnikova.com/books/mastermind/
[26]: https://tonybuzan.com/product/the-mind-map-book/
[27]: https://www.penguinrandomhouse.com/books/564051/no-hard-feelings-by-liz-fosslien-and-mollie-west-duffy/
[28]: https://designmtw.com/
[29]: https://en.wikipedia.org/wiki/The_Guns_of_August
[30]: http://learnyouahaskell.com/
[31]: https://info.handicraft-bolivia.com/Aymara-New-Year-a33-sm162
[32]: https://www.mapuche-nation.org/english/html/news/n-276.html

View File

@ -0,0 +1,77 @@
[#]: subject: (How to Fix yay: error while loading shared libraries: libalpm.so.12)
[#]: via: (https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/)
[#]: author: (Arindam https://www.debugpoint.com/author/admin1/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
How to Fix yay: error while loading shared libraries: libalpm.so.12
======
This quick guide is to help you to fix yay error while loading shared
libraries: libalpm.so.12.
If you are running [Arch Linux][1] in a system for a longer time, things can break due to its rolling release nature combined with your hardware support. If you use the [AUR Helper Yay][2], then sometimes, yay can be corrupted due to several installations, upgrade of other packages.
The YAY helper itself is very stable, but sometimes it gets messed up, and you can not do any installation using it until you fix it. And one of the nagging error is this:
```
yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory
```
This error particularly comes after upgrading to pacman 6.0 due to incompatibility of shared libraries.
![error while loading shared libraries yay][3]
### How to fix yay error while loading shared libraries: libalpm.so.12
* This error can only be fixed by uninstalling yay completely, including its dependencies.
* Then re-installing yay.
* There is no other way to solve this error.
* We already have a guide [how to install Yay][4], however, here are the steps to fix.
* Clone the yay repo from AUR and build. Run the following command in sequence from a terminal window.
```
cd /tmp
git clone 'https://aur.archlinux.org/yay.git'
cd /tmp/yay
makepkg -si
cd ~
rm -rf /tmp/yay/
```
After installation, you can try running the command which gave you this error. And you should be all set. If youre still having error, let me know in the comment box below.
Apparently, this has been encountered by many people and [several discussions][5] happened across web. Above is the only solution to this error. And I could not find exact root cause of the problem anywhere except it starts after pacman 6.0 update.
[][6]
SEE ALSO:   How to Install Java in Arch Linux and Manjaro
* * *
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://archlinux.org/
[2]: https://aur.archlinux.org/packages/yay/
[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg
[4]: https://www.debugpoint.com/2021/01/install-yay-arch/
[5]: https://github.com/Jguer/yay/issues/1519
[6]: https://www.debugpoint.com/2021/02/install-java-arch/

View File

@ -0,0 +1,118 @@
[#]: subject: (UVdesk: A Free and Open-Source Helpdesk Ticket System)
[#]: via: (https://itsfoss.com/uvdesk/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
UVdesk: A Free and Open-Source Helpdesk Ticket System
======
There are countless open-source solutions (including [website creation tools][1] and [forum software][2]) that power the web, and a helpdesk system is one of the vital areas that can benefit from it.
UVdesk is a free and open-source PHP based support ticket system with impressive options that you can start for free.
Here I shall mention more about it and how you can set it up for your business.
### UVDesk: Open-Source Customer Support Solution
![][3]
[UVDesk][4] is a helpdesk system built on [Symfony][5] (PHP framework for web development). An exciting alternative to proprietary ticketing systems like Zendesk.
It is another open-source offering from the same company responsible for [Bagisto][6] (an ecommerce platform that weve covered before).
UVDesk is primarily free but offers paid options if you want extra features and added security for your business.
You can respond to customer queries, create documentations, manage the support tickets, and do a lot of things from a single place. This is especially helpful if you have an [eCommerce platform][7] setup.
To explore more about it, let me highlight the key features it offers.
### Features of UVDesk Helpdesk System
In addition to the basic abilities of a support system, it also offers some interesting features.
![][8]
Heres an overview of the features offered:
* Ticket management and administration
* Task management options to assign tickets and set a deadline for support agents
* Email management to convert emails to support tickets
* Ability to create documentations (knowledgebase) to guide customers for self-help
* Theme customization of the support system/portal
* Multi-channel support (aggregating support requests from different platforms like Facebook, Amazon, Website)
* Automated options for customer follow-up reminders
* Improve the workflow with the ability to automate tasks and how theyre handled
* Progress Web App support
* Social Media App integration
* Ecommerce multi-channel integration
* Form builder
* Monitor agents support performance
* Easy migration options when switching from a different support system to UVdesk
* Self-hosting
Do note that some of the features will be limited to the paid option. But the essential features should be available completely for free.
### Get Started Using UVdesk
You can directly download the zip package from the [official website][4]. It can be deployed using Docker as well.
For installation instructions, you can check their [GitHub page][9] and the [official documentation][10] to check the system requirements. In either case, you can also opt for a one-click setup on your Linux server using [Softaculous installer][11].
[UVdesk][4]
### Quick Impressions on the Demo
They offer you the ability to try a [live demo][12] before you consider using it.
![][13]
Ive never worked on a support system before, but limited to eCommerce projects using OpenCart, which is one of the [best open source eCommerce platforms][7].
But I found the back-end system to be pretty simple and accessible. It is not a breathtaking experience on the back-end side, but ranging from the branding customization options to managing the knowledge base, it is an easy-to-use experience.
![][14]
I also found the ticket management good enough.
![][15]
### Wrapping Up
Overall, UVdesk is a flexible, open-source helpdesk system that you can try and use for free. Of course, if you have a sizable business, you may need to opt for the paid plans available.
What other open-source helpdesk systems do you know of? How important do you think a helpdesk portal is? Let me know in the comments below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/uvdesk/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/open-source-cms/
[2]: https://itsfoss.com/open-source-forum-software/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/06/uvdesk-open-source.png?resize=800%2C461&ssl=1
[4]: https://www.uvdesk.com/en/opensource/
[5]: https://symfony.com/
[6]: https://itsfoss.com/bagisto/
[7]: https://itsfoss.com/open-source-ecommerce/
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/06/uvdesk-contact.png?resize=800%2C548&ssl=1
[9]: https://github.com/uvdesk/community-skeleton
[10]: https://docs.uvdesk.com
[11]: https://www.softaculous.com
[12]: https://demo.uvdesk.com/
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/06/uvdesk-admin.png?resize=800%2C830&ssl=1
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/06/uvdesk-mail-settings.png?resize=800%2C469&ssl=1
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/06/uvdesk-ticket-management.png?resize=800%2C664&ssl=1

View File

@ -0,0 +1,77 @@
[#]: subject: (How to Install VLC on Fedora Linux)
[#]: via: (https://itsfoss.com/install-vlc-fedora/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
How to Install VLC on Fedora Linux
======
If you have just installed Fedora and now wants to install your favorite video player VLC on it, you probably wont find it in the software center. Not immediately, at least.
For reasons best known to their developers, Fedora neither ship with [VLC][1] nor does it include in the official Fedora repository.
So, how do you install VLC on Fedora then? Simple. RPM Fusion is your friend here. Let me show you the steps in detail.
### Installing VLC on Fedora Linux
Using the command line will be easier here. You may use the graphical method as well. Ill discuss it later.
Open a terminal and use the following command to add and enable RPM Fusion repository that contains the VLC package:
```
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
```
Press Y when asked to confirm adding the new repo. Next, install VLC using DNF command:
```
sudo dnf install vlc
```
It will install VLC in Fedora from the RPM Fusion repository and a few additional dependencies from various repositories.
![Installing VLC in Fedora with DNF command][2]
Once installed, you can search for VLC in the application menu or search for it in the “activities area”.
![Search for VLC][3]
Click on it, start it and enjoy it.
#### Alternate method: Installing VLC from software center
When you have enabled RPM Fusion repository, you can display the applications from this repo in the software center. To do that, use the following command in the terminal:
```
sudo dnf groupupdate core
```
After that, open software center and search for VLC and install from there.
![VLC in Fedora software center][4]
If you have added FlatHub repository, please avoid installing the Flatpak version of VLC because it is around 1 GB in size. The RPM version is a lot smaller in size.
I hope you find this quick tutorial helpful in installing VLC on Fedora. Enjoy.
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-vlc-fedora/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://www.videolan.org/
[2]: https://itsfoss.com/wp-content/uploads/2021/07/installing-vlc-fedora-800x422.webp
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/vlc-fedora.png?resize=799%2C223&ssl=1
[4]: https://itsfoss.com/wp-content/uploads/2021/07/vlc-in-fedora-software-center-800x486.webp

View File

@ -0,0 +1,144 @@
[#]: subject: (How to Recover Arch Linux Install via chroot)
[#]: via: (https://www.debugpoint.com/2021/07/recover-arch-linux/)
[#]: author: (Arindam https://www.debugpoint.com/author/admin1/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
How to Recover Arch Linux Install via chroot
======
This quick guide explains some of the steps which may come in handy to
recover an Arch Linux Install.
Being a rolling release, sometimes things breaks in [Arch Linux][1]. Not because of your own actions, but hundreds of other reasons such as new Kernel vs your hardware, or software compatibility. But still, Arch Linux is still better and provides the latest packages and applications.
But sometimes, it gives you trouble and you end up with a blinking cursor and nothing else.
So, in those scenarios, instead of re-formatting or reinstalling, you may want to try to recover the installation including the data before giving up your hope. This guide outlines some steps in that direction.
### Recover Arch Linux Installation
* First step is to **create a bootable LIVE USB** with Arch Linux. Download the .ISO from this link and create a bootable .ISO. You can check out this guide on [how to create bootable .ISO using Etcher][2]. Remember this step require another working stable system obviously as your current system is not usable.
[download arch linux][3]
* You need to know on **which partition your Arch Linux** is installed. This is a very important step. If you dont know, you can use GParted to find out. Or check in your Grub menu, Or you can run the below command to find out. This will list all of your disk partitions with their size, labels.
```
sudo lsblk -o name,mountpoint,label,size,uuid
```
* Once done, plug-in the USB stick and boot from it. And you should see the Arch Linux prompt in the LIVE medium.
* Now, mount to the Arch Linux partition using below. Change the `/dev/sda3` to your respective partition.
```
mount /dev/sda3 /mnt
arch-chroot /mnt
```
* The arch-chroot command will mount your Arch Linux partition in the terminal, so login using your Arch credentials. Now, at this stage, you have the following options, based on what you want.
* You can take backups of your data by going through /home folders. In case, troubleshooter doesnt work. You may copy the files to external USB or another partition.
* Verify the log files, specially the **pacman logs**. Because, unstable system may be caused by upgrading some packages such graphics driver or any other driver. Based on the log, you may want to downgrade any specific package if you want.
* You may use the below command to view last 200 lines of the pacman log file to find out any failing items or dependency removal.
```
tail -n 200 /var/log/pacman.log | less
```
* The above command gives you the 200 lines from the end of the pacman.log file to verify. Now, carefully check which of the packages were updates since your successful boot.
* And note down the package name and version somewhere. And you may try to downgrade packages one-by-one or if you think a specific package created a problem. Use the -U switch of pacman command to downgrade.
```
pacman -U <package name>
```
* You can run the following to start your Arch system after downgrading, if any.
```
exec /sbin/init
```
* Check the status of your display manager, whether if there are any errors. Sometimes, display manager creates a problem which cant communicate with X Server. For example, if you are using lightdm, then you can check its status via below.
```
systemctl status lightdm
```
* Or, may want to start it via below command and check what is the error.
```
lightdm --test-mode --debug
```
* Here is an example of lightdm failure which caused an unstable Arch system.
![lightdm test mode][4]
* Or check via kicking off the X server using `startx`.
* In my experience, if you see errors in the above command, try to install another display manager such as **sddm** and enable it. It may eliminate the error.
* Try the above steps, based on the state of your system, and troubleshoot. For errors specific to display manager lightdm, we have a [guide][5] which you may want to check out.
* If you are using sddm, then check out [these troubleshooting steps][6] if something works.
[][7]
SEE ALSO:   Essential Pacman Commands for Arch Linux [With Examples]
### Closing Notes
Every installation is different. And above steps may/may not work for you. But it is worth a try and as per experience, it works. If it works, well, good for you. Either way, do let me know in the comment box below, how it goes.
* * *
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2021/07/recover-arch-linux/
作者:[Arindam][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: https://www.debugpoint.com/tag/arch-linux
[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/
[3]: https://archlinux.org/download/
[4]: https://www.debugpoint.com/blog/wp-content/uploads/2021/03/lightdm-test-mode.jpg
[5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/
[6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting
[7]: https://www.debugpoint.com/2021/02/pacman-command-arch-examples/

View File

@ -0,0 +1,63 @@
[#]: subject: (Making PDFs more accessible to screen readers with open source)
[#]: via: (https://opensource.com/article/21/7/pdf-latex)
[#]: author: (Quinn Foster https://opensource.com/users/quinn-foster)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Making PDFs more accessible to screen readers with open source
======
One university open source program office is working to improve
accessibility of an open access journal with LaTeX.
![Person using a laptop][1]
A screen reader is a vital tool that helps individuals who are blind or low-vision read digital text. Unfortunately, not all file formats receive the same level of support from screen readers. For example, while PDF files have accessibility features that you can use, they are often not the preferred file format for screen reader users. Between line breaks, multiple columns, symbols, and images, screen readers can have trouble reading PDFs in a cohesive way to their users.
This is what the folks at [Open@RIT][2] are trying to change.
Open@RIT is the open source program office at the Rochester Institute of Technology, offering RIT faculty and staff assistance in opening their research projects and maintaining communities of practice around their work. One such faculty member is Dr. Todd Pagano, Professor of Chemistry and Associate Dean for Teaching and Scholarship Excellence at the National Technical Institute for the Deaf. Dr. Pagano came to Open@RIT seeking help to increase the accessibility of an open-access journal, the publications of which currently exist as PDFs.
The Open@RIT team, consisting of UX designer Rahul Jaiswal and full-stack developer Suhas C.V., have used this project as a stepping stone to begin exploring ways to convert PDFs into accessible HTML.
> "It's very difficult to make PDFs fully accessible, especially in an automated way," says Mike Nolan, assistant director of Open@RIT. 
Open@RIT tested multiple tools that already included accessibility features in their quest to convert PDFs into HTML successfully. Despite these features, the resulting HTML files still had many issues that made them difficult for screen readers to read, such as pauses and interruptions.
At this point, Open@RIT decided to pursue a more open source tool-chain to assist in the conversion from received submissions to accessible formats like HTML while maintaining the same style and general look of the published article, in which the use of LaTeX was instrumental.
The workflow with LaTeX is simple:
* A submitted paper—in the form of a PDF—is pasted into a  `.tex` template and turned into a `.tex` file.
This `.tex` template is an edited version of the Association for Computing Machinery ([ACM][3]) `.tex` template.
* Then [_tex2html_][4]—the conversion tool built by Open@RIT—is applied to the `.tex` file that uses an open source LaTeX converter called LaTeXML to convert it to HTML finally.
* The resulting HTML file shows significant improvement with screen readers.
Some standing issues with the tool-chain are still being worked on, but using LaTeX to facilitate and standardize the generation of the resulting formats (PDF and HTML) has shown great promise in achieving this goal. Publishing journal articles in PDF and HTML gives readers a choice and more options for compatibility with screen readers.
Those who want to learn more about the project will get the chance very soon. During their explorations of LaTeX, Rahul and Suhas contacted experts associated with [TeX Users Group (TUG) 2021][5]—this year's conference run by [TUC][6] for all things TeX and LaTeX. They're invited to do a presentation on their project. The duo, along with Dr. Pagano, will discuss how they have been using LaTeX in their accessibility efforts and the need for journals to be accessible. TUG 2021 will be running online from August 5-8, 2021.
Their work shows the capacity for open source to be used in a way that doesn't just increase digital transparency but also accessibility for all people.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/7/pdf-latex
作者:[Quinn Foster][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/quinn-foster
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
[2]: https://www.rit.edu/research/open
[3]: https://services.acm.org/public/qj/keep_inventing/qjprofm_control.cfm?promo=DA4SCA
[4]: https://gitlab.com/open-rit/tex2html
[5]: https://tug.org/tug2021/
[6]: https://www.tug.org/

View File

@ -7,109 +7,93 @@
[#]: publisher: ( )
[#]: url: ( )
How the ARPANET Protocols Worked
ARPANET 协议是如何工作的
======
The ARPANET changed computing forever by proving that computers of wildly different manufacture could be connected using standardized protocols. In my [post on the historical significance of the ARPANET][1], I mentioned a few of those protocols, but didnt describe them in any detail. So I wanted to take a closer look at them. I also wanted to see how much of the design of those early protocols survives in the protocols we use today.
ARPANET 通过证明可以使用标准化协议连接完全不同的制造商的计算机,永远改变了计算。 在我的[关于 ARPANET 的历史意义的帖子][1]中,我提到了其中的一些协议,但没有详细描述它们。所以我想仔细看看它们。也想看看那些早期协议的设计有多少保留到了我们今天使用的协议中。
ARPANET 通过证明完全不同制造商的计算机能够使用标准化的协议连接起来,从而永久的改变了计算。在我的[关于 ARPANET 的历史意义的帖子][1]中,我提到了其中的一些协议,但没有详细描述它们。所以我想更进一步探索它们。也想看看那些早期协议的设计在我们今天使用的协议中有多少被保留了下来。
ARPANET 协议像我们现代的互联网协议,是通过分层形式来组织的。[1][2] 较高层协议运行在较低层协议之上。如今的 TCP/IP 套件有 5 层(物理层、链路层、网络层、传输层、以及应用层),但是这个 ARPANET 仅有 3 层或者可能 4 层,这取决于你怎样计算它们。
我将会解释每一层是如何工作的,但首先,你需要知道谁在 ARPANET 中是构建了些什么,以及还需要了解为什么要分层。
### 短暂的历史背景
ARPANET 由美国联邦政府资助,确切的说是位于美国国防部的高级研究计划属(因此命名为 “ ARPANET ” )。美国政府并没有直接建设这个网络;而是,把这项工作外包给了位于波士顿的一家名为 Bolt, Beranek, and Newman, 的咨询公司,通常更多时候被称为 BBN。
相反, BBN 承担了实现这个网络的大部分任务,但不是全部。 BBN 所做的是设计和维护一台称为接口消息处理机或简称 IMP 的机器。这个 IMP 是一种定制的 Honeywell 小型计算机,它们被分配给那些想要接入这个 ARPANET 的遍及全国各地的各个站点。它们充当通往 ARPANET 的网关为每个站点提供多达四台主机的连接支持。它基本上是一台路由器。BBN 能控制在 IMP 上运行的软件,把数据包从一个 IMP 转发到另一个 IMP ,但是该公司无法直接控制那些将要连接到 IMP 上并且成为 ARPANET 网络中实际主机的机器。
那些主机被网络中作为终端用户的计算机科学家们所控制。位于遍及全国各地的主机站点中的这些计算机科学家们,他们负责编写允许主机之间相互通信的软件。而 IMP 赋予主机之间互相发送消息的能力,但是那并没有多大用处除非主机之间能商定一种用于消息的格式。为了解决这个问题,一群杂七杂八的人员组成了网络工作组,其中有大部分是来自各个站点的研究生,该组力求指定主机计算机使用的协议。
因此,如果你设想通过 ARPANET 进行一次成功的网络互动例如发送一封电子邮件使这些互动成功的一些工程由一组人负责BBN然而其他的一些工程则由另一组人负责网络工作组和在每个站点的工程师们。这种有组织有保障的情景或许对推动采用分层的方法来管理 ARPANET 网络中的协议起到很大的作用这反过来又影响了TCP/IP的分层方式。
The ARPANET protocols were, like our modern internet protocols, organized into layers.[1][2] The protocols in the higher layers ran on top of the protocols in the lower layers. Today the TCP/IP suite has five layers (the Physical, Link, Network, Transport, and Application layers), but the ARPANET had only three layers—or possibly four, depending on how you count them.
### 好的,回到协议上来
ARPANET 协议类似与如今的互联网协议,也是通过分层形式来组织管理的。[1][2] 较高层协议运行在较低层协议之上。如今的 TCP/IP 协议栈有5层物理层、数据链路层、网络层、传输层、以及应用层但是这个 ARPANET 仅有3层或者可能4层这取决于你们怎样去数它们。
![ARPANET Network Stack][3] _ARPANET 协议层次结构_
Im going to explain how each of these layers worked, but first an aside about who built what in the ARPANET, which you need to know to understand why the layers were divided up as they were.
协议层被组织成一个层次结构,在最底部是 “ level 0. ” [2][4] 这在某种意义上是不算数的,因为在 ARPANET 中这层完全由 BBN 控制所以不需要标准协议。level 0 的作用是管理数据在 IMP 之间如何传输。在 BBN 内部,有管理 IMP 如何做到这一点的规则;在 BBN 之外IMP 子网是一个黑匣子它只会传送你提供的任意数据。因此level 0 是一个没有真正协议的层,就公开已知和商定的规则集而言,它的存在可以被运行在 ARPANET 的主机上的软件忽略。粗略地说,它处理相当于当今使用的 TCP/IP 套件的物理层、链路层和网络层下的所有内容,甚至还包括相当多的传输层,这是我将在这篇文章的末尾回来讨论的内容。
我将会解释每一层是如何工作的,但首先,你需要知道谁在 ARPANET 中构建了些什么,以及需要了解为什么层要被划分成这样。
“ level 1 ” 层在 ARPANET 的主机和它们所连接的 IMP 之间建立了接口。如果你愿意可以认为它是为 BBN 构建的 “ level 0 ” 层的黑匣子使用的一个应用程序接口。 当时它也被称为 IMP-Host 协议。 必须编写和发布该协议,因为在首次建立 ARPANET 网络时,每个主机站点都必须编写自己的软件来与 IMP 连接。 除非 BBN 给他们一些指导,否则他们不会知道如何做到这一点
### Some Quick Historical Context
短暂的历史背景
The ARPANET was funded by the US federal government, specifically the Advanced Research Projects Agency within the Department of Defense (hence the name “ARPANET”). The US government did not directly build the network; instead, it contracted the work out to a Boston-based consulting firm called Bolt, Beranek, and Newman, more commonly known as BBN.
ARPANET 由美国联邦政府资助确切的说是位于美国国防部内的高级研究计划属因此命名为“ARPANET”。美国政府并没有直接建设这个网络而是它把这项工作外包给了基于波士顿的一家名为 Bolt, Beranek, 和 Newman, 通常更多时候被称为 BBN 的咨询公司。
BBN 在一份名为 [BBN Report 1822][5] 的冗长文件中指定了 IMP-Host 协议。 随着 ARPANET 的发展,该文件多次被修订; 我将在这里大致描述 IMP-Host 协议最初设计时的工作方式。 根据 BBN 的规则,主机可以将长度不超过 8095 位的消息传递给它们的 IMP并且每条消息都有一个包含目标主机号和链路识别号的头部字段。[3][6] IMP 将检查指定的主机号,然后尽职尽责地将消息转发到网络中。 当从远端主机接收到消息时,接收 IMP 在将消息传递给本地主机之前会把目标主机号替换为源主机号。 实际上在 IMP 之间传递的内容并不是消息——IMP 将消息分解成更小的数据包以便通过网络传输——但该细节对主机来说是不可见的。
BBN, in turn, handled many of the responsibilities for implementing the network but not all of them. What BBN did was design and maintain a machine known as the Interface Message Processor, or IMP. The IMP was a customized Honeywell minicomputer, one of which was delivered to each site across the country that was to be connected to the ARPANET. The IMP served as a gateway to the ARPANET for up to four hosts at each host site. It was basically a router. BBN controlled the software running on the IMPs that forwarded packets from IMP to IMP, but the firm had no direct control over the machines that would connect to the IMPs and become the actual hosts on the ARPANET.
![1969 Host-IMP Leader][7]_Host-IMP 消息头部格式, 截至 1969. 图标来自 [BBN Report 1763][8]_
反过来BBN 承担了实现这个网络的大部门责任但不是全部。BBN 所做的是设计和维护一个称为接口消息处理器或者简称IMP的机器。
链路号的取值范围为 0 到 255 ,它有两个作用。一是更高级别的协议可以利用它在网络上的任何两台主机之间建立多个通信信道,因为可以想象得到,在任何时刻都有可能存在多个本地用户与同一个目标主机进行通信的场景(换句话说,链路号允许在主机之间进行多路通信。)二是它也被用在 “ level 1 ” 层去控制主机之间发送的大量流量,以防止高性能计算机压制低性能计算机的情况出现。按照最初的设计,这个 IMP-Host 协议限制每台主机在某一时刻通过某条链路仅发送一条消息。一旦某台主机沿着某条链路发送了一条消息给远端主机后,在它沿着该链路发送下一条消息之前,必须等待接收一条来自远端的 IMP 的特别类型的消息,叫做 RFNM请求下一条消息。针对这个体系的后期修订为了改善它的性能允许一台主机在给定的时刻传送多达8条消息给另一台主机。.[4][9]
The host machines were controlled by the computer scientists that were the end users of the network. These computer scientists, at host sites across the country, were responsible for writing the software that would allow the hosts to talk to each other. The IMPs gave hosts the ability to send messages to each other, but that was not much use unless the hosts agreed on a format to use for the messages. To solve that problem, a motley crew consisting in large part of graduate students from the various host sites formed themselves into the Network Working Group, which sought to specify protocols for the host computers to use.
“ level 2 ” 层才是事情真正开始变得有趣的地方,因为这一层和在它上面的那一层由 BBN 和国防部全部留给学者们和网络工作组自己去研发。 “ level 2 ” 层包括了 Host-Host 协议,这个协议在 RFC9 中第一次被草拟并且在 RFC54 中第一次被官方指定。更多可读的 Host-Host 协议的解释在 [ ARPANET 协议手册][10] 中被给出。
So if you imagine a single successful network interaction over the ARPANET, (sending an email, say), some bits of engineering that made the interaction successful were the responsibility of one set of people (BBN), while other bits of engineering were the responsibility of another set of people (the Network Working Group and the engineers at each host site). That organizational and logistical happenstance probably played a big role in motivating the layered approach used for protocols on the ARPANET, which in turn influenced the layered approach used for TCP/IP.
“ Host-Host 协议 ” 管理主机之间如何创建和管理链接。链接是某个主机上的写套接字和另一个主机上的读套接字之间的一个单向的数据管道。“ 套接字 ” 的概念是在 “ level-1 ” 层的有限的链路设施(记住链路号只是那 256 个值中的一个)之上被引入的,是为了给程序提供寻找运行在远端主机上的特定进程地址的一种方式。“ 读套接字 ” 是用偶数表示的,而“写套接字”是用奇数表示的;套接字是 “ 读 ” 还是 “ 写 ” 被称为套接字的 “性别”。并没有类似于 TCP 协议那样的 “ 端口号 ” 机制,链接的打开、维持以及关闭操作是通过主机之间使用 “ 链路 0 ” 发送指定格式的 Host-Host 控制消息来实现的,这也是 “ 链路0 ” 被保留的目的。一旦控制消息在“链路 0”上被交换来建立起一个连接后就可以使用接收端挑选的另一个链路号来发送进一步的数据消息。
### Okay, Back to the Protocols
Host-Host控制消息一般通过 3 个字母型的助记符来表示。当两个主机交换一条 STR发送端到接收端消息和一条配对的 RTS接收端到发送端消息后就建立起了一条链接。——这些控制消息都被称为请求链接消息。链接能够被 CLS (关闭)控制消息关闭。存在更进一步的控制信息能够改变从发送端到接收端发送消息的速率。从而需要确保较快的主机不会压制较慢的主机。在 “ level 1 ” 层上的协议提供了流量控制的功能,但对 “ level 2 ” 层来说显然是不够的;我怀疑这是因为从远端 IMP 接收到的 RFNM 只能保证远端 IMP 已经传送该消息到目标主机,不能保证目标主机已经全部处理了该消息。 还有 INR接收端中断、INS发送端中断控制消息它们主要是被高层协议使用。
![ARPANET Network Stack][3] _The ARPANET protocol hierarchy._
更高级别的协议都位于 “ level 3 ” ,这层是 ARPANET 的应用层。Telnet 协议,它提供到另一台主机的一个虚拟电传链接,其可能是这些协议中最重要的。但在这层中也有许多其他协议,例如用于传输文件的 FTP 协议和各种用于发送email的实验协议。
The protocol layers were organized into a hierarchy. At the very bottom was “level 0.”[2][4] This is the layer that in some sense doesnt count, because on the ARPANET this layer was controlled entirely by BBN, so there was no need for a standard protocol. Level 0 governed how data passed between the IMPs. Inside of BBN, there were rules governing how IMPs did this; outside of BBN, the IMP sub-network was a black box that just passed on any data that you gave it. So level 0 was a layer without a real protocol, in the sense of a publicly known and agreed-upon set of rules, and its existence could be ignored by software running on the ARPANET hosts. Loosely speaking, it handled everything that falls under the Physical, Link, and Internet layers of the TCP/IP suite today, and even quite a lot of the Transport layer, which is something Ill come back to at the end of this post.
在这一层中有一个不同于其他的协议初始链接协议ICP。ICP被认为是一个 “ level-3 ” 层协议,但实际上它是一种 “ level-2.5 ” 层协议,因为其他 “ level-3 ” 层协议都依赖它。ICP的存在是因为 “ level 2 ” 层的 Host-Host 协议提供的链接只是单向的,但大多数的应用需要一个双向(列如:全双工)的链接来做任何有趣的事情。要使得运行在某个主机上的客户端能够链接到另一个主机上长时间运行的服务进程, ICP 定义了两个步骤。第一步是建立一个从服务端到客户端的单向链接,通过使用服务端进程的众所周知的 socket 号来实现。第二步服务端通过建立的这个链接发送一个新的 socket 号给客户端。到那时,那个存在的链接就会被丢弃,然后有另外两个新的链接会被开启,它们是基于传输的 socket 号建立的“读”链接和基于传输的 socket 号加 1 的 “ 写 ” 链接。这个小插曲是大多数事务的一个前提——比如它是建立 Telnet 链接的第一步。
The “level 1” layer established the interface between the ARPANET hosts and the IMPs they were connected to. It was an API, if you like, for the black box level 0 that BBN had built. It was also referred to at the time as the IMP-Host Protocol. This protocol had to be written and published because, when the ARPANET was first being set up, each host site had to write its own software to interface with the IMP. They wouldnt have known how to do that unless BBN gave them some guidance.
以上是我们对 ARPANET 协议层次结构的提升。你们可能一直期待我在某个时候提一下 “ Network Control Protocol ” 。在我坐下来去研究这篇贴子和我的最后一篇贴子之前,我坚定的认为 ARPANET 运行在一个叫做 NCP 的协议之上。那个首字母缩略词有时用来指代整个 ARPANET 协议,这可能就是我为什么有这个想法的原因。举个例子,[RFC801][11] 讨论了将 ARPANET 从 “ NCP ” 过渡到 “ TCP ” 的方式,这使 NCP 听起来像是一个等同TCP的 ARPANET 协议。但是对于 ARPANET 来说,从来都没有一个叫 “ Network Control Protocol ” 的东西(即使[大英百科全书是这样认为的][12]),我怀疑人们错误地将 “ NCP ” 解释为 “ Network Control Protocol ” ,而实际上它代表的是 “ Network Control Pragram ” 。网络控制程序是一个运行在各个主机上的内核级别的程序,主要负责处理网络通信,等同于现如今操作系统中的 TCP/IP 协议栈。用在 RFC 801 的 “ NCP ” 是一种转喻,而不是协议。
The IMP-Host Protocol was specified by BBN in a lengthy document called [BBN Report 1822][5]. The document was revised many times as the ARPANET evolved; what Im going to describe here is roughly the way the IMP-Host protocol worked as it was initially designed. According to BBNs rules, hosts could pass _messages_ to their IMPs no longer than 8095 bits, and each message had a _leader_ that included the destination host number and something called a _link number_.[3][6] The IMP would examine the designation host number and then dutifully forward the message into the network. When messages were received from a remote host, the receiving IMP would replace the destination host number with the source host number before passing it on to the local host. Messages were not actually what passed between the IMPs themselves—the IMPs broke the messages down into smaller _packets_ for transfer over the network—but that detail was hidden from the hosts.
### 与TCP/IP的比较
![1969 Host-IMP Leader][7] _The Host-IMP message leader format, as of 1969. Diagram from [BBN Report 1763][8]._
ARPANET 协议以后都会被 TCP/IP 协议替换(但 Telnet 和 FTP 协议除外,因为它们很容易就能在 TCP 上适配运行)。然而 ARPANET 协议都基于这么一个假设就是网络是由一个单一实体BBN来构建和管理的。 TCP/IP 协议套件是为具有可变性和不可靠性的互联的网络而设计的。这就导致了现代协议套件和 ARPANET 协议有明显的不同,比如我们现在怎样区分网络层和传输层。在 ARPANET 中部分由 IMP 实现的类似传输层的功能现在完全由在网络边界的主机负责。
The link number, which could be any number from 0 to 255, served two purposes. It was used by higher level protocols to establish more than one channel of communication between any two hosts on the network, since it was conceivable that there might be more than one local user talking to the same destination host at any given time. (In other words, the link numbers allowed communication to be multiplexed between hosts.) But it was also used at the level 1 layer to control the amount of traffic that could be sent between hosts, which was necessary to prevent faster computers from overwhelming slower ones. As initially designed, the IMP-Host Protocol limited each host to sending just one message at a time over each link. Once a given host had sent a message along a link to a remote host, it would have to wait to receive a special kind of message called an RFNM (Request for Next Message) from the remote IMP before sending the next message along the same link. Later revisions to this system, made to improve performance, allowed a host to have up to eight messages in transit to another host at a given time.[4][9]
我发现关于ARPANET协议最有趣的事情是现在在 TCP 中的传输层的功能有多少在 ARPANET 上经历了一个糟糕的青春期。我不是一个网络专家因此我拿出大学时的网络课本Kurose and Ross, lets go他们对传输层通常负责什么给出了一个非常好的概述。总结一下他们的解释一个传输层协议必须至少做到以下几点。这里的 “ segment ” 在 ARPANET 上基本等同于 “ message ” 作为术语被使用:
The “level 2” layer is where things really start to get interesting, because it was this layer and the one above it that BBN and the Department of Defense left entirely to the academics and the Network Working Group to invent for themselves. The level 2 layer comprised the Host-Host Protocol, which was first sketched in RFC 9 and first officially specified by RFC 54. A more readable explanation of the Host-Host Protocol is given in the [ARPANET Protocol Handbook][10].
* 提供进程之间的传送服务,而不仅仅是主机之间的(传输层多路复用和多路分解)
* 在每个段的基础上提供完整性检查(即确保传输过程中没有数据损坏)
The Host-Host Protocol governed how hosts created and managed _connections_ with each other. A connection was a one-way data pipeline between a _write socket_ on one host and a _read socket_ on another host. The “socket” concept was introduced on top of the limited level-1 link facility (remember that the link number can only be one of 256 values) to give programs a way of addressing a particular process running on a remote host. Read sockets were even-numbered while write sockets were odd-numbered; whether a socket was a read socket or a write socket was referred to as the sockets gender. There were no “port numbers” like in TCP. Connections could be opened, manipulated, and closed by specially formatted Host-Host control messages sent between hosts using link 0, which was reserved for that purpose. Once control messages were exchanged over link 0 to establish a connection, further data messages could then be sent using another link number picked by the receiver.
像 TCP 那样,传输层也能够提供可靠的数据传输,这意味着:
Host-Host control messages were identified by a three-letter mnemonic. A connection was established when two hosts exchanged a STR (sender-to-receiver) message and a matching RTS (receiver-to-sender) message—these control messages were both known as Request for Connection messages. Connections could be closed by the CLS (close) control message. There were further control messages that changed the rate at which data messages were sent from sender to receiver, which were needed to ensure again that faster hosts did not overwhelm slower hosts. The flow control already provided by the level 1 protocol was apparently not sufficient at level 2; I suspect this was because receiving an RFNM from a remote IMP was only a guarantee that the remote IMP had passed the message on to the destination host, not that the host had fully processed the message. There was also an INR (interrupt-by-receiver) control message and an INS (interrupt-by-sender) control message that were primarily for use by higher-level protocols.
* “段” 是按顺序被传送的
* 不会丢失任何 “段”
* “段” 的传送速度不会太快以至于被接收端丢弃(流量控制)
The higher-level protocols all lived in “level 3”, which was the Application layer of the ARPANET. The Telnet protocol, which provided a virtual teletype connection to another host, was perhaps the most important of these protocols, but there were many others in this level too, such as FTP for transferring files and various experiments with protocols for sending email.
似乎在 ARPANET 上关于如何进行多路复用和多路分解以便进程可以通信存在一些混淆—— BBN 在 IMP-Host 层引入了链路号来做到这一点,但结果证明在 Host-Host 层上无论如何套接字号都是必要的。然后链路号只是用于 IMP-Host 级别的流量控制,但 BBN 似乎后来放弃了它,转而支持在唯一的主机对之间进行流量控制,这意味着链路号开始时只是作为这个重载的东西基本上变成了遗迹。 TCP 现在使用端口代替,分别对每一个 TCP 链接进行流量控制。进程间的多路复用和多路分解完全在 TCP 内部进行,不会像 ARPANET 一样泄露到较低层去。
One protocol in this level was not like the others: the Initial Connection Protocol (ICP). ICP was considered to be a level-3 protocol, but really it was a kind of level-2.5 protocol, since other level-3 protocols depended on it. ICP was needed because the connections provided by the Host-Host Protocol at level 2 were only one-way, but most applications required a two-way (i.e. full-duplex) connection to do anything interesting. ICP specified a two-step process whereby a client running on one host could connect to a long-running server process on another host. The first step involved establishing a one-way connection from the server to the client using the server process well-known socket number. The server would then send a new socket number to the client over the established connection. At that point, the existing connection would be discarded and two new connections would be opened, a read connection based on the transmitted socket number and a write connection based on the transmitted socket number plus one. This little dance was a necessary prelude to most things—it was the first step in establishing a Telnet connection, for example.
同样有趣的是,鉴于 Kurose 和 Ross 如何开发 TCP 背后的想法ARPANET 开始于 Kurose 和 Ross 所调用的一个严谨的 “stop-and-wait” 方法,以便在 IMP-Host 层上进行可靠的数据传输。这个 “stop-and-wait” 方法发送一个 “段” 然后就拒绝再去发送更多 “段” ,直到一个最近发送的 “段” 的确认被接收到为止。这是一种简单的方法,但这意味着只有一个 “段” 在整个网络中运行,从而导致协议非常缓慢——这就是为什么 Kurose 和 Ross 将 “stop-and-wait” 仅仅作为在通往功能齐全的传输层协议的路上的垫脚石的原因。在 ARPANET 上“stop-and-wait” 是一段时间的工作方式,因为在 IMPHost 层,必须接收下一条消息的请求以响应每条发出的消息,然后才能发送任何进一步的消息。客观的说 BBN 起初认为这对于提供主机之间的流量控制是必要的因此减速是故意的。正如我已经提到的为了更好的性能RFNM 的要求后来放宽松了,而且 IMP 也开始向消息中添加序列号和保持对传输中的消息的 “窗口” 的跟踪,这或多或少与如今 TCP 的实现如出一辙。[5][13]
That finishes our ascent of the ARPANET protocol hierarchy. You may have been expecting me to mention a “Network Control Protocol” at some point. Before I sat down to do research for this post and my last one, I definitely thought that the ARPANET ran on a protocol called NCP. The acronym is occasionally used to refer to the ARPANET protocols as a whole, which might be why I had that idea. [RFC 801][11], for example, talks about transitioning the ARPANET from “NCP” to “TCP” in a way that makes it sound like NCP is an ARPANET protocol equivalent to TCP. But there has never been a “Network Control Protocol” for the ARPANET (even if [Encyclopedia Britannica thinks so][12]), and I suspect people have mistakenly unpacked “NCP” as “Network Control Protocol” when really it stands for “Network Control Program.” The Network Control Program was the kernel-level program running in each host responsible for handling network communication, equivalent to the TCP/IP stack in an operating system today. “NCP”, as its used in RFC 801, is a metonym, not a protocol.
ARPANET 表明,如果你能让每个人都遵守一些基本规则,异构计算系统之间的通信是可能的。正如我先前所说的,那个是 ARPANET 的最重要的遗产。但是我希望通过这次仔细研究的哪些基本规则所透露的是有多少 ARPANET 协议影响了我们如今所用的协议。在主机和 IMP 之间分担传输层职责的方式上肯定有很多笨拙之处,有时候是冗余的。回想起来,主机之间一开始只能通过给出的任意链路在某刻只发送一条消息,这真的很有趣。 但是 ARPANET 实验是一个独特的机会,可以通过实际构建和操作网络来学习这些经验,当到了是时候升级到我们今天所知的互联网时,似乎这些经验变得很有用。
### A Comparison with TCP/IP
_如果你喜欢这篇贴子更喜欢每四周发布一次的方式那么在Twitter上关注[@TwoBitHistory][14] 或者订阅[RSS提要][15]以确保你知道新帖子的发布时间。_
The ARPANET protocols were all later supplanted by the TCP/IP protocols (with the exception of Telnet and FTP, which were easily adapted to run on top of TCP). Whereas the ARPANET protocols were all based on the assumption that the network was built and administered by a single entity (BBN), the TCP/IP protocol suite was designed for an _inter_-net, a network of networks where everything would be more fluid and unreliable. That led to some of the more immediately obvious differences between our modern protocol suite and the ARPANET protocols, such as how we now distinguish between a Network layer and a Transport layer. The Transport layer-like functionality that in the ARPANET was partly implemented by the IMPs is now the sole responsibility of the hosts at the network edge.
What I find most interesting about the ARPANET protocols though is how so much of the transport-layer functionality now in TCP went through a janky adolescence on the ARPANET. Im not a networking expert, so I pulled out my college networks textbook (Kurose and Ross, lets go), and they give a pretty great outline of what a transport layer is responsible for in general. To summarize their explanation, a transport layer protocol must minimally do the following things. Here _segment_ is basically equivalent to _message_ as the term was used on the ARPANET:
* Provide a delivery service between _processes_ and not just host machines (transport layer multiplexing and demultiplexing)
* Provide integrity checking on a per-segment basis (i.e. make sure there is no data corruption in transit)
A transport layer could also, like TCP does, provide _reliable data transfer_, which means:
* Segments are delivered in order
* No segments go missing
* Segments arent delivered so fast that they get dropped by the receiver (flow control)
It seems like there was some confusion on the ARPANET about how to do multiplexing and demultiplexing so that processes could communicate—BBN introduced the link number to do that at the IMP-Host level, but it turned out that socket numbers were necessary at the Host-Host level on top of that anyway. Then the link number was just used for flow control at the IMP-Host level, but BBN seems to have later abandoned that in favor of doing flow control between unique pairs of hosts, meaning that the link number started out as this overloaded thing only to basically became vestigial. TCP now uses port numbers instead, doing flow control over each TCP connection separately. The process-process multiplexing and demultiplexing lives entirely inside TCP and does not leak into a lower layer like on the ARPANET.
Its also interesting to see, in light of how Kurose and Ross develop the ideas behind TCP, that the ARPANET started out with what Kurose and Ross would call a strict “stop-and-wait” approach to reliable data transfer at the IMP-Host level. The “stop-and-wait” approach is to transmit a segment and then refuse to transmit any more segments until an acknowledgment for the most recently transmitted segment has been received. Its a simple approach, but it means that only one segment is ever in flight across the network, making for a very slow protocol—which is why Kurose and Ross present “stop-and-wait” as merely a stepping stone on the way to a fully featured transport layer protocol. On the ARPANET, “stop-and-wait” was how things worked for a while, since, at the IMP-Host level, a Request for Next Message had to be received in response to every outgoing message before any further messages could be sent. To be fair to BBN, they at first thought this would be necessary to provide flow control between hosts, so the slowdown was intentional. As Ive already mentioned, the RFNM requirement was later relaxed for the sake of better performance, and the IMPs started attaching sequence numbers to messages and keeping track of a “window” of messages in flight in the more or less the same way that TCP implementations do today.[5][13]
So the ARPANET showed that communication between heterogeneous computing systems is possible if you get everyone to agree on some baseline rules. That is, as Ive previously argued, the ARPANETs most important legacy. But what I hope this closer look at those baseline rules has revealed is just how much the ARPANET protocols also influenced the protocols we use today. There was certainly a lot of awkwardness in the way that transport-layer responsibilities were shared between the hosts and the IMPs, sometimes redundantly. And its really almost funny in retrospect that hosts could at first only send each other a single message at a time over any given link. But the ARPANET experiment was a unique opportunity to learn those lessons by actually building and operating a network, and it seems those lessons were put to good use when it came time to upgrade to the internet as we know it today.
_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][14] on Twitter or subscribe to the [RSS feed][15] to make sure you know when a new post is out._
_Previously on TwoBitHistory…_
_以前在 TwoBitHistory 上…_
> Trying to get back on this horse!
>
> My latest post is my take (surprising and clever, of course) on why the ARPANET was such an important breakthrough, with a fun focus on the conference where the ARPANET was shown off for the first time:<https://t.co/8SRY39c3St>
>
> 我最近的贴子是我的一些关于为什么ARPANET是一个如此重要的突破的看法当然是令人惊讶和新颖的并重点关注ARPANET被首次展示的发布会:<https://t.co/8SRY39c3St>
>
> — TwoBitHistory (@TwoBitHistory) [February 7, 2021][16]
> — TwoBitHistory (@TwoBitHistory) [2021年2月7日][16]
1. The protocol layering thing was invented by the Network Working Group. This argument is made in [RFC 871][17]. The layering thing was also a natural extension of how BBN divided responsibilities between hosts and IMPs, so BBN deserves some credit too. [↩︎][18]
1. 协议分层是网络工作组发明的。 这个论点是在[ RFC 871][17] 中提出的。分层也是 BBN 如何在主机和 IMP 之间划分职责的自然延伸,因此 BBN 也值得称赞。 [↩︎][18]
2. The “level” terminology was used by the Network Working Group. See e.g. [RFC 100][19]. [↩︎][20]
2. The “level” 是被网络工作组使用的术语。 详见[RFC 100][19] [↩︎][20]
3. In later revisions of the IMP-Host protocol, the leader was expanded and the link number was upgraded to a _message ID_. But the Host-Host protocol continued to make use of only the high-order eight bits of the message ID field, treating it as a link number. See the “Host-to-Host” protocol section of the [ARPANET Protocol Handbook][10]. [↩︎][21]
4. John M. McQuillan and David C. Walden. “The ARPA Network Design Decisions,” p. 284, <https://www.walden-family.com/public/whole-paper.pdf>. Accessed 8 March 2021. [↩︎][22]
5. Ibid. [↩︎][23]
3. 在 IMP-Host 协议的后续版本中,扩展了头部字段,并且将链路号升级为消息 ID。 但是 Host-Host 协议仅仅继续使用消息 ID 字段的高位 8 位,并将其视为链路号。 请参阅 [ARPANET 协议手册][10]的 “ Host-Host ” 协议部分。[↩︎][21]
4. John M. McQuillan 和 David C. Walden。 “ARPA 网络设计决策”,第 284页<https://www.walden-family.com/public/whole-paper.pdf>。 2021 年 3 月 8 日访问。[↩︎][22]
5. 同上。[↩︎][23]
@ -120,7 +104,7 @@ via: https://twobithistory.org/2021/03/08/arpanet-protocols.html
作者:[Two-Bit History][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[Lin-vy](https://github.com/Lin-vy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,38 +0,0 @@
[#]: subject: (My family's Linux story)
[#]: via: (https://opensource.com/article/21/5/my-linux-story)
[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen)
[#]: collector: (lujun9972)
[#]: translator: (shiboi77 )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
我的家庭 Linux 故事
======
我们在Linux的第一次尝试只是一个简单的方法。
![在橙色背景的终端命令提示][1]
我在linux的第一次尝试是“或许我应该试一试”的这种情况。
回到1990年我在相当多的软盘上找到了一些打包的红帽发行版我为家庭笔记本买了第二个硬盘然后设置安装了它。 这是一件有趣的实验但是我记起家中并没有准备在这程度上分享电脑。快进到2005年我最终崩溃了买了一台运行windows xp的可爱的东芝笔记本电脑。在工作中我有一个老化的SUN SPARCStation 5并且我不太喜欢整个solaris的发展方向基于Motif的桌面。我真的想要用GIMP来完成一些项目或其他项目但是安装GNOME1.x的是复杂的也许它是1.4在Solaris是具有挑战性的。所以我实际上是在考虑跳槽到Windows xp。 但是在我的家用机器上用了几个月之后我发现自己喜欢它的程度甚至低于在Solaris上运行GNOME所以我安装了Ubuntu Hoary Hedgehog 5.04然后在我的笔记本电脑上安装了Breezy Badger 5.10。这太棒了。那台拥有3.2GHz奔腾处理器2GB内存和100GB的硬盘的机器在我的SPARCStation 5周围运行。
突然之间不再是用拼凑起来的Solaris安装包试图去让东西运行这些事情仅仅是一个轻松地方式。并且时机也很好。我家庭和我从2006年8月到2007年7月居住在法国格勒诺布尔而我的妻子在休假。因为有了linux东芝我才能随身带着我的工作。那个时候我在几大项目上做了大量的GIS数据处理我发现我可以在PostGIS / PostgreSQL上做同样的事情比我们在加拿大使用的昂贵得多的商业GIS软件要快得多。大家都很开心尤其是我。
一路上发生的有趣的事情是我们把另外两台电脑逮到了法国——我妻子的类似的东芝电脑运行xp对她来说很好用和我们孩子最近新买的东芝牌笔记本电脑也运行xp。仅仅就在圣诞节过后他们有一些朋友在无意中安装了一个讨厌的并且无法清除的病毒在他们的电脑上。经过几个小时甚至几天后我的一个孩子问我“爸爸我们就不能安装和你电脑上一样的东西吗”然后创建了三个新的Linux用户。我的儿子在29岁依然是一个快乐的Linux用户我猜他第四或第五台Linux笔记本电脑的系统全部由最近的系统76支持。我的一个女儿三年前开始读法学院因为他所在的学校有一个强制性的测试框架只能在Windows上运行而且据称会检测VM之类的东西请不要让我开始。而且我的另一个女儿被她的公司为她买的Macbook Air诱惑了。
哦,好吧,不能赢得他们所有!
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/5/my-linux-story
作者:[Chris Hermansen][a]
选题:[lujun9972][b]
译者:[shiboi77](https://github.com/shiboi77)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/clhermansen
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)

View File

@ -0,0 +1,228 @@
[#]: collector: (lujun9972)
[#]: translator: (tanloong)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Machine learning made easy with Python)
[#]: via: (https://opensource.com/article/21/1/machine-learning-python)
[#]: author: (Girish Managoli https://opensource.com/users/gammay)
用 Python 轻松实现机器学习
======
用朴素贝叶斯分类器解决现实世界里的机器学习问题
![arrows cycle symbol for failing faster][1]
朴素贝叶斯是一种分类技术,它是许多分类器建模算法的基础。基于朴素贝叶斯的分类器是简单、快速和易用的机器学习技术之一,而且在现实世界的应用中很有效。
朴素贝叶斯是从 [贝叶斯定理][2] 发展来的。贝叶斯定理由 18 世纪的统计学家 [托马斯·贝叶斯][3] 提出,它根据与一个事件相关联的其他事件来计算该事件发生的概率。比如,[帕金森氏病][4] 患者通常嗓音会发生变化,因此嗓音变化就是与预测帕金森氏病相关联的症状。贝叶斯定理提供了计算目标事件发生概率的方法,而朴素贝叶斯是对该方法的推广和简化。
### 解决一个现实世界里的问题
这篇文章展示了朴素贝叶斯分类器解决现实世界问题 (与商业级应用相反) 的能力。我会假设你对机器学习有基本的了解,所以文章里会跳过一些与机器学习预测不大相关的步骤,比如 <ruby>数据打乱<rt>(date shuffling)</rt></ruby><ruby>数据切片<rt>(data splitting)</rt></ruby>。如果你是机器学习方面的新手或者需要一个进修课程,请查看 _[An introduction to machine learning today][5]__[Getting started with open source machine learning][6]_
朴素贝叶斯分类器是 <ruby>[有监督的][7]<rt>(supervised)</rt></ruby>、属于 <ruby>[生成模型][8]<rt>(generative)</rt></ruby> 的、非线性的、属于 <ruby>[参数模型][9]<rt>(parametric)</rt></ruby> 的和 <ruby>[基于概率的][10]<rt>(probabilistic)</rt></ruby>
在这篇文章里,我会演示如何用朴素贝叶斯预测帕金森氏病。需要用到的数据集来自 [UCI Machine Learning Repository][11]。这个数据集包含许多语音信号的指标,用于计算患帕金森氏病的可能性;在这个例子里我们将使用这些指标中的前 8 个:
* **MDVP:Fo(Hz)** 平均声带基频
* **MDVP:Fhi(Hz)** 最高声带基频
* **MDVP:Flo(Hz)** 最低声带基频
* **MDVP:Jitter(%)**、**MDVP:Jitter(Abs)**、**MDVP:RAP**、**MDVP:PPQ** 和 **Jitter:DDP** 5 个衡量声带基频变化的指标
这个例子里用到的数据集,可以在我的 [GitHub 仓库][12] 里找到。数据集已经事先做了打乱和分片。
### 用 Python 实现机器学习
接下来我会用 Python 来解决这个问题。我用的软件是:
* Python 3.8.2
* Pandas 1.1.1
* scikit-learn 0.22.2.post1
Python 有多个朴素贝叶斯分类器的实现,都是开源的,包括:
* **NLTK Naïve Bayes:** 基于标准的朴素贝叶斯算法,用于文本分类
* **NLTK Positive Naïve Bayes:** NLTK Naïve Bayes 的变体,用于对只标注了一部分的训练集进行二分类
* **Scikit-learn Gaussian Naïve Bayes:** 提供了 partial fit 方法来支持数据流或很大的数据集 (它们都可能无法一次性导入内存,用 partial fit 可以动态地增加数据)
* **Scikit-learn Multinomial Naïve Bayes:** 针对离散型特征变量作了优化
* **Scikit-learn Bernoulli Naïve Bayes:** 用于各个特征都是二元变量的情况
在这个例子里我将使用 [sklearn Gaussian Naive Bayes][13]。
我的 Python 实现在 `naive_bayes_parkinsons.py` 里,如下所示:
```
import pandas as pd
# x_rows 是我们所使用的 8 个特征的列名
x_rows=['MDVP:Fo(Hz)','MDVP:Fhi(Hz)','MDVP:Flo(Hz)',
'MDVP:Jitter(%)','MDVP:Jitter(Abs)','MDVP:RAP','MDVP:PPQ','Jitter:DDP']
y_rows=['status'] # y_rows 是类别的列名,若患病,值为 1若不患病值为 0
# 训练
# 读取训练数据
train_data = pd.read_csv('parkinsons/Data_Parkinsons_TRAIN.csv')
train_x = train_data[x_rows]
train_y = train_data[y_rows]
print("train_x:\n", train_x)
print("train_y:\n", train_y)
# 导入 sklearn Gaussian Naive Bayes然后进行对训练数据进行拟合
from sklearn.naive_bayes import GaussianNB
gnb = GaussianNB()
gnb.fit(train_x, train_y)
# 对训练数据进行预测
predict_train = gnb.predict(train_x)
print('Prediction on train data:', predict_train)
# 在训练数据上的准确率
from sklearn.metrics import accuracy_score
accuracy_train = accuracy_score(train_y, predict_train)
print('Accuray score on train data:', accuracy_train)
# 测试
# 读取测试数据
test_data = pd.read_csv('parkinsons/Data_Parkinsons_TEST.csv')
test_x = test_data[x_rows]
test_y = test_data[y_rows]
# 对测试数据进行预测
predict_test = gnb.predict(test_x)
print('Prediction on test data:', predict_test)
# 在测试数据上的准确率
accuracy_test = accuracy_score(test_y, predict_test)
print('Accuray score on test data:', accuracy_train)
```
运行这个 Python 脚本:
```
$ python naive_bayes_parkinsons.py
train_x:
      MDVP:Fo(Hz)  MDVP:Fhi(Hz) ...  MDVP:RAP  MDVP:PPQ  Jitter:DDP
0        152.125       161.469  ...   0.00191   0.00226     0.00574
1        120.080       139.710  ...   0.00180   0.00220     0.00540
2        122.400       148.650  ...   0.00465   0.00696     0.01394
3        237.323       243.709  ...   0.00173   0.00159     0.00519
..           ...           ...           ...  ...       ...       ...        
155      138.190       203.522  ...   0.00406   0.00398     0.01218
[156 rows x 8 columns]
train_y:
      status
0         1
1         1
2         1
3         0
..      ...
155       1
[156 rows x 1 columns]
Prediction on train data: [1 1 1 0 ... 1]
Accuracy score on train data: 0.6666666666666666
Prediction on test data: [1 1 1 1 ... 1
 1 1]
Accuracy score on test data: 0.6666666666666666
```
在训练集和测试集上的准确率都是 67%。它的性能还可以进一步优化。你想尝试一下吗?你可以在下面的评论区给出你的方法。
### 背后原理
朴素贝叶斯分类器从贝叶斯定理发展来的。贝叶斯定理用于计算条件概率或者说贝叶斯定理用于计算当与当与一个事件相关联的其他事件发生时该事件发生的概率。简而言之它解决了这个问题_如果我们已经知道事件 x 发生在事件 y 之前的概率,那么当事件 x 再次发生时,事件 y 发生的概率是多少_ 贝叶斯定理用一个先验的预测值来逐渐逼近一个最终的 [后验概率][14]。贝叶斯定理有一个基本假设,就是所有的参数重要性相同 (即相互独立)。
贝叶斯计算主要包括以下步骤:
1. 计算总的先验概率:
$P(患病)$ 和 $P(不患病)$
2. 计算 8 种指标各自是某个值时的后验概率 (value1,...,value8 分别是 MDVP:Fo(Hz),...,Jitter:DDP 的取值)
$P(value1,\ldots,value8\ |\ 患病)$
$P(value1,\ldots,value8\ |\ 不患病)$
3. 将第 1 步和第 2 步的结果相乘,最终得到患病和不患病的后验概率:
$P(患病\ |\ value1,\ldots,value8) \propto P(患病) \times P(value1,\ldots,value8\ |\ 患病)$
$P(不患病\ |\ value1,\ldots,value8) \propto P(不患病) \times P(value1,\ldots,value8\ |\ 不患病)$
上面第 2 步的计算非常复杂,朴素贝叶斯将它作了简化:
1. 计算总的先验概率:
$P(患病)$ 和 $P(不患病)$
2. 对 8 种指标里的每个指标,计算其取某个值时的后验概率:
$P(value1\ |\ 患病),\ldots,P(value8\ |\ 患病)$
$P(value1\ |\ 不患病),\ldots,P(value8\ |\ 不患病)$
3. 将第 1 步和第 2 步的结果相乘,最终得到患病和不患病的后验概率:
$P(患病\ |\ value1,\ldots,value8) \propto P(患病) \times P(value1\ |\ 患病) \times \ldots \times P(value8\ |\ 患病)$
$P(不患病\ |\ value1,\ldots,value8) \propto P(不患病) \times P(value1\ |\ 不患病) \times \ldots \times P(value8\ |\ 不患病)$
这只是一个很初步的解释,还有很多其他因素需要考虑,比如数据类型的差异,如何解析数据,数据可能有缺失值等。
### 超参数
朴素贝叶斯作为一个简单直接的算法,不需要超参数。然而,有的版本的朴素贝叶斯实现可能提供一些高级特性 (比如超参数)。比如,[GaussianNB][13] 就有 2 个超参数:
* **priors:** 先验概率,可以事先指定,这样就不必让算法从数据中计算才能得出。
* **var_smoothing:** 考虑数据的分布情况,当数据不满足标准的高斯分布时,这个超参数会发挥作用。
### 损失函数
为了坚持简单的原则,朴素贝叶斯使用 [0-1 损失函数][15]。如果预测结果与期望的输出相匹配,损失值为 0否则为 1。
### 优缺点
**优点:** 朴素贝叶斯是最简单最快速的算法之一。
**优点:** 在数据量较少时,用朴素贝叶斯仍可作出可靠的预测。
**缺点:** 朴素贝叶斯的预测只是估计值,并不准确。它胜在速度而不是准确度。
**缺点:** 朴素贝叶斯有一个基本假设,就是所有特征相互独立,但现实情况并不总是如此。
从本质上说,朴素贝叶斯是贝叶斯定理的推广。它是最简单最快速的机器学习算法之一,用来进行简单和快速的训练和预测。朴素贝叶斯提供了足够好、比较准确的预测。朴素贝叶斯假设预测特征之间是相互独立的。已经有许多朴素贝叶斯的开源的实现,它们的特性甚至超过了贝叶斯算法的实现。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/1/machine-learning-python
作者:[Girish Managoli][a]
选题:[lujun9972][b]
译者:[tanloong](https://github.com/tanloong)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/gammay
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_progress_cycle_momentum_arrow.png?itok=q-ZFa_Eh (arrows cycle symbol for failing faster)
[2]: https://en.wikipedia.org/wiki/Bayes%27_theorem
[3]: https://en.wikipedia.org/wiki/Thomas_Bayes
[4]: https://en.wikipedia.org/wiki/Parkinson%27s_disease
[5]: https://opensource.com/article/17/9/introduction-machine-learning
[6]: https://opensource.com/business/15/9/getting-started-open-source-machine-learning
[7]: https://en.wikipedia.org/wiki/Supervised_learning
[8]: https://en.wikipedia.org/wiki/Generative_model
[9]: https://en.wikipedia.org/wiki/Parametric_model
[10]: https://en.wikipedia.org/wiki/Probabilistic_classification
[11]: https://archive.ics.uci.edu/ml/datasets/parkinsons
[12]: https://github.com/gammay/Machine-learning-made-easy-Naive-Bayes/tree/main/parkinsons
[13]: https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.GaussianNB.html
[14]: https://en.wikipedia.org/wiki/Posterior_probability
[15]: https://en.wikipedia.org/wiki/Loss_function#0-1_loss_function

View File

@ -1,193 +0,0 @@
[#]: subject: (Configuring Vim as a Writing Tool)
[#]: via: (https://news.itsfoss.com/configuring-vim-writing/)
[#]: author: (Theena https://news.itsfoss.com/author/theena/)
[#]: collector: (lujun9972)
[#]: translator: (piaoshi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
将 Vim 配置成一个写作工具
======
在我的第一个专栏中,我谈到了我为什么把 [我的写作工作迁移到了 Vim 上][1] -- 远离现代写作者们的标准工具如文字处理器MS Word 及它的开源替代方案)、文本编辑器(记事本,因为直到去年我一直是 Windows 用户)和云存储技术。如果你是一个写作者,在继续下面的内容前,我建议你先阅读一下 [那篇文章的第一部分][1] 。
基本上可以说,你使用的设备越多,你需要的写作工具就越多,最终你的工作流程就越复杂。这一点对我来说是很贴切的,因为我有四台设备,包括一部安卓手机,一台日常用的运行 Linux 的主力笔记本电脑,还有两台旧的笔记本电脑,其中一台是 Mac我去户外拍摄时会带着它。
Vim 对于我和我的工作方式来说是一个完美的解决方案;虽然我不会说我的新的工作流程是现代世界写作者工作的最佳方式,但我可以说的是,对于写作者来说,拥有一个能在我们所有设备上工作的工具非常重要的,并且这个工具要足够强大以满足我们写作者每天从事的不同类型的写作需求。
从这个角度来看Vim 的主要优势是它是跨平台的 -- 无论在什么设备上Vim 都能工作。在苹果生态系统中使用 Vim 的情况我就不细说了,但粗略地看一下 [这个应用程序][2] 的评论,我就会让知道,在某些地方有某些人需要 Vim不管他们使用的是什么设备。
现在我们假设你是一个想开始使用 Vim 的写作者。一旦你安装了它,你该从哪里开始呢?
我在这一部分给你的不是一个教程,而是一系列的建议,包含对一个用于诗歌写作的 .vimrc 配置文件的解读。只要有可能,我就会链接到我学习相应内容时用到的 YouTube 上的教程。
对于 Linux 用户来说,系统已经预装了 Vim -- 通过你喜欢的终端模拟器就可以启动它。对于 Windows 和 Mac 用户,你可以从 [Vim 官方网站][3] 下载它。
### 建议
**安装/启用 Vim 后**
* 通过终端打开 Vim Tutor。( Mac 用户可以用这种方式启动,而 Windows 用户也可以用这种方法启动。[译者注:原文这里本应该有链接,可能作者忘记添加了。无论如何,在终端中, Linux 中的命令是 vimtutorWindows 在安装目录下找到 vimtutor.bat 命令并运行Mac应该与 Linux 一样?我没 Mac 呀!])在这个阶段,你不会使用 Vim 进行任何写作 -- 相反你要每天花15分钟做 Vim 教程。不要多花一分钟或少花一分钟看看在规定的15分钟内你能在教程中取得多大的进展。你会发现每天你都会在教程中取得更大的进步。在一个月内你应该能够利用这些15分钟完成整个教程。
* 成为一个更好的打字员对 Vim 的使用来说有极大的好处。这不是必须的,但我正在重新学习打字,它的副作用是使 Vim 变得更加有用了。我每次都以花15分钟练习打字开始作为进入 Vim 教程前的热身。
在每一天的开始我分配了30分钟的时间做这两项练习进行热身而每天晚上睡觉前再分配30分钟进行练习以让我安定下来。这样的做法帮我快速从旧的工具包过渡到了 Vim但你的安排可能有所不同。
我再次强调, _**除了Vim Tutor之外**_ ,上述步骤都是可选的;这完全取决于你个人的动机水平。
现在我们来到了这篇文章的重点:如何配置 Vim ,使它对写作者友好?
### 如何配置用于写作的 .vimrc
_在开始之前我想在这里提醒各位读者我不是一个技术人员 -- 我是一个小说家 -- 你在下面看到的任何错误都是我自己的;我希望有经验的 Vim 用户能提供反馈告诉我如何进一步完善我的配置文件。_
下面是我的 .vimrc 文件。你可以从我的 [GitHub][4] 上下载,并进一步完善它。
```
syntax on
set noerrorbells "取消 Vim 的错误警告铃声,关闭它以免打扰到我们
set textwidth=100 "确保每一行不超过100字符
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set linebreak
set number
set showmatch
set showbreak=+++
set smartcase
set noswapfile
set undodir=~/.vim/undodir
set undofile
set incsearch
set spell
set showmatch
set confirm
set ruler
set autochdir
set autowriteall
set undolevels=1000
set backspace=indent,eol,start
" 下面的设置确保按写作者而不是程序员喜欢的方式折行
set wrap
nnoremap <F5> :set linebreak<CR>
nnoremap <C-F5> :set nolinebreak<CR>
call plug#begin('~/.vim/plugged')
" 这是颜色风格插件
Plug 'colepeters/spacemacs-theme.vim'
Plug 'sainnhe/gruvbox-material'
Plug 'phanviet/vim-monokai-pro'
Plug 'flazz/vim-colorschemes'
Plug 'chriskempson/base16-vim'
Plug 'gruvbox-community/gruvbox'
" 这是为了更容易的诗歌写作选择的一些插件
Plug 'dpelle/vim-LanguageTool'
Plug 'ron89/thesaurus_query.vim'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
Plug 'reedes/vim-pencil'
Plug 'reedes/vim-wordy'
" 这一部分是为了更容易地与机器集成,用了 vim-airline 这类插件
Plug 'vim-airline/vim-airline'
" 这一部分外理工作区和会话管理
Plug 'thaerkh/vim-workspace'
" 与上面插件相关, 下面的代码将你的所有的会话文件保存到一个你工作区之外的目录
let g:workspace_session_directory = $HOME . '/.vim/sessions/'
" 与上面插件相关,这是一个 Vim 活动的跟踪器
Plug 'wakatime/vim-wakatime'
" 一个干扰因素:我在这里使用了一些 Emacs 的功能,特别是 org-mode
Plug 'jceb/vim-orgmode'
" 这是文件格式相关插件
Plug 'plasticboy/vim-markdown'
call plug#end()
colorscheme pacific
set background=dark
if executable('rg')
let g:rg_derive_root='true'
endif
```
学习如何安装 Vim 插件时,这个教程帮助了我。我使用 Vim Plugged 插件管理器是因为在我看来它是最简单、最优雅的。
![][5]
#### 对于写作者的 .vimrc 的选项的整理
* `syntax on` : 这可以确保 Vim 知道我在使用什么语法。做笔记,写这种文章时我主要使用 Markdown ;而在写小说的时候,纯文本是我的首选格式。
* `set noerrorbells` : 为了你的精神状态,我强烈建议打开这个选项。
* `set textwidth=100` : 为了便于阅读,没有人愿意横向滚动一个文本文件。
* `set spell` : 提醒你,如果有拼写错误的话。
* `set wrap` : 确保文本以写作者而不是程序员的方式进行折行。
你会注意到,我没有花更多时间讨论其他一些基本配置选项,因为我并不觉得那些对写作者来说有多重要。因为我做一些业余的编码工作,所以我的 .vimrc 配置反映了这一点。如果你只想在 Vim 上写作,那么上述配置就应该能让你顺利开始。
从这点上来说,你的 .vimrc 是一个活的文档,它能生动地反映你想用 Vim 做什么,以及你希望 Vim 如何为你做这些事情。
#### 关于插件的说明
第43-98行之间是我对插件的配置。如果你已经学习了关于如何安装 Vim 插件的教程,我强烈推荐你从以下专为写作开发的 Vim 插件开始:
* `vim-LanguageTool`
* `thesaurus_query.vim`
* `vim-pencil`
* `vim-wordy`
* `vim-goyo`
* `vim-markdown`
#### 总结
在这篇文章中,我们简单地介绍了写作者可以怎样开始使用 Vim以及一个在写作工作中需要的 .vimrc 入门配置。除了我的 .vimrc 之外,我还将在这里链接到我在 GitHub 上发现的其他写作者的 .vimrc它们是我自己配置时的灵感来源。
![][6]
请劳记,这只是一个写作者的 .vimrc 的入门配置。你会发现随着你的需求的发展Vim 也可以随之发展。因此,投入一些时间学习配置你的 .vimrc 是值得的。
在下一篇文章中,我将会检视我在写作时的工作流程的具体细节,这个工作流程中我使用了 Vim 和 Git 及 GitHub。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/configuring-vim-writing/
作者:[Theena][a]
选题:[lujun9972][b]
译者:[piaoshi](https://github.com/piaoshi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/theena/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/how-i-started-loving-vim/
[2]: https://apps.apple.com/us/app/ivim/id1266544660
[3]: https://www.vim.org/
[4]: https://github.com/MiragianCycle/dotfiles
[5]: https://i1.wp.com/i.ytimg.com/vi/n9k9scbTuvQ/hqdefault.jpg?w=780&ssl=1
[6]: https://i2.wp.com/i.ytimg.com/vi/Pq3JMp3stxQ/hqdefault.jpg?w=780&ssl=1

View File

@ -0,0 +1,118 @@
[#]: subject: (Run a Linux virtual machine in Podman)
[#]: via: (https://opensource.com/article/21/7/linux-podman)
[#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
在 Podman 中运行一个 Linux 虚拟机
======
使用 Podman Machine 创建一个基本的 Fedora CoreOS 虚拟机来使用容器和容器化工作负载。
![woman on laptop sitting at the window][1]
Fedora CoreOS 是一个自动更新、基于最小 [rpm-ostree][2]的 操作系统,用于安全地、大规模地运行容器化工作负载。
[Podman][3] “是一个用于管理容器和镜像、挂载到这些容器中的卷,以及由这些容器组组成的 pod 的工具。Podman 基于 libpod它是一个容器生命周期管理库”。
当你使用 [Podman Machine][4] 时,神奇的事情发生了,它可以帮助你创建一个基本的 Fedora CoreOS 虚拟机VM来使用容器和容器化工作负载。
### 开始使用 Podman Machine
第一步是安装 Podman。如果你已经安装了最新版本的 Podman你可以跳过这个步骤。在我的 Fedora 34 机器上,我用以下方式安装 Podman
```
`$ sudo dnf install podman`
```
我使用的是 podman-3.2.2-1.fc34.x86_64。
### 初始化 Fedora CoreOS
Podman 安装完成后,用以下方法初始化它:
```
podman machine init vm2
Downloading VM image: fedora-coreos-34.20210626.1.0-qemu.x86_64.qcow2.xz: done
Extracting compressed file
```
这个命令创建了 `vm2`,并下载了 .xz 格式的 Fedora CoreOS 的 qcow2 文件并将其解压。
### 列出你的虚拟机
了解你的虚拟机和它们的状态是很重要的,`list` 命令可以帮助你做到这一点。下面的例子显示了我所有的虚拟机的名称,它们被创建的日期,以及它们最后一次启动的时间:
```
podman machine list
NAME VM TYPE CREATED LAST UP
podman-machine-default* qemu 6 days ago Currently running
vm2 qemu 11 minutes ago 11 minutes ago
```
### 启动一个虚拟机
要启动一个虚拟机,请运行:
```
podman machine start
Waiting for VM …
```
### SSH 到虚拟机
你可以使用 SSH 来访问你的虚拟机,并使用它来运行工作负载,而没有任何麻烦的设置:
```
podman machine ssh
Connecting to vm podman-machine-default. To close connection, use `~.` or `exit`
Fedora CoreOS 34.20210611.1.0
Tracker: <https://github.com/coreos/fedora-coreos-tracker>
Discuss: <https://discussion.fedoraproject.org/c/server/coreos/>
Last login: Wed Jun 23 13:23:36 2021 from 10.0.2.2
[core@localhost ~]$ uname -a
Linux localhost 5.12.9-300.fc34.x86_64 #1 SMP Thu Jun 3 13:51:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[core@localhost ~]$
```
目前Podman 只支持一次运行一个虚拟机。
### 停止你的虚拟机
要停止运行中的虚拟机,请使用 `stop` 命令:
```
podman machine stop
[core@localhost ~]$ Connection to localhost closed by remote host.
Connection to localhost closed.
Error: exit status 255
```
我希望这能帮助你开始使用 Podman Machine。请试一试并在评论中告诉我们你的想法。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/7/linux-podman
作者:[Sumantro Mukherjee][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sumantro
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop)
[2]: http://coreos.github.io/rpm-ostree/
[3]: https://github.com/containers/podman
[4]: http://docs.podman.io/en/latest/markdown/podman-machine.1.html