This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vehicle.py | |
from collections import namedtuple | |
class Vehicle: | |
def __init__(self, name, veh_type): | |
self.name = name | |
self.veh_type = veh_type | |
self.add_ons = [] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# password_generator_gui.py | |
import PySimpleGUI as sg | |
def main(): | |
layout = [ | |
[sg.Text("Password:"), sg.Input(size=(25, 1), key="-PASSWORD-")], | |
[ | |
sg.Text("Length:"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PIL import Image, ImageQt | |
from PyQt5.QtGui import QPixmap, QImage | |
from PyQt5.QtWidgets import QWidget, QLabel | |
from PyQt5.QtWidgets import QVBoxLayout, QApplication | |
class ImageViewer(QWidget): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# image_viewer.py | |
import io | |
import wx | |
class ImagePanel(wx.Panel): | |
def __init__(self, parent, image_size): | |
super().__init__(parent) | |
self.max_size = 240 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# kivy_image.py | |
from kivy.app import App | |
from kivy.uix.image import Image | |
class ImageViewer(App): | |
def build(self): | |
return Image(source="processed_flower.jpg") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
class MainFrame(wx.Frame): | |
def __init__(self): | |
wx.Frame.__init__(self, None, title='') | |
panel = wx.Panel(self) | |
self.statusbar = self.CreateStatusBar( | |
1, style=wx.STB_SIZEGRIP|wx.STB_ELLIPSIZE_END|wx.FULL_REPAINT_ON_RESIZE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# watermark_transparent.py | |
from PIL import Image | |
def watermark_with_transparency(input_image_path, output_image_path, | |
watermark_image_path, position): | |
base_image = Image.open(input_image_path) | |
watermark = Image.open(watermark_image_path) | |
width, height = base_image.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pathlib | |
import PySimpleGUI as sg | |
from PIL import Image, ImageTk | |
supported_image_types = [".png", ".jpg", "jpeg", ".tiff", ".bmp"] | |
elements = [ | |
[sg.Image(key="-IMAGE-")], | |
[ | |
sg.Text("Image Folder"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
class ImagePanel(wx.Panel): | |
def __init__(self, parent, image_size): | |
super().__init__(parent) | |
self.max_size = 240 | |
self.file_path = None | |
img = wx.Image(*image_size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
177 INFO: PyInstaller: 3.6 | |
178 INFO: Python: 3.8.2 | |
179 INFO: Platform: Windows-10-10.0.10586-SP0 | |
186 INFO: wrote C:\Users\mike\OneDrive\Documents\image_viewer_psg.spec | |
192 INFO: UPX is not available. | |
221 INFO: Extending PYTHONPATH with paths | |
['C:\\Users\\mike\\OneDrive\\Documents', 'C:\\Users\\mike\\OneDrive\\Documents'] | |
225 INFO: checking Analysis | |
229 INFO: Building Analysis because Analysis-00.toc is non existent | |
231 INFO: Initializing module dependency graph... |
NewerOlder