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
A function that gets executed at a specific time of the month, say on 1st and 15th of every moth, ending of a quarter

I am developing an accounts application which requires certain journal entries to be passed at a specific date (say on 1st of every month) and emailing the quarterly reports automatically to the heads of the dept. I researched and found that celery and rabbit mq is a way, but after a day of trying to set up rabbit mq (it says like the port is used by another rabbitmq@desktop something stuff), is there any simple way to do it in django automatically?? If no, please guide me with celery and rabbit mq, till production in heroku. That would be a great help!! Thanks

/r/django
https://redd.it/l6qi5q
How to deploy local python flask REST server for flutter app backend

I want to release an Android app with a Flutter frontend and a Python backend which fetch its data from a local postgres database. The two parts communicate via a Flask REST-Api. I now search for a way to deploy it on android. The fact, that the Flask needs to run on the local device, makes it a difficult task. My research came to no meaningful conclusion.

For now, I have the flask server running on my computer. The frontend can accesses it in the Android Virtual Device, so backend and frontend are separated. While researching, I thought about using Docker, but i have no idea how to do it and if it is the right choice.

/r/flask
https://redd.it/l6tkk7
How to make a blog in my flask/jinja template site?

The site Im working on will have articles posted on. The person who writes the articles is not tech savvy. I need to find a way in which the person can type the article (eg. Title, header, body) and upload the images that will go with them and I could save these in my database.
And finally, I'd like my page to display these new articles automatically on the front end when the article is submitted.

But how can I style the article the way the writer wants it to? For example in Wordpress there are ways to type your blog and format it and add photos etc. But that seems too time-consuming to implement. Is there another way? Perhaps asking them to upload a preformatted document? (but how do I read it and translate it to html, css etc).

Or is there an external service I could use for the person to write and style the article and then just pull the formated html somehow to my own site? Any ideas are much appreciated.

/r/flask
https://redd.it/l6rr47
Saleor, is it a good option or there are better options available?

We are building a web app (and potentially a mobile/tablet app in the future) for a large publishing house. They do print books as well as eBooks, and Audio Books. 

The web app will not only serve as the e-commerce module that allows for purchasing of Books and subscriptions but it will also serve as the platform where the user consumes the digital content (embedded pdf/html/ ePub reader and AudioBooks). 

We are considering Saleor but a couple of things have us concerned:

1. No native support for bundling of products (how hard will it be for us to custom build this?)
2. No native support for digital products (we don't intend to 'ship'/send the purchased eBooks to the customer via email but rather grant them access/permission to consume the eBooks and AudioBooks on the website itself
3. Potential difficulty in building the in-app eBooks reader and Audio Book?

​

Could you address some of the concerns mentioned above?

Also, would you recommend Saleor for such a project? or there is another opensource option available?

/r/django
https://redd.it/l6sj01
R Why is it so hard to get ML code to work!? I am doing so poorly as an undergrad research assistant it is stressing me out.

I volunteered to help out with a machine learning group at school and was assigned to assist a PhD student. I was asked to implement some baseline knowledge graph completion models since mid Sept but I still can't figure out how to get them to work! I spent 3 months to finally get a few models on github to work properly, but only after spending countless hours hunting out the problems in the preprocessing and evaluation code.


Now, I was asked to add another layer on top of the baselines. The PhD student directed me to another github repo from a paper that implements similar things. I just plugged my existing code into the it and somehow the model went to shit again! I went through every steps but just can't figure out what's wrong.

I can't do it anymore... Every week's meeting with the PhD student is just filled with dread knowing I have no progress to report again. I know I am not a bad coder when it comes to projects in other fields so what is wrong? Is this the nature of ML code? Is there something wrong with my brain? How do you guys debug? How can I

/r/MachineLearning
https://redd.it/l6bncg
Django + React : Best authentication method

I want to add a login functionality to my application, and I am wondering which method is the best for an application where Django handles the backend, and react the frontend.

Most people seem to be using JWT authentication. However, I read that this solution isn't 100% secure. Therefore, I am a bit hesitant to use this solution. Is there also a way to just use django's default authentication system?

/r/django
https://redd.it/l6tmfx
Help with a table

Hello! I am completely new to Jupyter Notebook/Python. I have created a table and need to format it, but am unsure how to do so. Below is what I have:

​

print('One\\t Two\\t Three')

print('-----------------------')

for i in range(0,10):

print(one[i\], '\\t', two[i\], '\\t',

three[i\])

​

I need to align the data in the columns to the right and I also need to have a certain character count for each column -- in order, the character count per column should be 6, 8, and 10. I appreciate any help.

/r/JupyterNotebooks
https://redd.it/l5tnvx
Django Knox Auth with social logins

Hello,

I built an application using the Django Rest Framework that uses the Django Knox package for authentication. Now I would like to enable additional authentication options like social logins with Google or Facebook. Is it possible to combine these with Django Knox?

I have been looking for answers to this question for a while but all I come across is Django AllAuth. Now I don't really understand whether Knox and AllAuth are mutually exclusive.

Any tips are appreciated!

/r/django
https://redd.it/l78t5s
I'm working on a web app that will send users emails sometimes. Any related packages you recommend for this?



/r/flask
https://redd.it/l74tgf
Friday Daily Thread: Free chat Friday!

Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!

/r/Python
https://redd.it/l7d6e7
Flask Library to make uploading files to your db & server quick and simple

​

Flask File Upload

Hi guys,

If you require a library to make uploading files with Flask super easy then please take a look at flask-file-upload

https://github.com/joegasewicz/flask-file-upload

This library is active & new feature requests are more than welcome, as is your feedback!

thanks for looking

Joe

/r/flask
https://redd.it/l7dho5
How to show a number labels for a notebook?

Sorry if this is too simple but I've been trying to look for an answer for this and I just cannot find it anywhere.

I'm gonna give a simple tutorial for some scipy stuff on jupyter notebook and I want my students to know which cell of the notebook I'm at. The input/output number of the cell doesn't help since it changes according to the number of cells you've run before.

Thank you for your answers.

/r/JupyterNotebooks
https://redd.it/l7g354
Iterate throught all objects

how can I iterate through all django objects and change a value for them?

/r/django
https://redd.it/l7nlrv
Starting celery, celery beat in google app engine?

We want to host a Django app using Google App Engine, using celery with redis task broker. Celery, and celery beat can be started locally using scripts/commands, but how do we start the same on the app engine?
The documentation handles python 2.7, so we are a bit in the dark, so things are a bit in the dark. Can someone help me out?

/r/django
https://redd.it/l7s6xd
Just launched Buzzbomb, my B2B platform built with Django (took 3 months to code!!)

Hey guys,

πŸŽ‰ I just launched https://buzzbomb.com/ on Product Hunt, you can see it here! https://www.producthunt.com/posts/influencers-by-buzzbomb

So happy to have finally launched after coding for 3 months (although I guess there's more to come). I will be posting about the journey on my YouTube channel (including all the revenue metrics) if you want to follow along.

I'm trying to build 12 Startups in 12 Months for 2021 so yeah - will be an interesting year πŸ˜…. Next month I will be doing a daily video on my YouTube channel on the coding progress (sort of like a personal standup diary), but which also be showing the code I write etc. if you're interested!

I built this with Django + Vue.js, Django has my heart and will be using it for all the projects I build!

/r/django
https://redd.it/l7vc04
This post has:


Hello! I made a little Program
which gets statistics about this post!
It should be update every 20 seconds.

This post has 654 Upvotes!
-----
It has 81 Downvotes
-----
and 117 comments!
-----

The 3 top comments are from:

1. u/BimphyRedixler

|_Upvotes: 129

|_First word: I

|_Last word: account

2. u/Exodus111

|_Upvotes: 36

|_First word: EditingThisToSeeIfICangeTheFirstWordSetting.

|_Last word: AlsoChangingThisLOL!πŸ˜‚

3. u/CaminoFr

|_Upvotes: 19

|_First word: ",

|_Last word: None

Note: Sometimes theres a Person with lesser upvotes on place 1, If people are disliking comments, the reddit api does weird things!

Second note: The Up/Downvotes and comments are NOT accurate!



Last update: 2021-01-29 18:29:47 CET

total updates: 540


Latest comment by: u/Valtsu0
-----
First word: too
-----
Last word: long
-----

This idea was inspired by u/Krukerfluk
Krukerfluk's post: https://www.reddit.com/r/Python/comments/hoolsm/this_post_has/

My code on Github: https://github.com/Jonathan357611/Reddit-comment-statistics

This program is hosted on a Raspberry pi zero!

/r/Python
https://redd.it/l7u2m3