rouge

性能调优工具-火焰图

萝らか妹 提交于 2020-04-08 22:12:11
前言 工具的进化一直是人类生产力进步的标志,合理使用工具能大大提高我们的工作效率,遇到问题时,合理使用工具更能加快问题排查的进度。这也是我为什么非常喜欢 shell 的原因,它丰富的命令行工具集加管道特性处理起文本数据集来真的精准而优雅,让人迷醉。 但很多时候文本的表现力非常有限,可以说匮乏,表达绝对值时,自然是无往不利,但在展示相对值时,就有些捉襟见肘了,就更不用说多维数据了。我们用 shell 可以非常快速地查询出文本内的累加值、最大值等,但一遇到两组值的相关性分析时,就束手无策了。这个时候,就需要使用另一种分析工具 – 图 了,如散点图就能很清晰地展示相关性。 今天就准备介绍一种图, 火焰图 ,之前组内大神分享过它的使用办法,但我之后很久都没有用过,以至于对它没有什么深刻印象,最近排查我们 Java 应用负载问题时试用了一下,这才对它的用途有了点心得。 转载随意,文章会持续修订,请注明来源地址: https://zhenbianshu.github.io 。 介绍 引子 在排查性能问题时,我们通常会把线程栈 dump 出来,然后使用 grep --no-group-separator -A 1 java.lang.Thread.State jstack.log | awk 'NR%2==0' | sort | uniq -c | sort -nr 类似的 shell 语句

pfSense 2.4.5发布

偶尔善良 提交于 2020-04-06 05:51:20
2020年3月26日,pfSense2.4.5发布,这一版本修复了安全漏洞,增加了一些新功能,并支持新的Netgate硬件平台,该版本对以前发行版中存在的错误进行了修正。 点击 这里 下载pfSense2.45,要查看本次发行版本修改的完整列表,请参阅 发行说明 。 新功能 2.4.5添加了如下的新功能,包括: 操作系统升级 :操作系统已升级到FreeBSD 11-STABLE。 添加了排序和搜索/过滤,包括证书管理器,DHCP租约和ARP / NDP表。 添加了DNS解析器(Unbound)Python集成。 添加了IPsec DH和PFS组25、26、27和31。 更改后的UFS文件系统默认为 noatime 全新安装,以减少不必要的磁盘写入。 设置 autocomplete=new-password 包含验证字段的表单,以帮助防止浏览器自动填写不相关的字段。 添加了新的动态DNS提供程序Linode和Gandi。 安全修复 pfSense2.4.5修复了以下安全问题: 多个GUI页面中的潜在跨站点脚本(XSS)向量。 特权升级问题,其中,经过身份验证的用户被授予对图片小部件的访问权限,可以运行任意PHP代码或获得对他们没有特权的页面的访问权限。 在升级时为UFS文件系统添加了一个-z参数运行fsck,以解决FreeBSD-SA-19:10.ufs

Text Summarization Evaluation - BLEU vs ROUGE

穿精又带淫゛_ 提交于 2020-01-11 16:37:14
问题 With the results of two different summary systems (sys1 and sys2) and the same reference summaries, I evaluated them with both BLEU and ROUGE. The problem is: All ROUGE scores of sys1 was higher than sys2 (ROUGE-1, ROUGE-2, ROUGE-3, ROUGE-4, ROUGE-L, ROUGE-SU4, ...) but the BLEU score of sys1 was less than the BLEU score of sys2 (quite much). So my question is: Both ROUGE and BLEU are based on n-gram to measure the similar between the summaries of systems and the summaries of human. So why

GitHub Pages mangling syntax highlighting after upgrade to Jekyll 3

ⅰ亾dé卋堺 提交于 2020-01-06 19:57:04
问题 I use Github Pages for my personal website. They're upgrading from Jekyll 2 to Jekyll 3 and sending deprecation warnings. I complied with their warnings and switched from redcarpet to kramdown and from pygments to rouge. When I build locally (with bundle exec jekyll serve ) everything works. But when I push the changes the syntax highlighting gets mangled wherever I have linenos in my code blocks. This is the code block: {% highlight python linenos %} ''' scrape lyrics from vagalume.com.br

SyntaxError print(*args, **kwargs)

安稳与你 提交于 2019-12-25 01:00:14
问题 I've got an error as a traceback below: Traceback (most recent call last): File "setup_rouge.py", line 7, in <module> from files2rouge import settings File "/home/cerdas/files2rouge/files2rouge/__init__.py", line 2, in <module> from files2rouge.files2rouge import main File "/home/cerdas/files2rouge/files2rouge/files2rouge.py", line 17, in <module> from files2rouge import utils File "/home/cerdas/files2rouge/files2rouge/utils.py", line 14 print(*args, **kwargs) ^ SyntaxError: invalid syntax

Jekyll for GitHub Pages can't find rouge on Windows

一个人想着一个人 提交于 2019-12-24 04:36:21
问题 I just installed Jekyll on Windows and I'm trying to make the syntax highlight work with rouge. I have set highlighter: rouge on _config.yml. In the file _posts\2015-08-13-my-first-post.md I got: {% highlight javascript linenos %} var s = "JavaScript syntax highlighting"; alert(s); {% endhighlight %} When I run bundle exec jekyll serve it outputs: C:\Users\Fred\Documents\Projects\GithubPage>bundle exec jekyll serve Configuration file: C:/Users/Fred/Documents/Projects/GithubPage/_config.yml

Fenced codeblocks in Jekyll

这一生的挚爱 提交于 2019-12-23 02:34:23
问题 I have just upgraded my local Jekyll installation to Jekyll 3.0.2. I was looking forward to use fenced (backticks) code blocks when posting source code. This however doesn't work, and I still have to use Liquid tags to specify codeblocks My build settings in _config.yml: baseurl: / destination: _site permalink: pretty markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge List of Ruby gems installed activesupport (4.2.5.1) addressable (2.3.8) bigdecimal (1.2.6) bundler (1.11.2)

Rouge gem minimal example not showing formatting?

爷,独闯天下 提交于 2019-12-20 07:55:43
问题 I have followed the simple instructions in part A) of this answer. The code can be seen in the browser, but it's not formatted as it's supposed to be. When I view source, I can see that css classes are being generated, but it doesn't seem to change the appearance. This is the html generated (I added the div's) <div class="highlight"> <span class="k">def</span> <span class="nf">rouge_me</span> <span class="nb">puts</span> <span class="s1">'hey!'</span> <span class="k">end</span><br><br> </div>

AssertionError when installing pyrouge

試著忘記壹切 提交于 2019-12-13 15:14:07
问题 pyrouge : 0.1.3 rouge : downloaded from [here][1] since http://www.berouge.com/Pages/default.aspx is not accessable. I have installed XML::DOM and set the rouge path. And I've also tried suggestion from Errors installing Pyrouge. However there are still several assertion error here. Any suggestion to work it out? ====================================================================== FAIL: test_config_file (pyrouge.tests.Rouge155_test.PyrougeTest) ----------------------------------------------

Rouge gem not showing line breaks in formatted code?

别说谁变了你拦得住时间么 提交于 2019-12-13 03:26:55
问题 I have followed minimal examples using the rouge gem here (i.e. the documentation), as well as here and here. Everything working, except that line breaks in the code aren't appearing. To be explicit, code like this def plus_two(x) x + 2 end has the colours highlighted correctly, but is rendered across one line, like so def plus_two(x) x + 2 end How can I make it render with the line breaks (just as in the code file) 回答1: Change require 'rouge' source = "def plus_two(x)\n x + 2\nend" formatter