<commit_before># -*- coding: utf-8 -*-
module Ustreamr::Command

 :private
  def create_api_uri(base_uri, command_uid, command)
    return [base_uri, URI.encode(command_uid), command].join('/')
  end

  def get(uri)
    result = open(uri)
    return JSON.parse(result.read).to_sym[:results]
  end 

  def get_with_parameters(uri, params = {})
    params_str = params.map{|k, v|
      k.to_s + '=' + v.to_s
    }.join('&')
    uri_with_params = uri + "?" + params_str
    puts uri_with_params
    return get(uri_with_params)
  end

end

%w(
ustreamr/command/user
ustreamr/command/channel
ustreamr/command/video
ustreamr/command/stream
ustreamr/command/system
).each{|file| require_local file}<commit_msg>modified some typo<commit_after>module Ustreamr::Command

 :private
  def create_api_uri(base_uri, command_uid, command)
    return [base_uri, URI.encode(command_uid), command].join('/')
  end

  def get(uri)
    result = open(uri)
    return JSON.parse(result.read).to_sym[:results]
  end 

  def get_with_parameters(uri, params = {})
    params_str = params.map{|k, v|
      k.to_s + '=' + v.to_s
    }.join('&')
    uri_with_params = uri + '?' + params_str
    puts uri_with_params
    return get(uri_with_params)
  end

end

%w(
ustreamr/command/user
ustreamr/command/channel
ustreamr/command/video
ustreamr/command/stream
ustreamr/command/system
).each{|file| require_local file}
{'fraction_non_alphanumeric': 0.13338139870223503, 'fraction_numerical': 0.0007209805335255948, 'mean_word_length': 3.9395017793594307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1645482', 'n_tokens_mistral': 513, 'n_tokens_neox': 501, 'n_words': 96}