How to use the classes.statistic_worker.statisticBaseClass.StatisticBaseClass function in classes

To help you get started, we’ve selected a few classes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AlexeyManikin / domain_statistic / classes / statistic_worker / groupProviderStatistic.py View on Github external
def __init__(self, number: int, date: datetime, zone_id: int, data_rows: list, key: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, "group_provider_sercher_")

        self.date = date
        self.zone_id = zone_id
        self.data_rows = data_rows
        self.key = key
github AlexeyManikin / domain_statistic / classes / statistic_worker / asCountStatistic.py View on Github external
__author__ = 'Alexey Y Manikin'

from classes.statistic_worker.statisticBaseClass import StatisticBaseClass
import MySQLdb
import datetime
from config.main import MINIMUM_DOMAIN_COUNT, PREFIX_LIST_ZONE


class AsCountStatistic(StatisticBaseClass):

    def __init__(self, number: int, data: datetime, today: datetime, zone: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, "as_count_")

        self.today = today
        self.data = data
        self.zone_id = PREFIX_LIST_ZONE[zone]

    def _get_data(self, date: datetime) -> list:
        """
        В зависимости от дня статистики обращаемся или к domain_history или к domain
        :return:
        """
github AlexeyManikin / domain_statistic / classes / statistic_worker / beget / begetAsToStatistic.py View on Github external
__author__ = 'Alexey Y Manikin'

from classes.statistic_worker.statisticBaseClass import StatisticBaseClass
import MySQLdb
import datetime
from config.main import PREFIX_LIST_ZONE


class BegetAsToStatistic(StatisticBaseClass):

    def __init__(self, number: int, data: datetime, today: datetime, zone: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, 'beget_as_to')
        self.today = today
        self.data = data
        self.zone = PREFIX_LIST_ZONE[zone]

    def _update(self):
        """
        :return:
        """
        date = self.data
        today = self.today
github AlexeyManikin / domain_statistic / classes / statistic_worker / registrantCountStatistic.py View on Github external
__author__ = 'Alexey Y Manikin'

from classes.statistic_worker.statisticBaseClass import StatisticBaseClass
import MySQLdb
import datetime
from config.main import MINIMUM_DOMAIN_COUNT, PREFIX_LIST_ZONE


class RegistrantCountStatistic(StatisticBaseClass):

    def __init__(self, number: int, data: datetime, today: datetime, zone: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, "registrant_count_")
        self.today = today
        self.data = data
        self.zone_id = PREFIX_LIST_ZONE[zone]

    def _get_data(self, date: datetime) -> list:
        """
        В зависимости от дня статистики обращаемся или к domain_history или к domain
        :return:
        """
        cursor = self.connection.cursor(MySQLdb.cursors.DictCursor)
github AlexeyManikin / domain_statistic / classes / statistic_worker / nsDomainOldCountStatistic.py View on Github external
__author__ = 'Alexey Y Manikin'

from classes.statistic_worker.statisticBaseClass import StatisticBaseClass
import MySQLdb
import datetime
from config.main import MINIMUM_DOMAIN_COUNT, PREFIX_LIST_ZONE


class NsDomainOldCountStatistic(StatisticBaseClass):

    def __init__(self, number: int, data: datetime, today: datetime, zone: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, "ns_domain_old_count_")
        self.today = today
        self.data = data
        self.zone_id = PREFIX_LIST_ZONE[zone]

    def _get_data(self, number: int, date: datetime) -> list:
        """
        В зависимости от дня статистики обращаемся или к domain_history или к domain
        :return:
        """
        cursor = self.connection.cursor(MySQLdb.cursors.DictCursor)
github AlexeyManikin / domain_statistic / classes / statistic_worker / beget / begetRegistrantFromStatistic.py View on Github external
__author__ = 'Alexey Y Manikin'

from classes.statistic_worker.statisticBaseClass import StatisticBaseClass
import MySQLdb
import datetime


class BegetRegistrantFromStatistic(StatisticBaseClass):

    def __init__(self, number: int, data: datetime, today: datetime):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, 'beget_registrant_from')
        self.today = today
        self.data = data

    def _update(self):
        """
        :return:
        """
        date = self.data
        today = self.today
github AlexeyManikin / domain_statistic / classes / statistic_worker / beget / begetAsFromStatistic.py View on Github external
__author__ = 'Alexey Y Manikin'

from classes.statistic_worker.statisticBaseClass import StatisticBaseClass
import MySQLdb
import datetime
from config.main import PREFIX_LIST_ZONE


class BegetAsFromStatistic(StatisticBaseClass):

    def __init__(self, number: int, data: datetime, today: datetime, zone: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, 'beget_as_from')
        self.today = today
        self.data = data
        self.zone = PREFIX_LIST_ZONE[zone]

    def _update(self):
        """
        :type date: date
        :type today: date
        :type zone: unicode
        :return:
github AlexeyManikin / domain_statistic / classes / statistic_worker / provider / providerAsFromStatistic.py View on Github external
def create_table(provider: str):
        sql = """CREATE TABLE IF NOT EXISTS `%s_domain_as_from_count_statistic` (
                  `id` int(11) NOT NULL AUTO_INCREMENT,
                  `date` date NOT NULL,
                  `domain_name` varchar(256) DEFAULT NULL,
                  `as_from` int(11) NOT NULL,
                  `tld` tinyint(3) unsigned NOT NULL,
                  PRIMARY KEY (`id`),
                  KEY `date` (`date`),
                  KEY `domain_name` (`domain_name`)
                ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;""" % provider

        StatisticBaseClass.create_db_if_not_exist(sql)
github AlexeyManikin / domain_statistic / classes / statistic_worker / aCountStatistic.py View on Github external
def __init__(self, number: int, data: datetime, today: datetime, zone: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, "a_count_")

        self.today = today
        self.data = data
        self.zone_id = PREFIX_LIST_ZONE[zone]