/r/madeinpython

Photograph via snooOG

A subreddit for showcasing the things you made with the Python language! Use us instead of flooding r/Python :)

Hey check out r/madeinjs for JavaScript and Typescript!

A subreddit for showcasing the things you made with the Python language! Use us instead of flooding r/Python :)

/r/madeinpython

23,671 Subscribers

1

my midjourney api didn't make it, but restarting with an open-source model

I worked with a friend on a midjourney api saas which worked really well, I had a lot of users at the beginning, but at some point I hit a wall beyond which I couldn't scale. one of the main issues is relying on a third-party (the official mj itself). also, they ban users after a few months so I don't see a straight path ahead at scale.

however, it still works for individual use, and that's why I've made the full backend code available, wrote about it here: https://mjapi.io/blog/midjourney-api-source-code/

what's more exciting is I'm pivoting to self-hosted open-source models (SD, flux etc.), this looks soooo simple and scalable in retrospect, you can craft some "internal" prompts to bump up the quality quite a lot

also you guys can AMA here about this

2 Comments
2025/01/29
20:30 UTC

3

Best practices for Python exception handling - Guide

The article below dives into six practical techniques that will elevate your exception handling in Python: 6 best practices for Python exception handling

  • Keep your try blocks laser-focused
  • Catch specific exceptions
  • Use context managers wisely
  • Use exception groups for concurrent code
  • Add contextual notes to exceptions
  • Implement proper logging
0 Comments
2025/01/28
10:45 UTC

2

3 Free Udemy Courses: Re-release!

Hi all, these all went in a few hours last time, so I'm posting some fresh coupon links as the Udemy sale has just ended.

Attached is my Beginner course, my brand new OOP course and my (little bit niche) Functional programming in Python course

If you get stuck or have any Q's, feel free to use the Q&A and I'll respond as quick as I can.

https://www.udemy.com/course/object-oriented-programming-in-python-3/?couponCode=OOPJAN2025

https://www.udemy.com/course/python-programming-for-the-total-beginner/?couponCode=BASICPYTHONJAN2025

https://www.udemy.com/course/functional-programming-with-python-comprehensions/?couponCode=FUNCJAN2025

Enjoy

2 Comments
2025/01/26
19:47 UTC

2

I made a web app that lets users curate product lists in python (Django)

It's https://shelve.in/

It's built using Django (python) mostly, and frontend is html, bootstrap, some custom CSS, and vanillaJS.

I made this for content creators so they can share amazon affiliated products.

Let me know what do you think of the site. Also, I added three sample posts in landing page so you can browse the site without registering.

0 Comments
2025/01/25
12:42 UTC

0

Medical Melanoma Detection | TensorFlow U-Net Tutorial using Unet

https://preview.redd.it/sqzebmnv1see1.png?width=1280&format=png&auto=webp&s=8e30081f79702575cf0cf594b19acc358544f292

This tutorial provides a step-by-step guide on how to implement and train a U-Net model for Melanoma detection using TensorFlow/Keras.

 🔍 What You’ll Learn 🔍: 

Data Preparation: We’ll begin by showing you how to access and preprocess a substantial dataset of Melanoma images and corresponding masks. 

Data Augmentation: Discover the techniques to augment your dataset. It will increase and improve your model’s results Model Building: Build a U-Net, and learn how to construct the model using TensorFlow and Keras. 

Model Training: We’ll guide you through the training process, optimizing your model to distinguish Melanoma from non-Melanoma skin lesions. 

Testing and Evaluation: Run the pre-trained model on a new fresh images . Explore how to generate masks that highlight Melanoma regions within the images. 

Visualizing Results: See the results in real-time as we compare predicted masks with actual ground truth masks.

 

You can find link for the code in the blog : https://eranfeit.net/medical-melanoma-detection-tensorflow-u-net-tutorial-using-unet/

Full code description for Medium users : https://medium.com/@feitgemel/medical-melanoma-detection-tensorflow-u-net-tutorial-using-unet-c89e926e1339

You can find more tutorials, and join my newsletter here : https://eranfeit.net/

Check out our tutorial here : https://youtu.be/P7DnY0Prb2U&list=UULFTiWJJhaH6BviSWKLJUM9sg

Enjoy

Eran

1 Comment
2025/01/23
17:20 UTC

1

How to Debug Python code in Visual Studio Code - Tutorial

The guide below highlights the advanced debugging features of VS Code that enhance Python coding productivity compared to traditional methods like using print statements. It also covers sophisticated debugging techniques such as exception handling, remote debugging for applications running on servers, and performance analysis tools within VS Code: Debugging Python code in Visual Studio Code

1 Comment
2025/01/20
06:24 UTC

1

The Tomb of Naarumsin (new roguelike game)

The Tomb of Naarumsin is a text-based roguelike with deep combat mechanics. Chop off your enemy's hands and they'll drop their weapons, slice off their feet and they'll fall over. Remove (all of) their head(s) and they'll die. Bleed them to death, poison them, light them on fire, it's up to you!

Each of the seven levels contains different types of foes, from vampire bats to limb regenerating trolls, entangling octopi, dangerous giant spiders with webs and poison, zombies, and mechanical enemies left over by the dwarves. You will need to examine your enemies closely to figure out their weaknesses if you want to survive.

Use magic to gain an edge on your foes. Some of the dozens of spells included are:

- Graft Limb: Lost a foot? Need an extra arm? Want a spare head? Simply graft an enemy's chopped off limb onto your own body.

- A Way Home: Opens a magical door to your apartment, with special rooms that you can decorate with the limbs and weapons of your defeated enemies.

- The Floor is Lava: burn off your enemy's feet, then burn up the rest of them once they fall over.

- Possess: take over an enemy's body and fight as them.

- Enthrall: force an enemy to fight on your side.

- Reincarnate: raise a dead enemy as a zombie! They can't hold weapons anymore but they can grapple very effectively.

- Summoning: summon creatures to fight on your side, each with unique abilities.

- Grow Fangs: grow vampiric fangs that heal you when they do damage (if the limb you target can bleed).

Download here: https://markemus.itch.io/the-tomb-of-naarumsin

Available for both Windows and Linux.

0 Comments
2025/01/17
12:13 UTC

7

3 Free Udemy Courses - Jan 25 release

10 Comments
2025/01/15
13:30 UTC

27

I made Codeflash - an AI optimizer that speeds up any Python code

3 Comments
2025/01/14
02:45 UTC

1

Front facing open web ui

Hello fellow coding enthusiasts! I've got an exciting project to share with you all, something that I believe will be a valuable resource for anyone passionate about Large Language Models (LLMs) and AI experimentation.

As an avid coder with a passion for exploring the latest technologies, I've been utilizing Ollama and Open Web UI to interact with various LLMs. Anticipating the arrival of my new powerful server equipped with multiple 24GB VRAM cards, I embarked on a mission to streamline access to these LLMs and create a collaborative environment.

My goal was to make it easier for my friends and fellow enthusiasts to access and experiment with these models, especially those that require more computational power than your average local setup. With the help of a buddy, we've developed a solution that I'm thrilled to share with you all!

I've created a repository on GitHub, named 'Ngrok_url_display', which serves as a gateway to this exciting project. The repository provides a straightforward way to access and sign up for the UI, making it a breeze to get started. The main purpose of this endeavor is to offer a FREE platform where you can run and explore some of the best LLMs out there.

Here's the deal: If you've got specific tool requirements or have your eyes set on a particular model, feel free to reach out to me directly. I'm open to suggestions and aim to cater to the community's needs. Keep in mind, though, that while my ambition is grand, I'm not a tech billionaire (yet!). So, I might not be able to keep the servers running 24/7 until I get my hands on that dedicated GPU rig I've been dreaming of.

Nevertheless, I'm excited to see what we can achieve together. This project is a labor of love, and I'm eager to hear your thoughts and feedback. Check out the repository at Ngrok_url_display and let me know what you think!

Happy coding, and here's to pushing the boundaries of AI accessibility!

P.S. Don't forget to star the repository if you find it useful, and feel free to contribute if you have ideas to make it even better!

0 Comments
2025/01/13
18:14 UTC

1

U-net Image Segmentation | How to segment persons in images 👤

https://preview.redd.it/d1mfejgnhmce1.jpg?width=1280&format=pjpg&auto=webp&s=368338a50c72ff96a9ff0fd313979aae0acb1afb

This tutorial provides a step-by-step guide on how to implement and train a U-Net model for persons segmentation using TensorFlow/Keras.

The tutorial is divided into four parts:

 

Part 1: Data Preprocessing and Preparation

In this part, you load and preprocess the persons dataset, including resizing images and masks, converting masks to binary format, and splitting the data into training, validation, and testing sets.

 

Part 2: U-Net Model Architecture

This part defines the U-Net model architecture using Keras. It includes building blocks for convolutional layers, constructing the encoder and decoder parts of the U-Net, and defining the final output layer.

 

Part 3: Model Training

Here, you load the preprocessed data and train the U-Net model. You compile the model, define training parameters like learning rate and batch size, and use callbacks for model checkpointing, learning rate reduction, and early stopping.

 

Part 4: Model Evaluation and Inference

The final part demonstrates how to load the trained model, perform inference on test data, and visualize the predicted segmentation masks.

 

You can find link for the code in the blog : https://eranfeit.net/u-net-image-segmentation-how-to-segment-persons-in-images/

Full code description for Medium users : https://medium.com/@feitgemel/u-net-image-segmentation-how-to-segment-persons-in-images-2fd282d1005a

You can find more tutorials, and join my newsletter here : https://eranfeit.net/

Check out our tutorial here :  https://youtu.be/ZiGMTFle7bw&list=UULFTiWJJhaH6BviSWKLJUM9sg

 

Enjoy

Eran

0 Comments
2025/01/12
20:29 UTC

2

E-commerce data analysis using python

https://youtu.be/61MELFJN0hk?si=a6yffWSMgckDQrOL

Exploratory data analysis in python with ecommerce dataset for beginners

0 Comments
2025/01/09
09:02 UTC

1

AMA with LMNT Founders! (NOT the drink mix)

0 Comments
2025/01/08
13:23 UTC

4

FastApi WebApp - Steam youtube review

Using fastapi and unicorn i made a simple webapp that lists your steam games and shows you gameplay videos of the games. It's a simple implementation of steam and youtube-s API-s.

I find it useful as i have a lot of games in library from the game bundles. The steam library and store pages usually don't have real gameplay videos and it's exhausting for me to copy the games name on YouTube and search for videos.

Hosting it as docker container inside VPS i have for some testing and i have nginx that is forwarding request to the container. Also have a gitlab ci script that updates the container whenever i do some changes on the main branch. I even bought some cheep domain for it.

https://steamyoutubereviews.online/

0 Comments
2025/01/05
20:29 UTC

1

Automatic toothbrushing timer using accelerometer and machine learning

0 Comments
2025/01/04
23:24 UTC

1

I made a Plotly Dash Sankey diagram to visualize where my property taxes are going. Link to code in the video description. Enjoy the Python discussion and sorry for using taxes as a real world example.

0 Comments
2025/01/04
19:05 UTC

8

Learn Python from scratch - 3 free Udemy courses

Hi all, i’m doing another release of my Udemy courses for free as the last one saw all the coupons used!

they all have coding exercises, quizzes and projects, and they’re ideal for people new to Python.

If you’re brand new i’d suggest doing the basic one, then the OOP one, followed by the functional one. Enjoy!

https://www.udemy.com/course/python-programming-for-the-total-beginner/?couponCode=BASICPYTHONDEC2024

https://www.udemy.com/course/object-oriented-programming-in-python-3/?couponCode=OOPPYTHONDEC2024

https://www.udemy.com/course/functional-programming-with-python-comprehensions/?couponCode=FUNCPYTHONDEC2024

cheers

James-

3 Comments
2024/12/25
11:38 UTC

6

RedShot: A library for automating Whatsapp Web interactions

Hi, this is my first python library so any and all feedback would be incredibly helpful!

Github Repo: https://github.com/akrentz6/redshot

What My Project Does

My project is an event-based python package that provides a selenium wrapper for automating WhatsApp Web workflows. It allows you to interact with WhatsApp Web to send and receive messages, search chats, and more.

Here's a short example to illustrate how it works:

from redshot import Client

client = Client()

@client.event("on_start")
def on_start():
    print("Client has started")
    client.stop()

client.run()

Target Audience

I initially created this project so a friend could get sent notifications when tickets were released to events on a whatsapp group chat. Here are some other use cases that I can see for this library:

  • Customer Support Automation
  • Notification systems
  • Data collection and surveys
  • Event Reminders
  • Chatbots

Comparison

There are several small projects on github that attempt to do the same thing but many are old and no longer work. Also, RedShot's event driven approach, which no other libraries have done, provides more functionality and is a user-friendly interface.

0 Comments
2024/12/22
22:12 UTC

0

U-net Medical Segmentation with TensorFlow and Keras (Polyp segmentation)

https://preview.redd.it/txiq1z7ohn7e1.png?width=1280&format=png&auto=webp&s=6b04938eb705916def1aa4a402093544ee047e50

This tutorial provides a step-by-step guide on how to implement and train a U-Net model for polyp segmentation using TensorFlow/Keras.

The tutorial is divided into four parts:

 

🔹 Data Preprocessing and Preparation In this part, you load and preprocess the polyp dataset, including resizing images and masks, converting masks to binary format, and splitting the data into training, validation, and testing sets.

🔹 U-Net Model Architecture This part defines the U-Net model architecture using Keras. It includes building blocks for convolutional layers, constructing the encoder and decoder parts of the U-Net, and defining the final output layer.

🔹 Model Training Here, you load the preprocessed data and train the U-Net model. You compile the model, define training parameters like learning rate and batch size, and use callbacks for model checkpointing, learning rate reduction, and early stopping. The training history is also visualized.

🔹 Evaluation and Inference The final part demonstrates how to load the trained model, perform inference on test data, and visualize the predicted segmentation masks.

 

You can find link for the code in the blog : https://eranfeit.net/u-net-medical-segmentation-with-tensorflow-and-keras-polyp-segmentation/

Full code description for Medium users : https://medium.com/@feitgemel/u-net-medical-segmentation-with-tensorflow-and-keras-polyp-segmentation-ddf66a6279f4

You can find more tutorials, and join my newsletter here : https://eranfeit.net/

Check out our tutorial here :  https://youtu.be/YmWHTuefiws&list=UULFTiWJJhaH6BviSWKLJUM9sg

 

Enjoy

Eran

0 Comments
2024/12/18
18:30 UTC

2

Genruler + Genstates - A dsl for rule engine and an experimental state-machine library utilizing it

I'm excited to share two new Python libraries I've been working on: Genruler and Genstates!

Genruler is a domain-specific language (DSL) for defining rules and state machines. It uses a Lisp-like S-expression syntax to express rules and state transitions. This makes it easy to define complex rules and state machines in a concise and readable way. One of the key benefits of Genruler is its ability to express lightweight logic directly within configuration files, making it a powerful tool for customizing system behavior.

Genstates is an experimental example project utilizing Genruler DSL to define state machines. It takes a dictionary-based definition of the state machine, where the transition rules are defined using Genruler DSL. This allows for a flexible and powerful approach to state machine design.

I'm still under development on these libraries, but I'm excited to share them with the community and get feedback. If you're interested in learning more, you can check out the following links:

I'd love to hear your thoughts and feedback!

0 Comments
2024/12/18
15:28 UTC

2

Threadly (Built 100% in Python) is Featured by Slack!

Super cool to see Threadly, an app for Slack that creates interactive and engaging messages for your Slack Connect channels be featured by Slack.

The app helps with attaching custom CTA buttons (which can open websites or built-in forms), mass-blasting, and so much more!

https://reddit.com/link/1hgt605/video/rlmwj96e5j7e1/player

0 Comments
2024/12/18
03:55 UTC

2

Escape From Castle Black- an EverRogue game (rogue-like)

You are a prisoner in the dungeons of an evil king. Every day you hear the screams when the king's servants torture the prisoners. Today it's finally your turn.

You knew this day would come, and luckily you prepared for it. You have a sharpened shiv you managed to make while you were waiting, and a friend smuggled you in a potion of stoneskin. But ready or not, it's time.

What My Project Does

Escape From Castle Black is a text-based rogue-like game written in Python. The engine, EverRogue, is open source, and because it uses procedural generation it can be used to generate your own rogue-like games with only a minimal amount of coding. It's good for both beginner Python programmers or for advanced coders who will be able to edit the engine itself.

Target Audience

Programmers and gamers, especially both! You can play through the included game, Escape From Castle Black, which is a fun game with some interesting twists. You can edit the game during runtime, because Python is awesome, so you can cheat in some very creative ways if you want to- really, everything is editable while you're playing. Or you can dive into game generation, which is well documented, and create your own game from scratch.

Comparison

EverRogue is inspired by Kyle's Quest, an old palm pilot game that allowed you to create your own levels. It also takes a lot of inspiration from Dwarf Fortress, which is what got me into coding in the first place. The combat in particular is very reminiscent of the combat in Dwarf Fortress adventure mode. But what really makes it stand out is the ability to write your own games from scratch. The code required is closer to creating config files than writing actual code- the procedural generation is very powerful. I think you'll have a lot of fun with it.

link to the source: https://github.com/markemus/engine/tree/master

0 Comments
2024/12/17
23:20 UTC

8

I am sharing Python & Data Science courses on YouTube

Hello, I wanted to share that I am sharing free courses and projects on my YouTube Channel. I have more than 200 videos and I created playlists for Python and Data Science. I am leaving the playlist link below, have a great day!

Python Data Science Full Courses & Projects -> https://youtube.com/playlist?list=PLTsu3dft3CWiow7L7WrCd27ohlra_5PGH&si=6WUpVwXeAKEs4tB6

Python Tutorials -> https://youtube.com/playlist?list=PLTsu3dft3CWgJrlcs_IO1eif7myukPPKJ&si=fYIz2RLJV1dC6nT5

1 Comment
2024/12/14
08:47 UTC

15

3 Free Udemy Courses - December Release

Hi all, seeing as my last post with these 3 courses led to all spaces filling up quickly, and Udemy courses are not on sale right now, I thought I'd generate some more free spaces, pretty useful if you want to start Python from scratch, learn functional code or learn OOP from scratch (or all 3!)

FYI: Only valid for the next 5 days!

https://www.udemy.com/course/python-programming-for-the-total-beginner/?couponCode=0BBB34FF2AB808789898

https://www.udemy.com/course/object-oriented-programming-in-python-3/?couponCode=10579ED6FCE853C84329

https://www.udemy.com/course/functional-programming-with-python-comprehensions/?couponCode=D5BA520B6BC7388F027C

4 Comments
2024/12/08
19:26 UTC

1

Build a CNN Model for Retinal Image Diagnosis

https://preview.redd.it/5vk0me9ngg5e1.jpg?width=1280&format=pjpg&auto=webp&s=3c01025d40dad625eae8c82c49b3a87a5e988bad

👁️ CNN Image Classification for Retinal Health Diagnosis with TensorFlow and Keras! 👁️

How to gather and preprocess a dataset of over 80,000 retinal images, design a CNN deep learning model , and train it that can accurately distinguish between these health categories.

What You'll Learn:

🔹 Data Collection and Preprocessing: Discover how to acquire and prepare retinal images for optimal model training.

🔹 CNN Architecture Design: Create a customized architecture tailored to retinal image classification.

🔹 Training Process: Explore the intricacies of model training, including parameter tuning and validation techniques.

🔹 Model Evaluation: Learn how to assess the performance of your trained CNN on a separate test dataset.

 

You can find link for the code in the blog : https://eranfeit.net/build-a-cnn-model-for-retinal-image-diagnosis/

You can find more tutorials, and join my newsletter here : https://eranfeit.net/

Check out our tutorial here : https://youtu.be/PVKI_fXNS1E&list=UULFTiWJJhaH6BviSWKLJUM9sg

 

Enjoy

Eran

 

#Python #Cnn #TensorFlow #deeplearning #neuralnetworks #imageclassification #convolutionalneuralnetworks #computervision #transferlearning

0 Comments
2024/12/07
16:44 UTC

1

just launched doc2exam - Full Self-Driving for exam prep and certs

hello everyone! just launched doc2exam on ProductHunt

a place to turn any material into live exams -- for students prepping or professors setting official certifications

ofc it's made in django for the backend

https://reddit.com/link/1h6e955/video/v6xr6la0mt4e1/player

5 Comments
2024/12/04
11:53 UTC

2

I have a brick-and-mortar small business that isn't doing too well, so we're going to invest in some local marketing. But I also decided to use Python Scrapy to help improve my website's SEO. I hope it can help someone else! Enjoy.

0 Comments
2024/11/30
18:00 UTC

93

Satellite view of Paris and its region I made using Landsat 8 data and Python (script in comment)

4 Comments
2024/11/27
08:29 UTC

5

QualityScaler 3.12 - image/video AI upscaler app

https://preview.redd.it/thokr57zo13e1.png?width=1212&format=png&auto=webp&s=1a7843729bc36e5ae57a1413ef304f39a6246bca

Qualityscaler is a Windows app powered by AI to enhance, upscale and de-noise photographs and videos.

QualityScaler 3.12 changelog.

▼ NEW

Video upscale STOP&RESUME
⊡ Now is possible to stop and resume the video upscale process at any time
⊡ When restarting (with same settings) the app will resume from the interrupted point
⊡ NOTE - If video temporary files are deleted, upscaling will start over again

User settings save
⊡ The app will now remember all the options of the user (AI model, GPU, GPU VRAM etc.)
⊡ NOTE - In case of problems, delete the file _UserPreference.json in Documents folder

AI multi-threading improvements
⊡ Optimized upscaling speed when using AI multi-threading
⊡ Is now possible to select up to 6 threads (6 video frames simultaneous)

Keep frames widget
⊡ Added new widget to choose whether to save upscaled video frames
⊡ Selecting “Enabled”, upscaled frames will not be deleted
⊡ This allows you to re-encode upscaled video with different extension without upscaling again

AI models update
⊡ Updated AI models using updated tools
⊡ Improved upscale quality
⊡ Improved GPU compatibility and upscaling performance

GPU Auto selection
⊡ Added new "Auto" option in GPU Widget
⊡ Selecting “Auto,” the app automatically choose the most powerful GPU in the PC
⊡ This solves a problem with GPU processing on notebooks with 2 GPUs

▼ BUGFIX / IMPROVEMENTS

FFMPEG audio passthrough
⊡ This feature allows audio to be processed without any alterations (lossless quality)
⊡ Supports multiple audio streams (when a video contains multiple audio tracks)
⊡ This function fix an issue where audio could not be applied to upscaled videos

Video upscale improvements
⊡ Improved video upscale stability and memory usage
⊡ Updated FFMPEG to version 7.1 (video encoding bugfix and performance improvements)
⊡ Now the app automatically removes the temp folder when the video upscale is finished

Video encoding improvements
⊡ Updated MoviePy to version 2.0
⊡ A long list of bugfixes and optimizations for video encoding

General improvements
⊡ Bug fixes, code cleaning, performance improvements
⊡ Updated dependencies

▼ NOTE

Nvidia GPUs optimizations
⊡ Is essential to enable Windows Hardware Accelerated GPU scheduling option
⊡ This option can dramatically improve upscale performance
⊡ Enable it in Windows 10 / Windows 11 settings > Graphic Settings menu

2 Comments
2024/11/25
13:01 UTC

Back To Top