![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
文章平均质量分 57
星璇love
美国西雅图程序员
展开
-
Python UDP Server and Client
Python UDP Server and Client最近自学python, 尝试写了些Python 的server和client Python UDP Server Python UDP Client str 与bytes的转换 Python UDP Server不同于TCP需要先建立虚拟的连接,UDP不需要事先建立连接。只要知道互相的ip地址和端口号就可以发消息通信,UDP不像TCP那样保证可原创 2017-07-02 16:48:23 · 3689 阅读 · 0 评论 -
python input和raw_input的区别
python input和raw_input的区别inputname = input("what's your name?") print "hello"+nameinput函数假定用户输入的是合法的Python表达式,直接输入将会报错!如下: what’s your name?vince Traceback (most recent call last): File “/Users/vi原创 2017-07-29 20:55:10 · 273 阅读 · 0 评论 -
Python 操作sqlite数据库
sqlite简介sqlite是一种轻量级的数据库,它最大的特点就是无需安装。数据库本身以一个单独的文件的形式存放。 sqlite只有5种数据类型: NULL 值是一个 NULL 值。 INTEGER 值是一个带符号的整数,根据值的大小存储在 1、2、3、4、6 或 8 字节中。 REAL 值是一个浮点值,存储为 8 字节的 IEEE 浮点数字。 TEXT 值是一个文本字符原创 2017-08-09 16:27:23 · 926 阅读 · 0 评论 -
TensorFlow 实现Softmax Regression 识别数字
TensorFlow机器学习hello world任务MNIST手写数字识别MNIST是个机器视觉数据集,包含大量28像素*28像素的手写数字图片,且带有数字标签对应每张图片的数字。 获取数据的代码如下: 数据特征如下: 代码及详细分析import tensorflow as tf #获取数据集 from tensorflow.examples.tutorials.mnist import原创 2017-08-04 17:41:59 · 448 阅读 · 0 评论 -
TensorFlow Session使用的两种方法
TensorFlow Session在TensorFlow中是通过session进行交互的,使用session有两种方法。下面通过一个简单的例子(两个矩阵相乘)说一下 {[3,1] 与{[5,2] 相乘 [1,2]} [2,4]}代码#encoding=utf-8 import tensorflow as tfmatrix1 = tf.constant([[3,1],[1,2]]原创 2017-08-05 17:40:50 · 5391 阅读 · 0 评论 -
TensorFlow Variable, Placeholder 以及激励函数学习小结
TensorFlow Variable#encoding=utf-8 import tensorflow as tfstate = tf.Variable(0,name='counter') #初始值为0,名字叫counter #print(state.name) one = tf.constant(1)new_value = tf.add(state,one) update = tf.assign原创 2017-08-05 21:07:31 · 737 阅读 · 0 评论 -
TensorFlow入门简单机器学习练习
TensorFlow入门简单机器学习例子TensorFlow简介TensorFlow是一个开源软件库,用于各种感知和语言理解任务的机器学习。TensorFlow是由谷歌开发的,注意支持Python语言,用起来还是蛮方便的。 本文的代码是在Ubantu64位系统下用pyhton3和TensorFlow1.2运行的。TensorFlow用于拟合函数当我们给出一系列(x,y)值的点,这些点遵循某个函数那原创 2017-08-04 17:30:01 · 572 阅读 · 0 评论 -
Facebook prophet Python的简单使用
Facebook prophet 的使用 Prophet意为先知、预言家。Prophet is a forecasting procedure implemented in R and Python. It is fast and provides completely automated forecasts that can be tuned by hand by data scientist原创 2018-01-27 16:56:51 · 9458 阅读 · 4 评论