
python
文章平均质量分 60
turing365
这个作者很懒,什么都没留下…
展开
-
NumPy教程
1.什么是NmupyNumPy是Python中科学计算的基础包。它是一个Python库,提供多维数组对象,各种派生对象(如掩码数组和矩阵),以及用于数组快速操作的各种API,有包括数学、逻辑、形状操作、排序、选择、输入输出、离散傅立叶变换、基本线性代数,基本统计运算和随机模拟等等。NumPy包的核心是ndarray 对象。它封装了python原生的同数据类型的n维数组,为了保证其性能优良,其...原创 2019-11-13 15:34:50 · 945 阅读 · 0 评论 -
python package
文章目录package与module间的关系空的 `__init__.py`文件如果`__init__.py` 不为空`package` 的初始化工作从 package 中导入变量的顺序使用 * 导入package与module间的关系Python是通过module来组织代码的,一个module就是一个.py文件,module又是通过 package来组织的,package 是一个包含 __...原创 2019-10-26 02:01:35 · 169 阅读 · 0 评论 -
python中的str与repr
文章目录二者的区别Python 中一切皆对象`__str__`和`__repr__`二者的区别在 Python 中要将某一类型的变量或者常量转换为字符串对象通常有两种方法,即 str() 或者 repr() 。一般来说,无论是在类中实现,还是单独使用。str() 的输出追求可读性,输出格式要便于理解,适合用于输出内容到用户终端。repr() 的输出追求明确性,除了对象内容,还需要展示出对...原创 2019-10-26 01:58:37 · 507 阅读 · 0 评论 -
《统计思维-程序员数学之概率统计》学习笔记
文章目录《统计思维-程序员数学之概率统计》学习笔记2.描述性统计量2.1 均值2.2 方差2.3 分布《统计思维-程序员数学之概率统计》学习笔记2.描述性统计量2.1 均值如果有一个包含n个值的样本xix_ixi,那么它们的均值μ\muμ等于这些值总和除以值的数量:μ=1n∑ixi\mu=\frac{1}{n}\sum_i{x_i}μ=n1i∑xi2.2 方差均值是为了描述集...原创 2019-02-08 03:51:07 · 519 阅读 · 0 评论 -
深度学习入门-基于python的理论与实现(1)
文章目录第一章:python入门1.5 NumPy1.5.2 生成NumPy数组1.5.5 广播1.6 Matplotlib1.6.1 绘制简单图形1.6.2 pyplot的功能1.6.3 显示图像第一章:python入门1.5 NumPy1.5.2 生成NumPy数组生成NumPy数组,需要np.array()方法,np.array()接受Python列表作为参数,生成NumPy数组(...原创 2019-02-11 19:03:29 · 311 阅读 · 0 评论 -
深度学习入门-基于python的理论与实现(2)
文章目录第二章:感知器(perceptron)2.1 感知器是什么2.2 简单的逻辑电路2.2.1 与门2.2.2 与非门和或门2.3 感知器的实现2.3.1 简单的实现2.3.2 导入权重和偏置2.3.3 使用权重和偏置的实现2.4 感知器的局限性2.4.1 异或门2.4.2 线性和非线性2.5 多层感知器2.5.1 已有门电路的组合2.5.2 异或门的实现第二章:感知器(perceptro...原创 2019-02-14 03:37:53 · 466 阅读 · 0 评论 -
2.Add Two Numbers
2.Add Two Numbersmedium代码还是不够熟练You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit...原创 2019-04-01 06:29:20 · 192 阅读 · 0 评论 -
4. Median of Two Sorted Arrays
题目There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).You may assume nums1 and ...原创 2019-04-07 23:44:05 · 123 阅读 · 0 评论 -
paddlepaddle手写字体识别
本文利用多层感知器训练(DNN)模型,用于预测手写数字图片,示例如下:实践总体过程和步骤首先导入必要的包#导入需要的包import numpy as npimport paddle as paddleimport paddle.fluid as fluidfrom PIL import Imageimport matplotlib.pyplot as pltimport os...原创 2019-09-04 15:41:59 · 2265 阅读 · 0 评论 -
《Flask Web开发》读书笔记(一)
文章目录《Flask Web开发》读书笔记(一)第一部分 Flask简介1.安装2.程序的基本结构2.1 初始化2.2 路由和视图函数路由2.3 启动服务器2.4 一个完整的程序《Flask Web开发》读书笔记(一)第一部分 Flask简介1.安装Flask有两个主要依赖:路由、调试和Web服务器网关接口(Web Server Gateway Interface,WSGI)子系统由W...原创 2019-02-06 10:07:50 · 288 阅读 · 0 评论 -
服务器jupyter notebook配置记录
服务器jupyter notebook配置记录1.安装anaconda直接按照提示安装anaconda,然后需要更新环境变量://更新bashrc以立即生效source ~/.bashrc2.配置Jupyter Notebook安装pip3(不装也行)//安装sudo apt-get install python3-pip//升级sudo pip3 install --upg...原创 2019-02-04 10:36:09 · 237 阅读 · 0 评论 -
第二周作业 Logistic Regression with a Neural Network mindset
Logistic Regression with a Neural Network mindsetWelcome to your first (required) programming assignment! You will build a logistic regression classifier to recognize cats. This assignment will ste...原创 2018-04-25 11:02:17 · 210 阅读 · 0 评论 -
第二周作业 Logistic Regression with a Neural Network mindset思路整理
作业思路整理数据预处理1. 导入数据2.把train和test的格式变一致了3.standardlize算法构建步骤1.sigmoid2. initializing parameters3. Forward and Backward propagation4. optimization5.predict6. merge all function into a mo...原创 2018-05-19 11:51:04 · 323 阅读 · 0 评论 -
pandas合并concat
可以将多个DataFrame进行多种方式的合并 例如DataFrame格式一致import numpy as npimport pandas as pd# concatenatingdf1=pd.DataFrame(np.ones((3,4))*0,columns=['a','b','c','d'])df2=pd.DataFrame(np.ones((3,4))*1,...原创 2018-06-12 01:48:53 · 708 阅读 · 0 评论 -
167. Two Sum II - Input array is sorted
167. Two Sum II - Input array is sortedeasy题目题目 Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The ...原创 2018-06-17 02:16:51 · 214 阅读 · 0 评论 -
28. Implement strStr()
28. Implement strStr()题目代码:28. Implement strStr()easy题目Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystac...原创 2018-06-18 21:06:10 · 189 阅读 · 0 评论 -
pandas.DataFrame.append()
DataFrame.append(other, ignore_index=False, verify_integrity=False, sort=None)用法将其他行添加到此DataFrame的末尾,返回一个新对象。 不在此DataFrame中的列将作为新列添加。参数other:DataFrame或Series / dict-like对象,或者这些要附加的数据的列表i...原创 2018-06-11 01:53:28 · 19234 阅读 · 0 评论 -
561. Array Partition I
Leetcode 561. Array Partition IEasy题目Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum of min(ai, bi) ...原创 2019-01-12 06:09:40 · 133 阅读 · 0 评论 -
922. Sort Array By Parity II
922. Sort Array By Parity IIEasy题目Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even.Sort the array so that whenever A[i] is odd, i is ...原创 2019-01-12 07:47:17 · 162 阅读 · 0 评论 -
第二周作业 Python Basics with Numpy
Python Basics with Numpy (optional assignment)1 Building basic functions with numpyNumpy is the main package for scientific computing in Python. It is maintained by a large community (www.numpy.o...原创 2018-04-25 10:47:33 · 281 阅读 · 0 评论