Skip to content

Instantly share code, notes, and snippets.

@sivakumarbdu
Created June 4, 2018 10:44
Show Gist options
  • Save sivakumarbdu/591f6faa9fe55f2d1c4744703b77c193 to your computer and use it in GitHub Desktop.
Save sivakumarbdu/591f6faa9fe55f2d1c4744703b77c193 to your computer and use it in GitHub Desktop.
interest= ["nature", "agriculture", "farming", "ai", "infography", "memes", "DIY home", "electronics", "web design", "garden design"]
survey_data = {}
10000.times do | n |
primary_interest = interest[Random.rand(interest.size)]
secondary_interest = interest[Random.rand(interest.size)]
survey_data[n.to_s] = {:name => Faker::Name.name, email: Faker::Internet.email,
interest: [primary_interest, secondary_interest], age: Random.rand(18..65)}
end
p survey_data
#survey_data will have mocke data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment