Tmux——终端复用神器
Tmux是终端复用器(terminal multiplexer)的缩写。通过启动Tmux会话,然后在该会话中打开多个窗口,并且分屏形成矩形窗格,执行不同操作,能极大提高终端操作效率。tmux支持的特性有:
- 支持创建任意数量的窗口(window)
- 支持同一个窗口创建任意数量的窗格(panel)
- 支持垂直或水平分割窗口,并可以任意调整窗格大小
- 支持会话分离和重连
- 允许用户之间进行会话分享
Tmux是终端复用器(terminal multiplexer)的缩写。通过启动Tmux会话,然后在该会话中打开多个窗口,并且分屏形成矩形窗格,执行不同操作,能极大提高终端操作效率。tmux支持的特性有:
Supervisor是用于监控和管理类UNIX操作下进程的C/S系统。Supervisor不是作为进程id为1的init的替代,它只是用来控制应用程序的进程,它会跟其他进程开机启动时候一样,通过pid为1的进程启动。为了高可用,它本身也需要监控。
Supervisor的构成有4部分:
supervisord
supervisord是Supervisor的守护进程,是C/S中S端,它响应客户端的命令,监控,重启奔溃异常退出的子进程,以及记录子进程的stdout和stderr等。supervisord默认配置文件是/etc/supervisord.conf
supervisorctl
supervisorctl是Supervisor的命令行客户端,supervisorctl工作原理是发送命令给supervisord,来对其他进程的启动,关闭等操作
Web Server
Supervisor也支持web形式客户端
XML-RPC Interface
Supervisor提供了XML-RPC接口,通过此接口,我们可以询问和控制supervisor
PHP从5.6 跳过6直接来到7,带来新的语言特性,更带来性能很大飞越。根据w3techs统计截止截止2019年5月18月有79%网站使用PHP做为服务端开发语言,这些网站使用的PHP版本统计如下:
前几日个人网站无法打开,自搭科学上网工具也无法使用。原本以为是服务器ip被封,后来查看服务器能正常登陆,cpu和内存等负载正常范围,但按tab键命令提示和创建文件时候,提示No space left on device。
Jupyter Notebook 是科学计算必备工具之一,它是一个开源的web应用程序,允许你创建和共享实时代码,可以用来进行数据清理和转换、统计建模、数据可视化、机器学习等等工作。

下面是使用supervisour和nginx来部署公开jupyter notebook服务过程。
推荐python3环境下安装jupyter。我系统是Ubuntu 18.04里面内置了python3,所以直接安装jupyter,如果系统python版本是python2.7,可以使用virtualenvwrapper进行多版本python管理。
下面使用pip来安装jupyter notebook
9月份时候由于工作中涉及到大数据统计分析内容,研究了spark使用,10月份时候把研究内容在小组内简单做了一次分享。现在把分享的PPT贴出,分享过程中也涉及到真实项目使用spark演示,这部分为未贴出。

下面是我在使用docker过程中遇到的一些问题以及解答,现记录下来备查。
<none>:</none>镜像,有的删除不掉,有些却删除不掉?我们执行命令docker images -a有时候会发现不少docker rmi image_name删除这些none镜像时候,有时候能够成功,有时候却不能成功。这究竟为什么?
我们知道镜像是分层的,上面一层依赖下一层,下一层是上一次的父镜像层。就像下面这样:

我们可以通过docker inspect查看镜像ID 和父层镜像ID
最近看了《Better PHP Development》一书,里面第6章专门讲了crontab使用指南,事无巨细,几乎涉及到crontab用法的方方面面。一直以为以为自己对crontab用法非常熟悉了,看完之后才发现有些地方之前确实不知道。现把书中重要内容记录到博客中,以便后续查阅。
cron是类Unix操作系统中基于时间的作业调度器,它会在未来某个时刻触发某些任务。这个名字源于希腊语“χρόνος”( chronos ),意思是时间。由于crontab命令是使用cron时候最常用的命令,所以我们通常会说crontab,其实也就是cron。
如果我们查看/etc目录,我们可以看到cron.hourly, cron.daily, cron.weekly 和cron.monthly这样的目录,每个目录都对应于特定的执行频率。比如cron.hourly目录下面的脚本会按照每小时来执行。安排任务的一种方式是将脚本放在相对应的目录中。例如,为了每天运行db_backup.php,我们将它放在cron.daily中。若没有这个目录,我们需要手动创建cron.daily。
原文地址:Comprehensive Introduction to Apache Spark, RDDs & Dataframes (using PySpark)
Industry estimates that we are creating more than 2.5 Quintillion bytes of data every year.
Think of it for a moment – 1 Qunitillion = 1 Million Billion! Can you imagine how many drives / CDs / Blue-ray DVDs would be required to store them? It is difficult to imagine this scale of data generation even as a data science professional. While this pace of data generation is very exciting, it has created entirely new set of challenges and has forced us to find new ways to handle Big Huge data effectively.

原文地址:Using PySpark to perform Transformations and Actions on RDD
In my previous article, I introduced you to the basics of Apache Spark, different data representations (RDD / DataFrame / Dataset) and basics of operations (Transformation and Action). We even solved a machine learning problem from one of our past hackathons. In this article, I will continue from the place I left in my previous article. I will focus on manipulating RDD in PySpark by applying operations (Transformation and Actions).
As you would remember, a RDD (Resilient Distributed Database) is a collection of elements, that can be divided across multiple nodes in a cluster to run parallel processing. It is also a fault tolerant collection of elements, which means it can automatically recover from failures. RDD is immutable, i.e. once created, we can not change a RDD. So, then how do I apply operations on a RDD? Well, we apply an operation and store results in another RDD
For this article, one must have some understanding about Apache Spark and hands on experience in python programming.