Skip to content

Instantly share code, notes, and snippets.

View brianrusso's full-sized avatar

Brian Russo brianrusso

  • Tampa, FL
View GitHub Profile
@brianrusso
brianrusso / list.txt
Created October 26, 2022 01:58 — forked from coryodaniel/list.txt
GCP List of API Services
NAME TITLE
abusiveexperiencereport.googleapis.com Abusive Experience Report API
acceleratedmobilepageurl.googleapis.com Accelerated Mobile Pages (AMP) URL API
accessapproval.googleapis.com Access Approval API
accesscontextmanager.googleapis.com Access Context Manager API
actions.googleapis.com Actions API
adexchangebuyer-json.googleapis.com Ad Exchange Buyer API
adexchangebuyer.googleapis.com Ad Exchange Buyer API II
adexchangeseller.googleapis.com Ad Exchange Seller API
adexperiencereport.googleapis.com Ad Experience Report API
@brianrusso
brianrusso / auth_sharepointonline.py
Last active May 3, 2022 13:24
Quick and dirty example of how to authenticate to Office 365 SharePoint Online using urllib2, jinja2, cookielib. Basically you POST your user/pass to Microsoft's token service, then hand that token to SharePoint's login proper, which gives you a cookie to access SharePoint content.
import urllib2
import cookielib
import urlparse
import jinja2
from urllib2 import HTTPCookieProcessor
from lxml import etree
# Setup Jinja for SAML
JINJA_TEMPLATE_PATH = "/Users/Brian/IdeaProjects/yggdrasil/templates"
JINJA_ENVIRONMENT = jinja2.Environment(
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="index.css">
</head>
<div style="width: 972px; margin: 0 auto; text-align: left;">
<div id="main" style="border: 1px solid #999; padding: 0; width: 970px;">
<div id="interactiveShell">
<div class="columnGroup firstColumnGroup">
<div class="ledeStory">
function marginotes(els, options) {
var options = options || {}
var marginTooltips = document.getElementsByClassName('margintooltip')
var marginTooltip
if (marginTooltips.length === 0) {
marginTooltip = document.createElement('div')
marginTooltip.className = 'margintooltip'
marginTooltip.style.display = 'none'
document.body.appendChild(marginTooltip)
} else {
@brianrusso
brianrusso / tensorflow_self_check.py
Created August 25, 2017 15:01 — forked from mrry/tensorflow_self_check.py
TensorFlow on Windows self-check
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# If add is True (default, it will add them, else it merges.
def deepdictmerge(a, b, path=None, add=True):
if path is None: path = []
for key in b: # for every key in b..
if key not in a: # handle simple case where it's new
a[key] = b[key]
else: # key must be in a and b
# both dictionaries.
if isinstance(a[key], dict) and isinstance(b[key], dict):
deepdictmerge(a[key], b[key], path + [str(key)]) # recurse down
{
"directed" : false,
"graph" : {},
"nodes" : [{
"id" : 1376262
}, {
"id" : 1277961
}, {
"id" : 163853
}, {
{
"directed" : false,
"graph" : {},
"nodes" : [{
"id" : 1376262
}, {
"id" : 1277961
}, {
"id" : 163853
}, {
{"directed": false, "graph": {}, "nodes": [{"id": 716800}, {"id": 1017728}, {"id": 22275}, {"id": 592388}, {"id": 120709}, {"id": 498694}, {"id": 25099}, {"id": 1155212}, {"id": 677774}, {"id": 321039}, {"id": 121248}, {"id": 358806}, {"id": 196759}, {"id": 151576}, {"id": 1691674}, {"id": 385563}, {"id": 223901}, {"id": 379550}, {"id": 27717}, {"id": 583200}, {"id": 99708}, {"id": 555043}, {"id": 649253}, {"id": 55720}, {"id": 1152297}, {"id": 479794}, {"id": 1666738}, {"id": 950150}, {"id": 1390265}, {"id": 807866}, {"id": 1484732}, {"id": 580029}, {"id": 119614}, {"id": 470816}, {"id": 1438145}, {"id": 304324}, {"id": 1329477}, {"id": 411336}, {"id": 1603212}, {"id": 1280202}, {"id": 239820}, {"id": 114381}, {"id": 1627345}, {"id": 407843}, {"id": 1181785}, {"id": 516442}, {"id": 305115}, {"id": 36828}, {"id": 1264634}, {"id": 1239936}, {"id": 1051235}, {"id": 1175656}, {"id": 1574249}, {"id": 1266027}, {"id": 468845}, {"id": 1225149}, {"id": 943400}, {"id": 1421824}, {"id": 1690612}, {"id": 1669467}, {"id