Code Review request
Would anyone be kind enough to review my project.
It's...rather large and most of it is in spanish (well, spanglish). Do have a readme that I think covers most of it.
https://github.com/DullBlade0/neo-sigia
/r/djangolearning
https://redd.it/6zf3vz
Would anyone be kind enough to review my project.
It's...rather large and most of it is in spanish (well, spanglish). Do have a readme that I think covers most of it.
https://github.com/DullBlade0/neo-sigia
/r/djangolearning
https://redd.it/6zf3vz
GitHub
DullBlade0/neo-sigia
neo-sigia - Final Uni Project
How to write nested API using Django REST Framework - Part 1
http://blog.apptension.com/2017/09/13/simple-nested-api-using-django-rest-framework/?utm_source=reddit.com&utm_medium=referral&utm_campaign=reddit
/r/django
https://redd.it/6zu06q
http://blog.apptension.com/2017/09/13/simple-nested-api-using-django-rest-framework/?utm_source=reddit.com&utm_medium=referral&utm_campaign=reddit
/r/django
https://redd.it/6zu06q
Apptension
Simple Nested API Using Django REST Framework
In this article you will learn how to build a simple REST API using Django REST Framework. The code in this article was written with Python 3.6, Django 1.11 and DRF 3.6 in mind.
Hey I created my first web app with django and react, on this board you will find all videos, articles and tutorials I used to learn both frameworks
https://mindweb.network/board/build-a-webapp-with-django-and-reactjs
/r/Python
https://redd.it/6zuxbu
https://mindweb.network/board/build-a-webapp-with-django-and-reactjs
/r/Python
https://redd.it/6zuxbu
MindWeb
Build a webapp with Django and React.js
These materials were used by a total beginner to learn progr
ValueError: Unhandled pending operations for models
ValueError: Unhandled pending operations for models:
lists.list (referred to by fields: items.Item.list)
I'm getting this error when I try to migrate. I realized that it recently started happening after I installed django tastypie and started using it to make my API. Not sure what the error is exactly I haven't really modified my models much since then.
/r/django
https://redd.it/6zy179
ValueError: Unhandled pending operations for models:
lists.list (referred to by fields: items.Item.list)
I'm getting this error when I try to migrate. I realized that it recently started happening after I installed django tastypie and started using it to make my API. Not sure what the error is exactly I haven't really modified my models much since then.
/r/django
https://redd.it/6zy179
reddit
ValueError: Unhandled pending operations for models • r/django
ValueError: Unhandled pending operations for models: lists.list (referred to by fields: items.Item.list) I'm getting this error when I try to...
[D] openAI closing down gym toolkit website
If you go to https://gym.openai.com/ now it just redirects you to their github repo. There was no official statement about it, the site just went down out of the blue. Only source about it actually closing down right now is Greg Brockman's reply on twitter.
https://twitter.com/gdb/status/907855318591438848
> Yep, the Github repo has been the focus of the project for the past year. The Gym site looks cool but hasn't been maintained.
It is really sad news for me personally. The companion website was very useful, both as a benchmark and source of information on practical algo implementations and tricks via writeups. Greg mentioned lack of maintenance, but it I think it was good enough for what it offered.
Maybe if community lets openAI know website will be missed they'll reconsider?
/r/MachineLearning
https://redd.it/6zvlm2
If you go to https://gym.openai.com/ now it just redirects you to their github repo. There was no official statement about it, the site just went down out of the blue. Only source about it actually closing down right now is Greg Brockman's reply on twitter.
https://twitter.com/gdb/status/907855318591438848
> Yep, the Github repo has been the focus of the project for the past year. The Gym site looks cool but hasn't been maintained.
It is really sad news for me personally. The companion website was very useful, both as a benchmark and source of information on practical algo implementations and tricks via writeups. Greg mentioned lack of maintenance, but it I think it was good enough for what it offered.
Maybe if community lets openAI know website will be missed they'll reconsider?
/r/MachineLearning
https://redd.it/6zvlm2
SpeechPy - A Library for Speech Processing and Recognition
https://github.com/astorfi/speechpy
/r/Python
https://redd.it/6zzqvi
https://github.com/astorfi/speechpy
/r/Python
https://redd.it/6zzqvi
GitHub
GitHub - astorfi/speechpy: :speech_balloon: SpeechPy - A Library for Speech Processing and Recognition: http://speechpy.readth…
:speech_balloon: SpeechPy - A Library for Speech Processing and Recognition: http://speechpy.readthedocs.io/en/latest/ - astorfi/speechpy
Decorating: Literally decorating your terminal with decorators
https://github.com/ryukinix/decorating/tree/master
/r/Python
https://redd.it/6zzom9
https://github.com/ryukinix/decorating/tree/master
/r/Python
https://redd.it/6zzom9
GitHub
ryukinix/decorating
decorating: Literally decorating your terminal with decorators
Django Girls Impact Report 2016-2017
https://djangogirls.org/2016-2017/
/r/Python
https://redd.it/6zx8b6
https://djangogirls.org/2016-2017/
/r/Python
https://redd.it/6zx8b6
djangogirls.org
Django Girls Impact Report 2016-2017
Thanks to the organizers, coaches, and volunteers in countries all over the world, 2016-2017 was an absolutely incredible year for Django Girls. Read all about our challenges and achievements from 2016-2017.
[AF][flask-mail]Recursion error on flask-mail connection attempt
I'm getting a recursion error when I attempt to connect to my hMail server that I set up for testing purposes. Both my Flask server and hMail server are on the same computer at 127.0.0.1. The traceback is as follows:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Users\LaNoktaTempesto\myapp\helpers.py", line 47, in send_notice
self.send_message(message)
File "c:\users\LaNoktaTempesto\appdata\local\programs\python\python36-32\lib\site-packages\flask_mail.py", line 502, in send_message
self.send(Message(*args, **kwargs))
File "c:\users\LaNoktaTempesto\appdata\local\programs\python\python36-32\lib\site-packages\flask_mail.py", line 491, in send
with self.connect() as connection:
File "c:\users\LaNoktaTempesto\appdata\local\programs\python\python36-32\lib\site-packages\flask_mail.py", line 506, in connect
app = getattr(self, "app", None) or current_app
File "c:\users\LaNoktaTempesto\appdata\local\programs\python\python36-32\lib\site-packages\flask_mail.py", line 574, in __getatt
r__
[Previous line repeated 319 more times]
RecursionError: maximum recursion depth exceeded
I don't seem to be finding anyone else having this problem, and as I am a beginner, I'm not sure where to start debugging this issue.
/r/flask
https://redd.it/7009m2
I'm getting a recursion error when I attempt to connect to my hMail server that I set up for testing purposes. Both my Flask server and hMail server are on the same computer at 127.0.0.1. The traceback is as follows:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Users\LaNoktaTempesto\myapp\helpers.py", line 47, in send_notice
self.send_message(message)
File "c:\users\LaNoktaTempesto\appdata\local\programs\python\python36-32\lib\site-packages\flask_mail.py", line 502, in send_message
self.send(Message(*args, **kwargs))
File "c:\users\LaNoktaTempesto\appdata\local\programs\python\python36-32\lib\site-packages\flask_mail.py", line 491, in send
with self.connect() as connection:
File "c:\users\LaNoktaTempesto\appdata\local\programs\python\python36-32\lib\site-packages\flask_mail.py", line 506, in connect
app = getattr(self, "app", None) or current_app
File "c:\users\LaNoktaTempesto\appdata\local\programs\python\python36-32\lib\site-packages\flask_mail.py", line 574, in __getatt
r__
[Previous line repeated 319 more times]
RecursionError: maximum recursion depth exceeded
I don't seem to be finding anyone else having this problem, and as I am a beginner, I'm not sure where to start debugging this issue.
/r/flask
https://redd.it/7009m2
reddit
[AF][flask-mail]Recursion error on flask-mail connection... • r/flask
I'm getting a recursion error when I attempt to connect to my hMail server that I set up for testing purposes. Both my Flask server and hMail...
How to change directory inside a notebook ?
My project directory typically look like this :
home/
├── data/
│ ├── some.csv
│ ├── another.csv
│ └── etc.csv
├── notebook/
│ ├── myproject.ipynb
│ └── testing.ipynb
└── src/
└── script.py
I have set my configuration to launch my notebook in the home directory. Although I am having trouble properly loading files from the data directory.
My big challenge is that I am using Windows, Linux and Mac. I've used the OS module but my code doesn't work will all OS.
I can't find the universal code that would allow me to move from the notebook to the data.
Any help ?
/r/IPython
https://redd.it/702c9h
My project directory typically look like this :
home/
├── data/
│ ├── some.csv
│ ├── another.csv
│ └── etc.csv
├── notebook/
│ ├── myproject.ipynb
│ └── testing.ipynb
└── src/
└── script.py
I have set my configuration to launch my notebook in the home directory. Although I am having trouble properly loading files from the data directory.
My big challenge is that I am using Windows, Linux and Mac. I've used the OS module but my code doesn't work will all OS.
I can't find the universal code that would allow me to move from the notebook to the data.
Any help ?
/r/IPython
https://redd.it/702c9h
reddit
How to change directory inside a notebook ? • r/IPython
My project directory typically look like this : home/ ├── data/ │ ├── some.csv │ ├── another.csv │ └── etc.csv ├──...
A response to "I’m too stupid for AsyncIO"
https://medium.com/@philip.graham.jones/understanding-asyncio-a6592a517def
/r/Python
https://redd.it/700y0q
https://medium.com/@philip.graham.jones/understanding-asyncio-a6592a517def
/r/Python
https://redd.it/700y0q
Medium
Understanding Asyncio
A recent article by Jason Goldstein expressed the author’s difficulty understanding and using Asyncio, especially in a Flask context…
Datetime library Arrow is looking for maintainers
https://github.com/crsmithdev/arrow/issues/454
/r/Python
https://redd.it/7020vb
https://github.com/crsmithdev/arrow/issues/454
/r/Python
https://redd.it/7020vb
GitHub
Seeking Maintainers · Issue #454 · crsmithdev/arrow
Hi all, apologies with the glacial pace on this project recently.
I'm looking for one or more maintainers who would like to handle pull requests, issues and general maintenance for Arrow going forw...
I'm looking for one or more maintainers who would like to handle pull requests, issues and general maintenance for Arrow going forw...
Best practices for group projects?
For uni we have to do a ML group project in Jupyter. Putting together our code manually is quite a pain in the ass. However, git has a lot of conflict problems when cells are added/deleted which take even more time to solve than manually putting together the code.
What are your workflows in group projects?
Thanks so much!
/r/IPython
https://redd.it/702spv
For uni we have to do a ML group project in Jupyter. Putting together our code manually is quite a pain in the ass. However, git has a lot of conflict problems when cells are added/deleted which take even more time to solve than manually putting together the code.
What are your workflows in group projects?
Thanks so much!
/r/IPython
https://redd.it/702spv
reddit
Best practices for group projects? • r/IPython
For uni we have to do a ML group project in Jupyter. Putting together our code manually is quite a pain in the ass. However, git has a lot of...
Can Python check if some security cameras have been covered or saturated with artificial lights?
Hi everyone,
I'm working on a Debian server (version 8) that captures some h.264 streams from security cameras with ffmpeg, and stores them in chunks of 1 minute long mp4 videos.
My task is the following: Check if the cameras have been covered (have gone dark), or some light have been pointed directly into the camera so it's saturated (completely white).
The "dark check" has to keep into account that on the stream there are some white timestamps, a logo and some noise, so it's never completely dark, even if you paint over the camera lens with a spry can.
I was thinking about this solution:
1) For every minute long video, extract the middle frame with ffmpeg into a jpg file
2) I analyze the jpg file with python to extract the average brightness.
3) If the brightness is close to "0" (8 bit black) or "255" (8 bit white) it will trigger a warning
The server has about 40 cameras recording 24/7 and of course the computational load of the "dark" and "white" check must be as low as possible.
Do you think my approach is reasonable? Could I do this with other tools?
I was thinking about OpenCV to extract the frame instead of ffmpeg to keep everything in RAM but I don't really know the library.
Thanks in advance.
/r/Python
https://redd.it/70366e
Hi everyone,
I'm working on a Debian server (version 8) that captures some h.264 streams from security cameras with ffmpeg, and stores them in chunks of 1 minute long mp4 videos.
My task is the following: Check if the cameras have been covered (have gone dark), or some light have been pointed directly into the camera so it's saturated (completely white).
The "dark check" has to keep into account that on the stream there are some white timestamps, a logo and some noise, so it's never completely dark, even if you paint over the camera lens with a spry can.
I was thinking about this solution:
1) For every minute long video, extract the middle frame with ffmpeg into a jpg file
2) I analyze the jpg file with python to extract the average brightness.
3) If the brightness is close to "0" (8 bit black) or "255" (8 bit white) it will trigger a warning
The server has about 40 cameras recording 24/7 and of course the computational load of the "dark" and "white" check must be as low as possible.
Do you think my approach is reasonable? Could I do this with other tools?
I was thinking about OpenCV to extract the frame instead of ffmpeg to keep everything in RAM but I don't really know the library.
Thanks in advance.
/r/Python
https://redd.it/70366e
reddit
Can Python check if some security cameras have been... • r/Python
Hi everyone, I'm working on a Debian server (version 8) that captures some h.264 streams from security cameras with ffmpeg, and stores them in...
Adding a switch statement to Python
https://github.com/mikeckennedy/python-switch
/r/Python
https://redd.it/70413x
https://github.com/mikeckennedy/python-switch
/r/Python
https://redd.it/70413x
GitHub
GitHub - mikeckennedy/python-switch: Adds switch blocks to Python #pypackage
Adds switch blocks to Python #pypackage. Contribute to mikeckennedy/python-switch development by creating an account on GitHub.
Are there any up to date React + Django integration tutorials?
Hey there,
I'm looking to go SPA with my django site using React. I have the API set up using DRF.
I started using [the excellent tutorial that /u/gammadog posted here back in February,](https://www.reddit.com/r/django/comments/43y4wd/a_tutorial_on_using_django_rest_framework_with/), but it looks like React's syntax has been updated quite a lot since then and his tutorial is no longer effective. I'm doing my best to bushwhack a path using documentation and other online tutorials. However, I am consistently hitting very frustrating roadblocks.
Do any of you know a good, up to date tutorial to get all my pieces communicating with one another effectively?
Thanks!
/r/django
https://redd.it/704mno
Hey there,
I'm looking to go SPA with my django site using React. I have the API set up using DRF.
I started using [the excellent tutorial that /u/gammadog posted here back in February,](https://www.reddit.com/r/django/comments/43y4wd/a_tutorial_on_using_django_rest_framework_with/), but it looks like React's syntax has been updated quite a lot since then and his tutorial is no longer effective. I'm doing my best to bushwhack a path using documentation and other online tutorials. However, I am consistently hitting very frustrating roadblocks.
Do any of you know a good, up to date tutorial to get all my pieces communicating with one another effectively?
Thanks!
/r/django
https://redd.it/704mno
reddit
A tutorial on using Django Rest Framework with React • r/django
There have been [a](https://www.reddit.com/r/django/comments/367dm0/just_made_my_1st_attempt_at_using_drf_to_tie_up/)...
Functional Programming in Python
http://www.oreilly.com/programming/free/functional-programming-python.csp
/r/Python
https://redd.it/704typ
http://www.oreilly.com/programming/free/functional-programming-python.csp
/r/Python
https://redd.it/704typ
O’Reilly Online Learning
Functional Programming in Python
Python is not a functional programming language, but it is a multi-paradigm language that makes functional programming easy to perform, and easy to mix with other programming styles. In this … - Selection from Functional Programming in Python [Book]
Django on Raspberry Pi, interacting with sensor network and alerts
I'm working on a system to monitor some sensors and provide feedback on certain conditions. Normally I'd just write something like this in C++ or python because it's straightforward and not complicated, but we've decided to integrate a display for constant readout. It seems to make sense to use Django for the datastore and the display portions, something that Django is awesome at. Since all the sensors will be available across an ethernet, I'll just make a simple REST api for reporting updates and then use django/javascript to show system status on a display.
Does anyone have any pointers or suggestions for the above setup? I'll be writing a python system utility that will run and keep track of everything and interact with the database, probably through management commands. Or is interacting over REST a better option?
If I'm pulling in about 300 readings per minute, do I need to worry about purging data over time, or will postgres be ok for this? Historical data (>10 days) is not super important for this system.
Anyone else have feedback or advice on deploying django on rpi? It's on a local network and will basically just have a small handful of users.
Thanks!
/r/django
https://redd.it/703mh2
I'm working on a system to monitor some sensors and provide feedback on certain conditions. Normally I'd just write something like this in C++ or python because it's straightforward and not complicated, but we've decided to integrate a display for constant readout. It seems to make sense to use Django for the datastore and the display portions, something that Django is awesome at. Since all the sensors will be available across an ethernet, I'll just make a simple REST api for reporting updates and then use django/javascript to show system status on a display.
Does anyone have any pointers or suggestions for the above setup? I'll be writing a python system utility that will run and keep track of everything and interact with the database, probably through management commands. Or is interacting over REST a better option?
If I'm pulling in about 300 readings per minute, do I need to worry about purging data over time, or will postgres be ok for this? Historical data (>10 days) is not super important for this system.
Anyone else have feedback or advice on deploying django on rpi? It's on a local network and will basically just have a small handful of users.
Thanks!
/r/django
https://redd.it/703mh2
reddit
Django on Raspberry Pi, interacting with sensor network... • r/django
I'm working on a system to monitor some sensors and provide feedback on certain conditions. Normally I'd just write something like this in C++ or...