自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 卷积神经网络用于MRI图像中的脑部病变分割

在脑部病变中,脑瘤具有侵略性和危险性,可能导致患者寿命缩短。因此,有效的治疗方式和对病理的观察是必要的。磁共振成像(MRI)是一种用于评估肿瘤的成像技术,但MRI产生的数据量巨大,分割效率和准确性有限。在这项工作中,构建并比较了用于图像分割的四个流行的深度卷积神经网络(U-NET、DeepLab、FCN和SegNet)。这种比较揭示了实现有效分割和分割精度之间的权衡。使用深度学习,从MRI图像中识别脑部病变。在模型能够识别脑损伤后,通过调整模型结构、实施数据增强和寻找最佳超参数来改进深度学习模型。

2022-11-03 09:26:08 1241 1

原创 Python 1. Two Sum

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.You may assume that each input would have exactly one solution, and you may not use the same element twice.You can return the answer

2021-08-18 04:12:32 278

原创 Solution of Find Pivot Index

Given an array of integers nums, write a method that returns the “pivot” index of this array.We define the pivot index as the index where the sum of the numbers to the left of the index is equal to the sum of the numbers to the right of the index.If no s

2020-05-19 16:21:23 267

原创 Solution of Reverse Only Letters

Given a string S, return the “reversed” string where all characters that are not a letter stay in the same place, and all letters reverse their positions.Example 1:Input: “ab-cd”Output: “dc-ba”Example 2:Input: “a-bC-dEf-ghIj”Output: “j-Ih-gfE-dCba”E

2020-05-18 11:56:29 250

原创 Solution of Same Tree

Given two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes have the same value.Example 1:Input: 1 1/ \ / 2 3 2 3

2020-05-17 12:22:48 131

转载 如何运行Grafana以及对其进行告警设置

我们可通过http://monitor_host:3000访问Grafana网页界面(默认登陆帐号/密码为admin/admin)然后到Data Sources页面添加数据源:同步一个监控主机状态的图形设置grafana告警配置邮件服务yum install -y sendmailvi /etc/grafana/grafana.ini (配置文件添加如下)重启grafanasystemctl restart grafana-server在grafana的web界面添加接收告警的

2020-05-16 17:09:15 3509

原创 Solution of Reshape the Matrix

In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data.You’re given a matrix represented by a two-dimensional array, and two positive integers r and c represent

2020-05-16 12:58:22 137

转载 tf-operator 测试

笔者近期在做k8s上在线任务和离线任务同时实现的项目,那么所遇到的难题之一就是如何将tf-operator作为离线任务部署。笔者在网上搜索有关tf-operator的文章以及相关操作,发现有一篇博文非常合适,于是在这里进行转载并进行了归纳总结。关于 tf-operator,可以参考官网和 Github 仓库,简单理解,tf-operator 就是让用户在 K8S 集群上部署训练任务更加方便和简单。安装因为 Kubeflow 安利:在 Kubernetes 上进行机器学习 内容已经比较老了,Kubeflo

2020-05-15 17:35:56 504

原创 Solution of Range Sum Query - Immutable

Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0, 2) -> 1sumRange(2, 5) -> -1sumRange(0, 5) -> -3Note:You may assume that the array doe

2020-05-15 10:16:25 110

原创 Prometheus +Grafana部署

笔者在学习了Prometheus和Grafana理念后,决定在本地对其进行部署,并且笔者将部署过程和操作以视频的方式记录了下来。因为原版的视频过大,所以笔者对其进行了压缩

2020-05-14 15:00:52 310

原创 Solution of Sum With Multiplicity

Given an integer array A, and an integer target, return the number of tuples i, j, k such that i < j < k and A[i] + A[j] + A[k] == target.As the answer can be very large, return it modulo 10^9 + 7.Example 1:Input: A = [1,1,2,2,3,3,4,4,5,5], targe

2020-05-14 10:23:51 134

原创 Solution of Check Permutation LCCI

Given two strings,write a method to decide if one is a permutation of the other.Example 1:Input: s1 = “abc”, s2 = “bca”Output: trueExample 2:Input: s1 = “abc”, s2 = “bad”Output: falseNote:0 <= len(s1) <= 1000 <= len(s2) <= 100Idea of

2020-05-13 11:06:25 154

原创 Solution of Valid Perfect Square

Given a positive integer num, write a function which returns True if num is a perfect square else False.Note: Do not use any built-in library function such as sqrt.Example 1:Input: 16Output: trueExample 2:Input: 14Output: falseIdeas of solutionIt’

2020-05-12 11:50:05 152

原创 Prometheus与grafana监控

Prometheus是一个开源的系统监控和警报工具包,是由 SoundCloud 开源监控告警解决方案。笔者对prometheus与grafana进行了学习和理解并且整理了所需要的信息以及资源。特点:多维数据模型,时间序列由metric名字和K/V标签标识灵活的查询语言(PromQL)单机模式,不依赖分布式存储基于HTTP采用pull方式收集数据支持push数据到中间件(pushgateway)通过服务发现或静态配置发现目标prometheus存储的是时序数据,即

2020-05-11 17:35:28 622

原创 Solution of Add to Array-Form of Integer

For a non-negative integer X, the array-form of X is an array of its digits in left to right order. For example, if X = 1231, then the array form is [1,2,3,1].Given the array-form A of a non-negative integer X, return the array-form of the integer X+K.E

2020-05-11 12:16:27 109

原创 Solution of Guess Number Higher or Lower

We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I’ll tell you whether the number is higher or lower.You call a pre-defined API guess(int num) which re

2020-05-10 12:32:21 123

原创 k8s学习笔记(二)

k8s是一款容器编排平台,实现了容器编排功能。笔者在上一章中创建第一个pod并去尝试解决存在的一些问题,在这章中,笔者将会着重于k8s的入门以及一些基础命令的记录理解学习。控制平面:API Server (即Master节点) (6443 端口) 用户认证:双向认证SchedulerControllerAPI ServerAPI server核心功能是提供了k8s各类资源对象(Pod,RC,service)的增,删,改,查及HTTP REST接口。server是通过一个名为kube-apis

2020-05-09 17:23:15 225

原创 Solution of Letter Tile Possibilities

You have a set of tiles, where each tile has one letter tiles[i] printed on it. Return the number of possible non-empty sequences of letters you can make.Example 1:Input: “AAB”Output: 8Explanation: The possible sequences are “A”, “B”, “AA”, “AB”, “BA”

2020-05-09 10:40:18 160

原创 k8s学习笔记

K8S是基于容器的集群管理平台,它的全称,是kubernetes。k8s是一个编排容器的工具,其实也是管理应用的全生命周期的一个工具,从创建应用,应用的部署,应用提供服务,扩容缩容应用,应用更新,都非常的方便,而且可以做到故障自愈,例如一个服务器挂了,可以自动将这个服务器上的服务调度到另外一个主机上进行运行,无需进行人工干涉。并且k8s是一个开源的,用于管理云平台中多个主机上的容器化的应用,Kubernetes的目标是让部署容器化的应用简单并且高效(powerful),Kubernetes提供了应用部署,规

2020-05-08 19:46:56 665

原创 Solution of Matrix

Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell.The distance between two adjacent cells is 1.Example 1:Input:[[0,0,0],[0,1,0],[0,0,0]]Output:[[0,0,0],[0,1...

2020-05-08 12:06:59 167

原创 Docker——创建一个docker nginx镜像并通过浏览器访问

在本篇中,笔者将创建一个新的nginx的Docker镜像,运行后通过浏览器进行访问。先使用docker image查看我们现在有的镜像。打开一个容器。更新并安装nginx的包。可以看到遇到这种问题是因为我们无法更新apt导致的无法下载nginx。我们首先检查网络问题,发现网络无法连接。那么我们修改ip地址与DNS使其能连接。...

2020-05-08 11:25:36 2731 2

原创 Solution of Minimum Absolute Difference

Given an array of distinct integers arr, find all pairs of elements with the minimum absolute difference of any two elements.Return a list of pairs in ascending order(with respect to pairs), each pai...

2020-05-07 09:55:37 131

原创 K8s安装部署

笔者学习理解使用了docker后,了解到K8s是一款基于容器的集群管理平台。于是开始了学习并理解K8s的概念和应用。在这篇文章中,笔者将记录笔者安装部署K8s时的过程以及遇到问题时的解决方案。常见的K8S安装部署方式Minikube 单节点微型K8S二进制安装部署(生产首选,新手推荐)使用kubeadmin进行部署,K8S的部署工具,在K8S中运行获取Minikube的最简单的方式是...

2020-05-06 19:44:18 1201 1

原创 Solution of LCOF

Draw 5 cards at random from playing CARDS to see if it is a coincidence, that is, if the 5 CARDS are consecutive.2 ~ 10 is the number itself, A is 1, J is 11, Q is 12, K is 13, and xiao wang and xiao ...

2020-05-06 11:36:01 155

原创 K8S的概念分析以及学习理解归纳

在学习了Docker之后,笔者开始学习理解K8s,并对所学到的知识进行了总结和归纳。K8s是什么?K8S,就是基于容器的集群管理平台,它的全称,是kubernetes。k8s是一个编排容器的工具,其实也是管理应用的全生命周期的一个工具,从创建应用,应用的部署,应用提供服务,扩容缩容应用,应用更新,都非常的方便,而且可以做到故障自愈,例如一个服务器挂了,可以自动将这个服务器上的服务调度到另外一个...

2020-05-05 17:11:41 900

原创 Solution of Insert Into Bits LCCI

You are given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to insert M into N such that M starts at bit j and ends at bit i. You can assume that the bits j through i hav...

2020-05-05 12:06:16 130

原创 Cgroup与Namespace学习归纳理解

笔者作为一个初学者,在学习了docker的原理和概念后,对cgroup和namespace产生了兴趣,于是开始学习它们。学习理解并做出了归纳。什么是cgroupcgroups,其名称源自控制组群(control groups)的简写,是Linux内核的一个功能,用来限制、控制与分离一个进程组的资源(如CPU、内存、磁盘输入输出等)cgroups的一个设计目标是为不同的应用情况提供统一的接口,...

2020-05-04 19:15:02 6491

原创 Solution of Implement strStr()

Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = “hello”, needle = “ll”Output: 2Example 2:In...

2020-05-04 09:00:34 96

原创 Docker学习笔记(四)

笔者在上篇学习docker笔记中学习理解并归纳了Docker数据卷的理念和命令,同时也写了一些关于dockerfile的操作。在本篇笔记中,笔者将对dockerfile的进行详细地解析以及学习理解其指令与案例。DockerFile在上一篇学习笔记中,我们已经清楚了构建dockerFile的基本顺序:手动编写一个dockerfile文件,符合file规范用docker build命令执行,...

2020-05-03 17:44:17 171

原创 Solution of Factorial Zeros LCCI

Write an algorithm which computes the number of trailing zeros in n factorial.Example 1:Input: 3Output: 0Explanation: 3! = 6, no trailing zero.Example 2:Input: 5Output: 1Explanation: 5! = 120,...

2020-05-03 11:46:57 150

原创 Docker学习笔记(三)

笔者在上篇学习docker的笔记中学习理解并归纳了容器命令,镜像原理以及镜像commit。在这篇笔记中,笔者将会学习记录容器数据卷的原理以及命令。Docker中的数据可以存储在类似于虚拟机磁盘的介质中,在Docker中称为数据卷(Data Volume)。数据卷可以用来存储Docker应用的数据,也可以用来在Docker容器间进行数据共享。数据卷呈现给Docker容器的形式就是一个目录,支持多个容...

2020-05-02 18:15:17 241

原创 Solution of Perfect Number

We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself.Now, given an integer n, write a function that returns true when it is a perfect...

2020-05-02 11:04:20 128

原创 Docker学习笔记(二)

笔者在上篇学习docker的笔记中,已经涵盖了Docker的运行底层原理,帮助命令以及镜像命令。在这篇笔记中,笔者将会记录学习docker的容器命令,镜像原理,镜像commit以及容器数据卷的一些原理。1. 容器命令容器的根本前提是:镜像。只有有了镜像才能创建容器。笔者从官网拉下来一个centos的镜像,使用了如下命令:docker pull centos...

2020-05-01 21:31:00 202

原创 Solution of Reverse String

Write a function that reverses a string. The input string is given as an array of characters char[].Do not allocate extra space for another array, you must do this by modifying the input array in-pla...

2020-05-01 11:12:39 111

原创 Docker学习笔记

笔者在上篇安装docker的笔记中已经演示了如何运行hello-world镜(具体流程:先在本地寻找最新版的hello-world镜像,没有时,从官网拉一个镜像。下载最新的镜像)。在此篇中,笔者将会分享学习Docker的笔记以及归纳。1. Docker运行的机制和原理Docker是一个Client-Server结构的系统,Docker守护进程运行在主机上,然后通过Socket连接从客户端访问,...

2020-04-30 17:35:32 506

原创 Solution of Find the Distance Value Between Two Arrays

Given two integer arrays arr1 and arr2, and the integer d, return the distance value between the two arrays.The distance value is defined as the number of elements arr1[i] such that there is not any ...

2020-04-30 11:32:24 139

原创 如何上传代码到github

笔者最近开始做leetcode的练习,并且想要把解题思路和代码上传到github上,那么该怎么上传我们的代码呢。1. 注册github账号如果我们想将代码上传到github上,我们必须先创建一个属于自己的github账号。那么这里附上github的官方网站 https://github.com/那么这里附上笔者的github链接,有兴趣的读者可以访问并进行指导,https://github....

2020-04-29 20:43:47 769

原创 Solution of Bitwise AND of Numbers Range

Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.Example 1:Input: [5,7]Output: 4Example 2:Input: [0,1]Output: 0Ideas...

2020-04-29 11:44:27 81

原创 在Ubuntu上安装Docker

Ubuntu是一个以桌面应用为主的Linux操作系统,基于Debian发行版和Gnome桌面环境,而从11.04版起,Ubuntu发行版放弃了Gnome桌面环境,改为Unity。从前人们认为Linux难以安装、难以使用,在Ubuntu出现后这些都成为了历史。Ubuntu也拥有庞大的社区力量,用户可以方便地从社区获得帮助。而Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖...

2020-04-28 16:39:32 4121

原创 Solution of String to URL LCCI

Write a method to replace all spaces in a string with ‘%20’. You may assume that the string has sufficient space at the end to hold the additional characters,and that you are given the “true” length o...

2020-04-28 10:32:32 116

空空如也

空空如也

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

TA关注的人

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