Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
with open('./search/data/seo_service_landing_service_data.yml') as f:
service_data = yaml.safe_load(f)
for x in service_data:
service_data[x]['see_also'] = [TOP_TEN[i] for i in (random.sample(xrange(len(TOP_TEN)), 4))]
with open('./search/data/seo_service_landing_service_data.yml', 'w') as f:
pyaml.dump(service_data, f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment