Detailing PyTermGUI's brand new layout system
https://preview.redd.it/22cp2zza29z81.png?width=3090&format=png&auto=webp&s=9c4d46c4261cb7f76b6b542bd376bf00ccdcd491
The most popular request I've gotten related to my terminal UI library, PyTermGUI, was a way to create pre-defined layouts. This came alongside the question of "why focus so much on floating layouts?". Well, the reason is basically this update.
I knew for a long time that while implementing a layout system my biggest problem would be coming up with a sensible API (Funnily enough, the part of the layouts that actually arranges the windows on the screen is 3 lines of code). Because of the early focus on windowing support, implementing the new layout system brought the library to a best-of-both-worlds situation, as it's a lot harder to implement windowing into a tiled layout than vice-versa.
Here is an example of the API I ended up settling on. The code in question creates the layout seen above.
layout = Layout()
layout.addslot("Header", height=5)
layout.addslot("Header Left", width=0.2)
layout.addbreak()
layout.addslot("Body Left", width=0.2)
layout.addslot("Body", width=0.7)
layout.addslot("Body Right")
layout.addbreak()
layout.addslot("Footer", height=3)
As you can
/r/Python
https://redd.it/uot805
https://preview.redd.it/22cp2zza29z81.png?width=3090&format=png&auto=webp&s=9c4d46c4261cb7f76b6b542bd376bf00ccdcd491
The most popular request I've gotten related to my terminal UI library, PyTermGUI, was a way to create pre-defined layouts. This came alongside the question of "why focus so much on floating layouts?". Well, the reason is basically this update.
I knew for a long time that while implementing a layout system my biggest problem would be coming up with a sensible API (Funnily enough, the part of the layouts that actually arranges the windows on the screen is 3 lines of code). Because of the early focus on windowing support, implementing the new layout system brought the library to a best-of-both-worlds situation, as it's a lot harder to implement windowing into a tiled layout than vice-versa.
Here is an example of the API I ended up settling on. The code in question creates the layout seen above.
layout = Layout()
layout.addslot("Header", height=5)
layout.addslot("Header Left", width=0.2)
layout.addbreak()
layout.addslot("Body Left", width=0.2)
layout.addslot("Body", width=0.7)
layout.addslot("Body Right")
layout.addbreak()
layout.addslot("Footer", height=3)
As you can
/r/Python
https://redd.it/uot805
Django Q query
Is this
Poll.objects.get( Q(questionstartswith='Who'), Q(pubdate=date(2005, 5, 2)) | Q(pubdate=date(2005, 5, 6)) )
same as
Poll.objects.get( Q(questionstartswith='Who') & ( Q(pubdate=date(2005, 5, 2)) | Q(pubdate=date(2005, 5, 6)) ) )
​
/r/django
https://redd.it/up5fkq
Is this
Poll.objects.get( Q(questionstartswith='Who'), Q(pubdate=date(2005, 5, 2)) | Q(pubdate=date(2005, 5, 6)) )
same as
Poll.objects.get( Q(questionstartswith='Who') & ( Q(pubdate=date(2005, 5, 2)) | Q(pubdate=date(2005, 5, 6)) ) )
​
/r/django
https://redd.it/up5fkq
reddit
Django Q query
Is this Poll.objects.get( Q(question__startswith='Who'), Q(pub_date=date(2005, 5, 2)) | Q(pub_date=date(2005, 5, 6)) ) same as ...
Clearing up hard drive
First of all I am new to python. So after I plotted my data (there were huge data points) I noticed around 8 gb in my c drive was gone. Actually I have noticed this earlier. When ever I run a code, I find a noticible difference in my hard drive. So is python saving my data points in my pc or something? And how to clean up my hdd memory? Thanks
/r/IPython
https://redd.it/unf3u8
First of all I am new to python. So after I plotted my data (there were huge data points) I noticed around 8 gb in my c drive was gone. Actually I have noticed this earlier. When ever I run a code, I find a noticible difference in my hard drive. So is python saving my data points in my pc or something? And how to clean up my hdd memory? Thanks
/r/IPython
https://redd.it/unf3u8
reddit
Clearing up hard drive
First of all I am new to python. So after I plotted my data (there were huge data points) I noticed around 8 gb in my c drive was gone. Actually I...
Jupyter Notebook Competition Webinar 19 May
The Jupyter Notebook Competition is now well underway!
https://preview.redd.it/9rvusn7gz1z81.png?width=4400&format=png&auto=webp&s=74deb750c81078abe3d6e8efc5334693e156aff2
Still not sure if you'll enter? Join our webinar on 19 May where you'll learn more about how to build a community-driven resource of notebooks!
Enter into the race to win cash prizes - register at: https://us02web.zoom.us/webinar/register/WN\_yHQrZ0ySRx-IIK7wmXzZUA
/r/JupyterNotebooks
https://redd.it/uo21tc
The Jupyter Notebook Competition is now well underway!
https://preview.redd.it/9rvusn7gz1z81.png?width=4400&format=png&auto=webp&s=74deb750c81078abe3d6e8efc5334693e156aff2
Still not sure if you'll enter? Join our webinar on 19 May where you'll learn more about how to build a community-driven resource of notebooks!
Enter into the race to win cash prizes - register at: https://us02web.zoom.us/webinar/register/WN\_yHQrZ0ySRx-IIK7wmXzZUA
/r/JupyterNotebooks
https://redd.it/uo21tc
Using Jupyter/TensorBoard In Any Cloud Via Terraform Provider Interface Plugin (TPI)
https://hackernoon.com/using-jupytertensorboard-in-any-cloud-with-one-command
/r/JupyterNotebooks
https://redd.it/ue26bb
https://hackernoon.com/using-jupytertensorboard-in-any-cloud-with-one-command
/r/JupyterNotebooks
https://redd.it/ue26bb
Hackernoon
Using Jupyter/TensorBoard In Any Cloud With One Command | HackerNoon
Using Terraform Provider Iterative for bespoke Machine Learning & Data Science on AWS, Azure, GCP and K8s
Help me to repreesent images side by side using Flask
Hi guys. Assume I have a dictionary and render it to html page. I'm using for loop like:
{% for img in dics %}
<img ...>
{% endfor %}
so it print out images but after each loop, next image is printed in new line. But I'm hoping it's side by side. So how can I do it? Is it can solved by using Jinja2 or it's related to CSS. Sorry for my bad English and thanks for your answers!
/r/flask
https://redd.it/upa0n5
Hi guys. Assume I have a dictionary and render it to html page. I'm using for loop like:
{% for img in dics %}
<img ...>
{% endfor %}
so it print out images but after each loop, next image is printed in new line. But I'm hoping it's side by side. So how can I do it? Is it can solved by using Jinja2 or it's related to CSS. Sorry for my bad English and thanks for your answers!
/r/flask
https://redd.it/upa0n5
reddit
Help me to repreesent images side by side using Flask
Hi guys. Assume I have a dictionary and render it to html page. I'm using for loop like: {% for img in dics %} <img ...> {% endfor %} so it...
Hospital Management System || Django || Free Source Code
https://youtube.com/watch?v=qQWUROjhyLo&feature=share
/r/djangolearning
https://redd.it/upiuuu
https://youtube.com/watch?v=qQWUROjhyLo&feature=share
/r/djangolearning
https://redd.it/upiuuu
YouTube
Hospital Management System || Django || Free Source Code
Download Link :
https://yctacademy.blogspot.com/p/hospital-management-project-django-free.html
Python Django Projects : https://www.youtube.com/playlist?list=PLDLLuBZ1-EttZIZ60gOKr24hX2_ymSD91
Django Sweets Shop Project - 300 Rs Only - https://youtu.be/ytCDV1vGhEQ…
https://yctacademy.blogspot.com/p/hospital-management-project-django-free.html
Python Django Projects : https://www.youtube.com/playlist?list=PLDLLuBZ1-EttZIZ60gOKr24hX2_ymSD91
Django Sweets Shop Project - 300 Rs Only - https://youtu.be/ytCDV1vGhEQ…
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/up4vg6
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/up4vg6
reddit
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...
hey is there anny option to remove obj from table but not delete from DB?
for example i got start and stop button i want with the stop button that the obj removes from todays jobs. Anny functions ?
/r/django
https://redd.it/upge19
for example i got start and stop button i want with the stop button that the obj removes from todays jobs. Anny functions ?
/r/django
https://redd.it/upge19
reddit
hey is there anny option to remove obj from table but not delete...
for example i got start and stop button i want with the stop button that the obj removes from todays jobs. Anny functions ?
i want to Redirect to the same view after delete??
**so after deleting comment i can't back to detailviews of my comments , i need back with the pk of the post**
\#error
`Reverse for 'CommentsBack' not found. 'CommentsBack' is not a valid view function or pattern`
#views
# list all the comments of ever post l
class comment_back (DetailView):
model=Post
template_name='CommentsBack.html'
#delete comment by his primary key
def delete_comment(self,pk):
event=Comment.objects.get(pk=pk)
event.delete()
return redirect('CommentBack')
​
#urls
path('mypost/<int:pk>/commentBack', comment_back.as_view(),name="commentBack"),
path('DeleteComment/<int:pk>/remove', views.delete_comment,name="delete_comment"),
/r/djangolearning
https://redd.it/uplkto
**so after deleting comment i can't back to detailviews of my comments , i need back with the pk of the post**
\#error
`Reverse for 'CommentsBack' not found. 'CommentsBack' is not a valid view function or pattern`
#views
# list all the comments of ever post l
class comment_back (DetailView):
model=Post
template_name='CommentsBack.html'
#delete comment by his primary key
def delete_comment(self,pk):
event=Comment.objects.get(pk=pk)
event.delete()
return redirect('CommentBack')
​
#urls
path('mypost/<int:pk>/commentBack', comment_back.as_view(),name="commentBack"),
path('DeleteComment/<int:pk>/remove', views.delete_comment,name="delete_comment"),
/r/djangolearning
https://redd.it/uplkto
reddit
i want to Redirect to the same view after delete??
**so after deleting comment i can't back to detailviews of my comments , i need back with the pk of the post** \#error `Reverse for...
Hi all , weird one happening for me tonight . Started a new project and created my first few tables . When I created a super user via manage.py shell it won’t let me log in to /admin/
Any idea why it’s not allowing me in ?
/r/django
https://redd.it/upr3t4
Any idea why it’s not allowing me in ?
/r/django
https://redd.it/upr3t4
reddit
Hi all , weird one happening for me tonight . Started a new...
Any idea why it’s not allowing me in ?
Biometrics Enrollment in Django.
Please who has an idea on biometrics enrollment using Django? I am currently working on a web application that requires fingerprint capturing from users. The fingerprints are captured and saved to the database and users can also login through their username and their fingerprints.
Please I need your suggestions.
Thank you.
/r/djangolearning
https://redd.it/uph56b
Please who has an idea on biometrics enrollment using Django? I am currently working on a web application that requires fingerprint capturing from users. The fingerprints are captured and saved to the database and users can also login through their username and their fingerprints.
Please I need your suggestions.
Thank you.
/r/djangolearning
https://redd.it/uph56b
reddit
Biometrics Enrollment in Django.
Please who has an idea on biometrics enrollment using Django? I am currently working on a web application that requires fingerprint capturing from...
Hey, I have question on how adding a click event to my plotly object in a dash app. Actually, I am trying to open the ensembl website by clicking on a scatter structure (see figure attached) inside my plotly figure.
/r/IPython
https://redd.it/n5doto
/r/IPython
https://redd.it/n5doto
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/uptmup
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/uptmup
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...
How do you name the project directory?
It is about convention so I can do whatever I want at the end of the day. But let me ask this question.
By "project directory" I mean the inner mysite/ directory in the official Django tutorial.
In the official tutorial, the outer directory and the inner directory have the same name and I find it kind of confusing.
So I named it "config". But something doesn't feel right.
And I still find it confusing because you can have other config files or directories when developing with Django such as setup.cfg and pre-commit-config.yaml etc...
I prefer "project_config". But the name's kinda long and as far as I know, nobody uses it.
Some people apparently prefer"project".
https://forum.djangoproject.com/t/project-naming-conventions/339
What do you think about the name "project_config"? Redundant?
And how do you name the project directory?
/r/django
https://redd.it/uq06st
It is about convention so I can do whatever I want at the end of the day. But let me ask this question.
By "project directory" I mean the inner mysite/ directory in the official Django tutorial.
In the official tutorial, the outer directory and the inner directory have the same name and I find it kind of confusing.
So I named it "config". But something doesn't feel right.
And I still find it confusing because you can have other config files or directories when developing with Django such as setup.cfg and pre-commit-config.yaml etc...
I prefer "project_config". But the name's kinda long and as far as I know, nobody uses it.
Some people apparently prefer"project".
https://forum.djangoproject.com/t/project-naming-conventions/339
What do you think about the name "project_config"? Redundant?
And how do you name the project directory?
/r/django
https://redd.it/uq06st
Django Forum
"Project" Naming Conventions
Django newb here, I have seen a few articles touching on this topic but nothing that answered the question for me. I’m wondering how people prefer to name their project in Django. I’ve seen a variety of different ways: “project”, “config”, or even “app”.…
how can I create a startup notebook in jupyterlab preloaded with some imports and other code?
/r/JupyterNotebooks
https://redd.it/ubprl6
/r/JupyterNotebooks
https://redd.it/ubprl6
reddit
r/JupyterNotebooks - how can I create a startup notebook in jupyterlab preloaded with some imports and other code?
3 votes and 2 comments so far on Reddit
I made a package that prints trees to the console
​
https://preview.redd.it/ig0oabgn6lz81.jpg?width=469&format=pjpg&auto=webp&s=5d4114e527373799d18d77d193f1071f1c6c13c0
https://github.com/AharonSambol/PrettyPrintTree
I couldn't find any good way to print trees to the console... So I made one :)
It helps a ton with debugging!
/r/Python
https://redd.it/uq0bdo
​
https://preview.redd.it/ig0oabgn6lz81.jpg?width=469&format=pjpg&auto=webp&s=5d4114e527373799d18d77d193f1071f1c6c13c0
https://github.com/AharonSambol/PrettyPrintTree
I couldn't find any good way to print trees to the console... So I made one :)
It helps a ton with debugging!
/r/Python
https://redd.it/uq0bdo
Convert your Jupyter notebook into Machine Learning web app using Mercury framework..
https://www.analyticsvidhya.com/blog/2022/04/how-to-convert-jupyter-notebook-into-ml-web-app/
/r/JupyterNotebooks
https://redd.it/twk2jm
https://www.analyticsvidhya.com/blog/2022/04/how-to-convert-jupyter-notebook-into-ml-web-app/
/r/JupyterNotebooks
https://redd.it/twk2jm
Analytics Vidhya
How to Convert Jupyter Notebook into ML Web App?
In this article, we will see how to convert the Jupyter notebook into an application and deploy it on the Heroku platform.