I'm learning Flask from Miguel grinbergs forum but feel overwhelmed and don't know how to learn properly.
I'm stuck like the 5th chapter but not it just feels like I'm learning to learn i feel like I won't remember anything what did you guys do.
/r/flask
https://redd.it/1gobv5s
I'm stuck like the 5th chapter but not it just feels like I'm learning to learn i feel like I won't remember anything what did you guys do.
/r/flask
https://redd.it/1gobv5s
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
What programming language would you recommend I learn to make a inventory management/POS system for windows application and web based.
/r/flask
https://redd.it/1golss9
/r/flask
https://redd.it/1golss9
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
urlfor - rendertemplate generates .html
Hi everyone,
I'm currently having a big issue with Flask, and I can't seem to figure out what's going wrong. I've tried everything I can think of, but the problem persists. I'm hoping someone here can help me understand and fix this issue.
Problem Denoscription:
I have a Flask application with the following route definitions in my app.py:
pythonCode kopierenfrom flask import Flask, rendertemplate
app = Flask(name)
@app.route('/')
def index():
return rendertemplate('index.html')
@app.route('/blog')
def blog():
return rendertemplate('blog.html')
In my index.html template, I have a link that should direct users to the blog page:
<!-- index.html -->
<a href="{{ urlfor('blog') }}" class="xx">View Blog</a>
The Issue:
When I load the index page in the browser, the {{ url_for('blog') }} is being resolved to blog.html instead of /blog. This means the generated HTML looks like this:
<a href="blog.html" class="xx">View Blog</a>
So when I click on the link, it tries
/r/flask
https://redd.it/1goaanu
Hi everyone,
I'm currently having a big issue with Flask, and I can't seem to figure out what's going wrong. I've tried everything I can think of, but the problem persists. I'm hoping someone here can help me understand and fix this issue.
Problem Denoscription:
I have a Flask application with the following route definitions in my app.py:
pythonCode kopierenfrom flask import Flask, rendertemplate
app = Flask(name)
@app.route('/')
def index():
return rendertemplate('index.html')
@app.route('/blog')
def blog():
return rendertemplate('blog.html')
In my index.html template, I have a link that should direct users to the blog page:
<!-- index.html -->
<a href="{{ urlfor('blog') }}" class="xx">View Blog</a>
The Issue:
When I load the index page in the browser, the {{ url_for('blog') }} is being resolved to blog.html instead of /blog. This means the generated HTML looks like this:
<a href="blog.html" class="xx">View Blog</a>
So when I click on the link, it tries
/r/flask
https://redd.it/1goaanu
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
pipe-operator: Elixir's pipe operator in Python
TLDR: pipe-operator is an open-source python package which brings similar features to elixir's
\---
Hey there! Thought it might be of interest to some of you! I come from Python but lately I've been working with Elixir (mostly at work) and came to really enjoy its pipe operator
# What My Project Does
It provides similar features to elixir
As for those 2 very different implementation, they are:
A pythonic class-based one, which is fully compatible with linters and type-checkers
And an elixir-like one, with a syntax resembling elixir's, which will drive you linters mad
# Target Audience
I don't think anyone would be using this in production/work projects, but it can be a fun tool for developers' side projects who enjoy functional programming.
# Quick demo
Python implementation:
/r/Python
https://redd.it/1go69ha
TLDR: pipe-operator is an open-source python package which brings similar features to elixir's
|> tap then to Python, with 2 vastly different implementations. Because why not :D\---
Hey there! Thought it might be of interest to some of you! I come from Python but lately I've been working with Elixir (mostly at work) and came to really enjoy its pipe operator
|> and its related features like tap, then, and shortcut syntaxes. So I thought to myself: "could be fun to bring this to python". So I did, and the **pipe-operator** project was born.# What My Project Does
It provides similar features to elixir
|>, allowing you to chain operations without using intermediary variables. Through 2 very different implementations, you can pass the result of the previous expression as the first parameter of the next one.As for those 2 very different implementation, they are:
A pythonic class-based one, which is fully compatible with linters and type-checkers
And an elixir-like one, with a syntax resembling elixir's, which will drive you linters mad
# Target Audience
I don't think anyone would be using this in production/work projects, but it can be a fun tool for developers' side projects who enjoy functional programming.
# Quick demo
Python implementation:
/r/Python
https://redd.it/1go69ha
GitHub
GitHub - Jordan-Kowal/pipe-operator: Elixir's pipe operator in Python
Elixir's pipe operator in Python. Contribute to Jordan-Kowal/pipe-operator development by creating an account on GitHub.
I wrote some code that allow donations on a site. The first form allows you to input your email and the amount. The problem is in the first form I added the email and the amount to the db. But if I don't click pay in the second form the code is still added to the db. How do I fix this problem?
Here is the code.
app.py/routes.py
https://pastebin.com/NismhUbf
Here is the html. I did not include the success or failure page.
templates/stripe_payment/donations.html
https://pastebin.com/Hsr0YAVK
Here is a picture of the first form. https://imgur.com/a/ejBL7QL
Here is a picture of the second form https://imgur.com/a/Y98ahWu
models.py
https://pastebin.com/QU31ZCgi
forms.py + functions.py
https://pastebin.com/nFiCyYPQ
/r/flask
https://redd.it/1go9rtl
Here is the code.
app.py/routes.py
https://pastebin.com/NismhUbf
Here is the html. I did not include the success or failure page.
templates/stripe_payment/donations.html
https://pastebin.com/Hsr0YAVK
Here is a picture of the first form. https://imgur.com/a/ejBL7QL
Here is a picture of the second form https://imgur.com/a/Y98ahWu
models.py
https://pastebin.com/QU31ZCgi
forms.py + functions.py
https://pastebin.com/nFiCyYPQ
/r/flask
https://redd.it/1go9rtl
D How to visualize the effect of an LLM attention layer on a set of tokens with an image model
Is it possible to visualize how an LLM “imagines” a token before and after processing it through the attention layer by feeding the token embeddings into an image model? I understand you can't copy paste it over, but is there a way to capture the latent transformation caused by the attention layer and apply this transformation to the embedding space of an image model?
For example if i were to enter "poor man," into an LLM the embedding for "man" would shift toward "beggar" while entering "royal man" it could move closer to "king." I want to visualize that change. Then you could transfer the embedding for man to an image model and it would create the something like a beggar or a king in this example.
It could make a really cool visualization if you captured the transformation after each attention layer and made a video by interpolating each step.
/r/MachineLearning
https://redd.it/1gojg09
Is it possible to visualize how an LLM “imagines” a token before and after processing it through the attention layer by feeding the token embeddings into an image model? I understand you can't copy paste it over, but is there a way to capture the latent transformation caused by the attention layer and apply this transformation to the embedding space of an image model?
For example if i were to enter "poor man," into an LLM the embedding for "man" would shift toward "beggar" while entering "royal man" it could move closer to "king." I want to visualize that change. Then you could transfer the embedding for man to an image model and it would create the something like a beggar or a king in this example.
It could make a really cool visualization if you captured the transformation after each attention layer and made a video by interpolating each step.
/r/MachineLearning
https://redd.it/1gojg09
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
UK: Python Developer job market? Is it worth it?
So i’ve been looking at a change of career and one that i’m currently exploring is in the IT industry as a developer.
Python seems to be the starting point for newbs so going down that route.
Looking at jobs in the UK though and theres 100’s of applications for each role. Is it a diluted market?
With no degree, i’d be looking to build my knowledge over the next 12-24 months in Python and create a couple of programmes to add to a portfolio.
Would I have any chance of getting a job in the industry with that alone?
Whats the market like in the UK for other developers? Is it a nightmare trying to find a job?
Is it all worth it?! 😵💫
Any help would be appreciated! TIA
/r/Python
https://redd.it/1gos2hg
So i’ve been looking at a change of career and one that i’m currently exploring is in the IT industry as a developer.
Python seems to be the starting point for newbs so going down that route.
Looking at jobs in the UK though and theres 100’s of applications for each role. Is it a diluted market?
With no degree, i’d be looking to build my knowledge over the next 12-24 months in Python and create a couple of programmes to add to a portfolio.
Would I have any chance of getting a job in the industry with that alone?
Whats the market like in the UK for other developers? Is it a nightmare trying to find a job?
Is it all worth it?! 😵💫
Any help would be appreciated! TIA
/r/Python
https://redd.it/1gos2hg
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Building User Interfaces in a web app using Flask
Kindly visit the link to learn the building blocks for a web app in Flask. Also spread the word and let's learn together.
https://flask-india.hashnode.dev/building-user-interfaces-in-flask
/r/flask
https://redd.it/1go5rfv
Kindly visit the link to learn the building blocks for a web app in Flask. Also spread the word and let's learn together.
https://flask-india.hashnode.dev/building-user-interfaces-in-flask
/r/flask
https://redd.it/1go5rfv
flask-india
How to Build User Interfaces in Flask: A Step-by-Step Guide
Learn how to build responsive, dynamic user interfaces in Flask with this comprehensive guide. From setting up templates to integrating CSS and JavaScript,
Beginner in Django, Choosing the Right Storage for Files (Local vs. Cloud)
Hi everyone,
I’m new to Django and web development with only a few months of experience. I’ve built some small projects, but I’m now working on one that involves storing files (like PDFs, images, and ZIP files). So far, I’ve only stored files on the same server as my app, but I’d like to understand other storage options better.
Specifically, I’m trying to decide between local storage (keeping files on the same server) and cloud storage (like AWS S3, Google Cloud Storage, etc.). Here’s what I’d love to know:
1. Pros and Cons What are the main benefits and drawbacks of local storage versus cloud storage for a small-scale project? I’m not dealing with huge amounts of data here, just a few files for now.
2. Setup Difficulty How hard is it to set up cloud storage with Django as a beginner? I’ve heard there’s more configuration involved compared to just saving files locally, so any insight on what to expect would be helpful.
3. Costs Are there any affordable cloud storage options for small-scale projects? I’m on a limited budget, so I’m wondering if the cost is worth it for something that’s not too data-intensive yet.
Any advice or beginner-friendly tips on storage options would
/r/django
https://redd.it/1goroaj
Hi everyone,
I’m new to Django and web development with only a few months of experience. I’ve built some small projects, but I’m now working on one that involves storing files (like PDFs, images, and ZIP files). So far, I’ve only stored files on the same server as my app, but I’d like to understand other storage options better.
Specifically, I’m trying to decide between local storage (keeping files on the same server) and cloud storage (like AWS S3, Google Cloud Storage, etc.). Here’s what I’d love to know:
1. Pros and Cons What are the main benefits and drawbacks of local storage versus cloud storage for a small-scale project? I’m not dealing with huge amounts of data here, just a few files for now.
2. Setup Difficulty How hard is it to set up cloud storage with Django as a beginner? I’ve heard there’s more configuration involved compared to just saving files locally, so any insight on what to expect would be helpful.
3. Costs Are there any affordable cloud storage options for small-scale projects? I’m on a limited budget, so I’m wondering if the cost is worth it for something that’s not too data-intensive yet.
Any advice or beginner-friendly tips on storage options would
/r/django
https://redd.it/1goroaj
Reddit
From the django community on Reddit
Explore this post and more from the django community
Long startup time of the app (cold boot)
Hello, been using Flask for years now and I have this project that has been developed over the years. It has grew to around 400 routes.
The structure of the app is:
https://preview.redd.it/r31gktsamb0e1.png?width=723&format=png&auto=webp&s=65d3e4764678545b07387de91592bfa697442cfe
main.py file has all the routes for the app. I have tried using the Flask Blueprints today for one group of routes but it didn't make much difference to app startup time. Handlers are then used for handling the routes. Handlers can also call models which are used with Google Datastore for database. There are also some custom Python noscripts for handling different CSV and XML files that users can upload.
The problem is that app startup time is around 30 seconds on local environment and around 40 seconds on Google App Engine (when instance is cold booting and loading the app for the first time). After the initial startup then the app is quite fast.
This means that users have to wait 40 seconds for the app to startup before it can serve the request. Even if I would put min-instances to 1 that would partly solve the issue but still, if a new instance would be needed (because of auto-scaling when app is under higher load) the startup time would
/r/flask
https://redd.it/1gp0j2g
Hello, been using Flask for years now and I have this project that has been developed over the years. It has grew to around 400 routes.
The structure of the app is:
https://preview.redd.it/r31gktsamb0e1.png?width=723&format=png&auto=webp&s=65d3e4764678545b07387de91592bfa697442cfe
main.py file has all the routes for the app. I have tried using the Flask Blueprints today for one group of routes but it didn't make much difference to app startup time. Handlers are then used for handling the routes. Handlers can also call models which are used with Google Datastore for database. There are also some custom Python noscripts for handling different CSV and XML files that users can upload.
The problem is that app startup time is around 30 seconds on local environment and around 40 seconds on Google App Engine (when instance is cold booting and loading the app for the first time). After the initial startup then the app is quite fast.
This means that users have to wait 40 seconds for the app to startup before it can serve the request. Even if I would put min-instances to 1 that would partly solve the issue but still, if a new instance would be needed (because of auto-scaling when app is under higher load) the startup time would
/r/flask
https://redd.it/1gp0j2g
please need HELP
I have a Flask application where, on the index HTML page, I can input parameters and calculate the path loss value. There's also a "Show Visualization" button, which is supposed to take the latitude, longitude, and path loss values to display a map visualization. However, I'm currently unable to get the map visualization to work.
please guide me.
[https://github.com/saurabh-acharya-912/RF](https://github.com/saurabh-acharya-912/RF)
github link for this.
from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/heatmap')
def heatmap():
lat = request.args.get('lat')
lon = request.args.get('lon')
effective_path_loss = request.args.get('effectivePathLoss')
return render_template('heatmap.html', lat=lat, lon=lon, effective_path_loss=effective_path_loss)
if __name__ == '__main__':
app.run(debug=True)
/r/flask
https://redd.it/1gp1163
I have a Flask application where, on the index HTML page, I can input parameters and calculate the path loss value. There's also a "Show Visualization" button, which is supposed to take the latitude, longitude, and path loss values to display a map visualization. However, I'm currently unable to get the map visualization to work.
please guide me.
[https://github.com/saurabh-acharya-912/RF](https://github.com/saurabh-acharya-912/RF)
github link for this.
from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/heatmap')
def heatmap():
lat = request.args.get('lat')
lon = request.args.get('lon')
effective_path_loss = request.args.get('effectivePathLoss')
return render_template('heatmap.html', lat=lat, lon=lon, effective_path_loss=effective_path_loss)
if __name__ == '__main__':
app.run(debug=True)
/r/flask
https://redd.it/1gp1163
Celery Workers take 2.5 Hours to START on ECS
Here's a link to my previous post where I was facing issues in ECS related to running the migrations. https://www.reddit.com/r/django/s/nl53QfhjR1
Currently my Djnago application is starting as expected in ECS and immediately without any delays.
The issue I'm facing right now is with the celery workers which are unable to start and shows logs after 2-3 hours later. I have used the 'flower' tool to check if it's a cloudwatch logs issue but the worker itself doesn't register until 2-3 hours later.
This is all running on ECS Fargate. The described issue came after some changes in the application. The same image is working in my UAT cluster though. I have checked the env files and ECS Task Definition multiple times.
Suggest if you know something regarding this.
/r/django
https://redd.it/1gp20wq
Here's a link to my previous post where I was facing issues in ECS related to running the migrations. https://www.reddit.com/r/django/s/nl53QfhjR1
Currently my Djnago application is starting as expected in ECS and immediately without any delays.
The issue I'm facing right now is with the celery workers which are unable to start and shows logs after 2-3 hours later. I have used the 'flower' tool to check if it's a cloudwatch logs issue but the worker itself doesn't register until 2-3 hours later.
This is all running on ECS Fargate. The described issue came after some changes in the application. The same image is working in my UAT cluster though. I have checked the env files and ECS Task Definition multiple times.
Suggest if you know something regarding this.
/r/django
https://redd.it/1gp20wq
Reddit
From the django community on Reddit
Explore this post and more from the django community
Tuesday Daily Thread: Advanced questions
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1gp7a3y
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1gp7a3y
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 413614 members
Impressed by Django
Working in big tech and using Java, Django is a fresh breath of air. What are your favorite features of Django? I’m currently really liking Django Admin. I like the batteries included approach. I’m also glad to be out of pom.xml hell. While virtual environments are a bit annoying it’s overall easier to grok what’s going on with Python. I’m also impressed by Bulma. I like that I don’t have to use JavaScript to build a functioning UI. Something I still get a bit confused about is how to separate things out into apps. It’s tempting to just keep everything in one app as one big monolith. I think I’ll get better at that when I am more experienced with Django.
/r/django
https://redd.it/1gp90la
Working in big tech and using Java, Django is a fresh breath of air. What are your favorite features of Django? I’m currently really liking Django Admin. I like the batteries included approach. I’m also glad to be out of pom.xml hell. While virtual environments are a bit annoying it’s overall easier to grok what’s going on with Python. I’m also impressed by Bulma. I like that I don’t have to use JavaScript to build a functioning UI. Something I still get a bit confused about is how to separate things out into apps. It’s tempting to just keep everything in one app as one big monolith. I think I’ll get better at that when I am more experienced with Django.
/r/django
https://redd.it/1gp90la
Reddit
From the django community on Reddit
Explore this post and more from the django community
A complete-ish guide to dependency management in Python
I recently wrote a very long blog post about dependency management in Python. You can read it here:
https://nielscautaerts.xyz/python-dependency-management-is-a-dumpster-fire.html
Why I wrote this
Anecdotally, it seems that very few people who write Python - even professionally - think seriously about dependencies. Part of that has to do with the tooling, but part of it has to do with a knowledge gap. That is a problem, because most Python projects have a lot of dependencies, and you can very quickly make a mess if you don't have a strategy to manage them. You have to think about dependencies if you want to build and maintain a serious Python project that you can collaborate on with multiple people and that you can deploy fearlessly. Initially I wrote this for my colleagues, but I'm sharing it here in case more people find it useful.
What it's about
In the post, I go over what good dependency management is, why it is important, and why I believe it's hard to do well in Python. I then survey the tooling landscape (from the built in tools like pip and venv to the newest tools like uv and pixi) for creating reproducible environments, comparing advantages and disadvantages. Finally I give some
/r/Python
https://redd.it/1gphzn2
I recently wrote a very long blog post about dependency management in Python. You can read it here:
https://nielscautaerts.xyz/python-dependency-management-is-a-dumpster-fire.html
Why I wrote this
Anecdotally, it seems that very few people who write Python - even professionally - think seriously about dependencies. Part of that has to do with the tooling, but part of it has to do with a knowledge gap. That is a problem, because most Python projects have a lot of dependencies, and you can very quickly make a mess if you don't have a strategy to manage them. You have to think about dependencies if you want to build and maintain a serious Python project that you can collaborate on with multiple people and that you can deploy fearlessly. Initially I wrote this for my colleagues, but I'm sharing it here in case more people find it useful.
What it's about
In the post, I go over what good dependency management is, why it is important, and why I believe it's hard to do well in Python. I then survey the tooling landscape (from the built in tools like pip and venv to the newest tools like uv and pixi) for creating reproducible environments, comparing advantages and disadvantages. Finally I give some
/r/Python
https://redd.it/1gphzn2
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Django Monolith or Backend w/ DRF
In your industry facing projects or workplace, in which cases you have used Django SSR (templates for frontend) and in which cases you have used Django for backend only (used drf/ninja for api building) with a React/Vue framework for frontend?
/r/django
https://redd.it/1gpjhbw
In your industry facing projects or workplace, in which cases you have used Django SSR (templates for frontend) and in which cases you have used Django for backend only (used drf/ninja for api building) with a React/Vue framework for frontend?
/r/django
https://redd.it/1gpjhbw
Reddit
From the django community on Reddit
Explore this post and more from the django community
Waiting for Geopolars
I have been using polars for the past few months and love it so much. So much faster and cleaner than pandas. I am about to start a new personal project that will use a lot of geo-dataframes and am thinking about which package to use. Geo pandas exists but its slow and I'd rather something more up to date and polars compatible.
After doing some digging, Geopolars is well on the way but still a major work in progress, several months away from an alpha at least. I'd contribute but my rust isn't up to scratch. I think I might just have to use geopandas for now and convert my code to geopolars when it comes out. Anyone have any thoughts on this?
/r/Python
https://redd.it/1gpkev1
I have been using polars for the past few months and love it so much. So much faster and cleaner than pandas. I am about to start a new personal project that will use a lot of geo-dataframes and am thinking about which package to use. Geo pandas exists but its slow and I'd rather something more up to date and polars compatible.
After doing some digging, Geopolars is well on the way but still a major work in progress, several months away from an alpha at least. I'd contribute but my rust isn't up to scratch. I think I might just have to use geopandas for now and convert my code to geopolars when it comes out. Anyone have any thoughts on this?
/r/Python
https://redd.it/1gpkev1
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Python for R users
I've been writing primarily R code for nearly 20 years but recently needed to get back into Python for several maintenance and development projects. I put together a set of resources for getting up to speed in Python as an experienced R developer.
https://blog.stephenturner.us/p/python-for-r-users
/r/Python
https://redd.it/1gpqqox
I've been writing primarily R code for nearly 20 years but recently needed to get back into Python for several maintenance and development projects. I put together a set of resources for getting up to speed in Python as an experienced R developer.
https://blog.stephenturner.us/p/python-for-r-users
/r/Python
https://redd.it/1gpqqox
blog.stephenturner.us
Python for R users
A Google search for “R vs Python” returns thousands of hits across sites like Reddit, IBM, Datacamp, Coursera, Kaggle, and many others.
D What makes a good PhD student in ML
Hey as I started my PhD (topic: Interpretable Object Detection) recently I would be really curious to know what set of features you think make a successfull PhD student
/r/MachineLearning
https://redd.it/1gplmzb
Hey as I started my PhD (topic: Interpretable Object Detection) recently I would be really curious to know what set of features you think make a successfull PhD student
/r/MachineLearning
https://redd.it/1gplmzb
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
pyinapp_purchase: Verify In-app Purchase
Hi, [pyinapp\_purchase](https://github.com/Michael-Jalloh/pyinapp_purchase) is a simple python library to helps to verify,consume and acknowledge in-app purchase with just the purchase token. Currently on supports google but apple verification is coming soon.
**What does it do:**
* Seamless Integration: Quickly integrate the validator into existing Python applications.
* Verification: Handles token verification directly with the Google Play Store API to ensure data authenticity.
* Consumption: Handles token consumption if token wasn't consume client side.
* Acknowledgement: Handles token acknowledgement.
* Error Handling: Provides clear feedback for successful or failed token validations.
* Lightweight and Performant: Minimal dependencies and optimized for fast, reliable performance.
**Target Audience?**
* Its for backend developers working on mobile application, looking for ways to verify purchase done on their mobile app.
* For backend developers looking to track purchases on their backend.
**Comparison?**
* **pyinapp**: it used receipt instead of purchase token
* **inapp-purchases**: Last update 2018, [pyinapp\_purchase](https://github.com/Michael-Jalloh/pyinapp_purchase) uses new apis
/r/Python
https://redd.it/1gphajd
Hi, [pyinapp\_purchase](https://github.com/Michael-Jalloh/pyinapp_purchase) is a simple python library to helps to verify,consume and acknowledge in-app purchase with just the purchase token. Currently on supports google but apple verification is coming soon.
**What does it do:**
* Seamless Integration: Quickly integrate the validator into existing Python applications.
* Verification: Handles token verification directly with the Google Play Store API to ensure data authenticity.
* Consumption: Handles token consumption if token wasn't consume client side.
* Acknowledgement: Handles token acknowledgement.
* Error Handling: Provides clear feedback for successful or failed token validations.
* Lightweight and Performant: Minimal dependencies and optimized for fast, reliable performance.
**Target Audience?**
* Its for backend developers working on mobile application, looking for ways to verify purchase done on their mobile app.
* For backend developers looking to track purchases on their backend.
**Comparison?**
* **pyinapp**: it used receipt instead of purchase token
* **inapp-purchases**: Last update 2018, [pyinapp\_purchase](https://github.com/Michael-Jalloh/pyinapp_purchase) uses new apis
/r/Python
https://redd.it/1gphajd
GitHub
GitHub - Michael-Jalloh/pyinapp_purchase: pyinapp_purchase is an open-source Python library designed to simplify and securely validate…
pyinapp_purchase is an open-source Python library designed to simplify and securely validate in-app purchase tokens server side. - Michael-Jalloh/pyinapp_purchase
Sending cross-email-client-compatible emails with MJML and Python
Email clients, even Gmail opened in a browser have limited and varying support for HTML/CSS which makes sending good-looking emails hard, especially for various older Outlook clients and other popular email apps.
The old way was tedious inbox testing, conditional Outlook HTML code with tables inside tables and so on. Python could use premailer to inline styles for much better compatibility of plain HTML/CSS and then use tidy to clear HTML from any excess markup and errors... but it's not perfect and limited.
We got React Email some time ago, but it's React. Then one of email marketing companies, Mailjet, got triggered enough that they made a sort of a standard/markup - MJML \- set that is email message-safe and can be used in browser WYSIWYG as well as backend parsers. Python has an unofficial library so it's very easy to quickly switch to using MJML for email templates.
Aside from client compatibility there is the issue of sending emails so they don't go into spam folder, that will display nicely even if the client blocked loading external assets and more... I went through those problems and some solutions in my tutorial:
Tutorial Link: [https://rkblog.dev/posts/python/sending-good-looking-mjml-emails-with-python/](https://rkblog.dev/posts/python/sending-good-looking-mjml-emails-with-python/)
MJML live editor: https://mjml.io/try-it-live
/r/Python
https://redd.it/1gpus46
Email clients, even Gmail opened in a browser have limited and varying support for HTML/CSS which makes sending good-looking emails hard, especially for various older Outlook clients and other popular email apps.
The old way was tedious inbox testing, conditional Outlook HTML code with tables inside tables and so on. Python could use premailer to inline styles for much better compatibility of plain HTML/CSS and then use tidy to clear HTML from any excess markup and errors... but it's not perfect and limited.
We got React Email some time ago, but it's React. Then one of email marketing companies, Mailjet, got triggered enough that they made a sort of a standard/markup - MJML \- set that is email message-safe and can be used in browser WYSIWYG as well as backend parsers. Python has an unofficial library so it's very easy to quickly switch to using MJML for email templates.
Aside from client compatibility there is the issue of sending emails so they don't go into spam folder, that will display nicely even if the client blocked loading external assets and more... I went through those problems and some solutions in my tutorial:
Tutorial Link: [https://rkblog.dev/posts/python/sending-good-looking-mjml-emails-with-python/](https://rkblog.dev/posts/python/sending-good-looking-mjml-emails-with-python/)
MJML live editor: https://mjml.io/try-it-live
/r/Python
https://redd.it/1gpus46
RkBlog
Sending cross-email-client-compatible emails with MJML and Python
Sending a good-looking email is not easy due to limited and varying HTML support by email clients. MJML can however help with this problem.