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
Unable to get value from render_template!

This is my main.html : [https://pastebin.com/794UYRrz](https://pastebin.com/794UYRrz)

and this is my [app.py](https://app.py) : [https://pastebin.com/68RXwiMc](https://pastebin.com/68RXwiMc)

​

Basically i want whenever i get a POST to update the textarea but it doesnt work..

i tried with fetch("/", {method: "POST"}) but whenever i get a post like that or one from dropzone, it doesnt return the values as true

/r/flask
https://redd.it/xyemzy
Execute Notebook on remote kernel via cmd

Hi, I'm currently trying to run a remote notebook via command shell. I was able to connect to the remote kernel with the GatewayClient option and also could start my local notebooks on that kernel using the Browser. But I didn't find a way to use the established connection to execute a notebook using the command shell.
Can anybody help me with this? Either a way in python or directly via command prompt would be nice!

/r/JupyterNotebooks
https://redd.it/wcamn2
Saturday Daily Thread: Resource Request and Sharing! Daily Thread

Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?

Use this thread to chat about and share Python resources!

/r/Python
https://redd.it/xye4ru
Is it just me or did the creators of the Python QT5 GUI library miss a golden opportunity to call the package QtPy?



/r/Python
https://redd.it/xykohy
Colab/jupyter hub/google drive/github?

I frequently switch between two devices, one windows and another Mac. I'm wondering what the best way to store my jupyter notebooks would be. The code is all fairly light. I'm just reading in data and graphing it. The notebook will be single-user.

The code runs significantly slower on google Colab than if I run them on my local machines, but nothing unbearable, and speed isn't a huge issue. That said, fast wall times are always better. I also haven't fully dug deep into Colab yet so IDK how it compares with standard jupyter in terms of functionality. Most online comparisons emphasize on ML capabilities, but again I'm not doing anything that fancy.

I briefly read up on jupyter hub, but I haven't tried it out yet. I only have a linux machine with crappy hardware that's up 24-7, and I'm often not on the same internet as the linux machine, so I'd probably have to tailscale back. I can't setup port forwarding with my internet administration privileges.

The other alternatives are to store the jupyter notebooks either on google drive and mount it to my local devices, or to push the code to github and pull before every use. I

/r/IPython
https://redd.it/xynkpi
I wrote a document generator for YAML files in Python

I wrote C# for years, and this is one of my first Python projects that is not a fork.

​

It started as a thought experiment, if OpenSearch can generated documentation automatically for configuration files in YAML, like JavaDoc or doxygen. I proposed this idea and tried to come up with a POC. And this is it. You can have a check at the short Readme about how it works.

​

https://github.com/zbalkan/yaml-docs

/r/Python
https://redd.it/xyebbv
rendering a notebook with RTL language

Hi all,

​

I'd like to know if there is a way to render a notebook into an html doc with an RTL language?

​

I've added <div dir="rtl" lang="he" xml:lang="he"> to the markdown cells but it's just rendering with the tags.. nothing else..

&#x200B;

hope someone can help me.

/r/JupyterNotebooks
https://redd.it/wb9gfz
A Rookie SEO Question

Let's suppose I am building a catalog website (e.g., e-commerce, real estate listings, electronic library, etc.)

In the real estate example, I may have three tables in my database: info about the house, the neighborhood, and the county the house is in.

When a user visits the website, s/he enters an address on the main page, and on the results page, s/he is returned aggregated and summarized data from the tables mentioned above.

This part is fairly straightforward, but I don't understand how to make search engines index this data. If the result pages only exist when someone is sending a request, how can I ensure that when people search for the same house on google, they see the page on my website that includes information about that house?

I guess I can create pages for everything house in the database and store them on the server, but it doesn't sound like the best solution, does it?

Please let me know what you guys think.

/r/flask
https://redd.it/xyyrzv
This media is not supported in your browser
VIEW IN TELEGRAM
[R] VToonify: Controllable High-Resolution Portrait Video Style Transfer

https://redd.it/xyxe8w
@pythondaily
Sunday Daily Thread: What's everyone working on this week?

Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.

/r/Python
https://redd.it/xz7dtg
I wrote a filter for Django Compressor that removes unused CSS classes and makes your СSS files much smaller

I really enjoy simple, lightweight, and fast websites so I always try to keep my CSS and JS files as small as possible. I also like using Bootstrap for my projects since it helps to build a prototype to test the idea without much effort. However, Bootstrap and Tailwind CSS files are pretty large which directly influences the loading and render time of a website. To solve the problem, I wrote a filter for the amazing app Django Compressor that uses the PurgeCSS tool to remove unused CSS classes from your files and reduce the size of your CSS files size several times.

The filter automatically discovers all your Django templates, finds which classes are not used, and removes them. Thanks to the Django Compressor, it happens on the fly, so you don't need to manually run the PurgeCSS tool and copy/paste optimized styles every time you changed your styles. Moreover, Django Compressor allows you to use the filter alongside other filters, so you can also compile your SCSS files, compress CSS files, etc.

So far I tested it on one of my websites and it reduced my CSS files from \~200 Kb to 60 Kb (I use almost all Bootstrap components

/r/django
https://redd.it/xys6y4
If you're a beginner interested in data science and machine learning, I recently produced a video series that goes through all of the major algorithms and their implementations in Python! I put a lot of work into each tutorial, so hopefully this helps out!
https://youtube.com/playlist?list=PLvICEeb-TZEHKkojcv1_POKPrCwlsEnsI

/r/Python
https://redd.it/xyyj9t
Compatibility between Colab ipynb and local Jupyter notebook?

I've been using Google's Colab environment for a coursework - and my understanding is it's a mostly reskinned version of Jupyter notebook.

Can I assume ipynb notebooks exported from Colab to be compatible with my machine's local Jupyter installation? Are there known pitfalls or incompatibilities I should be aware of?

&#x200B;

Thank you!

/r/IPython
https://redd.it/xyn9k5
Can you rate my project, and tell am I ready for internship or junior position?

Here is my django project, I didn't know what to do and just create some social network app.

Please just tell me what did i do wrong and what should i learn

/r/django
https://redd.it/xzhtei
I’m getting this import error when trying to open Jupyter. When I closed it, some files were still running so I’m not sure if that affected this. Can anyone help?

/r/JupyterNotebooks
https://redd.it/xz80nz
Odd Julia highlighting with dark themes

/r/JupyterNotebooks
https://redd.it/wv4zdn
How to deploy django-tenants to production

I'm building a startup SaaS software and I decided to use django-tenants for my database wherein users can have their own schema and access din via schena domain. I tried to deploy it to heroku and railway.app. i also have hosted database from railway.app.
But I'm having some troubles using the domain schema. How to fix this?

/r/django
https://redd.it/xzsb47
Monday Daily Thread: Project ideas!

Comment any project ideas beginner or advanced in this thread for others to give a try! If you complete one make sure to reply to the comment with how you found it and attach some source code! If you're looking for project ideas, you might be interested in checking out Al Sweigart's, "The Big Book of Small Python Projects" which provides a list of projects and the code to make them work.

/r/Python
https://redd.it/y0069z
D Simple Questions Thread

Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the title.

Thanks to everyone for answering questions in the previous thread!

/r/MachineLearning
https://redd.it/xznpoh