Skip to content

Instantly share code, notes, and snippets.

@bpodgursky
bpodgursky / PrintSnapshotImplMojo.java
Created September 29, 2014 03:27
Mojo to print snapshot revisions
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;

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:

#!/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
# -*- coding: utf-8 -*-
from qgis.PyQt.QtCore import QCoreApplication
from qgis.core import (QgsProcessing,
QgsGeometry,
QgsProject,
QgsField,
QgsFields,
QgsFeature,
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
@bpodgursky
bpodgursky / helpers.py
Created January 27, 2020 23:40
CCPA Slack message generator
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+""""
@bpodgursky
bpodgursky / script.py
Created January 27, 2020 23:44
CCPA report generator
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
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