<commit_before># -*- coding: utf-8 -*-
#top page 
#to test : ruby ranking.rb -o 0.0.0.0
require 'sinatra'
require 'rakuten_web_service'

#参考: https://github.com/k2works/sinatra_rakuten_api

get '/' do
  RakutenWebService.configuration do |c|
    c.application_id = ENV["APPID"]
    c.affiliate_id = ENV["AFID"]
  end
  # Use genre id to fetch genre object
  @rankings = RakutenWebService::Ichiba::Item.ranking(:age => 40, :sex => 0)<commit_msg>update ranking.rb<commit_after># -*- coding: utf-8 -*-
#top page 
#to test : ruby ranking.rb -o 0.0.0.0
require 'sinatra'
require 'rakuten_web_service'


#参考: https://github.com/k2works/sinatra_rakuten_api

get '/' do
  RakutenWebService.configuration do |c|
    c.application_id = ENV["APPID"]
    c.affiliate_id = ENV["AFID"]
  end
  # Use genre id to fetch genre object
  @rankings = RakutenWebService::Ichiba::Item.ranking(:age => 40, :sex => 0)
{'fraction_non_alphanumeric': 0.1511758118701008, 'fraction_numerical': 0.020156774916013438, 'mean_word_length': 4.022471910112359, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5763960', 'n_tokens_mistral': 359, 'n_tokens_neox': 338, 'n_words': 78}