mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-12 01:40:10 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
99adb4fbd9
214
published/20190607 4 tools to help you drive Kubernetes.md
Normal file
214
published/20190607 4 tools to help you drive Kubernetes.md
Normal file
@ -0,0 +1,214 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11101-1.html)
|
||||
[#]: subject: (4 tools to help you drive Kubernetes)
|
||||
[#]: via: (https://opensource.com/article/19/6/tools-drive-kubernetes)
|
||||
[#]: author: (Scott McCarty https://opensource.com/users/fatherlinux/users/fatherlinux/users/fatherlinux/users/fatherlinux)
|
||||
|
||||
帮助你驾驭 Kubernetes 的 4 个工具
|
||||
======
|
||||
|
||||
> 学习如何驾驭 Kubernetes 比如何建造它更重要,这些工具可以帮助你更快上路。
|
||||
|
||||
![Tools in a workshop][1]
|
||||
|
||||
在本系列的第三篇文章中,[Kubernetes 基础:首先学习如何使用][2],我强调你应该学会使用 Kubernetes,而不是建造它。我还解释说,在 Kubernetes 中,你必须学习最小的一组原语来建模应用程序。我想强调这一点:你需要学习的这组原语是最简单的原语集,你可以通过它们学习如何实现生产级的应用程序部署(即高可用性 [HA]、多容器、多应用程序)。换句话说,学习 Kubernetes 内置的原语集比学习集群软件、集群文件系统、负载平衡器、让人发疯的 Apache 和 Nginx 的配置、路由器、交换机、防火墙和存储后端更容易 —— 这些是你在传统的 IT 环境(虚拟机或裸机)中建模简单的 HA 应用程序所需要的东西。
|
||||
|
||||
在这第四篇文章中,我将分享一些有助于你学习快速驾驭 Kubernetes 的工具。
|
||||
|
||||
### 1、Katacoda
|
||||
|
||||
无疑,[Katacoda][3] 是试驾 Kubernetes 集群的最简单方法。只需单击一下,五秒钟后就可以将基于 Web 的终端直接连接到正在运行的 Kubernetes 集群中。这对于使用和学习来说非常棒。我甚至将它用于演示和测试新想法。Katacoda 提供了一个完整的临时环境,在你使用完毕后可以回收利用。
|
||||
|
||||
![OpenShift Playground][4]
|
||||
|
||||
*[OpenShift Playground][5]*
|
||||
|
||||
![Kubernetes Playground][6]
|
||||
|
||||
*[Kubernetes Playground][7]*
|
||||
|
||||
Katacoda 提供了一个临时的环境和更深入的实验室环境。例如,我最近三四年主讲的 [Linux Container Internals Lab][3] 是在 Katacoda 中构建的。
|
||||
|
||||
Katacoda 在其主站点上维护了若干 [Kubernetes 和云教程][8]并与 Red Hat 合作以支持了一个 [OpenShift 的专用学习门户][9]。了解一下,它们是极好的学习资源。
|
||||
|
||||
当你第一次学习驾驶翻斗车时,最好先观察一下其他人的驾驶方式。
|
||||
|
||||
### 2、Podman generate kube
|
||||
|
||||
`podman generate kube` 命令是一个很棒的子命令,可以帮助用户自然地从运行简单容器的简单容器引擎转换到运行许多容器的集群用例(正如我在[上篇文章][2]中所描述的那样)。[Podman][10] 通过让你启动一个新的容器,然后导出这个可工作的 Kube YAML,并在 Kubernetes 中启动它来实现这一点。看看这个(你可以在 [Katacoda lab][3] 中运行它,它已经有了 Podman 和 OpenShift)。
|
||||
|
||||
首先,请注意运行容器的语法与 Docker 非常相似:
|
||||
|
||||
```
|
||||
podman run -dtn two-pizza quay.io/fatherlinux/two-pizza
|
||||
```
|
||||
|
||||
不过这个是其它容器引擎所没有的:
|
||||
|
||||
```
|
||||
podman generate kube two-pizza
|
||||
```
|
||||
|
||||
输出:
|
||||
|
||||
```
|
||||
# Generation of Kubernetes YAML is still under development!
|
||||
#
|
||||
# Save the output of this file and use kubectl create -f to import
|
||||
# it into Kubernetes.
|
||||
#
|
||||
# Created with podman-1.3.1
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
creationTimestamp: "2019-06-07T08:08:12Z"
|
||||
labels:
|
||||
app: two-pizza
|
||||
name: two-pizza
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- bash -c 'while true; do /usr/bin/nc -l -p 3306 < /srv/hello.txt; done'
|
||||
env:
|
||||
- name: PATH
|
||||
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
- name: TERM
|
||||
value: xterm
|
||||
- name: HOSTNAME
|
||||
- name: container
|
||||
value: oci
|
||||
image: quay.io/fatherlinux/two-pizza:latest
|
||||
name: two-pizza
|
||||
resources: {}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: true
|
||||
capabilities: {}
|
||||
privileged: false
|
||||
readOnlyRootFilesystem: false
|
||||
tty: true
|
||||
workingDir: /
|
||||
status: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: "2019-06-07T08:08:12Z"
|
||||
labels:
|
||||
app: two-pizza
|
||||
name: two-pizza
|
||||
spec:
|
||||
selector:
|
||||
app: two-pizza
|
||||
type: NodePort
|
||||
status:
|
||||
loadBalancer: {}
|
||||
```
|
||||
|
||||
你现在有了一些可以的工作 Kubernetes YAML,你可以用它作为练习的起点来学习、调整等等。`-s` 标志可以为你创造一项服务。[Brent Baude][11] 甚至致力于[添加卷/持久卷断言][12]等新功能。如果想进一步深入,请在 Brent 的博客文章《[Podman 现在可以轻松过渡到 Kubernetes 和 CRI-O][13]》中了解他的工作。
|
||||
|
||||
### 3、oc new-app
|
||||
|
||||
`oc new-app` 命令非常强大。它是特定于 OpenShift 的,所以它在默认的 Kubernetes 中不可用,但是当你开始学习 Kubernetes 时它非常有用。让我们从快速命令开始创建一个相当复杂的应用程序:
|
||||
|
||||
```
|
||||
oc new-project -n example
|
||||
oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/quickstarts/cakephp-mysql.json
|
||||
```
|
||||
|
||||
使用 `oc new-app`,你可以从 OpenShift 开发人员那里偷取模板,并在开发原语来描述你自己的应用程序时拥有一个已知良好的起点。运行上述命令后,你的 Kubernetes 命名空间(在 OpenShift 中)将由若干新的已定义资源填充。
|
||||
|
||||
```
|
||||
oc get all
|
||||
```
|
||||
|
||||
输出:
|
||||
|
||||
```
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
pod/cakephp-mysql-example-1-build 0/1 Completed 0 4m
|
||||
pod/cakephp-mysql-example-1-gz65l 1/1 Running 0 1m
|
||||
pod/mysql-1-nkhqn 1/1 Running 0 4m
|
||||
|
||||
NAME DESIRED CURRENT READY AGE
|
||||
replicationcontroller/cakephp-mysql-example-1 1 1 1 1m
|
||||
replicationcontroller/mysql-1 1 1 1 4m
|
||||
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||
service/cakephp-mysql-example ClusterIP 172.30.234.135 <none> 8080/TCP 4m
|
||||
service/mysql ClusterIP 172.30.13.195 <none> 3306/TCP 4m
|
||||
|
||||
NAME REVISION DESIRED CURRENT TRIGGERED BY
|
||||
deploymentconfig.apps.openshift.io/cakephp-mysql-example 1 1 1 config,image(cakephp-mysql-example:latest)
|
||||
deploymentconfig.apps.openshift.io/mysql 1 1 1 config,image(mysql:5.7)
|
||||
|
||||
NAME TYPE FROM LATEST
|
||||
buildconfig.build.openshift.io/cakephp-mysql-example Source Git 1
|
||||
|
||||
NAME TYPE FROM STATUS STARTED DURATION
|
||||
build.build.openshift.io/cakephp-mysql-example-1 Source Git@47a951e Complete 4 minutes ago 2m27s
|
||||
|
||||
NAME DOCKER REPO TAGS UPDATED
|
||||
imagestream.image.openshift.io/cakephp-mysql-example docker-registry.default.svc:5000/example/cakephp-mysql-example latest About aminute ago
|
||||
|
||||
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
|
||||
route.route.openshift.io/cakephp-mysql-example cakephp-mysql-example-example.2886795271-80-rhsummit1.environments.katacoda.com cakephp-mysql-example <all> None
|
||||
```
|
||||
|
||||
这样做的好处是你可以删除 Pod,观察复制控制器如何重新创建它们,缩放 Pod 等等。你可以使用模板并将其更改为其他应用程序(这是我第一次启动时所做的)。
|
||||
|
||||
### 4、Visual Studio Code
|
||||
|
||||
我把我最喜欢的放在最后。我的大部分工作都使用 [vi][14],但我从来没有为 Kubernetes 找到一个好的语法高亮器和代码补完插件(如果有的话,请告诉我)。相反,我发现微软的 [VS Code][15] 有一套杀手级的插件,可以完成 Kubernetes 资源的创建并提供样板。
|
||||
|
||||
![VS Code plugins UI][16]
|
||||
|
||||
首先,安装上图中显示的 Kubernetes 和 YAML 插件。
|
||||
|
||||
![Autocomplete in VS Code][17]
|
||||
|
||||
然后,你可以从头开始创建新的 YAML 文件,并自动补完 Kubernetes 资源。上面的示例显示了一个服务。
|
||||
|
||||
![VS Code autocomplete filling in boilerplate for an object][18]
|
||||
|
||||
当你使用自动补完并选择服务资源时,它会填充该对象的一些模板。当你第一次学习使用 Kubernetes 时,这非常棒。你可以构建 Pod、服务、复制控制器、部署等。当你从头开始构建这些文件甚至修改你使用 `podman generate kube` 创建的文件时,这是一个非常好的功能。
|
||||
|
||||
### 总结
|
||||
|
||||
这四个工具(如果算上两个插件,则为六个)将帮助你学习驾驭 Kubernetes,而不是构造或装备它。在本系列的最后一篇文章中,我将讨论为什么 Kubernetes 如此适合运行这么多不同的工作负载。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/6/tools-drive-kubernetes
|
||||
|
||||
作者:[Scott McCarty][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/fatherlinux/users/fatherlinux/users/fatherlinux/users/fatherlinux
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_workshop_blue_mechanic.jpg?itok=4YXkCU-J (Tools in a workshop)
|
||||
[2]: https://linux.cn/article-11036-1.html
|
||||
[3]: https://learn.openshift.com/subsystems/container-internals-lab-2-0-part-1
|
||||
[4]: https://opensource.com/sites/default/files/uploads/openshift-playground.png (OpenShift Playground)
|
||||
[5]: https://learn.openshift.com/playgrounds/openshift311/
|
||||
[6]: https://opensource.com/sites/default/files/uploads/kubernetes-playground.png (Kubernetes Playground)
|
||||
[7]: https://katacoda.com/courses/kubernetes/playground
|
||||
[8]: https://katacoda.com/learn
|
||||
[9]: http://learn.openshift.com/
|
||||
[10]: https://podman.io/
|
||||
[11]: https://developers.redhat.com/blog/author/bbaude/
|
||||
[12]: https://github.com/containers/libpod/issues/2303
|
||||
[13]: https://developers.redhat.com/blog/2019/01/29/podman-kubernetes-yaml/
|
||||
[14]: https://en.wikipedia.org/wiki/Vi
|
||||
[15]: https://code.visualstudio.com/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/vscode_-_kubernetes_red_hat_-_plugins.png (VS Code plugins UI)
|
||||
[17]: https://opensource.com/sites/default/files/uploads/vscode_-_kubernetes_service_-_autocomplete.png (Autocomplete in VS Code)
|
||||
[18]: https://opensource.com/sites/default/files/uploads/vscode_-_kubernetes_service_-_boiler_plate.png (VS Code autocomplete filling in boilerplate for an object)
|
@ -1,69 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (WangYueScream )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Introducing kids to computational thinking with Python)
|
||||
[#]: via: (https://opensource.com/article/19/2/break-down-stereotypes-python)
|
||||
[#]: author: (Don Watkins https://opensource.com/users/don-watkins)
|
||||
|
||||
Introducing kids to computational thinking with Python
|
||||
======
|
||||
Coding program gives low-income students the skills, confidence, and knowledge to break free from economic and societal disadvantages.
|
||||
|
||||

|
||||
|
||||
When the [Parkman Branch][1] of the Detroit Public Library was flooded with bored children taking up all the computers during summer break, the library saw it not as a problem, rather an opportunity. They started a coding club, the [Parkman Coders][2], led by [Qumisha Goss][3], a librarian who is leveraging the power of Python to introduce disadvantaged children to computational thinking.
|
||||
|
||||
When she started the Parkman Coders program about four years ago, "Q" (as she is known) didn't know much about coding. Since then, she's become a specialist in library instruction and technology and a certified Raspberry Pi instructor.
|
||||
|
||||
The program began by using [Scratch][4], but the students got bored with the block coding interface, which they regarded as "baby stuff." She says, "I knew we need to make a change to something that was still beginner friendly, but that would be more challenging for them to continue to hold their attention." At this point, she started teaching them Python.
|
||||
|
||||
Q first saw Python while playing a game with dungeons and skeleton monsters on [Code.org][5]. She began to learn Python by reading books like [Python Programming: An Introduction to Computer Science][6] and [Python for Kids][7]. She also recommends [Automate the Boring Stuff with Python][8] and [Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9].
|
||||
|
||||
### Setting up a Raspberry Pi makerspace
|
||||
|
||||
Q decided to use [Raspberry Pi][10] computers to avoid the possibility that the students might be able to hack into the library system's computers, which weren't arranged in a way conducive to a makerspace anyway. The Pi's affordability, plus its flexibility and the included free software, lent more credibility to her decision.
|
||||
|
||||
While the coder program was the library's effort keep the peace and create a learning space that would engage the children, it quickly grew so popular that it ran out of space, computers, and adequate electrical outlets in a building built in 1921. They started with 10 Raspberry Pi computers shared among 20 children, but the library obtained funding from individuals, companies including Microsoft, the 4H, and the Detroit Public Library Foundation to get more equipment and expand the program.
|
||||
|
||||
Currently, about 40 children participate in each session and they have enough Raspberry Pi's for one device per child and some to give away. Many of the Parkman Coders come from low socio-economic backgrounds and don't have a computer at home, so the library provides them with donated Chromebooks.
|
||||
|
||||
Q says, "when kids demonstrate that they have a good understanding of how to use a Raspberry Pi or a [Microbit][11] and have been coming to programs regularly, we give them equipment to take home with them. This process is very challenging, however, because [they may not] have internet access at home [or] all the peripheral things they need like monitors, keyboards, and mice."
|
||||
|
||||
### Learning life skills and breaking stereotypes with Python
|
||||
|
||||
Q says, "I believe that the mainstays of learning computer science are learning critical thinking and problem-solving skills. My hope is that these lessons will stay with the kids as they grow and pursue futures in whatever field they choose. In addition, I'm hoping to inspire some pride in creatorship. It's a very powerful feeling to know 'I made this thing,' and once they've had these successes early, I hope they will approach new challenges with zeal."
|
||||
|
||||
She also says, "in learning to program, you have to learn to be hyper-vigilant about spelling and capitalization, and for some of our kids, reading is an issue. To make sure that the program is inclusive, we spell aloud during our lessons, and we encourage kids to speak up if they don't know a word or can't spell it correctly."
|
||||
|
||||
Q also tries to give extra attention to children who need it. She says, "if I recognize that someone has a more severe problem, we try to get them paired with a tutor at our library outside of program time, but still allow them to come to the program. We want to help them without discouraging them from participating."
|
||||
|
||||
Most importantly, the Parkman Coders program seeks to help every child realize that each has a unique skill set and abilities. Most of the children are African-American and half are girls. Q says, "we live in a world where we grow up with societal stigmas that frequently limit our own belief of what we can accomplish." She believes that children need a nonjudgmental space where "they can try new things, mess up, and discover."
|
||||
|
||||
The environment Q and the Parkman Coders program creates helps the participants break away from economic and societal disadvantages. She says that the secret sauce is to "make sure you have a welcoming space so anyone can come and that your space is forgiving and understanding. Let people come as they are, and be prepared to teach and to learn; when people feel comfortable and engaged, they want to stay."
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/2/break-down-stereotypes-python
|
||||
|
||||
作者:[Don Watkins][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/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://detroitpubliclibrary.org/locations/parkman
|
||||
[2]: https://www.dplfound.org/single-post/2016/05/15/Parkman-Branch-Coders
|
||||
[3]: https://www.linkedin.com/in/qumisha-goss-b3bb5470
|
||||
[4]: https://scratch.mit.edu/
|
||||
[5]: http://Code.org
|
||||
[6]: https://www.amazon.com/Python-Programming-Introduction-Computer-Science/dp/1887902996
|
||||
[7]: https://nostarch.com/pythonforkids
|
||||
[8]: https://automatetheboringstuff.com/
|
||||
[9]: https://nostarch.com/laurenipsum
|
||||
[10]: https://www.raspberrypi.org/
|
||||
[11]: https://microbit.org/guide/
|
@ -1,219 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (4 tools to help you drive Kubernetes)
|
||||
[#]: via: (https://opensource.com/article/19/6/tools-drive-kubernetes)
|
||||
[#]: author: (Scott McCarty https://opensource.com/users/fatherlinux/users/fatherlinux/users/fatherlinux/users/fatherlinux)
|
||||
|
||||
4 tools to help you drive Kubernetes
|
||||
======
|
||||
Learning to drive Kubernetes is more important that knowing how to build
|
||||
it, and these tools will get you on the road fast.
|
||||
![Tools in a workshop][1]
|
||||
|
||||
In the third article in this series, _[Kubernetes basics: Learn how to drive first][2]_ , I emphasized that you should learn to drive Kubernetes, not build it. I also explained that there is a minimum set of primitives that you have to learn to model an application in Kubernetes. I want to emphasize this point: the set of primitives that you _need_ to learn are the easiest set of primitives that you _can_ learn to achieve production-quality application deployments (i.e., high-availability [HA], multiple containers, multiple applications). Stated another way, learning the set of primitives built into Kubernetes is easier than learning clustering software, clustered file systems, load balancers, crazy Apache configs, crazy Nginx configs, routers, switches, firewalls, and storage backends—all the things you would need to model a simple HA application in a traditional IT environment (for virtual machines or bare metal).
|
||||
|
||||
In this fourth article, I'll share some tools that will help you learn to drive Kubernetes quickly.
|
||||
|
||||
### 1\. Katacoda
|
||||
|
||||
[Katacoda][3] is the easiest way to test-drive a Kubernetes cluster, hands-down. With one click and five seconds of time, you have a web-based terminal plumbed straight into a running Kubernetes cluster. It's magnificent for playing and learning. I even use it for demos and testing out new ideas. Katacoda provides a completely ephemeral environment that is recycled when you finish using it.
|
||||
|
||||
![OpenShift Playground][4]
|
||||
|
||||
[OpenShift playground][5]
|
||||
|
||||
![Kubernetes Playground][6]
|
||||
|
||||
[Kubernetes playground][7]
|
||||
|
||||
Katacoda provides ephemeral playgrounds and deeper lab environments. For example, the [Linux Container Internals Lab][3], which I have run for the last three or four years, is built in Katacoda.
|
||||
|
||||
Katacoda maintains a bunch of [Kubernetes and cloud tutorials][8] on its main site and collaborates with Red Hat to support a [dedicated learning portal for OpenShift][9]. Explore them both—they are excellent learning resources.
|
||||
|
||||
When you first learn to drive a dump truck, it's always best to watch how other people drive first.
|
||||
|
||||
### 2\. Podman generate kube
|
||||
|
||||
The **podman generate kube** command is a brilliant little subcommand that helps users naturally transition from a simple container engine running simple containers to a cluster use case running many containers (as I described in the [last article][2]). [Podman][10] does this by letting you start a few containers, then exporting the working Kube YAML, and firing them up in Kubernetes. Check this out (pssst, you can run it in this [Katacoda lab][3], which already has Podman and OpenShift).
|
||||
|
||||
First, notice the syntax to run a container is strikingly similar to Docker:
|
||||
|
||||
|
||||
```
|
||||
`podman run -dtn two-pizza quay.io/fatherlinux/two-pizza`
|
||||
```
|
||||
|
||||
But this is something other container engines don't do:
|
||||
|
||||
|
||||
```
|
||||
`podman generate kube two-pizza`
|
||||
```
|
||||
|
||||
The output:
|
||||
|
||||
|
||||
```
|
||||
# Generation of Kubernetes YAML is still under development!
|
||||
#
|
||||
# Save the output of this file and use kubectl create -f to import
|
||||
# it into Kubernetes.
|
||||
#
|
||||
# Created with podman-1.3.1
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
creationTimestamp: "2019-06-07T08:08:12Z"
|
||||
labels:
|
||||
app: two-pizza
|
||||
name: two-pizza
|
||||
spec:
|
||||
containers:
|
||||
\- command:
|
||||
\- /bin/sh
|
||||
\- -c
|
||||
\- bash -c 'while true; do /usr/bin/nc -l -p 3306 < /srv/hello.txt; done'
|
||||
env:
|
||||
\- name: PATH
|
||||
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
\- name: TERM
|
||||
value: xterm
|
||||
\- name: HOSTNAME
|
||||
\- name: container
|
||||
value: oci
|
||||
image: quay.io/fatherlinux/two-pizza:latest
|
||||
name: two-pizza
|
||||
resources: {}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: true
|
||||
capabilities: {}
|
||||
privileged: false
|
||||
readOnlyRootFilesystem: false
|
||||
tty: true
|
||||
workingDir: /
|
||||
status: {}
|
||||
\---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
creationTimestamp: "2019-06-07T08:08:12Z"
|
||||
labels:
|
||||
app: two-pizza
|
||||
name: two-pizza
|
||||
spec:
|
||||
selector:
|
||||
app: two-pizza
|
||||
type: NodePort
|
||||
status:
|
||||
loadBalancer: {}
|
||||
```
|
||||
|
||||
You now have some working Kubernetes YAML, which you can use as a starting point for mucking around and learning, tweaking, etc. The **-s** flag created a service for you. [Brent Baude][11] is even working on new features like [adding Volumes/Persistent Volume Claims][12]. For a deeper dive, check out Brent's amazing work in his blog post "[Podman can now ease the transition to Kubernetes and CRI-O][13]."
|
||||
|
||||
### 3\. oc new-app
|
||||
|
||||
The **oc new-app** command is extremely powerful. It's OpenShift-specific, so it's not available in default Kubernetes, but it's really useful when you're starting to learn Kubernetes. Let's start with a quick command to create a fairly sophisticated application:
|
||||
|
||||
|
||||
```
|
||||
oc new-project -n example
|
||||
oc new-app -f <https://raw.githubusercontent.com/openshift/origin/master/examples/quickstarts/cakephp-mysql.json>
|
||||
```
|
||||
|
||||
With **oc new-app** , you can literally steal templates from the OpenShift developers and have a known, good starting point when developing primitives to describe your own applications. After you run the above command, your Kubernetes namespace (in OpenShift) will be populated by a bunch of new, defined resources.
|
||||
|
||||
|
||||
```
|
||||
`oc get all`
|
||||
```
|
||||
|
||||
The output:
|
||||
|
||||
|
||||
```
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
pod/cakephp-mysql-example-1-build 0/1 Completed 0 4m
|
||||
pod/cakephp-mysql-example-1-gz65l 1/1 Running 0 1m
|
||||
pod/mysql-1-nkhqn 1/1 Running 0 4m
|
||||
|
||||
NAME DESIRED CURRENT READY AGE
|
||||
replicationcontroller/cakephp-mysql-example-1 1 1 1 1m
|
||||
replicationcontroller/mysql-1 1 1 1 4m
|
||||
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||
service/cakephp-mysql-example ClusterIP 172.30.234.135 <none> 8080/TCP 4m
|
||||
service/mysql ClusterIP 172.30.13.195 <none> 3306/TCP 4m
|
||||
|
||||
NAME REVISION DESIRED CURRENT TRIGGERED BY
|
||||
deploymentconfig.apps.openshift.io/cakephp-mysql-example 1 1 1 config,image(cakephp-mysql-example:latest)
|
||||
deploymentconfig.apps.openshift.io/mysql 1 1 1 config,image(mysql:5.7)
|
||||
|
||||
NAME TYPE FROM LATEST
|
||||
buildconfig.build.openshift.io/cakephp-mysql-example Source Git 1
|
||||
|
||||
NAME TYPE FROM STATUS STARTED DURATION
|
||||
build.build.openshift.io/cakephp-mysql-example-1 Source Git@47a951e Complete 4 minutes ago 2m27s
|
||||
|
||||
NAME DOCKER REPO TAGS UPDATED
|
||||
imagestream.image.openshift.io/cakephp-mysql-example docker-registry.default.svc:5000/example/cakephp-mysql-example latest About aminute ago
|
||||
|
||||
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
|
||||
route.route.openshift.io/cakephp-mysql-example cakephp-mysql-example-example.2886795271-80-rhsummit1.environments.katacoda.com cakephp-mysql-example <all> None
|
||||
```
|
||||
|
||||
The beauty of this is that you can delete Pods, watch the replication controllers recreate them, scale Pods up, and scale them down. You can play with the template and change it for other applications (which is what I did when I first started).
|
||||
|
||||
### 4\. Visual Studio Code
|
||||
|
||||
I saved one of my favorites for last. I use [vi][14] for most of my work, but I have never found a good syntax highlighter and code completion plugin for Kubernetes (if you have one, let me know). Instead, I have found that Microsoft's [VS Code][15] has a killer set of plugins that complete the creation of Kubernetes resources and provide boilerplate.
|
||||
|
||||
![VS Code plugins UI][16]
|
||||
|
||||
First, install Kubernetes and YAML plugins shown in the image above.
|
||||
|
||||
![Autocomplete in VS Code][17]
|
||||
|
||||
Then, you can create a new YAML file from scratch and get auto-completion of Kubernetes resources. The example above shows a Service.
|
||||
|
||||
![VS Code autocomplete filling in boilerplate for an object][18]
|
||||
|
||||
When you use autocomplete and select the Service resource, it fills in some boilerplate for the object. This is magnificent when you are first learning to drive Kubernetes. You can build Pods, Services, Replication Controllers, Deployments, etc. This is a really nice feature when you are building these files from scratch or even modifying the files you create with **Podman generate kube**.
|
||||
|
||||
### Conclusion
|
||||
|
||||
These four tools (six if you count the two plugins) will help you learn to drive Kubernetes, instead of building or equipping it. In my final article in the series, I will talk about why Kubernetes is so exciting for running so many different workloads.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/6/tools-drive-kubernetes
|
||||
|
||||
作者:[Scott McCarty][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/fatherlinux/users/fatherlinux/users/fatherlinux/users/fatherlinux
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_workshop_blue_mechanic.jpg?itok=4YXkCU-J (Tools in a workshop)
|
||||
[2]: https://opensource.com/article/19/6/kubernetes-basics
|
||||
[3]: https://learn.openshift.com/subsystems/container-internals-lab-2-0-part-1
|
||||
[4]: https://opensource.com/sites/default/files/uploads/openshift-playground.png (OpenShift Playground)
|
||||
[5]: https://learn.openshift.com/playgrounds/openshift311/
|
||||
[6]: https://opensource.com/sites/default/files/uploads/kubernetes-playground.png (Kubernetes Playground)
|
||||
[7]: https://katacoda.com/courses/kubernetes/playground
|
||||
[8]: https://katacoda.com/learn
|
||||
[9]: http://learn.openshift.com/
|
||||
[10]: https://podman.io/
|
||||
[11]: https://developers.redhat.com/blog/author/bbaude/
|
||||
[12]: https://github.com/containers/libpod/issues/2303
|
||||
[13]: https://developers.redhat.com/blog/2019/01/29/podman-kubernetes-yaml/
|
||||
[14]: https://en.wikipedia.org/wiki/Vi
|
||||
[15]: https://code.visualstudio.com/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/vscode_-_kubernetes_red_hat_-_plugins.png (VS Code plugins UI)
|
||||
[17]: https://opensource.com/sites/default/files/uploads/vscode_-_kubernetes_service_-_autocomplete.png (Autocomplete in VS Code)
|
||||
[18]: https://opensource.com/sites/default/files/uploads/vscode_-_kubernetes_service_-_boiler_plate.png (VS Code autocomplete filling in boilerplate for an object)
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (hopefully2333)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (MjSeven)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
@ -122,7 +122,7 @@ via: https://fedoramagazine.org/command-line-quick-tips-permissions/
|
||||
|
||||
作者:[Paul W. Frields][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[MjSeven](https://github.com/MjSeven)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,183 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Pipx – Install And Run Python Applications In Isolated Environments)
|
||||
[#]: via: (https://www.ostechnix.com/pipx-install-and-run-python-applications-in-isolated-environments/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
Pipx – Install And Run Python Applications In Isolated Environments
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
It is always recommended to install Python applications in Virtual Environments to avoid conflicts with one another. **Pip package manager** helps us to install Python applications in an isolated environments, using two tools namely **venv** and **virtualenv**. There is also another Python package manager named [**“Pipenv”**][2], which is recommended by Python.org, to install Python applications. Unlike Pip, Pipenv automatically creates virtual environments by default. Meaning – you don’t need to manually create virtual environments for your projects anymore. Today, I stumbled upon a similar tool named **“Pipx”** , a free and open source utility that allows you to install and run Python applications in an isolated virtual environments.
|
||||
|
||||
Using Pipx, we can easily install thousands of Python applications hosted in **PyPI** without much hassle. Good thing is you can do everything with regular user permissions. You need not to be “root” user or need not to have “sudo” permissions. It is worth mentioning that **Pipx can run a program from temporary environment** , without having to install it. This will be handy when you test multiple versions of same program often. The packages installed with Pipx can be listed, upgrade or uninstalled at any time. Pipx is a cross-platform application, so it can run on Linux, Mac OS and Windows.
|
||||
|
||||
### Install Pipx
|
||||
|
||||
**Python 3.6+** , **Pip** and **venv** module are required to install pipx. Make sure you have installed them as described in the following guide.
|
||||
|
||||
* [**How To Manage Python Packages Using Pip**][3]
|
||||
|
||||
|
||||
|
||||
Here, venv is needed to create virtual environments.
|
||||
|
||||
Next, run the following commands to install Pipx.
|
||||
|
||||
```
|
||||
$ python3 -m pip install --user pipx
|
||||
|
||||
$ python3 -m userpath append ~/.local/bin
|
||||
```
|
||||
|
||||
The default location of pipx’s binary is **~/.local/bin**. You can override this with the **PIPX_BIN_DIR** environment variable. If you override **PIPX_BIN_DIR** , just make sure it is on your path by running **userpath append $PIPX_BIN_DIR**.
|
||||
|
||||
And the default virtual environment location of Pipx is **~/.local/pipx**. This can be overridden with the environment variable **PIPX_HOME**.
|
||||
|
||||
Let us go ahead and see how to install Python applications using Pipx.
|
||||
|
||||
### Install And Run Python Applications In Isolated Environments Using Pipx
|
||||
|
||||
Here are few examples to getting started with Pipx.
|
||||
|
||||
##### Install Python packages
|
||||
|
||||
To install a Python application, for example **cowsay** , globally, run:
|
||||
|
||||
```
|
||||
$ pipx install cowsay
|
||||
```
|
||||
|
||||
This command will automatically create virtual environments, install the package in it and put the package executable file on your **$PATH**.
|
||||
|
||||
**Sample output:**
|
||||
|
||||
```
|
||||
installed package cowsay 2.0.3, Python 3.6.8
|
||||
These binaries are now globally available
|
||||
- cowsay
|
||||
done! ✨ 🌟 ✨
|
||||
```
|
||||
|
||||
![1][4]
|
||||
|
||||
Install Python Applications Using Pipx
|
||||
|
||||
Let us test newly installed cowsay program:
|
||||
|
||||
![1][5]
|
||||
|
||||
Here, I have taken the examples from official site. You can install/test any other Python package of your choice.
|
||||
|
||||
##### List Python packages
|
||||
|
||||
To list all installed applications using Pipx, run:
|
||||
|
||||
```
|
||||
$ pipx list
|
||||
```
|
||||
|
||||
Sample output:
|
||||
|
||||
```
|
||||
venvs are in /home/sk/.local/pipx/venvs
|
||||
binaries are exposed on your $PATH at /home/sk/.local/bin
|
||||
package cowsay 2.0.3, Python 3.6.8
|
||||
- cowsay
|
||||
```
|
||||
|
||||
If you have not installed any packages, you will see the following output:
|
||||
|
||||
```
|
||||
nothing has been installed with pipx 😴
|
||||
```
|
||||
|
||||
##### Upgrade Packages
|
||||
|
||||
To upgrade a package, simply do:
|
||||
|
||||
```
|
||||
$ pipx upgrade cowsay
|
||||
```
|
||||
|
||||
To upgrade all installed packages in one go, use:
|
||||
|
||||
```
|
||||
$ pipx upgrade-all
|
||||
```
|
||||
|
||||
##### Run a application from temporary virtual environments
|
||||
|
||||
At times, you might want to run a specific python program, but not actually install it.
|
||||
|
||||
```
|
||||
$ pipx run pycowsay moooo
|
||||
```
|
||||
|
||||
![1][6]
|
||||
|
||||
Run Python Applications In Temporary Isolated Virtual Environments
|
||||
|
||||
This command doesn’t actually install the given program, but run it from the temporary virtual environment. You can use this command for quickly testing a python application.
|
||||
|
||||
You can even run .py files directly as well.
|
||||
|
||||
```
|
||||
$ pipx run https://gist.githubusercontent.com/cs01/fa721a17a326e551ede048c5088f9e0f/raw/6bdfbb6e9c1132b1c38fdd2f195d4a24c540c324/pipx-demo.py
|
||||
pipx is working!
|
||||
```
|
||||
|
||||
##### Uninstall packages
|
||||
|
||||
A package can be uninstalled with command:
|
||||
|
||||
```
|
||||
$ pipx uninstall cowsay
|
||||
```
|
||||
|
||||
To remove all installed packages:
|
||||
|
||||
```
|
||||
$ pipx uninstall-all
|
||||
```
|
||||
|
||||
##### Getting help
|
||||
|
||||
To view help section, run:
|
||||
|
||||
```
|
||||
$ pipx --help
|
||||
```
|
||||
|
||||
And, that’s all. If you’re ever looking for a safe, convenient and reliable application to install and run Python applications, Pipx might be a good choice.
|
||||
|
||||
**Resource:**
|
||||
|
||||
* [**Pipx GitHub Repository**][7]
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/pipx-install-and-run-python-applications-in-isolated-environments/
|
||||
|
||||
作者:[sk][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.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/pipx-720x340.png
|
||||
[2]: https://www.ostechnix.com/pipenv-officially-recommended-python-packaging-tool/
|
||||
[3]: https://www.ostechnix.com/manage-python-packages-using-pip/
|
||||
[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Install-Python-Applications-Using-Pipx.png
|
||||
[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Test-Python-application.png
|
||||
[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Run-Python-Applications-In-Isolated-Environments.png
|
||||
[7]: https://github.com/pipxproject/pipx
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (WangYueScream)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Introducing kids to computational thinking with Python)
|
||||
[#]: via: (https://opensource.com/article/19/2/break-down-stereotypes-python)
|
||||
[#]: author: (Don Watkins https://opensource.com/users/don-watkins)
|
||||
|
||||
|
||||
利用 Python 引导孩子的计算机思维
|
||||
========================
|
||||
|
||||
编程可以给低收入家庭的学生提供足够的技能,信心和知识,进而让他们摆脱因为家庭收入低带来的经济和社会地位上的劣势。
|
||||
|
||||

|
||||
|
||||
尽管暑假期间底特律公共图书馆的[帕克曼分部][1]挤满了无聊的孩子并且占用了所有的电脑,图书馆工作人员并不觉得这会是个问题,反而更多是一个机会。他们成立一个名为 [Parkman Coders][2] 的编程社团,社团以 [Qumisha Goss][3] 为首,她是图书管理员,也负责利用 Python 的魔力引导弱势儿童的计算机思维。
|
||||
|
||||
四年前 [Qumisha Goss][3] 刚发起 Parkman Coders 计划的时候, “Q” 并不是太懂编程。之后她通过努力成为图书馆里教学和技术方面的专家和 Raspberry Pi 认证讲师。
|
||||
|
||||
社团最开始采用 [Scratch][4] 教学,但很快学生就对这种图形化的块编程感到乏味,他们觉得这就是个“婴儿玩具”。Q 坦言,“我们意识到是时候需要在课程内容这方面做些改变了,如果是为了维持课程内容对初学者的友好性继续选择 Scratch 教学,这无疑会影响孩子们后期继续保持对编程的关注。”因此,她开始教授孩子们 Python。
|
||||
|
||||
Q 是在 [Code.org][5] 平台玩地牢骷髅怪物这个关卡的时候第一次接触到 Python。她最开始是通过 [Python Programming: An Introduction to Computer Science][6] 和 [Python for Kids][7] 这两本书学习 Python。她也推荐 [Automate the Boring Stuff with Python][8] 和 [Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9] 这两本书。
|
||||
|
||||
|
||||
### 建立一个基于 Raspberry Pi 的创客空间
|
||||
|
||||
|
||||
Q 决定使用 [Raspberry Pi][10] 电脑来避免学生可能会因为自己的不当操作对图书馆的电脑造成损害,而且这些电脑因为便携性等问题也不方便用来构建组成一个创客空间。[Raspberry Pi][10] 的购买价格加上它的灵活性和便携性包括生态圈里面的一些适合教学的自由免费软件,让大家更能感受到她的决策的可行性和可靠性。
|
||||
|
||||
虽然图书馆发起 [Parkman Coders][2] 社区计划的本意是通过努力创造一个吸引孩子们的学习空间进而维持图书馆的平和,但社区发展的很快,很受大家欢迎以至于这座建立于 1921 的大楼的空间,电脑和插座都不够用了。他们最开始是 20 个孩子共享 10 台 [Raspberry Pi][10] 来进行授课,但后来图书馆陆续收到了来自个人和公司比如 Microsoft,4H,和 Detroit Public Library Foundation 的资金援助从而能够购买更多设备以支撑社区的进一步壮大发展。
|
||||
|
||||
目前,大概有 40 个孩子参加了每节课程而且图书馆也有了足够的 [Raspberry Pi][10] 让参与者人手一台设备甚至还可以分发出去。鉴于不少 [Parkman Coders][2] 的参与者来自于低收入家庭,图书馆也能提供别人捐赠的 Chromebooks 给他们使用。
|
||||
|
||||
Q 说,“当孩子们的表现可以证明他们能够很好的使用 [Raspberry Pi][10] 或者 [Microbit][11] 而且定期来参加课程,我们也会提供设备允许他们可以带回家练习。但即便这样也还是会遇到很多问题,比如他们在家无法访问网络或者没有显示器,键盘,鼠标等外设。”
|
||||
|
||||
### 利用 Python 学习生存技能,打破束缚
|
||||
|
||||
|
||||
Q 说,“我认为教授孩子们计算机科学的主要目的是让他们学会批判性思考和解决问题的能力。我希望随着孩子们长大成人,不管他们选择在哪个领域继续发展他们的未来,这些经验教训都会一直伴随他们成长。此外,我也希望这个课程能够激发孩子们对创造的自豪感。能够清楚的意识到‘这是我做的’是一种很强烈很有用的感受。而且一旦孩子们越早能够有这种成功的体验,我相信未来的路上他们都会满怀热情迎接新的挑战而不是逃避。”
|
||||
|
||||
她继续分享道,“在学习编程的过程中,你不得不对单词的拼写和大小写高度警惕。受限于孩子年龄,有时候阅读认知会是个大问题。为了确保课程受众的包容性,我们会在授课过程中大声拼读,同样我们也会极力鼓励孩子们大声说出他们不知道的或者不能正确拼写的单词,以便我们纠正。”
|
||||
|
||||
Q 也会尝试尽力去给需要帮助的孩子们更多的关注。她解释道,“如果我确认有孩子遇到困难不能跟上我们的授课进度,我们会尝试在课下时间安排老师辅导帮助他,但还是会允许他们继续参加编程。我们想到帮助到他们而不是让他们因为挫败而沮丧的不在参与进来。”
|
||||
|
||||
最重要的是, [Parkman Coders][2] 计划所追求的是能够帮助每个孩子认识到每个人都会有独特的技能和能力。参与进来的大部分孩子都是非裔美国人,一半是女孩。Q 直言,“我们所生活在的这个世界,我们成长的过程中,伴随着各种各种的社会偏见,这些都常常会限制我们对自己所能达到的成就的准确认知。”她坚信孩子们需要一个没有偏见的空间,“他们可以尝试很多新事物,不会因为担心犯错责骂而束手束脚,可以放心大胆的去求知探索。”
|
||||
|
||||
Q 和 [Parkman Coders][2] 计划所营造的环境氛围能够帮助到参与者摆脱低家庭收入带来的劣势。如果说社区能够发展壮大到今天的规模真有什么独特秘诀的话,那大概就是,Q 解释道,“确保你有一个令人舒适的空间,充满了理解与宽容,这样大家才会被吸引过来。让来的人不忘初心,做好传道受业解惑的准备;当大家参与进来并感觉到充实愉悦,自然而然会想要留下来。”
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/2/break-down-stereotypes-python
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[WangYueScream](https://github.com/WangYueScream)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://detroitpubliclibrary.org/locations/parkman
|
||||
[2]: https://www.dplfound.org/single-post/2016/05/15/Parkman-Branch-Coders
|
||||
[3]: https://www.linkedin.com/in/qumisha-goss-b3bb5470
|
||||
[4]: https://scratch.mit.edu/
|
||||
[5]: http://Code.org
|
||||
[6]: https://www.amazon.com/Python-Programming-Introduction-Computer-Science/dp/1887902996
|
||||
[7]: https://nostarch.com/pythonforkids
|
||||
[8]: https://automatetheboringstuff.com/
|
||||
[9]: https://nostarch.com/laurenipsum
|
||||
[10]: https://www.raspberrypi.org/
|
||||
[11]: https://microbit.org/guide/
|
@ -0,0 +1,184 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Pipx – Install And Run Python Applications In Isolated Environments)
|
||||
[#]: via: (https://www.ostechnix.com/pipx-install-and-run-python-applications-in-isolated-environments/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
Pipx - 在隔离环境中安装和运行 Python 应用
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
始终建议在虚拟环境中安装 Python 应用以避免彼此冲突。**Pip 包管理器**帮助我们在隔离的环境中安装 Python 应用,我们使用两个工具,即 **venv** 和 **virtualenv**。还有一个 Python.org 推荐的名为 [**“Pipenv”**][2] 的 Python 包管理器用来安装 Python 应用。与 Pip 不同,Pipenv 默认自动创建虚拟环境。这意味着你不再需要为项目手动创建虚拟环境。今天,我偶然发现了一个名为 **“Pipx”** 的类似工具,它是一个免费的开源程序,允许你在隔离的虚拟环境中安装和运行 Python 应用。
|
||||
|
||||
使用 Pipx,我们可以轻松安装 **PyPI** 中托管的数千个 Python 应用,而不会有太多麻烦。好的是,你可以使用常规用户权限执行所有操作。你不需要成为 “root” 用户或不需要具有 “sudo” 权限。值得一提的是,**Pipx 可以从临时环境**运行程序,而无需安装它。当你经常测试同一程序的多个版本时,这将非常方便。随 Pipx 一起安装的软件包可以随时列出,升级或卸载。Pipx 是一个跨平台的程序,因此它可以在 Linux、Mac OS 和 Windows 上运行。
|
||||
|
||||
|
||||
### 安装 Pipx
|
||||
|
||||
**Python 3.6+ **、** Pip** 和 **venv** 模块是安装 pipx 所必需的。确保按照以下指南中的说明安装它们。
|
||||
|
||||
* [**如何使用 Pip 管理 Python 包**][3]
|
||||
|
||||
|
||||
|
||||
此处,需要 venv 来创建虚拟环境。
|
||||
|
||||
接下来,运行以下命令安装 Pipx。
|
||||
|
||||
```
|
||||
$ python3 -m pip install --user pipx
|
||||
|
||||
$ python3 -m userpath append ~/.local/bin
|
||||
```
|
||||
|
||||
pipx 二进制文件的默认位置是 **~/.local/bin**。你可以使用 **PIPX_BIN_DIR** 环境变量覆盖它。如果要覆盖 **PIPX_BIN_DIR**,只需运行 **userpath append $PIPX_BIN_DIR** ,确保它在你的路径中。
|
||||
|
||||
Pipx 的默认虚拟环境位置是 **~/.local/pipx**。这可以用环境变量 **PIPX_HOME** 覆盖。
|
||||
|
||||
让我们继续看看如何使用 Pipx 安装 Python 应用。
|
||||
|
||||
### 使用 Pipx 在隔离环境中安装和运行 Python 应用
|
||||
|
||||
以下是 Pipx 入门的几个例子
|
||||
|
||||
##### 安装 Python 包
|
||||
|
||||
要全局安装 Python 应用,例如 **cowsay**,请运行:
|
||||
|
||||
```
|
||||
$ pipx install cowsay
|
||||
```
|
||||
|
||||
此命令将自动创建虚拟环境,在其中安装包并包的可执行文件放在 **$PATH** 中。
|
||||
|
||||
**示例输出:**
|
||||
|
||||
```
|
||||
installed package cowsay 2.0.3, Python 3.6.8
|
||||
These binaries are now globally available
|
||||
- cowsay
|
||||
done! ✨ 🌟 ✨
|
||||
```
|
||||
|
||||
![1][4]
|
||||
|
||||
使用 Pipx 安装 Python 应用
|
||||
|
||||
让我们测试新安装的 cowsay 程序:
|
||||
|
||||
![1][5]
|
||||
|
||||
在这里,我从官方网站上摘取了这些例子。你可以安装/测试任何其他的 Python 包。
|
||||
|
||||
##### 列出 Python 包
|
||||
|
||||
要使用 Pipx 列出所有已安装的应用,请运行:
|
||||
|
||||
```
|
||||
$ pipx list
|
||||
```
|
||||
|
||||
示例输出:
|
||||
|
||||
```
|
||||
venvs are in /home/sk/.local/pipx/venvs
|
||||
binaries are exposed on your $PATH at /home/sk/.local/bin
|
||||
package cowsay 2.0.3, Python 3.6.8
|
||||
- cowsay
|
||||
```
|
||||
|
||||
如果你尚未安装任何软件包,你将看到以下输出:
|
||||
|
||||
```
|
||||
nothing has been installed with pipx 😴
|
||||
```
|
||||
|
||||
##### 升级包
|
||||
|
||||
要升级包,只需执行以下操作:
|
||||
|
||||
```
|
||||
$ pipx upgrade cowsay
|
||||
```
|
||||
|
||||
要一次性升级所有已安装的软件包,请使用:
|
||||
|
||||
```
|
||||
$ pipx upgrade-all
|
||||
```
|
||||
|
||||
##### 从临时虚拟环境运行应用
|
||||
|
||||
有时,你可能希望运行特定的 python 程序,但并不实际安装它。
|
||||
|
||||
```
|
||||
$ pipx run pycowsay moooo
|
||||
```
|
||||
|
||||
![1][6]
|
||||
|
||||
在临时隔离虚拟环境中运行 Python 应用
|
||||
|
||||
此命令实际上并不安装指定程序,而是从临时虚拟环境运行它。你可以使用此命令快速测试 python 应用。
|
||||
|
||||
你甚至可以直接运行 .py 文件。
|
||||
|
||||
```
|
||||
$ pipx run https://gist.githubusercontent.com/cs01/fa721a17a326e551ede048c5088f9e0f/raw/6bdfbb6e9c1132b1c38fdd2f195d4a24c540c324/pipx-demo.py
|
||||
pipx is working!
|
||||
```
|
||||
|
||||
##### 卸载软件包
|
||||
|
||||
可以使用以下命令卸载软件包:
|
||||
|
||||
```
|
||||
$ pipx uninstall cowsay
|
||||
```
|
||||
|
||||
要删除所有已安装的包:
|
||||
|
||||
```
|
||||
$ pipx uninstall-all
|
||||
```
|
||||
|
||||
##### 获得帮助
|
||||
|
||||
要查看帮助部分,请运行:
|
||||
|
||||
```
|
||||
$ pipx --help
|
||||
```
|
||||
|
||||
就是这些了。如果你一直在寻找安全,方便和可靠的程序来安装和运行 Python 应用,Pipx 可能是一个不错的选择。
|
||||
|
||||
**资源:**
|
||||
|
||||
* [**Pipx 的 GitHub 仓库**][7]
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/pipx-install-and-run-python-applications-in-isolated-environments/
|
||||
|
||||
作者:[sk][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.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/pipx-720x340.png
|
||||
[2]: https://www.ostechnix.com/pipenv-officially-recommended-python-packaging-tool/
|
||||
[3]: https://www.ostechnix.com/manage-python-packages-using-pip/
|
||||
[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Install-Python-Applications-Using-Pipx.png
|
||||
[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Test-Python-application.png
|
||||
[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Run-Python-Applications-In-Isolated-Environments.png
|
||||
[7]: https://github.com/pipxproject/pipx
|
@ -1,28 +1,27 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Make an RGB cube with Python and Scribus)
|
||||
[#]: via: (https://opensource.com/article/19/7/rgb-cube-python-scribus)
|
||||
[#]: author: (Greg Pittman https://opensource.com/users/greg-p/users/greg-p)
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "zianglei"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: subject: "Make an RGB cube with Python and Scribus"
|
||||
[#]: via: "https://opensource.com/article/19/7/rgb-cube-python-scribus"
|
||||
[#]: author: "Greg Pittman https://opensource.com/users/greg-p/users/greg-p"
|
||||
|
||||
Make an RGB cube with Python and Scribus
|
||||
使用 Python 和 Scribus 创建一个 RGB 立方体
|
||||
======
|
||||
Create a 3D cube that shows the RGB color spectrum with Scribus' Python
|
||||
Scripter capability.
|
||||
使用 Scribus 的 Python 脚本功能,开发一个显示 RGB 色谱的 3D 立方体。
|
||||
![cubes coming together to create a larger cube][1]
|
||||
|
||||
When I decided I wanted to play with color this summer, I thought about the fact that colors are usually depicted on a color wheel. This is usually with pigment colors rather than light, and you lose any sense of the variation in color brightness or luminosity.
|
||||
当我决定这个夏天要玩色彩游戏时,我想到通常色彩都是在色轮上描绘的。这些色彩通常都是使用色素而不是光,并且你失去了任何对颜色亮度或光度变化的感觉。
|
||||
|
||||
As an alternative to the color wheel, I came up with the idea of displaying the RGB spectrum on the surfaces of a cube using a series of graphs. RGB values would be depicted on a three-dimensional graph with X-, Y-, and Z-axes. For example, a surface would keep B (or blue) at 0 and the remaining axes would show what happens as I plot values as colors for R (red) and G (green) from 0 to 255.
|
||||
作为色轮的替代,我想在立方体表面使用一系列图形来显示 RGB 频谱。色彩的 RGB 值将在具有 X-、Y-、Z- 轴的三位图形上展示。例如,一个平面将会保持 B(或蓝色)为 0,其余的坐标轴将显示当我将 R(红色)和 G (绿色)的值从 0 绘制到 255 时发生的情况。
|
||||
|
||||
It turns out this is not very difficult to do using [Scribus][2] and its [Python Scripter][3] capability. I can create RGB colors, make rectangles showing the colors, and arrange them in a 2D format. I decided to make value jumps of 5 for the colors and make rectangles measuring 5 points on a side. Thus, for each 2D graph, I would make about 250 colors, and the cube would measure 250 points to a side, or 3.5 inches.
|
||||
事实证明,使用 [Scribus][2] 及其 [Python 脚本编写器][3] 功能实现这一点并不困难。我可以创建 RGB 颜色,使矩形显示颜色,并以 2D 格式排列它们。我决定设置颜色值的间隔为 5,并让矩形一边测量 5 个点。因此,对于每个 2D 图形,我将使用大约 250 种颜色,立方体一边测量 250 个点,也就是 3.5 英寸。
|
||||
|
||||
I used this bit of Python code to accomplish that task for the Green–Red graph:
|
||||
我使用下面这段 Python 代码完成了绿 - 红图的任务
|
||||
|
||||
|
||||
```
|
||||
```python
|
||||
x = 300
|
||||
y = 300
|
||||
r = 0
|
||||
@ -30,8 +29,8 @@ g = 0
|
||||
b = 0
|
||||
|
||||
if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.UNIT_POINTS, scribus.NOFACINGPAGES, scribus.FIRSTPAGERIGHT):
|
||||
while r < 256:
|
||||
while g < 256:
|
||||
while r < 256:
|
||||
while g < 256:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '0_0_0':
|
||||
newcolor = 'Black'
|
||||
@ -45,40 +44,40 @@ if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1,
|
||||
y = y – 5
|
||||
```
|
||||
|
||||
This script starts the graphical structure at **300, 300**, which is about the middle of a US Letter-size page horizontally and maybe a third of the way down from the top; this is the origin of the graph. Then it builds the graph horizontally along the X-axis (the Green value), then returns to the Y-axis, jumps up the page 5 points, and makes another line of rectangles.
|
||||
这个脚本在 **300,300** 位置开始绘制图形,这个位置大约是一个美国信件大小的纸张的水平中心,大概是垂直方向从顶部到底的三分之一位置;这是图像的原点,然后它沿着 X 轴(绿色值)水平构建图形,然后返回到 Y 轴,向上走 5 个点,然后绘制下一条矩形线。
|
||||
|
||||
![Red-Green graph][4]
|
||||
|
||||
That looks easy enough; I'll just fiddle with the numbers and make the other sides. But this isn't just a matter of making two more graphs, one with Blue–Green and another with Red–Blue. I had in mind to create an unfolded cube so I could print it, cut it, fold it, and create a 3D view of RGB. Therefore, the next part (going down the page) needs to have the origin (the Black corner) at the upper left, with Green horizontally and Blue vertically increasing downward.
|
||||
这看起来很简单;我只需要调整一下数字就可以把立方体的另一边画出来。但这不仅仅是再画两个图,一个是蓝 - 绿色,另一个是红 - 蓝色的问题。我想创建一个展开的立方体,这样我就可以打印、剪开然后折叠它,创建一个 RGB 的 3D 视图。因此,下一部分(向下的页面)的原点(黑色的角落)需要在左上角,其水平方向是绿色,垂直方向是蓝色。
|
||||
|
||||
"Fiddling with the numbers" ended up being more or less trial and error to get what I wanted. After creating the second graph, I needed the third one, for Red–Blue, to have the origin in the upper left corner with Red increasing to the left and Blue increasing downward.
|
||||
“调整数字”最终或多或少变成了试错,从而得到我想要的东西。在创建了第二个图之后,我需要第三个图,它是红 - 蓝色的,原点位于左上角,红色向左递增,蓝色向下递增。
|
||||
|
||||
Here it is:
|
||||
下面是最终效果图:
|
||||
|
||||
![First half of RGB cube][5]
|
||||
|
||||
Of course, this is just the first half of this cube. I needed to make a similar shape, except that the origins should be White (rather than Black) to represent the high values. It's one of those times when I wish I were smarter, since not only did I need to make a similar overall shape, it needed to interface with the first shape in a mirror-image sort of way (I think). Sometimes trial and error is the only friend you have.
|
||||
当然,这只是这个立方体的前半部分。我需要做一个类似的形状,除了原点应该是白色(而不是黑色)来表示高值。这是我希望自己更聪明的时候之一,因为我不仅需要做出一个类似的整体形状,还需要以镜像的方式与第一个形状交互(我认为)。有时候,尝试和错误是你唯一的朋友。
|
||||
|
||||
Here is how that came out; I used a separate script since there wasn't enough space on a US Letter-sized page for both of them:
|
||||
结果是这样的;我使用了一个单独的脚本,因为在一个美国信件大小的页面上没有足够的空间同时容纳这两个图案。
|
||||
|
||||
![Second half of RGB cube][6]
|
||||
|
||||
Now, it's off to the printer! This is where you get a sense of how well your color printer does with RGB to CMYK transformation as well as other aspects of printing color-dense spaces.
|
||||
现在,是时候轮到打印机了!在这里,你可以直观了解彩色打印机如何处理 RGB 颜色到 CMYK 颜色的转换以及打印颜色密集空间。
|
||||
|
||||
Next, boys and girls, it's cut-and-paste time! I could use tape, but I didn't want to change the appearance of the surfaces, so I left some tabs along the sides while cutting so I could glue them on the inside. From experience, I can say that printing on copy paper comes out with some undesirable wrinkles, so after my copy paper prototype, I printed the cube on heavier paper with a matte finish.
|
||||
接下来,朋友们,是剪切粘贴时间!我可以用胶带,但我不想改变表面的外观,所以我在切割的时候在两边留下了一些空间,这样我就可以把它们粘在里面了。根据我的经验,在复印纸上打印会产生一些不需要的皱纹,所以在我的复印纸原型完成后,我把立方体打印在了更厚的纸上,表面是哑光的。
|
||||
|
||||
![RGB cubes][7]
|
||||
|
||||
Keep in mind this is just a view of the boundaries of the RGB space; to be more accurate, you would have to make a solid cube that you could slice in the middle. For example, this would be a slice through a solid RGB cube where Blue = 120:
|
||||
请记住,这只是 RGB 空间边界的一个视图;更准确地说,你必须做出一个可以在中间切片的实心立方体。例如,这是一个实心 RGB 立方体在蓝色 = 120 的切片。
|
||||
|
||||
![RGB cube slice][8]
|
||||
|
||||
In the end, I had fun doing this project. In case you want to join the party, here are the two scripts.
|
||||
最后,我做这个项目很开心。如果您也想参与其中,这里有两个脚本。
|
||||
|
||||
Here's the first half:
|
||||
这是前半部分 :
|
||||
|
||||
|
||||
```
|
||||
```python
|
||||
#!/usr/bin/env python
|
||||
# black2rgb.py
|
||||
"""
|
||||
@ -94,8 +93,8 @@ g = 0
|
||||
b = 0
|
||||
|
||||
if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.UNIT_POINTS, scribus.NOFACINGPAGES, scribus.FIRSTPAGERIGHT):
|
||||
while r < 256:
|
||||
while g < 256:
|
||||
while r < 256:
|
||||
while g < 256:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '0_0_0':
|
||||
newcolor = 'Black'
|
||||
@ -112,8 +111,8 @@ if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.U
|
||||
g = 0
|
||||
y = 305
|
||||
|
||||
while b < 256:
|
||||
while g < 256:
|
||||
while b < 256:
|
||||
while g < 256:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '0_0_0':
|
||||
newcolor = 'Black'
|
||||
@ -132,8 +131,8 @@ if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.U
|
||||
x = 39
|
||||
b = 0
|
||||
|
||||
while b < 256:
|
||||
while r >= 0:
|
||||
while b < 256:
|
||||
while r >= 0:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '0_0_0':
|
||||
newcolor = 'Black'
|
||||
@ -152,10 +151,10 @@ scribus.setRedraw(True)
|
||||
scribus.redrawAll()
|
||||
```
|
||||
|
||||
Now the second half:
|
||||
后半部分:
|
||||
|
||||
|
||||
```
|
||||
```python
|
||||
#!/usr/bin/env python
|
||||
# white2rgb.py
|
||||
"""
|
||||
@ -171,8 +170,8 @@ g = 255
|
||||
b = 255
|
||||
|
||||
if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.UNIT_POINTS, scribus.NOFACINGPAGES, scribus.FIRSTPAGERIGHT):
|
||||
while g >= 0:
|
||||
while r >= 0:
|
||||
while g >= 0:
|
||||
while r >= 0:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '255_255_255':
|
||||
newcolor = 'White'
|
||||
@ -189,8 +188,8 @@ if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.U
|
||||
g = 255
|
||||
y = 305
|
||||
|
||||
while b >= 0:
|
||||
while r >= 0:
|
||||
while b >= 0:
|
||||
while r >= 0:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '255_255_255':
|
||||
newcolor = 'White'
|
||||
@ -209,8 +208,8 @@ if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.U
|
||||
x = 39
|
||||
b = 255
|
||||
|
||||
while b >= 0:
|
||||
while g < 256:
|
||||
while b >= 0:
|
||||
while g < 256:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '255_255_255':
|
||||
newcolor = 'White'
|
||||
@ -227,7 +226,7 @@ scribus.setRedraw(True)
|
||||
scribus.redrawAll()
|
||||
```
|
||||
|
||||
Since I was creating a large number of colors, I wasn't surprised to see that the Scribus file is much larger than the PDF I made from it. For example, my Scribus SLA file was 3.0MB, while the PDF I generated from it was only 70KB.
|
||||
由于我创建了大量的颜色,所以当看到 Scribus 文件比我用它创建的 PDF 文件大得多的时候,我并不感到惊讶。例如,我的 Scribus SLA 文件是 3.0MB,而从中生成的 PDF 只有 70KB。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -235,18 +234,18 @@ via: https://opensource.com/article/19/7/rgb-cube-python-scribus
|
||||
|
||||
作者:[Greg Pittman][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[zianglei](https://github.com/zianglei)
|
||||
校对:[校对者 ID](https://github.com/ 校对者 ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/greg-p/users/greg-p
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cube_innovation_process_block_container.png?itok=vkPYmSRQ (cubes coming together to create a larger cube)
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cube_innovation_process_block_container.png?itok=vkPYmSRQ "cubes coming together to create a larger cube"
|
||||
[2]: https://www.scribus.net/
|
||||
[3]: https://opensource.com/sites/default/files/ebooks/pythonscriptingwithscribus.pdf
|
||||
[4]: https://opensource.com/sites/default/files/uploads/redgreengraph.png (Red-Green graph)
|
||||
[5]: https://opensource.com/sites/default/files/uploads/rgbcubefirsthalf.png (First half of RGB cube)
|
||||
[6]: https://opensource.com/sites/default/files/uploads/rgbcubesecondhalf.png (Second half of RGB cube)
|
||||
[7]: https://opensource.com/sites/default/files/uploads/rgbcubecompositephoto.png (RGB cubes)
|
||||
[8]: https://opensource.com/sites/default/files/uploads/rgbcubeslice.png (RGB cube slice)
|
||||
[4]: https://opensource.com/sites/default/files/uploads/redgreengraph.png "Red-Green graph"
|
||||
[5]: https://opensource.com/sites/default/files/uploads/rgbcubefirsthalf.png "First half of RGB cube"
|
||||
[6]: https://opensource.com/sites/default/files/uploads/rgbcubesecondhalf.png "Second half of RGB cube"
|
||||
[7]: https://opensource.com/sites/default/files/uploads/rgbcubecompositephoto.png "RGB cubes"
|
||||
[8]: https://opensource.com/sites/default/files/uploads/rgbcubeslice.png "RGB cube slice"
|
Loading…
Reference in New Issue
Block a user