码迷,mamicode.com
首页 >  
搜索关键字:nginx access python 统计 访问量    ( 194898个结果
Python 运算符
运算符 - 算数运算符 + - * # 加减乘 / # 小数商 // # 整数商 % # 余数 ** # 幂运算(5 ** 3 --> 5 * 5 * 5) 运算符 - 增强运算符 # 在算数运算符基础上,增加了为自身赋值的功能 += -= *= /= //= %= **= # data1 += 5 ...
分类:编程语言   时间:2021-04-23 12:22:46    阅读次数:0
Python的文本和字节序列
一、字符串的表示和存储 字符串是字符的序列,每个字符都有有一个数字作为标识,同时会有一个将标识转换为存储字节的编码方案; s = 'hello world python' for c in s: print(c, end=' ') h e l l o w o r l d p y t h o n AC ...
分类:编程语言   时间:2021-04-23 12:20:35    阅读次数:0
tensorflow(二十八):Keras自定义层,继承layer,model
一、讲解 二、代码 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
07 Spark RDD编程 综合实例 英文词频统计
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
07 Spark RDD编程 综合实例 英文词频统计
>>> s = txt.lower().split()>>> dd = {}>>> for word in s:... if word not in dd:... dd[word] = 1... else:... dd[word] = dic[word] + 1...>>> ss = sorted( ...
分类:其他好文   时间:2021-04-23 12:18:32    阅读次数:0
07 Spark RDD编程 综合实例 英文词频统计
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:10:50    阅读次数:0
python使用xpinyin包将中文汉字转为拼音
详细步骤:(注:pip是Python包管理工具,该工具提供了对Python包的查找、下载、安装、卸载的功能。) 第一步:使用pip安装xpinyin包,具体命令如下: 1 pip install xpinyin -i http://pypi.douban.com/simple --trusted-h ...
分类:编程语言   时间:2021-04-23 12:10:10    阅读次数:0
05 RDD编程
一、词频统计: 读文本文件生成RDD lines 将一行一行的文本分割成单词 words flatmap() 全部转换为小写 lower() 去掉长度小于3的单词 filter() 去掉停用词 转换成键值对 map() 统计词频 reduceByKey() 按字母顺序排序 按词频排序 10、结果文件 ...
分类:其他好文   时间:2021-04-23 12:06:34    阅读次数:0
Python - 三目运算符
概述 python 三目运算符 背景 最近看代码, 有人挺喜欢用这个东西 我虽然不喜欢, 但还是学学吧 我觉得这样虽然显得简洁, 但读起来并不是最友好的 简单记一下, 怕以后忘了 水一篇 环境 python 3.7 类型 总结类 1. 语法 概述 语法 例子 # 语法 # py 式的变量命名, 我觉 ...
分类:编程语言   时间:2021-04-23 12:05:15    阅读次数:0
python zipfile
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!