Skip to content

Instantly share code, notes, and snippets.

View script.py
from bs4 import BeautifulSoup
import urllib.request
# This application uses the gspread module to interact with
# Google Sheets, and gmail to send alerts when necessary
sheets = CloudWright.get_module("gspread")
gmail = CloudWright.get_module("gmail")
# Open the customer account tracking doc
sheet = sheets.open_by_key("1SS9UxMkH8Pagpcnsz537CdFBsqo15vRsdWJ13-_lpkc").sheet1
@bpodgursky
bpodgursky / script.py
Created Jan 27, 2020
CCPA report generator
View script.py
import base64
import json
import sqlalchemy
import requests
# This application handles data export approvals and rejections, as
# forwarded from the Slack approval bot.
# - on approval, the requested email is sent a formatted data export
# - on rejection, the requested email is alerted about the rejection
@bpodgursky
bpodgursky / helpers.py
Created Jan 27, 2020
CCPA Slack message generator
View helpers.py
from cloudwright_base import *
def message_template(name, email, license_link, value):
return """
[
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*CCPA Data Request*\n*Name*: """+name+"""\n *Email*: """+email+""""
View gist:7580c416105a04375331d84252802f23
City,State,Score,Population,Lat,Lng
Grandview,WA,0,18858.0,46.2431,-119.9084
Marinette,WI,0,18791.0,45.0873,-87.6324
Shawano,WI,0,10158.0,44.7749,-88.5844
Riverton,WY,0,12776.0,43.0426,-108.4140
Las Vegas,NM,0,14982.0,35.6011,-105.2206
Grants,NM,0,11925.0,35.1538,-107.8335
Taos,NM,0,13571.0,36.3868,-105.5802
Artesia,NM,0,13464.0,32.8479,-104.4276
Silver City,NM,0,11882.0,32.7783,-108.2699
View check_points_against_vector_layers.py
# -*- coding: utf-8 -*-
from qgis.PyQt.QtCore import QCoreApplication
from qgis.core import (QgsProcessing,
QgsGeometry,
QgsProject,
QgsField,
QgsFields,
QgsFeature,
View process_monitoring.sh
#!/bin/bash
mkdir -p /var/log/process-monitoring
IOTOP_PROCS="$(iotop -qqq -k -b -o -a -n 2 -d 5 --time | sort -r -n -k 2,2 -k 1,1 | awk '{if ($2 != pid) {pid=$2; print $0}}')"
echo -e "\n\n$(date)" >> /var/log/process-monitoring/disk_writes.out
echo "$IOTOP_PROCS" | sort -n -k 7 >> /var/log/process-monitoring/disk_writes.out
echo -e "\n\n$(date)" >> /var/log/process-monitoring/disk_reads.out
View keybase.md

Keybase proof

I hereby claim:

  • I am bpodgursky on github.
  • I am bpodgursky (https://keybase.io/bpodgursky) on keybase.
  • I have a public key whose fingerprint is C785 5F53 33D7 2F77 9456 9492 C504 3084 A789 BEC8

To claim this, I am signing this object:

@bpodgursky
bpodgursky / PrintSnapshotImplMojo.java
Created Sep 29, 2014
Mojo to print snapshot revisions
View PrintSnapshotImplMojo.java
package com.liveramp.liveramp_build_maven_plugin;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
You can’t perform that action at this time.