自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(50)
  • 资源 (1)
  • 收藏
  • 关注

原创 spark报错:WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI...

Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources

2022-11-05 15:51:50 6289 1

原创 pytest简介 及 和unittest(pyunit)的区别

简单介绍pytest,以及,pytest和unittest的区别总结

2022-10-25 11:25:54 834

原创 报错:Allocation of ******* exceeds 10% of free system memory.

存储空间不足,导致模型训练时报错

2022-06-20 23:44:15 8958 1

原创 ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory

安装torch时报错

2022-06-02 19:25:00 1816

原创 ValueError: X.dtype should be np.float32, got float64

背景在用GBDT系列训练时,报错ValueError: X.dtype should be np.float32, got float64,如下所示。ValueError Traceback (most recent call last)<ipython-input-14-aa936862d7d7> in <module>()----> 1 abc.apply(X_train)~/tmp/dataset/

2021-11-14 11:12:30 2299

原创 ValueError: Input data must be 2 dimensional and non empty

背景在做点击率预估GBDT+LR模型时,使用lightgbm训练时,报错# create dataset for lightgbmlgb_train = lgb.Dataset(X_train, label = y_train)lgb_eval = lgb.Dataset(X_test, label = y_test)params = { 'task': 'train', 'boosting_type': 'gbdt', 'objective': 'binary',

2021-11-10 20:29:10 5570

原创 Py4JError: org.apache.spark.api.python.PythonUtils.getPythonAuthSocketTimeout does not exist in the

背景就是版本没统一spark和pyspark的版本需要统一我的spark是3.0.3的然后使用的是anaconda内的python,安装pyspark的时候没指定版本,默认安装最新的3.2导致我在使用jupyter的时候报错解决办法pip uninstall pysparkpip install pyspark==3.0.3然后重启jupyter即可...

2021-10-20 11:54:49 2590 1

原创 linux centos7 安装docker

bo主写的很好,直接搬运https://cloud.tencent.com/developer/article/1701451

2021-10-17 16:36:57 86

原创 虚拟网络设置

环境linuxcentos7vmwarehttps://blog.csdn.net/baidu_18696283/article/details/89062241

2021-10-17 15:45:20 83

原创 【hadoop报错】JAR does not exist or is not a normal file

背景linuxcentos7hadoop执行 hadoop jar 命令时,一直报错解决方法1、确定自己的jar目录是切实存在的,别弄错了我的是“/export/server/hadoop-3.1.4/share/hadoop/tools/lib/hadoop-streaming-3.1.4.jar”2、网上找了很多解决办法,最后看到这个https://www.mmbyte.com/article/45643.html对比我的路径和对方的路径想着有没有可能是我直接写了绝对路

2021-10-17 10:30:47 14742 2

原创 运行sh文件 报错 Permission denied

背景linuxcentos7hadoop本人小白,第一次写sh文件,写完了放在机器上,确一直运行失败,文件内的命令单独都可运行,放在文件内就Permission denied,最后发现是权限的问题解决方法1、在hdfs-site.xml中加入以下配置<property> <name>dfs.permissions</name> <value>false</value></property>hdfs-sit

2021-10-17 10:22:20 3944

原创 centos7安装anaconda3

准备工作机器内的下载命令 bzip2、wgetyum -y install bzip2yum install wget镜像anaconda的官网下载镜像有点慢,所以在镜像网站下https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/选择最新的下载安装wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh -

2021-10-17 10:04:40 134

原创 【hadoop报错】(ssh)Connection timed out

背景在虚拟机上启动hadoop,报错Starting namenodes on [node1.huike.cn]Last login: Thu Oct 14 22:36:08 EDT 2021 on pts/0node1.huike.cn: ssh: connect to host node1.huike.cn port 22: Connection timed outStarting datanodesLast login: Thu Oct 14 22:53:14 EDT 2021 on p

2021-10-15 11:35:55 2762

原创 使用screen离线运行程序常用命令

看了一堆乱七八糟的资料,还是没有讲清楚,感觉很多很乱,所以就整理一下我自己常用的命令吧,希望能帮助刚上手的小伙伴们快速使用1、screen官网喜欢看官方使用的小伙伴看过来~http://www.gnu.org/software/screen/2、常用命令anaconda中安装conda install screenscreen常用命令screen -S w1 新建一个w1工作窗口screen -ls 查看当前所有的运行窗口screen -d w1 将w1窗口离线screen -r

2021-07-05 23:38:51 204 1

原创 anaconda已pip isntall mysql 但是import 失败 no module named ‘mysql’

背景做项目时 发现from mysql import connector报错,显示no module named ‘mysql’按照惯例,没有啥就pip install,ok,安装完毕,一看,import mysql 还是报错。。。确实是安装了,但是确实一直import error环境anaconda3python3.6.8解决办法不要把目光盯在mysql上,要知道本身是 connector 导入失败,所以可以退一步就不要用pip了,直接进anaconda prompt 用conda命令,

2021-06-30 13:07:05 676

原创 bash 中文乱码,无法输入中文

环境win10centos7mobaxterm问题描述git commit ""时,输入中文乱码,或显示不了解决办法1、输入locale,查看支持的所有编码locale2、修改export LANG=zh_CN.GBK检查修改localeok,再次输入时,问题解决...

2021-03-16 16:17:37 1277

原创 MobaXterm登录堡垒机/跳板机

前言xshell很好用,但是没找到正式版本,公司不允许使用,看了网上的一些资料,发现MobaXterm是比较好的替代产品。但是找了无数资料,发现网上的登录堡垒机的方法都无法正常登录,试了好久,气死!!!终于找到了方法~【来自xshell用户 转 mobaXterm萌新,其他用的贼溜的小伙伴请自动绕行哈】安装版本v21.0链接官网的免费版本:https://mobaxterm.mobatek.net/download-home-edition.html直接portable edition就可

2021-03-08 17:57:43 6828 3

原创 ubuntu下LaTeX+texmaker安装与排版练习

刚接触LaTeX,在win10下捣鼓了好久,安装半天才装好,然后又是各种报错,忍不了…直接转向ubuntu,果然,很快就弄好了,本篇不讲内容,只为小白入门指引,引导相关链接…内容全是亲测有效的~1 ubuntu16.04安装latexhttps://blog.csdn.net/zzc15806/article/details/821137592 解决中文输入问题首先,啥也不说,安装完texmaker之后,回到终端,先下载sudo apt-get install latex-cjk-allsu

2020-11-03 16:46:16 396

原创 ubuntu 远程服务器文件与本地文件的上传与下载

1、从服务器下载文件到本地scp -r [email protected]:/home/username/KG-Policy/kgpolicy/out_yelp2018 /home/aha/root:远程服务器用户名10.10.256.1:远程服务器的ip地址/home/username/KG-Policy/kgpolicy/out_yelp2018:需要下载的文件及其路径;我需要下的是out_yelp2018.txt,但是加上txt后会报错,去掉txt就ok2、上传本地文件到服务器scp -r

2020-11-01 10:36:46 3488

原创 解决在anaconda中torch1.1.0下载过慢的问题Read timed out.

尝试了修改anaconda镜像源,完全按照网友的操作做完后,还是15KB/s左右的速度,龟速前进,最终Read timed out.我一度以为是我网速的问题。。。结果让小伙伴帮我测试了一下,差不多都是10-30kb的亚子。。。没用归没用,咱们还是乖乖先把镜像源修改了:1、在终端输入:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channe

2020-10-30 21:28:45 903 5

转载 win10与子系统ubuntu之间的相互访问

直接放链接吧(防止链接失效):https://www.jianshu.com/p/27a2f62fda5fWindows 10系统可以通过Microsoft Store 安装 Ubuntu子系统。 Windows系统和Ubuntu子系统是两个互相独立的系统,Win10 与 子系统 Ubuntu 之间互访文件系统如下:1、在win10环境下访问Ubuntu文件系统的home目录:C:\Users\xxx1\AppData\Local\Packages\CanonicalGroupLimited.Ubu

2020-10-29 16:29:05 809

原创 torch与cuda报错:ImportError: libcudart.so.9.1: cannot open shared object file: No such file or director

环境python3.6torch 1.1.0torchvision 0.1.6cuda 9.0安装cuda9.0conda install -c anaconda cudatoolkit==9.0首先,执行以下命令查看,看torch和cuda的版本是否匹配import torchprint(torch.__version__)print(torch.cuda.is_available())如果输出的结果为true,则说明cuda和torch的版本是匹配的,ok考虑是不是没有将cud

2020-10-29 15:24:15 1062 1

原创 报错subprocess.CalledProcessError: Command ‘[‘which‘, ‘g++‘]‘ returned non-zero exit status 1.

在安装torch的时候,torch安装成功,但是torch-cluster、torch-sparse等报错Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-56zzyn27/torch-sparse/setup.py", line 46, in <module> packages=find_package

2020-10-27 14:59:56 16033 7

原创 报错indexerror: tensors used as indices must be long, byte or bool tensors

报错Traceback (most recent call last): File "main.py", line 306, in <module> args_config=args_config, File "main.py", line 224, in train avg_reward, File "main.py", line 56, in train_one_epoch selected_neg_items_list, _ = sampler(bat

2020-10-24 11:29:39 13165 6

原创 RuntimeError: Expected object of scalar type Long but got scalar type Float for sequence element 1 i

报错Traceback (most recent call last): File "main.py", line 306, in <module> args_config=args_config, File "main.py", line 224, in train avg_reward, File "main.py", line 56, in train_one_epoch selected_neg_items_list, _ = sampler(bat

2020-10-24 10:11:19 1401 2

原创 RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is Fal

跑pytorch时,出现如下错误:Traceback (most recent call last): File "main.py", line 306, in <module> args_config=args_config, File "main.py", line 184, in train paras = torch.load(args_config.data_path + args_config.model_path) File "/home/zzy/an

2020-10-24 09:17:22 2028

原创 Tensorflow2安装教程+修改jupyter notebook文件保存路径

开始学习tensorflow啦,学习阶段会一直更新学习记录,仅供初学者使用~安装基础环境anacondapython3.7(激活环境)安装tensorflowtensorflow2.3在prompt内进入python3.7的环境后执行:pip install tensorflow-cpu==2.3.0 -i https://pypi.douban.com/simple/检测安装ok,安装成功安装常用库matplotlibpandasnumpy关于jupyter1、进入ju

2020-09-23 13:11:28 508

原创 python的学习方向与就业方向

学习方向一、入门必备【Python基础数据结构】【Python基础语法】【文件操作】【错误与异常处理】【Python面向对象】【模块化】你还需要知道工具jupyter notebook差别list vs tuple差别dict vs set稳定性异常处理函数自定义函数、匿名函数面向对象如何实现一个搜索引擎-python模块化二、进阶核心知识【Python协议】【Python高级语法】【Python正则表达式】【Python并发编程

2020-08-19 16:38:54 159

原创 [leetcode]Add Two Numbers 两数相加(链表)

题目:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.You may assume the two numbers d

2020-08-18 18:10:31 157

原创 打包matplotlib出现RuntimeError: Could not find the matplotlib data files

在用pyinstaller打包exe时,出现pyimod03_importers.py:493: MatplotlibDeprecationWarning: Matplotlib installs where the data is not in the mpl-data subdirectory of the package are deprecated since 3.2 and support for them will be removed two minor releases later.

2020-08-10 19:51:04 4977 12

转载 Python内置方法的时间复杂度(转)

原文:http://www.orangecube.net/python-time-complexity本文翻译自**Python Wiki**本文基于**GPL v2**协议,转载请保留此协议。本页面涵盖了Python中若干方法的时间复杂度(或者叫“大欧”,“Big O”)。该时间复杂度的计算基于当前(译注:至少是2011年之前)的CPython实现。其他Python的实现(包括老版本或者尚在开发的CPython实现)可能会在性能表现上有些许小小的差异,但一般不超过一个O(log n)项。本文

2020-08-10 15:16:47 199

原创 【leetcode刷题】1、Two Sum两数之和

突然想重刷下之前刷过的leetcode的题,记录下自己的解题思路,以及不同的方法给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。Givennums = [2, 7, 11, 15], target = 9,Becausenums[0] + nums[1] = 2 + 7 = 9,return [0, 1].解法一:最普通,常规的解法,像排序

2020-08-10 14:56:10 138

原创 【matplotlib】【绘制股票数据】子图的绘制、子图标签设置、双y轴

最近在使用matplotlib,把我自己遇到过的问题总结一下叭~绘图步骤效果图设置画布画图画线展示各条线的情况legentx轴标签旋转x轴标签(间隔)选取画网格对图像设置数字标签存储完整代码效果图设置画布fig = plt.figure(figsize=(30,15))画图我要画的是3行,1列共三个图第一个子图(双y轴子图)host = fig.add_subplot(311) #311表示3行1列里的第一个图host.set_title(title)host.set_xlabel(

2020-08-07 13:14:38 788

原创 Matplotlib 使用总结(画图线图、散点图、条形图、柱形图、3D图形等)

文章目录相关链接学习记录图线图散点图条形图3D图像双y轴给图标上相应的数据我的绘图本文内容概况:1、主要总结一下几种常用的图,供自己学习使用2、记录了本人学习matplotlib时找到的一些能解决相应问题的连接。相关链接学习Matplotlib时看到一位博主的讲解,非常详细的讲解:https://www.jianshu.com/p/92e1a4497505献上官方文档:你想要的图,基本都能找到对应的~https://matplotlib.org/api/_as_gen/matplot

2020-07-29 16:35:08 1620

原创 git 介绍与相关命令

发现一篇很详细的git教程:初次接触git的小白可以康一康~https://www.yiibai.com/git

2020-07-28 16:17:48 117

原创 中文文本分类-新闻分类[数据挖掘]

对新闻文本(10类)进行文本分类,通过准确率、召回率、 f1-score 等指标对分类结果进行分析。python版本:python 3.6分类方法:朴素贝叶斯需导入的相关库import osimport timeimport numpy as npimport pandas as pdimport jiebafrom jieba import analysefrom sklearn.utils import shufflefrom sklearn.model_selection imp

2020-07-24 14:25:36 6854 12

原创 如何将本地文件上传至github

1、新建仓库eg:仓库名 news_get2、复制链接3、在本地新建文件夹(这种方法不容易出错)然后 右键-> git bash here第一步:git clone https://github.com/…/news_get.git然后就能看到你github上刚刚新建的仓库第二步: 进入文件夹cd news_get第三步:将你要上传的文件全部放到这个news_get文件夹内第四步:登录你本人的github账户(这一步最开始写也行)git config --glob

2020-07-23 18:51:02 199

原创 dataframe 拼接、合并、去重、查看数据规模 数据预处理 合辑

拼接不同的表1、纵向拼接pd.concat([df1,df2],axis=0)现有data1.csv和data2.csvdf1 = pd.read_csv('data1.csv',names=['category','theme','URL','content'])df2 = pd.read_csv('data2.csv',names=['category','theme','URL','content'])data = pd.concat([df1,df2],axis=0,ignore_i

2020-07-23 17:56:19 935

原创 python 爬虫爬取中国新闻网

中国新闻网的新闻种类较多、而且新闻比较丰富,如果需要获取大量新闻的话,中国新闻网是个不错的选择。界面是这样的:从url不难发现,改变日期就能获取不同日期的新闻那么,正文开始。。。1、获取某一个链接的新闻详情页信息import requestsfrom bs4 import BeautifulSoupurl = 'http://www.chinanews.com/auto/2019/01-30/8743035.shtml'res = requests.get(url)res.encodi

2020-07-23 15:27:07 4654 4

原创 python 爬虫爬取网易新闻 网易排行榜

爬取新浪新闻的链接:https://blog.csdn.net/Iv_zzy/article/details/107535041与获取新浪新闻思路不同,新浪新闻的获取是先把所有的链接存入csv文件,再统一对所有的链接解析。本人对网易新闻的获取采用边解析链接、边获取链接的内容(本人尽可能提供不同的方法,若需要,对照修改使用即可)网易排行榜如下图所示以娱乐新闻为例,点击娱乐,到了这个界面网页链接为:http://news.163.com/special/0001386F/rank_ent.h

2020-07-23 15:02:03 822

hadoop-2.6.0-cdh5.7.0.zip

20211018可用,放心下载

2021-10-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除