What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-30 17:11:29
creating a web page in python
import sys from PyQt5.QtWidgets import * class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.showMaximized() app = QApplication(sys.argv) QApplication.setApplicationName('My Cool Browser') wi... Add solution -
Python 2022-01-27 23:20:37
call class function by string python
#------------------------------------ #CLASS #------------------------------------ class Student: def __init__(self): self.name = None def set_name(self, word): self.name = word return self.get_name() def get_name(self): re... Add solution -
Python 2022-01-25 12:56:39
live stock market data python
import urllib.request import json class GoogleFinanceAPI: def __init__(self): self.prefix = "http://finance.google.com/finance/info?client=ig&q=" def get(self,symbol,exchange): ... Add solution -
Other 2022-01-24 22:36:35
qgis canvas as pyqt widget
from PyQt5 import QtCore, QtGui, QtWidgets from qgis.gui import QgsMapCanvas from qgis.core import QgsVectorLayer class Ui_MainWindow(object): def setupUi(self, MainWindow): self.main_window = MainWindow self.main_window.setObjectName... Add solution -
Python 2022-01-24 17:40:25
metaclass python
A metaclass is the class of a class. A class defines how an instance of the class (i.e. an object) behaves while a metaclass defines how a class behaves. A class is an instance of a metaclass. While in Python you can use arbitrary callables for metaclass... Add solution -
Python 2022-01-23 14:40:48
discord.py cog classes
from discord.ext import commands class Test_Cog(commands.Cog): def __init__(self, bot): self.bot = bot # defining bot as global var in class @commands.Cog.listener() # this is a decorator for events/listeners async def on_ready(self): ... Add solution -
Python 2022-01-22 19:40:46
python build a snapchat filter
import argparse import cv2 from imutils.video import VideoStream from imutils import face_utils, translate, resize import time import dlib import numpy as np parser = argparse.ArgumentParser() parser.add_argument("-predictor", required=True,... Add solution