AIML – A Language for Chatbots

This article was published as a part of the Data Science Blogathon. What is a Chatbot? Chatbots are intelligent digital assistants which may address customer’s basic and predictable queries. They offer numerous services via chatting and perform basic customer service operations. Chatbots work 24/7 and hence they provide assistance when offices are closed on holidays. There are a variety of synonyms for chatbot, including “talkbot,” “bot,” “IM bot,” “interactive agent” or “artificial conversation entity.“ Most organizations have already started implementing […]

Read more

Turn xarray timestacks into GIFs with python

GeoGIF Make GIFs from time-stacked xarray.DataArrays (time, [optional band], y, x), dead-simple. from geogif import gif, dgif gif(data_array) dgif(dask_data_array).compute() The “geo” part is a lie, actually. The arrays don’t have to be geospatial in nature. But I called it GeoGIF because: Wanting to animate a time-stack of imagery (like you’d get from stackstac) is a common task in the earth-observation/geospatial world. I think GeoGIF is a hilarious idea1. 1: To ruin the joke, it sounds like GeoTIFF, a ubiquitous geospatial […]

Read more

A Python library for the development of multimedia applications like video games

pygame pygame is a free and open-source cross-platform library for the development of multimedia applications like video games using Python. It uses the Simple DirectMedia Layer library and several other popular libraries to abstract the most common functions, making writing these programs a more intuitive task. Installation pip install pygame Help If you are just getting started with pygame, you should be able to get started fairly quickly. Pygame comes with many tutorials and introductions. There is also full reference […]

Read more

Imaging Library adds image processing capabilities to your Python interpreter

Pillow Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift. The Python Imaging Library adds image processing capabilities to your Python interpreter. This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities. The core image library is designed for fast access to data stored in a few basic pixel formats. It […]

Read more

Declaratively specify how to extract elements from a JSON document with python

JMESPath JMESPath (pronounced “james path”) allows you to declaratively specify how to extract elements from a JSON document. For example, given this document: {“foo”: {“bar”: “baz”}} The jmespath expression foo.bar will return “baz”. JMESPath also supports: Referencing elements in a list. Given the data: {“foo”: {“bar”: [“one”, “two”]}} The expression: foo.bar[0] will return “one”. You can also reference all the items in a list using the * syntax: {“foo”: {“bar”: [{“name”: “one”}, {“name”: “two”}]}} The expression: foo.bar[*].name will return [“one”, […]

Read more

A simple and extensible JSON encoder/decoder for Python

simplejson simplejson is a simple, fast, complete, correct and extensible JSON http://json.org encoder and decoder for Python 3.3+ with legacy support for Python 2.5+. It is pure Python code with no dependencies, but includes an optional C extension for a serious speed boost. simplejson is the externally maintained development version of the json library included with Python (since 2.6). This version is tested with the latest Python 3.8 and maintains backwards compatibility with Python 3.3+ and the legacy Python 2.5 […]

Read more

Emoji terminal output for Python

Emoji Emoji for Python. This project was inspired by kyokomi. Example The entire set of Emoji codes as defined by the unicode consortium is supported in addition to a bunch of aliases. By default, only the official list is enabled but doing emoji.emojize(use_aliases=True) enables both the full list and aliases. >> import emoji >> print(emoji.emojize(‘Python is :thumbs_up:’)) Python is 👍 >> print(emoji.emojize(‘Python is :thumbsup:’, use_aliases=True)) Python is 👍 >> print(emoji.demojize(‘Python is 👍’)) Python is :thumbs_up: >>> print(emoji.emojize(“Python is fun :red_heart:”)) […]

Read more

Predict an emoji that is associated with a text

Sentiment Analysis Sentiment analysis in computational linguistics is a general term for techniques that quantify sentiment or mood in a text. Can you tell from a text whether the writer is happy? Angry? Disappointed? Can you put their happiness on a 1-5 scale? Robust tools for sentiment analysis are often very desirable for companies, for example. Imagine that a company has just launched a new product GizmoX. Now the management wants to know how customers feel about it. Instead of […]

Read more

Train emoji embeddings based on emoji descriptions

emoji2vec This is my attempt to train, visualize and evaluate emoji embeddings as presented by Ben Eisner, Tim Rocktäschel, Isabelle Augenstein, Matko Bošnjak, and Sebastian Riedel in their paper. Most of their results are used here to build an equivalently robust model in Keras, including the rather simple training process which is solely based on emoji descriptions, but instead of using word2vec (as it was originally proposed) this version uses global vectors. Overview src/ contains the code used to process […]

Read more
1 641 642 643 644 645 920