1. Python / Говнокод #26091

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    import random
    
    UPCHK = ["СЕМ", "ОДИН", "БЛЭЦК", "ОЛОЛО", "БЖЫБЖА", "ЖУЧЛО", "ВЗДРЪЖНИ ЭФФЕКТ", "ВИДЕ", "ДВА МРЕОКЛЯ", "ДЕНИСЕ", "ДУПЯЧКА", "ГЛАГНЕ", "ГЛАНДЭ", "ГАЛАКТЕКО ОПАСНОСТЕ", "ЖАЖА", "ЕБИ ГУСЕЙ, СУКА!!11111", "ЖЕПЬ ЕБРИЛО", "ЖНЕЖНЕ", "ЖРАЧНЕ", "ПЯПЯЩЬ", "ЖЫВТОНЕ", "ЖУЙЧНИ", "ЖИВЛОБАРЕ", "ЖЪРЧИК", "ЗАРЯД УПЯЧКИ", "КЕЙГУШЕГИ", "КОЛЛАЙДРЕ", "КОТЭ", "КРАБЕ", "КРЕО", "ЛЕОНИДЕ", "ЛУЧИ ПОНОСА", "МЖВЯЧНИ", "ОНОТОЛЕ", "ПЯНИ", "ОТАКЕ!!!!1111", "ОЯЕБУ", "ПЕПЯКА", "ПЕПЯКОДЭНС", "ПЕПЯКОМЭН", "ПОПЯЧТСА", "ПОТС ЗОХВАЧЕН", "ПРДУНЬ-ПРДУНЬ", "ПТСО", "ПЫЩЬ!!!!111одинодин1", "РАЗУПЛОТНЕНИЕ", "РАЗРАЗИ МЕНЯ КРОТЫ", "РИАЛЬНИ", "САКИРМАХРЕПЯКА", "СКОЛОПЕНДРЕ", "СМОТРИ БАЛЕТ, СУКА!1", "СУЧЕЧКЕ", "С. Р. У!!!", "СТОПИЦОТ", "ТУПАК", "ТУТСЯ", "УГ", "ХУРЬ", "ХУЙС", "ЧАКЕ", "ЧОЧО", "ЧОЧОЧКИ", "ЧПЯКИ-ЧПЯКИ", "ШМЕЛЕ", "ЩАЧЛО КАРПА", "ЭЕКСТЕЛР ТЫЕОЙ ЯЕБАНЕЙУ КОТУ", "GSOM", "ЧЯПЬ-ЧЯПЬ", "ЪЖСЛО", "ЪЕЧОЖЖА", "ЪПРШУТЕ", "ЬШТУК", "ШТЫРНЕ", "ЯСХИЩАЧУ", "ГЪЛБЬ", "СГОМОНЬ", "JEPEBRILO", "АБЗЪДУКА", "АНГАНАСЕ", "АНТИКРАБЕРИАЛЬНЕ ЪМЛО", "БЖНИ", "БЖНИНА", "БЖНЬТУКИ", "БЛЪВАРИЯ", "БЪРЩЕ", "ВЪРДКЭ", "ГЖЪН’КИ", "ГАЗОДОРЫЖНИ", "ЖВЯЧНИ", "ЖРАЧНЕ", "ЖУЙЧНИ", "ЖЪРЧИК", "ЖЛЯЦНИ", "КВИТКИ ПИЖМЫ", "КРАКЛЕ", "МЕНСТО", "МРАЗЬ", "МУРА", "МЭБЛНИ", "НОКЛА", "ОГУДОРОПОМИРЕЦ", "ПДКЯЖЦЫ", "ПРЯСНО СВИНСКО", "ПЪДГРЪЗНИ", "ПЪРЖОЛИ", "ПЫЩИНЪ", "КВАСОЭ", "ПЯНИ", "РЪГАЕЛЛО", "СГУЩНИ МОЛОЛО", "СКЛИВЗЧНЕ МАСЛОЭ", "СТРИТ ФАЙТРЕ", "СЪРНЕ", "ТЪШНИК", "ХЛЯПНИ", "LЪЙS", "ЧИСПЫ", "ЧЯПИЙ", "ЩЯЩЬ-ЩЯЩЬ", "ШТЫРНЕ", "ЪТСО", "ЪПШРОТЭ", "ЫРЧНИ"]
    def upchka(u, sigma, words=100):
        res = []
        for word in [random.choice(UPCHK) for _ in range(words)]:
            res += [word for _ in range(max(abs(int(random.normalvariate(u, sigma))), 1))]
        return ' '.join(res)
    
    upchka(1, 3, 100)

    ЖЕПЬ ЕБРИЛО ЖЕПЬ ЕБРИЛО ЩАЧЛО КАРПА ПЫЩЬ!!!!111одинодин1

    gost, 11 Декабря 2019

    Комментарии (55)
  2. Python / Говнокод #26052

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    96. 96
    97. 97
    98. 98
    99. 99
    from datetime import datetime, timedelta
    from dateutil import parser
    import os
    import pytest
    
    from tests.db_support import psg_db
    
    
    intake_iot_mapper = [('sourceId', 'DEVICE_ID', str),
                         ('altitude', 'ALTITUDE', int),
                         ('odometer', 'ODOMETER', int),
                         ('battery', 'BATTERY_LEVEL', int),
                         ('speed', 'SPEED', int),
                         ('satCount', 'SAT_COUNT', float),
                         ('gpsQuality', 'GPSQUALITY', float),
                         ('lat', 'LAT', float),
                         ('lon', 'LON', float),
                         ('radius', 'RADIUS', int),
                         ('objectId', 'OBJECT_ID', str),
                         ('direction', 'DIRECTION', int)]
    
    
    @pytest.fixture(scope='module')
    def device_ids():
        sql_device = """SELECT
                          dvc.id,
                          dvc.source_id device_id,
                          dvc_m.object_id
                        FROM iot_platform.iot_device_mecomo dvc_m
                          JOIN iot_platform.iot_device dvc on dvc.id = dvc_m.id
                        WHERE dvc_m.object_id is not NULL ORDER BY dvc_m.object_id"""
    
        ids = psg_db(sql=sql_device)
    
        ids_dict = [(row['device_id'], row['id'], row['object_id']) for row in ids]
    
        return ids_dict
    
    
    @pytest.mark.parametrize('device_id, uuid, object_id', device_ids())
    @pytest.mark.parametrize('check_date', [str((datetime.now() - timedelta(days=1)).date())])
    def test_telemetry_all(device_id, uuid, object_id, get_intake_data, devices_list, get_iot_data, check_date, expect):
    
        _from = parser.parse(check_date)
        _to = _from + timedelta(hours=23, minutes=59, seconds=59)
    
        intake_from = _from.strftime('%Y/%m/%d %H:%M:%S')
        intake_to = _to.strftime('%Y/%m/%d %H:%M:%S')
    
        # take wider period from Dymano (+24 hours)
        dynamo_from = _from.timestamp()*1000
        dynamo_to = (_to + timedelta(hours=24)).timestamp()*1000
    
        xml_file_name = '%s/IntakeRaw/device_telemetry/telemetry_device_%s_%s.xml' % (os.path.dirname(__file__), device_id, _from.date())
    
        # write response data to file if there is no file saved
        if not os.path.isfile(xml_file_name):
    
            params = {'objectId': object_id, 'startIndex': 1, 'startDate': intake_from, 'endDate': intake_to}
            content = get_intake_data('positions_report', **params)
    
            # create dir, get intake data and write it to the file
            os.makedirs(os.path.dirname(xml_file_name), exist_ok=True)
            with open(xml_file_name, 'w') as f_xml:
                f_xml.write(content.decode('utf-8'))
    
        telemetry_in = devices_list(xml_file_name, 'POSITION')
        telemetry_out = get_iot_data(uuid, dynamo_from, dynamo_to, 'telemetry')
    
        # check if IOT data is empty but there are entries in the intake, go no further if this fails
        if telemetry_in:
            assert telemetry_out, \
                'Fail: empty data received for device %s, period %s - %s: Entries count: Intake %s != %s Dynamo DB' \
                % (uuid, dynamo_from, dynamo_to, len(telemetry_in), len(telemetry_out))
    
        for pos_id in telemetry_in:
            # check if the position id was saved in Dynamo
            if pos_id in telemetry_out:
                for key_out, key_in, to_type in intake_iot_mapper:
    
                    # check if the parameter is in the intake and it is not null
                    if key_in in telemetry_in[pos_id] and telemetry_in[pos_id][key_in] is not None:
    
                        if key_out in telemetry_out[pos_id]:
    
                            if key_in in ('LAT', 'LON'):
                                expect(
                                    to_type(telemetry_out[pos_id]['location'][key_out]) == to_type(float(telemetry_in[pos_id][key_in])),
                                    'Fail: position id %s, %s: in %s != %s out' % (pos_id, key_out, telemetry_in[pos_id][key_in],
                                                                                   telemetry_out[pos_id]['location'][key_out]))
                            else:
                                expect(str(telemetry_out[pos_id][key_out]) == telemetry_in[pos_id][key_in],
                                       'Fail: position id %s, %s: in %s != %s out' %
                                       (pos_id, key_out, telemetry_in[pos_id][key_in], telemetry_out[pos_id][key_out]))
    
                        else:
                            expect(key_out in telemetry_out[pos_id],
                                   'Fail: record time %s, device id: %s:%s: %s in %s != None %s out'
                                   % (pos_id, device_id, uuid, key_in, telemetry_in[pos_id][key_in], key_out))

    интеграционный тест одной тупой педовки

    gvkdgvkd, 27 Ноября 2019

    Комментарии (17)
  3. Python / Говнокод #26046

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    >>> from heapq import heappush, heappop
    >>> heap = []
    >>> data = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]
    >>> for item in data:
    ...     heappush(heap, item)
    ...
    >>> ordered = []
    >>> while heap:
    ...     ordered.append(heappop(heap))
    ...
    >>> ordered
    [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
    >>> data.sort()
    >>> data == ordered
    True

    В «Python» есть стандартный модуль «heapq» с процедурками, которые делают из обычного листа очередь с приоритетом: https://docs.python.org/3.8/library/heapq.html. Всё просто, понятно, удобно и без этих ваших «классов» с «наследованиями». Именно поэтому я за «Python».

    gost, 26 Ноября 2019

    Комментарии (32)
  4. Python / Говнокод #26017

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    Building on that example, the new syntax for function definitions would look like:
    
    def name(positional_only_parameters, /, positional_or_keyword_parameters,
             *, keyword_only_parameters):
    
    Therefore the following would be valid function definitions:
    
    def name(p1, p2, /, p_or_kw, *, kw):
    def name(p1, p2=None, /, p_or_kw=None, *, kw):
    def name(p1, p2=None, /, *, kw):
    def name(p1, p2=None, /):
    def name(p1, p2, /, p_or_kw):

    https://www.python.org/dev/peps/pep-0570

    3.14159265, 07 Ноября 2019

    Комментарии (201)
  5. Python / Говнокод #26010

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    x = 0; y = 0
     
    def gcd(a, b):
    #{
        global x, y
        if (a == 0):
        #{
            x = 0; y = 1;
            return b;
        #}
        d = gcd(b%a, a);
        t = x
        x = y - (b // a) * x;
        y = t;
        return d;
    #}
     
    #int main()
    #{
    #ios_base::sync_with_stdio(0); in.tie(0);
    #I n, p, w, d, dd, ww;
    #in >> n >> p >> w >> d;
    n, p, w, d = map(int, input().split())
    gc = gcd(d, w);
    dd = x; ww = y
    g = w * d // gc;
    if (p % gc):
        print(-1); exit(0)
    dd *= p // gc;
    ww *= p // gc;
    if (ww < 0):
    #{
        di = (-ww + g // w - 1) // (g // w);
        ww += g // w * di;
        dd -= g // d * di;
        if (dd < 0):
            print(-1); exit(0)
    #}
    elif (dd < 0):
    #{
        di = (-dd + g // d - 1) // (g // d);
        dd += g // d * di;
        ww -= g // w * di;
        if (dd < 0):
            print(-1); exit(0)
    #}
    if (ww < 0 or dd < 0):
        print(-1); exit(0)
    di = dd // (g // d);
    dd -= g // d * di;
    ww += g // w * di;
    if (ww + dd <= n):
        print(ww, dd, n - ww - dd)
    else:
        print(-1);
    #}

    Когда на соревновании по спортивному программированию пишешь код на C++ и внезапно понимаешь, что int64_t тебе недостаточно.

    fyodor95, 04 Ноября 2019

    Комментарии (52)
  6. Python / Говнокод #26001

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    import re, copy, json
    
    config = {}
    
    
    def domain_mapper(domain):
    	def injector(f):
    		if domain not in config:
    			config[domain] = []
    		config[domain].append(f)
    	return injector
    
    def default(f):
    	config['default'] = [f]
    	return f
    
    @domain_mapper("gmail.com")
    @default
    def google_filter(content):
    	regex = r"([^\!\?\.]*?offer.*?[\!\?\.])"
    	repl = r""
    	return re.sub(regex, repl, content, re.M)
    
    @domain_mapper("gmail.com")
    def another_google_filter(content):
    	return content
    
    @domain_mapper("yandex.ru")
    def yandex_filter(content):
    	regex = r"<img src=[\"'](.+?)[\"'].*/>"
    	repl = r"\1"
    	return re.sub(regex, repl, content, re.M)
    
    @domain_mapper("mail.ru")
    def mail_filter(content):
    	regex = r"<img src=[\"'](.+?)\.gif[\"'].*/>"
    	repl = r"<img src='\1.png'/>"
    	return re.sub(regex, repl, content, re.M)

    Говно или нет?

    miwomare, 28 Октября 2019

    Комментарии (85)
  7. Python / Говнокод #25986

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    class Container:
        def __init__(self, liquid):
            self.liquid = liquid
    
        def look_inside(self):
            return f"{self.liquid} in container"
    
        @classmethod
        def create_with(cls, liquid):
            return cls(liquid)
    
    
    class Bottle(Container):
        def look_inside(self):
            return f"bottle full of {self.liquid}"
    
    
    class Glass(Container):
        def look_inside(self):
            return f"A glass of {self.liquid}"
    
    
    for c in (c.create_with("beer") for c in [Glass, Bottle]):
        print(c.look_inside())

    ми маємо class polymorphism

    DypHuu_niBEHb, 23 Октября 2019

    Комментарии (8)
  8. Python / Говнокод #25909

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    with open("test.bmp","w+b") as f:
        f.write(b'BM')#ID field (42h, 4Dh)
        f.write((154).to_bytes(4,byteorder="little"))#154 bytes (122+32) Size of the BMP file
        f.write((0).to_bytes(2,byteorder="little"))#Unused
        f.write((0).to_bytes(2,byteorder="little"))#Unused
        f.write((122).to_bytes(4,byteorder="little"))#122 bytes (14+108) Offset where the pixel array (bitmap data) can be found
        f.write((108).to_bytes(4,byteorder="little"))#108 bytes Number of bytes in the DIB header (from this point)
        f.write((4).to_bytes(4,byteorder="little"))#4 pixels (left to right order) Width of the bitmap in pixels
        f.write((2).to_bytes(4,byteorder="little"))#2 pixels (bottom to top order) Height of the bitmap in pixels
        f.write((1).to_bytes(2,byteorder="little"))#1 plane Number of color planes being used
        f.write((32).to_bytes(2,byteorder="little"))#32 bits Number of bits per pixel
        f.write((3).to_bytes(4,byteorder="little"))#3 BI_BITFIELDS, no pixel array compression used
        f.write((32).to_bytes(4,byteorder="little"))#32 bytes Size of the raw bitmap data (including padding)
        f.write((2835).to_bytes(4,byteorder="little"))#2835 pixels/metre horizontal Print resolution of the image,
        f.write((2835).to_bytes(4,byteorder="little"))#2835 pixels/metre vertical   72 DPI × 39.3701 inches per metre yields 2834.6472
        f.write((0).to_bytes(4,byteorder="little"))#0 colors Number of colors in the palette
        f.write((0).to_bytes(4,byteorder="little"))#0 important colors 0 means all colors are important
        f.write(b'\x00\x00\xFF\x00')#00FF0000 in big-endian Red channel bit mask (valid because BI_BITFIELDS is specified)
        f.write(b'\x00\xFF\x00\x00')#0000FF00 in big-endian Green channel bit mask (valid because BI_BITFIELDS is specified)
        f.write(b'\xFF\x00\x00\x00')#000000FF in big-endian Blue channel bit mask (valid because BI_BITFIELDS is specified)
        f.write(b'\x00\x00\x00\xFF')#FF000000 in big-endian Alpha channel bit mask
        f.write(b' niW')#little-endian "Win " LCS_WINDOWS_COLOR_SPACE
        f.write((0).to_bytes(36,byteorder="little"))#CIEXYZTRIPLE Color Space endpoints	Unused for LCS "Win " or "sRGB"
        f.write((0).to_bytes(4,byteorder="little"))#0 Red Gamma Unused for LCS "Win " or "sRGB"
        f.write((0).to_bytes(4,byteorder="little"))#0 Green Gamma Unused for LCS "Win " or "sRGB"
        f.write((0).to_bytes(4,byteorder="little"))#0 Blue Gamma Unused for LCS "Win " or "sRGB"
        f.write(b'\xFF\x00\x00\x7F')#255 0 0 127 Blue (Alpha: 127), Pixel (1,0)
        f.write(b'\x00\xFF\x00\x7F')#0 255 0 127 Green (Alpha: 127), Pixel (1,1)
        f.write(b'\x00\x00\xFF\x7F')#0 0 255 127 Red (Alpha: 127), Pixel (1,2)
        f.write(b'\xFF\xFF\xFF\x7F')#255 255 255 127 White (Alpha: 127), Pixel (1,3)
        f.write(b'\xFF\x00\x00\xFF')#255 0 0 255 Blue (Alpha: 255), Pixel (0,0)
        f.write(b'\x00\xFF\x00\xFF')#0 255 0 255 Green (Alpha: 255), Pixel (0,1)
        f.write(b'\x00\x00\xFF\xFF')#0 0 255 255 Red (Alpha: 255), Pixel (0,2)
        f.write(b'\xFF\xFF\xFF\xFF')#255 255 255 255 White (Alpha: 255), Pixel (0,3)
        f.close()

    https://habr.com/ru/sandbox/125382/

    OCETuHCKuu_nemyx, 06 Октября 2019

    Комментарии (22)
  9. Python / Говнокод #25890

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    from xml.sax.saxutils import unescape
    
    HEADERS = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',
               'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
               'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
               'Accept-Language': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3'}
    
    GOOGLE_RE = re.compile(r'<h3 class="r"><a href="([^"]+)" ')
    YANDEX_RE = re.compile(r'<span class="serp-url__mark">.</span><a class="link serp-url__link" target="_blank" href="([^"]+)"')
    PROXY_RE = re.compile(r'(\d+\.\d+\.\d+\.\d+)[:\s]+(\d+)')
    
    def search_google(requests_list, qdr=None, interval=2):
        res = []
        qdr = 'd' if qdr is None or not qdr in ['w', 'd'] else qdr
        REQ_FORMAT = 'https://www.google.com/search?q={0}&num=100&tbs=qdr:' + qdr
        i = 0
    
        for term in requests_list:
            req = REQ_FORMAT.format(term)
            response = requests.get(req, headers=HEADERS)
            if response.status_code != 200:
                print ('Google returned {0}'.format(response.status_code))
                time.sleep(interval)
                continue
    
            txt = response.text
            found = GOOGLE_RE.findall(txt)
            res += found
            print ('done term {0}, found {1} URLs'.format(i, len(found)))
            i += 1
    
            time.sleep(interval)
    
        map(unescape, res)
        
        return res

    Древняя граббилка открытых прокси при помощи поисковых систем. Когда-то даже работала.

    gost, 01 Октября 2019

    Комментарии (29)
  10. Python / Говнокод #25872

    0

    1. 1
    2. 2
    3. 3
    4. 4
    def __repr__(self):
        return 'environ({{{}}})'.format(', '.join(
            ('{!r}: {!r}'.format(self.decodekey(key), self.decodevalue(value))
            for key, value in self._data.items())))

    {{впечатляйте{с{GNU/Python}}}}

    Stallman, 26 Сентября 2019

    Комментарии (62)