Skip to content

Instantly share code, notes, and snippets.

View geekygirldawn's full-sized avatar

Dawn Foster geekygirldawn

View GitHub Profile
@geekygirldawn
geekygirldawn / diary.md
Last active June 16, 2023 08:42 — forked from aliok/diary.md
Knative TOC 2023 Election - election officer diary

Knative TOC 2023 Election - election officer diary

Note: all emails sent are recorded in this Google Doc: https://docs.google.com/document/d/1oqgy9VcmZP872hUS1dQyAd3H_88UpCDdakwqY128hKA

@geekygirldawn
geekygirldawn / chaoss_urls.py
Last active March 15, 2023 14:09
Gets short numeric links for all CHAOSS metrics
# I created a super hacky Jupyter Notebook that looks at
# https://chaoss.community/kbtopic/all-metrics/ which
# contains a list of all of our metrics, and then uses
# BeautifulSoup + hackiness to extract the short link
# from the wordpress pages. I was in a hurry, so I
# printed the csv output to the screen instead of to
# a csv file.
import urllib.request as urllib2
from bs4 import BeautifulSoup
@geekygirldawn
geekygirldawn / totalContributionsEx.txt
Last active October 7, 2022 09:07
Get total GitHub contributions per year for a user
Using the GiHub GraphQL API contributionsCollection, you can get this pretty easily.
You need to get it for each type of contribution, but then you can add them up. Then
you could loop through a list of users to get this for each of them.
Documentation: https://docs.github.com/en/graphql/reference/objects#contributionscollection
Example GraphQL API Query:
query totalContributions{
user(login: "geekygirldawn") {
name
import pandas as pd
import matplotlib
import seaborn as sns
import matplotlib.pyplot as plt
pr_all['diff'] = pr_all.first_response_time - pr_all.pr_created_at
pr_all['yearmonth'] = pr_all['pr_created_at'].dt.strftime('%Y-%m')
pr_all['diff_days'] = pr_all['diff'] / datetime.timedelta(days=1)
year_month_list = pr_all.yearmonth.unique()
year_month_list.sort()