Created
February 23, 2016 15:23
-
-
Save ficapy/95194fbc9b28cd26bd95 to your computer and use it in GitHub Desktop.
今天开始学C#,找几个小项目看源码练练手
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Author: Ficapy | |
# Create: '16/2/23' | |
import sys | |
if sys.version_info[0] < 3: | |
sys.exit(1) | |
from github import Github | |
from subprocess import getoutput | |
import shutil | |
import time | |
USER = '' | |
PWD = '' | |
repo_number = {} | |
g = Github(USER, PWD) | |
for repo in g.search_repositories('', language='c#', sort="stars", order="desc"): | |
# 设置成50000的时候结果吓哭我了 最少的行数是15万行 | |
if repo.size > 500: | |
continue | |
if len(repo_number) > 500: | |
break | |
repo_number[repo.html_url + '.git'] = 0 | |
time.sleep(2) | |
for repo in repo_number: | |
number = getoutput( | |
"/usr/bin/git clone --depth 1 {} temp-linecount-repo &&/usr/bin/cloc temp-linecount-repo | tail -n2 | head -n1".format( | |
repo)) | |
number = number.split()[-1].strip() | |
number = int(number) if number.isdigit() else 0 | |
repo_number[repo] = number | |
try: | |
shutil.rmtree('temp-linecount-repo') | |
except FileNotFoundError: | |
pass | |
for i in sorted(repo_number.items(), key=lambda x: x[1]): | |
if i[1] == 0: | |
continue | |
print(i[0], i[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/staffantan/unityglitch.git 44 | |
https://github.com/mikelovesrobots/unity3d-console.git 187 | |
https://github.com/Busta117/SQLiteUnityKit.git 249 | |
https://github.com/wolfgarbe/symspell.git 268 | |
https://github.com/oduslabs/ConsoleKit.git 311 | |
https://github.com/github/GitPad.git 315 | |
https://github.com/mikehadlow/AsmSpy.git 370 | |
https://github.com/Chman/SMAA-Unity.git 394 | |
https://github.com/EricFreeman/fuck.git 416 | |
https://github.com/SirCmpwn/bf-irc-bot.git 453 | |
https://github.com/InspectorIT/MongoDB.AspNet.Identity.git 491 | |
https://github.com/UnityPatterns/ObjectPool.git 550 | |
https://github.com/handcircus/Unity-Resource-Checker.git 641 | |
https://github.com/robertcupisz/LightShafts.git 795 | |
https://github.com/madskristensen/ShortcutExporter.git 823 | |
https://github.com/atemerev/skynet.git 957 | |
https://github.com/lei-zhu/SimpleCrawler.git 1013 | |
https://github.com/thefuntastic/Unity3d-Finite-State-Machine.git 1132 | |
https://github.com/jbogard/EntityFramework.Filters.git 1199 | |
https://github.com/edumbill/doap.git 1223 | |
https://github.com/VerbalExpressions/CSharpVerbalExpressions.git 1370 | |
https://github.com/Chman/Moments.git 1379 | |
https://github.com/NetEase/UnitySocketIO.git 1423 | |
https://github.com/rogeralsing/Microphone.git 1445 | |
https://github.com/cypherkey/RaspberryPi.Net.git 1567 | |
https://github.com/Readify/GitViz.git 1756 | |
https://github.com/andyburke/UnityHTTP.git 1761 | |
https://github.com/Codeusa/SteamCleaner.git 1824 | |
https://github.com/codebude/QRCoder.git 1982 | |
https://github.com/sdrapkin/SecurityDriven.Inferno.git 2082 | |
https://github.com/dcariola/XCodeEditor-for-Unity.git 2225 | |
https://github.com/moserware/AES-Illustrated.git 2330 | |
https://github.com/prime31/TouchKit.git 2403 | |
https://github.com/imkira/unity-sysfont.git 2472 | |
https://github.com/ulex/ZenSharp.git 2567 | |
https://github.com/VioletGiraffe/cppcheck-vs-addin.git 2830 | |
https://github.com/Lone-Coder/letsencrypt-win-simple.git 3017 | |
https://github.com/ahmetalpbalkan/Docker.DotNet.git 3048 | |
https://github.com/ihaoqihao/FastSocket.Net.git 3354 | |
https://github.com/dotMorten/WindowsStateTriggers.git 3362 | |
https://github.com/WebAssembly/ilwasm.git 3690 | |
https://github.com/jcachat/EntityFramework.DynamicFilters.git 3973 | |
https://github.com/barrett777/Heroes.ReplayParser.git 4250 | |
https://github.com/prime31/GoKit.git 5427 | |
https://github.com/petabridge/NBench.git 5534 | |
https://github.com/StackExchange/NetGain.git 5674 | |
https://github.com/docopt/docopt.net.git 6203 | |
https://github.com/stackia/DNSAgent.git 10593 | |
https://github.com/stramit/SSE.git 11701 | |
https://github.com/google/sandbox-attacksurface-analysis-tools.git 12655 | |
https://github.com/fpanettieri/unity-socket.io.git 13450 | |
https://github.com/Microsoft/Microsoft.IO.RecyclableMemoryStream.git 13519 | |
https://github.com/paf31/initialround.git 16225 | |
https://github.com/gregoryyoung/m-r.git 19359 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment