自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Zdx

先想后做。

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

原创 Conda常用命令整理

参考链接:Conda Command referenceConda 常用命令整理 CSDN1.获取版本号conda --versionconda -V2.创建环境conda create --name env_name #创建名为env_name的环境conda create --name env_name numpy #创建名为env_n...

2018-07-19 10:46:49 918

原创 ubuntu 安装TensorFlow(GPU版)(超详细,超简单)

0、概述1、CUDA8.0安装1.1 下载安装包1.2 安装CUDA2、CUDNN6.0安装2.1 下载CUDNN6.0并安装2.2 检验安装是否成功3、Anaconda 的安装3.1 Anaconda下载3.2 Anaconda安装3.3 Anaconda换源3.4 验证一下是否安装成功4、TensorFlow的安装4.1 建立con...

2018-01-20 19:11:45 13406 5

原创 解决vi编辑器不能使用方向键和退格键问题

1.执行命令 sudo apt-get remove vim-common2.执行命令 sudo apt-get install vim

2017-08-05 16:08:23 1987

原创 Linux 常见文件后缀解压命令

1.对于.tar.gz tartar -zxvf xx.tar.gz2.对于.tar.bz2tar -jxvf xx.tar.bz23.对于.tar        tar -xf xx.tar4.对于.gz        gzip -d xx.gz        gunzip xx.gz5.对于.tgz/.tar.gz     

2017-08-05 16:03:47 928

原创 基于海康威视的全景拼接系统

0、概述本系统以海康威视摄像头作为图像信息的采集工具,通过对采集的图像数据进行分析与处理,从而实现室内多张图片的全景图拼接、图片的标注以及物体的运动检测等功能。系统功能模块图如图所示:1、图像采集1.1 调用SDK实现对摄像头控制这里主要是调用海康威视提供的SDK接口实现摄像头的登录、控制、获取视频流的功能。另外,因为我们的系统是用Python进行开发,涉及到SDK中结构体参数的传入主要...

2018-12-30 19:41:31 9940 7

原创 Hadoop编程——统计多个班级学生信息

源码地址:GithubProblem Statement假设有N个班级在学习一门课程,第i个班级有M[i]个学生。课程成绩按照班级,分别存放在单独的文本文件中,如File1.txt是1班的成绩,File2.txt是2班的成绩,以此类推。现在需要你来完成: (1)在本地文件系统中,首先使用随机数生成N个班级的成绩文件,包括学生的学号、姓名、成绩。注意:成绩要在[0,100]范围内。 ...

2018-06-18 22:41:46 3192

原创 Hadoop编程

参考链接: 1.MapReduce编程实例 2.使用java操作HDFS1.配置CLASSPATH编辑~/.bashrc文件sudo gedit ~/.bashrc在最后加入:CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$HADOOP_HOME/share/hadoop/common/*:$HAD...

2018-06-07 14:47:44 1138

原创 MPI编程----矩阵乘法

原理: 如图所示,将一个矩阵每一列分配给各个子进程,然后在进程内部将一列与另一个矩阵相乘,最后将根进程收集结果并进行输出。代码如下:#include <stdio.h>#include "mpi.h"#include <string.h>#include <stdlib.h>#include <math.h>#include ...

2018-06-04 17:57:48 11011 1

原创 MPI编程-----Parallel Rank

原理:如图所示,假设每一个进程代表一个节点,在集群中,由于每台设备的性能不同,那么获取集群中每台设备的速度就显得尤为必要,了解每台设备的情况可以更加高效地进行任务分配。现在,每个进程都拥有一个随机数,我们需要将其收集上来并进行排序,然后将对应的排名顺序分发给各个子进程,这样每个子进程都可以知道自己在整个系统中的排名。 代码如下:#include <stdio.h>#...

2018-06-04 17:51:21 1417

原创 MPI编程----找到大型数组中最大元素

原理:与计算cosx相似,通过将数组分成若干份,分配给子进程计算,最后通过根进程收集并处理输出。代码如下:#include <stdio.h>#include "mpi.h"#include <string.h>#include <math.h>#define PI 3.1415926#define N 2000000int rand_a...

2018-06-04 17:35:14 1127

原创 MPI编程----计算cosx的积分

原理:将积分区间平均分成多份,每个进程计算相应的任务,计算完成后通过根进程收集并求和得出答案并计算出相应的误差。 代码如下:#include <stdio.h>#include "mpi.h"#include <string.h>#include<math.h>#define PI 3.1415926double

2018-06-04 17:31:16 1309

原创 Ubuntu16.04下Hadoop3.1的安装与配置

1. 下载压缩包Hadoop环境需要安装java,若未安装见:java下载与安装然后到官网下载对应的安装包,然后解压到本地目录下.2. 配置环境变量sudo gedit ~/.bashrc然后设置环境变量(路径根据自己的设置)export HADOOP_HOME=/usr/hadoop-3.1.0/export PATH=$HADOOP_HOME/usr:$HADOOP_...

2018-05-31 16:31:12 3847

原创 Window、 Ubuntu双系统增加Ubuntu磁盘空间

本文主要介绍了在Windows和Ubuntu双系统(非虚拟机)下,由于一开始分配给Ubuntu空间较少,后来导致Ubuntu空间不够的问题。(这里不具体写了,全程没截图啥的,主要是整理下来,方便以后参考)参考链接: 1.JohnnyYin的博客 2.制作GParted启动盘以及使用其进行扩容 2.使用gparted对linux进行分区 3.grub error: unknown fil...

2018-05-16 17:27:49 2391

原创 Ubuntu16 MPICH2和DOCKER的环境搭建

1. Java环境搭建1.1 下载JDK并进行解压1.2 设置环境变量2. 安装Mpich22.1 下载并解压Mpich2.2 编译和配置2.2.1 进入解压后文件夹,设置安装目录:2.2.2 编译和安装:2.2.3 设置环境变量2.2.4 测试参考链接: 1.java安装 2.mpich安装1. Java环境搭建1.1...

2018-05-03 17:23:52 2070

原创 Ubuntu16换源

参考链接:Ubuntu 16.04配置国内高速apt-get更新源换源当然还是首选被圈粉的清华大学源啊!!1.在清华大学开源镜像站选择适合自己系统的源。 2.sudo gedit /etc/apt/sources.list将文件中所有的内容替换成刚刚选择的链接,保存文件(这里我没有进行备份,担心出问题的可以做一下备份)。3.sudo apt-get upd...

2018-05-03 16:53:44 911

原创 226. Invert Binary Tree

Invert a binary tree.

2017-12-11 16:49:39 448

原创 104. Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node

2017-12-11 16:47:08 502

原创 485. Max Consecutive Ones

Problem StatementGiven a binary array, find the maximum number of consecutive 1s in this array. Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are

2017-12-11 16:45:35 471

原创 136. Single Number

Problem StatementGiven an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it witho

2017-12-11 16:40:28 431

原创 292. Nim Game

Problem StatementYou are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last s

2017-12-11 16:32:22 452

原创 521. Longest Uncommon Subsequence I

Problem StatementGiven a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of

2017-12-11 16:29:34 444

原创 496. Next Greater Element I

Problem StatementYou are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1’s elements in the corresponding pl

2017-12-11 16:25:00 435

原创 412. Fizz Buzz

Problem StatementWrite a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five out

2017-12-11 16:14:52 230

原创 344. Reverse String

Problem StatementWrite a function that takes a string as input and returns the string reversed.Example 1:Given s = "hello", return "olleh".Thinking反转单词。Solutionclass Solution { public String rever

2017-11-02 20:48:32 263

原创 557. Reverse Words in a String III

Problem StatementGiven a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Example 1:Input: "Let's take LeetCod

2017-11-02 20:46:03 270

原创 575. Distribute Candies

Problem StatementGiven an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to

2017-11-02 20:37:57 229

原创 682. Baseball Game

Problem StatementYou’re now a baseball game point recorder.Given a list of strings, each string can be one of the 4 following types:Integer (one round’s score): Directly represents the number of point

2017-10-10 16:26:42 249

原创 500. Keyboard Row

Problem StatementGiven a List of words, return the words that can be typed using letters of alphabet on only one row’s of American keyboard like the image below.Example 1:Input: ["Hello", "Alaska", "D

2017-09-29 21:41:53 291

原创 476. Number Complement

Problem StatementGiven a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note: 1.The given integer is guaranteed to fit within

2017-09-29 21:37:54 241

原创 617. Merge Two Binary Trees

Problem StatementGiven 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.You need to merge them into a n

2017-09-29 21:34:16 221

原创 657. Judge Route Circle

Problem StatementInitially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the original place.The move sequence is

2017-09-29 21:31:05 342

原创 461. Hamming Distance

Problem StatementThe Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note: 0

2017-09-29 21:26:41 234

原创 树莓派+PyQt制作魔镜

前段时间在GitHub瞎看,看到一个超炫酷的项目MagicMirror(项目地址),然后就感觉超级帅气,树莓派啥的买来以后在上面跑了一遍MagicMirror的源码,然后看到可以扩展好多好玩的东西,后来发现这个项目使用JavaScript写的,自己对JavaScript接触的很少又正好最近学了学python就准备自己动手写一个。

2017-08-24 16:09:40 9855 5

原创 ubuntu16 安装pyinstaller 显示command not found

在将代码移植到ubuntu后,想利用pyinstaller将代码打包成可执行文件,但是在安装pyinstaller的时候出了一些问题,在网上没怎么看见有解决这个问题的办法,最后尝试了一下直接从官网下载安装而没有通过pip3安装居然成功了,写篇博客纪念一下。

2017-08-19 10:23:07 14146 3

原创 Linux 下常见问题总结

总结Linux使用过程中遇到的问题和错误一节解决办法

2017-08-18 19:07:18 350

原创 Socket编程

这是原博客最后一篇文章了,把这个搬运过来以后原来的博客就彻底放弃了,这篇文章也是刚搭起博客后总结整理的几篇文章。该文章主要整理了socket的一些流程和函数。

2017-08-18 14:48:28 266

原创 数据库一些操作

数据库一些会用到操作,供查询。

2017-08-18 14:40:32 270

原创 Ubuntu安装Python3.5

安装Python 3.5sudo apt-get install python3.52.修改默认python版本为 python 3.5sudo rm /usr/bin/pythonsudo ln -s /usr/bin/python3.5 /usr/bin/python

2017-08-18 10:46:33 889

原创 pip更换国内镜像源

使用国内的pip源可以让pip install的速度飞起,下面介绍一下方法,本文主要介绍更换pip源以加快pip的速度。

2017-08-15 22:17:55 1013

原创 git提交代码流程(供查询)

往GitHub上上传代码的时候总是出些问题,操作不熟练,写这篇博文主要是记录git遇到的一些问题以及方便自己查询。

2017-08-14 17:47:51 426

空空如也

空空如也

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

TA关注的人

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