A look at web hosting and options for hosting your Python code, in particular a VPS which will give you full root access. Webdock.io is what I will be using for running a Django based site with Nginx and Gunicorn.
Whilst Django is a framework, the idea is to not rely on yet another 'framework' such as Heroku or any hosting provider that makes deploying your code too easy. "Don't be lazy" !
By configuring your own server and installing your own version of Python you will have total control and no unexpected usage bills.
Webdock playlist : https://youtube.com/playlist?list=PLKMY3XNPiQ7ve8JealkRYa0JNsewsQZ49
Ps: This article is a good reference if you want to deploy changes to your Django site (once you have set up Nginx and Gunicorn) : https://coderflex.com/blog/2-easy-steps-to-automate-a-deployment-in-a-vps-with-github-actions
Become a patron : ? https://www.patreon.com/drpi
Buy me a coffee (or Tea) ☕ https://www.buymeacoffee.com/DrPi
If yoiu want a fast VPS server with Python installed check out :
https://webdock.io/en?maff=wdaff--170
https://webdock.io/en/black-friday-cyber-monday-weekend-2022
Pytest with FastAPI course on "TestDriven.io":
-------------------------------------------------------------------------
https://testdriven.io/courses/tdd-fastapi/?utm_source=python360
https://testdriven.io/courses/scalable-fastapi-aws/?utm_source=python360
https://testdriven.io/courses/fastapi-celery/?utm_source=python360
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 5000 free API calls. No credit card required.)
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
Thumbs up yeah? (cos Algos..)
Python Web Hosting
Fast Linux VPS Servers
#webdock #Djangohosting #python
...
https://www.youtube.com/watch?v=_QcL9GorbHE
Part one of a series, web scraping a recipe site using Python and Scrapy.
This video shows how I start a new Scrapy spider in Python and solve the infinite scroll 'problem'. This was not like other infinite scroll pages I had dealt with on a site like food.com.
To solve this I had to think small...and if you want to skip ahead you will find the answer around 30 minutes in, but if you do you'll miss some of the fun. This was recorded 'live' so mistakes have been left in - they may or may not help you - let me know in the comments?
If you are looking for a proxy, then you could do a lot worse than use this one, which I am impressed by and have now subscribed to. Use the promo code and you will achieve a state of eternal bliss.
? https://www.scraperapi.com?fpr=drpi
10% off with this Promo Code: DRPI10
-- CHAPTER TIMES --
0:00 Start
1:20 Looking for some JSON
8:16 Writing Scrapy Code
6:49 Create Virtual Environment
8:45 'cokkpa'
10:32 'sudo chown -R rag:sudo'
17:17 Settings.py
20:16 Scrapy shell
27:57 Monkey Business
30:30 Infinite Scroll solution
Thumbs up yeah? (Cos Algos)
Dr P.
#scrapy #infinitescroll #python
...
https://www.youtube.com/watch?v=h19rnyX7Cmo
Unpacking my SBR16 linear rails and bearings for my DIY CNC project.
The motion on 3 of the 4 bearings is not great. I bought them from eBay so won't be getting any more from that supplier, and will be upgrading to a NEMA 23 motor with more current required, which means the Adafruit HAT will not be suitable.
Pity, because one of the four bearings is perfectly smooth, but I have read elsewhere that NEMA 23 is the way to go for CNC. (17 is ok for 3d printing).
If all else fails might buy one of these to experiment with! https://amzn.to/2KZcKEF
Automate the boring stuff : https://amzn.to/2MEEmlK
#CNC # RaspberryPi
Check out the Minimalist online python IDE :
https://epyco.herokuapp.com/
https://epico.herokuapp.com/
Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi
...
https://www.youtube.com/watch?v=KdmfCVa0WJ4
Become a patron : ? https://www.patreon.com/drpi
Buy me a coffee (or Tea) ☕ https://www.buymeacoffee.com/DrPi
If yoiu want a fast VPS server with Python installed check out :
https://webdock.io/en?maff=wdaff--170
https://webdock.io/en/black-friday-cyber-monday-weekend-2022
Pytest with FastAPI course on "TestDriven.io":
-------------------------------------------------------------------------
https://testdriven.io/courses/tdd-fastapi/?utm_source=python360
https://testdriven.io/courses/scalable-fastapi-aws/?utm_source=python360
https://testdriven.io/courses/fastapi-celery/?utm_source=python360
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 5000 free API calls. No credit card required.)
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
Thumbs up yeah? (cos Algos..)
#pytest #tutorial #pythonprogramming
...
https://www.youtube.com/watch?v=1blBGQwrmas
Taking apart the connections and talking about the buzzer, scrollpHAT, on-off button, and ideas for the next project.
#RaspberryPiZero
#GPIO #Python #Linux #Sensors #ShutdownButton
Check out the Minimalist online python IDE :
https://epyco.herokuapp.com/
https://epico.herokuapp.com/
Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi
...
https://www.youtube.com/watch?v=_NIJaW9c3Sc
Poetry, Pytest, GitHub Actions.
Automate your python project creation and use GitHub actions to automatically test your code with every push.
In this GitHub Actions worfklow Tutorial we cover the following topics:
First we look at the process of creating a GithHub Repository, cloning the repo,starting poetry, and then doing a push back to GitHub.
Also, we'll see how GitHub actions provide you with the green badge to show users your code has passed its checks.
After the overview with screenshots we run through the through a hands-on DEMO, where I show the syntax of poetry, and the github actions workflow file, and the entire CI/CD pipeline setup with my example Python project.
◼️ "Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you."
◼️ "GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD"
◼️ "pytest is a mature full-featured Python testing tool that helps you write better programs."
-- chapters --
00:00 Intro
01:45 Workflow
03:22 Overview with screenshots
12:41 VSCode demo of project
20:05 Altering import path / "Module not found"
25:52 Configure GitHub actions
------------------------------------------------------------------------------
https://python-poetry.org/
https://packaging.python.org/
-------------------------------------------------------------------------
You can buy bitcoin here ???
? https://www.swanbitcoin.com/python360
+ get $10 in BTC when you join Swan !!
--------------------------------------------------------------------------
? Become a patron ?
? https://www.patreon.com/drpi
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 1000 free API calls. No credit card required.)
Thumbs up yeah? (cos Algos..)
#githubactions #poetry #python
...
https://www.youtube.com/watch?v=HNhjWqZaFog
Dr Pi extracts metadata from YouTube using a Pi, and the YouTube API!
A Pi Zero can run the Python code to use an API to get the following from YouTube about any given channel, as long as you register for a free API key. Having already used it for Web Scraping with Beautiful Soup to get stock prices I thought I would test it with the YouTube APi to request statistics about a channel.
Install :pip install google-api-python-client and refer to the sample code and there is no reason why a PI Zero can't be used to get the data you want.
eg.
1. Video title
2. Subscribe count
3. Video id
4. Video description
5. Likes count
6. Dislikes count
7. Views count
8. Published date
9. Comment count
10. Comment text
11. Comment likes and dislikes
12. Comment author
Useful reference:
⏵https://github.com/youtube/api-samples
⏵https://github.com/youtube/api-sample...
✔ Code available at : https://github.com/RGGH/rng/blob/mast...
✔ See my other YouTube API code here : https://github.com/RGGH/rng
☕☕☕ Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi ☕☕☕
...
https://www.youtube.com/watch?v=8-qS-YUEHoo
How to find median in Numpy 2d array and match to another column
Many thanks to Alexandru Dinu
code : https://github.com/RGGH/ONE-LINERS/blob/main/np_dev_salary.ipynb
Subscribe to the YouTube Channel
=================================
? https://www.youtube.com/c/DrPiCode
Follow on Twitter - to get notified of new videos
=================================================
? https://twitter.com/RngWeb
? Become a patron ?
? https://www.patreon.com/drpi
https://stackoverflow.com/questions/71238023/how-to-find-median-in-numpy-2d-array-with-matching-column
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 1000 free API calls. No credit card required.)
Thumbs up yeah? (cos Algos..)
#numpy #tutorials #python
...
https://www.youtube.com/watch?v=KjimpbdJOQ0
Code to extract text from video using tesseract OCR.
"Python-tesseract is an optical character recognition (OCR) tool for python. That is, it will recognize and “read” the text embedded in images."
? Is your boss a ?? ?
Let me know in the comments!
chapter times:
_____________________________
0:00 Intro - Boss calls again
1:55 Code
03:46 process
06:13 get text
08:12 source mp4
11:35 output from OCR tesseract
18:20 future idea
_______________________________________
? Become a patron ?
? https://www.patreon.com/drpi
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
Visit redandgreen blog for more Tutorials
=========================================
? http://redandgreen.co.uk/about/blog/
Subscribe to the YouTube Channel
=================================
? https://www.youtube.com/c/DrPiCode
Follow on Twitter - to get notified of new videos
=================================================
? https://twitter.com/RngWeb
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 1000 free API calls. No credit card required.)
Thumbs up yeah? (cos Algos..)
#OCR #Tesseract #python
...
https://www.youtube.com/watch?v=EkSaIJTruTA