Skip to content

Instantly share code, notes, and snippets.

@markkernke
markkernke / bean_distribution.py.ipynb
Last active July 28, 2020 13:37
A simulation of distribution of coffee bean doses when there is a blend of two beans.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@markkernke
markkernke / tableau_kb_articles.py
Last active July 28, 2020 13:36
A script for scraping the Tableau Knowledgebase for new and updated articles.
# Dependancies:
# - requests
# - BeautifulSoup
import requests, re
from multiprocessing import Pool
#from multiprocessing.dummy import Pool
from datetime import datetime, timedelta
from bs4 import BeautifulSoup
from urllib.parse import unquote
@markkernke
markkernke / axe.py
Last active July 28, 2020 13:36
A python script for processing VizQL logs into a format usable by lumberjack
import csv,argparse,json,zipfile,os
from io import BytesIO
# Parse input
parser = argparse.ArgumentParser(description='Convert Tableau Logs for Lumberjack')
parser.add_argument('-i', '--input-file', help='Location of logs.zip', default=None)
parser.add_argument('-o', '--output-file', help='Location to write csv output', default=None)
parser.add_argument('-a', '--append', help='Append to the csv output file', action='store_true')
args = parser.parse_args()
logs_zip = args.input_file
@markkernke
markkernke / test.js
Created May 23, 2017 12:57
Tableau JS API usage for Syncing Metric Names between datasources
/**********************************************************
*
* Currently does not work due to http://community.tableau.com/thread/131070
*
*********************************************************/
var viz = tableau.VizManager.getVizs()[0]