Redirecting to contact.huangshiyang.com ... Read More | Share it now!
How to trigger a Kubernetes cronjob manually
What should you do when you’ve developed and installed a cron job for your Kubernetes application, and you need to test it? When writing classic cron jobs in Unix, it’s obvious how to test the job- just manually run the command specified in the... Read More | Share it now!
python终止线程
可以通过以下方式来终止线程: 通过抛出异常来终止进程 通过一个终止标志来终止进程 使用traces来终止进程 使用多线程模型来终止进程 通过将进程设置为deamon来终止进程 使用隐藏属性_stop() 通过抛出异常来终止进程 运行以上程序,一旦raise_exception()被调用,run()函数将被终止。这是因为程序抛出异常,将不在try…finally…函数块中运行,run()函数即被终止。 2.通过一个终止标志来终止进程 以上代码中,一旦全局变量stop_threads被置位,run()函数将终止,对应t1线程将因为t1.join()被终止。如果不使用全局变量,可以采用下面方式。 上面代码中传递的函数对象始终返回局部变量stop_threads的值。... Read More | Share it now!
python2 python3 hash() function
python2 的hash function是固定值 python3的hash function每次重启都不一样的值 用py27hash.hash 库来进行python2的hash。 ... Read More | Share it now!
htop
Most people familiar with Linux have used the top command line utility to see what process is taking the most CPU or memory. There’s a similar utility called htop that is much easier to use for normal tasks. The first great thing about htop... Read More | Share it now!
Fakeapp
参考文章 https://jingyan.baidu.com/article/414eccf68706766b431f0af4.html 首先确认自己的机器能不能带的动fakeapp,显卡的显存要达到4GB,因为al换脸软件对GPU要求很高,显存低于4GB的话可能会带不起来软件的。内存要求至少要8GB,如果你的机器内存少于8GB,建议再加个内存条。 然后我们开始下载软件和相关的插件,首先下载fakeapp,在网上搜索就能下载,但是不是这一个软件就可以al换脸的,不然直接打开软件会提示你需要安装插件不能使用。然后我们搜索下载安装cuda9.0。 下载地址:https://developer.nvidia.com/cuda-90-download-archive 然后在网上下载core文件然后解压缩在fakeapp的目录里面,还需要下载vc++算法程序,一般来说系统自己会带有的。然后打开命令指示符,输入pip... Read More | Share it now!
k6
Installation Linux Debian/Ubuntu ⚠️ If you are behind a firewall or proxy There have been reports of users being unable to download the key from Ubuntu’s keyserver using apt-key command due to firewalls or proxies blocking... Read More | Share it now!
Helm install
This guide shows how to install the Helm CLI. Helm can be installed either from source, or from pre-built binary releases. From The Helm Project The Helm project provides two ways to fetch and install Helm. These are the official methods to get Helm... Read More | Share it now!
Secrets
Kubernetes secrets by example You don’t want sensitive information such as a database password or an API key kept around in clear text. Secrets provide you with a mechanism to use such information in a safe and reliable way with the following... Read More | Share it now!
Cross-Compiling Golang …
Compiling your go code into a binary is pretty simple: This will build the binary for your current OS and architecture. But compiling binaries for other operating systems and even architectures is also possible. You just need to modify a few... Read More | Share it now!