<commit_before>"""python-stormondemand - a simple client library for accessing the Liquid Web Storm API, written in python

	see the official documentation for more information about the api itself:
		http://www.liquidweb.com/StormServers/api/docs/v1

	 Copyright 2013 Liquid Web, Inc. 

	 Licensed under the Apache License, Version 2.0 (the "License");
	 you may not use this file except in compliance with the License.
	 You may obtain a copy of the License at

		 http://www.apache.org/licenses/LICENSE-2.0

	 Unless required by applicable law or agreed to in writing, software
	 distributed under the License is distributed on an "AS IS" BASIS,
	 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	 See the License for the specific language governing permissions and
	 limitations under the License.
"""

import os
import requests
import time
import json
from getpass import getpass

class HTTPException(Exception):
"""
	raised when an HTTP error is encountered; e.g. 401 Permission Denied. If StormOnDemand itself has an issue preventing the request, a StormException may be raised.
"""
	def __init__(self, code, text):
		self.code = code
		self.text = text
		message = ('Received bad response from the server: %d\n%s' % (code, text))
		super(BadResponseException, self).__init__(message)

class StormException(Exception):
"""
error_class - the type of error encountered, follows the form `LW::Exception::Something::Bad`; you can read more about possible error types here: https://www.stormondemand.com/api/docs/tutorials/exceptions.html
error_message - details of the error recieved

full_message - the full text of the error provided by the server. Will be used as the message of the python base Exception type. 

this exception will be raised when there is an error_class key in the server response. If you would like to handle such errors yourself, this exception may be disabled by setting `raise_exceptions=False` when creating an LWApi object. Regardless, the BadResponseException will still be raised if the server responds in a way that can't be handled. e.g. 401 Permission Denied.
"""
	def __init__(self, error_class, error_message, full_message):<commit_msg>removed redundant import statement (os no longer used now that no files are created)<commit_after>"""python-stormondemand - a simple client library for accessing the Liquid Web Storm API, written in python

	see the official documentation for more information about the api itself:
		http://www.liquidweb.com/StormServers/api/docs/v1

	 Copyright 2013 Liquid Web, Inc. 

	 Licensed under the Apache License, Version 2.0 (the "License");
	 you may not use this file except in compliance with the License.
	 You may obtain a copy of the License at

		 http://www.apache.org/licenses/LICENSE-2.0

	 Unless required by applicable law or agreed to in writing, software
	 distributed under the License is distributed on an "AS IS" BASIS,
	 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	 See the License for the specific language governing permissions and
	 limitations under the License.
"""

import requests
import time
import json
from getpass import getpass

class HTTPException(Exception):
"""
	raised when an HTTP error is encountered; e.g. 401 Permission Denied. If StormOnDemand itself has an issue preventing the request, a StormException may be raised.
"""
	def __init__(self, code, text):
		self.code = code
		self.text = text
		message = ('Received bad response from the server: %d\n%s' % (code, text))
		super(BadResponseException, self).__init__(message)

class StormException(Exception):
"""
error_class - the type of error encountered, follows the form `LW::Exception::Something::Bad`; you can read more about possible error types here: https://www.stormondemand.com/api/docs/tutorials/exceptions.html
error_message - details of the error recieved

full_message - the full text of the error provided by the server. Will be used as the message of the python base Exception type. 

this exception will be raised when there is an error_class key in the server response. If you would like to handle such errors yourself, this exception may be disabled by setting `raise_exceptions=False` when creating an LWApi object. Regardless, the BadResponseException will still be raised if the server responds in a way that can't be handled. e.g. 401 Permission Denied.
"""
	def __init__(self, error_class, error_message, full_message):
{'fraction_non_alphanumeric': 0.06506618801884675, 'fraction_numerical': 0.006730984967466906, 'mean_word_length': 4.5725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, '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': '2080798', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1104, 'n_words': 578}