自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(184)
  • 资源 (2)
  • 收藏
  • 关注

原创 安装ubuntu

1 在https://www.ubuntu.com/download/desktop 下载ubuntu2 使用U盘安装ubuntu,window下使用工具Rufus https://rufus.akeo.ie/   Mac下参考https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-macos#03 wind

2017-12-03 16:22:54 287

原创 Reinforcement learning tips

Reinforcement 算法:(1)通过行为的价值选择特定的行为,包括基于表格学习的Q learning, Sarsa,使用神经网络进行学习的Deep Q Network                                        (2)直接选择行为的Policy Gradients                                        (3)

2017-11-14 19:39:48 248

原创 matplotlib tips

##matplotlib可以画出:线图,散点图,等高线图,条形图,柱状图,3D图形,图形动画等import matplotlib.pyplot as pltimport numpy as np#使用np.linspace定义x:范围是(-1,1),个数是50个#仿真一维数组(x,y)表示曲线x = np.linspace(-1,1,50)y = 2*x + 1

2017-11-11 19:53:40 395

原创 Numpy 性能

#简单好用的python(速度慢)+ 速度较快的numpy(基于C语言)#在numpy中,创建二维数组的默认方式为“C-type”,以行序在内存中存储数据#如果是“Fortran”方式创建,是以列序在内存中存储import numpy as npimport pandas as pdimport timerow_major = np.zeros((10,10),order

2017-11-10 21:38:20 344

原创 pandas tips one

import pandas as pddf1 = pd.DataFrame({'col1':[0,1],'col_left':['a','b']})#按列定义df2 = pd.DataFrame({'col1':[1,2,2],'col_right':[2,2,2]})print(df1)##   col1 col_left##0     0        a##1

2017-11-10 20:05:08 2692

原创 Pandas tips

#numpy主要是列表形式,pandas主要是字典形式,pandas是基于numpy构建的#使得应用更加的简单,pandas的两个主要的数据结构为:Series和DataFrameimport pandas as pdimport numpy as nps = pd.Series([1,3,6,np.nan,44,1])print(s)#Series的字符串形式为:索引

2017-11-10 17:24:26 268

原创 numpy tips one

import numpy as npA = np.arange(3,15)#array([3,4,5,6,7,8,9,10,11,12,13,14])print(A[3]) #6A = np.arange(3,15).reshape((3,4))print(A[2])#[11 12 13 14],打印第3行print(A[1][1]) #8print(A[1,1

2017-11-10 14:44:14 207

原创 numpy tips

import numpy as nparray = np.array([[1,2,3],[2,3,4]]) #列表转化为矩阵print(array)print('number of dim:',array.ndim) #打印维度print('shape:',array.shape) #行数和列数print('size:',array.size) #元素个数+

2017-11-09 21:56:11 199

原创 Some tips about python Seven

import tkinter as tkwindow = tk.Tk()window.title('my window')window.geometry('200x200')l = tk.Label(window,text='',bg='yellow')#定义labell.pack()#把label包装到窗口上counter = 0def do_job():

2017-11-09 16:54:41 185

原创 ¥¥¥¥ 63大计算机科学顶级会议

算法(Algorithms and complexity):STOC, SODA, FOCS人工智能(Artificial intelligence):AAAI, IJCAI计算机体系结构(Computer architectures):MICRO, ISCA, ASPLOS密码学(Cryptography):EUROCRYPT, CRYPTO数据挖

2017-11-07 09:35:25 326

原创 some tips about python Six

import tkinter as tk #引入模块window = tk.Tk() #设置window对象window.title('my window')window.geometry('200x200')l = tk.Label(window,bg = 'yellow',width = 22,text = 'empty')#设置Label对象,宽度是2

2017-10-06 15:38:31 281

原创 come tips about python Five

import tkinter as tk  #引入GUI模块window = tk.Tk()     #创建Tk对象--窗口window.title('my window') #窗口的名称window.geometry('200x100')#窗口的大小,注意xvar = tk.StringVar() #定义字符串变量对象l = tk.Label(wind

2017-10-06 13:41:18 240

原创 some tips about python Four

import picklea_dict = {'da':111,2:[23,1,4],'23':{1:2,'d':'sad'}}file = open('pickle_example.pickle','wb')pickle.dump(a_dict,file)file.close()file = open('pickle_example.pickle','rb')a_

2017-10-03 22:51:33 244

原创 some tips about python Three

#多核运算 multiprocessingimport multiprocessing as mp#import threading as tddef job(a,d):print('aaaaa')if__name__ == '__main__'#t1 = td.Thread(target = job, args=(1,2)) #job表示引用,job()表

2017-10-03 20:53:37 277

原创 some tips about python Two

import threadingimport timedef thread_job():print('Task start\n')for i in range(10):time.sleep(0.1) #每做一步,休息0.1秒print('Task finish\n')def main():added_thread = threading.Thread(target

2017-10-03 16:42:44 247

原创 some tips about python One

a = [1,2,3,4,5]  #列表multi_dim_a = [[1,2,3],    [4,5,6],    [7,8,9]]   #多维列表print(a[1])  #2print(multi_dim_a[0][1]) #2,第0行第1个元素print(a[0]) #1print(multi_dim_a[2][2])#5,第2行第2个元素,从0开始a_li

2017-10-03 09:25:40 255

原创 some tips about python

python中,**表示指数,ctrl+c终止程序,ctrl+] 和 ctrl+[ 用来调格式,//表示整除。def sale_car(price, brand, color = 'red', brand = 'carmy', is_second_hand = True):  #非默认参数要放在默认参数的前面,否则运行时会报错print('...') def fun()

2017-10-02 19:33:58 247

原创 失踪人口回归系列,好长时间没有更新博客了,今天来记录下python的相关安装过程

python的重要性不必多说了,下面来介绍一下windows和mac系统下相关的安装和配置过程:windows环境:(1)首先在python的官网https://www.python.org,下载系统相应的python版本。        (2)下载完毕后进行安装,在安装的过程中记住勾选 Add Python X.XX In PATH, 然后可以选择默认安装或者自定义安装(设置安装位置

2017-10-02 10:51:12 280

原创 Zhejiang University----A+B

//return a-b; 升序//return b-a; 降序/*#include#include int main(void){    char name1[81],name2[81],temp;    int C[20];    int i=0,j;    int conversion(char name[]);     while(scanf

2016-04-07 22:39:31 371

原创 Zhejiang University----Graduate Admission

#include #include  //结构体typedefstruct Application{    intGI;//复试成绩    intGE;//初试成绩    intGF;//总成绩    intPS[6];//偏爱的学校    intID;//编号}Application; typedefstruct Sch

2016-04-07 22:06:00 235

原创 Zhejiang University----Median

/*#include #include int *arr1, *arr2, *newArr;int main(){    int len1,len2;    while(scanf("%d",&len1) != EOF){        arr1 = (int *)malloc(len1*4);        int i;        for(i=0;i  

2016-04-07 18:12:28 236

原创 Zhejiang University----Grading

#include #include int main(){    int p,t,g1,g2,g3,gj;    while(scanf("%d %d %d %d %d %d",&p,&t,&g1,&g2,&g3,&gj) != EOF){        double result;        if(abs(g1 - g2)             result =

2016-04-07 17:56:09 214

原创 Zhejiang University----A+B for Matrices

#include int main(){    int M,N;    int Matrix[11][11];    while(scanf("%d",&M),M){        scanf("%d",&N);        int i,j;        for(i=0;i            for(j=0;j                scanf(

2016-04-07 17:38:09 171

原创 直接插入排序

//直接插入排序#include #include #define GETCOUNT(x) (sizeof(x) / sizeof((x)[0]))void insertSort(int *a,int n){    int tmp,j;    for(int i=1;i        tmp = a[i];        j = i;        whil

2016-04-04 21:38:03 176

原创 获取文件路径

#include #include #define _MAX_PATH 260//max length of full pathname#define _MAX_DRIVE 3 //max length of drive component#define _MAX_DIR 256 //max length of path component#define _MAX_FNAME

2016-04-04 21:09:36 163

原创 存储、读取二进制的图像

#include #include #include #include "cv.h"#include "highgui.h"using namespace cv;using namespace std;void main(){    FILE *fpw = fopen("E:\\patch.bin","wb");    if(fpw == NULL){  

2016-04-04 21:07:39 277

原创 库和框架

//fork()模拟多个客户端同时访问设定的URL,测试压力下网站工作的性能,最多可以模拟3万多个并发连接#include #include #include #include #include #include #include #include #include #include #include #include int Socket(

2016-04-04 15:23:55 235

原创 读写二进制file

C语言中声明 const int i = 2;在另一个模块中使用此变量 extern const int i;C++中另一个模块中使用此变量 extern const int i = 2;如果C++使用C中的extern变量,则extern "C" const int i = 2;//C和C++按照行存储数据,MATLAB按照列存储数据//MATLAB中提供四个函数来读写二进制

2016-04-04 15:12:22 679

原创 无序n个元素中,寻找第K大的元素 O(n)

#include void swap(int *a,int *b){    int tmp;    tmp = *a;    *a = *b;    *b = tmp;}int partition(int arr[],int left,int right,int pivotIndex){    int storeIndex = left;    int pi

2016-04-04 01:27:13 490

原创 心飞扬~~

时钟飞过太平洋》笑着让泪水飞散》梦想着挣脱了牵绊》一夜间成长》穿过多少迷茫》受过多少伤》心酸不愿对别人讲》流过多少眼泪》挨过多少煎熬》对昨天失望》怀疑过要去的地方》勇敢是最后的倔强》大声的对命运咆哮:我不是在抵抗,我依然在扎根成长。

2016-03-30 16:08:43 254

原创 Zhejaing university----Head of a Gang

//Zhejiang university----Head of a Gang/*时间限制 1s 内存限制 128M题目描述:    One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A and

2016-03-29 16:53:07 228

原创 Zhejiang university----To Fill or Not to Fill

//Zhejiang university----To Fill or Not to Fill/*时间限制 1s 内存限制 128M题目描述:    With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a

2016-03-29 16:21:53 193

原创 Zhejiang university----Sharing

//Zhejiang university----Sharing/*时间限制 1s 内存限制128M题目描述:    To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the w

2016-03-29 16:04:48 310

原创 Zhejiang university----Hello World for U

//Zhejiang university----Hello World for U/*时间限制 1s 内存限制 128M题目描述:    Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "hellow

2016-03-29 15:42:58 225

原创 UI 开源代码 FileBrowserView

//android 开源代码UI篇//FileBrowerView 文件选择控件 特点:可以自定义UI;支持复制、剪切、删除、移动文件;//可以用在Fragment、ativity、DialogFragment中;支持快速切换目录

2016-03-25 23:27:08 1383

原创 安装Yaf框架

(1)先安装apache、mysql、phpapt-get updateapt-get install apache2apt-get install mysql-serverlibapache2-mod-auth-mysql php5-mysqlapt-get install php5 libapache2-mod-php5 php5-mcrypt(2) 安装pecl等依赖

2016-03-25 12:56:46 245

原创 java 随笔1

//编程原则,一个类只专注于单一的功能//如果新建一个Rectangle类,把屏幕绘制矩形和计算矩形面积,就要分别放在两个不同的类中//通过增加代码来扩展功能,而不是修改代码来扩展功能//服务器模块可以方便的扩展代码,不对客户模块造成影响//OCP支持替换服务,不必修改客户模块。public boolean sendByEmail(String addr, St

2016-03-24 11:10:24 209

原创 Java打开网页获取数据,自动访问,打开指定URL

//利用 http client 后台执行get方法打开网页获取数据package com.alexia;import java.io.IOException;import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;import org.apache.commons.httpclient.HttpClie

2016-03-23 23:58:02 1659

原创 Apache + PHP + Mysql 的配置

//Apache是web服务器软件,跨平台性和安全性较好。//Mysql是关系型数据库,体积小,速度快,并且开放源码。//PHP(Hypertext Preprocessor)是一种HTML内嵌式语言,是在服务器端//执行的嵌入HTML文档的脚本语言,语言风格与c语言类似。/*环境配置 Apache + PHP + Mysql(1)Apache的安装:下载安装完成后

2016-03-18 22:18:12 212

原创 Huawei 2013 机试题

(1)字符串处理:将输入的字符串中的大小写字母和数字之外的字符都删除,然后输出input : A*(BC&De+_fg/*ouput: ABCDefginput: aB+_9output: aB9#include void o_string(char *input, char* output){int i,j=0;for(i=0;input[i] != '\0';i

2016-03-18 16:20:01 212

整数划分,并输出结果

整数划分,并输出相应结果,注释完整,可以运行,C/C++

2017-12-13

window系统下安装Ubuntu

windows下安装Ubuntu双系统,可以支持更多的Python组件,体验不同的操作系统,练习Linux

2017-12-13

空空如也

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

TA关注的人

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