示例#1
0
def load_chicago_2013_men():
	column_data_types = [0] * 12
	column_data_types[0] = views_protocol.CELL_DATA_PLACE
	column_data_types[1] = views_protocol.CELL_DATA_PLACE_GENDER
	column_data_types[2] = views_protocol.CELL_DATA_PLACE_CATEGORY
	column_data_types[3] = views_protocol.CELL_DATA_LNAME
	column_data_types[4] = views_protocol.CELL_DATA_FNAME
	column_data_types[5] = views_protocol.CELL_DATA_COUNTRY
	column_data_types[6] = views_protocol.CELL_DATA_CITY
	column_data_types[7] = views_protocol.CELL_DATA_BIB
	column_data_types[8] = views_protocol.CELL_DATA_CATEGORY
	column_data_types[9] = views_protocol.CELL_DATA_AGE
	column_data_types[10] = views_protocol.CELL_DATA_SPLIT
	column_data_types[11] = views_protocol.CELL_DATA_RESULT

	column_split_values = [0] * 12
	column_split_values[10] = 127
	views_protocol.process_protocol(
		event_id=4855,
		sheet_index=0,
		column_data_types=column_data_types,
		column_split_values=column_split_values,
		genders=[0] * 30000,
		try_load_results=True
	)
示例#2
0
def load_mm_2017():
	views_protocol.process_protocol(
		race_id=26090,
		sheet_index=0,
		try_load_results=False,
		settings={'save_old_results': views_protocol.OLD_RESULTS_DELETE_ALL},	
	)
示例#3
0
def load_wn_2017():
	views_protocol.process_protocol(
		race_id=23783,
		sheet_index=1,
		try_load_results=True,
		settings={'try_get_gender_from_group': True}
	)
示例#4
0
	def handle(self, *args, **options):
		# print 'Trying to call process_protocol with race_id', options['race'], ', sheet index', options['sheet'], ', try to load? ', options['try_load']
		# if options['delete_old_results']:
		# 	print 'Trying to delete old results!!'
		settings = {}
		if options['delete_old_results']:
			settings['save_old_results'] = views_protocol.OLD_RESULTS_DELETE_ALL
		for param in BOOLEAN_PARAMS:
			settings[param] = True if options[param] else False
		if settings['all_are_male'] and settings['all_are_female']:
			print 'You cannot specify --all_are_male and --all_are_female at the same time.'
			return
		views_protocol.process_protocol(
			race_id=options['race'],
			sheet_index=options['sheet'],
			settings=settings
		)
示例#5
0
def load_minsk_polo_2016():
	column_data_types = [0] * 8
	column_data_types[0] = views_protocol.CELL_DATA_PLACE
	column_data_types[1] = views_protocol.CELL_DATA_BIB
	column_data_types[2] = views_protocol.CELL_DATA_PLACE_GENDER
	column_data_types[3] = views_protocol.CELL_DATA_LNAME
	column_data_types[4] = views_protocol.CELL_DATA_FNAME
	column_data_types[5] = views_protocol.CELL_DATA_GENDER
	column_data_types[6] = views_protocol.CELL_DATA_CLUB
	column_data_types[7] = views_protocol.CELL_DATA_RESULT
	settings = {}
	settings['categories'] = [''] * 9920
	views_protocol.process_protocol(
		race_id=18890,
		sheet_index=2,
		column_data_types=column_data_types,
		settings=settings,
		try_load_results=True
	)
示例#6
0
def load_hearts_2017():
	views_protocol.process_protocol(
		race_id=26640,
		sheet_index=3,
		try_load_results=True
	)
示例#7
0
def load_bryansk_2017():
	views_protocol.process_protocol(
		race_id=24948,
		# try_load_results=True
	)
示例#8
0
def load_mm_2014():
	views_protocol.process_protocol(
		race_id=8012,
		sheet_index=0,
		try_load_results=True
	)
示例#9
0
def load_mm_2017_10k():
	views_protocol.process_protocol(
		race_id=26089,
		sheet_index=1,
		try_load_results=True
	)