Skip to content

Instantly share code, notes, and snippets.

@AKB428
Created September 12, 2015 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AKB428/dbc520511e19130b8e2d to your computer and use it in GitHub Desktop.
Save AKB428/dbc520511e19130b8e2d to your computer and use it in GitHub Desktop.
create_dummy_posdata.rb
require 'date'
(1..12).each do |i|
date = Date.new(2014, i, 1)
(1..10).each do |x|
shop_id = x
sales = 100000 * date.month * shop_id
puts sprintf("%d,%s,%d", shop_id, date, sales)
end
end
@AKB428
Copy link
Author

AKB428 commented Sep 12, 2015

10店舗の売上を12ヶ月ぶん出力

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment