Skip to content

Instantly share code, notes, and snippets.

View audiolion's full-sized avatar
⌨️
coding

Ryan Castner audiolion

⌨️
coding
View GitHub Profile
@audiolion
audiolion / loop.py
Created October 17, 2016 13:42
loop through items and perform an action at a specified count
divisor = 100
company_names = ['ALP','FORRESTER','GE Aero', ... ]
for index, company_name in enumerate(company_names):
if index % divisor == 0 and index != 0:
# perform action on each 100 count
# perform normal actions outside of tallying 100 if applicable
###
# Attribute Branching Impurity Calculator
# Zachary Friss
# CSCI 420
# Written for Python 3.4
###
from statistics import *
from math import *