自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(39)
  • 问答 (1)
  • 收藏
  • 关注

原创 pywinauto常用参数

常用参数表:可传参数 对应属性名称备注class_name ClassNameclass_name_re 正则匹配window Classnametitle Name Window窗口名title_re 正则匹配窗口名best_match 模糊匹配类似的titlehandle 句柄framework_id FrameworkId(一般情况下FrameworkId不是唯一的)process ProcessId,进程id(注意:每次启动后,进程id都会变)control_id control

2022-04-18 12:54:35 918

原创 tensorflow 强制使用cpu

这里写自定义目录标题tensorflow 强制使用cpu

2022-03-20 17:41:59 588

原创 conda虚拟环境

https://www.cnblogs.com/shierlou-123/p/11138920.html

2022-01-21 16:19:07 229

原创 cygwin sshserver安装配置

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

2022-01-21 14:41:21 244

原创 模型保存与加载

1、save/loadweights轻量级保存 只保存参数model.save_weights('./checkpoints/my_checkpoint')model = create_model()model.load_weights('./checkpoints/my_checkpoint')loss, acc = model.evaluate(test_images, test_labels)2、save/load entire model完整保存network.save(‘mode

2022-01-12 17:53:33 288

原创 tensorflow.keras接口

1、datasets2、layers3、losses4、metrics (记录loss, accuracy 一般没epoch)创建acc_meter = metrics.Accuracy()loss_meter = metrics.Mean()更新update_stateloss_meter.update_state(loss)acc_meter.update_state(y, pred)查看loss_meter.result().numpy()acc_meter.result(

2022-01-11 11:57:34 264

原创 损失函数计算

1、均方差MSEloss = 1/n∑(y-out)²二番数代码:y = tf.constant([1, 2, 3, 0, 2])y = tf.one_hot(y, depth=4)y = tf.cast(y, dtype=tf.float32)out = tf.random.normal([5,4])#范数loss1 = tf.reduce_mean(tf.square(y-out))loss2 = tf.reduce_mean(tf.losses.MSE(y, out))

2022-01-07 11:30:33 756

原创 tensorflow基础操作

#添加参数,输出正态分布随机值相同tf.random.set_seed(2467)#输出的tensor符合正态分布output = tf.random.normal([10,6])可以把多个值伸缩到(0,1)output = tf.math.softmax(output,axis=1)print(output)#生成的值在该范围内遵循均匀分布 包含下限,不包含上限,默认0,1target = tf.random.uniform([10], maxval=6, dtype=tf.int3

2021-12-28 17:55:17 777

原创 TensorFlow-张量与排序

1、扩张每一纬度必须整数倍扩张a = [[1,2,3]]a = tf.constant(a)x = tf.broadcast_to(a,[2, 6,3])print(x)2、创建Tensor生成十行六列的Tensortf.random.normal([10,6])3、

2021-12-24 17:46:10 917 1

原创 mysql 普通用户报错

普通用户新建报错ERROR 1184 (08S01): Aborted connection

2021-11-24 11:25:23 855

原创 pycharm 添加远程docker

docker创建pycharm ssh远程连接docker https://cloud.tencent.com/developer/article/1649280

2021-11-22 17:14:59 268

原创 tensorflow误差计算

创建数据级y = tf.constant([1,2,3,0,2])y = tf.one_hot(y, depth=4)y = tf.cast(y, dtype=tf.float32)out = tf.random.normal([5, 4])2loss1s=tf.square((y-out)) #相减再求平方print(tf.reduce_mean(s)) 求和后求平均数3loss2#norm 平方和开根号tf.square(tf.norm(y-out))/(5*4) 平方和开根号再平

2021-09-23 16:29:34 85

原创 tensorflow输出

tf.sigmoid(a))tf.sigmoid(a)) 输出0到1的数字tf.nn.softmax(a) 输出0到1,各数总和为1tf.tanh(a) 输出-1到1

2021-09-23 14:42:29 67

原创 panda 对NaN的处理

https://www.coder.work/article/3123363

2021-08-06 10:21:28 108

原创 panda-字符拼接

import pandas as pd1、创建一个两行5列的数据data = [['09:25:13', '6.30', '6.3', '457', '287,910',],['09:25:56', '6.13', '6.13', '556', '340,828',]]df = pd.DataFrame(data)print(df)2、创建一个需要合并的数据df1 = pd.DataFrame(['2021-07-16','2021-07-16'])print(df1)3、合并df[

2021-07-16 11:59:29 372

原创 TensorFlow-where、scatter_nd、meshgrid

1、创建一个Tensora = tf.random.normal([3,3])[[ 0.27786183 -0.4933894 0.40996674] [-0.58238053 0.12458259 1.265015 ] [-0.51049304 -1.1052276 1.0958437 ]], shape=(3, 3), dtype=float32)2、创建布尔Tensormask = a>0[[ True False True] [False True Tru

2021-07-12 14:11:58 107

原创 TensorFlow-张量限幅

clip_by_value按最大值最小值裁剪a = tf.random.shuffle(tf.range(10))print(tf.clip_by_value(a,2,7))新的tensor最小值为2,最大值为7reluclip_by_norm缩小数值,方向不变gradient clipping指定多层参数的缩放量

2021-07-09 15:10:42 98

原创 TensorFlow-填充与复制

1、填充 tf.pad填充顺序为左右上下,最右边为最内层a = tf.reshape(tf.range(9), [3,3])print(tf.pad(a,[[3,1],[4,0]]))2、

2021-07-08 16:30:25 90

原创 TensorFlow-数据统计

a = tf.ones([2, 3])1、平方和开根号tf.norm(a), tf.norm(a, ord=2)2、平方和tf.norm(a, ord=1)3、求全局最小值,最大值,平均值a = tf.random.normal([4,10])print(tf.reduce_min(a), tf.reduce_max(a), tf.reduce_mean(a))4、求1轴上最小值, 最大值, 平均值print(tf.reduce_min(a, axis=1), tf.reduce_m

2021-07-01 18:02:00 85

原创 TensorFlow-合并与分割

1、合并需指定要合并的轴,其它轴纬度值需要相同tf.concata=tf.ones([4,35,8])b=tf.ones([1,35,8])c = tf.concat([a,b],axis=0)print(c.shape)2、拼接按轴拼接,创建一个新的a=tf.ones([4,35,8])b=tf.ones([4,35,8])c=tf.stack([a,b],axis=-1)c=tf.stack([a,b], axis=1)print(c.shape)3、分离按轴平分a=

2021-07-01 17:28:24 147

原创 oracle 19c 日志,审计,监听文件过多,过大

1、审计文件查看审计文件存储路径show parameter dumpNAME TYPE VALUEdiagnostic_dest string /vol/oracleNAME TYPE VALUEbackground_dump_dest string /opt/oracle/product/19c/dbhome_1/rdbms/logcore_dump_dest string /vol/oracle/diag/rd

2021-06-28 14:10:14 1328

原创 Plot参数

label 用于图例的标签ax 要在其上进行绘制的matplotlib subplot对象。如果没有设置,则使用当前matplotlib subplotstyle 将要传给matplotlib的风格字符串(for example: ‘ko–’)alpha 图表的填充不透明(0-1)kind 可以是’line’, ‘bar’, ‘barh’, ‘kde’logy 在Y轴上使用对数标尺use_index 将对象的索引用作刻度标签rot 旋转刻度标签(0-360)xticks 用作X轴刻度的值y

2021-06-17 14:53:40 361

原创 matplotlib

1、设定x轴,y轴数据x=【1,2,3,4】y=【5,4,3,2】2、新建一个数据plt.figure()3、设定一个2*3图像,并指定第一个plt.subplot(2,3,1)4、将数据赋值到线性图像中plt.plot(x,y)5、显示图像plt.show()6、将数据赋值到柱状图相中plt.subplot(232)plt.bar(x,y)7、柱状图参数width, 柱子的宽度,即在x轴上的长度,默认是0.8color, 柱子的填充色edgecolor, 柱子

2021-06-16 10:29:24 63

原创 git 首次clone后先建立命名关联,然后pull

git remote add nsfw-master git@github.com:【用户】/nsfw-master

2021-05-21 09:39:21 210

原创 python 三方可执行文件

windows p = subprocess.Popen(comment, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)linuxp = subprocess.Popen(comment, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)错误的返回结果 p.poll()rc为程序返回结果,out打印结果

2021-05-20 10:29:03 37

原创 鉴黄模型训练图库

https://github.com/alex000kim/nsfw_data_scraper

2021-04-09 13:00:49 169 1

原创 git强制覆盖本地版本

git pull” 强制覆盖本地文件放弃本地修改,使用服务器代码覆盖本地的Git命令如下:1 $ git fetch --all2 $ git reset --hard origin/master3 $ git pull

2021-04-08 17:13:13 486

原创 图片与二进制

图片转base64orig_image = Image.open(BytesIO(response.body))

2021-03-05 13:22:15 93

原创 redis 连接

pool = redis.ConnectionPool(host=host, port=port, db=db,decode_responses=True)#二进制自动转utf-8编码的集合pool = redis.ConnectionPool(host=.host, port=port, db=db)#取原值red = redis.Redis(connection_pool=pool)#链接池

2021-03-05 13:18:26 73

原创 scrapy下载图片视频

Rule规则默认忽略这些格式后缀IGNORED_EXTENSIONS = [# archives‘7z’, ‘7zip’, ‘bz2’, ‘rar’, ‘tar’, ‘tar.gz’, ‘xz’, ‘zip’,# images'mng', 'pct', 'bmp', 'gif', 'jpg', 'jpeg', 'png', 'pst', 'psp', 'tif','tiff', 'ai', 'drw', 'dxf', 'eps', 'ps', 'svg', 'cdr', 'ico',# au

2021-02-25 10:34:55 388

原创 scrapy

1.setting配置LOG_LEVEL = ‘ERROR’#redis 去重配置DUPEFILTER_CLASS = “scrapy_redis.dupefilter.RFPDupeFilter”#使用scrapy-redis 组件自己的调度器SCHEDULER = “scrapy_redis.scheduler.Scheduler”#是否持久化存储SCHEDULER_PERSIST = True#深度DEPTH_LIMIT=2#超时RETRY_TIMES = 5#redisRE

2021-02-23 17:36:23 74

原创 orm条件查询查询

django orm查询时间范围可以用filter(time_range(kssj,jssj))时间格式化extra(select=time_format = {‘inserttime’: “DATE_FORMAT(inserttime,’%%Y-%%m-%%d’)”})分组聚合分组是.values(colum,colum)聚合是annotate(Sum(colum),Mix(Colum)集合表达式用F且 values和annotate配合使用.values(‘MonitorAddress__

2021-02-19 17:16:30 306

原创 django框架dataframe数据前端显示

說到用Python來撰寫網頁,就不得不提到Django。Django 作為現今Python最為當紅的幾個網頁框架之一,其原生套件中提供了相當多關於網頁管理上的元件,MTV (Model-Template-View)的維護方式也使網頁可以被更有效、有邏輯的被維護和更新。然而,相較於坊間同樣常使用的 .Net Web Form,Django 並沒有辦法直接利用在 IDE (Visual Studio) 對元件以拖拉點選的方式,來進行排版和後端程式邏輯的串接;而是必須使用 Django 特有的標籤語法 “Dja

2021-02-17 18:40:46 1972

原创 dataframe聚合

dataframe聚合import pandas as pds = pd.read_csv(’…/conf/dataframe.csv’) #导入数据print(s.columns)#打印列名count_list= [‘monitorURLNUM’,‘Monitor’]cloum_list =[‘MonitorAddress’,‘inserttime’]cloum_list.extend(count_list)s=s[cloum_list]#提取指定列s[‘inserttime’]=pd.

2021-02-17 11:22:57 460

原创 oracle12c dataguard搭建

oracle12c dataguardhttps://blog.csdn.net/csdnhsh/article/details/95779647https://blog.csdn.net/shiyu1157758655/article/details/79867838https://blog.csdn.net/kiral07/article/details/86916367https:/...

2020-01-14 17:10:07 223

原创 华为交换acl

1.添加aclacl 20032.添加条目,默认拒绝所有rule 10 permit soruce 10.10.0.0 0.0.0.255进入接口user-interface vty 0 44.添加acl条款acl 2003

2019-06-12 16:57:30 156

原创 华为交换机ssh

1、启动ssh服务stelnet server enable2、生成密钥rsa local-key-pair create3、配置vtyuser-interface vty 0 4authentication-mode aaaprotocol inbound ssh4、添加ssh用户ssh user testssh user test authentication-ty...

2019-06-12 16:50:35 1807

原创 html5

a.previousElementSibling 获取前一个标签a.nextElementSibling 获取后一个标签a.parentNode a.parentElement 获取上级标签a.children 获取子标签a.firstElementChilda.lastElementChild 获取最后一个标签a.children 获取子标签...

2019-06-09 07:39:33 126

原创 jquery

1、获取标签元素$("#i10“)通过id$(".c2") 通过css2.jquery 转换 documentjquery 获取元素为列表var a = $("#i10“)c = a[0]

2019-06-09 07:38:51 206

空空如也

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

TA关注的人

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