Saving memory with Pandas 1.3’s new string dtype

When you’re loading many strings into Pandas, you’re going to use a lot of memory. If you have only a limited number of strings, you can save memory with categoricals, but that’s only helpful in a limited number of situations. With Pandas 1.3, there’s a new option that can save memory on large number of strings as well, simply by changing to a new column type. Let’s see how. Pandas’ different string dtypes Every pandas.Series, and every column in a […]

Read more

Python library for science observations from the James Webb Space Telescope

JWST Calibration Pipeline JWST requires Python 3.7 or above and a C compiler for dependencies. Linux and MacOS platforms are tested and supported. Windows is not currently supported. Installation The easiest way to install the latest jwst release into a fresh virtualenv or conda environment is pip install jwst Detailed Installation The jwst package can be installed into a virtualenv or conda environment via pip.We recommend that for each installation you start by creating a freshenvironment that only has Python […]

Read more

view RedFlagDeals.com from the command line in python

RFD This is a CLI utility that allows you to view RedFlagDeals.com on the command line. Motivation It is often faster to use a CLI than to load up a web page and navigate web elements. This tool can search for deals and sort them based on score and views. It is also able to load entire threads (without pagination) for additional analysis. Installation :information_source: python2 may still work but it is no longer supported. python3 -m pip install –user […]

Read more

An open-source multi-purpose Discord bot built with Discord.py and PostgreSQL

Wavy Wavy is an open-source multi-purpose Discord bot built with Discord.py and PostgreSQL. How to use Requirements: Then copy the .env.example file to .env and edit it using your preferred text editor. Afterwards install the required dependencies and start the bot using python3 -m pip install -r requirements.txt python3 main.py The aforementioned however is only to run the bot. You wil also need some way to configure it, like a web dashboard. Wavy’s web dashboard is located here. GitHub https://github.com/Wavy-Bot/bot […]

Read more

Python code for working with NFL play by play data

nfl_data_py nfl_data_py is a Python library for interacting with NFL data sourced from nflfastR (https://github.com/nflverse/nflfastR-data/) and nfldata (https://github.com/nflverse/nfldata/). Installation Use the package manager pip to install nfl_data_py. pip install nfl_data_py Usage import nfl_data_py as nfl Working with play-by-play data nfl.import_pbp_data(years, columns) Returns play-by-play data for the years and columns specified years : required, list of years to pull data for (earliest available is 1999) columns : optional, list of columns to pull data for nfl.see_pbp_cols() returns list of columns available […]

Read more

Minimal implementation of PAWS in TensorFlow

PAWS-TF Implementation of Semi-Supervised Learning of Visual Features by Non-Parametrically Predicting View Assignments with Support Samples (PAWS) in TensorFlow (2.4.1). PAWS introduces a simple way to combine a very small fraction of labeled data with a comparatively larger corpus of unlabeled data during pre-training. With its approach, it sets the state-of-the-art in semi-supervised learning (as of May 2021) beating methods like SimCLRV2, Meta Pseudo Labels that too with fewer parameters and a smaller pre-training schedule. For details, I recommend checking […]

Read more

Image Cropping on Twitter: Fairness Metrics, their Limitations

Image Crop Analysis Code for reproducing our analysis in the paper titled: Image Cropping on Twitter: Fairness Metrics, their Limitations, and the Importance of Representation, Design, and Agency This is a repo for the code used for reproducing our Image Crop Analysis paper as shared on our blog post. If you plan to use this code please cite our paper as follows: @ARTICLE{TwitterImageCrop2021, author = {{Yee}, Kyra and {Tantipongpipat}, Uthaipon and {Mishra}, Shubhanshu}, title = “{Image Cropping on Twitter: Fairness […]

Read more

Vision Transformer for Fast and Efficient Scene Text Recognition

deep-text-recognition-benchmark ViTSTR is a simple single-stage model that uses a pre-trained Vision Transformer (ViT) to perform Scene Text Recognition (ViTSTR). It has a comparable accuracy with state-of-the-art STR models although it uses significantly less number of parameters and FLOPS. ViTSTR is also fast due to the parallel computation inherent to ViT architecture. ViTSTR is built using a fork of CLOVA AI Deep Text Recognition Benchmark whose original documentation is at the bottom. Below we document how to train and evaluate […]

Read more
1 2 3 4 5 52