w*s 发帖数: 7227 | 1 perl or python, or any language.
各位同袍可以看到,本机每天吐出一点东西。我想把10天以内的都整理起来。
比如BA,1/31 和1/30都有,那我就把他归类在一起分析。ED也出现了几次。
问题是这个log是不按字母次序排的。
请问各位同袍,是不是一定要hash ?
我一直用c的,请问python里有什么刷刷刷飞快地方法?谢谢!
----
AMD 2014-01-31: Rule 64: MFI buy buy buy point $$$$$$$$$$$$$$
AEE 2014-01-31 : Rule 8.102, Really Really Big volume
AIG 2014-01-31: Rule 64: MFI buy buy point $$$$$$$$$$
ABC 2014-01-31 : Rule 8.102, Really Really Big volume
BIG 2014-01-31 80%: 500 days low.
BIG 2014-01-31: Rule 64: MFI buy buy buy point $$$$$$$$$$$$$$
BA 2014-01-31: Rule 64: MFI buy point $$$$$
C 2014-01-31: Rule 64: MFI buy buy buy point $$$$$$$$$$$$$$
ED 2014-01-31 : 500 days low.
ED 2014-01-31: rule 8.6: [jump up, 80% sure buy, if too high then sell]
----
ADI 2014-01-30: rule 8.8: [gap up, 80% sure buy, if too high then sell]
BHI 2014-01-30: rule 8.8: [gap up, 80% sure buy, if too high then sell]
BLL 2014-01-30 : Rule 8.102, Really Really Big volume
BLL 2014-01-30: rule 8.8: [gap up, 80% sure buy, if too high then sell]
BIG 2014-01-30 80%: 500 days low.
BIG 2014-01-30: Rule 64: MFI buy buy buy point $$$$$$$$$$$$$$
BA 2014-01-30: rule 8.7: [jump down, 80% sure sell, if too low then buy]
CAM 2014-01-30 : Rule 8.102, Really Really Big volume
CAH 2014-01-30: rule 8.8: [gap up, 80% sure buy, if too high then sell]
CBG 2014-01-30 : Rule 8.102, Really Really Big volume
CELG 2014-01-30 : Rule 8.102, Really Really Big volume
CELG 2014-01-30: rule 8.7: [jump down, 80% sure sell, if too low then buy]
C 2014-01-30: Rule 64: MFI buy buy point $$$$$$$$$$
CME 2014-01-30 : Rule 8.102, Really Really Big volume
CL 2014-01-30: rule 8.7: [jump down, 80% sure sell, if too low then buy]
ED 2014-01-30 80%: 500 days low.
CAT 2014-01-30 : Rule 8.201, $$$$$ base breakout | N*n 发帖数: 456 | 2 If I understand correctly, you want to sort them based on the 1st key:
AMD, AEE, AIG, etc.
With Perl+hash, it can be done pretty easily..
【在 w*s 的大作中提到】 : perl or python, or any language. : 各位同袍可以看到,本机每天吐出一点东西。我想把10天以内的都整理起来。 : 比如BA,1/31 和1/30都有,那我就把他归类在一起分析。ED也出现了几次。 : 问题是这个log是不按字母次序排的。 : 请问各位同袍,是不是一定要hash ? : 我一直用c的,请问python里有什么刷刷刷飞快地方法?谢谢! : ---- : AMD 2014-01-31: Rule 64: MFI buy buy buy point $$$$$$$$$$$$$$ : AEE 2014-01-31 : Rule 8.102, Really Really Big volume : AIG 2014-01-31: Rule 64: MFI buy buy point $$$$$$$$$$
| w*s 发帖数: 7227 | 3 yes, this is my question.
just wondering if python has better ways.
【在 N*n 的大作中提到】 : If I understand correctly, you want to sort them based on the 1st key: : AMD, AEE, AIG, etc. : With Perl+hash, it can be done pretty easily..
| N*n 发帖数: 456 | 4 python不会。。
【在 w*s 的大作中提到】 : yes, this is my question. : just wondering if python has better ways.
| b*******s 发帖数: 5216 | 5 python一样有hash lib
【在 w*s 的大作中提到】 : yes, this is my question. : just wondering if python has better ways.
| w*s 发帖数: 7227 | 6 各位大牛,
python dictionary you don't need to worry about conflicts in hash, it's
taken care by the lib, right ?
i mean if i write a c code to do hashing, i need to handle hashing conflicts.
how about perl ?
【在 b*******s 的大作中提到】 : python一样有hash lib
| p***o 发帖数: 1252 | 7 key这么短为啥要hash,我看就在shell里sort一下都行。
【在 b*******s 的大作中提到】 : python一样有hash lib
| b*******s 发帖数: 5216 | 8 当然不保证
conflicts.
【在 w*s 的大作中提到】 : 各位大牛, : python dictionary you don't need to worry about conflicts in hash, it's : taken care by the lib, right ? : i mean if i write a c code to do hashing, i need to handle hashing conflicts. : how about perl ?
| B***i 发帖数: 724 | 9 如果是adhoc 分析用的, 用sort, awk 就足够了
【在 p***o 的大作中提到】 : key这么短为啥要hash,我看就在shell里sort一下都行。
| N*n 发帖数: 456 | 10 以我的经验, Perl 不用考虑conflicts..
直接用 字符串作key就好了。
conflicts.
【在 w*s 的大作中提到】 : 各位大牛, : python dictionary you don't need to worry about conflicts in hash, it's : taken care by the lib, right ? : i mean if i write a c code to do hashing, i need to handle hashing conflicts. : how about perl ?
| w*s 发帖数: 7227 | 11 make sense ...
谢谢同袍,上美图,让我们一起高喊:反清复明,股市崩盘!
【在 N*n 的大作中提到】 : 以我的经验, Perl 不用考虑conflicts.. : 直接用 字符串作key就好了。 : : conflicts.
| w*s 发帖数: 7227 | 12 只想回推过去10天,log file有100天的数据,不容易用shell 吧?
【在 B***i 的大作中提到】 : 如果是adhoc 分析用的, 用sort, awk 就足够了
| B***i 发帖数: 724 | 13 看你的数据有多大了。
如果shell 都用不了的话, 估计要上hadoop了
【在 w*s 的大作中提到】 : 只想回推过去10天,log file有100天的数据,不容易用shell 吧?
|
|