SIMD-accelerated bitwise hamming distance Python module for hexidecimal strings

SIMD-accelerated bitwise hamming distance Python module for hexidecimal strings What does it do? This module performs a fast bitwise hamming distance of two hexadecimal strings. This looks like: DEADBEEF = 11011110101011011011111011101111 00000000 = 00000000000000000000000000000000 XOR = 11011110101011011011111011101111 Hamming = number of ones in DEADBEEF ^ 00000000 = 24 This essentially amounts to >>> import gmpy >>> gmpy.popcount(0xdeadbeef ^ 0x00000000) 24 except with Python strings, so >>> import gmpy >>> gmpy.popcount(int(“deadbeef”, 16) ^ int(“00000000”, 16)) 24 A few assumptions are made […]

Read more

A set of tools to analyse, modify or extend the Swiss synthetic population

A set of tools to analyse, modify or extend the Swiss synthetic population. Executive summary SynPopToolbox is a Python framework developed by the transport & mobility modelling team at the Swiss Federal Railways (SBB). It offers tools to pre-process, visualise and modify a synthetic population of Switzerland. The synthetic population for 2017 has been established through a joint effort from SBB and the Federal Office for Spatial Development ARE for transport and land-use modelling purposes. The project and applied methods […]

Read more

A tool to calculate a resulting color of the alpha blending process

This is a tool to calculate a resulting color of the alpha blending process. A gamma correction is enabled and the default transfer function is the one defined in sRGB. Usage Just enumerate colors from the bottom to the top. Let’s blend 75% black on pure white blec white black:0.75 blec fff 000000bf blec ffffffff [0,0,0,191] blec ffffff:1 [0,0,0]:0.75 Every call above does the same thing Installation pip3 install blec GitHub GitHub – igrmk/blec: Alpha blending calculator Alpha blending calculator. […]

Read more

Fused multiply-add (with a single rounding) for Python

Fused multiply-add for Python. Fused multiply-add computes (x*y) + z with a single rounding. Useful for dotproducts, matrix multiplications, polynomial evaluations (e.g., with Horner’s rule),Newton’s method for evaluating functions, convolutions, artificial neural networks etc. Use as import pyfma out = pyfma.fma(3.0, 2.0, 1.0) # 3.0*2.0 + 1.0 = 7.0 Also works with NumPy inputs: import numpy import pyfma x = numpy.random.rand(3, 4, 5) y = numpy.random.rand(3, 4, 5) z = numpy.random.rand(3, 4, 5) out = pyfma.fma(x, y, z) Built with […]

Read more

Parsing and validating request arguments: headers, arguments, cookies, files, json, etc

Sanic integration with Webargs. Parsing and validating request arguments: headers, arguments, cookies, files, json, etc. IMPORTANT: From version 2.0.0 webargs-sanic requires you to have webargs >=7.0.1. Please be aware of changes happened in version of webargs > 6.0.0. If you need support of webargs 5.x with no location definition, please use previous version(1.5.0) of this module from pypi. webargs is a Python library for parsing and validating HTTP request arguments, with built-in support for popular web frameworks. webargs-sanic allows you […]

Read more

A documentation injection tool for your classes when using Fast API

LuSyringe is a documentation injection tool for your classes when using Fast API Benefits The main benefit is being able to separate your business code (classes) from the logic of the documentation and pydantic validation. For example, a class that serves as a response for an endpoint may look like this without LuSyringe: class HealthResponse(BaseModel): ping: str = Field(…, example=”pong”) version: str = Field(…, example=”1.0.0″) And that’s not bad at first look, but the response class is tightly coupled of […]

Read more

How Long Does It Take to Learn Python?

You’ve probably found at least one blog post where the author reveals that they learned Python in a handful of days and quickly transitioned into a high-paying job. Some of these stories may be true, but they don’t help you prepare for a steady learning marathon. So, how long does it really take to learn Python, and is it worth your time investment? In this article, you’ll learn: What “learning Python” means and how you can measure your progress What […]

Read more

DeepConsensus uses gap-aware sequence transformers to correct errors in Pacific Biosciences Circular Consensus Sequencing data

DeepConsensus uses gap-aware sequence transformers to correct errors in PacificBiosciences (PacBio) Circular Consensus Sequencing (CCS) data. Installation From pip package pip install deepconsensus==0.1.0 You can ignore errors regarding google-nucleus installation, such as ERROR: Failed building wheel for google-nucleus. From source git clone https://github.com/google/deepconsensus.git cd deepconsensus source install.sh (Optional) After source install.sh, if you want to run all unit tests, you cando: ./run_all_tests.sh Usage See the quick start. Where does DeepConsensus fit into my pipeline? After a PacBio sequencing run, DeepConsensus […]

Read more

A tiny social network built with FastAPI and React+RxJs

A tiny social network (for bunnies), built with FastAPI and React+RxJs. Included features: :speech_balloon: chat :red_circle: online/offline friends status :abcd: “Is typing…” indicator :two_men_holding_hands: friend requests and suggestions :bell: notifications :postbox: posts :pencil: comments :scroll: conversations history :rabbit2: random profile picture generation :lock: authentication Tech stack: :snake: Python 3.8 + FastAPI :notebook_with_decorative_cover: PostgreSQL 13 + async SQLAlchemy (Core) + asyncpg driver :link: Neo4j graph db for relationships between users and fast queries :dart: Redis for caching and Pub/Sub :zap: Socket.IO […]

Read more
1 479 480 481 482 483 928