----BEGIN CLASS---- [13:37] startclass [13:38] Roll Call [13:38] Harsh Vardhan [13:38] Prashant Jamkhande [13:38] Anyone else? :) [13:40] Atharva Deshmukh [13:40] Problem: read about http://www.pygit2.org/ and use that to write a command line tool, which will take --path or -p as an argument, and for the given git project, it will us who is the highest committer :) [13:41] Feel free to use https://docs.python.org/3/howto/argparse.html [13:41] Any questions? [13:42] kushal, we need to go through [13:44] Prashanth, yes, now :) [13:45] LambaInsaan, are you there? [13:45] kushal: I have pinged him. [13:55] vharsh, PrashantJ you can name the app commitchamp :) [13:55] :) [13:56] Currently installing pygit2 :) [13:56] Okay, me too still in installation [13:56] Okay [13:57] vharsh, PrashantJ as usual I will try to do this using golang :) [13:59] kushal: It works in Python2, but not in python3 [14:00] vharsh, then use python2 [14:00] Ok [14:00] or find a python3 module [14:01] vharsh, PrashantJ Btw, count only master branch [14:01] vharsh, hahaha [14:05] vharsh, We need to install cmake as well? [14:05] To install libgit2 [14:06] kushal, I feel this is too heavy exercise for me:( [14:07] PrashantJ, World is heavy. [14:07] Even I am heavy, 70+kgs [14:08] :D [14:08] PrashantJ, we can do this. [14:08] Just try :) [14:08] Okay, I will keep trying:) [14:09] PrashantJ, you can discuss the idea/logic you are trying to follow [14:11] okay kushal [14:15] yay, seeing some double linked list after ages. [14:17] LambaInsaan, Are you back here? [14:17] Hi kushal. Yes I am back! :) [14:18] LambaInsaan, We are solving a problem today. [14:18] The session is on :) [14:19] LambaInsaan, [14:19] <kushal> Problem: read about http://www.pygit2.org/ and use that to write a command line tool, which will take --path or -p as an argument, and for the given git project, it will us who is the highest committer :) [14:19] <kushal> Feel free to use https://docs.python.org/3/howto/argparse.html [14:19] use the master branch, and feel free to find any other python3 git module. [14:26] vharsh, welcome back [14:26] :) [14:26] Connected again :) [14:36] I am struggling with installation itself [14:36] PrashantJ: Where are you now? [14:36] to use cmake . [14:37] PrashantJ: I think you must have installed `cmake` [14:37] I had installed libgit before dnf [14:37] To install pygit2 we need libgit2. To install libgit2 we need cmake. To install cmake we need gcc-c++ [14:37] It didn't work then I started doing the manual installation [14:37] :) [14:37] So vharsh you are done with 'pygit2' installation? [14:38] Yes [14:38] PrashantJ: But it's not there in python2 [14:38] s/3/2 [14:44] vharsh, PrashantJ which OS? [14:44] Fedora 24 [14:44] I think it is packaged in Fedora [14:45] vharsh, dnf install python3-pygit2.x86_64 [14:45] I couldn't install it with pip [14:45] kushal, Fedora 24 [14:45] vharsh, what is wrong in install official Fedora packages? [14:45] You both are wasting time. [14:45] oops [14:45] vharsh, PrashantJ sudo python3-pygit2.x86_64 [14:45] vharsh, PrashantJ sudo dnf install python3-pygit2.x86_64 [14:45] hmm.. [14:46] kushal, question ? [14:46] kushal: I had done sudo dnf install libgit2 [14:46] and then `pip install pygit2` [14:46] fhackdroid, ask :) [14:46] fhackdroid, you can also try to solve it :) [14:47] For me sudo dnf libgit itself was throwing errors:( [14:47] Now installed pygit2:) [14:48] kushal, I will try to :) [14:48] vharsh, and you can see there is Python3 :) [14:48] fhackdroid, what was your question? [14:48] I didn't try python3-libgit2 [14:49] vharsh, search first. [14:49] vharsh, I did dnf search libgit2 [14:49] vharsh, fhackdroid PrashantJ https://modernpaste.stg.fedoraproject.org/paste/fCbVO~P2TjwH0hcBTgnffMnRi-rYnlYzizqToCmG3BY=/deactivate/KnwT6FFn0Rw56p05hJGmLAC8b6fR48tODNr3k23tLD7MY7gkTy5zevQT6WvXIsVs [14:49] kushal, I was asking what was the question but I got it now :) [14:50] :) [14:51] clearqueue [14:51] Oh may be I never implemented that [14:51] next [14:51] kushal, I was actually thinking to solve it in go [14:52] fhackdroid, you can still do it. [14:52] kushal, i actually tried the mp3 one [14:52] kushal, i didn't use cli module for that [14:52] fhackdroid, and? [14:53] i used simple file passing and reading [14:53] fhackdroid, Okay [14:53] that will also do. [15:01] kushal, will try to do this in python and Go :) may not immediately but I will :) [15:19] kushal: Why is x.walk(pygit2.GIT_SORT_NONE) giving TypeError? What steps can I take to analyze it? [15:23] vharsh, no clue. [15:24] let me try the code [15:29] vharsh, have you read the docs? [15:29] kushal: yes [15:29] I jumped to the logs.html first [15:30] kushal: http://www.pygit2.org/log.html I started here [15:31] PrashantJ: I got ping from you yesterday, anything specific? [15:32] vharsh, same here [15:32] http://www.pygit2.org/log.html [15:32] >>> d = {} [15:32] >>> for commit in repo.walk(repo.head.target, GIT_SORT_TOPOLOGICAL): [15:32] ... x = d.get(commit.committer.name, 0) [15:32] ... x += 1 [15:32] ... d[commit.committer.name] = x [15:32] kushal: Error: ".." is not a valid command. [15:32] ... [15:32] kushal: Error: ".." is not a valid command. [15:33] kushal: Error: "commit.committer.name" is not a valid command. [15:33] kushal: Error: ".." is not a valid command. [15:33] >>> final = list((k, d[k]) for k in sorted(d, key=d.get, reverse=True)) [15:33] >>> final[0] [15:33] ('James Crosby', 1187) [15:33] I don't care tenida [15:33] I tried to sort it without any order. [15:33] vharsh, see that code :) [15:33] vharsh, I don't know, just copy pasted the code, and worked :) [15:34] praveenkumar, I struggled for a basic playbook. Now query resolved. Thank you so much:) [15:35] Good to hear that issue resolved, happy hacking. [15:35] praveenkumar, :) [15:35] thanks [15:36] Ending the session for now. ----END CLASS----