Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/v23qzz
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/v23qzz
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/v2vgf8
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/v2vgf8
reddit
Thursday Daily Thread: Python Careers, Courses, and Furthering...
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python...
Make Your Matplotlib Plots Stand Out Using This Cheat Sheet
https://pub.towardsai.net/make-your-matplotlib-plots-stand-out-using-this-cheat-sheet-8c666de90433
/r/pystats
https://redd.it/uyv4tq
https://pub.towardsai.net/make-your-matplotlib-plots-stand-out-using-this-cheat-sheet-8c666de90433
/r/pystats
https://redd.it/uyv4tq
Medium
Make Your Matplotlib Plots Stand Out Using This Cheat Sheet
Cheat sheet for editing the background, ticks, and annotations in Matplotlib
Making a Custom Graph in Jupyter Noteboook
I'm interested in plotting nontraditional logic,math, and networking graphs that don't fall on xy planes or maps. Does anyone know good tutorials for making these nontraditional graphs in Jupyter notebook I would also like them to be interactive?
/r/JupyterNotebooks
https://redd.it/v3h6or
I'm interested in plotting nontraditional logic,math, and networking graphs that don't fall on xy planes or maps. Does anyone know good tutorials for making these nontraditional graphs in Jupyter notebook I would also like them to be interactive?
/r/JupyterNotebooks
https://redd.it/v3h6or
reddit
Making a Custom Graph in Jupyter Noteboook
I'm interested in plotting nontraditional logic,math, and networking graphs that don't fall on xy planes or maps. Does anyone know good tutorials...
How to connect SQL Server to Jupyter
Hello guys! Does anyone know how's the best way to connect to SQL Server through Jupyter Notebooks?
​
Thanks in advance
/r/JupyterNotebooks
https://redd.it/v780gr
Hello guys! Does anyone know how's the best way to connect to SQL Server through Jupyter Notebooks?
​
Thanks in advance
/r/JupyterNotebooks
https://redd.it/v780gr
reddit
How to connect SQL Server to Jupyter
Hello guys! Does anyone know how's the best way to connect to SQL Server through Jupyter Notebooks? Thanks in advance
Django: Live PostgreSQL Database using AWS
Hi, have you tried creating a live PostgreSQL database for your Django project and it didn't work. In this video I will show you how to create a live PostgreSQL database through AWS.
https://youtu.be/sKIXAM_n3vU
/r/django
https://redd.it/vj198y
Hi, have you tried creating a live PostgreSQL database for your Django project and it didn't work. In this video I will show you how to create a live PostgreSQL database through AWS.
https://youtu.be/sKIXAM_n3vU
/r/django
https://redd.it/vj198y
YouTube
Django: How to Create a Live PostgreSQL Database using AWS (Amazon Web Services).
Hi, in this video you will learn how to setup a live PostgreSQL database in Django using AWS (Amazon Web Services) for free.
Happy learning!
We will appreciate your support
Paypal:
clintonmatics@gmail.com
Patreon:
https://www.patreon.com/codewithclinton…
Happy learning!
We will appreciate your support
Paypal:
clintonmatics@gmail.com
Patreon:
https://www.patreon.com/codewithclinton…
Old android phone as flask test server
I know this isn't anything new, but I hadn't considered this before so thought I'd share. Flask apps are pretty lightweight so I pulled out an old Pixel 3 XL I had laying around and repurposed it into a flask dev server in no time and doesn't require rooting (unless you want docker). Shouldn't harm anything, but usual disclaimer if you try this on your primary phone.
1. Factory reset phone for good starting base (Optional, recommended if you aren't using it)
1. Also connect to wifi
2. Install termux (from f-droid, not the app store)
1. Download apk: f-droid.org/repo/com.termux_118.apk
2. Allow install from external sources and install
3. Launch termux
3. Set password and update environment
1.
2.
4. Install and run ssh server (dropbear for convenience)
1.
2.
5. Termine IP address and test ssh (should be able to access)
1.
6. Install python
1.
7. Create your flask application, scp it over if needed, and run in termux
1.
8. You should
/r/flask
https://redd.it/vlz6kt
I know this isn't anything new, but I hadn't considered this before so thought I'd share. Flask apps are pretty lightweight so I pulled out an old Pixel 3 XL I had laying around and repurposed it into a flask dev server in no time and doesn't require rooting (unless you want docker). Shouldn't harm anything, but usual disclaimer if you try this on your primary phone.
1. Factory reset phone for good starting base (Optional, recommended if you aren't using it)
1. Also connect to wifi
2. Install termux (from f-droid, not the app store)
1. Download apk: f-droid.org/repo/com.termux_118.apk
2. Allow install from external sources and install
3. Launch termux
3. Set password and update environment
1.
passwd2.
pkg update && pkg upgrade4. Install and run ssh server (dropbear for convenience)
1.
pkg install dropbear2.
dropbear5. Termine IP address and test ssh (should be able to access)
1.
ifconfig|grep inet6. Install python
1.
pkg install python7. Create your flask application, scp it over if needed, and run in termux
1.
flask run -h 0.0.0.0 -p 50008. You should
/r/flask
https://redd.it/vlz6kt
reddit
Old android phone as flask test server
I know this isn't anything new, but I hadn't considered this before so thought I'd share. Flask apps are pretty lightweight so I pulled out an old...
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/vq4m4j
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/vq4m4j
reddit
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...
Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/vsc2cv
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/vsc2cv
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/vt4i5k
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/vt4i5k
reddit
Thursday Daily Thread: Python Careers, Courses, and Furthering...
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python...
Python is the 2nd most demanded programming language in 2022
https://www.devjobsscanner.com/blog/top-8-most-demanded-languages-in-2022/
/r/Python
https://redd.it/vtiz4o
https://www.devjobsscanner.com/blog/top-8-most-demanded-languages-in-2022/
/r/Python
https://redd.it/vtiz4o
Devjobsscanner
Top 8 Most Demanded Programming Languages in 2024
Ever wondered which is the most demanded programming language in 2024? Although there are more than 200+ programming languages, only few of them are used in the real world industry. Knowing this information is essential to succeed in the developer job industry.…
Humble Software Bundle: Opearation Python 2022
https://www.humblebundle.com/operation-python-2022-software
/r/django
https://redd.it/vu5jzx
https://www.humblebundle.com/operation-python-2022-software
/r/django
https://redd.it/vu5jzx
Humble Bundle
Humble Software Bundle: Operation Python 2022
Learn Python programming through a mix of online courses, video lessons, and ebooks Write Pythonic Code Like a Seasoned Developer. Pay what you want & support charity!
Just finished up a big release for a little side project. I rarely see real-world examples of Flask projects on this sub, so I figured I'd share what I built. It's fairly simple, but happy to answer questions.
http://www.fantasynamesearch.com
/r/flask
https://redd.it/vud22s
http://www.fantasynamesearch.com
/r/flask
https://redd.it/vud22s
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.
Jupyter Notebook Competition deadline coming up!
The Jupyter Notebook Competition deadline is fast approaching!
https://preview.redd.it/7zh3i14eyx991.png?width=1920&format=png&auto=webp&s=954265fdc4daad581167051f72f4f17eb33d94bf
Don't miss out on your chance to contribute to a community-driven resource of notebooks on the Copernicus WEkEO platform, AND be in with a chance of winning cash prizes!
Visit: https://www.eumetsat.int/features/new-jupyter-notebook-competition
/r/JupyterNotebooks
https://redd.it/vsotwi
The Jupyter Notebook Competition deadline is fast approaching!
https://preview.redd.it/7zh3i14eyx991.png?width=1920&format=png&auto=webp&s=954265fdc4daad581167051f72f4f17eb33d94bf
Don't miss out on your chance to contribute to a community-driven resource of notebooks on the Copernicus WEkEO platform, AND be in with a chance of winning cash prizes!
Visit: https://www.eumetsat.int/features/new-jupyter-notebook-competition
/r/JupyterNotebooks
https://redd.it/vsotwi
Deploy react inside django as a django app on Heroku
I have worked with deploying django and react separately as separate heroku apps and integrate them. But I don't know how to deploy a structure where the reactapp is inside Django's project directory disguised as a django app. How do you run the npm build on Heroku? I couldn't find any tutorials that does this, can someone help me out here? thanks!
/r/django
https://redd.it/w12hk0
I have worked with deploying django and react separately as separate heroku apps and integrate them. But I don't know how to deploy a structure where the reactapp is inside Django's project directory disguised as a django app. How do you run the npm build on Heroku? I couldn't find any tutorials that does this, can someone help me out here? thanks!
/r/django
https://redd.it/w12hk0
reddit
Deploy react inside django as a django app on Heroku
I have worked with deploying django and react separately as separate heroku apps and integrate them. But I don't know how to deploy a structure...
nbsnapshot - Automated Jupyter Notebook Testing
​
https://preview.redd.it/hfag3h6fyl991.png?width=1201&format=png&auto=webp&s=ce07fd38ec64cdd33578d2157a7c955a82ce4b42
Hi all!
I want to share a project I've been working on to facilitate Jupyter notebook testing!
When analyzing data in a Jupyter notebook, I unconsciously memorize "rules of thumb" to determine if my results are correct. For example, I might print some summary statistics and become skeptical of some outputs if they deviate too much from what I've seen historically. For more complex analysis, I often create diagnostic plots (e.g., a histogram) and check them whenever new data arrives.
Since I constantly repeat the same process, I figured I'd code a small library to streamline this process. nbsnapshot benchmarks cell's outputs with historical results and raises an error if the output deviates from an expected range (by default, 3 standard deviations from the mean). You can see an example in the image accompanying this post.
To learn more, check out the blog post.
I'd love to hear what you think!
/r/IPython
https://redd.it/vrg1yv
​
https://preview.redd.it/hfag3h6fyl991.png?width=1201&format=png&auto=webp&s=ce07fd38ec64cdd33578d2157a7c955a82ce4b42
Hi all!
I want to share a project I've been working on to facilitate Jupyter notebook testing!
When analyzing data in a Jupyter notebook, I unconsciously memorize "rules of thumb" to determine if my results are correct. For example, I might print some summary statistics and become skeptical of some outputs if they deviate too much from what I've seen historically. For more complex analysis, I often create diagnostic plots (e.g., a histogram) and check them whenever new data arrives.
Since I constantly repeat the same process, I figured I'd code a small library to streamline this process. nbsnapshot benchmarks cell's outputs with historical results and raises an error if the output deviates from an expected range (by default, 3 standard deviations from the mean). You can see an example in the image accompanying this post.
To learn more, check out the blog post.
I'd love to hear what you think!
/r/IPython
https://redd.it/vrg1yv
Incoporating lens(df) value into groupby() function
Task 5b: Calculate percentage of people with work experience that are offered a job, the percentage of people with work experience not offered a job, the people with no work experience offered a job and the percentage of people with no work experience not offered a job.
len(df.index)
print(df.index)
output
RangeIndex(start=0, stop=120, step=1)
Tried to put the value of 120 into groupby but failed
​
dfworkexp = (df.groupby('index')['status']
.valuecounts(normalize=True)
.resetindex(name='perc'))
print (dfworkexp)
/r/IPython
https://redd.it/w3isc0
Task 5b: Calculate percentage of people with work experience that are offered a job, the percentage of people with work experience not offered a job, the people with no work experience offered a job and the percentage of people with no work experience not offered a job.
len(df.index)
print(df.index)
output
RangeIndex(start=0, stop=120, step=1)
Tried to put the value of 120 into groupby but failed
​
dfworkexp = (df.groupby('index')['status']
.valuecounts(normalize=True)
.resetindex(name='perc'))
print (dfworkexp)
/r/IPython
https://redd.it/w3isc0
reddit
Incoporating lens(df) value into groupby() function
Task 5b: Calculate percentage of people with work experience that are offered a job, the percentage of people with work experience not offered a...
Publishing charts on the web with Panel - is HvPlot relevant?
I switched a while back from Matplotlib and Seaborg to Plotly - since it's interactive and just IMHO looks better. I've been looking to implement some of my figures on my website. There is a simple way to simply export to HTML from Jupyter, but I see two limitations with this:
1) The code is very long, and sometimes crashes my browser when just pasting the code for a single figure
2) As I understand it there are limitations to the interactivity with this approach.
Due to this, I've been looking into Panel and HvPlot. There are so many modules mentioned around the docs though that I can hardly see what is relevant to my use case. It seems Plotly can be implemented directly in Panel so I'm not sure if HvPlot should be used as a medium between Plotly and Panel to enable more functions or rather as an alternative to Plotly.
If anyone has experience setting up widgets and similar, I'd be very interested in some tips here!
/r/IPython
https://redd.it/vri0lz
I switched a while back from Matplotlib and Seaborg to Plotly - since it's interactive and just IMHO looks better. I've been looking to implement some of my figures on my website. There is a simple way to simply export to HTML from Jupyter, but I see two limitations with this:
1) The code is very long, and sometimes crashes my browser when just pasting the code for a single figure
2) As I understand it there are limitations to the interactivity with this approach.
Due to this, I've been looking into Panel and HvPlot. There are so many modules mentioned around the docs though that I can hardly see what is relevant to my use case. It seems Plotly can be implemented directly in Panel so I'm not sure if HvPlot should be used as a medium between Plotly and Panel to enable more functions or rather as an alternative to Plotly.
If anyone has experience setting up widgets and similar, I'd be very interested in some tips here!
/r/IPython
https://redd.it/vri0lz
Reddit
From the IPython community on Reddit
Explore this post and more from the IPython community
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/wcb3af
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/wcb3af
reddit
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...
Plotting 3D vectors with autosized coordinate axis
I often need to visualize 3D vectors for statics problems in Jupyter Lab for which i currently use the following code using matplotlib quiver. I currently normalize the vectors to keep them within the area, but that's a huge limitation.
I'd like to have the colored coordinate axis (x,y,z) shown all the time, and have the axis scale with the plot area automatically, depending on the position and size of the plotted vectors. The plot would show the actual magnitude and direction of the vector. Can anyone help me out?
The following code produces the plot:
[Plot](https://i.stack.imgur.com/1kz8n.png)
import matplotlib.pyplot as plt
%matplotlib ipympl
# vector data. not important
roa_vek=Matrix([0,0,12])
rob_vek=Matrix([4,12,0])
rab_vek=rob_vek-roa_vek
f=2000
fab_vek=f*rab_vek/rab_vek.norm()
mo=roa_vek.cross(fab_vek)
ax=plt.figure().add_subplot(projection='3d')
# if i dont set these, the plot is all zoomed in
ax.set_xlim([-1,1])
ax.set_ylim([-1,1])
ax.set_zlim([-1,1])
ax.set_xlabel("X")
ax.set_ylabel("Y")
ax.set_zlabel("Z")
origo=[0,0,0]
ax.view_init(30, 45)
# Coordinate system
/r/IPython
https://redd.it/wfums8
I often need to visualize 3D vectors for statics problems in Jupyter Lab for which i currently use the following code using matplotlib quiver. I currently normalize the vectors to keep them within the area, but that's a huge limitation.
I'd like to have the colored coordinate axis (x,y,z) shown all the time, and have the axis scale with the plot area automatically, depending on the position and size of the plotted vectors. The plot would show the actual magnitude and direction of the vector. Can anyone help me out?
The following code produces the plot:
[Plot](https://i.stack.imgur.com/1kz8n.png)
import matplotlib.pyplot as plt
%matplotlib ipympl
# vector data. not important
roa_vek=Matrix([0,0,12])
rob_vek=Matrix([4,12,0])
rab_vek=rob_vek-roa_vek
f=2000
fab_vek=f*rab_vek/rab_vek.norm()
mo=roa_vek.cross(fab_vek)
ax=plt.figure().add_subplot(projection='3d')
# if i dont set these, the plot is all zoomed in
ax.set_xlim([-1,1])
ax.set_ylim([-1,1])
ax.set_zlim([-1,1])
ax.set_xlabel("X")
ax.set_ylabel("Y")
ax.set_zlabel("Z")
origo=[0,0,0]
ax.view_init(30, 45)
# Coordinate system
/r/IPython
https://redd.it/wfums8
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/wi1x0f
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/wi1x0f
reddit
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...