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

    Всего: 2

  2. Python / Говнокод #27981

    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
    def drawPoints(self, qp):
            pen = QPen()
            if self.flag1:
                color1 = QColor('red')
                pen.setColor(color1)
            if self.flag2:
                color2 = QColor('green')
                pen.setColor(color2)
            if self.flag3:
                color3 = QColor('yellow')
                pen.setColor(color3)
            if self.flag4:
                color4 = QColor('blue')
                pen.setColor(color4)
            if self.flag5:
                color5 = QColor('purple')
                pen.setColor(color5)
            if self.flag6:
                color6 = QColor('brown')
                pen.setColor(color6)
            if self.n_flag:
                pen.setWidth(5)
            if self.n_flag2:
                pen.setWidth(10)
            if self.n_flag3:
                pen.setWidth(15)
            if self.n_flag4:
                pen.setWidth(20)
            qp.setPen(pen)
            qp.drawPoint(QtCore.QPoint(self.point))
    
        def onClicked(self):
            self.flag1 = True
            self.update()
    
        def onClicked2(self):
            self.flag2 = True
            self.update()
    
        def onClicked3(self):
            self.flag3 = True
            self.update()
    
        def onClicked4(self):
            self.flag4 = True
            self.update()
    
        def onClicked5(self):
            self.flag5 = True
            self.update()
    
        def onClicked6(self):
            self.flag6 = True
            self.update()
    
        def onClicked7(self):
            self.n_flag = True
            self.update()
    
        def onClicked8(self):
            self.n_flag2 = True
            self.update()
    
        def onClicked9(self):
            self.n_flag3 = True
            self.update()
    
        def onClicked10(self):
            self.n_flag4 = True
            self.update()

    Больше onClicked БОЛЬШЕ

    ponos334, 31 Января 2022

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

    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
    def res_horizontal(self, btn):
            self.im = Image.open(self.new_img)
            if btn.text() == "320x240":
                self.new_im = self.im.resize((320, 240))
            elif btn.text() == '1024x600':
                self.new_im = self.im.resize((1024, 600))
            elif btn.text() == '1280x720':
                self.new_im = self.im.resize((1280, 720))
            elif btn.text() == '1440x900':
                self.new_im = self.im.resize((1440, 900))
            elif btn.text() == '1600x1024':
                self.new_im = self.im.resize((1600, 1024))
            elif btn.text() == '1920x1080':
                self.new_im = self.im.resize((1920, 1080))
            elif btn.text() == '2048x1536':
                self.new_im = self.im.resize((2048, 1536))
            elif btn.text() == '2560x1440':
                self.new_im = self.im.resize((2560, 440))
            elif btn.text() == '3840x2160':
                self.new_im = self.im.resize((3840, 2160))
            elif btn.text() == '4096x2160':
                self.new_im = self.im.resize((4096, 2160))
            elif btn.text == '800x480':
                self.new_im = self.im.resize((800, 480))
    
            self.new_im.save(self.new_img)
    
        def res_vertical(self, btn):
            self.im = Image.open(self.new_img)
            if btn.text() == '240x320':
                self.new_im = self.im.resize((240, 320))
            elif btn.text() == '480x800':
                self.new_im = self.im.resize((480, 800))
            elif btn.text() == '600x1024':
                self.new_im = self.im.resize((600, 1024))
            elif btn.text() == '720x1280':
                self.new_im = self.im.resize((720, 1280))
            elif btn.text() == '900x1440':
                self.new_im = self.im.resize((900, 1440))
            elif btn.text() == '1024x1600':
                self.new_im = self.im.resize((1024, 1600))
            elif btn.text() == '1080x1920':
                self.new_im = self.im.resize((1080, 1920))
            elif btn.text() == '1536x2048':
                self.new_im = self.im.resize((1536, 2048))
            elif btn.text() == '1440x2560':
                self.new_im = self.im.resize((1440, 2560))
            elif btn.text() == '2160x3840':
                self.new_im = self.im.resize((2160, 3840))
            elif btn.text() == '2160x4096':
                self.new_im = self.im.resize((2160, 4096))
    
            self.new_im.save(self.new_img)
    
        def res_square(self, btn):
            self.im = Image.open(self.new_img)
            if btn.text() == '320x320':
                self.new_im = self.im.resize((320, 320))
            elif btn.text() == '800x800':
                self.new_im = self.im.resize((800, 800))
            elif btn.text() == '1280x1280':
                self.new_im = self.im.resize((1280, 1280))
            elif btn.text() == '1024x1024':
                self.new_im = self.im.resize((1024, 1024))
            elif btn.text() == '1600x1600':
                self.new_im = self.im.resize((1600, 1600))
            elif btn.text() == '1440x1440':
                self.new_im = self.im.resize((1440, 1440))
            elif btn.text() == '1920x1920':
                self.new_im = self.im.resize((1920, 1920))
            elif btn.text() == '2048x2048':
                self.new_im = self.im.resize((2048, 2048))
            elif btn.text() == '3840x3840':
                self.new_im = self.im.resize((3840, 3840))
            elif btn.text() == '2560x2560':
                self.new_im = self.im.resize((2560, 2560))
            elif btn.text() == '4096x4096':
                self.new_im = self.im.resize((4096, 4096))
    
            self.new_im.save(self.new_img)

    Давным давно на pyqt писал этот говнокод, теперь ржу над ним

    ponos334, 31 Января 2022

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