Python

OpenAI recently released its open-source Agents SDK. The documentation looked interesting, so I decided to give it a try. The SDK supports multiple agents working together using “handoffs”. The example I am using in today’s article involves 3 agents: 1) Agent who specializes in answering questions on Planetary positions 2) Agent who handles everything else […]

Agents and Agent frameworks are hot topics these days. LangChain, crewAI, LangGraph, Microsoft Semantic Kernel, and Microsoft Autogen are some of the popular agent frameworks. Smolagents is a relatively new entry in this arena. It is a lightweight agent framework from the well-known HuggingFace platform. In today’s article, I want to show how easy it […]

Is it possible to build a web application in Python to display (and evaluate) multiple-choice questions? Even more importantly, can we render “latex” equations as part of the MCQ? After briefly looking at NiceGUI, Flet, Solara, Trame, and Streamlit, I decided to go ahead with Streamlit to build this web app. Even though this was […]

In my earlier article, I had explained how natural language text describing a symptom can be converted to a formal “rubric” by using a vector database. In today’s article, I will show how this can be extended to support multiple symptoms in the input text with automatic repertorisation to identify potential remedies. Let us consider […]

In an earlier article I had explained how to execute Python code from within Common Lisp using “CLPython” package. In contrast to that approach, “Hy” is a Lisp-style language (not compatible with Common Lisp) that is embedded in Python and hence provides seamless interoperability with Python code. Installation is straightforward (it is usually a good idea to […]

The zip() function in Python is a convenient mechanism for iterating over multiple “iterables” in parallel. Looping over lists is a common scenario. Here is the output generated by the above code: Common Lisp does not have such a feature built into the language or as part of the standard library. Of course, we have […]

In the previous article, I explored the Deep Categorization capabilities of MeaningCloud. We saw how a powerful rule-based pattern matching language allowed us to map fragments of unstructured text to custom categories. In today’s post, I want to go through spaCy’s pattern matching capabilities. The version I am using is 2.0.13. Some newer features are available […]

Mathematica has had Python support since ver 11.2 through ExternalEvaluate[]. In ver 11.3 it was possible to input Python expression in a cell by beginning with “>” character. The good news is that Mathematica 12 has significantly enhanced this integration. Python Cells Let us start with the simplest way to use Python code in Mathematica. […]

I have been getting some good feedback on Azure’s Computer Vision API, in particular, the OCR functionality. Although I am not working on any project that requires this functionality at the moment, I thought it would be a good idea to check out the service – just to be “future ready”! This article is not […]

Identifying the predominant sentiment in unstructured text is used widely these days. There are several REST API services that allow you to submit a piece of text and get back the corresponding sentiment analysis. Meaningcloud, Aylien, Google’s Cloud Natural Language API, and IBM Natural Language Understanding Service are just a few. Emotion detection, especially from facial […]
Recent Comments