自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ov流岚vo的专栏

LeetCode代码地址: https://github.com/flowingrain/LeetCode-java

  • 博客(141)
  • 资源 (3)
  • 收藏
  • 关注

原创 TagMe使用报错,AttributeError: ‘HTMLParser‘ object has no attribute ‘unescape‘

HTMLParser已移除unescape,直接去掉HTML_PARSER.unescape,功能恢复正常。

2022-11-16 16:12:17 535 1

转载 nbconvert AttributeError: module ‘mistune‘ has no attribute ‘BlockGrammar‘

nbconvert AttributeError: module 'mistune' has no attribute 'BlockGrammar'

2022-10-30 23:15:44 2469 2

原创 jupyter noteboook及nbextension安装问题及解决

jupyter notebook运行中出现各种错误及警告多由不同包的版本不匹配引发。安装扩展nbextensionspip install jupyter_nbextensions_configurator运行AttributeError: module ‘nbconvert.exporters’ has no attribute ‘WebPDFExporter’pip install nbconvert==5.6.1Exception ignored in: <function Ap

2022-05-14 12:15:51 3324 3

原创 390. 消除游戏

列表 arr 由在范围 [1, n] 中的所有整数组成,并按严格递增排序。请你对 arr 应用下述算法:从左到右,删除第一个数字,然后每隔一个数字删除一个,直到到达列表末尾。重复上面的步骤,但这次是从右到左。也就是,删除最右侧的数字,然后剩下的数字每隔一个删除一个。不断重复这两步,从左到右和从右到左交替进行,直到只剩下一个数字。给你整数 n ,返回 arr 最后剩下的数字。示例 1:输入:n = 9输出:6解释:arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]arr =

2022-01-02 15:36:16 1455

原创 Win10资源管理器闪退

Win+S键盘:输入“事件查看器”,在Windows日志》》应用程序中查看错误事件,发现关联wps动态链接库qingnse64.dll,用everything查找并全部删除后,资源管理器正常打开。

2021-04-26 11:11:24 1670 1

原创 EANN Event Adversarial Neural Networks for Multi-Modal Fake News Detection

@[TOC](EANN: Event Adversarial Neural Networks for Multi-Modal Fake News Detection)EANN用于新事件上的假消息识别,包含三个组件:多模态特征抽取器,假消息检测器和事件判别器。多模态特征抽取器用于文本和图像特征;假消息检测器上的损失函数最小来保证假消息检测的准确性,事件判别器上的交叉熵损失最大来保证事件无关性。(...

2020-04-05 10:38:17 1345 4

原创 latex编译出现“U+200B”错误

Package inputenc Error: Unicode character ​ (U+200B)(inputenc) not set up for use with LaTeX. ...utflow of the crowd in each area of ​​光标遍历也没有发现这个不可见字符,受 二师兄 启发,在notepad++中使用简单的文本替换锁定位置完成修改...

2020-03-23 17:35:25 2946 1

原创 Few-shot Classification on Graphs with Structural Regularized GCNs

通过在图神经网络的损失函数中加入正则项解决稀疏性问题。在标签较少时,通过有监督学习到的特征可以忽略不计。本文将原GCN作为编码层,并加入反向GCN进行解码,然后使用输入和输出之间的平方欧式距离作为损失函数进行训练。通过构造基于GCN的自动编码器,有效解决了稀疏性问题,在分类任务上取得了良好的效果。...

2020-03-23 10:16:55 724

转载 1D CNN

1D-CNN 与 2D-CNN 的区别构造 1D-CNN

2019-10-25 11:11:12 4065 1

转载 tikz实现文字沿路径摆放

tikz的decorations.text库可实现文字沿路径摆放等文字效果,见下例:\usetikzlibrary{decorations.text}\begin{tikzpicture} \draw [help lines] grid (3,2); \draw[red](0,0) .. controls (2,0) and (0,1) .. (3,2); ...

2019-10-13 11:05:13 795

原创 mean() missing 3 required positional argument: "dim", "keepdim", "dtype"

打印view_data参数类型打印tsne中参数类型所以,问题在于没有把torch张量转换为numpy二维数组encoded_data.detach().numpy()

2019-09-12 12:57:46 2310

原创 TypeError: doc2bow expects an array of unicode tokens on input, not a single string

构造词典时,输入的不应为原始文档集合,而是字符数组的数组。import nltkfrom gensim.models.ldamulticore import LdaModelfrom gensim.corpora.dictionary import Dictionaryfrom gensim.test.utils import datapathclass LDA(): ...

2019-07-04 16:22:55 4580

原创 AttributeError: module 'tensorflow' has no attribute 'placeholder'等问题的解决

参考import tensorflow as tfprint(tf.__path__)查看tf版本。我的是因为在tf2下使用了tf1的API。解决方式:使用import tensorflow.compat.v1 as tftf.disable_v2_behavior()替换import tensorflow as tf...

2019-06-25 10:26:00 123821 77

原创 LeetCode 11. Container With Most Water

分析思路//左侧从左向右,右侧从右向左//如果左侧比右侧低,则左侧右侧之间的节点与左侧节点之间面积不必计算;//容器高度按左侧计算,宽度不及到右侧的宽度//可直接左侧右移//如果右侧壁左侧第,则左侧右侧之间的节点与右侧节点之间面积不必计算。//可直接右侧左移难度 Medium来源 https://leetcode.com/problems/container-with-most-wat...

2019-06-14 15:15:20 126

翻译 (Notes) Latent Dirichlet Alloaction

https://github.com/flowingrain/papers

2019-04-14 15:33:47 142

翻译 Topical Word Embeddings

https://www.aaai.org/ocs/index.php/AAAI/AAAI15/paper/viewFile/9314/9535AAAI 15刘知远代码 https://github.com/largelymfs/topicalwordembeddings大多数单词嵌入模型通常使用单个向量来表示每个单词,使得这些模型不能对普遍存在的同义词和多义词进行有效区分。 为了增...

2019-04-10 10:41:17 520

翻译 Unsupervised Inductive Whole-Graph Embedding by Preserving Graph Proximity

ICLR 2019 提交通过保持图的接近性来实现无监督归纳全图嵌入https://arxiv.org/pdf/1904.01098.pdf设计无监督图嵌入模型面临的主要挑战是在训练阶段缺乏图级信号。 与利用图的链接结构嵌入节点不同,图之间缺乏这种自然接近(相似/距离)信息。 因此,监督方法通常采用图标签作为指导并使用基于聚合的方法,例如, 节点嵌入的平均值,用于生成图级嵌入,隐含的假设是仅使...

2019-04-09 22:28:12 343 1

原创 LeetCode 2. Add Two Numbers

分析难度 中来源 https://leetcode.com/problems/add-two-numbers/题目You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their n...

2019-03-31 15:13:36 103

原创 LeetCode 310. Minimum Height Trees

分析难度 中来源 https://leetcode.com/problems/minimum-height-trees/题目For an undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among a...

2019-03-28 22:24:31 122

原创 LeetCode 64. Minimum Path Sum

分析难度 中来源 https://leetcode.com/problems/minimum-path-sum/题目Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers alon...

2019-03-28 21:33:42 182

原创 LeetCode 309. Best Time to Buy and Sell Stock with Cooldown

分析难度 中来源 https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/题目Say you have an array for which the i th element is the price of a given stock on day i.Design an algorithm ...

2019-03-08 10:15:55 202

原创 LeetCode 307. Range Sum Query - Mutable

分析难度 中来源 https://leetcode.com/problems/range-sum-query-mutable/思路 https://blog.csdn.net/Jasmineaha/article/details/81462020使用树状数组(Binary Indexed Tree)其中A为普通数组,C为树状数组,奇数下标一定是叶子结点。相比线段树,所用空间更小,速度...

2019-03-07 16:55:35 134

原创 LeetCode 306. Additive Number

分析难度 中来源 https://leetcode.com/problems/additive-number/题目Additive number is a string whose digits can form additive sequence.A valid additive sequence should contain at least three numbers. Excep...

2019-03-05 16:35:25 169

原创 LeetCode 304. Range Sum Query 2D - Immutable

分析难度 中来源 https://leetcode.com/problems/range-sum-query-2d-immutable/题目Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and ...

2019-03-04 09:34:32 156

原创 LeetCode 300. Longest Increasing Subsequence

分析难度 中来源 https://leetcode.com/problems/longest-increasing-subsequence/思路tails is an array storing the smallest tail of all increasing subsequences with length i+1 in tails[i].For example, say we ...

2019-03-02 18:05:49 288

原创 LeetCode 143. Reorder List

分析难度 中来源 https://leetcode.com/problems/reorder-list/思路Find the middle of the listReverse the half after middleStart reorder one by one题目Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder...

2019-03-01 11:10:51 158

原创 LeetCode 150. Evaluate Reverse Polish Notation

分析难度 中来源 https://leetcode.com/problems/evaluate-reverse-polish-notation/使用集合存储操作符,使用栈存储操作数,当下一个字符串为数字时,压栈;当下一个字符串记录操作符的时候,连续两次退栈,结合操作符计算结果,然后压栈题目Evaluate the value of an arithmetic expression in ...

2019-03-01 09:46:41 113

原创 打印二叉树

TreeNode实现同LeetCode:public class TreeNode { Integer val; TreeNode left; TreeNode right; //TreeNode(Integer x) { val = x; } TreeNode(int x) { val = x; left=null; ...

2019-03-01 08:57:55 1305

原创 构造二叉树

public TreeNode buildTree(Integer[] array){ TreeNode root=new TreeNode(array[0]);//假设array[0]不为null Queue&amp;lt;TreeNode&amp;gt; queue=new LinkedList&amp;lt;TreeNode&amp;gt;(); queue.offer(r...

2019-03-01 08:54:32 1138

原创 LeetCode 144. Binary Tree Preorder Traversal

分析难度 中来源 https://leetcode.com/problems/binary-tree-preorder-traversal/submissions/题目Given a binary tree, return the preorder traversal of its nodes’ values.Example:Input: [1,null,2,3]1&nbsp; ...

2019-03-01 08:52:12 89

原创 LeetCode139. Word Break

分析难度 中来源 https://leetcode.com/problems/word-break/思路题目Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separ...

2019-02-26 13:32:01 146

原创 LeetCode 138. Copy List with Random Pointer

分析难度 中来源 https://leetcode.com/problems/copy-list-with-random-pointer/思路Iterate the original list and duplicate each node. The duplicateof each node follows its original immediately.Iterate the ...

2019-02-25 15:26:07 180

原创 LeetCode 299. Bulls and Cows

分析难度 中来源 https://leetcode.com/problems/bulls-and-cows/题目You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is....

2019-02-24 11:15:32 180

原创 LeetCode 289. Game of Life

分析难度 中来源 https://leetcode.com/problems/game-of-life/思路To solve it in place, we use 2 bits to store 2 states: [2nd bit, 1stbit] = [next state, current state]00 dead (next) &lt;- dead (current)...

2019-02-23 15:39:32 152

原创 LeetCode 275. H-Index II

分析难度 中来源 https://leetcode.com/problems/h-index-ii/题目Given an array of citations sorted in ascending order (each citation is a non-negative integer) of a researcher, write a function to compute the...

2019-02-22 09:58:05 153

原创 LeetCode 274. H-Index

分析难度 中来源 https://leetcode.com/problems/h-index/思路1If we have the function f ordered in decreasing order from the largest value to the lowest one, we can compute the h index as follows:思路2 //The...

2019-02-21 11:00:19 174

原创 LeetCode 260. Single Number III

分析难度 中来源 https://leetcode.com/problems/single-number-iii/两种方式,位运算或者利用HashSethttps://leetcode.com/problems/single-number-iii/discuss/68901/Sharing-explanation-of-the-solutionThe two numbers that ...

2019-02-20 17:15:45 151

原创 LeetCode 355. Design Twitter

分析难度 中来源 https://leetcode.com/problems/design-twitter/题目Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweet...

2019-02-19 20:08:24 279

原创 LeetCode 313. Super Ugly Number

分析难度 中来源 https://leetcode.com/problems/super-ugly-number/题目Write a program to find the nth super ugly number.Super ugly numbers are positive numbers whose all prime factors are in the given prime...

2019-02-18 20:46:10 112

原创 LeetCode 264. Ugly Number II

分析难度 中来源 https://leetcode.com/problems/ugly-number-ii/题目Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.Example:Input: n ...

2019-02-18 20:18:00 95

ltp4j_v1.jar

ltp4j是语言技术平台(Language Technology Platform, LTP)接口的一个Java封装。

2017-05-10

空空如也

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

TA关注的人

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