自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

三笔竹林的博客

程序媛的自我修养

  • 博客(64)
  • 收藏
  • 关注

原创 数串:给定一传数,组成最大数字

链接:https://www.nowcoder.com/questionTerminal/a6a656249f404eb498d16b2f8eaa2c60来源:牛客网设有n个正整数,将他们连接成一排,组成一个最大的多位整数。如:n=3时,3个整数13,312,343,连成的最大整数为34331213。如:n=4时,4个整数7,13,4,246连接成的最大整数为7424613。输入描述:...

2018-09-30 15:47:29 639

原创 Leetcode图专题

要明白的基础知识node1=UndirectedGraphNode(1)node2=UndirectedGraphNode(2)nodeMap={}nodeMap[node1]="hello"nodeMap[node2]="world"#这样是合法的,打印nodeMap看看nodeMapOut[8]: {<__main__.UndirectedGraphNode at 0x...

2018-09-22 21:20:54 1761

原创 顺时针打印矩阵+矩阵中是否存在某路径+Google KickStart8.24B题

每天积累一点点,相信校招结束时会很棒顺时针打印矩阵我发现牛客网上有这道原题哎 https://www.nowcoder.com/questionTerminal/9b4c81a02cd34f76be2659fa0d54342a看到一个大神的思路实在是惊艳到我了class Solution: def printMatrix(self, matrix): re...

2018-08-14 20:28:57 258

原创 shell 脚本执行python脚本,连接hive提交数据写入表

使用说明技术实现说明shell 脚本 try2.shpython脚本使用说明1.cd /opt/zy 在这个目录下以root用户权限执行命令 2. 在SAP查询的时候 Tcode:ZMMR0005 Purchase Org * PO Creating:2017/3/1 (开始日期) 2017/6/31(结束日期) Vendor 1000341 ...

2018-05-29 16:07:33 7587

原创 用Python复现R 时序预测相关函数

项目数据PN_IB是2011-03-1到2019-10-01的数据,以月为分隔符 PN_usage是2011-06-25到2017-08-05的数据,以周为分割 long_term_pred_results 2014-10-04到2018-03-31项目结构基础语法读取文件usage = read.csv('data/TopmostPN_filter_weekl...

2018-05-11 16:26:33 797

原创 互联网笔试+网易2019暑期实习编程题+拼多多19校招

语法错误总结防止空行的循环读取输入oneline=sys.stdin.readline().strip() while not oneline: oneline=sys.stdin.readline().strip()N,M=map(int,oneline.split())字符串中的字符不能被 = 直接替换值s='abcdef's[2]='g'Tra...

2018-04-30 20:41:08 1510

原创 Python 字典操作 总结

字典增team={}#创建字典team['aaa']=1#往字典里添加元素team['bbb']=2team.keys()dict_keys(['aaa', 'bbb'])'aaa' in team.keys()True'la' in team.keys()Falseteam.values()dict_values([1, 2])3 in team.va...

2018-04-04 10:38:56 1087

原创 LINUX SHELL命令学习

Linux常用命令/ 常见面试题ls和echoShell创建第一个shell脚本执行shell脚本作为可执行程序执行作为解释器参数执行脚本变量定义变量使用变量只读变量删除变量变量类型查看文件内容catvimLeetcode例题实操1Leetcode例题实操2 截取文件的某一行sed(属于文档编辑命令)如何查看某一行的长度如何截取某些行...

2018-04-03 16:05:33 295

原创 Microsoft Azure Machine Learning使用探索

写在前面感谢公司提供的Microsoft Azure 机器学习平台 我不是微软的托哈,但是一用觉得,这东西太方便了吧! 最大的优点在于快速试错上传数据集添加新的实验在页面最左下角有一个加号,点一下然后是下图: 选黄色的加号然后到实验区,把输入的csv拽进来 点这个训练数据集,右键选visualize可视化 众所周知Titanic数据集里有PClas...

2018-03-28 10:06:29 2168 1

原创 概率论知识点整理

概率论 (《概率论与数理统计》 主编 金大勇 徐永)1.2.3 概率的性质加法定理 A,B是任意两个事件,则P(AUB)=P(A)+P(B)-P(AB) A,B是任意两个事件,则P(A-B)=P(A非B)=P(A)-P(AB) 1.3 古典概型(抽球!)1.4 条件概率定义1.4 A,B是两个事件,且P(A)>0,称P(AB)/P(A)为在...

2018-03-25 17:31:14 58300 4

原创 Django Demo搭建

写在前面环境配置Django项目说明新建项目时的参数选择项目文件用途说明:search.py 最关键的定义API的地方urls.py 定义路由规则:即在浏览器里输入url调用哪个函数settings.py 整个项目的设置运行服务 python manage.py runserver 0.0.0.0:8000与数据库打交道时需注意的问题判断空的单元格用 is None...

2018-03-22 12:42:11 1276

原创 Leetcode树专题

树的常识三种遍历方法对应的数据结构Leetcode257.Binary Tree Paths思路:很典型的深度优先搜索配合栈,宽度优先搜索配合队列。学一个遍历二叉树的方法Leetcode111. Minimum Depth of Binary Tree(求二叉树的最短深度)较差的思路:从上题思路套用而来,先求得所有路径的节点数(就是长度),再求最小值较好的思路:宽度优先搜...

2018-02-27 15:35:02 838

原创 Leetcode链表专题

Leetcode链表专题Python与C链表操作对比Leetcode21-剑指OFFER面试题25合并两个有序的链表思路分析代码Leetcode206Reverse Linked List剑指OFFER面试题24 反转链表思路分析代码Python与C++链表操作对比C++判断一个节点是不是空节点的写法://比如:void Doing(Lis...

2018-02-26 16:57:48 366

原创 关于Python语法面试题总结

本篇博文用来记录我对python语法不熟悉的知识点 目录Python中的yield函数生成器简介生成器函数生成器的send检查列表为空的方法如何判断是否为np.nanpandas对多列fillna()pandas如何根据其他两列决定某一列的值Python中的复制快捷键Markdown及扩展表格定义列表代码块numpy读写二进制文件脚注目录数学公式...

2018-02-25 17:51:42 488

原创 Leetcode50 Pow(x,n)

Implement pow(x, n).Example 1:Input: 2.00000, 10Output: 1024.00000Example 2:Input: 2.10000, 3Output: 9.26100剑指offer的解法(我的翻译)42ms,打败18.70%的答案:class Solution(object):

2018-02-20 19:13:22 180

原创 Leetcode中的位操作

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 000000000000...

2018-02-19 11:38:18 289

原创 Kaggle Mercari Price Suggestion

参赛经验代码技巧积累计算时间文件读取动态获取数据集行列数 Series转DataFrame便捷写法一句话把某列是否为空变成新的一列特征loclambda x xindex missing第一次见frozensetFeature UnionPipeline细节详解fit_transform和transform的区别ItemSelector用于选择某列Hashing...

2018-02-17 19:32:21 1349

原创 剑指OFFER 读书心得 python实现

别人的总结成果,感谢第一章 面试常识第二章 面试需要的基础知识2-3数据结构2-3-1数组 面试题3 Search a number in 2D Matrix2-3-2字符串 面试题4 URL替换空格2-3-3链表(面试题5 从头到尾打印链表)2-3-4树 (面试题6 重建二叉树)2-3-5栈和队列(面试题7 用两个栈实现一个队列)2-4算法和数据操作2-4-1查...

2018-02-07 15:59:57 413

原创 Search a 2D matrix II(剑指offer2.3原题)

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right.Integers in each col...

2018-02-07 12:21:07 227

原创 Leetcode 动态规划最长公共子序列+ 198HouseRobbingI+II +746Min Cost Climbing Stairs

动态规划解解题思路总结:一个很复杂的问题可以分解成形式类似,模式更小的问题。先尝试解决这个小问题,再扩大到大问题。要从小问题中看出动态规划状态转移式(表达式)。最长公共子串LCSubstringstr1='abcdscde'str2='jaserewcderew'def getNumofCommonSubStr(str1,str2): lenstr1=len(str1)...

2018-02-04 14:48:49 334

原创 神奇的数字 202. Happy Number

Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares

2018-02-01 18:44:22 327

原创 Hadoop自学(慕课网自学笔记)

面试的时候老被问会不会hadoop,其实我很无语的啊,说实话SUPINFO毕业的人怕学不会东西吗?只分学过和没学过,不存在学不会的好伐。那么现在就来学学试试吧。尊重原著先附上教程网址:https://www.imooc.com/video/16287Hadoop=HDFS(分布式文件系统,存储是大数据技术的基础)+MapReduce(分布式计算,是大数据应用

2018-02-01 17:30:53 2686

原创 739 Daily Temperatures

Given a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which thi

2018-01-30 11:58:30 149

翻译 463 IsLand Perimeter

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely

2018-01-29 21:40:41 139

原创 Leetcode Hash Table专题 389. Find the Difference+771. Jewels and Stones+554. Brick Wall

Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was added ...

2018-01-29 12:37:02 206

原创 766. Toeplitz Matrix

A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element.Now given an M x N matrix, return True if and only if the matrix is Toeplitz. Example 1:Input: m

2018-01-29 11:57:49 286 1

原创 118.Pascal's Triangle

118. Pascal's TriangleGiven numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]

2018-01-24 15:48:02 165

原创 吴恩达深度学习听课笔记

我对Logistic回归的全部理解Q1:logistic中为什么要用sigmod函数?A1:情境是这样的:       已知输入x,我们想要的预测值yhat=P(y=1|x),即给定x的条件下,y等于1的概率。       参数是w, b       输出:yhat=wx+b         这个输出就是线性回归了,但线性回归不是一个好的二分类做法,因为我们希望yhat是给

2018-01-06 10:30:08 385

原创 67.Add Binary

Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".我的原创解法:62ms,打败了14.46%的python答案我的思路:和十进制加法的套路一样class Solution(object): def

2018-01-02 11:31:35 230

原创 Leetcode 刷题 Binary Search Easy难度经验总结

[TOC]刷了4道Binary Search  Easy难度的题二叉搜索思想好想,难在边界的控制上,于是乎我就在思考能不能背下一个定式,遇到二分搜索的题目就套这个定式。我做的第一道二叉搜索的题目就是一个很好的定式:#744. Find Smallest Letter Greater Than TargetGiven a list of sorted characters letters conta...

2017-12-24 11:21:45 301

原创 期末考核SpringBoot进阶之Web进阶

https://www.imooc.com/video/14343 廖师兄SpringBoot进阶AOP是一种思想,不是一种语言像.NET,C#,Java都有AOP的思想横向看的红箭头是切面,就把逻辑从具体的业务逻辑中抽出来了比如课程中,就把记录请求和记录回复作为两个切面 进行编程

2017-12-17 13:06:49 324

原创 期末考核突击之SpringBoot自学笔记

我是一枚想往机器学习转型的web 开发程序媛没办法,马上就期末考核了,我学的机器学习那些事都不能提,还是得说说在web开发这方面有何进展so,跟着慕课网这个视频突击了一下:https://www.imooc.com/video/13589这个教程挺好的,第一节课主要讲用IDEA创建spring boot 应用程序后面的课程讲解做girls这个网站,是一个demo。个人觉

2017-12-16 20:40:27 1184

原创 Kaggle Titanic 模型优化提升第三弹

参考网站:模型融合的理论教程:http://m.blog.csdn.net/shine19930820/article/details/75209021

2017-12-06 12:16:42 468

原创 Kaggle Titanic 机器学习实践笔记(二)

Kaggle titanic数据预处理填补空缺值baseline_modellearning_curve

2017-12-04 22:04:42 605

原创 Kaggle Titanic 机器学习实践笔记

目录结构是这个样子的:Titanic  --data (放官网的数据)       -train.csv       -test.csv      -gender_submission.csv --program     -data_exploration.py做题先审题,在官网的data页里能看到对于各字段的说明:Data Dictionary

2017-12-04 17:02:11 1626

原创 Leetcode 215 Kth Largest Element in an Array

Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,4] and k = 2, return 5.Note: Y

2017-11-28 20:39:22 151

转载 Python中的多进程和多线程

http://xiaosheng.me/2017/04/01/article47/ 今天看了这么一篇教程,很好。终于明白了多进程和多线程的区别,总结如下:多进程与多线程我们都知道,操作系统中所有的程序都是以进程的方式来运行的,或者说我们把运行着的程序称为进程(Process)。例如运行记事本程序就是启动一个记事本进程,运行两个记事本就是启动两个记事本进程。很多时

2017-11-28 20:07:26 272

原创 Leetcode350 Intersection of Two Arrays II &Leetcode Intersection of Two Arrays

Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should appear as many times as it sho

2017-11-27 18:47:07 151

翻译 Leetcode141. Linked List Cycle

Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?这道题的经典之处在于它的思想, "Easier to ask for forgiveness than permission."妈呀人生哲理~

2017-11-23 17:41:17 156

原创 Leetcode665 (Array) Non-decreasing Array +Leetcode674 Longest Continuous Increasing Subsequence

Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-decreasing if array[i]  holds for every i (1

2017-11-22 19:15:56 220

空空如也

空空如也

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

TA关注的人

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