import re


def cpu_share_to_cores(share):
	"""
	Convert CPU shares to core fractions
	"""
	number = float(re.findall(r"[0-9\.]+|$", str(share))[0])
	unit = re.findall(r"[a-zA-Z]+|$", str(share))[0]
	
	if unit == "":
		return float(number)
	elif unit.lower() == "m":
		return float(number)/1000.0