Skip to content

Instantly share code, notes, and snippets.

@cptncrnch
cptncrnch / read-feeder-xml.py
Created August 31, 2017 03:53
Parsing and plotting points from CYME XML
# Parse an XML file exported from CYME for all node points and plot them by Section.
# Run script with XML file in the same directory.
###
import matplotlib.pyplot as plt
import xml.etree.ElementTree as ET
tree = ET.parse('sample.xml') # Replace with name of XML file
root = tree.getroot() # Get root XML elements in tree
# Find all elements that are Sections
@cptncrnch
cptncrnch / parse-rosters.py
Created August 31, 2017 04:04
Parse University Roster Excel files for emails and export to CSV files
# Parses all Excel files that matches with "R*" in the same directory for names and emails.
# Creates CSV files by undergraduate or graduate or no email found.
# Script doesn't account for duplicate entries.
###
import os
import xlrd
import csv
# Open CSV files for writing
fileUndergrad = open('list_undergrad_withduplicates.csv','wb')
fileGraduate = open('list_graduate_withduplicates.csv','wb')