自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 python安装Carpoty

去这里下载自己版本python的GEOS,shapely,pyshp,pyproj;安装上面的依赖库完了再下载安装cartopy;

2024-07-13 17:37:11 133

原创 CUDA12.X 使用ONNX

https://onnxruntime.ai/docs/install/

2024-07-09 11:12:05 156

原创 Anaconda安装及配置服务器远程jupyter notebook连接

安装anaconda,配置远程jupyter notebook

2023-01-03 16:14:06 1173 1

原创 Windows下安装pygrib

在Windows上如何使用pygrib呢?

2022-09-23 14:28:49 3473

原创 无法import arcpy

无法import arcpy

2022-08-02 17:45:19 520

原创 error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“:

2022-08-01 16:24:52 373

原创 清理文本

def clean_text(text): text = text.lower() # lowercase text = re.sub(r'[!]+', '!', text) text = re.sub(r'[?]+', '?', text) text = re.sub(r'[.]+', '.', text) text = re.sub(r"'", "", text) text = re.sub('\s+', ' ', text).strip() # R

2021-03-09 14:53:37 168

原创 FastText

fasttext简单理解及应用

2021-03-07 14:59:34 69

原创 替换特定字符

替换特定字符import oswith open(r'input.txt', 'r', encoding='utf-8') as f: countent = f.readlines() for line in countent: countent = line.replace("A","B")#把A换成B with open(r'output.txt', "a+", encoding='utf-8') as fa: fa.writ

2021-03-06 12:43:13 74

原创 去除小于一定长度的数据条目

去除小于一定长度的数据条目import ref=open(r"input.csv",'r',encoding='utf-8')alllines=f.readlines()f.close()f=open(r"output.csv",'w+',encoding='utf-8')for eachline in alllines: a = eachline try: b = list(a) c = b[0] if c !=' ':

2021-03-06 12:40:36 195

原创 从文本中随机抽取部分数据

从文本中随机抽取部分数据# coding:utf-8import randomimport time"""注意盘符小写"""DATA_DIR = r'D:\\'DATA_DIR2 = r'D:\\hello.txt'a = range(3)def test(): for item in a: f = open("13fix.txt", "r", encoding='utf-8') # 源文件 fw = open("hello.txt",

2021-03-06 12:38:29 400

原创 分割文本为三不等部分

分割你的训练文本with open(r"要处理的原文本.txt",'r',encoding='utf-8') as f: countent = f.readlines() count = 0 # pat = re.compile('\n') for line in countent: count=count+1 if 0<=count<=(数字:第一部分数据条数): with open(r"train.t

2021-03-06 12:36:10 82

原创 删除不必要字符

删除不必要字符(如空格)import ref=open(r"1.txt",'r',encoding='utf-8')alllines=f.readlines()f.close()f=open(r"output.txt",'w+',encoding='utf-8')for eachline in alllines: a=re.sub(' ','. ',eachline) f.writelines(a)f.close()

2021-03-06 12:33:36 85

原创 合并两个txt文档

合并两个txt文档file1 = open(r"1.txt", "r",encoding='utf-8')file2 = open(r"2.txt", "r",encoding='utf-8')file1_lists = file1.readlines()file2_lists = file2.readlines()file3_list = []file4_list = []for i in file1_lists: temp_list = i.split() file3_

2021-03-06 12:32:12 391

空空如也

空空如也

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

TA关注的人

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