Udemy Course on using Celery in Python

I’ve signed up at Udemy to create a course on how to use Python with FastAPI and Celery. Celery is great for running async tasks in the background. I’ve used it in my projects to run offline tasks like sending emails, processing images, reports and more. FastAPI is a modern web framework for building APIs with Python 3.6+ based on standard Python type hints. It’s fast, easy to use and has great documentation.

Ollama

Ollama is aweome! I can now download and run AI models on my computer. I first installed Ollama. Then I downloaded the Llama 2 model. 1 ollama pull llama2 Kinda reminds me of Docker. 1 2 3 4 5 6 7 8 9 10 11 rohan@polaris ~> ollama run llama2 >>> What is BPE (Byte Pair Encoding)? Byte Pair Encoding (BPE) is a text representation technique used in natural language processing (NLP) and machine learning (ML) to reduce the dimensionality of text data.

Multilayer Perceptron Character-Level Language Model

Motivation This is a simple implementation of a Multilayer perceptron (MLP) character-level language model. The code and documentation directly follows Andrej Karpathy’s excellent YouTube video on the same topic. You can find the video here: https://www.youtube.com/watch?v=TCH_1BHY58I Andrej uses a database of people names, and then builds a model to generate new baby names. I will use a database of heavy metal band names, and my model will generate new band names :) You can download the dataset from here - https://github.

Tensors

What is a tensor? A tensor is a generalization of vectors and matrices and is easily understood as a multidimensional array. A tensor can be a number, a vector, a matrix, or any n-dimensional array. Examples 0-d tensor: scalar 1-d tensor: vector 2-d tensor: matrix 3-d tensor: cube n-d tensor: n-d array Rank The rank of a tensor is the number of dimensions present within the tensor. For example, the tensor [1, 2, 3] is a rank 1 tensor, while the tensor [[1, 2, 3], [4, 5, 6], [7, 8, 9]] is a rank 2 tensor.

Negative look-behind assertions

Regular expressions are very powerful. Here are some typical use cases: Email validation Password validation Searching for a pattern in a string Searching and capturing matches in a string In my current project, I needed to parse a CSV file and a particular field had a float value. This value could appear as any of the following: 0.678 0.003782 2e-08 1.456e-06 So it could either be a literal float or it could be in scientific notation.

I am like a dog barking

I am like a dog barking, and you are the one who is interpreting the spaces between the sounds and giving meaning to it. – UG Krishnamurti A few days ago there was a poll in Mumbai Mirror about how we should treat stray dogs. As you are aware, in Mumbai there are plenty of stray dogs everywhere. Some people love dogs and regularly give them food. Others are scared or disgusted and then blame it on the folks who give them food.

Mental Models

Three flaws We should avoid the following flaws in order to update our view on reality. In addition we also tend to undervalue the elementary ideas and overvalue the complicated ones. Simple ideas are of great value because they can help us prevent complex problems. Perspective It’s diffcult to get a perspective of the situation we are in. We have a hard time seeing any system that we are in. An outside world view is required, as well as understanding the perspective of others.