Skip to content

Instantly share code, notes, and snippets.

View manashmandal's full-sized avatar
👨‍💻
Probably Coding || ! Probably Coding

Manash Kumar Mandal manashmandal

👨‍💻
Probably Coding || ! Probably Coding
View GitHub Profile
@manashmandal
manashmandal / store.md
Last active February 16, 2019 09:03
Bangladesh Electronics Store
# Day 0: Mean, Median, and Mode
# Selecting standard input
con <- file('stdin', open='r')
# We don't need the first input
data_line <- readLines(con)[[2]]
# splitting the data into individual string
split_data <- strsplit(data_line, " ")
@manashmandal
manashmandal / main.py
Created September 14, 2016 21:00
QTreeWidget with widgetitems
from PyQt5.QtWidgets import (QTreeWidget, QTreeWidgetItem, QPushButton, QLabel, QDialog, QVBoxLayout, QApplication, QLineEdit)
from PyQt5.QtCore import pyqtSlot
import sys
class TreeWidgetWithWidgetItems(QDialog):
def __init__(self):
super(TreeWidgetWithWidgetItems, self).__init__()
self.init_ui()
def init_ui(self):
@manashmandal
manashmandal / TreeWidgetButton.pro
Created September 14, 2016 20:49
QTreeWidget with Buttons and other widgets
#-------------------------------------------------
#
# Project created by QtCreator 2016-09-13T10:02:21
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@manashmandal
manashmandal / TreeWidgetButton.pro
Created September 13, 2016 10:17
Widget items on QTreeWidget
#-------------------------------------------------
#
# Project created by QtCreator 2016-09-13T10:02:21
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
from PyQt5.QtWidgets import QDialog, QProgressBar, QLabel, QHBoxLayout
from PyQt5.QtCore import pyqtSlot
class ProgressBar_Dialog(QDialog):
def __init__(self):
super(ProgressBar_Dialog ,self).__init__()
self.init_ui()
def init_ui(self):
# Creating a label
def on_changed_value(self, value):
self.changedValue.emit(value)
from PyQt5.QtWidgets import QSlider, QDialog, QLabel, QHBoxLayout
from PyQt5.QtCore import Qt, pyqtSignal
class Slider_Dialog(QDialog):
# Added a signal
changedValue = pyqtSignal(int)
def __init__(self):
from SliderDialog.Slider import Slider_Dialog
from ProgressDialog.Progress import ProgressBar_Dialog
import sys
from PyQt5.QtWidgets import QApplication
if __name__ == '__main__':
app = QApplication(sys.argv)
sd = Slider_Dialog()
pb = ProgressBar_Dialog()
sys.exit(app.exec_())
from PyQt5.QtWidgets import QSlider, QDialog, QLabel, QHBoxLayout
from PyQt5.QtCore import Qt, pyqtSignal
class Slider_Dialog(QDialog):
def __init__(self):
super(Slider_Dialog, self).__init__()
self.init_ui()
def init_ui(self):