My largest python program that i wrote after learning python. It's nothing much compared to what you guys post here.
/r/Python
https://redd.it/b6yegi
/r/Python
https://redd.it/b6yegi
Flask-login + Redis
Hi Everyone,
I'm developing my first flask app. I'm already using Redis for some other function and I'm now trying to add some security via user logins.
I'm wondering if its possible and if its safe to use Redis to manage my users for Flask Login
​
Thank you!
/r/flask
https://redd.it/b6yf7o
Hi Everyone,
I'm developing my first flask app. I'm already using Redis for some other function and I'm now trying to add some security via user logins.
I'm wondering if its possible and if its safe to use Redis to manage my users for Flask Login
​
Thank you!
/r/flask
https://redd.it/b6yf7o
reddit
r/flask - Flask-login + Redis
6 votes and 2 comments so far on Reddit
Open Redirect Vulnerability in Jupyter, JupyterHub
https://blog.jupyter.org/open-redirect-vulnerability-in-jupyter-jupyterhub-adf43583f1e4
/r/IPython
https://redd.it/b6yss8
https://blog.jupyter.org/open-redirect-vulnerability-in-jupyter-jupyterhub-adf43583f1e4
/r/IPython
https://redd.it/b6yss8
Medium
Open Redirect Vulnerability in Jupyter notebook, JupyterHub
JupyterHub ≤ 0.9.4 and Notebook ≤ 5.7.6 are affected. Versions 0.9.5 and 5.7.7 are released today with fixes. Upgrade with pip or conda:
We're a Django shop that produces a podcast about developer culture. This week we talked a lot about eCommerce frameworks for Django!
https://fridayafternoondeploy.simplecast.com/episodes/ecommerce-application-monitoring-and-da-xG6NxpC9
/r/django
https://redd.it/b70fax
https://fridayafternoondeploy.simplecast.com/episodes/ecommerce-application-monitoring-and-da-xG6NxpC9
/r/django
https://redd.it/b70fax
Friday Afternoon Deploy: A Developer Podcast
eCommerce, Application Monitoring, and Dashboards | Friday Afternoon Deploy: A Developer Podcast
Casey and Alan chat about the stuff they've been hacking on this week which includes eCommerce software, application monitoring tools and dashboard frameworks.
My best Python app - written in 2004 - An image editor and e-commerce app
https://imgur.com/gallery/N6skqdz
/r/Python
https://redd.it/b74x4z
https://imgur.com/gallery/N6skqdz
/r/Python
https://redd.it/b74x4z
Imgur
An image editor and e-commerce app written in Python
Post with 4 votes and 105 views. Shared by dogsnogger. An image editor and e-commerce app written in Python
Using JSONField to extend models in an asset inventory - good idea?
(Originally posted in /r/djangolearning but didn't get much traction. Hoping to get more input/ideas/best practices)
I'm building an asset management system as part of a larger project. I want to allow end users to add additional fields for assets.
I have three levels of models that help to organize and describe assets: AssetType in the most generic, then Asset, and finally the individual AssetInstance - the record for a single item.
Here are some stripped down model definitions:
class AssetType(models.Model):
'''
Very broad model used to create a hierarchical categorization of assets. For instance, "Vehicle"
'''
asset_type = ForeignKey(AssetType, ) # Asset Types can belong under other Asset Types
title = models.CharField(max_length=100)
additional_fields = models.JSONField() # Additional fields and parameters to be added to all AssetInstances of this AssetType
class Asset(models.Model):
'''
More specific . For instance, "Truck" with
/r/django
https://redd.it/b759rf
(Originally posted in /r/djangolearning but didn't get much traction. Hoping to get more input/ideas/best practices)
I'm building an asset management system as part of a larger project. I want to allow end users to add additional fields for assets.
I have three levels of models that help to organize and describe assets: AssetType in the most generic, then Asset, and finally the individual AssetInstance - the record for a single item.
Here are some stripped down model definitions:
class AssetType(models.Model):
'''
Very broad model used to create a hierarchical categorization of assets. For instance, "Vehicle"
'''
asset_type = ForeignKey(AssetType, ) # Asset Types can belong under other Asset Types
title = models.CharField(max_length=100)
additional_fields = models.JSONField() # Additional fields and parameters to be added to all AssetInstances of this AssetType
class Asset(models.Model):
'''
More specific . For instance, "Truck" with
/r/django
https://redd.it/b759rf
reddit
r/django - Using JSONField to extend models in an asset inventory - good idea?
2 votes and 0 comments so far on Reddit
What is the biggest blunder you made due to dynamically typed nature of Python? Have you started using mypy extensively yet?
https://www.reddit.com/r/learnpython/comments/b76ad2/what_is_the_biggest_blunder_you_made_due_to/
/r/Python
https://redd.it/b76apk
https://www.reddit.com/r/learnpython/comments/b76ad2/what_is_the_biggest_blunder_you_made_due_to/
/r/Python
https://redd.it/b76apk
reddit
r/learnpython - What is the biggest blunder you made due to dynamically typed nature of Python? Have you started using mypy extensively…
1 vote and 6 comments so far on Reddit
Performance issues on OSX, Python 3.7
I am facing a problem of having incredibly slow startups of basic things like running unit tests on OSX. On Ubuntu, commands like *pip list* instantly return packages installed in conda environment but same command on OSX takes 25 seconds to show up.
Similar behavior is exhibited when running unit tests for any amount of tests, for example test_X.py using something like *python -m pytest ./tests/unit/test_X.py immediately starts on Ubuntu but takes 15 seconds to load *something* on a Mac.
Anyone faced such problems? I am especially interested in benchmarking tools that can show me a granular view of the bottlenecks.
================================================ test session starts =================================================
platform darwin -- Python 3.6.6, pytest-3.10.1, py-1.7.0, pluggy-0.8.1 -- /Users/user_x/miniconda3/envs/bmlldev/bin/python
cachedir: .pytest_cache
Using --randomly-seed=1553934664
rootdir: /Users/user_x/work/project, inifile: setup.cfg
plugins: randomly-1.2.3, profiling-1.4.0, mock-1.10.1, cov-2.6.1, assume-1.2.2
collected 16 items
*For this to show up, it takes 25 seconds, then tests run:*
Coverage disabled via --no-cov switch!
unknown file:0
unknown file:0: RemovedInPytest4Warning: config.warn has been deprecated, use warnings.warn instead
-- Docs: https://docs.pytest.org/en/latest/warnings.html
================================== 12 failed, 4 passed, 2 warnings in 2.33 seconds ==============
/r/Python
https://redd.it/b78xba
I am facing a problem of having incredibly slow startups of basic things like running unit tests on OSX. On Ubuntu, commands like *pip list* instantly return packages installed in conda environment but same command on OSX takes 25 seconds to show up.
Similar behavior is exhibited when running unit tests for any amount of tests, for example test_X.py using something like *python -m pytest ./tests/unit/test_X.py immediately starts on Ubuntu but takes 15 seconds to load *something* on a Mac.
Anyone faced such problems? I am especially interested in benchmarking tools that can show me a granular view of the bottlenecks.
================================================ test session starts =================================================
platform darwin -- Python 3.6.6, pytest-3.10.1, py-1.7.0, pluggy-0.8.1 -- /Users/user_x/miniconda3/envs/bmlldev/bin/python
cachedir: .pytest_cache
Using --randomly-seed=1553934664
rootdir: /Users/user_x/work/project, inifile: setup.cfg
plugins: randomly-1.2.3, profiling-1.4.0, mock-1.10.1, cov-2.6.1, assume-1.2.2
collected 16 items
*For this to show up, it takes 25 seconds, then tests run:*
Coverage disabled via --no-cov switch!
unknown file:0
unknown file:0: RemovedInPytest4Warning: config.warn has been deprecated, use warnings.warn instead
-- Docs: https://docs.pytest.org/en/latest/warnings.html
================================== 12 failed, 4 passed, 2 warnings in 2.33 seconds ==============
/r/Python
https://redd.it/b78xba
reddit
r/Python - Performance issues on OSX, Python 3.7
0 votes and 4 comments so far on Reddit
Easy way for inline forms?
I'm creating an app and I am using some forms. Basic form are easy to add. But now I am trying some inline stuff. I want to be able to add everything in one form. For the admin page this is done automatically, and that form is exactly what I want:
​
class DomainAdmin(admin.ModelAdmin):
inlines = [
DiskInline,
NetworkInline,
]
​
My models:
​
class Domain(models.Model):
name = models.CharField(max_length=100)
cpu_cores = models.IntegerField()
cpu_threads = models.IntegerField()
cpu_type = models.CharField(max_length=255, default="", blank=True)
cpu_flags = models.CharField(max_length=255, default="", blank=True)
ram
/r/django
https://redd.it/b79yrr
I'm creating an app and I am using some forms. Basic form are easy to add. But now I am trying some inline stuff. I want to be able to add everything in one form. For the admin page this is done automatically, and that form is exactly what I want:
​
class DomainAdmin(admin.ModelAdmin):
inlines = [
DiskInline,
NetworkInline,
]
​
My models:
​
class Domain(models.Model):
name = models.CharField(max_length=100)
cpu_cores = models.IntegerField()
cpu_threads = models.IntegerField()
cpu_type = models.CharField(max_length=255, default="", blank=True)
cpu_flags = models.CharField(max_length=255, default="", blank=True)
ram
/r/django
https://redd.it/b79yrr
reddit
r/django - Easy way for inline forms?
0 votes and 0 comments so far on Reddit
MacBook Keyboard Music Visualizer
https://www.youtube.com/watch?v=esSRsTjA4s0
/r/Python
https://redd.it/b79fzj
https://www.youtube.com/watch?v=esSRsTjA4s0
/r/Python
https://redd.it/b79fzj
YouTube
MacBook Keyboard Visualizer
This script was tested with Manjaro Linux on the MacBook. I am pretty sure it will work on other MacBooks that run Linux, but it will not work on MacOS.
GitHub - https://github.com/sdushantha/macbook-keyboard-visualizer
GitHub - https://github.com/sdushantha/macbook-keyboard-visualizer
Python Tutorial - Python GUI Programming - Python GUI Examples
http://dev.geekwall.in/10301ac047
/r/Python
https://redd.it/b799j1
http://dev.geekwall.in/10301ac047
/r/Python
https://redd.it/b799j1
Morioh
Python Tutorial - Python GUI Programming - Python GUI Examples
This media is not supported in your browser
VIEW IN TELEGRAM
Super Potato Bruh (my Python Indie project) has received a major update!
/r/Python
https://redd.it/b7cy5y
/r/Python
https://redd.it/b7cy5y
I wrote a python IRC bot over 6 years years and I'm super proud of it
https://bitbucket.org/hlmtre/pybot
/r/Python
https://redd.it/b7b9ep
https://bitbucket.org/hlmtre/pybot
/r/Python
https://redd.it/b7b9ep
bitbucket.org
hlmtre / pybot
An IRC bot written in Python.
flask permission based views
hey guys,
a beginner in flask here.
i am currently making my first website and trying to find a good extention that will manage my permissions, i found flask-permissions but something went wrong as i couldnt make it work for some reason even tho i went with the docs.
i am searching for an extention that would allow users to access pages according to specific permissions and not complete roles.
i would appreciate if you have any good extention, or maybe a good tutorial of flask-permissions as that seemed like it was a good extention.
thank you
/r/flask
https://redd.it/b79nzr
hey guys,
a beginner in flask here.
i am currently making my first website and trying to find a good extention that will manage my permissions, i found flask-permissions but something went wrong as i couldnt make it work for some reason even tho i went with the docs.
i am searching for an extention that would allow users to access pages according to specific permissions and not complete roles.
i would appreciate if you have any good extention, or maybe a good tutorial of flask-permissions as that seemed like it was a good extention.
thank you
/r/flask
https://redd.it/b79nzr
reddit
r/flask - flask permission based views
6 votes and 5 comments so far on Reddit
Jupyter notebook brings up blank screen when launched, can anyone help?
Hi all, I want to preface this by stating I am *very* new to python. I need to use python for a research project and wanted to use jupyter notebook to cleanly display my work. I followed the tutorial to download jupyter notebook here: [https://jupyter.readthedocs.io/en/latest/install.html](https://jupyter.readthedocs.io/en/latest/install.html) I used pip if that matters. I know it says to use anaconda if you have little python experience, but my friend had to download and set up python on my machine for me, and he used pip. I wasn't sure if I could later install anaconda as it says it will install python for you.
​
Anyways, when I type the command to launch the notebook, 'jupyter notebook' in my command prompt, I see the typical text in my command prompt that's detailed here [https://jupyter.readthedocs.io/en/latest/running.html#running](https://jupyter.readthedocs.io/en/latest/running.html#running) however I **do not** see the notebook dashboard in my browser. It's just a blank page: [https://imgur.com/icL8L15](https://imgur.com/icL8L15)
It does this in chrome, firefox, and edge. It does this when I disable any add-ons/extensions as well.
​
Does anyone have any experience with this? Or any suggestions as to where else I could ask my question? I truly have no idea what to do. I was thinking about going to the computer science department at
/r/IPython
https://redd.it/b7feih
Hi all, I want to preface this by stating I am *very* new to python. I need to use python for a research project and wanted to use jupyter notebook to cleanly display my work. I followed the tutorial to download jupyter notebook here: [https://jupyter.readthedocs.io/en/latest/install.html](https://jupyter.readthedocs.io/en/latest/install.html) I used pip if that matters. I know it says to use anaconda if you have little python experience, but my friend had to download and set up python on my machine for me, and he used pip. I wasn't sure if I could later install anaconda as it says it will install python for you.
​
Anyways, when I type the command to launch the notebook, 'jupyter notebook' in my command prompt, I see the typical text in my command prompt that's detailed here [https://jupyter.readthedocs.io/en/latest/running.html#running](https://jupyter.readthedocs.io/en/latest/running.html#running) however I **do not** see the notebook dashboard in my browser. It's just a blank page: [https://imgur.com/icL8L15](https://imgur.com/icL8L15)
It does this in chrome, firefox, and edge. It does this when I disable any add-ons/extensions as well.
​
Does anyone have any experience with this? Or any suggestions as to where else I could ask my question? I truly have no idea what to do. I was thinking about going to the computer science department at
/r/IPython
https://redd.it/b7feih
The first project I'm taking seriously, on what level am I?
The goal is very simple: save all development-related things and organize everything into "collections" or just insert tags.
​
The first functional part is almost ready: you can add a github repository, the data gets saved in the database and I use Axios to get the star quantity and description updated.
At the moment, you can add a repository normally, I'm thinking of: option for tags, or else, create a named collection, eg: Django + Python: for all repositories over Django and Python, or something like Data Science: for all repositories related to data science, independent of language. Everything would be organized into collections, which would be basically a title of a book, and the repository, its chapters. This idea of collection in fact I intend to add in all funcionalides, because it gets more organized, on the other hand, someone may not like to feel compelled to create a collection for everything.
​
You can see how you're currently in this [video](https://vimeo.com/327502829), and some parts of the [code here](https://pastebin.com/axzUn7Z4), I have not yet put it in github, but when it's done I'll put it.
​
Stack Details:
css / scss: I mostly use to nest and use a BEM-like style, which is actually a basic attempt to
/r/djangolearning
https://redd.it/b7hr52
The goal is very simple: save all development-related things and organize everything into "collections" or just insert tags.
​
The first functional part is almost ready: you can add a github repository, the data gets saved in the database and I use Axios to get the star quantity and description updated.
At the moment, you can add a repository normally, I'm thinking of: option for tags, or else, create a named collection, eg: Django + Python: for all repositories over Django and Python, or something like Data Science: for all repositories related to data science, independent of language. Everything would be organized into collections, which would be basically a title of a book, and the repository, its chapters. This idea of collection in fact I intend to add in all funcionalides, because it gets more organized, on the other hand, someone may not like to feel compelled to create a collection for everything.
​
You can see how you're currently in this [video](https://vimeo.com/327502829), and some parts of the [code here](https://pastebin.com/axzUn7Z4), I have not yet put it in github, but when it's done I'll put it.
​
Stack Details:
css / scss: I mostly use to nest and use a BEM-like style, which is actually a basic attempt to
/r/djangolearning
https://redd.it/b7hr52
Vimeo
2019-03-30 20-48-37
This is "2019-03-30 20-48-37" by Marcos on Vimeo, the home for high quality videos and the people who love them.
Directing cronjobs via email/sms
I’m looking for some advice after failing to find any relevant info through Google.
I have a cron job running on AWS. It does its job in 2 steps.
Step 1: it scrapes data and processes it
Step 2: it posts the processed data on the internet
Ideally I’d like to get a text or email from the job in between step 1 and step 2 where it would show me the processed data before posting. Then I can respond with a yes or no if I want it to proceed.
My intuition is that there isn’t a great way to do this and I’ll probably have to come up with a hacky method. I hope I’m wrong though.
Any suggestions?
/r/Python
https://redd.it/b7i3tj
I’m looking for some advice after failing to find any relevant info through Google.
I have a cron job running on AWS. It does its job in 2 steps.
Step 1: it scrapes data and processes it
Step 2: it posts the processed data on the internet
Ideally I’d like to get a text or email from the job in between step 1 and step 2 where it would show me the processed data before posting. Then I can respond with a yes or no if I want it to proceed.
My intuition is that there isn’t a great way to do this and I’ll probably have to come up with a hacky method. I hope I’m wrong though.
Any suggestions?
/r/Python
https://redd.it/b7i3tj
reddit
r/Python - Directing cronjobs via email/sms
0 votes and 2 comments so far on Reddit
Flask not updating SCSS
I'm currently making a website that has a flask backend with a front end of SCSS, for a while Flask would update the SCSS with no issues but now it's not sending any updates to the front end. Can't release the code for it but the fixes I've tried are, hard reset of the browser cache (CTRL SHIFT R), checking on a different browser/computer, making sure that the app config has TEMPLATE\_AUTO\_RELOAD is set to True. Also tried using Flask-CSS extension but made no difference.
​
Can't figure this out, any ideas/help would be great. Thanks!
​
/r/flask
https://redd.it/b7gn5m
I'm currently making a website that has a flask backend with a front end of SCSS, for a while Flask would update the SCSS with no issues but now it's not sending any updates to the front end. Can't release the code for it but the fixes I've tried are, hard reset of the browser cache (CTRL SHIFT R), checking on a different browser/computer, making sure that the app config has TEMPLATE\_AUTO\_RELOAD is set to True. Also tried using Flask-CSS extension but made no difference.
​
Can't figure this out, any ideas/help would be great. Thanks!
​
/r/flask
https://redd.it/b7gn5m
reddit
r/flask - Flask not updating SCSS
3 votes and 3 comments so far on Reddit
I’m relearning how to code in python on my raspberry pi and don’t know what to code. Any fairly simple things that you would suggest to code to try and help me relearn how to code.
/r/Python
https://redd.it/b7kwvh
/r/Python
https://redd.it/b7kwvh
reddit
r/Python - I’m relearning how to code in python on my raspberry pi and don’t know what to code. Any fairly simple things that you…
0 votes and 2 comments so far on Reddit
Introduction To Python Programming
[https://www.youtube.com/watch?v=rpqPZreqaYo](https://www.youtube.com/watch?v=rpqPZreqaYo)
/r/Python
https://redd.it/b7l4tp
[https://www.youtube.com/watch?v=rpqPZreqaYo](https://www.youtube.com/watch?v=rpqPZreqaYo)
/r/Python
https://redd.it/b7l4tp
YouTube
Introduction To Python Programming
Social Network for Developers ☞ https://morioh.com Aiodex’s Referral Program will give you 20% -80% commission from their transaction fee for 7 years. The va...
pygame 1.9.5 released into the wilds
https://www.pygame.org/news/2019/3/1-9-5-released-into-the-wilds
/r/Python
https://redd.it/b7moqz
https://www.pygame.org/news/2019/3/1-9-5-released-into-the-wilds
/r/Python
https://redd.it/b7moqz
www.pygame.org
pygame 1.9.5 released into the wilds — 31 Mar, 2019
Our biggest release yet. Every single source file has been heavily modified and moved in this release.