Author name: Abdur-Rahmaan Janhangeer

Python-efl A Window

Python-EFL is a wrapper around the Enlightenment GUI kit. This series of tutorials is an update from the original author. Simple window Be sure to read first: How to install Python-efl on Ubuntu or Linux Mint ”’ Abdur-Ramaan Janhangeer Updated from Jeff Hoogland’s tutos for Python3.9 and Python-elf 1.25.0 https://www.toolbox.com/tech/operating-systems/blogs/py-efl-tutorial-1-hello-elementary-022415/ ”’ import efl.elementary as elm …

Python-efl A Window Read More »

Python: Making Imports Callable

I wanted to do import module module() I thought this did not exist in Python but Chris Angelico, a Python core dev showed me it existed! # importme.py import sys, types class Module(types.ModuleType): def __call__(self): print(“You called me!”) sys.modules[__name__].__class__ = Module # other_file.py import importme importme() Mind boggling!

How to install Python-efl on Ubuntu or Linux Mint

Python-efl is the binding for EFL, an awesome and performance-obcessed set of libraries. EFL stands for Enlightment Foundation Libraries. It was started for the Enlightment desktop project and developed into a set of libraries. This tutorial shows how to install python-efl. Install Instructions First create a new folder called efl_dev mkdir efl_dev cd efl_dev Then …

How to install Python-efl on Ubuntu or Linux Mint Read More »

How to solve celery task has no attribute AsyncResult

I was looking through Grinberg’s tuto on celery and flask. I saw querying tasks by task = long_task.AsyncResult(task_id) But for some reasons it was not working for me. I looked at Flower‘s get_task_by_id which led to wrapping a tornado object. It was too complicated for me to include Tornado in my project. I browsed through …

How to solve celery task has no attribute AsyncResult Read More »

How to get server response from DropzoneJs for chunk uploads

After much struggling, here’s the magical formula we got for getting the server response back for chunck uploads: var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone thumbnailWidth: 80, thumbnailHeight: 80, parallelUploads: 20, previewTemplate: previewTemplate, autoQueue: false, // Make sure the files aren’t queued until manually added previewsContainer: “#previews”, // Define …

How to get server response from DropzoneJs for chunk uploads Read More »

Machine Learning Part 12 Association Analysis

#12 association analysis Machine Learning ♡ supervised learning 👉 ♡ unsupervised learning ♡ reinforcement learning unsupervised learning is where your program has to find how the data relates to each other. there is no prior training types of unsupervised learning ♠️ clustering ♠️ association association analysis finds associations between items, like what customers usually buy …

Machine Learning Part 12 Association Analysis Read More »

Machine Learning Part 11 Unpervised Learning

#11 unsupervised learning Machine Learning ♡ supervised learning 👉 ♡ unsupervised learning ♡ reinforcement learning unsupervised learning is where your program has to find how the data relates to each other. there is no prior training types of unsupervised learning ♠️ clustering ♠️ association 🎲 clustering the k means (the distance-based) algorithm is used to …

Machine Learning Part 11 Unpervised Learning Read More »

Machine Learning Part 10 Naive Bayes

#10 naive bayes Machine Learning 👉♡ supervised learning ♡ unsupervised learning ♡ reinforcement learning recap: 🔖 types of supervised learning ✅ classification 📑 ✅ regression 📈 ✅ mixed ⚗ naive bayes classification ⚱ bayes theorem bayes theorem states that P(B|A) = (P(A|B) * P(B)) / P(A) Probability of B given A = … 🔎 naive …

Machine Learning Part 10 Naive Bayes Read More »

Machine Learning Part 9 Neural Networks

#9 neural networks Machine Learning 👉♡ supervised learning ♡ unsupervised learning ♡ reinforcement learning recap: 🔖 types of supervised learning ✅ classification 📑 ✅ regression 📈 ✅ mixed ⚗ – tree based – random forest – neural networks 🎈 – support vector machines neural networks neural networks require a bit of explanation. entire books can …

Machine Learning Part 9 Neural Networks Read More »

Machine Learning Part 8: Support Vector Machines

#8 support vector machines Machine Learning 👉♡ supervised learning ♡ unsupervised learning ♡ reinforcement learning recap: 🔖 types of supervised learning ✅ classification 📑 ✅ regression 📈 ✅ mixed ⚗ – tree based – random forest – neural networks – support vector machines 🎈 support vector machines (svm) 🔎 support vectors : read on to …

Machine Learning Part 8: Support Vector Machines Read More »

Daily Coding Problem Solution 4

This problem was asked by Stripe. Given an array of integers, find the first missing positive integer in linear time and constant space. In other words, find the lowest positive integer that does not exist in the array. The array can contain duplicates and negative numbers as well. For example, the input [3, 4, -1, 1] should …

Daily Coding Problem Solution 4 Read More »