摘要: 1: 在/usr/local/bin目录下 touch xcall (生成xcall 文件),编辑文件写入如下代码 如果想在任何地方都能使用xcall命令,需要将xcall命令放到 /usr/local/bin/ 目录下 #!/bin/bash # 获取控制台指令 # 判断指令是否为空 pcount 阅读全文
posted @ 2020-10-04 19:11 kpwong 阅读(854) 评论(0) 推荐(1) 编辑
摘要: 1:修改/etc/hosts文件:添加下面主机 192.168.3.44 hadoop101 192.168.3.43 hadoop102 192.168.3.45 hadoop103 2:编写xsync文件 #! /bin/bash #1 获取输入参数个数,如果没有参数,直接退出 pcount=$ 阅读全文
posted @ 2020-10-03 21:57 kpwong 阅读(995) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python3 import threading import time exitFlag = 0 import subprocess class myThread (threading.Thread): def __init__(self, threadID, name): 阅读全文
posted @ 2020-09-16 15:03 kpwong 阅读(1875) 评论(0) 推荐(0) 编辑
摘要: 当我们导入一个模块时:import xxx,默认情况下python解析器会搜索当前目录、已安装的内置模块和第三方模块,搜索路径存放在sys模块的path中: import sys sys.path 导入不在同一目录的自己编写的模块时: 需要使用: BASE_DIR = "自己文件目录" sys.pa 阅读全文
posted @ 2020-09-05 13:25 kpwong 阅读(1421) 评论(0) 推荐(0) 编辑
摘要: import pandas as pdimport pprintimport numpy as npusers = ['user1','user2','user3','user4','user5',]items = ['item A','item B','item C','item D','item 阅读全文
posted @ 2020-09-02 11:03 kpwong 阅读(1102) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd import pprint import numpy as np users = ['user1','user2','user3','user4','user5',] items = ['item A','item B','item C','item D',' 阅读全文
posted @ 2020-09-02 10:23 kpwong 阅读(459) 评论(0) 推荐(0) 编辑
摘要: import pandas as pdimport numpy as npusers = ['user1','user2','user3','user4','user5',]items = ['item A','item B','item C','item D','item E',]datasets 阅读全文
posted @ 2020-09-02 10:21 kpwong 阅读(596) 评论(0) 推荐(0) 编辑
摘要: ```python # region 加载库,基础参数配置 # 运行前下载数据集 # wget http://www.fit.vutbr.cz/~imikolov/rnnlm/simple-examples.tgz # tar xvf simple-examples.tgz # 下载PTB,借助re 阅读全文
posted @ 2020-08-30 19:50 kpwong 阅读(532) 评论(0) 推荐(0) 编辑
摘要: 我是集训营的学员,我大致分享一下遇到的面试题1. 基础的数据结构:插入排序、选择排序 (记下时间复杂度), 链表新增、删除,二叉树的遍历,其他场景算法题大多出自leetcode2. 逻辑回归损失是什么, 手动推导一遍3. 对集成学习, SVM的理解,以公式的形式写出来最好4. 对HMM ,CRF的理 阅读全文
posted @ 2020-08-30 19:28 kpwong 阅读(986) 评论(0) 推荐(0) 编辑
摘要: 第一种:vocab = dict(Counter(text).most_common(MAX_VOCAB_SIZE-1)) 举例: from collections import Counter colors = ['red', 'blue', 'red', 'green', 'blue', 'bl 阅读全文
posted @ 2020-08-25 17:17 kpwong 阅读(907) 评论(0) 推荐(0) 编辑