1. Список говнокодов пользователя ISO

    Всего: 30

  2. JavaScript / Говнокод #28915

    +1

    1. 1
    React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED

    ISO, 18 Февраля 2024

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

    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
    import sys
    
    
    def do_govno(govno: str) -> None:
        pass
    
    
    def main() -> int:
        if len(sys.argv) != 2:
            print(f'Usage: {sys.argv[0]} <govno>')
            return EXIT_FAILURE
        
        govno = sys.argv[1]
        do_govno(govno)
        
        return EXIT_SUCCESS
    
    
    if __name__ == '__main__':
        exit_code = main()
        sys.exit(exit_code)

    ISO, 13 Февраля 2024

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

    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
    # Теперь нам нужны несколько изображений для выполнения
    # логического вывода. Давайте загрузим их с помощью wget.
    
    urls = [
        "https://mir-s3-cdn-cf.behance.net/project_modules/max_3840/2712bd29493563.55f6ec5e98924.jpg",
        "https://i.pinimg.com/736x/5a/8a/5c/5a8a5c4cd658580ae4719e5c96043541.jpg",
        "https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/4d222729493563.55f6420cd3768.jpg"
    ]
    downloaded_files = []
     
    for index, url in enumerate(urls, start=1):
      os.system(f"wget {url} -O pose-{index}.jpg")
      downloaded_files.append(f"pose-{index}.jpg")

    Датасаентист — не программист, и сегодня ему предстояла трудная ночь...

    https://habr.com/ru/articles/772558/

    ISO, 08 Ноября 2023

    Комментарии (15)
  5. C# / Говнокод #28877

    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
    string[] words = line.Split(' ');
    foreach (var word in words)
    {
        Console.Write(word);
        switch (word)
        {
            case "11":
                Console.WriteLine($"{tableEng[0, 0]}");
                break;
            case "12":
                Console.WriteLine($"{tableEng[0, 1]}");
                break;
            case "13":
                Console.WriteLine($"{tableEng[0, 2]}");
                break;
            case "14":
                Console.WriteLine($"{tableEng[0, 3]}");
                break;
            case "15":
                Console.WriteLine($"{tableEng[0, 4]}");
                break;
            case "21":
                Console.WriteLine($"{tableEng[1, 0]}");//
                break;
            case "22":
                Console.WriteLine($"{tableEng[1, 1]}");
                break;
            case "23":
                Console.WriteLine($"{tableEng[1, 2]}");
                break;
            case "24":
                Console.WriteLine($"{tableEng[1, 3]}");
                break;
            case "25":
                Console.WriteLine($"{tableEng[1, 4]}");
                break;
            case "31":
                Console.WriteLine($"{tableEng[2, 0]}");
                break;
            case "32":
                Console.WriteLine($"{tableEng[2, 1]}");
                break;
            case "33":
                Console.WriteLine($"{tableEng[2, 2]}");
                break;
            case "34":
                Console.WriteLine($"{tableEng[2, 3]}");
                break;
            case "35":
                Console.WriteLine($"{tableEng[2, 4]}");
                break;
            case "41":
                Console.WriteLine($"{tableEng[3, 0]}");
                break;
            case "42":
                Console.WriteLine($"{tableEng[3, 1]}");
                break;
            case "43":
                Console.WriteLine($"{tableEng[3, 2]}");
                break;
            case "44":
                Console.WriteLine($"{tableEng[3, 3]}");
                break;
            case "45":
                Console.WriteLine($"{tableEng[3, 4]}");
                break;
            case "51":
                Console.WriteLine($"{tableEng[4, 0]}");
                break;
            case "52":
                Console.WriteLine($"{tableEng[4, 1]}");
                break;
            case "53":
                Console.WriteLine($"{tableEng[4, 2]}");
                break;
            case "54":
                Console.WriteLine($"{tableEng[4, 3]}");
                break;
            case "55":
                Console.WriteLine($"{tableEng[4, 4]}");
                break;
        }
        
    }
    }
    Console.ReadLine();

    Дело IsBukva живёт.

    https://habr.com/ru/articles/771530/

    ISO, 03 Ноября 2023

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

    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
    arr=[]
    def play():
      a=""
      while a!="Игрок 1 победил" and a!="Игрок 2 победил":
          if 1 in list[0] or 1 in list[1] or 1 in list[2] or 1 in list[3] or 1 in list[4] or 1 in list[5] or 1 in list[6] or 1 in list[7]:
            print("\nИгрок 1 вводит координаты")
            letter=input()
            f(letter)
            arr.append(1)
          if 1 in list[0] or 1 in list[1] or 1 in list[2] or 1 in list[3] or 1 in list[4] or 1 in list[5] or 1 in list[6] or 1 in list[7]:
            print("\nИгрок 2 вводит координаты")
            letter=input()
            f(letter)
            arr.append(2)
          else:
            if arr[-1]==1:
              a="Игрок 1 победил"
            else:
              a="Игрок 2 победил"
          print(a)

    Давайте вспоминать былые деньки. И ЛАБЫ!

    ISO, 01 Октября 2023

    Комментарии (17)
  7. C# / Говнокод #28850

    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
    public readonly struct Int64 : IComparable<long>, IConvertible, 
    IEquatable<long>, IParsable<long>, ISpanParsable<long>, 
    System.Numerics.IAdditionOperators<long,long,long>, 
    System.Numerics.IAdditiveIdentity<long,long>, 
    System.Numerics.IBinaryInteger<long>, System.Numerics.IBinaryNumber<long>, 
    System.Numerics.IBitwiseOperators<long,long,long>, 
    System.Numerics.IComparisonOperators<long,long,bool>, 
    System.Numerics.IDecrementOperators<long>, 
    System.Numerics.IDivisionOperators<long,long,long>, 
    System.Numerics.IEqualityOperators<long,long,bool>, 
    System.Numerics.IIncrementOperators<long>, 
    System.Numerics.IMinMaxValue<long>, 
    System.Numerics.IModulusOperators<long,long,long>, 
    System.Numerics.IMultiplicativeIdentity<long,long>, 
    System.Numerics.IMultiplyOperators<long,long,long>, 
    System.Numerics.INumber<long>, System.Numerics.INumberBase<long>, 
    System.Numerics.IShiftOperators<long,int,long>, 
    System.Numerics.ISignedNumber<long>, 
    System.Numerics.ISubtractionOperators<long,long,long>, 
    System.Numerics.IUnaryNegationOperators<long,long>, 
    System.Numerics.IUnaryPlusOperators<long,long>

    https://learn.microsoft.com/en-us/dotnet/api/system.int64?view=net-7.0

    ISO, 18 Сентября 2023

    Комментарии (43)
  8. C# / Говнокод #28847

    0

    1. 1
    2. 2
    public ArgumentException (string? message, string? paramName);
    public ArgumentNullException (string? paramName, string? message);

    https://learn.microsoft.com/en-us/dotnet/api/system.argumentexception.-ctor?view=net-7.0#system-argumentexception-ctor(system-string-system-string)
    https://learn.microsoft.com/en-us/dotnet/api/system.argumentnullexception.-ctor?view=net-7.0#system-argumentnullexception-ctor(system-string-system-string)

    ISO, 15 Сентября 2023

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

    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
    @dataclass(slots=True)
    class Govno:
        govno_index: int
        
        def patch(self, indices_dict: Dict[int, int]) -> None:
            new_index = indices_dict[self.govno_index]
            self.govno_index = new_index
    
    
    @dataclass(slots=True)
    class Mocha:
        mocha_index: int
        
        def patch(self, indices_dict: Dict[int, int]) -> None:
            new_index = indices_dict[self.govno_index]
            self.govno_index = new_index

    Метод «patch» был скопипащен из класса «Govno» в класс «Mocha». Тайпчекер никаких ошибок не показывал; все типы были выведены корректно.

    А в рантайме всё упало, что и неудивительно!

    ISO, 13 Июня 2023

    Комментарии (42)
  10. JavaScript / Говнокод #28785

    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
    if (this.$arg0 == 'inc')    this.$ret = this.$math = args[0] + 1;
            if (this.$arg0 == 'dec')    this.$ret = this.$math = args[0] - 1;
            if (this.$arg0 == 'div')    this.$ret = this.$math = args[0] / args[1];
            if (this.$arg0 == 'ceil')   this.$ret = this.$math = Math.ceil(args[0]);
            if (this.$arg0 == 'floor')  this.$ret = this.$math = Math.floor(args[0]);
            if (this.$arg0 == 'sqrt')   this.$ret = this.$math = Math.sqrt(args[0]);
            if (this.$arg0 == 'exp')    this.$ret = this.$math = Math.exp(args[0]);
            if (this.$arg0 == 'log')    this.$ret = this.$math = Math.log(args[0]);
            if (this.$arg0 == 'sin')    this.$ret = this.$math = Math.sign(args[0]);
            if (this.$arg0 == 'log10')  this.$ret = this.$math = Math.log10(args[0]);
            if (this.$arg0 == 'cos')    this.$ret = this.$math = Math.cos(args[0]);
            if (this.$arg0 == 'tan')    this.$ret = this.$math = Math.tan(args[0]);
            if (this.$arg0 == 'acos')   this.$ret = this.$math = Math.acos(args[0]);
            if (this.$arg0 == 'atan')   this.$ret = this.$math = Math.atan(args[0]);
            if (this.$arg0 == 'round')  this.$ret = this.$math = Math.round(args[0]);
            if (this.$arg0 == 'atan2')  this.$ret = this.$math = Math.atan2(args[0]);

    Исходный код интерпретатора компилятора (!) Языка Программирования «AsmX».
    https://github.com/langprogramming-AsmX/AsmX/blob/main/compiler.js#L215

    ISO, 19 Мая 2023

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

    0

    1. 1
    AttributeError: type object 'datetime.datetime' has no attribute 'from_timestamp'. Did you mean: 'fromtimestamp'?

    ISO, 19 Марта 2023

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