自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

欲与将军会猎与吴

我的学习笔记

  • 博客(41)
  • 资源 (1)
  • 收藏
  • 关注

原创 NumPy教程

1.什么是NmupyNumPy是Python中科学计算的基础包。它是一个Python库,提供多维数组对象,各种派生对象(如掩码数组和矩阵),以及用于数组快速操作的各种API,有包括数学、逻辑、形状操作、排序、选择、输入输出、离散傅立叶变换、基本线性代数,基本统计运算和随机模拟等等。NumPy包的核心是ndarray 对象。它封装了python原生的同数据类型的n维数组,为了保证其性能优良,其...

2019-11-13 15:34:50 779

原创 Visual Studio Online 体验

期盼了很久,VSCode Online终于发布了。Visual Studio Online 提供了由云服务支撑的开发环境。只要在浏览器中打开相关页面,就能在其中编写代码了,以后用蓝牙键盘连接iPad,就完全可以在上面写代码了,不用担心电脑没有在身边。官网介绍下,Visual Studio Online有以下特点:可以直接在 Web 版 VS Code 中打开你的 Git 项目。支持 VS ...

2019-11-05 10:15:40 7988 1

原创 leetcode 1232. Check If It Is a Straight Line

文章目录159 场周赛第一题题意思路pythonEasy159 场周赛第一题题意You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line ...

2019-10-26 02:02:54 527

原创 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 127

原创 python中的str与repr

文章目录二者的区别Python 中一切皆对象`__str__`和`__repr__`二者的区别在 Python 中要将某一类型的变量或者常量转换为字符串对象通常有两种方法,即 str() 或者 repr() 。一般来说,无论是在类中实现,还是单独使用。str() 的输出追求可读性,输出格式要便于理解,适合用于输出内容到用户终端。repr() 的输出追求明确性,除了对象内容,还需要展示出对...

2019-10-26 01:58:37 436

原创 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 2109

原创 leetcode 908 Smallest Range I

Easy题目:Given an array A of integers, for each integer A[i] we may choose any x with -K <= x <= K, and add x to A[i].After this process, we have some array B.Return the smallest possible diff...

2019-09-04 02:16:49 83

原创 121 Best Time to Buy and Sell Stock

leetcode 121 Best Time to Buy and Sell Stock题意Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (...

2019-09-01 17:41:05 105

原创 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 88

原创 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 158

原创 《数据科学实战》笔记1

文章目录第三章 算法3.1机器学习算法3.2 三大基本算法3.2.1 线性回归模型模型拟合最小二乘模型的延伸增添关于模型误差项的假设模型评估标准增加预测变量对预测变量加以变换3.2.2 k近邻模型(k-NN)相似性/距离测度3.2.3 k均值算法第三章 算法数据科学里必须要了解的算法:数据清理和预处理的算法(数据过程)。比如排序、MapReduce、Pregel用于参数估计的最优化算法...

2019-02-24 12:27:31 393

原创 深度学习入门-基于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 420

原创 深度学习入门-基于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 263

原创 《统计思维-程序员数学之概率统计》学习笔记

文章目录《统计思维-程序员数学之概率统计》学习笔记2.描述性统计量2.1 均值2.2 方差2.3 分布《统计思维-程序员数学之概率统计》学习笔记2.描述性统计量2.1 均值如果有一个包含n个值的样本xix_ixi​,那么它们的均值μ\muμ等于这些值总和除以值的数量:μ=1n∑ixi\mu=\frac{1}{n}\sum_i{x_i}μ=n1​i∑​xi​2.2 方差均值是为了描述集...

2019-02-08 03:51:07 453

原创 《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 237

原创 服务器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 180

原创 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 127

原创 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 101

原创 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 154

原创 79. Word Search

LeetCode 79. Word Search题目解法时间复杂度空间复杂度代码LeetCode 79. Word Search题目Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters o...

2018-06-18 09:40:06 287

原创 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 176

原创 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 646

原创 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 19132

原创 119. Pascal's Triangle II

题目Given a non-negative index k where k ≤ 33, return the kthkthk^{th} index row of the Pascal’s triangle.Note that the row index starts from 0. In Pascal’s triangle, each number is the sum of t...

2018-06-04 21:04:59 121

原创 15. 3Sum

15. 3Sum题目描述思路分析代码实现C++javapython使用哈希+双指针双指针,但别人优化的更好15. 3Sum题目描述Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find al...

2018-06-04 13:15:49 2123

原创 SVD++推荐系统

大数据推荐系统原理我们把用户的评分行为表示成一个评分矩阵RRR,其中R[u][i]R[u][i]R[u][i]就是用户uuu对物品iii的评分。但用户不会对所有的物品评分,所以这个矩阵里有很多元素都是空的因此,评分预测从某种意义上说就是对这些元素填空,如果一个用户对一个物品没有评过分,那么推荐系统就要预测这个用户是否是否会对这个物品评分以及会评几分。所以我们需要寻找一种对矩阵扰...

2018-06-02 00:49:58 12126 4

原创 66.Plus One

66.Plus One题目Given a non-empty array of digits representing a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of the lis...

2018-05-28 02:09:54 175

原创 实验楼机器学习挑战赛-------最小二乘法 Python 实现

介绍 目标根据上面的最小二乘法代数推导过程,使用 Python 实现样本 x, y 的最小二乘法求解的函数。def least_squares_function(x, y): """ 参数: x -- 样本 x 取值列表 y -- 样本 y 取值列表 返回: w0 -- 线性方程参数, 保留两位小数 w1 -- 线性...

2018-05-28 02:04:14 367

转载 JavaScript学习笔记一:从一个猜数游戏开始

JavaScript学习笔记一1.猜数字游戏1.1 要求:设计一个猜数游戏1.2 从程序员的思维思考1.3 将思路转化为代码1.3.1 初始设置1.3.2 添加变量以保存数据1.3.3 函数1.3.4 运算符1.3.5 条件1.3.6 事件1.3.7 进一步完善游戏1.3.8 一些关于函数的事1.4 源代码JavaScript学习笔记一...

2018-05-26 14:08:18 1255

原创 27. Remove Element

题目描述Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the inpu...

2018-05-21 15:38:14 114

原创 226. Invert Binary Tree

题目描述Invert a binary treeExample:Input: 4 / \ 2 7 / \ / \1 3 6 9Output: 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired by this o...

2018-05-21 00:33:18 77

原创 617. Merge Two Binary Trees

题目描述Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.Example 1:Input: Tree 1 ...

2018-05-20 23:36:49 149

原创 第二周作业 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 271

原创 并行算法分析

并行算法分析基本指标并行算法分析 VS 串行算法分析并行程序设计的复杂性并行算法的额外开销性能评价标准效率代价可扩展性并行算法分析基本指标并行算法分析 VS 串行算法分析串行算法评价:算法时间复杂度表示为输入规模的函数并行算法评价:除了输入规模之外,还应考虑处理器数目、**处理器相对运算速 度、通信速度**评价标准 运行时间加...

2018-05-13 16:47:45 2249

原创 并行算法设计

并行算法设计并行算法设计任务分解、数据依赖、竞争条件设计一个并行算法竞争条件与数据依赖n 个数求和的例子1.串行算法2. 并行算法版本1:计算任务划分版本2:加锁版本3:粗粒度版本4:消除锁同步方法:障碍版本5:消除锁,但增加障碍版本6:多核并行求全局和求和例子总结数据并行如何设计并行算法其他任务划分方法并行算法设计并...

2018-05-13 16:10:17 1483

原创 CSS学习二:CSS语法

CSS学习二:CSS语法1.CSS最基本的层次一个例子2. CSS语法细节2.1 CSS声明注意2.2 CSS声明块注意2.3 CSS选择器与规则注意3. CSS语句CSS学习二:CSS语法1.CSS最基本的层次从最基本的层次来看,CSS是由两块内容组合而成的:属性(Propertie):一些人类可理解的标识符,这些...

2018-05-07 04:26:25 233

原创 CSS学习一:CSS如何工作

CSS学习一:CSS如何工作1.什么是CSS2. CSS如何影响HTML一个CSS示例3. CSS实际上如何工作DOMDOM的表示应用CSS到DOM4.1 外部样式表4.2 内部样式表4.3 内联样式CSS学习一:CSS如何工作1.什么是CSSCSS是一种用于向用户指定文档如何呈现的语言 — 它们如何被指定样式、布局等。 文档...

2018-05-07 03:48:04 458 1

原创 Pthread并行编程总结

Pthread并行编程总结1. pthread_createpthread_create的效果一个简单的线程例子2. 线程数据共享3. Pthread “Hello world”3.1 一些准备3.2 pthread_join函数3.3 “Hello World”4. Pthread 其他基础 API4.1 pthread_exit( )4.2 pthread_...

2018-05-06 17:50:18 2857

原创 第二周作业 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 166

原创 第二周作业 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 238

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除