ICode9

精准搜索请尝试: 精确搜索
  • [Algorithm] Permutations2022-09-15 01:31:33

    Write a function that takes in an array of unique integers and returns an array of all permutations of those integers in no particular order. If the input array is empty, the function should return an empty array. Sample Input array = [1, 2, 3] Sample Out

  • (历史) 1960s,大家争先在共享内存上实现原子性 (互斥) 但几乎所有的实现都是错的,直到 Dekker's Algorithm,还只能保证两个线程的互斥2022-09-09 23:33:05

    (历史) 1960s,大家争先在共享内存上实现原子性 (互斥) 但几乎所有的实现都是错的,直到 Dekker's Algorithm,还只能保证两个线程的互斥  

  • EM算法2022-08-22 19:30:17

    EM Algorithm 目录EM AlgorithmJensen's inequalityEM Algorithm Jensen's inequality convex function: \(f''(x) \ge 0\) or \(H \ge 0\) (Hessian matrix when x is a vector) \[E[f(x)] \ge f(EX) \]EM Algorithm EM can be proved that it ma

  • OI loves Algorithm(一)——Toposort 之 Kahn2022-08-19 22:31:29

    上次我更了一个叫做 OI loves Math 的东西,那么这次我们来更算法! 当然了,这种东西我遇到啥我就更啥…… 先科普科普何谓拓扑排序。 拓扑排序指的是给你一个 DAG (Directed Acyclic Graph) ,让你排这些点,使得对于每条边 $ U \to V $ ,都存在 $ U \lt V $ 。 Kahn 算法的核心在于维护

  • logistic回归与牛顿法2022-08-10 22:03:52

    Locally Weighted Regression None parametric learning algorithm. Need to keep training data in the memory. Formally fit \(\theta\) to minimize \[\sum_{i=1}^{m} w_{i}(y_{i}-\theta^Tx_i)^2 \]where \(w_i\) is a weighting function. \[w_i = e^{-\frac

  • Greedy Algorithm2022-08-10 16:30:25

    Greedy Algorithm A greedy algorithm is any algorithm that follows the problem-solving heuristic of making the locally optimal choice at each stage. In many problems, a greedy strategy does not produce an optimal solution, but a greedy heuristic can yield

  • FileZilla使用SFTP协议连接Ubuntu报错:filezilla Couldn‘t agree a key exchange algorithm 。2022-08-07 08:31:09

    发生缘由 FileZilla连接Ubuntu传输文件 运行环境 电脑系统:win10 Ubuntu版本:ubuntu-20.04.4-desktop-amd64 FileZilla版本:FileZilla-3.7.3 报错信息 问题解决 有两种解决方式:更换一个FileZilla版本或者更换为连接协议。 更换FileZilla版本 官网:官网 网盘:网盘 经

  • MySQL加索引语句不加锁:ALGORITHM=INPLACE, LOCK=NONE2022-08-02 12:04:39

    线上无锁添加索引:加索引的语句不加锁 ALTER TABLE tbl_name ADD PRIMARY KEY (column), ALGORITHM=INPLACE, LOCK=NONE;    ALGORITHM=INPLACE更优秀的解决方案,在当前表加索引,步骤:1.创建索引(二级索引)数据字典2.加共享表锁,禁止DML,允许查询3.读取聚簇索引,构造新的索引项,排序

  • 素数算法(Prime Num Algorithm)2022-07-19 22:01:39

    素数算法(Prime Num Algorithm) 数学是科学的皇后,而素数可以说是数学最为核心的概念之一。围绕素数产生了很多伟大的故事,最为著名莫过于哥德巴赫猜想、素数定理和黎曼猜想(有趣的是,自牛顿以来的三个最伟大数学家,欧拉、高斯和黎曼,分别跟这些问题有着深刻的渊源)。我写这篇文章不是要探

  • 吴恩达Coursera, 机器学习专项课程, Machine Learning:Advanced Learning Algorithms第三周测验2022-07-03 02:00:24

    Practice quiz: Advice for applying machine learning 第 1 个问题:In the context of machine learning, what is a diagnostic? 【正确】A test that you run to gain insight into what is/isn’t working with a learning algorithm. An application of machine learning to m

  • Algorithm Big(O) Notation All In One2022-06-16 21:34:23

    Algorithm Big(O) Notation All In One 算法复杂度 - 大O 表示法 时间复杂度: 程序的执行时间长短 空间复杂度: 内存占用空间大小 算法优化 / 性能优化 Big(O) Notation Function Big(O) Notation 中文说明 Constant O(c) const 常量,取 1 ~ n Logarithmic O(log(n)) n

  • linux 树型显示文件2022-05-30 15:01:14

    linux 树型显示文件 tree 命令 sudo apt install tree 效果: tree . . ├── doc │   └── algorithm_test.md ├── example │   ├── pom.xml │   └── src │   └── main │   ├── resources │   │   ├── data.csv

  • sort algorithm2022-05-12 21:32:49

    n^2 sort   class Solution: """ @param a: an integer array @return: nothing """ def sort_integers1(self, a): # selection sort n = len(a) for i in range(n-1): # 在每轮比较中,将i

  • 阅读论文“Polynomial Fitting Algorithm Based on Neural Network” 笔记2022-05-12 18:04:39

      疑问:explicit/implicit polynomial是?区别? 神经网络: three-layer feedforward network-->Taylor series neutral network model   根据泰勒展开,展开点(某一点)的导数可以用作多项式的参数,进而拟合函数 在论文实验中,选择原点展开,taylor coefficient用作神经元的权重        

  • Socket缓冲区过小触发TCP Nagle's algorithm算法导致网络延迟大2022-05-06 23:33:19

    在游戏服务器当中,通常都会为每个客户端链接设置一个缓冲区。这样做的理由是游戏中通常会有持续不断,零碎的数据包发送到客户端,使用一个缓冲区可以把这些数据包攒到一起发送,避免频繁的io操作;另一个原因是,处理游戏逻辑的线程通常和io操作的线程是分开的,因此游戏逻辑线程把数据放到缓

  • 第二章:常见加密与解密2022-04-30 13:35:11

    一、常见加密方式 1、对称加密   采用单钥密码系统的加密方法,同一个密钥可以同时用作信息的加密和解密,这种加密方法称为对称加密,也称为单密钥加密。 (1)示例 我们现在有一个原文3要发送给B 设置密钥为108, 3 * 108 = 324, 将324作为密文发送给B B拿到密文324后, 使用324/108 = 3

  • 二分查找非递归Algorithm(java)2022-04-24 22:35:41

    二分查找的适用条件 二分查找只适用于有序的数列中进行查找(比如数字和字母等),将数列排序后再进行查找 二分查找的运行时间为对数时间O(LONG2 N) 二分查找非递归的实现 /** * @param arr 待查找的数据 升序排列 * @param target 需要查找的数 * @return 返回对应下标,-1表示没有找

  • 【原创】All in One i.MXRT1050/RT1020 SPI Flash Algorithm for J-Flash2022-03-30 18:33:57

           2020年,这个给大家一种很漫长的恍惚感的一年,终于是过去了。这一年我们很多新的人生第一次就这么被发生了,第一次居家办公这么长时间(很多人肥膘都长了不少,我却瘦了2斤,不知是工作太积极了还是被家里小怪兽给折磨的),第一次戴口罩这么长时间(大大超过了前两年北方雾霾严重的时

  • 贪心算法(Greedy Algorithm)2022-03-26 20:03:13

    贪心算法总是作出在当前看来最好的选择 —— 也就是说贪心算法并不从整体最优考虑,它所作出的选择只是在某种意义上的局部最优选择。 贪心算法得到的最终结果也可能是整体最优的,例如,单源最短路经问题(Dijskstra算法),最小生成树问题等。虽然贪心算法不能对所有问题都得到整体最优解,但

  • 【学生心理学优化算法】基于学生心理学优化算法求解单目标优化问题(SPBO)含Matlab源码2022-03-21 19:02:33

    1 简介 学生心理学优化算法(Student psychology based optimization algorithm,SPBO)是于2020 提出的一种基于学生向往提高成绩的心理提出的新颖智能优化算法。​ In this article, a new metaheuristic optimization algorithm (named as, student psychology based optimization

  • 【Algorithm】广度优先搜索(BFS)2022-03-19 21:02:35

    前面介绍了深度优先搜索,可知 DFS 是以深度作为第一关键词的,即当碰到岔道口时总是先选择其中的一条岔路前进,而不管其他岔路,直到碰到死胡同时才返回岔道口并选择其他岔道口。 接下来介绍的广度优先搜索则是以广度为第一关键词,当碰到岔路口时,总是先依次访问从该岔路口能直接到达的

  • C++ optimized fibonacci algorithm2022-03-19 20:34:28

    void Util::fib53(int *arr, int num, int &result) { arr[0]=0; arr[1]=1; for(int i=2;i<=num;i++) { arr[i]=arr[i-2]+arr[i-1]; } for(int i=0;i<=num;i++) { cout<<i<<","<<arr

  • 在 Nebula K8s 集群中使用 nebula-spark-connector 和 nebula-algorithm2022-03-10 11:35:07

    本文首发于 Nebula Graph Community 公众号 解决思路 解决 K8s 部署 Nebula Graph 集群后连接不上集群问题最方便的方法是将 nebula-algorithm / nebula-spark 运行在与 nebula-operator 相同的网络命名空间里,将 show hosts meta 的 MetaD 域名:端口 格式的地址填进配置里就可

  • 零基础学启发式算法(5)-遗传算法 (Genetic Algorithm)2022-02-23 20:04:49

    一、遗传算法 (Genetic Algorithm, GA)  源于达尔文的进化论,将问题的一个解当作种群中的一个个体。 gene:基因 chromosome: 染色体 population:种群 crossover:交叉 mutation:变异 selection:选择 通过多轮的“选择,交叉和变异”,选择适应度最好的个体作为问题的最优解。 选择

  • pytorch 训练 RuntimeError Unable to find a valid cuDNN algorithm to run convolution2022-02-23 14:58:55

    pytorch 训练 RuntimeError: Unable to find a valid cuDNN algorithm to run convolution pytorch 训练 RuntimeError: Unable to find a valid cuDNN algorithm to run convolution # 问题描述: python:3.95 pytorch:1.10.2 python train.py --img 640 --batch 64 --epo

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有