Skip to content

Instantly share code, notes, and snippets.

View austinmccalley's full-sized avatar
🌎
Focusing

Austin austinmccalley

🌎
Focusing
View GitHub Profile
@austinmccalley
austinmccalley / image_to_graph_and_csv.py
Created February 14, 2018 19:25
Iterates through picture to make a csv and graph
import numpy as np
import mpl_toolkits.mplot3d.axes3d as p3
import matplotlib.pyplot as plt
import colorsys
from PIL import Image
import sys
import csv
if sys.version_info[0] == 3:
xrange = range
@austinmccalley
austinmccalley / data-creator.py
Created January 11, 2018 16:09
This is my data creator file which is returning the weird error. The function get_ships(data) is returning the weird error.
import os
import time
ship_requirement = 10
damage_requirement = 1000
def get_ships(data):
return int(data.split("producing ")[1].split(" ships")[0])
File "data-creator.py", line 37, in <module>
CharlesBot1_ships = get_ships(CharlesBot1)
File "data-creator.py", line 9, in get_ships
return int(data.split("producing ")[1].split(" ships")[0])
IndexError: list index out of range