上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 29 下一页
摘要: import tensorflow as tf #placeholder数据类型 a = tf.placeholder(tf.float32) b = tf.placeholder(tf.float32) myadd = tf.add(a,b) with tf.Session() as sess: print(sess.run(myadd,feed_dict={a:35,b:20}))... 阅读全文
posted @ 2019-07-10 09:52 山…隹 阅读(608) 评论(0) 推荐(0)
摘要: import tensorflow as tf sess = tf.Session() #创建会话 a = tf.constant(3) b = tf.constant(5) #常量数据 c = tf.Variable(9) # 加减乘除操作 myadd = tf.add(a,b) mysub = tf.subtract(a,b) mymul = tf.multiply(a,... 阅读全文
posted @ 2019-07-09 16:55 山…隹 阅读(402) 评论(0) 推荐(0)
摘要: import tensorflow as tf data1 = tf.constant(25,dtype='int16') data2 = tf.Variable(3,name='data2') print(data1) print(data2) # sess = tf.Session() # init = tf.global_variables_initializer() # sess.ru... 阅读全文
posted @ 2019-07-09 16:48 山…隹 阅读(189) 评论(0) 推荐(0)
摘要: 原图: 像素操作后: 阅读全文
posted @ 2019-07-09 16:11 山…隹 阅读(207) 评论(0) 推荐(0)
摘要: http://docs.jinkan.org/docs/flask/quickstart.html 阅读全文
posted @ 2019-06-25 15:34 山…隹 阅读(161) 评论(0) 推荐(0)
摘要: from pyspark import SparkContext, SparkConf import os from pyspark.sql.session import SparkSession from pyspark.sql import Row def CreateSparkContex() 阅读全文
posted @ 2019-06-21 23:19 山…隹 阅读(3552) 评论(0) 推荐(0)
摘要: 0. PairRDD的意思PairRDD就是元素为键值对的List转化过来的RDD对象,例如 rdd_1就是一般的非pairRDD,rdd_2为pairRDD对象,而有些SparkAPI操作是针对pairRDD对象的,例如后面将要介绍的mapValues()操作。 1. partitionBy()函 阅读全文
posted @ 2019-06-19 17:21 山…隹 阅读(2482) 评论(0) 推荐(0)
摘要: from hdfs.client import Client # 关于python操作hdfs的API可以查看官网: # https://hdfscli.readthedocs.io/en/latest/api.html # 读取hdfs文件内容,将每行存入数组返回 def read_hdfs_file(client, filename): # with client... 阅读全文
posted @ 2019-06-19 15:01 山…隹 阅读(3146) 评论(0) 推荐(0)
摘要: FS Shell 调用文件系统(FS)Shell命令应使用 bin/hadoop fs <args>的形式。 所有的的FS shell命令使用URI路径作为参数。URI格式是scheme://authority/path。对HDFS文件系统,scheme是hdfs,对本地文件系统,scheme是fi 阅读全文
posted @ 2019-06-19 13:55 山…隹 阅读(223) 评论(0) 推荐(0)
摘要: 转载 http://dblab.xmu.edu.cn/blog/1177-2/ Hadoop是一个能够让用户轻松架构和使用的分布式计算平台。为了更好演示集群分布,本文没有使用一台电脑上构建多个虚拟机的方法来模拟集群,而是使用三台电脑来搭建一个小型分布式集群环境安装。本文记录如何搭建并配置Hadoop 阅读全文
posted @ 2019-06-18 18:17 山…隹 阅读(489) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 29 下一页