自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(35)
  • 收藏
  • 关注

原创 时间机器 Time Machine 三星T7 移动硬盘SSD解决方案

Content时间机器 Time Machine 三星T7 移动硬盘SSD解决方案1 简介2 硬盘分区3 时间机器4 文件格式时间机器 Time Machine 三星T7 移动硬盘SSD解决方案1 简介时间机器(Time Machine)可以将Mac电脑上的全部文件进行备份,可以使用Mac内置硬盘,移动硬盘或者NAS存储数据。设备:MacBook Air M1系统:macOS Big Sur 11.6备份硬盘:Samsung T7 SSD USB3.2 1T2 硬盘分区时间机器使用的文件

2022-04-15 07:13:18 12991 1

原创 leetcode_142_环形链表II_python_图解

1 图解2 代码及分析这里说一说为什么步数设置为一步和两步?1、首先,快的必须是慢的两倍速才能保证在慢的第一圈出来之前就追上,所以speedFAST >= 2 * speedSLOW2、其次,由于是离散的情况,所以不是说只要快指针比满指针速度快就可以了,比如说1:3,就会出现运行超时的情况,快指针刚好越过慢指针3、但是2:4或者3:6是可以的,且消耗的运行内存相同。首先,快慢指针的距离是由于进入环形之前造成的,那么这个距离就一定是2的倍数或3的倍数,所以在环形中追逐的过程中,每次距离缩小

2022-03-17 09:33:46 1119

原创 leetcode_24_两两交换链表中的节点_python_图解

1图解2 代码及分析# 24. 两两交换链表中的节点class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next# 本题设置pre,cur和post的概念,本质上是准备将cur和post交换,所以添加virtual头节点本意也就是将第一个元素作为cur和第二个元素post交换class Solution: def swapPairs(

2022-03-17 09:24:44 850

原创 傅里叶变换原理—根据3Blue1Brown

1 什么是傅里叶变换傅里叶变换本质上是时域和频域之间的转换一个合成信号可以由不同频率的周期信号叠加而成比较容易理解的是通俗的信号随着时间变化的函数图像:傅里叶变换就是将信号随时间变化的图像转换成信号随频率变化的图像这个信号只有一个固定的频率,所以傅里叶变换完之后的图像会在这个固定频率处出现一个异常。2 类傅里叶变换如何进行将这个函数图像的形状转换为绕着一个点不断旋转的图像,频率由小到大增加,会发现函数图像会在旋转频率与实际信号频率相同时出现一个波峰,这就是可以测试出这段函数图像的频率,相当于

2022-03-16 01:55:19 6500

原创 python_leetcode_206_反转链表_图解

代码# 206.反转链表# python双指针法# 一定要多写几遍# Definition for singly-linked list.class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = nextclass Solution: def reverseList(self, head: ListNode) -> ListNode:

2022-03-13 10:52:29 1794

原创 python手撕链表_图解_leetcode707_设计链表

1 leetcode707 设计链表题目链接重点:创建虚拟头部head=Node(0) 增删时注意各个变量名的含义 增删循环结束后得到两个实例,分别是要打断的部分及后续以及后续 查找的时候如果范围是range(index+1),因为有head,返回值为最后得到的node.next.value,如果范围是range(index+2),返回值node.value2 python代码(附解析)# 单链表1.0# 先定义一个Nodeclass Node: def __init

2022-03-13 08:57:00 1527

原创 模拟行为_59; 54; 剑指29_leetcode_python

59.螺旋矩阵II# 59.螺旋矩阵II# 参考# class Solution:## def generateMatrix(self, n: int) -> List[List[int]]:# # 初始化要填充的正方形# matrix = [[0] * n for _ in range(n)]## left, right, up, down = 0, n - 1, 0, n - 1# number =

2022-03-12 00:34:13 207

原创 螺旋矩阵_leetcode54_python

Leetcode 54 螺旋矩阵剑指Offer 29.顺时针打印矩阵(同理)官方给出的答案和我找到的一些其它答案都说的不是很清晰,这里整理出一下一份答案。要点总结:1、关于行和列有可能是奇数还是偶数的问题,不需要纠结,只要循环的往出打印就可。2、遵守左闭右开的原则,遵守一个方向原则。3、每打印一行,检查一下返回数组的长度是否够了,免去许多不必要的麻烦。4、最后遍历完还是不够的话,再补上最中间的小格子5、实际上是,只有当行和列都是奇数的情况下,最后一个空填不出来。6、lef

2022-03-12 00:26:40 452

原创 滑动窗口_209; 904; 76__leetcode_python

209长度最小的子数组# 209.长度最小的子数组# a = []# for i in range(10):# a[i] = a.append([])# for j in range(5):# a[i][j] = a.append([])# print(a)# import numpy as np## test = [[0 for i in range(5)]for j in range(10)]# a = np.zeros((10,5))## .

2022-03-10 10:52:44 119

原创 双指针法_27; 26; 283; 844; 977__leetcode_python

27 移除元素# 27.移除元素# # 暴力求解# class Solution(object):# def removeElement(self, nums:list[int], val:int):## if not nums:# return 0# lens = 0# for i in range(0, len(nums)):# if nums[i] != val: # 逐

2022-03-10 10:48:42 77

原创 Python Tips

1、python创建二维空数组rows = 5 # 行数columns = 10 # 列数matrix = [[0 for _ in range(columns)] for _ in range(rows)]print(matrix)# [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0,

2022-03-10 10:34:07 263

原创 Python重点笔记整理(2)

1类 对象关系同一个类中的对象拥有相同的属性和方法类定义了属性和方法类只有一个,对象有无数个2 类的设计先分析需求程序中需要哪些类?1、类名(大驼峰命名法)2、属性(特性)3、方法(行为)eg:person类name、age、height三个属性run()、eat()两个方法dog类coler、name属性shake()、shout()方法3 dir内置函数dir函数传入表示符,可以查看对象内所有的属性和方法def demo():.

2022-03-10 10:16:58 127

原创 二分法查找_34;35;69;367;704

二分法1、数组为有序数组2、区间优先选择左闭右闭的区间,0---len(nums)-13、每个middle做对比的情况下都要进行边界条件更新,除非直接满足条件return。middle大:更新right = middle - 1,middle小:更新left = middle + 14、多考虑边界条件,高含金量:搜索左边界,搜索右边界# 704.二分查找.pyclass Solution: def search(self, nums: List[int], target:

2022-02-28 08:54:44 83

原创 Python重点笔记整理(1)

目录1 全局变量和局部变量2 函数调用,参数3 几个交换数值的办法4 函数的递归1 全局变量和局部变量1.1在函数内部不许更改全局变量的数值,全局变量默认不能修改如果使用赋值语句会在函数内部定义一个局部变量(因为不允许在函数内部修改全局变量)相当于重新生成一个数值,内存改变这个局部变量在函数执行完之后就删除了相当于没有调用全局变量实参和形参1.2在函数内部修改全局变量需要使用global函数Global关键字会告诉解释器后面的变量是一个全局变量.

2021-12-26 00:53:08 92

原创 python名片管理项目

目录1 主函数2 功能函数3 执行1 主函数NameCard_main.py# -*- coding:utf-8 -*-"""Author: chengzhiDate: 22/12/2021Function: Note: """#! /home/chengzhi/anaconda3/bin/pythonimport NameCard_Toolswhile True: # (chengzhi) show function menu NameCar

2021-12-23 23:49:49 825

原创 Ubuntu终端截图指令

Ctrl + alt + T 打开终端gnome-screenshot >>> 回车截图整个屏幕gnome-screenshot -d 3 >>> 延迟三秒gnome-screenshot -w >>> 当前窗口gnome-screenshot -w -b >>> 加边框

2021-12-23 23:30:25 1307

原创 Anaconda常用命令总结_基于Linux

1 基础命令conda --h帮助conda --version / conad --V返回软件版本conda update conda检查升级conda install 软件名安装软件conda install py36安装指定的包到py36conda list安装的软件列表conda remove 软件名移除软件2 环境命令conda create --name py36 python=3.6创建pytho...

2021-12-23 23:19:44 823

原创 Linux常用命令整理_Ubuntu 18.04.5(3)

6 切换用户su - 用户名 切换用户 - >> 同时切换家目录 su 切换到root exit 退出当前,切换上一个,知道退出shell 7 修改文件权限chown 用户名 文件/目录名 修改文件目录的拥有者 chgrp -R 组名 文件/目录名 递归修改文件目录的组 chmod -R 755 文件/目录名 递归修改文件权限 chmod +/- rwx 文件/目录名 直接修改权限

2021-12-23 23:02:31 289

原创 Linux常用命令整理_Ubuntu 18.04.5(2)

3 远程管理指令3.1 shutdowneg: shutdown -r now-r now 立即重启 now 现在关机 11:15 11:15关机 +10 十分钟后关机 -c 取消计划 3.2 ifconfig测试本地网卡用本地回环地址 127.0.0.1ifconfig 查看网卡配置信息 ifconfig | grep inet 查看IP地址 3.3 ping pin

2021-12-23 22:35:45 547

原创 Linux常用命令整理_Ubuntu 18.04.5(1)

Contents1 常见命令2 文件目录2.1 ls2.2 cd2.3 mkdir2.4 rm2.5 tree2.6 cp2.7 cat2.8 more2.9 grep2.10 通配符1 常见命令ls >> listpwd >> print work directorycd [name] >> change directorytouch [name] >> make a new filem

2021-12-15 00:58:34 1244

原创 VMware Tools安装配置环境

Contents1 VMware Tools 功能2 启动Ubuntu虚拟机3 关于VMware Tools功能部分失效1 VMware Tools 功能VMware自带的增强工具 更新虚拟机显卡驱动 同步主机和虚拟机的时间 提高分辨率,显著提升图形性能 实现主机和虚拟机之间的复制粘贴操作2 启动Ubuntu虚拟机虚拟机 - 安装VMware Tools (如已安装显示“重新安装”)打开Ubuntu - 文件,找到后缀为.tar.gz的文件,提取到系统盘文件夹如

2021-11-25 01:44:47 665

原创 VMware虚拟机安装配置Ubuntu_Linux

Contents1 安装VMware Workstation Pro2 配置VMware虚拟机3 下载并配置Ubuntu1 安装VMware Workstation Pro安装VMware2 配置VMware虚拟机打开VMware,新建虚拟机自定义,下一步选择稍后安装操作系统(注意)选择Linux操作系统虚拟机自定义配置分配内核和内存参考:2×2=4核、8G内存、50G磁盘拆分储存(不会立即占用内存空间)在磁盘中创建...

2021-11-25 00:53:42 542

原创 Python Tut_from freeCodeCamp.org (4)

24Reading Files# this is a txt.fileJim - SalesmanDwight - SalesmanPam - ReceptionistMichael - ManagerOscar - Accountant'''open("employees.txt", "r")only read, and "a" means you can append information onto the endof the file'''employee_.

2021-11-21 03:43:49 441

原创 Python Tut_from freeCodeCamp.org (3)

Contents16While Loop17Building a Guessing Game18For Loop19Exponent Function202D Lists and Nested Loops21Build a Translator22Comments23Try and Except 允许出错6While Loopi = 1while i <= 10: print(i) i = i + 1 # or i+= 1...

2021-11-21 03:25:07 133

原创 Python Tut_from freeCodeCamp.org (2)

9Tuples元组coordinates = (4,5)print(coordinates[0])# 4coordinates = (4,5)coordinates[1] = 10print(coordinates[0])# error / 'tuple' object does not support item assignmentcoordinates = [4,5]coordinates[1] = 10print(coordinates[1])# 10coo.

2021-11-19 01:57:21 597

原创 Python Tut_from freeCodeCamp.org (1)

目录1Variables and Data Types2Working with Strings3Working with Numbers4Get Input From Users5Building a Basic Calculator6Mad Libs Game7Lists8List Functions1Variables and Data Typescharacter_name ="Bob"character_age ="15"prin...

2021-11-19 01:00:31 445

原创 Computer Vision_Image Segmentation

1 Function_segment_image% @ Name: segment_image (I)% @ Author: Chengzhi Zhang% @ Time: 2021/11/04% @ Function: Edge Detection% @ Version: Matlab R2021b function [seg] = segment_image (I)% STEP 1 detect the image and convert the original image to

2021-11-18 23:59:22 2005

原创 Overleaf_LaTex (2)

5 Creat ListOrder and disorder\begin{itemize} \item The individual entries are indicated with a black dot, a so-called bullet. \item The text in the entries may be of any length.\end{itemize}\begin{enumerate} \item This is the first entry in

2021-11-18 23:32:08 1225

原创 Computer Vision_Matlab (6)

1Local feature detection% If your image is a color image, you should first convert it using % the rgb2gray functionI = imread('cameraman.tif');harrisFeatures = detectHarrisFeatures(I);surfFeatures = detectSURFFeatures(I);[features1, valid_points1.

2021-11-16 02:57:06 2365

原创 Computer Vision_Matlab (5)

I = imread('boat.png');I2 = im2double (I);figureimagesc (I2), colorbar;1Intensity HistogramsfigureIgray=rgb2gray(I2);subplot(2,2,1); hist(Igray(:),64); title('Intensity')Ired=I2(:,:,1);subplot(2,2,2); hist(Ired(:),64); title('Red')Igree...

2021-11-16 01:15:37 2483

原创 Computer Vision_Matlab (4)

1Simple CellsIa = imread ('elephant.png');Ia = im2double(Ia);v1 = gabor2 (3,0.1,90,0.75,90);Ia_gabor2 = conv2 (Ia, v1, 'valid');figure(1), clf,imagesc(Ia_gabor2); axis('equal','tight'), colormap('gray'); colorbar2 Complex CellsgA=gabor2(3,.

2021-11-16 01:02:57 385

原创 Computer Vision_Matlab (3)

1Box MasksIa = imread ('rooster.jpg');Ib = imread ('elephant.png');Ic = imread ('boxes.pgm');Ia = im2gray (Ia);Ib = im2gray (Ib);Ic = im2gray (Ic);Ia = im2double (Ia);Ib = im2double (Ib);Ic = im2double (Ic);figure(100), imagesc (Ic), colorbar;.

2021-11-13 00:21:33 1430

原创 Computer Vision_Matlab (2)

1Image ModificationIa=imread('rooster.jpg');Ib=imread('elephant.png');Ic=imread('woods.png');Ib(403,404)=1;Ib(401:end,401:end)=255;figure(1), clfimagesc(Ib); colormap('gray')Isyn=zeros(201,201);Isyn(51:150,51:150)=1;Isyn(81:120,:)=0...

2021-11-11 20:02:41 1295

原创 Computer Vision_Matlab (1)

1Loading Images from FilesIa=imread('rooster.jpg');Ib=imread('elephant.png');1.1Intensity imagesdouble---0.0(black)-1.0(white)unit 8---0-255The class uint8 only requires roughly 1/8 of the storage compared to the class double.1.2 Binary ima..

2021-11-11 04:01:18 1873

原创 Overleaf_LaTex (1)

1 What is Overleaf?Overleaf is a collaborative cloud-based LaTeX editor used for writing, editing and publishing scientific documents.2 Write the first part# This example's class is 'article', there is also 'report', 'book', etc.\documentclass{art

2021-11-11 01:35:50 349

空空如也

空空如也

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

TA关注的人

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