啊 #CG 真好看,某些大型平台比如 OMP、AVX、SSE、MMX、OpenGL、CUDA 什么的必须学学了... 🤔
啥时候学某学长写个 SSE 优化的 Java CriticalNative 矩阵处理呢?
啥?居然是学姐?这么说我开始还记得是对的? 🌚
啥时候学某学长写个 SSE 优化的 Java CriticalNative 矩阵处理呢?
啥?居然是学姐?这么说我开始还记得是对的? 🌚
知乎专栏
JNI系列完结篇
那么我自己总结的关于 JNI 的东西就差不多这些了,我也看过很多相关资料,在这里带逛一波(是不是可以称之为冰带逛啊///////)。为什么要看我带逛而不是自己 Google搜出来的东西大部分没啥质量,基本是搜出来 10 …
duangsuse::Echo
https://echarts.baidu.com/examples/ 啊真好看,不过我还是想先用 plot 分析一下本频道的消息发送时间(跑
GitHub
GitHub - rdp/ruby_gnuplot: The ruby gnuplot gem [gnuplot] [rgnuplot] (official releases of the gnuplot gem are from rdp branch)
The ruby gnuplot gem [gnuplot] [rgnuplot] (official releases of the gnuplot gem are from rdp branch) - GitHub - rdp/ruby_gnuplot: The ruby gnuplot gem [gnuplot] [rgnuplot] (official releases of the...
duangsuse::Echo
https://github.com/rdp/ruby_gnuplot 使用这个画 X axis: 时间点 Y axis: 消息条数
#Coolapk #stat 顺便推荐隔壁老酷安统计的(两年前了),unnamed 大佬好像把自己的统计删了... 🤔
不过我是拿 Ruby 内建的列表处理方法算了自己频道的小数据,他是用 SQL 建模查询的(
不过我是拿 Ruby 内建的列表处理方法算了自己频道的小数据,他是用 SQL 建模查询的(
GitHub
by-syk/CoolapkUserStats
酷安用户数据爬虫案例 A Python sample to get all user data of CoolApk - by-syk/CoolapkUserStats
duangsuse::Echo
#Ruby 弄了半天我才知道 Ruby 里 Enumerator 还可以 with_index... 😂 还可以 map(Enumerator).with_index { |a, i| }...
require 'gnuplot'
xs = []; ys = []
_dataset = r.map { |it| it['published'] }
ps = _dataset.sort_by { |d| d.day }.reverse.each { |k| xs << k.day; ys << _dataset.count { |it| it.day == k.day } }
Gnuplot.open do |p|
Gnuplot::Plot.new(p) do |plot|
plot.title "duangsuse::Echo message publish time (all #{ys.size}, day from #{xs.min} to #{xs.max})"
plot.xlabel "day (1-31)"
plot.ylabel "messages count"
plot.data << Gnuplot::DataSet.new([xs, ys]) do |ds|
ds.with = "points"
ds.notitle
end
end
end
然后就可以画出类似下面的统计折线图: 🤔 #Ruby #Gnu #stat #Learn需要注意的是,gnuplot 比较底层和原始,它不会自动帮你处理好数据集合排序(如果需要的话,比如这里就需要)
弄不好会生成瞎* 🐔 折线图,会包含『反折』的线条角度...
Ruby 的 gnuplot Gem 很简单,之需了解 DataSet 和 Plot、GnuPlot 程序命令行接口的抽象即可
Plot 是图座标系的抽象,包含
title(图表名)、xlabel 和 ylabel,也可以设置初始 xrange,它包含的折线们就是 data 数组DataSet 就是要往 Plot 上画的点集合,每个新画上去的点都有一个 x value 和 y value(可以作为一个 xvalue, yvalue 数组传入
new),并且如果要连线就会和上一个点连接。DataSet 可以指定是
with 'lines' 'points' 还是 'linespoints'可以指定
linewidth 和 title(这条折线的 title)也可以 notitletelegramscanner_with_rb.zip
186.9 KB
好了,那么这周这个工程就这些。( 😃
🤔 所以,我们可以用 echarts 来完成更好的可视化需求(
依然是折线图,还是 187 个数据,我们看看使用 echarts 怎么样,待会发 html.
依然是折线图,还是 187 个数据,我们看看使用 echarts 怎么样,待会发 html.
差点忘了发 #share 结果图,gnuplot 完成度比较... 呃,或者说 GUI 功能有点限制,不好用,只能导出成这样,待会会有好的。
duangsuse::Echo
🤔 所以,我们可以用 echarts 来完成更好的可视化需求( 依然是折线图,还是 187 个数据,我们看看使用 echarts 怎么样,待会发 html.
我们使用条形图。 🤔
条形图的 xAxis 是时间,可缩放,yAxis 是这个时间里的消息条数。
基于这种需求,我们首先拿到数据点集合:
条形图的 xAxis 是时间,可缩放,yAxis 是这个时间里的消息条数。
基于这种需求,我们首先拿到数据点集合:
data = collect { |it| it['published'] }.map.with_index { |p, i| [self[i], p] }.sort_by(&:last)
result data.map(&:last).yield_self { |t| t.map { |s| [s, t.count(s) ] } }
puts result.to_json
这样就拿到了时间和条数的 pair 二维数组 🐱