<commit_before># -*- coding: utf-8 -*-

# Define here the models for your spider middleware
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/spider-middleware.html

from scrapy import signals


_IP_INDEX_ = 0
IPS = [
"172.16.17.32:8080",
"192.168.3.11:3128",
"192.168.127.12:80",
"172.16.17.32:8080",
"172.16.58.3:808",
"172.16.58.3:8080",
"192.168.3.11:1189",
"192.168.3.11:808",
"172.16.17.32:8080",
"192.168.127.12:80",
]

class ScapyPrjSpiderMiddleware(object):
    # Not all methods need to be defined. If a method is not defined,
    # scrapy acts as if the spider middleware does not modify the
    # passed objects.

    @classmethod
    def from_crawler(cls, crawler):
        # This method is used by Scrapy to create your spiders.
        s = cls()
        crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
        return s

    def process_spider_input(response, spider):
        # Called for each response that goes through the spider
        # middleware and into the spider.

        # Should return None or raise an exception.
        return None

    def process_spider_output(response, result, spider):
        # Called with the results returned from the Spider, after
        # it has processed the response.

        # Must return an iterable of Request, dict or Item objects.
        for i in result:
            yield i

    def process_spider_exception(response, exception, spider):
        # Called when a spider or process_spider_input() method<commit_msg>add ip<commit_after># -*- coding: utf-8 -*-

# Define here the models for your spider middleware
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/spider-middleware.html

from scrapy import signals


_IP_INDEX_ = 0
IPS = [
"172.16.31.10:1189",
"192.168.3.11:8080",
"192.168.127.12:8081",
"172.16.31.10:8081",
"172.16.31.10:808",
"172.16.31.10:80",
"172.16.17.32:9999",
"172.16.31.10:80",
"172.16.17.32:1189",
"172.16.58.3:80",
"172.16.17.32:1189",
"172.16.58.3:8081",
"172.16.17.32:808",
"192.168.127.12:8080",
"172.16.17.32:8118",
"172.16.58.3:8080",
"192.168.3.11:80",
"192.168.3.11:9999",
"192.168.127.12:3128",
"192.168.3.11:8080",
"172.16.58.3:1189",
"172.16.31.10:8080",
"192.168.127.12:8080",
"172.16.17.32:9000",
"192.168.3.11:1189",
"172.16.58.3:80",
"172.16.31.10:8080",
"192.168.3.11:1189",
"192.168.127.12:808",
"172.16.58.3:8080",
"192.168.3.11:80",
"172.16.31.10:3128",
"192.168.127.12:9000",
"192.168.3.11:8080",
"172.16.17.32:8080",
"192.168.3.11:8998",
"172.16.58.3:8080",
"172.16.31.10:8080",
"192.168.127.12:8080",
"192.168.3.11:8998",
"192.168.127.12:9000",
"192.168.3.11:8998",
"172.16.31.10:8080",
"172.16.17.32:80",
"192.168.3.11:8000",
"172.16.58.3:8080",
"172.16.58.3:8080",
"172.16.17.32:8080",
"172.16.17.32:87",
"172.16.17.32:8080",
"192.168.3.11:3128",
"192.168.3.11:8080",
"172.16.31.10:808",
"172.16.58.3:8080",
"172.16.58.3:808",
"192.168.127.12:8080",
"192.168.127.12:808",
"172.16.17.32:808",
"172.16.17.32:8080",
"172.16.58.3:80",
"192.168.127.12:9000",
"192.168.3.11:1189",
"172.16.31.10:80",
"172.16.17.32:8888",
"172.16.31.10:80",
"172.16.58.3:808",
"192.168.3.11:8080",
"172.16.58.3:1189",
"172.16.31.10:808",
"172.16.17.32:8080",
"192.168.127.12:80",
"172.16.58.3:8080",
"172.16.17.32:1189",
"172.16.17.32:9000",
"192.168.3.11:3128",
"192.168.127.12:1189",
"192.168.127.12:3128",
"172.16.58.3:8080",
"192.168.3.11:808",
"172.16.58.3:1189",
"192.168.3.11:808",
"192.168.3.11:8080",
"172.16.17.32:8118",
"172.16.58.3:1189",
"172.16.31.10:8080",
"172.16.17.32:8080",
"192.168.3.11:80",
"192.168.127.12:8909",
"192.168.3.11:80",
"172.16.58.3:443",
"172.16.17.32:1189",
"172.16.17.32:8080",
"172.16.31.10:808",
"172.16.17.32:9001",
"172.16.31.10:8998",
"172.16.17.32:1189",
"192.168.127.12:1189",
"172.16.17.32:1189",
"192.168.127.12:8080",
"172.16.17.32:8080",
]

class ScapyPrjSpiderMiddleware(object):
    # Not all methods need to be defined. If a method is not defined,
    # scrapy acts as if the spider middleware does not modify the
    # passed objects.

    @classmethod
    def from_crawler(cls, crawler):
        # This method is used by Scrapy to create your spiders.
        s = cls()
        crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
        return s

    def process_spider_input(response, spider):
        # Called for each response that goes through the spider
        # middleware and into the spider.

        # Should return None or raise an exception.
        return None

    def process_spider_output(response, result, spider):
        # Called with the results returned from the Spider, after
        # it has processed the response.

        # Must return an iterable of Request, dict or Item objects.
        for i in result:
            yield i

    def process_spider_exception(response, exception, spider):
        # Called when a spider or process_spider_input() method
{'fraction_non_alphanumeric': 0.1934299122628035, 'fraction_numerical': 0.2864721485411141, 'mean_word_length': 3.3151408450704225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 110, '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': '4478398', 'n_tokens_mistral': 2932, 'n_tokens_neox': 2079, 'n_words': 392}