Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Wilcox crwilcox

View GitHub Profile
@crwilcox
crwilcox / bigquery_github.py
Last active Feb 19, 2020
Scan GitHub using BigQuery
View bigquery_github.py
from google.cloud import bigquery
import json
GITHUB_USERNAME = 'crwilcox'
START_DATE = "2019-08-26"
END_DATE = "2020-02-16"
client = bigquery.client.Client()
query = f"""SELECT repository, type, event AS status, COUNT(*) AS count
@crwilcox
crwilcox / repro.js
Created May 31, 2018
node repro.js create
View repro.js
const assert = require('assert')
const async = require('async')
var pad = require('pad');
const Spanner = require('./src')
const spanner = new Spanner()
const instance = spanner.instance('issue-180-instance')
const database = instance.database('issue-180-database')
const table = database.table('issuetable')
@crwilcox
crwilcox / repro.js
Created May 31, 2018
Repro.js script for spanner
View repro.js
const assert = require('assert')
const async = require('async')
var pad = require('pad');
const Spanner = require('./src')
const spanner = new Spanner()
const instance = spanner.instance('issue-180-instance')
const database = instance.database('issue-180-database')
const table = database.table('issuetable')
@crwilcox
crwilcox / repro.js
Last active May 31, 2018
node repro.js create
View repro.js
const assert = require('assert')
const async = require('async')
var pad = require('pad');
const Spanner = require('./src')
const spanner = new Spanner()
const instance = spanner.instance('issue-180-instance')
const database = instance.database('issue-180-database')
const table = database.table('issuetable')
View test2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@crwilcox
crwilcox / PyGitHub_MigrateIssues.py
Created Aug 19, 2015
A script to migrate issues with a certain label from one repo to another and close the original issue. There is no error handling. This could very well fail but it worked for what I needed it for.
View PyGitHub_MigrateIssues.py
# Quick and Dirty script to create issues in a new repo and
# close them in the old one. There is no error handling.
# Set these variables as appropriate
GITHUB_ACCESS_TOKEN = 'INSERT ACCESS TOKEN HERE'
SOURCE_REPO = 'Azure/some-source-repo'
DEST_REPO = 'Azure/some-dest-repo'
LABEL_TO_MOVE = 'Interesting Label'
LABEL_TO_LABEL_IN_DEST = 'Migrated from {}'.format(SOURCE_REPO)