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
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/igcx24
[P] easyOCR API

Hi, I'd like to introduce easyOCR API which is simple, easy, and ready to use right away.

Rest API is available:

curl -X POST "[https://master-easy-ocr-wook-2.endpoint.ainize.ai/word\_extraction](https://master-easy-ocr-wook-2.endpoint.ainize.ai/word_extraction?fbclid=IwAR0e9WmwOqh15Wj4cC-h-mv-duizdNKk1efZy34scYIKc1L33Je0QMi2lxI)" -H "accept: images/\*" -H "Content-Type: multipart/form-data" -F "language=ko" -F "base\_image=canmachinesthink.png;type=image/png"

github: [https://github.com/JaidedAI/EasyOCR](https://github.com/JaidedAI/EasyOCR)

demo: [https://github.com/wook-2/easyOCR](https://github.com/wook-2/easyOCR)

[https://master-easy-ocr-wook-2.endpoint.ainize.ai/](https://master-easy-ocr-wook-2.endpoint.ainize.ai/)

/r/MachineLearning
https://redd.it/ig4x6g
How to load a jupyter-notebook without executing the cells

I want to give a presentation using Jupyter Notebook. But when I load my prepared
notebook, all the cells are executed/evaluated.


Q: How can I load my prepared notebook without executing/evaluating any cell (and let me do so one by one)?


THANKS!

/r/IPython
https://redd.it/ige19q
Files inside my Static folder are not being found when running on server.

I am having issues relating the Django documentation for settings up the static path ways to how my project is set up.

I am using a Droplet on Digital Ocean that is setup to use Django 3.1, Gunicorn, and Nginx to run my project and the static files load locally but throw a 404 error on the droplet server. I feel like I've tried every combination of STATIC_URL, STATIC_ROOT, and STATICFILES_DIRS i can think of and I've copied the static files using "collectstatic" so I'm pretty desperate for suggestions.

This is the path in the actual server to the static path I copied my project too:

**/home/django/django_project/django_project/static**

I've tried setting my variables to this setup:

STATIC_URL = '/static/' # I've tried this too: 'django_project/django_project/static/'
STATIC_ROOT = "/var/www/static/" #'/static/'

STATICFILES_DIRS = [
os.path.join(BASE_DIR, '/static'), #I've tried 'django_project/static' with and without the back slash at the end
]

No matter what I try the static assets cannot be found:



/r/djangolearning
https://redd.it/iggkpx
Hello Ananconda Users! I am a newbie and I have installed and uninstalled this application two times (to troubleshoot this). I can't open the navigator as it is showing me this error. I have gone with the PATH thing as well. Please direct me. Thank you!

/r/JupyterNotebooks
https://redd.it/igcmm5
[D] What are the free services using GPT-3 that I can try?

Something along the lines of PhilosopherAI.
Thanks

/r/MachineLearning
https://redd.it/igavbq
15+ Free Python Projects for Beginners with full tutorial walkthroughs
https://www.codewithrepl.it/python-projects-for-beginners.html

/r/Python
https://redd.it/ig81x0
ModuleNotFoundError: No module named 'googleapiclient'

This is my code I'm running in a **Python3 Jupyter notebook**:

from __future__ import print_function
import datetime
from googleapiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools

import pandas as pd

​

I get this error:

> **ModuleNotFoundError**: No module named 'googleapiclient'

​

**pip freeze:**

This is what I get from the command `pip freeze:`

apiclient==1.0.4
astroid==2.3.3
attrs==18.1.0
beautifulsoup4==4.7.1
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
colorama==0.4.3
ConfigArgParse==0.14.0
coursera-dl==0.11.4
cycler==0.10.0
entrypoints==0.3
google-api-core==1.22.1
google-api-python-client==1.10.0
google-auth==1.20.1
google-auth-httplib2==0.0.4
google-auth-oauthlib==0.4.1
googleapis-common-protos==1.52.0
httplib2==0.18.1
idna==2.10
isort==4.3.21
keyring==19.0.1
kiwisolver==1.2.0
lazy-object-proxy==1.4.3
matplotlib==3.3.0
mccabe==0.6.1
numpy==1.19.1
oauth2client==4.1.3
oauthlib==3.1.0
pandas==1.1.0
Pillow==7.2.0


/r/JupyterNotebooks
https://redd.it/igbdg4
PyCon India 2020

Ticket sales for PyConIndia 2020 are open.

To make the event inclusive and accessible to all, we have kept the ticket prices to a bare minimum of 199 INR, or roughly 2.68 USD.

Rush to grab your regular tickets now.

[https://in.pycon.org/2020/#ticket](https://in.pycon.org/2020/#ticket)

Regards,

On Behalf of PyCon India Organising Team

/r/flask
https://redd.it/igeavg
Wednesday megathread: Beginner questions

New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!

/r/Python
https://redd.it/igo5yy
Codes in the earlier cells are not being carried down to the lower cells?

Why is everything defined in cells earlier (plus imported stuff) are undefined when I call them in another cell (when I try to run just that cell, not the entire notebook from start)?

Is this the expected behavior? Am I suppose to run the entire notebook every time I want to see the change I made?

/r/IPython
https://redd.it/igq1ep
Way to send multiple files with a loop

Hello everyone,

I’ve been learning Python for a few months and I’m very new to Flask. I have an application that will take a csv and then perform a function returning multiple csv’s after looping to separate them out based on a filter. The problem I’m running into is that send_file must be returned and can not be yielded, thus my loop is terminated after one iteration.

The only other potential solution I have seen is to zip the files and then return that, but I am trying to avoid this.

Is there anything I am missing here that could help me achieve what I’m trying to do?

Thank you in advance for any help!

/r/flask
https://redd.it/igo435
Setup of Dockerised Flask/Fast-api to perform Background tasks using celery and Redis

Minimal example utilizing Flask/Fast-Api and celery with Redis for celery
back-end and task queue and

flower for monitoring the celery tasks.

1. [Flask](https://github.com/jitendrasinghiitg/docker-flask-celery-redis)
2. [Fastapi](https://github.com/jitendrasinghiitg/docker-fastapi-celery)

Hope it might be useful to someone

/r/flask
https://redd.it/igxr3s
I couldn't find much resources on how to write tests against Elasticsearch in Django, so I wrote up a guide.

Like the title says, I couldn't find much resources on how to write tests against Elasticsearch in Django, so I figured I'd write something up after I got it working.

https://yanglinzhao.com/posts/test-elasticsearch-in-django

I hope others who have a similar tech stack find it useful.

/r/django
https://redd.it/igyyma
Hosting custom-domain Flask based web app

I want to host my Flask web application but don’t know where to go. Maybe Google Cloud Platform, AWS or Pythonanywhere are a valid option? How to figure out the most efficient and budget-friendly company?

/r/flask
https://redd.it/ih4wk6
New hosted Notebooks

Hi all, we currently use an in house jupyter solution, but we started exploring new options. We see AWS sagemaker and AI Platform Notebooks in Google. We have large amount of data in BigQuery, so.the obvious choice seems to be GCP, but hesitant as the support hasn't been great experience so far with BQ specially many libraries changes which are always breaking, so not sure if GCP is the right option any ideas?

/r/JupyterNotebooks
https://redd.it/igqyco