- 博客(13)
- 资源 (2)
- 收藏
- 关注
原创 统一图片名格式、删掉有重复命名的图片
'''写了点小代码,统一图片命名和格式,删掉有重复命名的'''import osdef rename(filepath): renames_nums = 0 images = os.listdir(filepath) for name in images: if len(name) != 11: os.rename(filep...
2018-11-28 16:30:03
1171
原创 记录一下anaconda环境遇到的坑
1、TypeError: __new__() got an unexpected keyword argument 'serialized_options'pip install -U protobuf #安装protobuf即可参考:https://stackoverflow.com/questions/50338968/objectdetecionapi-typeerror-n...
2018-11-20 00:15:15
1093
原创 169. Majority Element
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element alwa...
2018-11-18 21:53:26
141
原创 anaconda 踩坑graphviz
记录一下采坑graphviz的安装1、在官网下载graphviz,安装。2、安装pydot。3、添加系统环境变量,我的graphviz安装目录是:C:\Program Files (x86)\Graphviz2.38\bin。4、一定要重启vscode,才有用。...
2018-10-16 02:03:12
1032
原创 kaggle之Digit Recognizer
玩了下kaggle,采用了Dense和dropout,增大batch_size和epochs,提交结果准确率为 0.99800(5%),哈哈。# -*- coding: utf-8 -*-import tensorflow as tfimport kerasfrom keras.models import Sequentialfrom keras.layers import Den...
2018-09-04 10:14:52
277
原创 83. Remove Duplicates from Sorted List
记录一下删除重复单链表接点:/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */struct ListNode* deleteDuplicates(struct ListNode* head) { s...
2018-08-23 15:09:58
138
转载 iperf测试带宽
iperf是开源的跨平台网络带宽测试工具,支持windows、linux、macos、bsd等众多系统。可以测试带宽吞吐量、延迟、丢包等;支持使用TCP和UDP测试,结果比较准。由于是C/S架构,使用时需要在测试宽带的两端分别运行一个装有iperf的电脑,我是测试连接两个机房的专线,直接拿机房里的Linux服务器测试。一、安装sudo apt-get install iperf 二、测试无论...
2018-05-10 09:40:21
16971
2
原创 ubuntu16.04下tensorflow-gpu版本安装
记录一下各种折腾,本来是在windows下训练模型的,终于下定决心迁移到ubuntu上。参考网址:谷歌官方教程:https://tensorflow.google.cn/install/install_linux#the_url_of_the_tensorflow_python_package安装cuda,现在ubuntu上系统设置——软件和更新——附件驱动上安装NVIDIA驱动。然后再下载cud...
2018-05-08 21:35:32
450
2
转载 交并比IOU
交并比(Intersection-over-Union,IoU),目标检测中使用的一个概念,是产生的候选框(candidate bound)与原标记框(ground truth bound)的交叠率,即它们的交集与并集的比值。最理想情况是完全重叠,即比值为1。计算公式:Python实现代码:def calculateIoU(candidateBound, groundTrut...
2018-04-24 15:39:35
1167
转载 Python中的join()函数的用法
Python中有join()和os.path.join()两个函数,具体作用如下: join(): 连接字符串数组。将字符串、元组、列表中的元素以指定的字符(分隔符)连接生成一个新的字符串 os.path.join(): 将多个路径组合后返回一、函数说明1、join()函数语法: 'sep'.join(seq)参数说明sep:分隔符。可
2018-01-20 20:19:05
429
原创 LeetCode728. Self Dividing Numbers
class Solution: def selfDividingNumbers(self, left, right): """ :type left: int :type right: int :rtype: List[int] """ ans = [] for i in ra...
2018-01-20 16:13:49
196
原创 关于在spyder中自动代码自动补全
tensorflow版本1.4.0spyder版本3.2.4代码不能自动补全的话,try以下操作:pip uninstall enum34在anaconda navigator里面不一定显示了安装了enum34,最好conda list一下查看有没有这个包,有卸载就ok了。。参考:http://blog.youkuaiyun.com/lyq1471/article/deta
2017-12-14 14:05:49
3842
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人