一、讲解 二、代码 import tensorflow as tf from tensorflow.python.keras import datasets, layers, optimizers, Sequential, metrics from tensorflow.python import ...
分类:
其他好文 时间:
2021-04-23 12:19:22
阅读次数:
0
1. 用Pyspark自主实现词频统计过程。 >>> s = txt.lower().split()>>> dd = {}>>> for word in s:... if word not in dd:... dd[word] = 1... else:... dd[word] = dic[word] ...
分类:
其他好文 时间:
2021-04-23 12:19:08
阅读次数:
0
详细步骤:(注:pip是Python包管理工具,该工具提供了对Python包的查找、下载、安装、卸载的功能。) 第一步:使用pip安装xpinyin包,具体命令如下: 1 pip install xpinyin -i http://pypi.douban.com/simple --trusted-h ...
分类:
编程语言 时间:
2021-04-23 12:10:10
阅读次数:
0
概述 python 三目运算符 背景 最近看代码, 有人挺喜欢用这个东西 我虽然不喜欢, 但还是学学吧 我觉得这样虽然显得简洁, 但读起来并不是最友好的 简单记一下, 怕以后忘了 水一篇 环境 python 3.7 类型 总结类 1. 语法 概述 语法 例子 # 语法 # py 式的变量命名, 我觉 ...
分类:
编程语言 时间:
2021-04-23 12:05:15
阅读次数:
0
import os, zipfile def deflate(paths, zip_path): z = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED, allowZip64=True, compresslevel=9) for path i ...
分类:
编程语言 时间:
2021-04-23 12:03:14
阅读次数:
0
eval(str)函数很强大,官方解释为:将字符串str当成有效的表达式来求值并返回计算结果。所以,结合math当成一个计算器很好用。 eval()函数常见作用有: 1、计算字符串中有效的表达式,并返回结果 >>> eval('pow(2,2)') 4 >>> eval('2 + 2') 4 >>> ...
分类:
编程语言 时间:
2021-04-23 12:00:15
阅读次数:
0
Flask:Flask 是一个微型的 Python 开发的 Web 框架,基于Werkzeug WSGI工具箱和Jinja2 模板引擎。 Flask的下载与基础配值: W+R打开cmd (输入pip install flask==指定版本 -i指定镜像源) 下载好之后:在命令框中输入pip list ...
分类:
编程语言 时间:
2021-04-23 11:58:18
阅读次数:
0
sqlmap常用命令总结:注意:命令为kali linux中运行的 (windows中用python qlmap.py执行)1#、注入六连:1. sqlmap -u "http://www.xx.com?id=x" 【查询是否存在注入点2. --dbs 【检测站点包含哪些数据库3. --curren ...
分类:
数据库 时间:
2021-04-23 11:57:42
阅读次数:
0
求点的最小外接矩 rect1 = cv2.minAreaRect(box): def back_forward_convert(coordinate, with_label=True): """ :param coordinate: format [x1, y1, x2, y2, x3, y3, x ...
分类:
编程语言 时间:
2021-04-23 11:53:53
阅读次数:
0
#!/usr/bin/env python # -*- coding:utf-8 -*- # <editable> def execute(): # <editable> ''' 载入模块 ''' from collections import Counter import pandas as pd ...
分类:
编程语言 时间:
2021-04-23 11:49:29
阅读次数:
0