- 博客(9)
- 资源 (5)
- 收藏
- 关注
原创 Python3.x安装Pandas教程
python3.x 安装pandas总是会出现一些乱七八糟的问题,那现在就给你们讲述一种超级简单的安装方法,非常简单。1,检查自己的python版本,我的是python3.4 32位的2,https://www.lfd.uci.edu/~gohlke/pythonlibs/ 进入此网页,按住Ctrl+F,查找所需要的库点击自己需要的版本,我的是34,win32,所以我下载第一个...
2018-11-29 10:58:28
13259
6
原创 最长公共子序列
public class Lcs { public static int LcsLength(String[] x, String[] y, int [][]b) { int m =x.length-1; int n=y.length-1; int [][]c = new int [m+1][n+1]; for(int i=1;i<=m;i++)c[i][0]=0; ...
2018-11-26 15:21:09
174
原创 电路布线算法的java实现
在一块电路板的上、下两端分别有n个接线柱。根据电路设计,要求用导线(i,π(i)) 将上端接线柱i与下端接线柱π(i)相连,如下图。其中,π(i),1≤ i ≤n,是{1,2,…,n}的一个排列。导线(I, π(i))称为该电路板上的第i条连线。对于任何1 ≤ i ≤ j ≤n,第i条连线和第j条连线相交的充要条件是π(i)&amp;gt; π(j).public class dianlubuxian ...
2018-11-26 14:56:27
1351
原创 对文件进行操作,将所需概率求出
首先打开文件,遍历文件中的每一行,将每一行看做成列表,将列表的中的每一个元素遍历,如果有所需的数据就记录下来,方便以后的操作。import mathjob=input("请输入关键字:")addr=input("请输入地址:")sal=float(input("请输入薪资(万/月):"))def P(job,addr,sal): file = open("D:\\1.txt","...
2018-11-22 10:10:15
169
原创 python 将爬取的数据保存在数据库里
python 将爬取的数据保存在数据库里import urllib.requestimport reimport sqlite3response = urllib.request.urlopen("https://search.51job.com/list/010000%252C020000%252C030200%252C040000,000000,0000,00,9,99,python,...
2018-11-15 10:45:01
1145
原创 python 爬虫将所爬到的数据保存在文件中
Python 爬虫,将所爬到的数据保存在.txt文件中import urllib.requestimport reresponse = urllib.request.urlopen("https://search.51job.com/list/010000%252C020000%252C030200%252C040000,000000,0000,00,9,99,python,2,1.html...
2018-11-15 10:27:57
2638
原创 python 实现使用tcp协议
.使用tcp协议编写满足如下要求的服务器端和客户端代码,客户端向服务器端发送以下两种格式的请求数据:格式一:GET filename例如GET 1.txt服务器收到这种格式的请求之后,读取c:\homepages\目录下面指定filename文件(例如c:\homepage\1.txt)的内容,并按照如下约定返回响应数据:如果文件存在,则返回两行内容:200c:\homepage\...
2018-11-14 21:04:27
1276
原创 快速排序的非递归算法JAVA,使用栈来模拟递归
使用栈来模拟递归,消去qSort中的尾递归public class stackQSort {private static int Partition(int[] arr, int start, int end) {//arr[start]为挖的第一个坑int key = arr[start];while (start &amp;amp;amp;lt; end) {while (arr[end] &amp;amp;amp;gt;= k...
2018-10-29 15:37:51
398
原创 java实现简单的快速排序,合并排序
合并排序public class MergeSort{public static void merge(int[]c,int[]d,int l,int m,int r){ //合并c[l:m]和c[m+1:r]到d[l:r] int i=l,j=m+1,k=l; while((i&amp;lt;=m)&amp;amp;&amp;amp;(j&amp;lt;=r))//保证数组中还有元素 if(c[i]&am
2018-10-29 15:34:09
266
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅