[Question] Deserializing nested data with Django-Rest-Framework
https://www.reddit.com/r/django/comments/7bot9q/question_deserializing_nested_data_with/
/r/djangolearning
https://redd.it/7bpn0k
https://www.reddit.com/r/django/comments/7bot9q/question_deserializing_nested_data_with/
/r/djangolearning
https://redd.it/7bpn0k
reddit
[Question] Deserializing nested data with... • r/django
I am struggling with deserializing nested data using Django Rest Framework. I have events which may or may not have nested fee or venue data....
[P] A Real-Time Mario Kart 64 AI Using CNNs, Offline Search, and DAGGER
https://www.youtube.com/watch?v=Eo07BAsyQ24
/r/MachineLearning
https://redd.it/7bqk0n
https://www.youtube.com/watch?v=Eo07BAsyQ24
/r/MachineLearning
https://redd.it/7bqk0n
YouTube
A Neural Network Plays Mario Kart 64
This is a video of a convolutional neural network Mario Kart 64 AI, created as a final project for Stanford's CS231n class.
Videos of Runs - https://www.youtube.com/playlist?list=PLSHD7WB3aI6Ks04Z7kS_UskyG_uY02EzY
Code - https://github.com/rameshvarun/NeuralKart…
Videos of Runs - https://www.youtube.com/playlist?list=PLSHD7WB3aI6Ks04Z7kS_UskyG_uY02EzY
Code - https://github.com/rameshvarun/NeuralKart…
Writing a basic x86-64 JIT compiler from scratch in stock Python
https://csl.name/post/python-jit/
/r/Python
https://redd.it/7btwa9
https://csl.name/post/python-jit/
/r/Python
https://redd.it/7btwa9
How to configure Django project for multiple environments
https://blog.apptension.com/2017/11/09/how-to-configure-django-project-for-multiple-environments/?utm_source=reddit.com&utm_medium=referral&utm_campaign=reddit
/r/django
https://redd.it/7bt2n2
https://blog.apptension.com/2017/11/09/how-to-configure-django-project-for-multiple-environments/?utm_source=reddit.com&utm_medium=referral&utm_campaign=reddit
/r/django
https://redd.it/7bt2n2
Apptension
How to configure Django project for multiple environments?
Learn how to configure Django project for multiple environments to write manageable code with fewer duplications and more accurate settings.
SQLAlchemy ORM Tutorial for Python Developers
https://auth0.com/blog/sqlalchemy-orm-tutorial-for-python-developers?utm_source=reddit&utm_medium=sc&utm_campaign=sqlalchemy_python
/r/Python
https://redd.it/7bujvf
https://auth0.com/blog/sqlalchemy-orm-tutorial-for-python-developers?utm_source=reddit&utm_medium=sc&utm_campaign=sqlalchemy_python
/r/Python
https://redd.it/7bujvf
Auth0 - Blog
SQLAlchemy ORM Tutorial for Python Developers
Let's learn how to use SQLAlchemy ORM to persist and query data on Python applications.
Concerned about using Django
Hi,
My background is in PHP (It serves me well) and I use it primarily at work, however I've been learning Python and Django at home and am really enjoying using them and would like to start using them for work, but I just have a few concerns about deployment.
My main concern is portability I suppose. For example if I created a CRM system that could be distributed like WordPress this would be fairly simple in PHP as almost every host supports it and if a client already pays for hosting on servers my company doesn't use then I can just upload the files and the application would work. Is this ease of use doable with a Django application? From what I gather there is a lot of additional configuration required, and as I say if the final environment is out of my hands then I'd rather use something that I know will work.
I have considered just using PHP for work and Django for my own side projects, but I'm really like the Python language and the Django framework so if I could use them on projects at work that would be really cool.
Thanks in advance.
/r/django
https://redd.it/7bvo4g
Hi,
My background is in PHP (It serves me well) and I use it primarily at work, however I've been learning Python and Django at home and am really enjoying using them and would like to start using them for work, but I just have a few concerns about deployment.
My main concern is portability I suppose. For example if I created a CRM system that could be distributed like WordPress this would be fairly simple in PHP as almost every host supports it and if a client already pays for hosting on servers my company doesn't use then I can just upload the files and the application would work. Is this ease of use doable with a Django application? From what I gather there is a lot of additional configuration required, and as I say if the final environment is out of my hands then I'd rather use something that I know will work.
I have considered just using PHP for work and Django for my own side projects, but I'm really like the Python language and the Django framework so if I could use them on projects at work that would be really cool.
Thanks in advance.
/r/django
https://redd.it/7bvo4g
reddit
Concerned about using Django • r/django
Hi, My background is in PHP (It serves me well) and I use it primarily at work, however I've been learning Python and Django at home and am...
Python extension for VSCode updated, now brought to you by Microsoft. (crosspost from /r/vscode)
https://www.reddit.com/r/vscode/comments/7burdg/python_extension_for_vscode_updated_now_brought/
/r/Python
https://redd.it/7buxom
https://www.reddit.com/r/vscode/comments/7burdg/python_extension_for_vscode_updated_now_brought/
/r/Python
https://redd.it/7buxom
reddit
Python extension for VSCode updated, now brought to you... • r/vscode
I'm partial to using VSCode to code in Python. I updated the Python extension by Don Jayamanne (version 0.7.0), and it now seems to be maintained...
[AF] Performance penalty for jinja_env.globals? Any other reason not to do it?
I occasionally run into situations where Jinja is missing a few import Python functions, like len(), or even some of my own. So I've been making liberal use of jinja_env.globals to sneak some of those functions into my templates.
Is there any reason I shouldn't do that? It feels like cheating and it is rubbing my Catholic childhood wrong. Anything this quick and easy must be bad, and will surely damn me for eternity.
/r/flask
https://redd.it/7bvxnl
I occasionally run into situations where Jinja is missing a few import Python functions, like len(), or even some of my own. So I've been making liberal use of jinja_env.globals to sneak some of those functions into my templates.
Is there any reason I shouldn't do that? It feels like cheating and it is rubbing my Catholic childhood wrong. Anything this quick and easy must be bad, and will surely damn me for eternity.
/r/flask
https://redd.it/7bvxnl
reddit
[AF] Performance penalty for jinja_env.globals? Any... • r/flask
I occasionally run into situations where Jinja is missing a few import Python functions, like len(), or even some of my own. So I've been making...
Django best practices to pass user groups to client side
Hey Django devs!
I'm fairly new to django, I'm currently building an app that has users that belong to different groups, the client side app has different behavior depending on the user groups, so all the scripts on the site should be able to figure out to what groups the user belongs to. I'm currently dynamically adding the groups to a script with a global scope so that all other scripts can access the groups, but I feel like there has to be a better way to do this, any ideas? Any way to store those values in a cookie from django and then accesing it with the js?
/r/django
https://redd.it/7bucao
Hey Django devs!
I'm fairly new to django, I'm currently building an app that has users that belong to different groups, the client side app has different behavior depending on the user groups, so all the scripts on the site should be able to figure out to what groups the user belongs to. I'm currently dynamically adding the groups to a script with a global scope so that all other scripts can access the groups, but I feel like there has to be a better way to do this, any ideas? Any way to store those values in a cookie from django and then accesing it with the js?
/r/django
https://redd.it/7bucao
reddit
Django best practices to pass user groups to client side • r/django
Hey Django devs! I'm fairly new to django, I'm currently building an app that has users that belong to different groups, the client side...
Settings.py for sending emails
Rather new to programming. I want to set up a simple form which will send it's content to an admin's email. What I'm failing to understand is what happens in settings.py. I have:
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'name@gmail.com'
EMAIL_HOST_PASSWORD = 'password' #
EMAIL_PORT = 587
EMAIL_USE_TLS = True
My questions are:
1. Is EMAIL_HOST_USER referring to the admin's email?
2. In EMAIL_HOST_PASSWORD should I write the password with which the admin connects to his email (related to this, I've found a suggestion for gmail accounts to use [DisplayUnlockCaptcha](https://accounts.google.com/DisplayUnlockCaptcha), added a new app, and a code was generated. Must that be copy-pasted at EMAIL_HOST_PASSWORD?)
3. What's with the EMAIL_PORT? How do I know which one works for me?
/r/djangolearning
https://redd.it/7bh60t
Rather new to programming. I want to set up a simple form which will send it's content to an admin's email. What I'm failing to understand is what happens in settings.py. I have:
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'name@gmail.com'
EMAIL_HOST_PASSWORD = 'password' #
EMAIL_PORT = 587
EMAIL_USE_TLS = True
My questions are:
1. Is EMAIL_HOST_USER referring to the admin's email?
2. In EMAIL_HOST_PASSWORD should I write the password with which the admin connects to his email (related to this, I've found a suggestion for gmail accounts to use [DisplayUnlockCaptcha](https://accounts.google.com/DisplayUnlockCaptcha), added a new app, and a code was generated. Must that be copy-pasted at EMAIL_HOST_PASSWORD?)
3. What's with the EMAIL_PORT? How do I know which one works for me?
/r/djangolearning
https://redd.it/7bh60t
reddit
Settings.py for sending emails • r/djangolearning
Rather new to programming. I want to set up a simple form which will send it's content to an admin's email. What I'm failing to understand is what...
Start Getting and Working with Data with "Data Acquisition and Manipulation with Python"
https://ntguardian.wordpress.com/2017/11/09/start-getting-and-working-with-data-with-data-acquisition-and-manipulation-with-python/
/r/pystats
https://redd.it/7bxw50
https://ntguardian.wordpress.com/2017/11/09/start-getting-and-working-with-data-with-data-acquisition-and-manipulation-with-python/
/r/pystats
https://redd.it/7bxw50
Curtis Miller's Personal Website
Start Getting and Working with Data with “Data Acquisition and Manipulation with Python”
I announce my video course Data Acquisition and Manipulation with Python.
Exploring Line Lengths in Python Packages, Pythonic Perambulations, Jake Vanderplas
http://jakevdp.github.io/blog/2017/11/09/exploring-line-lengths-in-python-packages/
/r/Python
https://redd.it/7byr3j
http://jakevdp.github.io/blog/2017/11/09/exploring-line-lengths-in-python-packages/
/r/Python
https://redd.it/7byr3j
reddit
Exploring Line Lengths in Python Packages, Pythonic... • r/Python
66 points and 3 comments so far on reddit
Machine Learning With Python – Introduction
http://devarea.com/machine-learning-with-python-introduction/
/r/Python
https://redd.it/7c01v3
http://devarea.com/machine-learning-with-python-introduction/
/r/Python
https://redd.it/7c01v3
I eventually want to port my Django web site/app over to mobile. Is it necessary that I incorporate DRF ASAP?
It'll be for both the browser and mobile.
I decided browser first, though, since I've already invested quite a bit of time into it.
From my understanding, adding an API using DRF would *not* mean a complete rewrite of my current class-based-view django app. Instead, it only means an addition of new code--"api" folder, serializers, new url routes, etc.
Is this actually the case? Can I freely continue working on the browser version and simply add DRF for mobile later down the line?
If so, how does this change if I decide to add a frontend framework to my browser such as React?
React may also be frontend framework of choice for mobile given React Native.
But if this isn't the case, should I have started with DRF? What considerations should I make now to ensure that the eventual browser-mobile porting works out?
/r/django
https://redd.it/7bz6vc
It'll be for both the browser and mobile.
I decided browser first, though, since I've already invested quite a bit of time into it.
From my understanding, adding an API using DRF would *not* mean a complete rewrite of my current class-based-view django app. Instead, it only means an addition of new code--"api" folder, serializers, new url routes, etc.
Is this actually the case? Can I freely continue working on the browser version and simply add DRF for mobile later down the line?
If so, how does this change if I decide to add a frontend framework to my browser such as React?
React may also be frontend framework of choice for mobile given React Native.
But if this isn't the case, should I have started with DRF? What considerations should I make now to ensure that the eventual browser-mobile porting works out?
/r/django
https://redd.it/7bz6vc
reddit
I eventually want to port my Django web site/app over... • r/django
It'll be for both the browser and mobile. I decided browser first, though, since I've already invested quite a bit of time into it. From my...
Django UnboundLocalError when submitting an empty form
Hello, I'm new to django and I'm trying to build something. I made a form for users to comment on a post and it works well but when I tried to submit the form without any content there was a big error on the screen which says I've referenced a local variable before assignment. Can anybody tell me how to fix that?? I'll be very thankful.
/r/djangolearning
https://redd.it/7c00ry
Hello, I'm new to django and I'm trying to build something. I made a form for users to comment on a post and it works well but when I tried to submit the form without any content there was a big error on the screen which says I've referenced a local variable before assignment. Can anybody tell me how to fix that?? I'll be very thankful.
/r/djangolearning
https://redd.it/7c00ry
reddit
Django UnboundLocalError when submitting an... • r/djangolearning
Hello, I'm new to django and I'm trying to build something. I made a form for users to comment on a post and it works well but when I tried to...
A Python library for particle swarm optimization
Hi! Few months ago I shared a very simple project in this sub, and thanks to your suggestions and comments, I learned a lot and was able to transform (or "overhaul") it into a full package. First off, thank you very much!
I would like to present [PySwarms](https://github.com/ljvmiranda921/pyswarms), a Python library for particle swarm optimization. Aside from performing basic optimization, you can inspect the behavior of your swarm and even look for the best hyper-parameters to control swarm behavior. Moreover, the base classes here can be used to rapidly prototype swarm variants. Check it out!
/r/Python
https://redd.it/7c0ju0
Hi! Few months ago I shared a very simple project in this sub, and thanks to your suggestions and comments, I learned a lot and was able to transform (or "overhaul") it into a full package. First off, thank you very much!
I would like to present [PySwarms](https://github.com/ljvmiranda921/pyswarms), a Python library for particle swarm optimization. Aside from performing basic optimization, you can inspect the behavior of your swarm and even look for the best hyper-parameters to control swarm behavior. Moreover, the base classes here can be used to rapidly prototype swarm variants. Check it out!
/r/Python
https://redd.it/7c0ju0
GitHub
GitHub - ljvmiranda921/pyswarms: A research toolkit for particle swarm optimization in Python
A research toolkit for particle swarm optimization in Python - GitHub - ljvmiranda921/pyswarms: A research toolkit for particle swarm optimization in Python
Trying to plot a Fourier transform.
I have to plot y = (4/np.pi) * sum((np.sin(n*x))/(n)) where I sum over x. I have shown attempt below, my problem is that is sums over x and n. I don't know how to fix this.
n = np.linspace(1, 11, 11)
x = np.arange(101)
y = (4/np.pi) * np.sum((np.sin(n*x))/(n))
plt.plot(x,y)
/r/Python
https://redd.it/7c1i52
I have to plot y = (4/np.pi) * sum((np.sin(n*x))/(n)) where I sum over x. I have shown attempt below, my problem is that is sums over x and n. I don't know how to fix this.
n = np.linspace(1, 11, 11)
x = np.arange(101)
y = (4/np.pi) * np.sum((np.sin(n*x))/(n))
plt.plot(x,y)
/r/Python
https://redd.it/7c1i52
reddit
Trying to plot a Fourier transform. • r/Python
I have to plot y = (4/np.pi) * sum((np.sin(n*x))/(n)) where I sum over x. I have shown attempt below, my problem is that is sums over x and n. I...
Python Entry job
HI,
im self learning Python for a bout 8 months now, and i think i am intermediate level, but i have a long and solid background as hardware technician, and help desk. i wanna ask 2 questions, first: considering my experience in hardware and IT in general and my age 41! which road i should choose in python? i mean what is most beneficial field that fits to my own work. second: for some one with my understanding of python, what kind a job i can get as an entry level programming? thanks guys
/r/Python
https://redd.it/7c2fie
HI,
im self learning Python for a bout 8 months now, and i think i am intermediate level, but i have a long and solid background as hardware technician, and help desk. i wanna ask 2 questions, first: considering my experience in hardware and IT in general and my age 41! which road i should choose in python? i mean what is most beneficial field that fits to my own work. second: for some one with my understanding of python, what kind a job i can get as an entry level programming? thanks guys
/r/Python
https://redd.it/7c2fie
reddit
Python Entry job • r/Python
HI, im self learning Python for a bout 8 months now, and i think i am intermediate level, but i have a long and solid background as hardware...
Nominations for the Malcolm Tredinnick Memorial Prize 2017
https://www.djangoproject.com/weblog/2017/nov/10/nominations-malcolm-prize-2017/
/r/django
https://redd.it/7c2fjy
https://www.djangoproject.com/weblog/2017/nov/10/nominations-malcolm-prize-2017/
/r/django
https://redd.it/7c2fjy
reddit
Nominations for the Malcolm Tredinnick Memorial Prize 2017 • r/django
4 points and 0 comments so far on reddit
Following my last post, I am writing the next post in my compilers series. This week is about writing the lexer in python!
http://yoseph.tech/completely-useless-fun-project-parts-of-the-compiler/
/r/Python
https://redd.it/7c44h3
http://yoseph.tech/completely-useless-fun-project-parts-of-the-compiler/
/r/Python
https://redd.it/7c44h3
yoseph.tech
Completely Useless Fun Project: Parts Of The Compiler - Yoseph.TECH | All things Tech
This week I am talking about the parts of the compiler, doing a deep dive into the Lexer and Parser and showing how to build the Lexer and Parser in Python. At the end of this post, we should have a working lexer and parser.