Mengran's Blog

「We spent our lives making a living」

Python Data Science: Tensorflow and Machine Learning

How to use Tensorflow

Tensorflow 机器学习分类的原理 Tensorflow Module库 training data 训练数据: ax + by = c 收集大量的x,y数据并训练数据: train x, train y test data 测试数据 - 测试模型是否能正常使用: test x, test y Layers: Input Layer Hidden Layer...

Python Data Science: Matplotlib, Seaborn

How to use Matplotlib and Seaborn to draw plots and graphs

Matplotlib Python的绘图库 - Matplotlib 将数据预处理和清洗后,会将数据按照横纵坐标进行绘图,利用人工来检查数据情况 Install Matplotlib Open terminal to install matplotlib: pip install matplotlib Draw curves import matplotlib 库的 pyplo...

Python Data Science: Dataframe

Dataframe, n-dimensional array of pandas

Pandas最主要的两个数据结构:Series,DataFrame Series提供:index,values,map DataFrame常用的函数: describe() 统计性描述 drop_duplicates() 删除重复行 rename(columns=...) 更名 dropna() 删除具有空的行 isnull() 判断空值 fillna() 填充...

Python Data Science: Pandas and Series

Pandas 可以说是基于 NumPy 构建的含有更高级数据结构和分析能力的工具包 在数据分析工作中,Pandas 的使用频率是很高的: 一方面是因为 Pandas 提供的基础数据结构 DataFrame 与 json 的契合度很高,转换起来就很方便。 另一方面,如果我们日常的数据清理工作不是很复杂的话,你通常用几句 Pandas 代码就可以对数据进行规整。 Pandas 可...

Python Data Science: NumPy

NumPy NumPy is a Python library used for working with arrays. It is the core library for scientific computing in Python. It provides a high-performance multidimensional array object, and tools fo...

Python Basics - Simple Graph

Python Simple Graph

Python Simple Graphs

Python Basics 8: Python Library & Regular Expression

Use of Python Library & Regular Expression

Python Library library References The Python Standard Library Regular Expression 正则表达式库re 1.匹配固定字符 1 2 3 4 5 6 7 8 9 10 11 import re # match a fixed string # p to match with p = re.compile('a...

Python Basics 9: File and Directory Access

How to access file or folder in terminal, etc

File and Directory Access 使用命令行对文件和文件夹操作 open Terminal: 1.Check directory 查看当前目录所有文件 ls 2.Check which one is file, which one is folder 查看哪些是文件 哪些是文件夹 ls -l If the first letter starts with -,...

Tensorflow Resources

Tensorflow & Serverless

Tensorflow Resources 1.Using TensorFlow and the Serverless Framework for deep learning and image recognition 2.Creating a machine learning-powered REST API with Amazon API Gateway mapping templat...

Python Basics 7: Concurrency & Multithreading

Definition of Multithreading

Multithreading Scenario: There is a long queue for supermarket but only one till is running. 超市只有一个收银台但是排很长队 就需要multitasking Normal for loop - only one thread 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1...