Skip to content

Instantly share code, notes, and snippets.

View Rizwan-Hasan's full-sized avatar
🌏
Working remotely

Rizwan Hasan Rizwan-Hasan

🌏
Working remotely
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1 align="center">Redirecting in <span id="countdown">10</span> seconds</h1>
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('localhost', 1080))
message = ''
while True:
msg = s.recv(1)
if len(msg) <= 0:
break
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(('localhost', 1080))
s.listen()
message = "Hello World"
message = bytes(message, "utf-8")
while True:
@Rizwan-Hasan
Rizwan-Hasan / dark_fusion.py
Last active February 25, 2020 18:32 — forked from lschmierer/dark_fusion.py
Qt5 Dark Fusion Palette for Python
qApp.setStyle(QStyleFactory.create("Fusion"))
darkPalette = QPalette()
darkColor = QColor(45, 45, 45)
disabledColor = QColor(127, 127, 127)
darkPalette.setColor(QPalette.Window, darkColor)
darkPalette.setColor(QPalette.WindowText, Qt.white)
darkPalette.setColor(QPalette.Base, QColor(40, 40, 40))
darkPalette.setColor(QPalette.AlternateBase, darkColor)
@Rizwan-Hasan
Rizwan-Hasan / pyside2_qrunnable_signal_test.py
Created February 21, 2020 10:33 — forked from dalejfer/pyside2_qrunnable_signal_test.py
Run a QTheadPool with signal emitting QRunnable workers. Capture the signals in the main thread and update the UI.
#!python3.7
import random
import time
import PySide2
from PySide2 import QtCore, QtWidgets
from PySide2.QtCore import Slot, Signal, QObject, QThreadPool, QRunnable
class MyEmitter(QObject):
import cx_Oracle
def main():
# Variables
username: str = "HR"
password: str = "<YOUR_PASSWORD>"
host: str = "localhost"
service: str = "XE"
# Connection establishing
import cx_Oracle
def main():
# Variables
username: str = "HR"
password: str = "<YOUR_PASSWORD>"
host: str = "localhost"
service: str = "XE"
# Connection establishing
import cx_Oracle
def main():
# Variables
username: str = "HR"
password: str = "<YOUR_PASSWORD>"
host: str = "localhost"
service: str = "XE"
# Connection establishing
import cx_Oracle
def main():
# Variables
username: str = "HR"
password: str = "<YOUR_PASSWORD>"
host: str = "localhost"
service: str = "XE"
# Connection establishing
{
"students": [
{
"id": 101,
"name": "Rizwan Hasan",
"age": 21,
"department": "CSE",
"sex": "Male",
"paid": true,
"cgpa": 2.13