Toggle navigation
kifish
Home
About
Archive
project
Tags
kifish
博客页面
难懂的生成器 Python Generator
由于函数无法保存状态,故需要一个全局变量配合函数保存状态。 因为generator可以在执行过程中多次返回,所以它看上去就像一个可以记住执行状态的函数,利用这一点,写一个generator就可以实现需要用面向对象才能实现的功能。 generator有send方法,并且有返回值,如下...
Posted by kifish on April 28, 2018
Recognizing Digits With Opencv And Python
https://www.pyimagesearch.com/2017/02/13/recognizing-digits-with-opencv-and-python/ kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (1, 5)) ...
Posted by kifish on April 27, 2018
Python Logistic Regression
见http://blog.csdn.net/zouxy09/article/details/20319673: getA()函数是在numpy模块中的,功能是将矩阵转化成数组 主要bug原因是:有的地方把python当matlab了,比如对matrix的索引,两者其实有一些区别的。 原文...
Posted by kifish on April 27, 2018
Python Kmeans
http://blog.csdn.net/github_36326955/article/details/54999627 # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt from skle...
Posted by kifish on April 27, 2018
Matlab批量操作子文件夹下的文件
当然也可以处理其他后缀名的文件,只需改一下’.csv’ /实验数据 无关的文件 ... /subdir1 .csv ... /subdir2 .csv ... rootdir = '/Users/k...
Posted by kifish on April 27, 2018
Matlab保存图片
matlab的代码复制进onenote注释会乱码,干脆放博客了。 x=-pi:2*pi/300:pi; y=sin(x); plot(x,y); %Matlab根据文件扩展名,自动保存为相应格式图片,另外路径可以是绝对也可以是相对 %print(gcf,'-dpng','abc.png') ...
Posted by kifish on April 27, 2018
Mac脚本 定时气泡提醒休息
python toy.py import os from time import sleep #os.system('osascript -e 'display notification "通知内容" with title "标题" subtitle "子标题"'') #error #pyt...
Posted by kifish on April 27, 2018
Opencv Depth_map
OpenCV的基础操作可以看看这个:http://wiki.opencv.org.cn/index.php/%E9%A6%96%E9%A1%B5 可以看看这篇博客 http://blog.csdn.net/taily_duan/article/details/52165458 测试图片可...
Posted by kifish on April 27, 2018
← Newer Posts
Older Posts →