Skip to content

Instantly share code, notes, and snippets.

@nicolas17
Last active February 15, 2016 04:00
Show Gist options
  • Save nicolas17/93c8cfbf1eb8c3495e11 to your computer and use it in GitHub Desktop.
Save nicolas17/93c8cfbf1eb8c3495e11 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import requests
import json
import os
import sys
import re
try:
from tqdm import tqdm
except ImportError:
def tqdm(iterable): return iterable
def check_completeness(json):
assert json['next'] is None
assert json['count'] == len(json['results'])
def fetch_data(organization_id):
sess = requests.session()
sess.cookies.set('SACSID', '<auth cookie here>')
r = sess.get('https://codein.withgoogle.com/api/program/2015/taskinstance/', params={'organization': organization_id, 'page_size': '800', 'status': '7'})
json_list = r.json()
check_completeness(json_list)
tasks = []
for taskinfo in tqdm(json_list['results']):
task = {}
task['id'] = taskinfo['id']
task['title'] = taskinfo['task_definition']['name']
task['student'] = taskinfo['claimed_by']['display_name']
r2 = sess.get('https://codein.withgoogle.com/api/program/current/taskupdate/', params={'task_instance': task['id']})
json_updates = r2.json()
last_approver = None
approved_before_consent=False
for update in json_updates['results']:
if update['kind'] != 1: continue
if update['new_task_instance_status'] == 7:
if update['old_task_instance_status'] == 8:
assert update['author'] is None
approved_before_consent=True
continue
else:
last_approver = update['author']['display_name']
break
if approved_before_consent and update['new_task_instance_status'] == 8:
last_approver = update['author']['display_name']
break
# "Dennis Nienhüser (Earthwings)" is a bit too long for the table
if last_approver is not None:
last_approver = re.sub(r'\s*\(.*\)', '', last_approver)
task['approver'] = last_approver
tasks.append(task)
return tasks
if os.path.exists('cache.json'):
data = json.load(open('cache.json', 'r'))
else:
organization_id = '6015066264567808' # This is KDE
data = fetch_data(organization_id)
json.dump(data, open('cache.json', 'w'))
print("Title | Student | Approver")
print("--- | --- | ---")
for task in sorted(data, key=lambda task: (task['approver'].lower(), task['student'].lower(), task['title'])):
print('[{}](https://codein.withgoogle.com/dashboard/task-instances/{}/) | {} | {}'.
format(task['title'], task['id'], task['student'], task['approver'])
)
Title Student Approver
[Marble] Open the game window only if user select more than zero number of questions. Andrey Cyg. abhgangwar
KDE Connect Android: Scan receivied files with the MediaScanner Chaitanya Albert Vaca
KDE Connect Android: Adjust the touchpad sensitivity Imran Tatriev Albert Vaca
KDE Connect Android: Make a text label scroll horizontally Mikhail Ivchenko Albert Vaca
Clazy to the limit - KDevPlatform Andrey Cyg. Aleix Pol
Get to grips with Clazy - KCoreAddons Andrey Cyg. Aleix Pol
Get to grips with Clazy - KDED Andrey Cyg. Aleix Pol
Get to grips with Clazy - KEmoticons Andrey Cyg. Aleix Pol
Get to grips with Clazy - KFileMetaData Andrey Cyg. Aleix Pol
Get to grips with Clazy - KInit Andrey Cyg. Aleix Pol
Get to grips with Clazy - KItemModels Andrey Cyg. Aleix Pol
Get to grips with Clazy - KItemViews Andrey Cyg. Aleix Pol
Get to grips with Clazy - KNotifications Andrey Cyg. Aleix Pol
Get to grips with Clazy - KPeople Andrey Cyg. Aleix Pol
Get to grips with Clazy - KService Andrey Cyg. Aleix Pol
Get to grips with Clazy - KTextEditor Andrey Cyg. Aleix Pol
Get to grips with Clazy - KXmlGui Andrey Cyg. Aleix Pol
Clazy to the limit - Dolphin Cytadela8 Aleix Pol
Dictionary on the KAlgebraMobile Cytadela8 Aleix Pol
Get to grips with Clazy - KArchive Cytadela8 Aleix Pol
Get to grips with Clazy - KI18n Cytadela8 Aleix Pol
Get to grips with Clazy - KParts Cytadela8 Aleix Pol
Get to grips with Clazy - KConfig Imran Tatriev Aleix Pol
Get to grips with Clazy - KPackage Mikhail Ivchenko Aleix Pol
Get to grips with Clazy - KIO RussellG Aleix Pol
Clazy to the limit - KDevPlatform Sergey Popov Aleix Pol
Clazy to the limit - KDevPlatform Sergey Popov Aleix Pol
Get to grips with Clazy - KDBusAddons Sergey Popov Aleix Pol
Get to grips with Clazy - Plasma Framework Sergey Popov Aleix Pol
Video on how to build a KDE application for Android Sergey Popov Aleix Pol
HighDPI in Blinken Andrey Cyg. Andreas Cord-Landwehr
HighDPI in KGeography Andrey Cyg. Andreas Cord-Landwehr
HighDPI in Kig Andrey Cyg. Andreas Cord-Landwehr
HighDPI in Parley Andrey Cyg. Andreas Cord-Landwehr
HighDPI in Cantor Divit Gulati Andreas Cord-Landwehr
Use QRC for QML files in Artikulate Divit Gulati Andreas Cord-Landwehr
Use QRC for QML files in Rocs Divit Gulati Andreas Cord-Landwehr
HighDPI in KStars Dmytro Shynkevych Andreas Cord-Landwehr
HighDPI in Kiten Nuno Andreas Cord-Landwehr
HighDPI in KBruch Sergey Popov Andreas Cord-Landwehr
HighDPI in KLettres Sergey Popov Andreas Cord-Landwehr
HighDPI in KTurtle Sergey Popov Andreas Cord-Landwehr
HighDPI in KmPlot Sergey Popov Andreas Cord-Landwehr
HighDPI in Step Sergey Popov Andreas Cord-Landwehr
Fix memory leaks in UPnP Implementation in PMC Davidesq Ashish Bansal
Build any KDE application from git repository Andrey Cyg. Bhushan Shah
Develop the Hello World plasmoid for Plasma Andrey Cyg. Bhushan Shah
Review a KDE Application for dot.kde.org Andrey Cyg. Bhushan Shah
Write a blog post about KDE Application you have built Andrey Cyg. Bhushan Shah
Create poster or banner for Plasma bobhob314 Bhushan Shah
Build any KDE application from git repository Chaitanya Bhushan Shah
Develop the Hello World plasmoid for Plasma Cytadela8 Bhushan Shah
Develop the Hello World plasmoid for Plasma Davidesq Bhushan Shah
Create poster or banner for Plasma Divit Gulati Bhushan Shah
Write a blog post about KDE Application you have built Divit Gulati Bhushan Shah
Create poster or banner for Plasma dpvivi Bhushan Shah
Develop the Hello World plasmoid for Plasma Drock Bhushan Shah
Build any KDE application from git repository GagioPapinni Bhushan Shah
Build any KDE application from git repository Hris Bhushan Shah
Build any KDE application from git repository Imran Tatriev Bhushan Shah
Develop the Hello World plasmoid for Plasma Imran Tatriev Bhushan Shah
Write a blog post about KDE Application you have built Imran Tatriev Bhushan Shah
Develop the Hello World plasmoid for Plasma jaredStef Bhushan Shah
Create poster or banner for Plasma Jiny Kim Bhushan Shah
Create poster or banner for Plasma Lma Bhushan Shah
Create alternate Panel template for Plasma Mikhail Ivchenko Bhushan Shah
Create poster or banner for Plasma Mukul Bhushan Shah
Create poster or banner for Plasma Rowy Bhushan Shah
Write a blog post about KDE Application you have built Rufus Bhushan Shah
Create poster or banner for Plasma Tai Bhushan Shah
Make Wallpapers Alvis Boudhayan Gupta
Make Wallpapers Collins Boudhayan Gupta
Make Wallpapers dpvivi Boudhayan Gupta
Make Wallpapers Jerrayl Ng Boudhayan Gupta
Make Wallpapers RussellG Boudhayan Gupta
Make Wallpapers Zaton Boudhayan Gupta
Fix a complicated usability issue using asyncronous techniques Cytadela8 Christian David
Improve usability and code quality Cytadela8 Christian David
Help porting KMyMoney Piggeh Christian David
[WikiToLearn] Write your first Wiki bot! Hris Cristian Baldi
[WikiToLearn] Write your first Wiki bot! RussellG Cristian Baldi
Get to grips with Clazy - BluezQt Cytadela8 David Rosca
Get to grips with Clazy - Bluedevil Imran Tatriev David Rosca
[WikiToLearn] User experience evaluation StanfordL Davide Maggiorelli
[WikiToLearn] Add support for table formatting into latex2mediawiki script Nuno Davide Valsecchi
[WikiToLearn] Convert codes environment from LaTeX to MediaWiki Nuno Davide Valsecchi
[WikiToLearn] Find TikZ code inside LaTeX source and compile it into importable images Nuno Davide Valsecchi
[WikiToLearn] Parse and convert tables from LaTeX to MediaWiki Nuno Davide Valsecchi
[Marble] Update C++ examples/tutorials to include links to current git version Andrey Cyg. Dennis Nienhüser
[Marble] Add noise to positions in route simulation Chaitanya Dennis Nienhüser
[Marble] More realistic "route simulation" position provider Chaitanya Dennis Nienhüser
[Marble] Build Marble Maps for Android Cytadela8 Dennis Nienhüser
[Marble] Slow down in curves/turns in route simulation Cytadela8 Dennis Nienhüser
[Marble] Build Marble Maps for Android David Wu Dennis Nienhüser
[Marble] Add QML scroll indicators to Marble Maps Imran Tatriev Dennis Nienhüser
[Marble] Build Marble Maps for Android Imran Tatriev Dennis Nienhüser
[Marble] Center on loaded documents on Android Imran Tatriev Dennis Nienhüser
[Marble] Fix mimetype declaration on Android Imran Tatriev Dennis Nienhüser
[Marble] Fixed speed in "route simulation" position provider Imran Tatriev Dennis Nienhüser
[Marble] Re-sort map themes when changing favorite state Sergey Popov Dennis Nienhüser
[Marble] Switch external examples build system to Qt 5 Sergey Popov Dennis Nienhüser
Create a table presenting the features x backends relationship for Cantor Hris Filipe Saraiva
Create lessons with Cantor Hris Filipe Saraiva
Write a blogpost about how to create lessons with Cantor Hris Filipe Saraiva
[WikiToLearn] CSS fix for big images Collins Gianluca
[WikiToLearn] Bolder Titles HIMANSHU SEKHAR NAYAK Gianluca
[WikiToLearn] Change the IP displayed on the header navigation bar Hris Gianluca
[WikiToLearn] Tutorial video - How to write a course Hris Irene Cortinovis
[WikiToLearn] Proofread the English in the manual RussellG Irene Cortinovis
[WikiToLearn] Tutorial video - How to upload a file RussellG Irene Cortinovis
GCompris: Adding level to activities in GCompris Cytadela8 Johnny Jazeix
Write a blogpost explaining the possibilities of GCompris Harpreet Singh Johnny Jazeix
GCompris - Updating of Screenshots jatin7 Johnny Jazeix
Write a blogpost explaining the possibilities of GCompris Krishna Dm Johnny Jazeix
Update Application screenshots on kde.org Andrey Cyg. Jonathan Riddell
Make Variations of the Neon Logo Divit Gulati Jonathan Riddell
Review a KDE Application for dot.kde.org Sergey Popov Jonathan Riddell
Update Application screenshots on kde.org Sergey Popov Jonathan Riddell
Interview a KDE contributor StanfordL Jonathan Riddell
Update Application screenshots on kde.org StanfordL Jonathan Riddell
KDevelop: Bug triaging: Check whether C++ support issues are still valid Andrey Cyg. Kevin Funk
KDevelop: Fix High-DPI issues Andrey Cyg. Kevin Funk
KDevelop: Reintroduce support for viewing patches in Kompare Andrey Cyg. Kevin Funk
KDevelop: Add indicator for read-only files Cytadela8 Kevin Funk
KDevelop: Fix clazy issues in kdev-php Cytadela8 Kevin Funk
KDevelop: Problems tool view: Allow filtering errors/warnings/hints individually Cytadela8 Kevin Funk
KDevelop: Revive the okteta plugin in KDevelop Cytadela8 Kevin Funk
KDevelop: Support of $VARIABLE in environment settings Cytadela8 Kevin Funk
KDevelop: Highlight crashed thread Imran Tatriev Kevin Funk
KDevelop: Parse runtime output of assert message, make it clickable Imran Tatriev Kevin Funk
KDevelop: Remember Filesystem toolview's location in session Imran Tatriev Kevin Funk
KDevelop: Windows support: Parse MSVC compile errors Imran Tatriev Kevin Funk
KDevelop: Add "copy filename" action to context menu in tabs Mikhail Ivchenko Kevin Funk
KDevelop: Add button "jump to first error" Mikhail Ivchenko Kevin Funk
KDevelop: Add feature to clone existing environment group Mikhail Ivchenko Kevin Funk
KDevelop: Debugger: Use natural sorting in variable list Mikhail Ivchenko Kevin Funk
KDevelop: Fix 'Configure launch does not work without plugin "Execute programs" plugin issue Mikhail Ivchenko Kevin Funk
KDevelop: Add feature to edit existing environment group Sergey Popov Kevin Funk
KDevelop: Add zoom buttons to documentation view Sergey Popov Kevin Funk
KDevelop: Fix High-DPI issues Sergey Popov Kevin Funk
KDevelop: Improve the problems tool view Sergey Popov Kevin Funk
[WikiToLearn] Run WikiToLearn locally on OSX Hris Luca Toma
[WikiToLearn] Run WikiToLearn locally on Windows StanfordL Luca Toma
KDevelop: Fix High-DPI issues Andrey Cyg. Lydia Pintscher
KDevelop: Ask for Git user & email if none is configured Cytadela8 Lydia Pintscher
Update an application page Hris Lydia Pintscher
Update an application page Imran Tatriev Lydia Pintscher
Update an application page Sergey Popov Lydia Pintscher
Update an application page shubhangsati Lydia Pintscher
Update an application page StanfordL Lydia Pintscher
Update an application page Tai Lydia Pintscher
[KDEConnect] Make a video about the battery plugin Andrey Cyg. Mario
[KDEConnect] Make a video about the ping plugin Divit Gulati Mario
[KDEConnect] Make a video about the send and receive plugin RussellG Mario
[KDEConnect] Make a video about the clipboard plugin StanfordL Mario
[KDEConnect] Make a video about the notification syncing plugin StanfordL Mario
[KDEConnect] Make a video about the remote media control plugin StanfordL Mario
[KDEConnect] Make a video about the screensaver inhibition plugin StanfordL Mario
[KDEConnect] Make a video about the stop media if call plugin StanfordL Mario
Make "comment" section of the timezones configuration searchable Imran Tatriev Martin Klapetek
Bug triaging Cytadela8 Myriam Schweingruber
Test Amarok 2.9 beta j_koreth Myriam Schweingruber
Make Variations of the Neon Logo Prosthemadera novaeseelandiae Myriam Schweingruber
Bug triaging RussellG Myriam Schweingruber
GCompris: Adding level to activities in GCompris Chaitanya Pulkit Gupta
GCompris: Updating activity instruction set in activities Imran Tatriev Pulkit Gupta
Reorganize the image files of KHangMan Divit Gulati rahulch
[WikiToLearn] Integrate RenameUser extension Dmitry Riccardo Iaconelli
[WikiToLearn] Start a developer blog Hris Riccardo Iaconelli
[WikiToLearn] User experience evaluation Kevin K. Riccardo Iaconelli
[WikiToLearn] Start a developer blog Nuno Riccardo Iaconelli
[WikiToLearn] Organize the manual RussellG Riccardo Iaconelli
[WikiToLearn] Start a developer blog RussellG Riccardo Iaconelli
[WikiToLearn] Write the story of WikiToLearn snowleopardcub12 Riccardo Iaconelli
[WikiToLearn] Research commonly asked questions and write a FAQ page StanfordL Riccardo Iaconelli
[WikiToLearn] Start a developer blog StanfordL Riccardo Iaconelli
GCompris - Updating of Screenshots Anant Garg Sagar Chand Agarwal
GCompris: Adding level to activities in GCompris Andrey Cyg. Sagar Chand Agarwal
GCompris: Creating mock ups of new activities of GCompris Chaitanya Sagar Chand Agarwal
GCompris: Updating activity instruction set in activities Chaitanya Sagar Chand Agarwal
GCompris: Adding few more characters to bonus Divit Gulati Sagar Chand Agarwal
GCompris: Updated logo for KDE/Qt version following the guidelines for GCompris Divit Gulati Sagar Chand Agarwal
Bug Patching In GCompris Imran Tatriev Sagar Chand Agarwal
Bug Reporting in GCompris Imran Tatriev Sagar Chand Agarwal
GCompris: Adding level to activities in GCompris Imran Tatriev Sagar Chand Agarwal
GCompris: Adding to score config into some activites of GCompris Imran Tatriev Sagar Chand Agarwal
GCompris-Updating of Screenshots on Web Lavinia Sagar Chand Agarwal
GCompris: Updating activity instruction set in activities Nuno Sagar Chand Agarwal
GCompris: Adding few more characters to bonus RussellG Sagar Chand Agarwal
Bug Patching In GCompris Sergey Popov Sagar Chand Agarwal
Bug Reporting in GCompris Sergey Popov Sagar Chand Agarwal
GCompris: Adding few more characters to bonus Sergey Popov Sagar Chand Agarwal
GCompris: Adding level to activities in GCompris Sergey Popov Sagar Chand Agarwal
GCompris: Updating the Docbook Sergey Popov Sagar Chand Agarwal
GCompris: Adding few more characters to bonus StanfordL Sagar Chand Agarwal
GCompris: Updated logo for KDE/Qt version following the guidelines for GCompris StanfordL Sagar Chand Agarwal
GCompris: Updated logo for KDE/Qt version following the guidelines for GCompris Tai Sagar Chand Agarwal
GCompris - Updating of Screenshots teddy74eva Sagar Chand Agarwal
[Marble] Build Marble Maps for Android Andrey Cyg. Torsten Rahn
[Marble] Build Marble with Vector Tile Map Support Sergey Popov Torsten Rahn
Write a blog post about KDE Application you have built Hris Valorie Zimmerman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment