<commit_before>#!/usr/bin/env python

from random import choice
from GoGridClient import GoGridClient

__author__ = "<NAME>"

"""GoGridManager is a Python module which implements an interface to the GoGrid API.
It uses CSV mode and therefore doesn't need external libs (that would be needed if it used
json) and the code is compact (it would be hard to keep it as small as now if it used xml).
The module has been tested with CPython 2.5 and CPython 2.6 and works fine. Jython should
work too, but it wasn't tested as frequently as CPython.

@note: Small comment on the datatypes. As you probably know already, GoGrid server
can be identified by either numeric id of it's name. Actually, __actually__, it is possible to
have to servers with the same name, however numeric id is always unique. But in most of cases if
you are sure that you don't use same names for your servers, it might be more convenient to search
servers by name. You will notice that some methods accepts both id and name, however type for id is
string. Don't get confused: type is string to avoid non-needed type conversion, as id is stored as
string in CSV, like all other fields as well."""

class GGIp:
    """
    Class representing IP addresses. In GoGrid API, IP address can be generally used in a two ways:

        1. As an address attached to the server

        2. As an item of the address pool

    IP addresses are of two types:

        1. Private

        2. Public

    Private addresses are used for connecting to cloud storage (as it's not available from the world)
    and for internal connections between GoGrid servers and ServePath servers for example. You cannot
    create GoGrid servers with the private IP.

    Public IPs are just IPs assigned to the servers when they're getting created.
    
    @author: <NAME>
    @contact: <EMAIL>
    """

    def __init__(self, tokens):
        """
        Constructor.
<commit_msg>Provide overview of the GoGridManager moduel.<commit_after>#!/usr/bin/env python


"""
GoGridManager is a Python module which implements an interface to the GoGrid API.
It uses CSV mode and therefore doesn't need external libs (that would be needed if it used
json) and the code is compact (it would be hard to keep it as small as now if it used xml).
The module has been tested with CPython 2.5 and CPython 2.6 and works fine. Jython should
work too, but it wasn't tested as frequently as CPython.

@note: Small comment on the datatypes. As you probably know already, GoGrid server
can be identified by either numeric id of it's name. Actually, __actually__, it is possible to
have to servers with the same name, however numeric id is always unique. But in most of cases if
you are sure that you don't use same names for your servers, it might be more convenient to search
servers by name. You will notice that some methods accepts both id and name, however type for id is
string. Don't get confused: type is string to avoid non-needed type conversion, as id is stored as
string in CSV, like all other fields as well.

@author: <NAME>
@contact: <EMAIL>
"""

from random import choice
from GoGridClient import GoGridClient

class GGIp:
    """
    Class representing IP addresses. In GoGrid API, IP address can be generally used in a two ways:

        1. As an address attached to the server

        2. As an item of the address pool

    IP addresses are of two types:

        1. Private

        2. Public

    Private addresses are used for connecting to cloud storage (as it's not available from the world)
    and for internal connections between GoGrid servers and ServePath servers for example. You cannot
    create GoGrid servers with the private IP.

    Public IPs are just IPs assigned to the servers when they're getting created.
    
    @author: <NAME>
    @contact: <EMAIL>
    """

    def __init__(self, tokens):
        """
        Constructor.

{'fraction_non_alphanumeric': 0.047851813738101365, 'fraction_numerical': 0.004116285052739903, 'mean_word_length': 3.3344481605351173, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5475181', 'n_tokens_mistral': 1033, 'n_tokens_neox': 983, 'n_words': 617}