telegram-scanner.jar
34.2 KB
Maven jar plugin 生成的 Jar application,可选 -test, -dump, -dump-yaml, -dump-debug-yaml
duangsuse::Echo
Photo
在 Ruby 里,要把它解析成 List & Object 的形式,只需要利用 Nokogiri:require 'nokogiri'
plain = File.read('test.xml')
doc = Nokogiri.parse(plain)
root = doc.children[0]
def collect_real_tags(xml)
i = 1; ret = []
while i < xml.size
ret << xml[i]
i += 2
end
return ret
end
real = collect_real_tags root.children
m = real.map { |n| n.children.find_all { |i| i.is_a? Nokogiri::XML::Element } }
m.map! { |a| a.find_all { |i| i.name == "dt" }.zip(a.find_all { |i| i.name == "dd" }).map { |n| [n.first.children[0].text, n.last.children.text] } }
m.map!(&:to_h)
r = m.dup最后再 post-process 一下就可以了
r.map! { |h| h.merge({'debug' => %w[no off line message_line].zip(h['debug'].match(/\{message_no=(\d+),\s*offset=(\d+),\s*line=(\d+),\s*message_line=(\d+)\}/).captures.map(&:to_i)).to_h, 'hashtags' => h['hashtags'].tr("[]", "").split(','), 'links' => h['links'].tr("[] ", "").split(',') }) }
# time
r.map! { |h| h.merge({ 'published' => Time.at(0, h['published'].to_i, :millisecond) }) }
duangsuse::Echo
在 Ruby 里,要把它解析成 List & Object 的形式,只需要利用 Nokogiri: require 'nokogiri' plain = File.read('test.xml') doc = Nokogiri.parse(plain) root = doc.children[0] def collect_real_tags(xml) i = 1; ret = [] while i < xml.size ret << xml[i] i += 2 end …
This media is not supported in your browser
VIEW IN TELEGRAM
🤔 下面就是本 #Telegram Channel 的消息内容统计信息了
duangsuse::Echo
在 Ruby 里,要把它解析成 List & Object 的形式,只需要利用 Nokogiri: require 'nokogiri' plain = File.read('test.xml') doc = Nokogiri.parse(plain) root = doc.children[0] def collect_real_tags(xml) i = 1; ret = [] while i < xml.size ret << xml[i] i += 2 end …
可惜没有绘制成图表 plot 好看一些 🤔
— 🔗 有 XXX 的消息条数
众所总周知,这种消息一般是很优秀的消息(跑),值得大家观摩,它们分别是:
https://t.me/dsuse/9512
它的总编号是 9512, 不过,因为零基数组微妙的差异(解析的时候用了两次零基数组),得加上 1 才可以
https://t.me/dsuse/9527
https://t.me/dsuse/9541
https://t.me/dsuse/9576
https://t.me/dsuse/9580
https://t.me/dsuse/9585
...
或者详细一点:
#Ruby #Project 一个失败的尝试,但是我也了解了二进制 IO 的一些信息
https:/...
https://t.me/dsuse/9541
https://zhuanlan.zhihu.com/p/60171538
#dotNet
...
https://t.me/dsuse/9576
#Mozilla #ES6 #JavaScript #frontend #backend 啊,的确,不...
https://t.me/dsuse/9580
#tech #CS 来科普一打有趣的信息技术相关知识: 🤗
1. Windows 里的 A: B: ...
https://t.me/dsuse/9585
5. 手机和磁卡放在一起,会不会『消磁』?
== 对于磁卡来说,『消磁』是什么?
以磁性介质存储...
https://t.me/dsuse/9586
6. 世界上第一个网站是什么?
惊闻刘国梁荣当乒协主席,深感高兴。虽然我们未曾有过交集,但乒乓球运动...
https://t.me/dsuse/9605
https://github.com/duangsuse/RandomPicture 我必须得感谢自己...
https://t.me/dsuse/9621
我待会把坑填完... #Android #blogPOst
https://blog.yuuta.m...
https://t.me/dsuse/9637
效率.... 🤐
那既然已经花了很多时间就再多花一点(皮)
演示一下这个功能:
[DuangSU...
https://t.me/dsuse/9638
最后,快速了解一下 #Android 系统服务 (https://blog.yuuta.moe/201...
https://t.me/dsuse/9643
https://github.com/LineageOS/android_frameworks_bas...
https://t.me/dsuse/9645
#blog #recommended https://bindog.github.io/
...
https://t.me/dsuse/9654
#CS #fix 下面我来给大家解释一下停机问题和 NP 困难到底是什么,和我这里提到的 NP-har...
https://t.me/dsuse/9663
现在开始讲解方才 @drakeet 的排序问题
5 没有被手动排序过,5 排在 1 前面,4 被手动...
https://t.me/dsuse/9676
#Android 类似的设计详询 Android Input Methods (https://dev...
https://t.me/dsuse/9684
感谢 @haoyet @eGluZl 等热心用户的建议,YuutaW 主要参照 https://www...
https://t.me/dsuse/9689
#通知
我们的MTProxy已经上线,欢迎使用
点击这里设置代理 (https://t.me/pro...
r.size #=> 187一共统计了 187 条消息。
r.sort_by { |it| it['published'] }.first['published']
=> 2019-03-24 11:22:00 +0800
第一条消息是 2019-03-24 11:22发送的
r.sort_by { |it| it['published'] }.last['published']
=> 2019-04-05 20:06:00 +0800
最后一条消息是2019-04-05 20:06发送的
— 🔗 有 XXX 的消息条数
r.find_all { |it| it['body_type'] == 'HAS_HASHTAGS' }.size
=> 42有 #Telegram Hashtag 的消息,一共有 42 条,约有 20% 的消息被打上了标签
r.find_all { |it| it['body_type'] == 'HAS_LINKS' }.size
=> 37
含链接的消息,一共有 37 条,约有 19% 的消息被打上了标签r.find_all { |it| it['body_type'] == 'HAS_LINKS_AND_HASTAGS' }.size
=> 17
都有的消息有 17 条,占总消息的 9%众所总周知,这种消息一般是很优秀的消息(跑),值得大家观摩,它们分别是:
r.sort_by { |it| it['debug']['no'] }
我们看到,第一条消息是 2019-03-24 11:22:00 的 AXMLParser 广播https://t.me/dsuse/9512
它的总编号是 9512, 不过,因为零基数组微妙的差异(解析的时候用了两次零基数组),得加上 1 才可以
puts r.find_all { |it| it['body_type'] == 'HAS_LINKS_AND_HASTAGS' }.map { |m| "https://t.me/dsuse/#{m['debug']['no'] + 9511 +1}" }.sort.join("\n")
::https://t.me/dsuse/9527
https://t.me/dsuse/9541
https://t.me/dsuse/9576
https://t.me/dsuse/9580
https://t.me/dsuse/9585
...
或者详细一点:
puts r.find_all { |it| it['body_type'] == 'HAS_LINKS_AND_HASTAGS' }.map { |m| "https://t.me/dsuse/#{m['debug']['no'] + 9511 +1}\n#{m['body'][0..50]}...\n" }.sort.join("\n")
https://t.me/dsuse/9527#Ruby #Project 一个失败的尝试,但是我也了解了二进制 IO 的一些信息
https:/...
https://t.me/dsuse/9541
https://zhuanlan.zhihu.com/p/60171538
#dotNet
...
https://t.me/dsuse/9576
#Mozilla #ES6 #JavaScript #frontend #backend 啊,的确,不...
https://t.me/dsuse/9580
#tech #CS 来科普一打有趣的信息技术相关知识: 🤗
1. Windows 里的 A: B: ...
https://t.me/dsuse/9585
5. 手机和磁卡放在一起,会不会『消磁』?
== 对于磁卡来说,『消磁』是什么?
以磁性介质存储...
https://t.me/dsuse/9586
6. 世界上第一个网站是什么?
惊闻刘国梁荣当乒协主席,深感高兴。虽然我们未曾有过交集,但乒乓球运动...
https://t.me/dsuse/9605
https://github.com/duangsuse/RandomPicture 我必须得感谢自己...
https://t.me/dsuse/9621
我待会把坑填完... #Android #blogPOst
https://blog.yuuta.m...
https://t.me/dsuse/9637
效率.... 🤐
那既然已经花了很多时间就再多花一点(皮)
演示一下这个功能:
[DuangSU...
https://t.me/dsuse/9638
最后,快速了解一下 #Android 系统服务 (https://blog.yuuta.moe/201...
https://t.me/dsuse/9643
https://github.com/LineageOS/android_frameworks_bas...
https://t.me/dsuse/9645
#blog #recommended https://bindog.github.io/
...
https://t.me/dsuse/9654
#CS #fix 下面我来给大家解释一下停机问题和 NP 困难到底是什么,和我这里提到的 NP-har...
https://t.me/dsuse/9663
现在开始讲解方才 @drakeet 的排序问题
5 没有被手动排序过,5 排在 1 前面,4 被手动...
https://t.me/dsuse/9676
#Android 类似的设计详询 Android Input Methods (https://dev...
https://t.me/dsuse/9684
感谢 @haoyet @eGluZl 等热心用户的建议,YuutaW 主要参照 https://www...
https://t.me/dsuse/9689
#通知
我们的MTProxy已经上线,欢迎使用
点击这里设置代理 (https://t.me/pro...
Telegram
duangsuse::Echo
AXMLParser parser = new AXMLParser(apkFileInputStream);
int eventType = parser.getType();
while (eventType != AXMLParser.END_DOCUMENT) {
String parserName = parser.getName();
boolean isManifest = "manifest".equals(parserName);
[...]
eventType…
int eventType = parser.getType();
while (eventType != AXMLParser.END_DOCUMENT) {
String parserName = parser.getName();
boolean isManifest = "manifest".equals(parserName);
[...]
eventType…
duangsuse::Echo
可惜没有绘制成图表 plot 好看一些 🤔 r.size #=> 187 一共统计了 187 条消息。 r.sort_by { |it| it['published'] }.first['published'] => 2019-03-24 11:22:00 +0800 第一条消息是 2019-03-24 11:22 发送的 r.sort_by { |it| it['published'] }.last['published'] => 2019-04-05 20:06:00 +0800 最后一条消息是…
😃 那么,简而言之,我觉得有价值的信息:
2019-03-24 11:22 - 2019-04-05 20:06,一共两个星期的时间里,本频道 @dsuse
+ 有 #Telegram Hashtag 的消息,一共有 42 条,约有 20% 的消息被打上了标签
+ 含链接的消息,一共有 37 条,约有 19% 的消息被打上了标签
+ 链接和 Tag 都有的消息有 17 条,占总消息的 9%
+ 187 条消息里,折行最多的消息是这条,它有 4232 个字和 7 条链接。
当然,这 70 条都是回复本频道消息的。
IT 那点事 (YuutaW 鱼塔): 10
羽毛的小白板: 10
duangsuse Throws: 6
Rachel 碎碎念 (IFTTT): 5
Rachel 的消息发布站点 (Rachel Miracle.) via @like: 3
YSC 的频道: 2
duangsuse ¯\_(ツ)_/¯ |学渣 | 我爱学习 | ∈ [E²PROM, 范畴论]: 2
Doge: 2
YuutaW 鱼塔: 2
Rachel 碎碎念 (湘江一桥): 2
DogeSpeed广播: 1
😄 @haneko_daily 被转发的次数最多,继续努力!
😳: 4
😲: 3
😡: 2
😑: 2
🙄: 2
😋: 2
😀: 2
😥: 2
🍹: 1
😐: 1
最火的 hashtags 组合:
所有 Hashtags:
以及他们的消息覆盖个数:
== 非线性查询(当然和算法上那个没有关系啦,就是复杂一点的查询)
// 收集所有单 / 双数索引
受到解析度(只到分钟)和浮点运算准确度的影响,有很多消息都是在间隔一分钟内发完的,统计结果可能不正确。
好啦,还有什么别的信息,请大家自己来发掘呗( 😝 比如说,我熬夜发过多少消息。
def get_link(h); "https://t.me/dsuse/#{h['debug']['no'] + 9511 + 20}"; end
+ 一共统计了 187 条消息。2019-03-24 11:22 - 2019-04-05 20:06,一共两个星期的时间里,本频道 @dsuse
+ 有 #Telegram Hashtag 的消息,一共有 42 条,约有 20% 的消息被打上了标签
+ 含链接的消息,一共有 37 条,约有 19% 的消息被打上了标签
+ 链接和 Tag 都有的消息有 17 条,占总消息的 9%
map { |h| [h['body'].size, h] }.sort_by { |it| it.first }.reverse
map { |h| [h['body'].size, h] }.sort_by { |it| it.first }.reverse.first[1]['links'].size
+ 187 条消息里,最长的消息是这条,它有 4475 个字 — 连链接都有 25 条! 🤪+ 187 条消息里,折行最多的消息是这条,它有 4232 个字和 7 条链接。
sum { |it| it['body'].size } / size
+ duangsuse 的平均字数:359 字 / 消息sum { |it| it['body'].lines.size } / size
+ duangsuse 的平均行数:11 行 / 消息find_all { |it| it['header_type'] == 'REPLY' }.size
+ 过去的 187 条消息里,有 70 条都是回复,占总量 37%find_all { |it| it['header_type'] == 'FORWARDED' }.size
+ 过去的 187 条消息里,有 45 是转发自其他频道或个人的,占总量 24%当然,这 70 条都是回复本频道消息的。
a.uniq.map { |u| [u, a.count(u)] }.sort_by { |it| it.last }.reverse.to_h.each { |e| puts "#{e.first}: #{e.last}" }
+ 转发者和条数表如下:IT 那点事 (YuutaW 鱼塔): 10
羽毛的小白板: 10
duangsuse Throws: 6
Rachel 碎碎念 (IFTTT): 5
Rachel 的消息发布站点 (Rachel Miracle.) via @like: 3
YSC 的频道: 2
duangsuse ¯\_(ツ)_/¯ |学渣 | 我爱学习 | ∈ [E²PROM, 范畴论]: 2
Doge: 2
YuutaW 鱼塔: 2
Rachel 碎碎念 (湘江一桥): 2
DogeSpeed广播: 1
😄 @haneko_daily 被转发的次数最多,继续努力!
sort_by { |it| it['hashtags'].size }.reverse
+ 具有最多标签的消息是这条,它有足足 8 条标签!sort_by { |it| it['links'].size }.reverse.first
+ 具有最多链接的消息是这条,它有 25 条链接!同时也是字数最多的消息!find_all { |it| it['header_type'] == 'A_PHOTO' }.size
过去 187 条消息里,一共有 29 条广播是单纯的一个照片 🖼find_all { |it| it['header_type'] == 'A_ALBUM' }.size
过去 187 条消息里,一共有 5 条广播是照片集 📸find_all { |it| it['header_type'] == 'IS_STICKER' }.size
可爱 🐱 的 duangsuse 在过去 187 条消息里使用了 28 个 sticker 抒发自己的感情,使用的表情这么多:find_all { |it| it['header_type'] == 'IS_STICKER' }.collect { |it| it['ext'] }.yield_self { |r| r.uniq.map { |u| [u, r.count(u)] }.sort_by { |it| it.last }.reverse.to_h.each { |e| puts "#{e.first}: #{e.last}" } }
😔: 7😳: 4
😲: 3
😡: 2
😑: 2
🙄: 2
😋: 2
😀: 2
😥: 2
🍹: 1
😐: 1
find_all { |it| it['header_type'] == 'HAS_FILE' }.size
duangsuse 在过去 187 条消息里发了 8 个文件,它们是:find_all { |it| it['header_type'] == 'HAS_FILE' }.collect { |it| it['ext'] }
["axml.rb", "AndroidManifest.xml", "AndroidManifest.xml", "TextSort.kt", "RandomPicture.kt", "Vibrator.svg", "Vibrator.png", "Vibrator.svg"]最火的 hashtags 组合:
collect { |it| it['hashtags'] }.yield_self { |r| r.uniq.map { |u| [u, r.count(u)] }.sort_by { |it| it.last }.reverse.to_h.each { |e| puts "#{e.first}: #{e.last}" } }
结果太长,在这里查看所有 Hashtags:
hs = s.flatten.find_all { |it| it.is_a? Array }.flatten.map { |s| s.tr(" ", "") }
"#" + hs.uniq.join(' #')
#Android #zhihu #KDE #Low #Haha #life #tech #tencent #WeChat #weibo #share #tools #dev #Markups #Telegram #Hack #aop #Huawei #通知 #Freedom #sysadmin #GitHub #travis #CI #Sysadmin #Linux #Coolapk #Web #frontend #HTML #China #school #Microsoft #Life #VisualStudio #-} #OOP #web #geekapk #doge #CS #fix #CSharp #School #blog #recommended #bin #backend #Kotlin #Java #Share #svg #blogPOst #PL #JVM #Moha #code #ALgotithm #DuangsuseSB #GeekApk #SQL #Learn #wiki #Mozilla #ES6 #JavaScript #MoHa #Paper #haha #dotnet #bad #OOP_Delegates #Parallelism #dotNet #Csharp #Windows #performance #Channel #weekly #linux #Ruby #Project以及他们的消息覆盖个数:
hs.yield_self { |r| r.uniq.map { |u| [u, r.count(u)] }.sort_by { |it| it.last }.reverse.to_h.each { |e| puts "#{e.first}: #{e.last}" } }
太长,这里看== 非线性查询(当然和算法上那个没有关系啦,就是复杂一点的查询)
// 收集所有单 / 双数索引
ar = []; ar2 = []
i = 0 // 0 2 4 6
while i < self.size; ar << self[i]; i += 2; end
i = 1 // 1 3 5 7
while i < self.size; ar << self[i]; i += 2; end
aa = ar.zip(ar2)
我们将比较相邻两消息之间的关系。aa.zip(aa.map { |ms| ms.last['published'] - ms.first['published'] }).sort_by { |p| p.last }.reverse
间隔最长的两条消息是这条和这条,间隔 44880 秒(12 小时)b.map { |h| [h.last, h.first.first['body'].size ] }.map { |a| a.last / a.first }.select { |it| not it.nan? and not it.infinite? }.sort.reverse
平均打字速度:7 字 / 秒 🤔受到解析度(只到分钟)和浮点运算准确度的影响,有很多消息都是在间隔一分钟内发完的,统计结果可能不正确。
好啦,还有什么别的信息,请大家自己来发掘呗( 😝 比如说,我熬夜发过多少消息。
Telegram
duangsuse::Echo
AXMLParser parser = new AXMLParser(apkFileInputStream);
int eventType = parser.getType();
while (eventType != AXMLParser.END_DOCUMENT) {
String parserName = parser.getName();
boolean isManifest = "manifest".equals(parserName);
[...]
eventType…
int eventType = parser.getType();
while (eventType != AXMLParser.END_DOCUMENT) {
String parserName = parser.getName();
boolean isManifest = "manifest".equals(parserName);
[...]
eventType…
duangsuse::Echo
TextSort.kt
#Algorithm #fix 🤔 如果没有这次我还不知道这个弄错了
duangsuse::Echo
😃 那么,简而言之,我觉得有价值的信息: def get_link(h); "https://t.me/dsuse/#{h['debug']['no'] + 9511 + 20}"; end + 一共统计了 187 条消息。 2019-03-24 11:22 - 2019-04-05 20:06,一共两个星期的时间里,本频道 @dsuse + 有 #Telegram Hashtag 的消息,一共有 42 条,约有 20% 的消息被打上了标签 + 含链接的消息,一共有 37 条,约有 19% 的消息被打上了标签…
This media is not supported in your browser
VIEW IN TELEGRAM
duangsuse::Echo
😃 那么,简而言之,我觉得有价值的信息: def get_link(h); "https://t.me/dsuse/#{h['debug']['no'] + 9511 + 20}"; end + 一共统计了 187 条消息。 2019-03-24 11:22 - 2019-04-05 20:06,一共两个星期的时间里,本频道 @dsuse + 有 #Telegram Hashtag 的消息,一共有 42 条,约有 20% 的消息被打上了标签 + 含链接的消息,一共有 37 条,约有 19% 的消息被打上了标签…
GitHub
GitHub - apache/echarts: Apache ECharts is a powerful, interactive charting and data visualization library for browser
Apache ECharts is a powerful, interactive charting and data visualization library for browser - GitHub - apache/echarts: Apache ECharts is a powerful, interactive charting and data visualization li...
#paper http://www.cad.zju.edu.cn/home/vagblog/VAG_Work/echarts.pdf
没有什么内容,讲了一下核心策略性算法实现,大家可以随便看看。英文水平不需要很高,我觉得还是不错的
没有什么内容,讲了一下核心策略性算法实现,大家可以随便看看。英文水平不需要很高,我觉得还是不错的