Not sure if my Django virtual environment is set up correctly.
I've set up a Django virtual environment. And when I start it by running:
>workon my\_django\_environment
The prompt then displays as follows:
>(my\_django\_environment) pi@raspberrypi:\~ $
Is this correct? Should the pi@raspberrypi:\~ still be there?
If I do this:
>(my\_django\_environment) pi@raspberrypi:\~ $ ls
Then it lists everything in my actual non virtual environment Home folder. But when following guides for setting this up - when they use ls it only shows the files in the virtual environment folder?
I'm confused...
/r/django
https://redd.it/ixkfwa
I've set up a Django virtual environment. And when I start it by running:
>workon my\_django\_environment
The prompt then displays as follows:
>(my\_django\_environment) pi@raspberrypi:\~ $
Is this correct? Should the pi@raspberrypi:\~ still be there?
If I do this:
>(my\_django\_environment) pi@raspberrypi:\~ $ ls
Then it lists everything in my actual non virtual environment Home folder. But when following guides for setting this up - when they use ls it only shows the files in the virtual environment folder?
I'm confused...
/r/django
https://redd.it/ixkfwa
reddit
Not sure if my Django virtual environment is set up correctly.
I've set up a Django virtual environment. And when I start it by running: >workon my\_django\_environment The prompt then displays as...
django best way to manage CRUD
I am performing a way to Delete/update/get in a same view like
​
class APICRUDVIEW(APIView):
def get(self,request,id):
....
def put(self,request,id):
....
​
def delete(self,request,id):
....
​
​
So that thing doesn't violate \`SRP\` (Single Responsibility Principle ). Like according to that a class strictly should perform a single task. Or its best way to include all these in a class in django ?
/r/django
https://redd.it/ixkuqy
I am performing a way to Delete/update/get in a same view like
​
class APICRUDVIEW(APIView):
def get(self,request,id):
....
def put(self,request,id):
....
​
def delete(self,request,id):
....
​
​
So that thing doesn't violate \`SRP\` (Single Responsibility Principle ). Like according to that a class strictly should perform a single task. Or its best way to include all these in a class in django ?
/r/django
https://redd.it/ixkuqy
reddit
django best way to manage CRUD
I am performing a way to Delete/update/get in a same view like class APICRUDVIEW(APIView): def get(self,request,id): .... def...
I made a pathfinding visualizer (Code Below) [Feedbacks appreciated]
I made Dijkstra's pathfinding algorithm visualized using pygame.
Check the Visualization: [https://youtu.be/3yUPeIayvfU](https://youtu.be/3yUPeIayvfU)
GitHub Link: [https://github.com/nas-programmer/path-finding/blob/master/djikstra.py](https://github.com/nas-programmer/path-finding/blob/master/djikstra.py)
Feedback/criticism appreciated
/r/Python
https://redd.it/ixgobe
I made Dijkstra's pathfinding algorithm visualized using pygame.
Check the Visualization: [https://youtu.be/3yUPeIayvfU](https://youtu.be/3yUPeIayvfU)
GitHub Link: [https://github.com/nas-programmer/path-finding/blob/master/djikstra.py](https://github.com/nas-programmer/path-finding/blob/master/djikstra.py)
Feedback/criticism appreciated
/r/Python
https://redd.it/ixgobe
YouTube
Dijkstra's Path Finding Visualizer using Python Pygame (Shortest Pathfinding Algorithm)
Dijkstra's pathfinding visualization, Dijkstra's Algorithm.
Path Finding Algorithm using queues. Making the distance between the nodes a constant number 1.
Please leave a LIKE and SUBSCRIBE for more content!
https://www.youtube.com/channel/UCE_Q2KfZFP4…
Path Finding Algorithm using queues. Making the distance between the nodes a constant number 1.
Please leave a LIKE and SUBSCRIBE for more content!
https://www.youtube.com/channel/UCE_Q2KfZFP4…
I need an IDE for Django that supports SSH.
I have a dev server, on which I intend to learn Django/Python. I would use VSCodium but it looks like the Python extension has the telemetry which I use VSCodium to avoid. And when it comes to PyCharm the community version doesn't support SSH...
Any recommendations?
/r/django
https://redd.it/ixn4a2
I have a dev server, on which I intend to learn Django/Python. I would use VSCodium but it looks like the Python extension has the telemetry which I use VSCodium to avoid. And when it comes to PyCharm the community version doesn't support SSH...
Any recommendations?
/r/django
https://redd.it/ixn4a2
reddit
I need an IDE for Django that supports SSH.
I have a dev server, on which I intend to learn Django/Python. I would use VSCodium but it looks like the Python extension has the telemetry which...
Most Popular Programming Languages on GitHub - 2011/2019
https://youtu.be/eCUy0F-oVXA
/r/JupyterNotebooks
https://redd.it/ixk7vo
https://youtu.be/eCUy0F-oVXA
/r/JupyterNotebooks
https://redd.it/ixk7vo
YouTube
The Most Popular Programming Languages on GitHub - 2011/2019
In this video the evolution of the most used Programming Languages on GitHub from 2011 to 2019. The data goes from September 2011 to December 2019. The data refers to the number of repository Stars exported from the GitHub Archive.
Source: GitHub Archive…
Source: GitHub Archive…
Three alternative ways of deploying Django
These are the notes from my talk at DjangoCon EU last week:
[https://gist.github.com/tomdyson/025be30855262287ae048bf4371d26f8](https://gist.github.com/tomdyson/025be30855262287ae048bf4371d26f8)
In 30 minutes I built a very simple Wagtail site and deployed it three times: on Dokku, Netlify and Google Cloud Run. Hopefully the instructions are enough for others to recreate the steps. Some caveats:
* although this demo uses Wagtail, any Django app with a working Dockerfile should work in the same way
* the steps are designed for a quick, impressive demo, and are not intended as best practice reference :)
* in particular, the Cloud Run steps are not complete - pushing a Docker-enabled app is really easy, but database connections and shell access (e.g. for running management commands) is annoyingly fiddly.
I believe the DjangoCon EU organisers will release talk videos in the next few weeks, but in the meantime here are the [slides from the talk](https://docs.google.com/presentation/d/e/2PACX-1vTP9sof4pZO6E9f6gnAVyrP0OW7y42npYdNCWYDMv2NmYivMXCvLdaO8y4eMBDdOh2otgrT-IqmfgNH/pub?start=false&loop=false&delayms=3000#slide=id.g98cee58a9e_0_41).
/r/django
https://redd.it/ixpn8r
These are the notes from my talk at DjangoCon EU last week:
[https://gist.github.com/tomdyson/025be30855262287ae048bf4371d26f8](https://gist.github.com/tomdyson/025be30855262287ae048bf4371d26f8)
In 30 minutes I built a very simple Wagtail site and deployed it three times: on Dokku, Netlify and Google Cloud Run. Hopefully the instructions are enough for others to recreate the steps. Some caveats:
* although this demo uses Wagtail, any Django app with a working Dockerfile should work in the same way
* the steps are designed for a quick, impressive demo, and are not intended as best practice reference :)
* in particular, the Cloud Run steps are not complete - pushing a Docker-enabled app is really easy, but database connections and shell access (e.g. for running management commands) is annoyingly fiddly.
I believe the DjangoCon EU organisers will release talk videos in the next few weeks, but in the meantime here are the [slides from the talk](https://docs.google.com/presentation/d/e/2PACX-1vTP9sof4pZO6E9f6gnAVyrP0OW7y42npYdNCWYDMv2NmYivMXCvLdaO8y4eMBDdOh2otgrT-IqmfgNH/pub?start=false&loop=false&delayms=3000#slide=id.g98cee58a9e_0_41).
/r/django
https://redd.it/ixpn8r
Gist
New ways to deploy your Django app
New ways to deploy your Django app. GitHub Gist: instantly share code, notes, and snippets.
I finally published my first pip package. Enter a reddit user and get organized data out. It also can download all of their pictures
pip3 install redditsfinder
https://pypi.org/project/redditsfinder/
I've been working on this for a while and it's neat. The readme has everything you need to know to use it.
https://i.imgur.com/t0hR7Oc.png
https://i.imgur.com/1bMuKlV.png
I will be happy to answer any questions about it.
/r/Python
https://redd.it/ixh6zl
pip3 install redditsfinder
https://pypi.org/project/redditsfinder/
I've been working on this for a while and it's neat. The readme has everything you need to know to use it.
https://i.imgur.com/t0hR7Oc.png
https://i.imgur.com/1bMuKlV.png
I will be happy to answer any questions about it.
/r/Python
https://redd.it/ixh6zl
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/ixzcum
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
/r/Python
https://redd.it/ixzcum
reddit
Wednesday megathread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
I created a webapp to help find new fantasy football team names. Feedback appreciated!
xpost from r/fantasyfootball
In my spare time I build things. I created [Fantasy Name Search (fantasynamesearch.com)](http://fantasynamesearch.com/) to help managers find new team names based on their current roster of players or any other key terms. I wrote everything in Python and used the pool of Yahoo's 2019 public leagues as source data for all 500,000 team names. I hope you find it somewhat useful in finding a new team name, if not just for fun to find the most outrageous team names. Let me know what you think!
For those more programmatically literate, I wrote an article describing the guts of the project and process in a little more detail: [https://medium.com/swlh/in-search-of-a-fantasy-football-name-5656e8af5944](https://medium.com/swlh/in-search-of-a-fantasy-football-name-5656e8af5944)
GitHub Repo: [https://github.com/bbenbenek/FantasyNameSearch](https://github.com/bbenbenek/FantasyNameSearch) (updated as code is cleaned up)
/r/flask
https://redd.it/ixsuzw
xpost from r/fantasyfootball
In my spare time I build things. I created [Fantasy Name Search (fantasynamesearch.com)](http://fantasynamesearch.com/) to help managers find new team names based on their current roster of players or any other key terms. I wrote everything in Python and used the pool of Yahoo's 2019 public leagues as source data for all 500,000 team names. I hope you find it somewhat useful in finding a new team name, if not just for fun to find the most outrageous team names. Let me know what you think!
For those more programmatically literate, I wrote an article describing the guts of the project and process in a little more detail: [https://medium.com/swlh/in-search-of-a-fantasy-football-name-5656e8af5944](https://medium.com/swlh/in-search-of-a-fantasy-football-name-5656e8af5944)
GitHub Repo: [https://github.com/bbenbenek/FantasyNameSearch](https://github.com/bbenbenek/FantasyNameSearch) (updated as code is cleaned up)
/r/flask
https://redd.it/ixsuzw
Fantasy Name Search
Fantasy Name Search: Dominate the Name Game
Fantasy Name Search is the #1 fantasy team name search engine. It's your one-stop shop for finding a new fantasy team name and fantasy sports analytics.
[N] Microsoft teams up with OpenAI to exclusively license GPT-3 language model
"""OpenAI will continue to offer GPT-3 and other powerful models via its own Azure-hosted API, launched in June. While we’ll be hard at work utilizing the capabilities of GPT-3 in our own products, services and experiences to benefit our customers, we’ll also continue to work with OpenAI to keep looking forward: leveraging and democratizing the power of their cutting-edge AI research as they continue on their mission to build safe artificial general intelligence."""
https://blogs.microsoft.com/blog/2020/09/22/microsoft-teams-up-with-openai-to-exclusively-license-gpt-3-language-model/
/r/MachineLearning
https://redd.it/ixs88q
"""OpenAI will continue to offer GPT-3 and other powerful models via its own Azure-hosted API, launched in June. While we’ll be hard at work utilizing the capabilities of GPT-3 in our own products, services and experiences to benefit our customers, we’ll also continue to work with OpenAI to keep looking forward: leveraging and democratizing the power of their cutting-edge AI research as they continue on their mission to build safe artificial general intelligence."""
https://blogs.microsoft.com/blog/2020/09/22/microsoft-teams-up-with-openai-to-exclusively-license-gpt-3-language-model/
/r/MachineLearning
https://redd.it/ixs88q
The Official Microsoft Blog
Microsoft teams up with OpenAI to exclusively license GPT-3 language model
One of the most gratifying parts of my job at Microsoft is being able to witness and influence the intersection of technological progress and impact: harnessing the big trends in computing that have the opportunity to benefit everybody on the planet. Frank’s…
Should I split my API and Worker?
I have a flask api that currently puts jobs on rq queues to be processed. The api and the "processing engine" is all part of the same flask code base and I launch it all together in a single docker container (with docker-compose). Let's say I have this app deployed on an EC2.
I am confused on how to scale this when there is a bottleneck on jobs and not the API. If I scale the EC2 instances directly, I'll have multiple APIs running, but the bottleneck is in the queues.
So should I instead split my API and Queues into separate docker instances? And then deploy each of those on separate servers? That way I can load balance the queue servers separately but the API can still run on a single instance.
Just want to make sure I am thinking about this correctly.
/r/flask
https://redd.it/ixyeur
I have a flask api that currently puts jobs on rq queues to be processed. The api and the "processing engine" is all part of the same flask code base and I launch it all together in a single docker container (with docker-compose). Let's say I have this app deployed on an EC2.
I am confused on how to scale this when there is a bottleneck on jobs and not the API. If I scale the EC2 instances directly, I'll have multiple APIs running, but the bottleneck is in the queues.
So should I instead split my API and Queues into separate docker instances? And then deploy each of those on separate servers? That way I can load balance the queue servers separately but the API can still run on a single instance.
Just want to make sure I am thinking about this correctly.
/r/flask
https://redd.it/ixyeur
reddit
Should I split my API and Worker?
I have a flask api that currently puts jobs on rq queues to be processed. The api and the "processing engine" is all part of the same flask code...
Python in Car Racing - Interview about simulation and test software at RCR
https://talkpython.fm/episodes/show/281/python-in-car-racing
/r/Python
https://redd.it/iy21cn
https://talkpython.fm/episodes/show/281/python-in-car-racing
/r/Python
https://redd.it/iy21cn
talkpython.fm
Python in Car Racing
I love to bring you stories of Python being used in amazing places outside the traditional tech silos of pure web development and data science. On this episode, you'll meet Robert 'Kane' Replogle, who works on the simulation and test software at Richard…
New easy to use JWT token based Authentication for Flask Apps
​
​
[Flask JWT Router](https://preview.redd.it/kljqppppiro51.png?width=4113&format=png&auto=webp&s=bb193e7ff953351f4267807cae44f530aa8c2ed1)
Please try out a new token based Authentication library for flask. Great for apps that provide data for Single Page apps (React, Angular, Vue.js etc.)
[https://github.com/joegasewicz/flask-jwt-router](https://github.com/joegasewicz/flask-jwt-router)
It directly hooks up to Flask-SqlAlchemy, so your logged in user is accessible on Flask's global context object (Please see the docs)
/r/flask
https://redd.it/ixw51n
​
​
[Flask JWT Router](https://preview.redd.it/kljqppppiro51.png?width=4113&format=png&auto=webp&s=bb193e7ff953351f4267807cae44f530aa8c2ed1)
Please try out a new token based Authentication library for flask. Great for apps that provide data for Single Page apps (React, Angular, Vue.js etc.)
[https://github.com/joegasewicz/flask-jwt-router](https://github.com/joegasewicz/flask-jwt-router)
It directly hooks up to Flask-SqlAlchemy, so your logged in user is accessible on Flask's global context object (Please see the docs)
/r/flask
https://redd.it/ixw51n
This media is not supported in your browser
VIEW IN TELEGRAM
I had tried to visualise the sorting of a data structure for the programmers who are new in data structure
/r/Python
https://redd.it/iy48av
/r/Python
https://redd.it/iy48av
Use Google's Personal data about you - a simple project with Python
​
[A little sample on what you can build](https://preview.redd.it/hpbg033r8uo51.png?width=414&format=png&auto=webp&s=4c7da328e960127c1ddd74208b125ace2a0d12b7)
A simple project that downloads your personal data from Google. Read more about it [here](https://python-everything.com/post/136/Google-is-tracking-you%2C-and-you-can-pitch-in-to-analyse-the-data%21.html)
/r/Python
https://redd.it/iy4oop
​
[A little sample on what you can build](https://preview.redd.it/hpbg033r8uo51.png?width=414&format=png&auto=webp&s=4c7da328e960127c1ddd74208b125ace2a0d12b7)
A simple project that downloads your personal data from Google. Read more about it [here](https://python-everything.com/post/136/Google-is-tracking-you%2C-and-you-can-pitch-in-to-analyse-the-data%21.html)
/r/Python
https://redd.it/iy4oop
What is the difference between these 3: index(request, args, kwargs), index( args, kwargs), index(request)?
I have seen all these 3: `def index(request), def index(request, args, kwargs), def index( args, kwargs)`in tutorials. what is the difference and which function should I use ? Any help will be greatly appreciated. Thank you.
/r/django
https://redd.it/iy6bgz
I have seen all these 3: `def index(request), def index(request, args, kwargs), def index( args, kwargs)`in tutorials. what is the difference and which function should I use ? Any help will be greatly appreciated. Thank you.
/r/django
https://redd.it/iy6bgz
reddit
What is the difference between these 3: index(request, args,...
I have seen all these 3: `def index(request), def index(request, args, kwargs), def index( args, kwargs)`in tutorials. what is the difference and...
Why Django as seperate backend and Vue as seperate frontend, when we can have Vue inaide of Django templates ?
/r/django
https://redd.it/iy1uh6
/r/django
https://redd.it/iy1uh6
reddit
Why Django as seperate backend and Vue as seperate frontend, when...
Posted in r/django by u/prashantabides • 17 points and 12 comments
Solution for allowing API access from external apps?
Hello!
I have a django webapp and wanted to hear some suggestions for api access for external applications. I would like to allow users to be able to make protected API calls into my platform with best security practices.
What I had in mind was giving a token for external platforms and setting up an API urls route for all the calls that they may need. But that is about the most I can think of. Any one with a system with great suggestions?
/r/django
https://redd.it/iyco94
Hello!
I have a django webapp and wanted to hear some suggestions for api access for external applications. I would like to allow users to be able to make protected API calls into my platform with best security practices.
What I had in mind was giving a token for external platforms and setting up an API urls route for all the calls that they may need. But that is about the most I can think of. Any one with a system with great suggestions?
/r/django
https://redd.it/iyco94
reddit
Solution for allowing API access from external apps?
Hello! I have a django webapp and wanted to hear some suggestions for api access for external applications. I would like to allow users to be...
A simple URL shortener using Flask (website in comments)
https://www.youtube.com/watch?v=YI16KWyA3M0
/r/flask
https://redd.it/iy5ocv
https://www.youtube.com/watch?v=YI16KWyA3M0
/r/flask
https://redd.it/iy5ocv
YouTube
URL Shortener using Python + Flask (explained beginner project)
In this video we are going to be building a simple URL shortener using Python and Flask. The process is fully explained and makes for a great way to learn flask. I tried to simplify the project as much as possible in order to make it beginner friendly.
…
…