Turning SymPy expressions into JAX functions

Turn SymPy expressions into parametrized, differentiable, vectorizable, JAX functions. All SymPy floats become trainable input parameters. SymPy symbols become columns of a passed matrix. Installation pip install git+https://github.com/MilesCranmer/sympy2jax.git Example import sympy from sympy import symbols import jax import jax.numpy as jnp from jax import random from sympy2jax import sympy2jax Let’s create an expression in SymPy: x, y = symbols(‘x y’) expression = 1.0 * sympy.cos(x) +

Read more

A shopping list and kitchen inventory management app

This is the backend for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github.com/appacademy-starters/python-project-starter.git Install dependencies pipenv install –dev -r dev-requirements.txt && pipenv install -r requirements.txt Create a .env file based on the example with proper settings for your development environment Setup your PostgreSQL user, password and database and make sure it matches your .env file Get into your pipenv, migrate your database, seed your database, and run your flask app To run the […]

Read more

Optimization for Oriented Object Detection via Representation Invariance Loss

By Qi Ming, Zhiqiang Zhou, Lingjuan Miao, Xue Yang, and Yunpeng Dong. The repository hosts the codes for our paper Optimization for Oriented Object Detection via Representation Invariance Loss (paper link), based on mmdetection and s2anet. Introduction To be updated. Installation conda create -n ridet python=3.7 -y source activate ridet conda install pytorch=1.3 torchvision cudatoolkit=10.0 -c pytorch pip install -r requirements.txt python setup.py develop cd mmdet/ops/orn python setup.py build_ext –inplace apt-get update apt-get install swig apt-get install zip cd DOTA_devkit […]

Read more

Pneumonia Detection using machine learning with PyTorch

Pneumonia Detection using machine learning. Training was done in colab: DEMO: Result (Confusion Matrix): Data I uploaded my dataset to kaggle I used a modified version of this dataset from kaggle. Instead of NORMAL and PNEUMONIA I split the PNEUMONIA dataset to BACTERIAL PNUEMONIA and VIRAL PNEUMONIA. This way the data is more evenly distributed and I can distinguish between viral and bacterial pneumonia. I also combined the validation dataset with the test dataset because the validation dataset only had […]

Read more

Rock, Paper, Scissors With Python: A Command Line Game

Game programming is a great way to learn how to program. You use many tools that you’ll see in the real world, plus you get to play a game to test your results! An ideal game to start your Python game programming journey is rock paper scissors. In this course, you’ll learn how to: Code your own rock paper scissors game Take in user input with input() Play several games in a row using a while loop Clean up your […]

Read more

Torch Containers simplified in PyTorch

This repository aims to help former Torchies more seamlessly transition to the “Containerless” world of PyTorch by providing a list of PyTorch implementations of Torch Table Layers. Note: As a result of full integration with autograd, PyTorch requires networks to be defined in the following manner: Define all layers to be used in the __init__ method of your network Combine them however you want in the forward method of your network (avoiding in place Tensor ops) And that’s all there […]

Read more

Crypto Telegram Bot With Python

Optional Add-on Coinbase Pro Portfolio Tracker https://github.com/whittlem/coinbaseprotracker An all-in-one view of all your Coinbase Pro portfolios. Highly recommended if running multiple bots and keeping track of their progress. Prerequisites When running in containers: a working docker/podman installation Python 3.9.x installed — https://installpython3.com (must be Python 3.9 or greater) % python3 –version Python 3.9.1 Python 3 PIP installed — https://pip.pypa.io/en/stable/installing % python3 -m pip –version pip 21.0.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) Installation Manual % git clone https://github.com/whittlem/pycryptobot % cd pycryptobot % […]

Read more

Sane and flexible OpenAPI 3 schema generation for Django REST framework

Sane and flexible OpenAPI 3.0 schema generation for Django REST framework. This project has 3 goals: Extract as much schema information from DRF as possible. Provide flexibility to make the schema usable in the real world (not only toy examples). Generate a schema that works well with the most popular client generators. The code is a heavily modified fork of the DRF OpenAPI generator, which is/was lacking all of the below listed features. Features Serializers modelled as components. (arbitrary nesting […]

Read more

Country-specific Django helpers, to use in Django Rest Framework

Country-specific serializers fields, to Django Rest Framework Documentation (soon) The full documentation is at https://django-rest-localflavor.readthedocs.org. Quickstart Install django-rest-localflavor: pip install django-rest-localflavor Then use it in a project: INSTALLED_APPS = ( # … ‘rest_framework’, ‘rest_localflavor’, ) GitHub https://github.com/gilsondev/django-rest-localflavor    

Read more
1 445 446 447 448 449 928