自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(101)
  • 资源 (3)
  • 收藏
  • 关注

原创 定量资料与定性资料

一、定量资料:测定每个观察单位某项指标量的大小。计量资料:在定量资料中,若指标的取值可以带度量衡单位,甚至可以带小数(标志测量的精度)的定量资料,就叫“计量资料”。例如测得正常成年男子身高cm) 、体重kg ) 、血红蛋白g/U 、总铁结合力(μmol/U 等所得的资料,它们首先是定量资料,进一步细分它们还是计量资料。计数资料:在定量资料中,若指标的取值可以带度量衡单位,但不可以带小数(即只能取整数,通常为正整数)的定量资料,就叫“计数资料”。例如测得正常成年男子脉搏数(次/min ) 、引体向上

2020-07-02 22:50:20 22054

原创 导入模块实例【PERL】

自定义模块(iprint.pm文件)package iprint;require Exporter;our @ISA = qw(Exporter);our @EXPORT = qw(ihash);sub ihash{ my $h=shift; for my $k(sort keys %$h){ print $k,"\t",$h->{$k},"\n"; }}1;调...

2019-11-11 20:09:31 413

原创 模拟遗传漂变【PERL】

#!/usr/bin/perl -w use strict;my $DNA="AAAAAAAAAAAAAAAAAAAAAA";my ($i,$mutant);srand(time|$$);$mutant=mutate($DNA);print "\nMutate DNA\n";print "\nThe original DNA:\n$DNA\n";print "\nThe mut...

2019-11-10 21:47:39 497

原创 统计fasta文件每条序列的长度【Perl】

#!/usr/bin/perl -w use strict;my $file="myseq.fa";open(FH,$file) or die $!;my %hash;my $id=0;while(<FH>){ chomp; my $temp; if($_=~/^>/){ $_=~ s/^>//g; my $temp=$_; next; }...

2019-11-10 19:35:09 2400

原创 统计fasta文件GC含量【Perl】

my $file="myseq.fa";open(FH,$file) or die $!;my $G_num=0;my $C_num=0;my $g_num=0;my $c_num=0;my $bases=0;while(<FH>){ if($_=~/^>/){next;} if(/C/){$C_num+= $_ =~ tr/C/C/;} if(/c/){$c...

2019-11-10 19:03:26 2319

原创 R语言画图,很全!对号使用!

创建数据num=seq(10378001,10378100)x1=round(runif(100,min=80,max=100))x2=round(rnorm(100,mean=80,sd=7))x3=round(rnorm(100,mean=83,sd=18))x3[which(x3>100)]=100x=data.frame(num,x1,x2,x3)作图dev.new...

2019-09-30 21:01:03 2346

原创 1.Seqtk--fasta/fastq文件处理工具

sudo apt install seqtkseqtk

2019-09-30 20:03:13 1240

原创 R语言求特征值和特征向量

> a=diag(4)+1> a [,1] [,2] [,3] [,4][1,] 2 1 1 1[2,] 1 2 1 1[3,] 1 1 2 1[4,] 1 1 1 2> a.e=eigen(a,symmetric=T)> a.eeigen() d...

2019-09-27 21:10:15 28604 4

原创 机器学习必看书籍和视频汇总

书籍1、李航《统计学习方法》链接2、周志华《机器学习》西瓜书3、 Christopher Bishop《模式识别与机器学习》PRML4、Kevin P. Murphy《Machine Learning A Probabilistic Perspective》MLAPP5、Trevor Hastie《The Elements of Statistical Learning》ESL...

2019-09-15 21:08:00 569

原创 《python大战机器学习》勘误

github地址第6页第二段:符号错误:(感谢网友 周礼广 的提示) P(y=1/x⃗)=11+e−z,z=w⃗⋅x⃗+b P(y=1/\mathbf{\vec x})=\frac{1}{1+e^{-z}},z=\mathbf{\vec w}\cdot \mathbf{\vec x}+b P(y=1/x)=1+e−z1​,z=w⋅x+b第194页倒数第三段:公式未换行:(感谢网友 齐照辉 ...

2019-09-06 10:57:56 192

原创 感知机

感知机的定义感知机是没有隐层的神经网络,只有输入层和输出层,输出层是M-P神经元。数据集: T={(x1⃗,y1),(x2⃗,y2),⋯&ThinSpace;,(xN⃗,yN)}T = \{(\vec{x_1},y_1),(\vec{x_2},y_2),\cdots,(\vec{x_N},y_N)\}T={(x1​​,y1​),(x2​​,y2​),⋯,(xN​​,yN​)}其中,x...

2019-08-29 14:42:30 157

原创 Java 日历

原始版import java.time.*;/** * @version 1.5 2015-05-08 * @author Cay Horstmann */public class CalendarTest{ public static void main(String[] args) { LocalDate date = LocalDate.now();...

2019-07-24 10:28:39 180

原创 ifstream和istream转型与报错

代码// this.cpp#include<iostream>#include<string>#include<fstream> using namespace std;void print(istream &strm, ifstream &fstrm){ string c; while(getline(strm,c)) {...

2019-07-09 11:14:53 1582

原创 常用的数组运算和矩阵运算操作

2019-07-01 21:47:07 502

原创 子类和父类之间类型转换

1. 子类 -> 父类父类 -> Base#include<isotream>using namespace std;class Base{public: Base() : pub_att(1){} int pub_att;};public继承的子类1 -> Derived1class Derived1 : public Base{publi...

2019-06-26 23:05:58 1453

原创 GNU-autotools使用实例(详解)

├── include│ ├── main_tmp.h│ ├── maze.h│ └── stack.h├── lib│ ├── Makefile.am│ ├── maze.c│ └── stack.c├── Makefile.am└── src ├── main.c └── Makefile.am3个makefile.am详解1)顶...

2019-06-18 17:29:44 460

原创 GNU-autotools使用实例(代码)

这里使用走迷宫深度优先搜索,把它写成一个项目。项目的目录树如下:目录树:├── include│ ├── main_tmp.h│ ├── maze.h│ └── stack.h├── lib│ ├── maze.c│ └── stack.c└── src └── main.c内容://main_tmp.h#ifndef MAIN_TMP_H...

2019-06-17 23:23:43 204

原创 UDP协议网络程序(Liunx,C)

//wrap.h#include <stdlib.h>#include <errno.h>#include <sys/socket.h>void perr_exit(const char *);int Accept(int, struct sockaddr *, socklen_t *);void Bind(int, const struct so...

2019-06-14 15:22:06 145

原创 多个client的交互式请求(Linux,C)

1. 多进程并发处理–fork// wrap.h#include <stdlib.h>#include <errno.h>#include <sys/socket.h>void perr_exit(const char *);int Accept(int, struct sockaddr *, socklen_t *);void Bind(int...

2019-06-14 11:24:31 198

原创 基于TCP协议,简单的网络程序(Linux,C)

代码/* server.c */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/socket.h>#include <netinet/in.h> //IPv4和IPv6的地址格式#d...

2019-06-12 22:17:00 207

原创 linux线程(C)

// pthread.c#include<pthread.h>pthread.cint pthread_create(pthread_t *restrict thread,const pthread_attr_t *restrict attr,void *(*start_routine)(void*), void *restrict arg);// 储存线程号,NULL,要执行...

2019-06-11 16:30:43 152

原创 进程间通信无名pipe和有名fifo(Linux,C)

#include <stdlib.h>#include <unistd.h>#define MAXLINE 80int main(void){ int n; int fd[2]; // 管道两端文件描述符,fd[0]读断,fd[1]写段 pid_t pid; char line[MAXLINE]; if (pipe(fd) < 0) { // 创...

2019-06-10 14:04:54 141

原创 waitpid、WIFEXITED、WEXITSTATUS、WIFSIGNALED、WTERMSIG

#include<sys/types.h>#include<sys/wait.h>#include<unistd.h>#include<stdio.h>#include<stdlib.h>#include <assert.h>int main(void){ pid_t pid; pid = fork(); ...

2019-06-09 21:28:12 2323

原创 排序二叉树

/* bst.h */#ifndef BST_H#define BST_Htypedef struct node *link;struct node { unsigned char item; link l, r;};link search(link t, int key);link insert(link t, int key);link delete(link t, ...

2019-06-09 11:51:41 179

原创 根据前序和中序遍历结果构造二叉树

//binarytree.h#ifndef BINARYTREE_H#define BINARYTREE_Htypedef struct node *link;struct node { unsigned char item; link l, r;};link tree_init(unsigned char VLR[], unsigned char LVR[], int n);...

2019-06-09 10:19:37 516

原创 向量的点击、叉积、混合积(Matlab)

1. 向量的点积运算两个向量的点积等于一个向量的模与另一个向量在这个向量方向上的投影的乘积。x1=[2 9 8 7];x2=[6 5 1 4]; %两向量维度必须一致y=dot(x1,x2); %932. 向量的叉积运算两个向量的交点,并与此两向量所在的平面垂直的向量。x1=[2 9 8];x2=[6 5 1]; %两向量维度必须一致,而且必须都是3!!!y1=cro...

2019-06-07 23:44:52 6751

原创 复杂声明展开

很难搞清楚下面是个什么鬼!!!!int (*(*fp)(void *))[10];分解:1、 fp 和 * 号括在一起,说明 fp 是一个指针,指向 T1 类型:typedef int (*T1(void *))[10]; // 用其他类型定义类型T1T1 *fp; // fp是指向T1类型的指针2、 T1 应该是一个函数类型,参数是 void * ,返回值是 T2 类型:type...

2019-06-07 11:16:43 252

原创 函数类型和函数指针类型

函数指针#include <stdio.h>void say_hello(const char *str){ printf("Hello %s\n", str);}int main(void){ void (*f)(const char *) = say_hello; f("Guys"); return 0;}f 是一个指针,这个指针指向函数类型是输出为 voi...

2019-06-07 10:52:10 1588 1

原创 字符串字面值,段错误

字符串字面值也可以像数组名一样使用,可以加下标访问其中的字符:正确:char c = "Hello, world.\n"[0];但是通过下标修改其中的字符却是不允许的:错误:"Hello, world.\n"[0] = 'A';字符串字面值是只读的,不允许修改。字符串字面值还有一点和数组名类似,做右值使用时自动转换成指向首元素的指针。正确:char str[10] = "Hello...

2019-06-06 20:47:38 825

原创 28.旅行(UVa1347)

#include<cstdio>#include<cmath>#include<algorithm>using namespace std;const int maxn = 50 + 5;double x[maxn], y[maxn], dist[maxn][maxn], d[maxn][maxn];int main() { int n; w...

2019-06-06 15:35:01 161

原创 外部链接和内部链接,临时性定义,extern,static

外部链接和内部链接 参见 https://blog.csdn.net/xiexievv/article/details/8487373,非常详细!这里补充 int i;以下:int i;int i;gcc 可以编译通过:int i; 没有明确的初始化操作,属于 临时性定义(tentative definition) 可以在程序中发生多次发生,但是最后只留一个单独的实体 。g++不能...

2019-06-05 10:01:35 456

原创 全面详解sizeof

#include <stdio.h>using namespace std;int main(void){ printf("len_char=%d\nlen_int=%d\nlen_signed_int=%d\nlen_unsigned_int=%d\nlen_short=%d\nlen_long=%d\nlen_float=%d\nlen_double=%d\n", si...

2019-06-04 11:16:19 273

原创 走迷宫--广度优先搜索--队列

#include <stdio.h>#define MAX_ROW 5#define MAX_COL 5struct point { int row, col, predecessor; }queue[512];int head = 0, tail = 0;void enqueue(struct point p){ // 迷宫位置入队列 queue[tail]...

2019-06-04 09:45:13 434

原创 走迷宫--深度优先搜索--堆栈

#include <stdio.h>#define MAX_ROW 5#define MAX_COL 5struct point{ // 坐标堆栈 int row, col; } stack[512]; int top = 0;void push(struct point p){ // 坐标入栈 stack[top] = p; top++;}struct ...

2019-06-03 22:38:47 218

原创 27.巴比伦塔(UVa 437)

有n(n≤30)n(n≤30)n(n≤30)种立方体,每种都有无穷多个。要求选一些立方体摞成一根尽量高的柱子(可以自行选择哪一条边作为高),使得每个立方体的底面长宽分别严格小于它下方立方体的底面长宽。#include <iostream>#include <stdio.h>#include <cstring>#include <algorithm&...

2019-06-03 16:47:03 343

原创 折半查找

#include <stdio.h>#define LEN 8int a[LEN] = { 1, 3, 3, 3, 4, 5, 6, 7 };int binarysearch(int number){ int mid, start = 0, end = LEN - 1; while (start <= end) { // 当start = end时候,还不是要找的...

2019-06-03 16:29:41 171

原创 归并排序

#include <stdio.h>#define LEN 8int a[LEN] = { 8, 7, 6, 5, 4, 3, 2, 1 };void merge(int start, int mid, int end){ int n1 = mid - start + 1; int n2 = end - mid; int left[n1], right[n2]; in...

2019-06-03 11:00:16 96

原创 插入排序

#include<iostream>using namespace std;void insertion_sort(int* a,int& len){ int i, j, key; for (j = 1; j < len; j++) { // 插入排序从索引1开始,默认索引0已经排序好 key = a[j]; // 拷贝下待插入值 i = j - 1...

2019-06-02 14:57:09 107

原创 26.城市里的间谍 (UVa1025)

某城市的地铁是线性的,有n(2≤n≤50)n(2≤n≤50)n(2≤n≤50)个车站,从左到右编号为1~n1~n1~n。有M1M1M1辆列车从第1站开始往右开,还有M2M_2M2​辆列车从第nnn站开始往左开。在时刻000,Mario从第1站出发,目的是在时刻T(0≤T≤200)T(0≤T≤200)T(0≤T≤200)会见车站nnn的一个间谍。在车站等车时容易被抓,所以她决定尽量躲在开动的火车上,...

2019-06-01 23:41:36 175

原创 MinGW64 Compiler (C)安装以及matlab安装libsvm

下载Dev-C++ 5.11解压、安装到c盘,默认是安装到C:\Program Files (x86)目录下,但是目录有空格,不行!直接装在c盘下,然后加入我的电脑,属性,系统变量,添加变量名:MW_MINGW64_LOC,路径:C:\Dev-Cpp\MinGW64。确定,重启matlab。输入mex -setup -v...

2019-05-30 18:09:09 1454 1

R语言的那些非常流行数据分析的包汇总.docx

R语言的那些非常流行数据分析的包汇总,学会这些包就会成为R语言大神,数据分析者必看

2020-07-03

R包大法解答各自问题

R包安装指导大法,非常非常非常非常非常地详细,包揽了R包安装的许多问题,给了非常详细的解答,使用R语言必看!!!

2020-07-03

数据分析与R语言视频课件.zip

炼数成金R语言统计分析视频1~12章PPT,PDF格式,炼数成金R语言统计分析视频1~12章PPT,PDF格式!

2019-09-30

空空如也

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

TA关注的人

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