Skip to content

Instantly share code, notes, and snippets.

View klopmp's full-sized avatar

Kenneth Lo, PMP klopmp

View GitHub Profile
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
# input files
FILE_EMPLOYEE = 'data/employee.xlsx'
FILE_GEO = 'data/employee_geo.xlsx'
Option Explicit
''' Global constants for ease of config
Const MY_TITLE As String = "MOM VIII Sales Meeting Log"
Const MEETING_RAW = "_meetings"
Const MEETING = "Meetings"
Const EMPLOYEE_RAW = "_employees"
Const TAG_RAW = "_tags"
Const NAMEDRANGE_EMPLOYEE = "BSG_Ops___Employees"
''' TODO
''' Add alternate colors to rows
''' Add error handling
Option Explicit
''' Global constants
Const MY_TITLE As String = "Meow VIII VC Marketing Pipeline"
Const SOURCE As String = "_P8VC"
Const DESTINATION As String = "P8VC"
import webbrowser as wb
import time
import os
# replace url_base with your Backstop instance URL
url_base = 'https://[BACKSTOP_URL]'
url_delete_contacts = '/backstop/crm/ManageContacts.do?ACTION=DELETE&id='
@klopmp
klopmp / python-etl-merge.py
Last active September 26, 2017 17:21
In the midst of a CRM deployment needing tons of ETL for data migration. The 50k rows of dataset had fewer than a dozen columns. File size was smaller than 10MB. Sadly, that was enough to choke Excel on a modern day ThinkPad with 20GB RAM. Whipping up some Pandas script if far simpler.
import pandas as pd
# setting file names
FILE_MASTERS = 'masters.csv'
FILE_LOOKUP = 'lookup.csv'
FILE_MASTERS_DUPS = 'masters_dups.csv'
FILE_OUT = 'output.csv'
# reading data from masters file
@klopmp
klopmp / lookup.csv
Last active September 26, 2017 17:09
I was working on a CRM deployment and needed to migrate data from the old system to the new one. The 50k rows of dataset had fewer than a dozen columns and was straightforward by all means. File size was smaller than 10MB. Sadly, that was enough to choke Excel on a modern day ThinkPad with 20GB RAM. Whipping up some Pandas script was simpler. Th…
ID Country
100001 USA
100002 USA
100003 UK
100008 UK
100009 China
100010 USA