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

The Universal Character Encoding Detector For Python

Chardet Python character encoding detector. Detects ASCII, UTF-8, UTF-16 (2 variants), UTF-32 (4 variants) Big5, GB2312, EUC-TW, HZ-GB-2312, ISO-2022-CN (Traditional and Simplified Chinese) EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP (Japanese) EUC-KR, ISO-2022-KR, Johab (Korean) KOI8-R, MacCyrillic, IBM855, IBM866, ISO-8859-5, windows-1251 (Cyrillic) ISO-8859-5, windows-1251 (Bulgarian) ISO-8859-1, windows-1252 (Western European languages) ISO-8859-7, windows-1253 (Greek) ISO-8859-8, windows-1255 (Visual and Logical Hebrew) TIS-620 (Thai) Note Our ISO-8859-2 and windows-1250 (Hungarian) probers have been temporarily disabled until we can retrain the models. Requires Python 3.6+. Installation Install […]

Read more

Docker can slow down your code and distort your benchmarks

One of the benefits of containers over virtual machines is that you get some measure of isolation without the performance overhead or distortion of virtualization. Docker images therefore seem like a good way to get a reproducible environment for measuring CPU performance of your code. There are, however, complications. Sometimes, running under Docker can actually slow down your code and distort your performance measurements. On macOS and Windows, for example, standard Linux-based Docker containers aren’t actually running directly on the […]

Read more

Issue #130 – Shared-Private Bilingual Word Embeddings for NMT

13 May21 Issue #130 – Shared-Private Bilingual Word Embeddings for NMT Author: Akshai Ramesh, Machine Translation Scientist @ Iconic Introduction In recent years, there has been a significant amount of research to improve the representation learning of neural machine translation (NMT). In today’s blog post, we will look at the work of Liu et al., 2019 who propose a novel approach called Shared-Private Bilingual Word Embeddings, to improve the word representations of NMT. Introduction A word representation is a mathematical […]

Read more
1 656 657 658 659 660 935