Python Async Lambda: Exploring its Applications and Usage

As a Python developer, you might be familiar with lambda functions, which provide a simple and concise way to create anonymous functions. However, when it comes to asynchronous programming, you may wonder if it is possible to use async and await within lambda functions to create “async lambdas.” Currently, Python does not natively support async … Read more

How to Block A Specific URL on Windows (No Plugin, All Browsers)

πŸ˜… Would you say it’s possible to invest one minute now to instantly double your productivity? Watch out. The following trick can make you a productivity animal in no time. Here it is: πŸ‘‡ πŸ›‘ Block all websites that are not leading you towards your goal. Extremely simple but powerful nonetheless. Here’s how you do … Read more

Can I Run OpenAI’s API in Parallel? Yes, with Python Async!

If you’re like me, you’re using OpenAI API a lot in your Python code. So the natural question arises: “How to use OpenAI’s API asynchronously by issuing multiple requests at once?” I will give you my code for asynchronous OpenAI API requests for copy and paste below. But first, allow me to give you a … Read more

How Many Publications Does One Need to Get a Ph.D. in Computer Science?

The following answer is based on my experience as a doctoral researcher in distributed systems. Computer science is a big field with vast differences in the quality and quantity requirements of your Ph.D. supervisor. Having said this, you’ll probably need somewhere between two to five publications to get a Ph.D. in computer science. I have … Read more

Python Async Generator: Mastering Asyncio in Modern Applications

Asyncio Overview Asyncio is a Python library that allows you to write asynchronous code, providing an event loop, coroutines, and tasks to help manage concurrency without the need for parallelism.With asyncio, you can develop high-performance applications that harness the power of asynchronous programming, without running into callback hell or dealing with the complexity of threads. … Read more

[Book Review] Learn AI-Assisted Python Programming with GitHub Copilot and ChatGPT

I just got an early copy of Prof. Porter’s and Prof. Zingaro’s “Learn AI-Assisted Python Programming with GitHub Copilot and ChatGPT”. In this quick blog, I’ll share my 5-star review: ⭐⭐⭐⭐⭐ Programming in 2023 looks a lot different than programming in 2022. The transformational development of powerful large language models (LLMs) has brought new challenges … Read more

Python Async Requests: Getting URLS Concurrently via HTTP(S)

As a Python developer, you may often deal with making HTTP requests to interact with APIs or to retrieve information from web pages. By default, these requests can be slow and block your program’s execution, making your code less efficient. This is where Python’s async requests come to the rescue. Asynchronous HTTP requests allow your … Read more

How to Install Llama Index in Python

The LlamaIndex Python library is a mind-blowing 🀯 tool that lets you easily access large language models (LLMs) from your Python applications. Overview πŸ¦™ LlamaIndex is a powerful tool to implement the β€œRetrieval Augmented Generation” (RAG) concept in practical Python code. If you want to become an exponential Python developer who wants to leverage large … Read more

Python vs Go – Which Language Should You Choose in 2024

Both Python and Go are extremely relevant today. Both languages are widely used. Golang fans argue that people flock from Python to the newer and faster language Golang, also known as Go. Is this true? Not really. See this search volume comparison from Google Trends: πŸ‘‡ Go is a much newer language than Python, released … Read more

Python Async For: Mastering Asynchronous Iteration in Python

In Python, the async for construct allows you to iterate over asynchronous iterators, which yield values from asynchronous operations. You’ll use it when working with asynchronous libraries or frameworks where data fetching or processing happens asynchronously, such as reading from databases or making HTTP requests. The async for loop ensures that while waiting for data, … Read more

LlamaIndex Getting Started – Your First Example in Python

Install LlamaIndex with PIP Note that we assume you’re using OpenAI API. If you don’t want to use OpenAI, LlamaIndex automatically uses Meta’s Llama model. However, this would require roughly 12GB of your memory across GPU and CPU (at the time of writing) and run the Llama LLM models locally. πŸ§‘β€πŸ’» Tip: I recommend you … Read more