摘要: 自己本地搭建了个k8s集群后,因为没有设置本地仓库,以至于每次打包好的镜像服务都需要每个节点传一遍,很不方便,于是自己搭建了一个本地仓库供k8s集群使用。 1.拉取仓库容器镜像 docker pull registry 2.修改/etc/docker/daemon.json { "exec-opts 阅读全文
posted @ 2020-10-18 20:41 有虫子啊 阅读(2099) 评论(0) 推荐(0) 编辑
摘要: 最近考试有考过几次,便仔细瞧瞧了这是何物。 我理解其中核心的点就在于,当一个观察者观察到发生了改变,不仅他自身要进行更新,其余所有的观察者都将被通知到并进行更新。 代码实现如下: from abc import ABCMeta, abstractmethod class Subject(object 阅读全文
posted @ 2020-09-08 23:58 有虫子啊 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 最近想整合一下自己所做的项目,于是需要一个文件服务器来承载项目中所有文件的持久化,以及可视化。 有兴趣可以瞧瞧,其中包含python,java作为后端,k8s+docker服务打包,vue作为前端: https://github.com/oneInsect/magic-box 其中 文件上传作为核心 阅读全文
posted @ 2020-09-05 23:45 有虫子啊 阅读(908) 评论(0) 推荐(0) 编辑
摘要: 1.准备三个节点192.168.1.188 centos01192.168.1.189 centos02192.168.1.190 centos03 2.关闭防火墙systemctl stop firewalld 3.关闭selinuxsetenforce 0 4.关闭swapswapoff -ao 阅读全文
posted @ 2020-08-28 23:58 有虫子啊 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 前段时间看了下flask的源码,对于这样一个轻量级的web框架是怎样支持多线程的感到非常好奇,于是深入了解了一番。 flask是依赖werkeug来实现线程间的隔离的,而werkeug最后又使用到了python的内置模块locals来承载数据,看不如写,于是自己实现了一下。 from threadi 阅读全文
posted @ 2020-07-20 22:53 有虫子啊 阅读(614) 评论(0) 推荐(0) 编辑
摘要: 一、总体优化思路 首先构建脚本观察查询数,连接数等数据,确定环境原因以及内部SQL执行原因,然后根据具体原因做具体处理。 二、构建脚本观察状态 mysqladmin -uroot -p ext \G 该命令可获取当前查询数量等信息,定时轮询并将结果重定向到文本中,然后处理成图表。 三、处理对策 1. 阅读全文
posted @ 2019-12-23 21:15 有虫子啊 阅读(584) 评论(0) 推荐(0) 编辑
摘要: Recently, I was writing module of feature engineering, i found two excellently packages -- tsfresh and sklearn. tsfresh has been specialized for data 阅读全文
posted @ 2019-05-27 23:25 有虫子啊 阅读(384) 评论(0) 推荐(0) 编辑
摘要: I find three methods, the first is using jython, the module of jython can transform the type of data between Python and java,so you can define the jav 阅读全文
posted @ 2019-05-21 23:13 有虫子啊 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Recently, I was made a service which can provide a simple way to get best model. so, i spent lot of time to read source code of auto-sklearn, auto-skl 阅读全文
posted @ 2019-05-17 23:15 有虫子啊 阅读(986) 评论(0) 推荐(0) 编辑
摘要: 决策树的ID3算法基于信息增益来选择最优特征,于是自己实现了一把,直接上代码。 C4.5算法是基于信息增益率来选择最优特征的,即在ID3算法基础上再求出信息增益率即可,将信息增益除以基于label的特征X的熵。 此处就不再给出实现代码,自己实现一遍意在加深理解。 阅读全文
posted @ 2019-03-04 20:53 有虫子啊 阅读(641) 评论(0) 推荐(0) 编辑