• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Sums of Different Combinations of Ranks Program

Evan Liu

Member
Joined
Jul 15, 2009
Messages
922
WCA
2009LIUE01
YouTube
Visit Channel
https://dl.dropboxusercontent.com/u/16017198/Ranker.exe

This program, coded by my friend Asa Kaplan (minime12358 on the forums), allows you to choose different combinations of events to sum and rank all competitors by (e.g. all BLD events, all 3x3 events, 2-7, etc). You will need the WCA export for this program to work, which you can download from here: http://worldcubeassociation.org/results/misc/export.html, or by clicking the "Download Information" button on the program's GUI. Extract the files from the zip as well. Save the program preferably in the same folder, but anywhere will technically work.

Here is a screenshot of the GUI:
https://dl.dropboxusercontent.com/u/16017198/ranker1.png
The "Output" text box is for the filename you want to give the output. The default file type is .tsv but others may also work. The "Input Directory" text box is for the directory/folder where the relevant export files are located. The default for this is "./", which means the files are in the same folder as the program. If you saved the program in a different location as the files, you'll have to change the input directory. The check boxes are obviously for the event ranks you want to sum. In the screenshot, I've chosen the BLD events. In the upper right hand corner, you can choose either single or average. If you choose average, the check boxes for the events which do not have averages will disappear. They will reappear if you choose single again. "Output full names" means names instead of WCA IDs will be displayed, which I think most prefer. A command prompt window which shows the progress of the program will also open with the GUI itself; do not close it.

Here is a screenshot of part of the output for summing all the BLD event rankings, viewed in Microsoft Excel.
https://dl.dropboxusercontent.com/u/16017198/ranker2.png

Lastly, the most recent version of the export is dated at July 29, so some values will of course be slightly off.
Enjoy, and do report any issues you encounter!
 

Stefan

Member
Joined
May 7, 2006
Messages
7,280
WCA
2003POCH01
YouTube
Visit Channel
Did any of you see/try this program that I posted? It can calculate all of those requests (and in fact any combination of events you want).

I tried it, seems to work well (just haven't checked its correctness). It's rather hidden inside this thread, though, should better have its own thread. Btw, it's written in Python, and in that case, I'd prefer the non-compiled Python script(s). Not everyone needs a .exe, some of us already have Python :). And the .exe creates over 800 temporary files.

I went ahead and did the 3x3 single ranks without MBLD. Here's the top 20: https://dl.dropboxusercontent.com/u/16017198/3x3.png

If you load the .tsv into Excel using utf8 encoding (rather than some ansi/iso you probably used), then the Asian etc symbols should appear correctly.
 
Last edited:
Joined
Nov 8, 2010
Messages
5,473
Location
near Ottawa, Canada
WCA
2010CANT02
YouTube
Visit Channel
I tried it, seems to work well (just haven't checked its correctness). It's rather hidden inside this thread, though, should better have its own thread. Btw, it's written in Python, right? In that case, I'd prefer the non-compiled Python script(s). Not everyone needs a .exe, some of us already have Python :)



If you load the .tsv into Excel using utf8 encoding (rather than some ansi/iso you probably used), then the Asian etc symbols should appear correctl.

If you open it with a plain text program such as notepad, you just get a nice plain text thing with proper symbols :)

btw: Feliks dominates all the n + nBLD events.
 
Last edited:

Evan Liu

Member
Joined
Jul 15, 2009
Messages
922
WCA
2009LIUE01
YouTube
Visit Channel
I tried it, seems to work well (just haven't checked its correctness). It's rather hidden inside this thread, though, should better have its own thread. Btw, it's written in Python, and in that case, I'd prefer the non-compiled Python script(s). Not everyone needs a .exe, some of us already have Python :). And the .exe creates over 800 temporary files.
As I said in my original post about the program, minime12358 wrote it, so I can't help with this. I'll make sure he sees your post as soon as possible though (or better yet, he may see it himself first).
 
Last edited:

minime12358

Member
Joined
Oct 3, 2010
Messages
241
Location
Burke, VA
WCA
2010KAPL01
YouTube
Visit Channel
As I said in my original post about the program, minime12358 wrote it, so I can't help with these. I'll make sure he sees your post as soon as possible though (or better yet, he may see it himself first).

Hey.

So, first, I can't believe I didn't notice how many temporary files it makes! I just used pyinstaller to compile it to an .exe, and I didn't really give that part much thought.

I meant to have the .pyc file linked in for those who have python. I'd rather not release the .py until it is cleaned up a bit, as it is practically unreadable without comments and with meaningless variable names. I tried to message you specifically, Stefan, with the uncompiled code, but it said your inbox is full.

I'll also look into the unicode symbols. I may be able to change the file header to make utf8 the default.

One more thing, about it not being aligned in text editors: I plan to make a "text editor output" mode of some kind that aligns it. I currently have it "technically correct", so it opens well in excel, but it of course does not look very nice in notepad.
 

Carrot

Member
Joined
Feb 9, 2009
Messages
1,910
WCA
2008ANDE02
YouTube
Visit Channel
pyra+mega average (only sub 100 sums):
Code:
Rank	Name					Sum	minx	pyram
1	Oscar Roth Andersen			6	5	1
2	Louis Cormier				36	4	32
3	Yu Nakajima (ä¸*島æ‚*)			40	16	24
4	John Brechon				48	28	20
5	Daniel Grabski				51	13	38
6	Simon Westlund				51	2	49
7	Ramón Dersch				68	55	13
8	Takumi Yoshida (å‰ç”°åŒ*)		69	44	25
9	Erik Akkersdijk				83	34	49
10	Feliks Zemdegs				85	10	75
11	Marvin Llaneta				88	73	15
12	Richard Jay S. Apagar			89	17	72
13	Matic Omulec				94	12	82

pyra+mega single (only sub 100 sums):
Code:
Rank	Name					Sum	minx	pyram
1	Oscar Roth Andersen			4	3	1
2	Feliks Zemdegs				37	17	20
3	Trevor Petersen				51	38	13
4	Simon Westlund				51	1	50
5	Milán Baticz				58	36	22
6	Erik Akkersdijk				80	42	38
7	Bence Barát				88	56	32
8	Karina Grandjean Beck			89	34	55
 

AvGalen

Premium Member
Joined
Jul 6, 2006
Messages
6,857
Location
Rotterdam (actually Capelle aan den IJssel), the N
WCA
2006GALE01
YouTube
Visit Channel
No, for me it just displays little rectangles instead of the Asian symbols. Plus it doesn't align columns properly.
That is Office Magic. Even though you don't have "Internation Font Support" in Windows, you might have it in Office. Just add it to Windows and you should be allright.
(I have the same problem because of the Japanese wife sending me all kinds of email/pdf).
(I never understood why Microsoft puts stuff like a spelling checker and character support in Office but not in Windows where all other programs could use it as well. This became worse now that Internet Explorer has it's own spelling checker)

Good that this program has it's own thread. If you can make the Python version available someday that would be nice for a few people, but most people will prefer the "standalone executable" because "only cool people use Python, but most people are not cool"
 

Stefan

Member
Joined
May 7, 2006
Messages
7,280
WCA
2003POCH01
YouTube
Visit Channel
I can't believe I didn't notice how many temporary files it makes! I just used pyinstaller to compile it to an .exe, and I didn't really give that part much thought.

Yeah, I looked into creating standalone Python programs a few months ago as well and was quite disappointed with the options. Otherwise I love Python.

Thanks for the .pyc file, works perfectly for me (small is nice, not creating the temp files is nice, my OS not warning me is nice, and it's faster as well :)).

Your program seems to handle unicode just fine (though I'm not sure that's because it's properly decoding+encoding, or just ignoring). Importing with utf8 into LibreOffice Calc shows me nice Asian etc symbols. I don't have Excel, but I expect it to have a similar import option.

Btw, have you tried directly displaying the result instead of writing it to a file? That would be quick and convenient. I've used ttk.Treeview for something similar before.

Carrot: With what program did you view the output file? If I open it with notepad, the Asian etc symbols don't look right, but when I copy&paste to the forum, they're shown correctly.
 

Carrot

Member
Joined
Feb 9, 2009
Messages
1,910
WCA
2008ANDE02
YouTube
Visit Channel
Carrot: With what program did you view the output file? If I open it with notepad, the Asian etc symbols don't look right, but when I copy&paste to the forum, they're shown correctly.

excel, you must admit it handled the asian symbols perfectly fine *cough* *cough*
 

minime12358

Member
Joined
Oct 3, 2010
Messages
241
Location
Burke, VA
WCA
2010KAPL01
YouTube
Visit Channel
Hey everyone,

I have finally updated the program to include changes in averages and to add skewb. I've also added "proportional ranking", as suggested by Evan, which ranks by the sum of percentiles [0-1] within an event, decreasing the bias towards larger events. New updates should come shortly. I'm open to suggestions as well.

https://drive.google.com/file/d/0BxQFeA309LXUc2ZpdnNtM0hVRGs/edit?usp=sharing
 
Last edited:

Stefan

Member
Joined
May 7, 2006
Messages
7,280
WCA
2003POCH01
YouTube
Visit Channel

"Download Information" doesn't work for me:
Code:
http://www.worldcubeassociation.org/results/misc/WCA_export492_20141014.tsv.zip
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\minim_000\Downloads\pyinstaller-2.0\pyinstaller-2.0\WCARankeruni\build\pyi.win32\WCARankeruni\out00-PYZ.pyz\Tkinter", line 1410, in __call__
  File "<string>", line 44, in RefreshInformation
  File "C:\Users\minim_000\Downloads\pyinstaller-2.0\pyinstaller-2.0\WCARankeruni\build\pyi.win32\WCARankeruni\out00-PYZ.pyz\zipfile", line 714, in __init__
  File "C:\Users\minim_000\Downloads\pyinstaller-2.0\pyinstaller-2.0\WCARankeruni\build\pyi.win32\WCARankeruni\out00-PYZ.pyz\zipfile", line 748, in _GetContents
  File "C:\Users\minim_000\Downloads\pyinstaller-2.0\pyinstaller-2.0\WCARankeruni\build\pyi.win32\WCARankeruni\out00-PYZ.pyz\zipfile", line 763, in _RealGetContents
BadZipfile: File is not a zip file

Probably because I'm Stefan, not minim_000.
 

minime12358

Member
Joined
Oct 3, 2010
Messages
241
Location
Burke, VA
WCA
2010KAPL01
YouTube
Visit Channel
"Download Information" doesn't work for me:
Code:
http://www.worldcubeassociation.org/results/misc/WCA_export492_20141014.tsv.zip
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\minim_000\Downloads\pyinstaller-2.0\pyinstaller-2.0\WCARankeruni\build\pyi.win32\WCARankeruni\out00-PYZ.pyz\Tkinter", line 1410, in __call__
  File "<string>", line 44, in RefreshInformation
  File "C:\Users\minim_000\Downloads\pyinstaller-2.0\pyinstaller-2.0\WCARankeruni\build\pyi.win32\WCARankeruni\out00-PYZ.pyz\zipfile", line 714, in __init__
  File "C:\Users\minim_000\Downloads\pyinstaller-2.0\pyinstaller-2.0\WCARankeruni\build\pyi.win32\WCARankeruni\out00-PYZ.pyz\zipfile", line 748, in _GetContents
  File "C:\Users\minim_000\Downloads\pyinstaller-2.0\pyinstaller-2.0\WCARankeruni\build\pyi.win32\WCARankeruni\out00-PYZ.pyz\zipfile", line 763, in _RealGetContents
BadZipfile: File is not a zip file

Probably because I'm Stefan, not minim_000.

Ah, my bad. I'm surprised that I hard coded that in and much more that it made it through tests. I'll do some work on it tonight--I have a break this weekend. I'll implement better viewing as well, as well as any other suggestions you have.

Edit: On second look at the error code (though I haven't looked at my code yet), it doesn't appear to be a problem of a bad work directory---that was the directory in which I compiled it to an .exe. The error code seems to be improperly printed, but it still seems that the BadZipfile error was genuine.

Edit2: I tried recreating the issue, but I was unable on four separate computers. I assume you repeatedly get this error? I realize from the testing that I need to do better [much of any] error handling for the download and probably thread it. Still, network errors don't give me that specific error. Are you doing anything "abnormal", like using Wine, or something to the effect?
 
Last edited:

Stefan

Member
Joined
May 7, 2006
Messages
7,280
WCA
2003POCH01
YouTube
Visit Channel
I'm just using normal Windows 8.1. But you're right, the zip file is broken. I just tried again, same problem, and the file is 17,857,013 bytes but should be 17,867,648 bytes (I think it's correct until the missing the ending).

Edit: Tried once more, and this time it worked.
 
Last edited:
Top