Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
PyPy the unknown Hero.

/r/django
https://redd.it/1egfdmf
Error while running the falsk app on development server

When I am adding Csrf to my Flask app and running the app on a development server
I am getting this error: {"error":"Port could not be cast to integer value as '4444,172.233.209.24'"} Can anyone help?

/r/flask
https://redd.it/1egk8x0
Mulitnomial Logistic model but for mixed effects

Hello, I wanted some suggestions on how to implement a mixed effects multinomial logistic regression model for my data.

A little context on my data- I am trying to predict how people categorize an object (4 possible options here - categorical) based on 2 types of inputs (both inputs are categorical variables with 4 different categories each).

Initially, I thought a normal multinomial logit model would work, but it was brought to my attention that I had repeated measures in my data. Which had me looking up mixed effects models.

But, mixed effects multinomial logistic regression for categorical variables sounds....complicated.

Any suggestions on how to implement this (packages/code samples etc) or any better/easier alternatives for this type of data, would be welcome.



/r/pystats
https://redd.it/1egqxsw
Component Library Solution: django-lookbook

Hi, I'd like to share an Django component library solution **django-lookbook** here.

I want something like "StoryBook" to Django but existing solutions of the Django community did not make me satisfied, so I built it myself.

Below are some features you might be interested:

## Pluggable app

It is a classic Django pluggable app which can be integrated with your Django project within minutes.

No matter your Django project use jQuery, Vanilla JS, Alpine.js, HTMX, Stimulus.js or other frontend solution, **it can work with them all**.

## Preview

Let's say you have a custom `Modal` component in your Django project, built with `Alpine.js`, and it supports different modal size `small`, `medium`, `large` based on the `Tailwind CSS`

How to make other team mates quickly understand the usage? Instead of digging the Django templates?

We can create three previews for the Modal and developers can directly check the final result in the component library.


class ModalComponentPreview:

def small_modal():

def medium_modal():

def large_modal():

As you can see, we can create previews and put them in one Python class, and the syntax is very similar with writing unittests

/r/django
https://redd.it/1egi8z3
D Is Unlimited Context Length really possible?: "Unlimiformer" author discusses NeurIPS paper Friday

Is Unlimited Context Length really possible? At what cost?

Amanda Bertsch, author of 2023 NeurIPS paper Unlimiformer, will describe the architecture and take questions at this Friday's Oxen.ai Paper Club.

Greg Schoeninger u/FallMindless3563, Oxen CEO and Master of Plain Speak, will help interp the concept and relate it to other papers we have reviewed.

Call: https://oxen.ai/community

The trick asserted to make Unlimited Context Length possible: Offload the cross attention calc to a K-Nearest Neighbors (K-NN) index.

I tweeted someone's clever animation of K-NN here: https://x.com/mustafarrag/status/1817647917059944474

Paper: https://arxiv.org/abs/2305.01625

Greg, I'll reply with my first 5 questions. I've only read the abstract so far.

/r/MachineLearning
https://redd.it/1egqitt
Help for a Beginner

I am a Django learner made few websites now and i dont know the react or any other i dont understand when can i start for job hunting can anyone recommend what more skills do i need ...

/r/djangolearning
https://redd.it/1egvq2c
Best Resourse to learn Flask api?

i am asking for a tutorial for flask api which is the best way to learn it

/r/flask
https://redd.it/1eed9y8
R Annotation Vocabulary (Might Be) All You Need

Paper link: https://www.biorxiv.org/content/10.1101/2024.07.30.605924v1

Abstract:
>
Protein Language Models (pLMs) have revolutionized the computational modeling of protein systems, building numerical embeddings that are centered around structural features. To enhance the breadth of biochemically relevant properties available in protein embeddings, we engineered the Annotation Vocabulary, a transformer readable language of protein properties defined by structured ontologies. We trained Annotation Transformers (AT) from the ground up to recover masked protein property inputs without reference to amino acid sequences, building a new numerical feature space on protein descriptions alone. We leverage AT representations in various model architectures, for both protein representation and generation. To showcase the merit of Annotation Vocabulary integration, we performed 515 diverse downstream experiments. Using a novel loss function and only $3 in commercial compute, our premier representation model CAMP produces state-of-the-art embeddings for five out of 15 common datasets with competitive performance on the rest; highlighting the computational efficiency of latent space curation with Annotation Vocabulary. To standardize the comparison of de novo generated protein sequences, we suggest a new sequence alignment-based score that is more flexible and biologically relevant than traditional language modeling metrics. Our generative model, GSM, produces high alignment scores from annotation-only prompts with a BERT-like generation scheme. Of particular

/r/MachineLearning
https://redd.it/1egthqg
How many database rows can I have till Django starts to slow down?

How many rows can I have in my PostgreSQL database till Django starts to slow down? Each row has 9 columns. A single user can create as many as 1,000 rows.

/r/djangolearning
https://redd.it/1egpmcg
How to upload your Django project on github safely?

what things should i hide before i put the project on github?

/r/django
https://redd.it/1eh0dqc
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

# Weekly Thread: Professional Use, Jobs, and Education 🏢

Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.

---

## How it Works:

1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.

---

## Guidelines:

- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.

---

## Example Topics:

1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?

---

Let's help each other grow in our careers and education. Happy discussing! 🌟

/r/Python
https://redd.it/1eh2h8o
Anyone know of any communities dedicated to software toys?

By "software toys" I mean silly little applications/scripts/whatever that serve no purpose other than to amuse, but don't quite meet the definition of a game.

For example, I once wrote a Python script that encoded text as mosaic of colored squares.

Or another time I wrote a non-interactive simulation of a crew of NPCS that explored a fictional ocean and posted their discoveries on Reddit.

Just silly, dumb things like that. It doesn't necessarily have to be strictly for Python but since that's what I normally code in I thought I'd ask here.

Anyone know of any communities dedicated to software like that?

/r/Python
https://redd.it/1eh7rlg
django-allauth 64.0.0 released: WebAuthn & Passkey support
https://allauth.org/news/2024/07/django-allauth-64.0.0-released/

/r/django
https://redd.it/1ehb6wb
Hosting Help

Hi, I have 3 sites pointing to 1 IP address hosted by Linode ubuntu. I did not have to do much when setting this up, all was auto filled by Linode when adding domain names.

I want to change my VPS from Linode to a new provider that supports only IPv4. The new service only gives me the vps, there is no interface like Linode where I can add domain names point to the VPS IP.

Could anyone provide guidance on how to setup my domains to point to my new vps IP?

my domains are with with 2x godaddy, 1x namecheap.

/r/flask
https://redd.it/1ehga1n
Django Compose - Head start on development

Hello Everyone, 👋

I am excited to share with you, Django Compose 🚀

https://preview.redd.it/yo8y7518vufd1.png?width=3456&format=png&auto=webp&s=4c55579a1a33c74c22b9cda008c2bc890577e452

Django Compose shortens the time needed to create a full fledged Django project.

Build at the speed of no-code. Export to code and customise. Build fast not from scratch.

With few steps, you have 10x productivity which allows you focus on what matters (your business logic).

Create project: Describe your Django application or use our template.

Map your fields: Describe and Map your project's model schema (Entity Relations).

Configure what you want: Select technologies, features and dependencies you want.

Get your code: That's it. Your codebase is ready, with specified apps, models, views, templates, urls and much more configured for you, API and WEB 🪄.

Live now

https://djangocompose.com

/r/django
https://redd.it/1eh8ndc
ImportError in VS Code

/r/djangolearning
https://redd.it/1ehd1e0
The trouble with all

https://www.gauge.sh/blog/the-trouble-with-all

I wrote a blog post discussing the issues that __all__ in Python has - particularly it's lack of ability to enforce public APIs despite letting you define them. It led to a fun exploration of importlib and me writing my first import hook! Code here - https://github.com/gauge-sh/hook/blob/main/hook.py

Curious to hear folks thoughts on this problem, especially as compared to other languages! How do you enforce interfaces on your Python modules?

/r/Python
https://redd.it/1ehjy9g
ENVKEY Shutting Down - Alternatives for secrets / keys?

Hey all, ENVKEY just announced they're shutting down. What is everyone using for secrets / keys?

Here is the email from ENVKEY:

>Today I have some difficult news to share. After nearly 7 years of working on EnvKey, I’ve decided to begin winding down the company. In order to give all customers and users plenty of time to transition away, EnvKey will wind down over the next 6 months. EnvKey Cloud will shut down on February 1st, 2025 and then the EnvKey company will be dissolved.

>This has been a stressful and emotional decision for me, but unfortunately I’ve had to accept that continuing to run EnvKey is no longer financially sustainable for myself and my family, and therefore it’s time to move on.

>I understand that this may come as a surprise and a disappointment. I’m deeply honored by the trust that hundreds of organizations and thousands of users have placed in EnvKey over the years, and I regret giving you extra work to do in transitioning away.

>I hope that the gradual wind down period will help to soften any negative impact. Additionally, I've been in touch with the CEO of Infisical, another secrets management platform that is also open source, end-to-end encrypted, and similar in its spirit and

/r/Python
https://redd.it/1ehny2x
Real-time chat application with Django + Firebase Cloud Messaging.

I need to create a real-time chat application where users can send messages, videos, pictures, voice messages, etc.

There will be one-to-one chats or group chats for users.

Now my question is about the tech stack, basically up until now I have been writing DRF API and I am thinking of using Django channels with FCM for push notifications and I wanted to know if this is a good idea or if I should do something else.

Also, I have heard about Firebase's real-time database and wanted to ask if I can use it instead of Django channels.

I am a beginner and a bit lost so please any recommendation or suggestion will be appreciated.

/r/django
https://redd.it/1ehnjqn
New interesting funeral brochure and donation website with django htmx my second project will django

https://anytribute.com

Hi this is my second project with Django
Can you check it up and give me your feedback. It’s free to use.

Stack
Django
Bootstrap
Htmx
Hyperscript
Django widgets tweeks
Djago all auth


/r/django
https://redd.it/1ehqomc