自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 OpenCV 鼠标事件

import cv2events=[i for i in dir(cv2) if 'EVENT'in i] #将全部事件保存在列表中print(events) #将列表打印EVENT_FLAG_LBUTTON 1 #左鍵拖曳 EVENT_FLAG_RBUTTON 2 #右鍵拖曳 EVENT_FLAG_MBUTTON 4 #中鍵拖曳 EVENT_FLAG_CTRLKEY 8

2021-04-27 17:14:34 129

原创 电脑之间利用Python 自带的库 互传文件

目前源文件存在于电脑IP为 10.4.236.100python2 运行: python -m SimpleHTTPServer 8080(端口号-可自行修改)python3 运行:python -m thhp.server 8080root@cn0214002760u:~/2T$ python -m http.server 8080 Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ...需要下载文件的电脑 可以使用命令 w

2021-02-25 15:14:42 201

原创 GIT 学习笔记

在网页上先创建一个空库 假设git_project_name为:zyn_test 找到clone地址:https://gitlab.xxx.com/xxx/zyn_test.git 输入命令 git clone https://gitlab.xxx.com/xxx/zyn_test.git 会下载一个空目录(zyn_test),在本地进入下载后的目录;也可以输入 git clone https://gitlab.xxx.com/xxx/zyn_test.git mygit 会在当前目录下载..

2021-02-25 10:47:52 143

原创 Ubuntu 命令

防火墙 使用 sudo ufw enable 命令来开启防火墙 使用 sudo ufw disable 命令来关闭防火墙 ufw default allow/deny:外来访问默认允许/拒绝 ufw allow/deny 20:允许/拒绝 访问20端口,20后可跟/tcp或/udp,表示tcp或udp封包。 ufw allow/deny servicename:ufw从/etc/services中找到对应service的端口,进行过滤。 ufw allow proto tcp from 10.

2021-02-24 11:16:21 122

原创 bug

1、在vim编辑时,按了ctrl + s后,再按ctrl + q就可以继续执行了。ctrl + s 表示停止向终端输出ctrl + q 表示恢复向终端输出

2021-02-18 18:03:59 86

原创 Python 查看第三方库的版本

列表展示:pip list@cn0214002760u:~$ pip listPackage Version----------------------------- -----------------------appdirs 1.4.4apturl 0.5.2cryptography 1.2.3cycler

2021-02-03 18:14:01 508

原创 sublime 配置python3运行环境

tools—>build system—> new build system{ “cmd”: ["/usr/bin/python3", “-u”, “$file”], “file_regex”: “1File "(…?)”, line ([0-9]*)", “selector”: “source.python”} ↩︎

2020-12-16 15:28:21 130

原创 Ubuntu 无法输入中文标点符号

问题: 不管是中文还是英文输入法,输入的标点符号都是英文的解决方法: ctrl + . 进行切换,一个是lation 符号,一个是全角符号

2020-12-07 19:09:58 1467

转载 Ubuntu16.04 sublime 输入中文

原网址:https://jingyan.baidu.com/article/af9f5a2d4bcf8843150a4565.html先去 git 上下载插件git clone https://github.com/lyfeyaj/sublime-text-imfix.git会直接下载到在当前路径下的 sublime-text-imfixsudo cp .sublime-text-imfix/lib/libsublime-imfix.so /usr/bin/subl #64位 32位用另一个

2020-12-02 17:15:50 96

原创 Python 压缩文件

import tarfile, zipfile# tar压缩def make_targz(source_dir, output_filename): with tarfile.open(output_filename, "w:gz") as tar: tar.add(source_dir, arcname=os.path.basename(source_dir))#

2020-11-26 16:36:40 156

转载 subprocess.Popen().poll()返回值详解

import subprocessproc = subprocess.Popen([‘python’, ‘test.py’], stdout=subprocess.PIPE)while 1:print proc.poll()#while 1:print “hello”print “hello”测试代码如上,poll函数返回码:0 正常结束1 sleep2 子进程不存在-15 killNone 在运行poll的返回: A None value indicates that the p

2020-11-25 17:33:39 16073 1

原创 Ubuntu 安装微信

https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.wechat/

2020-11-09 14:35:18 246 2

原创 Ubuntu 下安装Python库

sudo apt-get install python-opencv

2020-11-06 16:27:35 351

转载 apt-get 常用命令

转载-博客园

2020-10-21 10:42:59 114

转载 搜索引擎命令大全!

1、双引号把搜索词放在双引号中,代表完全匹配搜索,也就是说搜索结果返回的页面包含双引号中出现的所有的词,连顺序也必须完全匹配。bd和Google 都支持这个指令。例如搜索: “seo方法图片”2、减号减号代表搜索不包含减号后面的词的页面。使用这个指令时减号前面必须是空格,减号后面没有空格,紧跟着需要排除的词。Google 和bd都支持这个指令。例如:搜索 -引擎返回的则是包含“搜索”这个词,却不包含“引擎”这个词的结果3、星号星号是常用的通配符,也可以用在搜索中。百度不支持号搜索指令。比如在Goo

2020-10-14 11:14:19 339

转载 Ubuntu中安装企业微信

git clone https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu.git #(拉取代码)cd到deepin-wine-for-ubuntu文件夹下面,执行下列命令./install.shwget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.weixin.work/deepin.com.weixin.work_2.4.16.1347deepin0_i386.deb这里是

2020-10-13 10:35:17 564

转载 argparse python自带的命令行参数解析包

http://vra.github.io/2017/12/02/argparse-usage/

2020-10-12 16:10:40 100

转载 将指定目录下的多个文件移动到目标目录下

# 将指定目录下的多个文件移动到目标目录下ls -Q dir1 | head -1000 | xargs -i mv dir1/{} dir2/

2020-08-18 12:54:49 234

原创 简单选择排序

1 arr = [1, 5, 9, 7, 3, 4, 6, 2, 8] 2 3 print arr 4 5 for i in range(len(arr) - 1): 6 max = i 7 for j in range(i + 1 , len(arr)): 8 if arr[j] < arr[max]: 9 ...

2020-01-10 15:04:53 119

原创 冒泡排序

1 arr = [1,3,5,7,2,8,9,6] 2 print arr 3 temp = 0 4 5 for i in range(len(arr) - 1): 6 for j in range(len(arr) - 1 - i): 7 if arr[j] > arr[j + 1]: 8 temp = ar...

2020-01-10 15:03:36 102

原创 堆排序

1 #coding=utf-8 2 3 def big_endian(arr , start , end): 4 root = start 5 child = root*2+1 #左孩子 6 #print child 7 while child <= end: 8 if child+1 <= end...

2020-01-10 15:01:37 88

原创 linux 文件内容去重

sort filename | uniq >./filename2awk '!count[$0]++' filename >./filename2

2019-11-26 10:12:17 432

原创 常见激活函数

2019-11-22 09:53:25 98

转载 向量夹角的余弦公式

向量夹角的余弦公式很简单,不在此赘述,直接上代码:def cosVector(x,y): if(len(x)!=len(y)): print('error input,x and y is not in the same space') return; result1=0.0; result2=0.0; result3=0.0; ...

2019-11-12 17:58:39 6701

原创 hadoop mapreducer 设置reducer输入的排序的内容(前1、2列)

a 234b 222a 123b 333c 3只用第一列排序:-D stream.num.map.output.key.fields=2 \-D num.key.fields.for.partition=2 \a 234a 123b 222b 333c 3用第1和第2列排序:-D mapred.text.key.partitioner.options="-k1,...

2019-11-05 17:38:50 370

转载 python join函数的用法

函数:string.join()Python中有join()和os.path.join()两个函数,具体作用如下:join(): 连接字符串数组。将字符串、元组、列表中的元素以指定的字符(分隔符)连接生成一个新的字符串os.path.join(): 将多个路径组合后返回一、函数说明1、join()函数语法: ‘sep’.join(seq)参数说明sep:分隔符。可以为空...

2019-10-30 16:40:30 120

原创 python math.log

ValueError: math domain error翻译:ValueError:数学域错误log指数不为0或负数

2019-10-29 11:16:24 899

原创 优快云编辑器的使用

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Ma...

2019-10-28 17:00:11 415

原创 shell 获取最近n天的所有数据(按天划分)

#获取最近N天的数据input=""idx=0while [ $idx -lt 30 ]do dt=`date "+%Y%m%d" -d"$maxday $idx days ago"` input=$input" /osearch/zouxianqi/log_click/$dt" ((idx=$idx+1))done

2019-10-23 19:45:15 239

原创 VI / VIM键盘图

2019-10-23 16:24:24 370

原创 Python 查看 tensorflow版本

import tensorflow as tfprint(tf.version)

2019-10-12 10:37:01 1584

原创 Python map apply mapapply

apply 用在dataframe上,用于对row或者column进行计算applymap: 作用在dataframe的每一个元素上map (其实是python自带的)用于series上,是元素级别的操作,map 跟apply 功能类似,用法差不多import pandas as pddata=pd.DataFrame({‘user_id’:[‘Adff’,‘B’,‘C’,‘D’],‘...

2019-03-07 11:30:28 371

空空如也

空空如也

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

TA关注的人

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