Skip to content

Instantly share code, notes, and snippets.

@PaulleDemon
PaulleDemon / 1tikCommerce.md
Last active July 9, 2024 12:59
Tikcommerce concept prototype

TikCommerce

TikCommerce, is a conecept of providing a minute long video, instead of the traditional product display method cluttering the UI. With studies showing that video tends to bring 6 times more engagement and higher conversion rates, a minute long product video is the future of the E-Commerce.

This is submitted as part of Wix Studio challenge

Read more about TikCommerce

The code is licensed under GPL-3

@PaulleDemon
PaulleDemon / django-templates.md
Created June 19, 2024 04:58
Django themes and templates to supercharge Django development

Django themes and templates

Writing a django app from scratch has been a hassle, so if you are looking to speed up your web development check out Django templates by foxcraft.

It comes with responsive design, google reCAPTCHA, modern Admin dashboard and more. Read the features below

Demo

You can check out the demo website here

@PaulleDemon
PaulleDemon / index.md
Last active June 17, 2024 10:39
gist for html to delta conversion for quill js

Code for converting Html to delta for Quill editor in python

some of the attributes maybe missing or not correct. If you find any please feel free to notify me and update this gist

Below is the code for converting

from bs4 import BeautifulSoup, NavigableString

def convert_html_to_delta(html_string):
    soup = BeautifulSoup(html_string, "html.parser")
@PaulleDemon
PaulleDemon / firestore_validation.md
Last active November 14, 2023 15:17
Google Firestore data validation

This is a gist for data validation for cloud firestore nosql db.

Code for validation

The function takes 2 parameter a datastructure and data, the datastructure that contains all the validation fields such as minlength, default, required etc, it is as show in the Example datastructure. The data is the data passed by user that will be validated

def clean_data(data_structure, data, update=False):

    """
@PaulleDemon
PaulleDemon / FileTreeGenerator.py
Created August 5, 2022 06:37
walks through a specified directory listing all the files and folders in with indent.
# used to generate file overview
import os
ignore_dirs = ['.git']
ignore_files = ['.env']
def path_tree(root, inner=0):
for dir in os.listdir(root):
# print("DIR: ", root, dirs, files)
@PaulleDemon
PaulleDemon / PyPi Upload.md
Last active January 19, 2024 16:52
This is quick description to upload to PyPi
  • create setup.py file

Eg:

from setuptools import setup

with open("Readme.md", 'r') as f:
    long_description = f.read()

setup(
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QPushButton, QGridLayout
app = QApplication(sys.argv)
widget = QWidget()
grid_layout = QGridLayout()
label = QLabel("Sample label")
button = QPushButton("Button") # create an instance of QPushbutton
while True:
for event in event_queue:
if event == "quit":
break
elif event == "button_press":
update_button()
import sys
from PyQt5 import QtGui, QtWidgets
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
view = QtWidgets.QGraphicsView()
scene = QtWidgets.QGraphicsScene()