Unofficial PyTorch implementation of Attention Free Transformer (AFT) layers

aft-pytorch Unofficial PyTorch implementation of Attention Free Transformer’s layers by Zhai, et al. [abs, pdf] from Apple Inc. Installation You can install aft-pytorch via pip: pip install aft-pytorch Usage You can import the AFT-Full or AFT-Simple layer (as described in the paper) from the package like so: AFTFull from aft_pytorch import AFTFull layer = AFTFull( max_seqlen=20, dim=512, hidden_dim=64 ) # a batch of sequences with 10 timesteps of length 512 each x = torch.rand(32, 10, 512) y = layer(x) # […]

Read more

Simple, yet effective moderator bot for telegram

Samurai Telegram Bot Simple, yet effective moderator bot for telegram. With reports, logs, profanity filter and more :3 Personal bot, made for easy chat auto-moderation.Adds reporting functionality, profanity filtering (both english & russian languages are supported), logging system via private channel and much more!More of that, the bot code & functions can be easily extended and/or limited as you prefer. The code has NOT been polished and is provided “as is”. There are a lot of code that are redundant […]

Read more

Tool for pretty printing and optimizing Lightning Network channels

Suez Tool for pretty printing and optimizing Lightning Network channels. Installation Install poetry poetry install poetry run ./suez Channel fee policy You can set channel fees by passing –base-fee and –fee-rate parameters. For example: poetry run ./suez –base-fee 1000 –fee-rate 200 You can override the channel fee policy by changing the FeePolicy class. Example implementation does the following: sets lower fee rate for channels with mostly local balance sets higher fee rate for channels with mostly remote balance sets medium […]

Read more

Extract phrase in the given text that is used to express the sentiment

Extract phrase in the given text that is used to express the sentiment. Capturing sentiment in language is important in these times where decisions and reactions are created and updated in seconds. But, which words actually lead to the sentiment description? This project aims to solve this problem. Powered using Pytorch + hugggingface Try it out. git clone https://github.com/shahules786/twitter-emotions.git cd twitter-emotions sudo docker build –tag twitter-emotions:api . sudo docker run -p 9999:9999 -it twitter-emotions:api python twitteremotions/app.py Server will start running […]

Read more

Language Translation with Transformer In Python!

This article was published as a part of the Data Science Blogathon Introduction Natural Language Processing (NLP) is a field at the convergence of artificial intelligence, and linguistics. The aim is to make the computers understand real-world language or natural language so that they can perform tasks like Question Answering, Language Translation, and many more. NLP has lots of applications in different fields. 1. NLP enables the recognition and prediction of diseases based on electronic health records. 2. It is used […]

Read more

Efficient Vision Transformers with Dynamic Token Sparsification

DynamicViT This repository contains PyTorch implementation for DynamicViT. Created by Yongming Rao, Wenliang Zhao, Benlin Liu, Jiwen Lu, Jie Zhou, Cho-Jui Hsieh Model Zoo We provide our DynamicViT models pretrained on ImageNet: Usage Requirements torch>=1.7.0 torchvision>=0.8.1 timm==0.4.5 Data preparation: download and extract ImageNet images from http://image-net.org/. The directory structure should be │ILSVRC2012/ ├──train/ │ ├── n01440764 │ │ ├── n01440764_10026.JPEG │ │ ├── n01440764_10027.JPEG │ │ ├── …… │ ├── …… ├──val/ │ ├── n01440764 │ │ ├── ILSVRC2012_val_00000293.JPEG │ […]

Read more

A Python software implementation of the Intel 4004 processor

Pyntel4004 A Python software implementation of the Intel 4004 processor. General Information Two pass assembler using the original mnemonics, directives and comments syntax Monitor facility to step through code and examine registers, memory etc Design goals [ ] As much of the internals as possible should be carried out using binary arithmetic and operations. [ ] No 3rd party libraries to be used (i.e. pure Python). [ ] Build a fully-working i4004 opcode emulator. [ ] Build a fully-working assembler […]

Read more

Cryptocurrency Exchange Websocket Data Feed Handler with python

Cryptocurrency Exchange Feed Handler Handles multiple cryptocurrency exchange data feeds and returns normalized and standardized results to client registered callbacks for events like trades, book updates, ticker updates, etc. Utilizes websockets when possible, but can also poll data via REST endpoints if a websocket is not provided. Basic Usage Create a FeedHandler object and add subscriptions. For the various data channels that an exchange supports, you can supply callbacks for data events, or use provided backends (described below) to handle […]

Read more

Upgrade pip packages and automate Python Dependency Management

pipupgrade The missing command for pip. Features Updates system packages and local packages. Discovers packages present within multiple Python Environments. Updates packages mentioned within a requirements.txt file (Also pins up-to-date versions if mentioned). Smart requirements.txt detector. Pipfile support. Detects semantic version to avoid updates that break changes. Also ensures to avoidchild dependencies that break changes. View Dependency Graph. Parallel updates (blazingly fast). Python 2.7+ and Python 3.4+ compatible. Also pip 9+, pip 10+, pip 18+ and pip 19.0.1+ compatible. Automate […]

Read more

An interactive GUI for WhiteboxTools in a Jupyter-based environment

whiteboxgui The whiteboxgui Python package is a Jupyter frontend for WhiteboxTools, an advanced geospatial data analysis platform developed by Prof. John Lindsay (webpage; jblindsay) at the University of Guelph’s Geomorphometry and Hydrogeomatics Research Group. WhiteboxTools can be used to perform common geographical information systems (GIS) analysis operations, such as cost-distance analysis, distance buffering, and raster reclassification. Remote sensing and image processing tasks include image enhancement (e.g. panchromatic sharpening, contrast adjustments), image mosaicing, numerous filtering operations, simple classification (k-means), and common […]

Read more
1 600 601 602 603 604 919