Skip to content

Instantly share code, notes, and snippets.

@Axel-Erfurt
Axel-Erfurt / audioplayer
Created Oct 18, 2021
PyQt5 Audio Player
View audioplayer
#!/usr/bin/python3
from PyQt5.QtCore import (pyqtSignal, QAbstractItemModel,
QFileInfo, QModelIndex, Qt, QTime, QUrl, QSettings)
from PyQt5.QtGui import QIcon
from PyQt5.QtMultimedia import (QMediaContent, QMediaMetaData, QMediaPlayer, QMediaPlaylist)
from PyQt5.QtWidgets import (QApplication, QFileDialog,
QHBoxLayout, QLabel, QListView, QMessageBox, QPushButton,
QSlider, QStyle, QToolButton, QVBoxLayout, QWidget, QStatusBar)
import os
@Axel-Erfurt
Axel-Erfurt / OlympiaLiveStreams
Created Jul 31, 2021
Olympia 2021 Tokio Livestreams
View OlympiaLiveStreams
ARD Olympia 1
https://ndrspezial-lh.akamaihd.net/i/spezial_1@430235/master.m3u8
ARD Olympia 2
https://ndrspezial-lh.akamaihd.net/i/spezial_2@430236/master.m3u8
ARD Olympia 3
https://ndrspezial-lh.akamaihd.net/i/spezial_3@430237/master.m3u8
ARD Olympia 4
https://ndrspezial-lh.akamaihd.net/i/spezial_4@430238/master.m3u8
ARD Olympia 5
https://ndrspezial-lh.akamaihd.net/i/spezial_5@430239/master.m3u8
View XAppStatusicon.py
#!/usr/bin/python3
import gi
gi.require_versions({'Gtk': '3.0','XApp': '1.0'})
from gi.repository import Gtk, XApp
import warnings
warnings.filterwarnings("ignore")
class MyStatusIconApp:
@Axel-Erfurt
Axel-Erfurt / QTableWidget_CSV
Created Jun 8, 2021
open / save CSV in QTableWidget
View QTableWidget_CSV
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from PyQt5.QtWidgets import (QMainWindow, QApplication,
QToolButton, QTableWidget,
QTableWidgetItem, QFileDialog, QStyle)
from PyQt5.QtCore import Qt, QSize
View hoerzuTagesprogramm.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import requests
import time
import locale
from datetime import date
import webbrowser
header = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><style type="text/css">
@Axel-Erfurt
Axel-Erfurt / CSV_Viewer_Gtk3.py
Last active Jul 21, 2021
CSV Viewer Gtk3 Python with Filter
View CSV_Viewer_Gtk3.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import gi
gi.require_version("Gtk", "3.0")
gi.require_version("Gdk", "3.0")
from gi.repository import Gtk, Gdk, GLib
@Axel-Erfurt
Axel-Erfurt / zenipyCSVViewer.py
Last active Jan 24, 2021
show CSV with zenipy
View zenipyCSVViewer.py
import zenipy
myfile = "/path/to/file.csv"
csv = open(myfile, "r").read().splitlines()
header = "\n".join(csv[:1])
columns = header.split("\t")
t = ""
View QuickPlayer.qml
import QtQuick 2.2
import QtQuick.Window 2.2
import QtMultimedia 5.0
import QtQuick.Controls 1.1
import QtQuick.Dialogs 1.0
ApplicationWindow {
id: window
flags: Qt.Window | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
visible: true
@Axel-Erfurt
Axel-Erfurt / PyQt5Notification.py
Created Dec 10, 2020
PyQt5 Notification Popup
View PyQt5Notification.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from PyQt5.QtWidgets import (QWidget, QApplication, QVBoxLayout, QPushButton,
QDesktopWidget, QLabel, QGridLayout, QMainWindow)
from PyQt5.QtCore import Qt, QTimer, QSize, QRect
from PyQt5.QtGui import QIcon
import sys
class Message(QWidget):
def __init__(self, title, message, parent=None):
View PyQt5BlackWindow.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from PyQt5.QtCore import QPoint, Qt
from PyQt5.QtWidgets import QApplication, QPlainTextEdit, QMainWindow, QLabel, QPushButton, QLineEdit
btn_size = 14
class MainWindow(QMainWindow):