码迷,mamicode.com
首页 >  
搜索关键字:le ge lt gt eq ne    ( 256714个结果
Python 运算符
运算符 - 算数运算符 + - * # 加减乘 / # 小数商 // # 整数商 % # 余数 ** # 幂运算(5 ** 3 --> 5 * 5 * 5) 运算符 - 增强运算符 # 在算数运算符基础上,增加了为自身赋值的功能 += -= *= /= //= %= **= # data1 += 5 ...
分类:编程语言   时间:2021-04-23 12:22:46    阅读次数: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
复习类的几个基本函数
考个研真的把很多东西都忘光了,,, #include <string_view> #include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; class Sampl ...
分类:其他好文   时间:2021-04-23 12:18:50    阅读次数: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
D. Cut(倍增) from Codeforces Round #717 (Div. 2)
做法:记录每个点i向左与它最近的不互质的数j,从j+1到i是可以分成1块的。 对于每次询问,从r开始一直贪心往前跳,每跳一步ans++;但这样一步一步跳会T,需要去倍增优化。 #include<bits/stdc++.h> using namespace std; #define ll long l ...
分类:其他好文   时间:2021-04-23 12:09:38    阅读次数:0
__cxa_demangle
typeid操作符可以用来获取一个类型/表达式的名称: #include <iostream> #include <typeinfo> using namespace std; int main() { std::cout << typeid(int).name() << std::endl; re ...
分类:其他好文   时间:2021-04-23 12:05:50    阅读次数:0
linux shell while循环
1、测试1 [root@centos7 test2]# i=0 [root@centos7 test2]# max=5 [root@centos7 test2]# while((i<max));do echo $i;((i++));done 0 1 2 3 4 ...
分类:系统相关   时间:2021-04-23 12:03:54    阅读次数:0
linux运维基础五
一.简单的文本处理 2.数据流重定向 将标准错误重定向到标准输出,再将标准输出重定向到文件,注意要将重定向到文件写到前面 cat Documents/xx.txt hell.sh >somefile 2>&1 或者只用bash提供的特殊的重定向符号"&"将标准错误和标准输出同时重定向到文件 cat ...
分类:系统相关   时间:2021-04-23 12:02:43    阅读次数:0
Python中eval()函数的功能及使用方法
eval(str)函数很强大,官方解释为:将字符串str当成有效的表达式来求值并返回计算结果。所以,结合math当成一个计算器很好用。 eval()函数常见作用有: 1、计算字符串中有效的表达式,并返回结果 >>> eval('pow(2,2)') 4 >>> eval('2 + 2') 4 >>> ...
分类:编程语言   时间:2021-04-23 12:00:15    阅读次数:0
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!