SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

Revision: 8875
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8875&view=rev
Author: jdh2358
Date: 2011年01月03日 19:00:11 +0000 (2011年1月03日)
Log Message:
-----------
added developer commit history example for annual purge
Added Paths:
-----------
 trunk/matplotlib/examples/misc/developer_commit_history.py
Added: trunk/matplotlib/examples/misc/developer_commit_history.py
===================================================================
--- trunk/matplotlib/examples/misc/developer_commit_history.py	 (rev 0)
+++ trunk/matplotlib/examples/misc/developer_commit_history.py	2011年01月03日 19:00:11 UTC (rev 8875)
@@ -0,0 +1,44 @@
+"""
+report how many days it has been since each developer committed. You
+must do an
+
+svn log > log.txt
+
+and place the output next to this file before running
+
+"""
+import os, datetime
+
+import matplotlib.cbook as cbook
+
+todate = cbook.todate('%Y-%m-%d')
+today = datetime.date.today()
+if not os.path.exists('log.txt'):
+ print('You must place the "svn log" output into a file "log.txt"')
+ raise SystemExit
+
+parse = False
+
+lastd = dict()
+for line in file('log.txt'):
+ if line.startswith('--------'):
+ parse = True
+ continue
+
+ if parse:
+ parts = [part.strip() for part in line.split('|')]
+ developer = parts[1]
+ dateparts = parts[2].split(' ')
+ ymd = todate(dateparts[0])
+
+
+ if developer not in lastd:
+ lastd[developer] = ymd
+
+ parse = False
+
+dsu = [((today - lastdate).days, developer) for developer, lastdate in lastd.items()]
+
+dsu.sort()
+for timedelta, developer in dsu:
+ print('%s : %d'%(developer, timedelta))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /