mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-27 02:30:10 +08:00
commit
79b8005dba
@ -1,18 +1,14 @@
|
||||
|
||||
Linux / Unix 桌面娱乐 :
|
||||
文字模式的带有ASCII艺术的Box与评论绘制
|
||||
|
||||
Linux/Unix 桌面趣事:文字模式下的 ASCII 艺术与注释绘画
|
||||
================================================================================
|
||||
Boxes 命令不仅是一个文本过滤器,同时是一个很少人知道的可以为了乐趣或者需要在它的输入文本或者代码周围画各种ASCII艺术画的工具。你可以迅速创建邮件签名,或者使用各种编程语言创建局部评论。这个命令计划被vim文本编辑器使用,但是也可以被支持过滤的文本编辑器使用,同时从命令行作为一个单独的工具使用。
|
||||
|
||||
boxes 命令不仅是一个文本过滤器,同时是一个很少人知道的有趣工具,它可以在输入的文本或者代码周围框上各种ASCII 艺术画。你可以用它快速创建邮件签名,或者在各种编程语言中留下评论块。这个命令可以在 vim 文本编辑器中使用,但是也可以在各种支持过滤器的文本编辑器中使用,同时也可以在命令行中单独使用。
|
||||
|
||||
### 任务: 安装 boxes ###
|
||||
|
||||
使用 [apt-get command][1] 在 Debian / Ubuntu Linux中安装 boxes :
|
||||
使用 [apt-get 命令][1] 在 Debian / Ubuntu Linux 中安装 boxes:
|
||||
|
||||
$ sudo apt-get install boxes
|
||||
|
||||
输出示例 :
|
||||
输出示例:
|
||||
|
||||
Reading package lists... Done
|
||||
Building dependency tree
|
||||
@ -28,11 +24,11 @@ Boxes 命令不仅是一个文本过滤器,同时是一个很少人知道的
|
||||
Processing triggers for man-db ...
|
||||
Setting up boxes (1.0.1a-2.3) ...
|
||||
|
||||
RHEL / CentOS / Fedora Linux 用户, 使用 [yum command to install boxes][2] (首先 [enable EPEL repo as described here][3]):
|
||||
RHEL / CentOS / Fedora Linux 用户, 使用 [yum 命令来安装][2] boxes,(请先[启用 EPEL 软件仓库][3]):
|
||||
|
||||
# yum install boxes
|
||||
|
||||
输出示例 :
|
||||
输出示例:
|
||||
|
||||
Loaded plugins: rhnplugin
|
||||
Setting up Install Process
|
||||
@ -64,21 +60,21 @@ RHEL / CentOS / Fedora Linux 用户, 使用 [yum command to install boxes][2] (
|
||||
boxes.x86_64 0:1.1-8.el6
|
||||
Complete!
|
||||
|
||||
FreeBSD 用户可以按如下来使用 :
|
||||
FreeBSD 用户可以按如下使用:
|
||||
|
||||
cd /usr/ports/misc/boxes/ && make install clean
|
||||
|
||||
或者,使用 pkg_add 命令来增加包:
|
||||
或者,使用 pkg_add 命令来增加包:
|
||||
|
||||
# pkg_add -r boxes
|
||||
|
||||
### 在一些给定文本周围画出任何种类的box ###
|
||||
### 在一些给定文本周围画出任何种类的包围框 ###
|
||||
|
||||
输入下列命令 :
|
||||
输入下列命令:
|
||||
|
||||
echo "This is a test" | boxes
|
||||
|
||||
或者,通过设置要使用的设计的名字来使用 :
|
||||
或者,指定要使用的图案的名字:
|
||||
|
||||
echo -e "\n\tVivek Gite\n\tvivek@nixcraft.com\n\twww.cyberciti.biz" | boxes -d dog
|
||||
|
||||
@ -86,31 +82,29 @@ FreeBSD 用户可以按如下来使用 :
|
||||
|
||||

|
||||
|
||||
Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计
|
||||
*图01: Unix / Linux: Boxes 命令来画出各式各样的图案 *
|
||||
|
||||
#### 怎么样输出所有的设计 ####
|
||||
#### 怎么样输出所有的图案 ####
|
||||
|
||||
语法如下:
|
||||
语法如下:
|
||||
|
||||
boxes option
|
||||
pipe | boxes options
|
||||
echo "text" | boxes -d foo
|
||||
boxes -l
|
||||
|
||||
设计 -d 选项设置要使用的设计的名字 . 语法如下:
|
||||
|
||||
-d 选项用来设置要使用的图案的名字。语法如下:
|
||||
|
||||
echo "Text" | boxes -d design
|
||||
pipe | boxes -d desig
|
||||
|
||||
-l 选项列出所有设计 . 它显示在配置文件中的所有的box设计图,同时也显示关于其创作者的信息。
|
||||
-l 选项列出所有图案。它显示了在配置文件中的所有的框线设计图,同时也显示关于其创作者的信息。
|
||||
|
||||
|
||||
boxes -l
|
||||
boxes -l | more
|
||||
boxes -l | less
|
||||
|
||||
输出示例:
|
||||
输出示例:
|
||||
|
||||
43 Available Styles in "/etc/boxes/boxes-config":
|
||||
-------------------------------------------------
|
||||
@ -146,20 +140,21 @@ Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计
|
||||
output truncated
|
||||
..
|
||||
|
||||
### 在使用vi/vim文本编辑器时如何通过boxes过滤文本? ###
|
||||
### 在使用 vi/vim 文本编辑器时如何通过 boxes 过滤文本? ###
|
||||
|
||||
你可以使用vi或vim支持的任何附加命令,在这个例子中, [insert current date and time][4], 输入:
|
||||
你可以在 vi 或 vim 中使用任何外部命令,比如在这个例子中,[插入当前日期和时间][4],输入:
|
||||
|
||||
!!date
|
||||
|
||||
或者
|
||||
|
||||
:r !date
|
||||
你需要在vim中输入以上命令来读取数据命令的输出,这将在当前行后面加入日期和时分秒:
|
||||
|
||||
你需要在 vim 中输入以上命令来读取 date 命令的输出,这将在当前行后面加入日期和时分秒:
|
||||
|
||||
Tue Jun 12 00:05:38 IST 2012
|
||||
|
||||
你可以用boxes命令做到同样的. 创建一个作为样本的shell脚本或者如下的一个c程序:
|
||||
你可以用 boxes 命令做到同样的功能。如下创建一个作为示例的 shell 脚本或者c程序:
|
||||
|
||||
|
||||
#!/bin/bash
|
||||
@ -167,7 +162,7 @@ Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计
|
||||
Author: Vivek Gite
|
||||
Last updated on: Tue Jun, 12 2012
|
||||
|
||||
现在输入如下 (将光标移到第二行,也就是以"Purpose: ..."开头的行)
|
||||
现在输入如下(将光标移到第二行,也就是以“Purpose: ...”开头的行)
|
||||
|
||||
3!!boxes
|
||||
|
||||
@ -184,11 +179,10 @@ Fig.01: Unix / Linux: Boxes 命令来画出各式各样的设计
|
||||
注:youtube 视频
|
||||
<iframe width="595" height="446" frameborder="0" src="http://www.youtube.com/embed/glzXjNvrYOc?rel=0"></iframe>
|
||||
|
||||
(Video:01: boxes command in action. BTW, this is my first video so go easy on me and let me know what you think.)
|
||||
|
||||
另见
|
||||
参见
|
||||
|
||||
- boxes man 手册
|
||||
- boxes 帮助手册
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -196,7 +190,7 @@ via: http://www.cyberciti.biz/tips/unix-linux-draw-any-kind-of-boxes-around-text
|
||||
|
||||
作者:Vivek Gite
|
||||
译者:[zky001](https://github.com/zky001)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,34 @@
|
||||
Intel 展示了可在大屏幕显示 Linux 系统的低端 Android 手机
|
||||
==============================================================
|
||||
|
||||

|
||||
|
||||
在世界移动大会 **MWC16** 上 Intel 展示了称之为“大屏体验”的一款的 Android 智能手机,它在插入一个外部显示后运行了一个完整的 Linux 桌面。
|
||||
|
||||
这个概念大体上与微软在 Windows 10 手机中的 Continuum 相似,但是 Continuum 面向的是高端设备,Intel 的项目面向的是低端智能机和新兴市场。
|
||||
|
||||
在巴塞罗那的这场大会上展示的是拥有 Atom x3、2GB RAM 和 16GB 存储以及支持外部显示的的 SoFIA(Intel 架构的智能或功能手机)智能机原型。插上键盘、鼠标和显示,它就变成了一台桌面 Linux,并可以选择在大屏幕的一个窗口中显示 Android 桌面。
|
||||
|
||||
Intel 的拓荒小组(Path Finding Group)经理 Nir Metzer 告诉我们:“Android 基于 Linux 内核,因此我们运行在一个内核上,我们有一个 Android 栈和一个 Linux 栈,并且我们共享同一个环境,因此文件系统是相同的。电话是全功能的。”
|
||||
|
||||
Metzer 说:“我有一个多窗口环境。只要我插入显示器后就可以使用电子表格,我可以进行拖放操作,播放音频。在一个低端平台实现这一切是一个挑战。”
|
||||
|
||||
现在当连上外部显示器时设备的屏幕显示是空白的,但是 Metzer 说下个版本的 Atom X3 会支持双显示。
|
||||
|
||||
其使用的 Linux 版本是由 Intel 维护的。Metzer 说:“我们需要将 Linux 和 Android 保持一致。框架是预安装的,你不能下载任何 app。”
|
||||
|
||||
英特尔在移动世界大会上向手机制造商们推销这一想法,但却没有实际说希望购买该设备的消费者。Metzer 说:“芯片已经准备好了,已经为量产准备好了。明天就可以进入生产。但是这要看商业需求。”
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/
|
||||
|
||||
作者:[Tim Anderson][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.theregister.co.uk/Author/2878
|
||||
|
||||
|
@ -1,18 +1,17 @@
|
||||
Master OpenStack with 5 new tutorials
|
||||
5篇文章快速掌握OpenStack
|
||||
推荐五篇 OpenStack 的新指南
|
||||
=======================================
|
||||
|
||||

|
||||
|
||||
回顾这周的 OpenStack 峰会,我仍然回味着开源云生态系统的浩瀚无垠,并且需要熟悉多少个不同的项目和概念才能获得成功。但是,我们是幸运的,因为有许多资源让我们跟随项目的脚步。除了[官方文档][1]外,我们还有许多来自三方组织的培训和认证、个人分享,以及许多社区贡献的学习资源。
|
||||
回顾这周的 OpenStack 峰会,我仍然回味着开源云生态系统的浩瀚无垠,有那么多需要了解的项目及概念才能获得成功。不过我们很幸运,因为有许多资源让我们跟随着项目的脚步。除了[官方文档][1]外,我们还有许多来自第三方提供的培训和认证、个人分享,以及许多社区贡献的学习资源。
|
||||
|
||||
为了让我们保持获得最新消息,每个月我们将会整合发布 OpenStack 社区的最新教程、指导和小贴士等。下面是我们过去几个月最棒的发布分享。
|
||||
|
||||
- 首先,如果你正在寻找一个靠谱实惠的 OpenStack 测试实验室, Intel NUC 是最值得考虑的平台.麻雀虽小,五脏俱全,通过指导文章,可以很轻松的按照教程在 NUC 上使用 [TripleO 部署 OpenStack][2] ,并且还可以轻松预防一些常见的怪异问题。
|
||||
- 首先,如果你正在寻找一个靠谱实惠的 OpenStack 测试实验室, Intel NUC 是最值得考虑的平台。麻雀虽小,五脏俱全,通过指导文章,可以很轻松的按照教程在 NUC 上使用 [TripleO 部署 OpenStack][2] ,并且还可以轻松避开一些常见的古怪问题。
|
||||
- 当你已经运行的一段时间 OpenStack 后,你会发现在你的云系统上许多组件生成了大量日志。其中一些是可以安全删除的,而你需要一个管理这些日志的方案。参考在部署生产 9 个月后使用 Celiometer 管理日志的[一些思考][3]。
|
||||
- 对于 OpenStack 基础设施项目的新手,想要提交补丁到 OpenStack 是相当困难的。入口在哪里,测试怎么做,我的提交步骤是怎么样的?可以通过 Arie Bregman 的[博客文章][4]快速了解整个提交过程。
|
||||
- 突发计算节点失效,不知道是硬件还是软件问题。好消息是 OpenStack 提供了一套非常简单的迁移计划可以让迁移当机节点到别的主机。然而,迁移过程中使用的命令令许多人感到困惑。可以通过[这篇文章][5]来理解 migrate 和 evacuate 命令的不同。
|
||||
- 网络功能虚拟化技术需要 OpenStack 中的额外的功能,而用户可能不熟悉它们。例如, SR-IOV 和 PCI 直通是最大限度地提高物理硬件性能的方式。可以学习[部署步骤][6]以使 OpenStack 的性能最大化。
|
||||
- 对于 OpenStack 基础设施项目的新手,想要提交补丁到 OpenStack 是相当困难的。入口在哪里,测试怎么做,我的提交步骤是怎么样的?可以通过 Arie Bregman 的这篇[博客文章][4]快速了解整个提交过程。
|
||||
- 突发计算节点失效,不知道是硬件还是软件问题。不过好消息是 OpenStack 提供了一套非常简单的迁移计划可以让你迁移当机节点到别的主机。然而,迁移过程中使用的命令令许多人感到困惑。可以通过[这篇文章][5]来理解 migrate 和 evacuate 命令的不同。
|
||||
- 网络功能虚拟化技术需要 OpenStack 之外的一些功能,而用户可能不熟悉它们。例如, SR-IOV 和 PCI 直通是最大限度地提高物理硬件性能的方式。可以学习[部署步骤][6]以使 OpenStack 的性能最大化。
|
||||
|
||||
这些文章基本涵盖了本月(译者注: 4 月)推送,如果你还需要更多文章,可以检索过去推送的 [OpenStack 文献][7]来获取更多资源。如果有你认为我们应该推荐的新教程,请在评论中告诉我们,谢谢。
|
||||
|
@ -1,58 +0,0 @@
|
||||
StdioA Translating
|
||||
|
||||
Linux gives me all the tools I need
|
||||
==========================================
|
||||
|
||||

|
||||
|
||||
[Linux][0] is all around us. It's [on our phones][1] in the form of Android. It's [used on the International Space Station][2]. It [provides much of the backbone of the Internet][3]. And yet many people never notice it. Discovering Linux is a rewarding endeavor. Lots of other people have [shared their Linux stories][4] on Opensource.com, and now it's my turn.
|
||||
|
||||
I still remember when I first discovered Linux in 2008. The person who helped me discover Linux was my father, Socrates Ballais. He was an economics professor here in Tacloban City, Philippines. He was also a technology enthusiast. He taught me a lot about computers and technology, but only advocated using Linux as a fallback operating system in case Windows fails.
|
||||
|
||||
### My earliest days
|
||||
|
||||
Before we had a computer in the home, I was a Windows user. I played games, created documents, and did all the other things kids do with computers. I didn't know what Linux was or what it was used for. The Windows logo was my symbol for a computer.
|
||||
|
||||
When we got our first computer, my father installed Linux ([Ubuntu][5] 8.04) on it. Being the curious kid I was, I booted into the operating system. I was astonished with the interface. It was beautiful. I found it to be very user friendly. For some time, all I did in Ubuntu was play the bundled games. I would do my school work in Windows.
|
||||
|
||||
### The first install
|
||||
|
||||
Four years later, I decided that I would reinstall Windows on our family computer. Without hesitation, I also decided to install Ubuntu. With that, I had fallen in love with Linux (again). Over time, I became more adept with Ubuntu and would casually advocate its use to my friends. When I got my first laptop, I installed it right away.
|
||||
|
||||
### Today
|
||||
|
||||
Today, Linux is my go-to operating system. When I need to do something on a computer, I do it in Linux. For documents and presentations, I use Microsoft Office via [Wine][6]. For my web needs, there's [Chrome and Firefox][7]. For email, there's [Geary][8]. You can do pretty much everything with Linux.
|
||||
|
||||
Most, if not all, of my programming work is done in Linux. The lack of a standard Integrated Development Environment (IDE) like [Visual Studio][9] or [XCode][10] taught me to be flexible and learn more things as a programmer. Now a text editor and a compiler/interpreter are all I need to start coding. I only use an IDE in cases when it's the best tool for accomplishing a task at hand. I find Linux to be more developer-friendly than Windows. To generalize, Linux gives me all the tools I need to develop software.
|
||||
|
||||
Today, I am the co-founder and CTO of a startup called [Creatomiv Studios][11]. I use Linux to develop code for the backend server of our latest project, Basyang. I'm also an amateur photographer, and use [GIMP][12] and [Darktable][13] to edit and manage photos. For communication with my team, I use [Telegram][14].
|
||||
|
||||
### The beauty of Linux
|
||||
|
||||
Many may see Linux as an operating system only for those who love solving complicated problems and working on the command line. Others may see it as a rubbish operating system lacking the support of many companies. However, I see Linux as a thing of beauty and a tool for creation. I love Linux the way it is and hope to see it continue to grow.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/life/16/3/my-linux-story-sean-ballais
|
||||
|
||||
作者:[Sean Francis N. Ballais][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
[a]: https://opensource.com/users/seanballais
|
||||
[0]: https://opensource.com/resources/what-is-linux
|
||||
[1]: http://www.howtogeek.com/189036/android-is-based-on-linux-but-what-does-that-mean/
|
||||
[2]: http://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability
|
||||
[3]: https://www.youtube.com/watch?v=JzsLkbwi1LA
|
||||
[4]: https://opensource.com/tags/my-linux-story
|
||||
[5]: http://ubuntu.com/
|
||||
[6]: https://www.winehq.org/
|
||||
[7]: https://www.google.com/chrome/browser/desktop/index.html
|
||||
[8]: https://wiki.gnome.org/Apps/Geary
|
||||
[9]: https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx
|
||||
[10]: https://developer.apple.com/xcode/
|
||||
[11]: https://www.facebook.com/CreatomivStudios/
|
||||
[12]: https://www.gimp.org/
|
||||
[13]: http://www.darktable.org/
|
||||
[14]: https://telegram.org/
|
@ -0,0 +1,182 @@
|
||||
Getting Started with Python Programming and Scripting in Linux – Part 1
|
||||
===============================================================================
|
||||
|
||||
|
||||
It has been said (and often required by recruitment agencies) that system administrators need to be proficient in a scripting language. While most of us may be comfortable using [Bash][1] (or other shell of our choice) to run command-line scripts, a powerful language such as Python can add several benefits.
|
||||
|
||||

|
||||
>Learn Python Programming Scripting in Linux
|
||||
|
||||
To begin with, Python allows us to access the tools of the command-line environment and to make use of Object Oriented Programming features (more on this later in this article).
|
||||
|
||||
On top of it, learning Python can boost your career in the fields of [desktop applications][2] and [data science][3].
|
||||
|
||||
Being so easy to learn, so vastly used, and having a plethora of ready-to-use modules (external files that contain Python statements), no wonder Python is the preferred language to teach programming to first-year computer science students in the United States.
|
||||
|
||||
In this 2-article series we will review the fundamentals of Python in hopes that you will find it useful as a springboard to get you started with programming and as a quick-reference guide afterwards. That said, let’s get started.
|
||||
|
||||
### Python in Linux
|
||||
|
||||
Python versions 2.x and 3.x are usually available in most modern Linux distributions out of the box. You can enter a Python shell by typing `python` or `python3` in your terminal emulator and exit with `quit()`:
|
||||
|
||||
```
|
||||
$ which python
|
||||
$ which python3
|
||||
$ python -v
|
||||
$ python3 -v
|
||||
$ python
|
||||
>>> quit()
|
||||
$ python3
|
||||
>>> quit()
|
||||
```
|
||||
|
||||

|
||||
>Running Python Commands on Linux
|
||||
|
||||
If you want to discard Python 2.x and use 3.x instead when you type python, you can modify the corresponding symbolic links as follows:
|
||||
|
||||
```
|
||||
$ sudo rm /usr/bin/python
|
||||
$ cd /usr/bin
|
||||
$ ln -s python3.2 python # Choose the Python 3.x binary here
|
||||
```
|
||||
|
||||

|
||||
>Remove Python 2 and Use Python 3
|
||||
|
||||
By the way, it is important to note that although versions 2.x are still used, they are not actively maintained. For that reason, you may want to consider switching to 3.x as indicated above. Since there are some syntax differences between 2.x and 3.x, we will focus on the latter in this series.
|
||||
|
||||
Another way you can use Python in Linux is through the IDLE (the Python Integrated Development Environment), a graphical user interface for writing Python code. Before installing it, it is a good idea to perform a search to find out what are the versions available for your distribution:
|
||||
|
||||
```
|
||||
# aptitude search idle [Debian and derivatives]
|
||||
# yum search idle [CentOS and Fedora]
|
||||
# dnf search idle [Fedora 23+ version]
|
||||
```
|
||||
|
||||
Then, you can install it as follows:
|
||||
|
||||
```
|
||||
$ sudo aptitude install idle-python3.2 # I'm using Linux Mint 13
|
||||
```
|
||||
|
||||
Once installed, you will see the following screen after launching the IDLE. While it resembles the Python shell, you can do more with the IDLE than with the shell.
|
||||
|
||||
For example, you can:
|
||||
|
||||
1. open external files easily (File → Open).
|
||||
|
||||

|
||||
>Python Shell
|
||||
|
||||
2) copy (`Ctrl + C`) and paste (`Ctrl + V`) text, 3) find and replace text, 4) show possible completions (a feature known as Intellisense or Autocompletion in other IDEs), 5) change the font type and size, and much more.
|
||||
|
||||
On top of this, you can use the IDLE to create desktop applications.
|
||||
|
||||
Since we will not be developing a desktop application in this 2-article series, feel free to choose between the IDLE and the Python shell to follow the examples.
|
||||
|
||||
### Basic Operations with Python
|
||||
|
||||
As it is to be expected, you can perform arithmetic operations (feel free to use as many parentheses as needed to perform all the operations you want!) and manipulate text strings very easily with Python.
|
||||
|
||||
You can also assign the results of operations to variables and display them in the screen. A handy feature in Python is concatenation – just supply the values of variables and / or strings in a comma-delimited list (inside parentheses) to the print function and it will return the sentence composed by the items in the sequence:
|
||||
|
||||
```
|
||||
>>> a = 5
|
||||
>>> b = 8
|
||||
>>> x = b / a
|
||||
>>> x
|
||||
1.6
|
||||
>>> print(b, "divided by", a, "equals", x)
|
||||
```
|
||||
|
||||
Note that you can mix variables of different types (numbers, strings, booleans, etc) and once you have assigned a value to a variable you can change the data type without problems later (for this reason Python is said to be a dynamically typed language).
|
||||
|
||||
If you attempt to do this in a statically typed language (such as Java or C#), an error will be thrown.
|
||||
|
||||

|
||||
>Learn Python Basic Operations
|
||||
|
||||
### A brief comment about Object Oriented Programming
|
||||
|
||||
In Object Oriented Programming (OOP), all entities in a program are represented as objects and thus they can interact with others. As such, they have properties and most of them can perform actions (known as methods).
|
||||
|
||||
For example, let’s suppose we want to create a dog object. Some of the possible properties are color, breed, age, etc, whereas some of the actions a dog can perform are bark(), eat(), sleep(), and many others.
|
||||
|
||||
Methods names, as you can see, are followed by a set of parentheses which may (or may not) contain one (or more) arguments (values that are passed to the method).
|
||||
|
||||
Let’s illustrate these concepts with one of the basic object types in Python: lists.
|
||||
|
||||
### Illustrating methods and properties of objects: Lists in Python
|
||||
|
||||
A list is an ordered group of items, which do not necessarily have to be all of the same data type. To create an empty list named rockBands, use a pair of square brackets as follows:
|
||||
|
||||
To append an item to the end of the list, pass the item to the `append()` method as follows:
|
||||
|
||||
```
|
||||
>>> rockBands = []
|
||||
>>> rockBands.append("The Beatles")
|
||||
>>> rockBands.append("Pink Floyd")
|
||||
>>> rockBands.append("The Rolling Stones")
|
||||
```
|
||||
|
||||
To remove an item from the list, we can pass the specific element to the remove() method, or the position of the element (count starts at zero) in the list to pop().
|
||||
|
||||
In other words, we can use either of the following options to remove “The Beatles” from the list:
|
||||
|
||||
```
|
||||
>>> rockBands.remove("The Beatles")
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
>>> rockBands.pop(0)
|
||||
```
|
||||
|
||||
You can display the list of available methods for an object by pressing Ctrl + Space once you’ve typed the name followed by a dot:
|
||||
|
||||

|
||||
>List Available Python Methods
|
||||
|
||||
A property of a list object is the number of items it contains. It is actually called length and is invoked by passing the list as argument to the len built-in function (by the way, the print statement, which we exemplified earlier-, is another Python built-in function).
|
||||
|
||||
If you type len followed by an opening parentheses in the IDLE, you will see the default syntax of the function:
|
||||
|
||||

|
||||
>Python len Function
|
||||
|
||||
Now what about the individual items of the list. Do they have methods and properties as well? The answer is yes. For example, you can convert a string item to uppercase and get the number of characters it contains as follows:
|
||||
|
||||
```
|
||||
>>> rockBands[0].upper()
|
||||
'THE BEATLES'
|
||||
>>> len(rockBands[0])
|
||||
11
|
||||
```
|
||||
|
||||
### Summary
|
||||
|
||||
In this article we have provided a brief introduction to Python, its command-line shell, and the IDLE, and demonstrated how to perform arithmetic calculations, how to store values in variables, how to print back those values to the screen (either on its own or as part of a concatenation), and explained through a practical example what are the methods and properties of an object.
|
||||
|
||||
In the next article we will discuss control flow with conditionals and loops. We will also demonstrate how to use what we have learned to write a script to help us in our sysadmin tasks.
|
||||
|
||||
Does Python sound like something you would like to learn more about? Stay tuned for the second part in this series (where among other things we will combine the bounties of Python and command-line tools in a script), and also consider buying our Ultimate Python Coding bundle (more details [here][4]).
|
||||
|
||||
As always, you can count on us if you have any questions about this article. Just send us a message using the contact form below and we will get back to you as soon as possible.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/learn-python-programming-and-scripting-in-linux/
|
||||
|
||||
作者:[Gabriel Cánepa][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: http://www.tecmint.com/author/gacanepa/
|
||||
[1]: http://www.tecmint.com/category/bash-shell/
|
||||
[2]: http://www.tecmint.com/create-gui-applications-in-linux/
|
||||
[3]: http://www.datasciencecentral.com/profiles/blogs/the-guide-to-learning-python-for-data-science-2
|
||||
[4]: http://www.tecmint.com/learn-python-programming-online-with-ultimate-python-coding/
|
@ -0,0 +1,161 @@
|
||||
BEST LINUX PHOTO MANAGEMENT SOFTWARE IN 2016
|
||||
=============================================
|
||||
|
||||

|
||||
|
||||
When it comes to Linux applications, at times there are so many choices and alternatives. But sometimes there are only a few options.
|
||||
|
||||
One of our readers had requested to make a list of decent **Linux photo management software**. Something that could replace now defunct Picasa on Linux.
|
||||
|
||||
Turns out, though not many, there are some really good applications for managing photo libraries available out there. Either you have a huge collection of photos or only a few of them, one of these options ought to suit your needs.
|
||||
|
||||
This list of **best photo management applications for Linux** is different from our earlier list of [best photo applications for Linux][1]. That list contained image related applications for various purposes such as editing, painting etc., while this list deals with only photo managing applications.
|
||||
|
||||
So, here we go. I’ve also included the installation commands of these applications for Ubuntu and its derivatives. All you need to do is open a terminal and run those.
|
||||
|
||||
### [GTHUMB](https://wiki.gnome.org/Apps/gthumb)
|
||||
|
||||

|
||||
>gThumb Photo Editing
|
||||
|
||||
gThumb is a lightweight photo management application built mainly for GNOME desktop environment. It includes all the basic photo management features as well as some editing and advance operations. Some of the main features of gThumb are:
|
||||
|
||||
- Image Viewer: Supports all the major image format (including GIF) and metadata (EXIF, XMP etc).
|
||||
- Image Browser: All the basic browsing operations (thumbnails, move, copy, delete etc) and bookmarking support.
|
||||
- Image Organizer: Organize photos with tags, catalogs and Libraries. Importing photos from Digital Cameras. Web albums (Picasa, Flickr, Facebook etc) integration.
|
||||
- Image Editor: Basic photo editing operations, filters, format conversion etc.
|
||||
|
||||
And there’s much more, check the official [gThumb feature][2] list. If you use GNOME or GNOME based desktop environments (like MATE) you should definitely try this one out.
|
||||
|
||||
#### GTHUMB INSTALLATION
|
||||
|
||||
```
|
||||
sudo apt-get install gthumb
|
||||
```
|
||||
|
||||
|
||||
### [DIGIKAM][3]
|
||||
|
||||

|
||||
>digiKam
|
||||
|
||||
digiKam is mainly developed for KDE, but works just as well on other desktop environments. It comes with a lot of features with an interface that works nicely. The main features of digiKam includes:
|
||||
|
||||
- Photo Organizer: Albums, sub-albums, tags, comments, metadata, sorting support.
|
||||
- Photo Importer: Import support from Digital Cameras, USB devices, Web Albums (including Picasa & Facebook) and some other features.
|
||||
- Photo Exporter: Export support for various online platforms and format conversion.
|
||||
- Photo Editor: Wide range of photo editing operations.
|
||||
|
||||
digiKam is certainly one of the best Linux photo management software, if not best.
|
||||
|
||||
#### DIGIKAM INSTALLATION
|
||||
|
||||
```
|
||||
sudo apt-get install digikam
|
||||
```
|
||||
|
||||
### [SHOTWELL][4]
|
||||
|
||||

|
||||
>Shotwell
|
||||
|
||||
Shotwell photo manager is also for GNOME desktop environment. Shotwell, while isn’t as feature-rich as gThumb, does what it promises. The main features of Shotwell are:
|
||||
|
||||
- Import photos from Disks or Digital Cameras.
|
||||
- Event, tags and folder based organization.
|
||||
- Basic photo editing features and format conversion.
|
||||
- Supports uploading to web services (Facebook, Flickr, Tumblr etc).
|
||||
|
||||
If you want something simple, you can check this one out.
|
||||
|
||||
#### SHOTWELL INSTALLATION
|
||||
|
||||
```
|
||||
sudo apt-get install shotwell
|
||||
```
|
||||
|
||||
### [KPHOTOALBUM][5]
|
||||
|
||||

|
||||
>KPhotoAlbum
|
||||
|
||||
KPhotoAlbum is a photo management application also intended to be used on [KDE desktop environment][6]. What makes KPhotoAlbum unique is its categorization process and time-based browsing. You can categorize photos by People, Places, Events etc. And for time-based browsing, it has a dedicated timeline or Date Bar at the bottom of the user interface.
|
||||
|
||||
KPhotoAlbum comes with a wide range of features for photo management and editing. Some of the main features include:
|
||||
|
||||
- Advance photo organization (with categories, sub-categories, tags, metadata, annotation support and much more).
|
||||
- Wide range of import and export options (including almost every major photo sharing platforms).
|
||||
- Various editing options (includes batch operations).
|
||||
|
||||
All these advanced organization features do have their downsides – user has to do most of them manually. But if you’re a KDE lover, this can be a good pick. You can use KPhotoAlbum on other desktop environments too, but it delivers the optimal experience on KDE.
|
||||
|
||||
#### KPHOTOALBUM INSTALLATION
|
||||
|
||||
```
|
||||
sudo apt-get install kphotoalbum
|
||||
```
|
||||
|
||||
### [DARKTABLE][7]
|
||||
|
||||

|
||||
>Darktable
|
||||
|
||||
Darktable is more of a photo editing application than an organizer. Darktable stands out for its own user interface regardless of the desktop environment you might be using, and of course for its editing capabilities. The basic features include:
|
||||
|
||||
- Basic photo organization.
|
||||
- Advance and feature-rich photo editing.
|
||||
- Export support for Picasa & Flickr and format conversion.
|
||||
|
||||
If you’re into photo editing and retouching, Darktable is a nice choice.
|
||||
|
||||
> Reading Suggestion: [How to install Darktable 2.0 in Ubuntu via PPA][8]
|
||||
|
||||
#### DARKTABLE INSTALLATION
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:pmjdebruijn/darktable-release
|
||||
sudo apt-get update
|
||||
sudo apt-get install darktable
|
||||
```
|
||||
|
||||
### OTHERS
|
||||
|
||||
If you want a simple application for pulling images from your portable devices (cameras, phones, portable drives etc) and storing them on your Hard Disk, using [Rapid Photo Downloader][9] is a no-brainer. It is an incredible application for importing and backing up photos from portable devices. The installation and configuration process is quite easy and simple.
|
||||
|
||||
For installing Rapid Photo Downloader on Ubuntu, fire up a terminal and run this command:
|
||||
|
||||
```
|
||||
sudo apt-get install rapid-photo-downloader
|
||||
```
|
||||
|
||||
If you are still interested in trying a few more options, here you go:
|
||||
|
||||
- [GNOME Photos][10] (Photo viewer for GNOME desktop environment)
|
||||
- [Gwenview][11] (Photo viewer for KDE desktop environment)
|
||||
- [Picty][12] (Open-source photo collection manager)
|
||||
|
||||
So, are you using, or plan to use, any one of these applications? Which, according to you is the best photo management application for Ubuntu or any other Linux? Do you have any favorites to term as Linux photo manager? Do share your views.
|
||||
|
||||
|
||||
----------
|
||||
via: http://itsfoss.com/linux-photo-management-software/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29
|
||||
|
||||
作者:[Munif Tanjim][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: http://itsfoss.com/author/munif/
|
||||
[1]: http://itsfoss.com/image-applications-ubuntu-linux/
|
||||
[2]: https://wiki.gnome.org/Apps/gthumb/features
|
||||
[3]: https://www.digikam.org/
|
||||
[4]: https://wiki.gnome.org/Apps/Shotwell
|
||||
[5]: https://www.kphotoalbum.org/
|
||||
[6]: https://www.kde.org/
|
||||
[7]: http://www.darktable.org/
|
||||
[8]: http://itsfoss.com/darktable-20-released-installation-ppa/
|
||||
[9]: http://www.damonlynch.net/rapid/index.html
|
||||
[10]: https://wiki.gnome.org/Apps/Photos
|
||||
[11]: https://userbase.kde.org/Gwenview
|
||||
[12]: https://github.com/spillz/picty
|
@ -0,0 +1,56 @@
|
||||
Linux 给了我所有所需的工具
|
||||
==========================================
|
||||
|
||||

|
||||
|
||||
[Linux][0] 就在我们身边。它以 Android 的形式[存在我们的手机中][1],它[在国际空间站中被使用][2],它[还是互联网的主要支柱][3],可是迄今为止很多人从未留意过它。对 Linux 的探索是一种很有成就感的尝试。很多人都在 Opensource.com [分享过他们与 Linux 的故事][4]。现在,轮到我了。
|
||||
|
||||
我依然记得我在 2008 年第一次探索 Linux 的时刻。协助我探索 Linux 的人是我的父亲,Socrates Ballais。他是菲律宾塔克洛班的一名经济学专家,也是一个技术狂热者。他教会了我许多计算机技术方面的知识,但只提倡我将 Linux 作为 Windows 崩溃后的备用操作系统。
|
||||
|
||||
### 从前的日子
|
||||
|
||||
在我们在家中购置电脑之前,我曾是一个 Windows 用户。我使用电脑玩游戏,制作文档,做那些小孩子都会用电脑做的事。我不知道什么是 Linux,更不知道它的用处。在那个时候,电脑在我心中的象征就是一个 Windows 的商标。
|
||||
|
||||
当我们买到第一台电脑时,我爸爸在上面安装了 Linux ([Ubuntu][5] 8.04)。充满了好奇心的我,第一次引导进入了那个操作系统。我被它的用户界面震惊了。它非常漂亮,而且我发现它对用户很友好。在那之后的一段时间,我只会使用 Linux 它内置的几款游戏。我还是会在 Windows 中做我的家庭作业。
|
||||
|
||||
### 第一次安装
|
||||
|
||||
4 年后,我决定为家里的电脑重新安装 Windows。我同时毫不犹豫地安装了 Ubuntu。从那次开始,我(再次)爱上了 Linux。随着时间推移,我慢慢适应了 Ubuntu,还会无意地将它推荐给我的朋友。当我拿到我的第一台笔记本电脑时,我立刻在上面安装了它。
|
||||
|
||||
### 现在
|
||||
|
||||
如今,Linux 是我的默认操作系统。当我需要使用电脑做一些工作时,我会在 Linux 中完成。至于文档和幻灯片,我会通过 [Wine][6] 来使用微软的 Office 办公软件。我会用 [Chrome 和 Firefox][7] 来满足我的上网需要,会用 [Geary][8] 来收发邮件。你可以使用 Linux 来做很多很多事情。
|
||||
|
||||
我的大多数——并不是全部——编程工作都会在 Linux 中完成。像 [Visual Studio][9] 和 [XCode][10] 这样的基本集成开发环境 (IDE) 的缺乏教会我这个程序员如何变得灵活、如何去学习更多知识。现在,我只需要一个文本编辑器和一个编译器/解释器就可以开始编程。只有当 IDE 是我完成手头上的任务的最佳最佳工具时,我才会使用它。总而言之,Linux 给了我开发软件所需要的一切工具。
|
||||
|
||||
现在,我是一个名叫 [Creatomiv Studios][11] 的初创公司的联合创始人和首席技术官。我使用 Linux 来编写我们的最新产品 Basyang 的后端服务器代码。我还是一个业余摄影家,使用 [GIMP][12] 和 [Darktable][13] 来编辑、管理照片。至于团队沟通,我会使用 [Telegram][14]。
|
||||
|
||||
### Linux 之美
|
||||
|
||||
很多人认为 Linux 只是为那些喜欢解决复杂问题或者在命令行中工作的人而生的操作系统。还有些人会认为它就是一个缺乏公司支持维护的垃圾。不过,我认为 Linux 是一个完美的操作系统,也是一个为创造而生的绝佳工具。所以我热爱 Linux,同时希望看到它继续成长。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/life/16/3/my-linux-story-sean-ballais
|
||||
|
||||
作者:[Sean Francis N. Ballais][a]
|
||||
译者:[StdioA](https://github.com/StdioA)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
[a]: https://opensource.com/users/seanballais
|
||||
[0]: https://opensource.com/resources/what-is-linux
|
||||
[1]: http://www.howtogeek.com/189036/android-is-based-on-linux-but-what-does-that-mean/
|
||||
[2]: http://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability
|
||||
[3]: https://www.youtube.com/watch?v=JzsLkbwi1LA
|
||||
[4]: https://opensource.com/tags/my-linux-story
|
||||
[5]: http://ubuntu.com/
|
||||
[6]: https://www.winehq.org/
|
||||
[7]: https://www.google.com/chrome/browser/desktop/index.html
|
||||
[8]: https://wiki.gnome.org/Apps/Geary
|
||||
[9]: https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx
|
||||
[10]: https://developer.apple.com/xcode/
|
||||
[11]: https://www.facebook.com/CreatomivStudios/
|
||||
[12]: https://www.gimp.org/
|
||||
[13]: http://www.darktable.org/
|
||||
[14]: https://telegram.org/
|
@ -1,34 +0,0 @@
|
||||
Intel展示了带动大屏幕Linux的便宜Android手机
|
||||
==============================================================
|
||||
|
||||

|
||||
|
||||
在世界移动会议**MWC16**上Intel展示了称之为“大屏体验”的一款的Android智能手机,它在插入一个外部显示后运行了一个完整的Linux桌面。
|
||||
|
||||
这个概念大体上与微软在Windows 10手机中的Continuum相似,但是Continuum面向的是高端设备,Intel的项目面向的是低端智能机何新兴市场。
|
||||
|
||||
显示上Barcelona是拥有Atom x3、2GB RAM和16GB存储以及支持外部显示的的SoFIA(Intel架构的只能或功能手机)智能机原型。插上键盘、鼠标何显示,它就变成了一台桌面Linux,可以选择在大屏幕中显示Android桌面。
|
||||
|
||||
Intel的拓荒小组经理Nir Metzer告诉Reg:“Android基于Linux内核,因此我们运行的是一个内核,我们有一个Android栈和一个Linux栈,并且我们共享一个上下文,因此文件系统是相同的。电话是全功能的。”
|
||||
|
||||
Metzer说:“我有一个多窗口环境。只要我插入后就可以做电子表格,我可以拖拽、播放音频。在一个低端平台实现这一切是一个挑战。”
|
||||
|
||||
现在当连上外部显示器时设备的屏幕显示的空白,但是Metzer说下个版本的Atom X3会支持双显示。
|
||||
|
||||
使用的Linux版本是由Intel维护的。Metzer说:“我们需要将Linux和Android保持一致。框架是预安装的,你不能下载任何app”
|
||||
|
||||
英特尔在移动世界大会上向手机制造商们推销这一想法,但却没有实际报告购买该设备的消费者。Metzer说:“芯片已经准备好了,已经为量产准备好了。这可以明天进入生产。这是一个商业决定。”
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.theregister.co.uk/2016/02/23/move_over_continuum_intel_shows_android_smartphone_powering_bigscreen_linux/
|
||||
|
||||
作者:[Tim Anderson][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.theregister.co.uk/Author/2878
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user