Skip to content

Instantly share code, notes, and snippets.


Ahmed Fathy Ahmed7fathi

View GitHub Profile
View http status codes
1×× Informational
100 Continue
101 Switching Protocols
102 Processing
2×× Success
200 OK
201 Created
Ahmed7fathi /
Created Jan 30, 2020 — forked from bradtraversy/
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

Ahmed7fathi /
Created Jan 5, 2020 — forked from acbetter/
Image Viewer Example by PyQt5 and Python 3
# -*- coding: utf-8 -*-
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter
from PyQt5.QtPrintSupport import QPrintDialog, QPrinter
from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \
qApp, QFileDialog
Ahmed7fathi /
Created Jan 1, 2020 — forked from 345161974/
PyQt QTableView with CheckBox and Model Update demo code(PyQt 4.8.7, Python 3.4.3)
explore PyQT's QTableView Model
using QAbstractTableModel to present tabular data
allow table sorting by clicking on the header title
used the Anaconda package (comes with PyQt4) on OS X
Ahmed7fathi /
Created Jun 15, 2019 — forked from awesomebytes/
Make a function or method threaded in python with a decorator

How to make a python function or class method threaded

From this stack overflow question I got this great snippet.

# Threaded function snippet
def threaded(fn):
    """To use as decorator to make a function call threaded.
    Needs import
    from threading import Thread"""
Ahmed7fathi / konsole-with-palette-colours.css
Created May 26, 2019 — forked from codemedic/konsole-with-palette-colours.css
CSS for KDE Konsole minimal, lighter, dark tabs
View konsole-with-palette-colours.css
font-family: "Noto Sans";
font-size: 11px;
height: 16px;
padding: 2px;
border: 0px;
border-bottom: 3px solid palette(dark);
background-color: palette(dark);
Ahmed7fathi /
Created Apr 14, 2018 — forked from sloria/
WAV recording functionality using pyaudio
# -*- coding: utf-8 -*-
Provides WAV recording functionality via two approaches:
Blocking mode (record for a set duration):
>>> rec = Recorder(channels=2)
>>> with'blocking.wav', 'wb') as recfile:
... recfile.record(duration=5.0)
Non-blocking mode (start and stop recording):