<commit_before>require 'json'
require 'time'
require 'uri'
require_relative '../auth/master_token'
require_relative '../header/header'

module Azure
  module DocumentDB
    class Database
      def initialize context, rest_client
        self.context = context
        self.rest_client = rest_client
        self.resource_type = "dbs"
      end

      def list
        header = header "get"
        JSON.parse(rest_client.get url, header)
      end

      def get database_id
        header = header "get", database_id
        get_url = url database_id
        JSON.parse(rest_client.get get_url, header)
      end

      def create database_name
        body = { "id" => database_name }
        header = header "post"
        JSON.parse(rest_client.post url, body.to_json, header)
      end

      def delete database_id
        header = header "delete", database_id<commit_msg>Remove unused import<commit_after>require 'json'
require 'time'
require_relative '../auth/master_token'
require_relative '../header/header'

module Azure
  module DocumentDB
    class Database
      def initialize context, rest_client
        self.context = context
        self.rest_client = rest_client
        self.resource_type = "dbs"
      end

      def list
        header = header "get"
        JSON.parse(rest_client.get url, header)
      end

      def get database_id
        header = header "get", database_id
        get_url = url database_id
        JSON.parse(rest_client.get get_url, header)
      end

      def create database_name
        body = { "id" => database_name }
        header = header "post"
        JSON.parse(rest_client.post url, body.to_json, header)
      end

      def delete database_id
        header = header "delete", database_id
{'fraction_non_alphanumeric': 0.07766990291262135, 'fraction_numerical': 0.0, 'mean_word_length': 2.349904397705545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1171639', 'n_tokens_mistral': 496, 'n_tokens_neox': 487, 'n_words': 141}