自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 资源 (10)
  • 收藏
  • 关注

原创 tensorboard打开

切换到事件输出目录,在终端输入tensorboard --logdir 目录若提示端口正在使用中,比如6006占用,可将上一句修改为:tensorboard --logdir 目录 --port=8008将终端输出的新的网址在浏览器中打开即可。若出现no dashboards are active for current data set注意检查事件的路径...

2019-04-12 17:21:58 198

原创 二叉树的遍历--七种方式之Python实现

class Node(object): def __init__(self, data): self.elem = data self.lchild = None self.rchild = Noneclass Tree(object): def __init__(self): self.root = None...

2018-07-17 11:24:10 199

原创 tf

def create_mtcnn(sess, model_path): if not model_path: model_path, _ = os.path.split(os.path.realpath(__file__)) with tf.variable_scope('pnet'): data = tf.placeholder(tf.float...

2018-07-07 21:00:32 278

原创 python工程中处理txt文件中同时包含字符(str)和数字(float)的情况

1. If you use np.genfromtxt, you could specify dtype=None, which will tell genfromtxt to intelligently guess the dtype of each column. Most conveniently, it relieves you of the burder of specifying th...

2018-07-06 15:58:15 3465

原创 leetcode刷题(python)--338. Counting Bits

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.Example:For num = 5 you sho...

2018-06-05 10:21:38 357

原创 leetcode刷题(python)--81. Search in Rotated Sorted Array II (思路以及两种解法-迭代和递归)

Search in Rotated Sorted Array II  Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]).You are given a ta...

2018-05-20 20:07:05 204

原创 leetcode刷题(python)--33. Search in Rotated Sorted Array(思路以及两种解法-迭代和递归)

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are given a target value to search. If found in t...

2018-05-20 10:49:26 1077

原创 leetcode刷题(python)--384. Shuffle an Array

Shuffle a set of numbers without duplicates.Example:// Init an array with set 1, 2, and 3.int[] nums = {1,2,3};Solution solution = new Solution(nums);// Shuffle the array [1,2,3] and return its re...

2018-05-07 22:52:39 384

原创 leetcode刷题(python)--532. K-diff Pairs in an Array

Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j), where i and j are both numbers in...

2018-05-04 09:58:29 241

原创 leetcode刷题(python)--448. Find All Numbers Disappeared in an Array

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.Could yo...

2018-05-03 09:03:39 157

原创 leetcode刷题(python)--*697. Degree of an Array(to review)

Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements.Your task is to find the smallest possible length of a (c...

2018-05-02 15:17:03 142

原创 leetcode刷题(python)--561. Array Partition I

Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as poss...

2018-05-01 15:57:57 137

原创 leetcode刷题(python)--26. Remove Duplicates from Sorted Array

Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modifying...

2018-05-01 15:41:48 76

原创 leetcode刷题(python)--665. Non-decreasing Array

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] <= array[i + 1] holds for eve...

2018-05-01 09:55:01 248

原创 leetcode刷题(python)--349. 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].Note:Each element in the result must be unique.The result can be in any ...

2018-04-30 19:16:30 111

原创 leetcode刷题(python)--1. twoSum

两数之和(twoSum)给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。例子:Given nums = [2, 7, 11, 15], target = 9,Because nums[0] + nums[1] = 2 + 7 = 9,return [0, 1].class Solution: def twoSu...

2018-04-23 09:44:13 119

原创 利用virtualenv和virtualenvwrapper搭建python3.5和tensorflow虚拟环境

最近由于项目需要,需要使用tensorflow1.5.0版本,为了避免和之前的冲突,使用virtualenv来搭建了一个python3.5的虚拟环境。Virtualenv系统中的多个python混用会导致PYTHONPATH混乱,或者各个工程对于package的版本要求不同等等情况。有一个简单的解决方案就是用virtualenv来隔离多个python,其本质只是实现隔离不同python中PYTHO...

2018-03-28 20:54:00 420

原创 二分法搜索python实现以及分析

#!/usr/bin/env python3# -*- coding: utf-8 -*-def binaray_search(list, item): low = 0 high = len(list) - 1 i = 0 while(low <= high): mid = (low + high)/2 guess = mid if guess == item: ...

2018-03-12 21:06:37 415

原创 python格式化输出变量

#!/usr/bin/env python3# -*- coding: utf-8 -*-def binaray_search(list, item):''' 二分法搜索 2018.3.12 格式化输出 输出搜索对象和搜索次数 ''' low = 0 high = len(list) - 1 i = 0 while(low <= high): ...

2018-03-12 20:29:09 1139

原创 python中将两组数据放在一起按照某一固定顺序shuffle

有的时候需要将两组数据,比如特征和标签放在一起随机打乱, 但是又想记录这种打乱的顺序,那么该怎么做呢?下面是一个很好的方法:b = [1, 2,3, 4, 5,6 , 7,8 ,9]a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h','i']c = list(zip(a, b))print(c)random.Random(100).shuffle(c)

2017-11-27 10:09:29 6603

原创 Sublime3中快捷键的设置

Sublime使用心得标签(空格分隔): Sublime Python 1.新快捷键的设置设置新键位的方法:定义一个键位: 打开:首选项——按键绑定——用户 按照示范格式进行定义将定义好的键位添加到默认键位中: 打开:首选项——按键绑定——默认 按照示范格式进行添加  比如在Sublime中进行Python的交互式编程时,会遇到一个问题,在安装了Subl

2016-06-15 02:52:40 603

数据结构python简明教程

Python版本的数据结构教程,很简短。 zszszszszszszszszs

2018-06-25

电子科技大学李洪伟算法设计作业及答案

电子科技大学李洪伟老师算法设计与分析作业答案

2017-03-29

Seetaface 代码(亲测可用)

配置好环境后,添加图片路径即可。 注意将三个模块的model放在一个文件夹。

2017-03-27

图论及其应用

图论经典之作,你值得拥有。

2017-02-19

电子科技大学模式识别作业以及答案(包含上机)

配套之前上传的课件使用

2016-12-15

电子科技大学模式识别全套课件

电子科技大学模式识别全套课件 作业以及作业答案见我的其他上传资源

2016-12-13

电子科技大学SOPC实验代码以及总结

电子科技大学唐续老师SOPC代码以及实验总结 你懂的

2016-12-13

数字图像处理冈萨雷斯第三版全部答案(每一题都有)

数字图像处理 冈萨雷斯 第三版 全部答案(英文版)

2016-12-13

电子科技大学矩阵小论文

电子科技大学 矩阵论文

2016-12-13

冈萨雷斯第三版中文版答案

冈萨雷斯数字图像处理第三版中文版答案

2016-12-07

空空如也

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

TA关注的人

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