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

JSON:API support for Django REST framework

Overview JSON:API support for Django REST framework By default, Django REST framework will produce a response like: { “count”: 20, “next”: “http://example.com/api/1.0/identities/?page=3”, “previous”: “http://example.com/api/1.0/identities/?page=1”, “results”: [{ “id”: 3, “username”: “john”, “full_name”: “John Coltrane” }] } However, for an identity model in JSON:API format the response should look like the following: { “links”: { “prev”: “http://example.com/api/1.0/identities”, “self”: “http://example.com/api/1.0/identities?page=2”, “next”: “http://example.com/api/1.0/identities?page=3”, }, “data”: [{ “type”: “identities”, “id”: “3”, “attributes”: { “username”: “john”, “full-name”: “John Coltrane” } }], “meta”: { “pagination”: { “count”: […]

Read more

Deep learning with dynamic computation graphs in TensorFlow

TensorFlow Fold is a library for creating TensorFlow models that consume structured data, where the structure of the computation graph depends on the structure of the input data. For example, this model implements TreeLSTMs for sentiment analysis on parse trees of arbitrary shape/size/depth. Fold implements dynamic batching. Batches of arbitrarily shaped computation graphs are transformed to produce a static computation graph. This graph has the same structure regardless of what input it receives, and can be executed efficiently by TensorFlow. […]

Read more

Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy

Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy. Now with tensorflow 1.0 support. Evaluation usage import tfdeploy as td import numpy as np model = td.Model(“/path/to/model.pkl”) inp, outp = model.get(“input”, “output”) batch = np.random.rand(10000, 784) result = outp.eval({inp: batch}) Installation and dependencies    

Read more
1 460 461 462 463 464 943