What font do you use for development?
I generally use Consolas on Windows and Ubuntu Lite on Linux. I mostly use vim in terminal/cygwin these days with the occasional Notepad++ when I'm on Windows. The 2 fonts seem to work fine for the most part but there are a few letters, numbers, and characters that look too similar. There was a premium font that made specifically for developers that made a conscious effort to distinguish some of those characters. Naturally I went looking for it on the web but turned up empty handed. I did however stumble upon [this topic on Slant](https://www.slant.co/topics/67/~programming-fonts) and it made me wonder what other fonts developers use? Specifically Python developers
/r/Python
https://redd.it/5mif4u
I generally use Consolas on Windows and Ubuntu Lite on Linux. I mostly use vim in terminal/cygwin these days with the occasional Notepad++ when I'm on Windows. The 2 fonts seem to work fine for the most part but there are a few letters, numbers, and characters that look too similar. There was a premium font that made specifically for developers that made a conscious effort to distinguish some of those characters. Naturally I went looking for it on the web but turned up empty handed. I did however stumble upon [this topic on Slant](https://www.slant.co/topics/67/~programming-fonts) and it made me wonder what other fonts developers use? Specifically Python developers
/r/Python
https://redd.it/5mif4u
How to use Q Learning in Video Games Easily
https://www.youtube.com/watch?v=A5eihauRQvo&feature=youtu.be
/r/Python
https://redd.it/5mhjbh
https://www.youtube.com/watch?v=A5eihauRQvo&feature=youtu.be
/r/Python
https://redd.it/5mhjbh
YouTube
How to use Q Learning in Video Games Easily
In this video, I go over the history of reinforcement learning then talk about how a type of reinforcement learning called Q learning works. We'll then write...
Any Compelling Reason to Containerize?
I run a small and somewhat financially successful little startup geared towards K-12 education. My day job is DevOps, and we're moving to containers for new applications. I'd like to kick the tires on this a bit more to play with it, and my app seems like a good option. The app is of course written in Django. What am I gaining by containerizing an already mature production Django application? It already auto-scales application servers and has a good CI/CD pipeline with the help of Jenkins. Containers could certainly make my auto-scaling system simpler, but that code is already working and performing fine using Linode VPSs and their API. Any thoughts?
/r/django
https://redd.it/5mhpu7
I run a small and somewhat financially successful little startup geared towards K-12 education. My day job is DevOps, and we're moving to containers for new applications. I'd like to kick the tires on this a bit more to play with it, and my app seems like a good option. The app is of course written in Django. What am I gaining by containerizing an already mature production Django application? It already auto-scales application servers and has a good CI/CD pipeline with the help of Jenkins. Containers could certainly make my auto-scaling system simpler, but that code is already working and performing fine using Linode VPSs and their API. Any thoughts?
/r/django
https://redd.it/5mhpu7
reddit
Any Compelling Reason to Containerize? • /r/django
I run a small and somewhat financially successful little startup geared towards K-12 education. My day job is DevOps, and we're moving to...
Windows Subsystem Linux | Does it work well for you?
Hi All,
I'm currently using a late-2013 rMBP and learned Python while I had this machine. I understand people like OSx for development purposes because it has native unix shell support.
I was wondering how many people here use Windows 10 and have had some experience with WSL. Does it accomplish everything you need it to do? Do you feel like you're missing out on any important unix features?
Thanks for your inputs!
/r/Python
https://redd.it/5mjow0
Hi All,
I'm currently using a late-2013 rMBP and learned Python while I had this machine. I understand people like OSx for development purposes because it has native unix shell support.
I was wondering how many people here use Windows 10 and have had some experience with WSL. Does it accomplish everything you need it to do? Do you feel like you're missing out on any important unix features?
Thanks for your inputs!
/r/Python
https://redd.it/5mjow0
reddit
Windows Subsystem Linux | Does it work well for you? • /r/Python
Hi All, I'm currently using a late-2013 rMBP and learned Python while I had this machine. I understand people like OSx for development purposes...
How can i create a Procfile to deploy a flask app to heroku
So currently on dev I use `python manage.py runserver` to run my flask app locally (thanks to the flask-script extension)
I've seen that a standard Procfile online looks like:
web: gunicorn app:app
I imagine that I would need something like:
web: gunicorn manage:app
Although I am not sure? What does the bit after gunicorn actually mean, does it correspond to the file in the current dir?
/r/flask
https://redd.it/5lgcv3
So currently on dev I use `python manage.py runserver` to run my flask app locally (thanks to the flask-script extension)
I've seen that a standard Procfile online looks like:
web: gunicorn app:app
I imagine that I would need something like:
web: gunicorn manage:app
Although I am not sure? What does the bit after gunicorn actually mean, does it correspond to the file in the current dir?
/r/flask
https://redd.it/5lgcv3
reddit
How can i create a Procfile to deploy a flask app to heroku • /r/flask
So currently on dev I use `python manage.py runserver` to run my flask app locally (thanks to the flask-script extension) I've seen that a...
[P]: hsr - Hand signals recognition using Convolutional Neural Network
https://github.com/pyk/hsr
/r/MachineLearning
https://redd.it/5mk8sm
https://github.com/pyk/hsr
/r/MachineLearning
https://redd.it/5mk8sm
GitHub
pyk/hsr
Hand signals recognition using Convolutional Neural Network implemented in TensorFlow - pyk/hsr
Stumbling to Package a Django App
https://5280incode.wordpress.com/2017/01/07/stumbling-to-package-a-django-app/
/r/django
https://redd.it/5mlear
https://5280incode.wordpress.com/2017/01/07/stumbling-to-package-a-django-app/
/r/django
https://redd.it/5mlear
5280 In Code
Stumbling to Package a Django App
Django applications can be packaged individually for reuse. Documentation on how to do so from start to finish seemed either old, sparse, or incomplete. This was my adventure and solution. I’…
Have a few problems setting up Django
When I enter: python -m django version, I get this output
/usr/bin/python: No module named django.__main__; 'django' is a package and cannot be directly executed
And when I enter: django-admin startproject mysite, I get
Traceback (most recent call last):
File "/usr/local/bin/django-admin", line 7, in <module>
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django.core'
/r/django
https://redd.it/5mk8kl
When I enter: python -m django version, I get this output
/usr/bin/python: No module named django.__main__; 'django' is a package and cannot be directly executed
And when I enter: django-admin startproject mysite, I get
Traceback (most recent call last):
File "/usr/local/bin/django-admin", line 7, in <module>
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django.core'
/r/django
https://redd.it/5mk8kl
reddit
Have a few problems setting up Django • /r/django
When I enter: python -m django version, I get this output /usr/bin/python: No module named django.__main__; 'django' is a package and cannot...
Jinja 2.9 Released with New Identifier Tracking and Improved Scoping
https://www.palletsprojects.com/blog/jinja-29-released/
/r/Python
https://redd.it/5ml7pd
https://www.palletsprojects.com/blog/jinja-29-released/
/r/Python
https://redd.it/5ml7pd
reddit
Jinja 2.9 Released with New Identifier Tracking and... • /r/Python
59 points and 3 comments so far on reddit
[D] Anybody interested in an online reading group? • /r/deeplearning
https://www.reddit.com/r/deeplearning/comments/5lugdc/anybody_interested_in_an_online_reading_group/?ref=share&ref_source=link
/r/MachineLearning
https://redd.it/5mm8sr
https://www.reddit.com/r/deeplearning/comments/5lugdc/anybody_interested_in_an_online_reading_group/?ref=share&ref_source=link
/r/MachineLearning
https://redd.it/5mm8sr
reddit
Anybody interested in an online reading group? • /r/deeplearning
I have just started the book by Goodfellow et al. Its a bit math heavy so it would be great to collaborate and discuss on it. I found this local...
Tests for testing urls in Django
[stackoverflow!] (http://stackoverflow.com/questions/18987051/how-do-i-unit-test-django-urls)
I tried to follow this using resolve attribute in Django. But the resolve attribute doesn't seem to work for django REST framework urls. Is it somewhat different for REST ?
[Code where tests are to be added!](https://github.com/Cloud-CV/EvalAI/blob/master/apps/challenges/urls.py)
/r/django
https://redd.it/5mmd0o
[stackoverflow!] (http://stackoverflow.com/questions/18987051/how-do-i-unit-test-django-urls)
I tried to follow this using resolve attribute in Django. But the resolve attribute doesn't seem to work for django REST framework urls. Is it somewhat different for REST ?
[Code where tests are to be added!](https://github.com/Cloud-CV/EvalAI/blob/master/apps/challenges/urls.py)
/r/django
https://redd.it/5mmd0o
Stack Overflow
How do I unit test django urls?
I have achieved 100% test coverage in my application everywhere except my urls.py. Do you have any recommendations for how I could write meaningful unit tests for my URLs?
FWIW This question has a...
FWIW This question has a...
Jinja 2.9 Released with Python 3 async support, better scope handling, and much more
https://www.palletsprojects.com/blog/jinja-29-released/
/r/flask
https://redd.it/5ml2ve
https://www.palletsprojects.com/blog/jinja-29-released/
/r/flask
https://redd.it/5ml2ve
reddit
Jinja 2.9 Released with Python 3 async support, better... • /r/flask
20 points and 0 comments so far on reddit
Json dump with django
hello there, i need to dump a json like;
{
['19191': 'foo'],
...
}
My best i can
{
['pk': '19191', 'name': 'foo'],
....
}
here my codes: https://paste.ee/p/uJa8R
i'll be glad if can someone guide me thanks..
/r/django
https://redd.it/5mkbhp
hello there, i need to dump a json like;
{
['19191': 'foo'],
...
}
My best i can
{
['pk': '19191', 'name': 'foo'],
....
}
here my codes: https://paste.ee/p/uJa8R
i'll be glad if can someone guide me thanks..
/r/django
https://redd.it/5mkbhp
admin.TabularInline with model = MyModel.ManyToManyFieldName.through, disable add/edit/delete buttons.
class RoleInline(admin.TabularInline):
model = Team.people.through
fields = ['position', 'team']
# readonly_fields = ['team']
# can_delete_related = False # doesn't exist.
# can_delete = False
@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
list_display = ['get_name', 'email_address', 'receive_emails', 'get_teams']
fields = [('first_name', 'last_name'), ('email_address', 'receive_emails')]
inlines = [RoleInline,]
I'm trying to figure out how to disable add/edit buttons from the inline view only, without affecting anything else. `has_delete_permission` only disables deleting the Role line itself, `can_delete = False` is the same issue. and readonly_fields hides it completely.
Any help is greatly appreciated, thanks
/r/django
https://redd.it/5mi5xn
class RoleInline(admin.TabularInline):
model = Team.people.through
fields = ['position', 'team']
# readonly_fields = ['team']
# can_delete_related = False # doesn't exist.
# can_delete = False
@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
list_display = ['get_name', 'email_address', 'receive_emails', 'get_teams']
fields = [('first_name', 'last_name'), ('email_address', 'receive_emails')]
inlines = [RoleInline,]
I'm trying to figure out how to disable add/edit buttons from the inline view only, without affecting anything else. `has_delete_permission` only disables deleting the Role line itself, `can_delete = False` is the same issue. and readonly_fields hides it completely.
Any help is greatly appreciated, thanks
/r/django
https://redd.it/5mi5xn
reddit
admin.TabularInline with model =... • /r/django
class RoleInline(admin.TabularInline): model = Team.people.through fields = ['position', 'team'] # readonly_fields =...
Django webapp 500 server error after running migrations
So I ran python manage.py migrate after making some code changes, and I end up getting a 500 server error when I run the app. I tried reverting the migration files but that didn't work, and when I try to run migrate again it tells me that there are No migrations to apply. Any general suggestions?
/r/djangolearning
https://redd.it/5mpkd9
So I ran python manage.py migrate after making some code changes, and I end up getting a 500 server error when I run the app. I tried reverting the migration files but that didn't work, and when I try to run migrate again it tells me that there are No migrations to apply. Any general suggestions?
/r/djangolearning
https://redd.it/5mpkd9
reddit
Django webapp 500 server error after running... • /r/djangolearning
So I ran python manage.py migrate after making some code changes, and I end up getting a 500 server error when I run the app. I tried reverting...
django- Quiz app,how to keep track of all user's selected choice
http://stackoverflow.com/questions/41531463/django-quiz-app-how-to-keep-track-of-all-users-selected-choice
/r/django
https://redd.it/5mq7ff
http://stackoverflow.com/questions/41531463/django-quiz-app-how-to-keep-track-of-all-users-selected-choice
/r/django
https://redd.it/5mq7ff
Stack Overflow
django- Quiz app,how to keep track of all user's selected choice
The registered user, selects a answer for a question.
I need to save the selected choice(answer) by each user
models.py
class Question(models.Model):
question_text = models.CharField(null = ...
I need to save the selected choice(answer) by each user
models.py
class Question(models.Model):
question_text = models.CharField(null = ...
How to upload/depoy static files/images files in Django
Hello everyone! I'm a beginner in django and to web development in general. I managed to succesfully deploy a django project with postgresql, gunicorn, and nginx on ubuntu 16.04 after following [this tutorial from digital ocean.](https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04)
With that said, I was following [the django tutorial](https://docs.djangoproject.com/en/1.10/intro/tutorial06/) and I came across this roadblock where I'm supposed to 'upload' an image and I have no idea how to. I haven't found a way to do it searching the django documentation either. I know that if I were using my local server I would simply upload it using a GUI but I don't have that luxury, a least not to my knowledge.
tried google and that did not favorable results. Any help will be greatly appreciated.
/r/django
https://redd.it/5mq4bo
Hello everyone! I'm a beginner in django and to web development in general. I managed to succesfully deploy a django project with postgresql, gunicorn, and nginx on ubuntu 16.04 after following [this tutorial from digital ocean.](https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04)
With that said, I was following [the django tutorial](https://docs.djangoproject.com/en/1.10/intro/tutorial06/) and I came across this roadblock where I'm supposed to 'upload' an image and I have no idea how to. I haven't found a way to do it searching the django documentation either. I know that if I were using my local server I would simply upload it using a GUI but I don't have that luxury, a least not to my knowledge.
tried google and that did not favorable results. Any help will be greatly appreciated.
/r/django
https://redd.it/5mq4bo
Digitalocean
How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 16.04 | DigitalOcean
Django is a powerful web framework that can help you get your Python application or website off the ground. Django includes a simplified development server f…
Google boosts Python by turning it into Go
http://www.infoworld.com/article/3154624/application-development/google-boosts-python-by-turning-it-into-go.html
/r/Python
https://redd.it/5mqbiz
http://www.infoworld.com/article/3154624/application-development/google-boosts-python-by-turning-it-into-go.html
/r/Python
https://redd.it/5mqbiz
InfoWorld
Google boosts Python by turning it into Go
The experimental Grumpy project compiles Python apps into Go, for faster runtimes and closer interoperability
[AF] cannot load scikit-learn from Flask app
I have a small Flask app that needs to use scikit-learn. However, it works if I test it on local machine, but when I test it using browser, the webpage just never load. It seems that there is something wrong with the line of import any functions from scikit-learn. Iit just doesn't allow me to import any function from scikit-learn. Any idea of the reason that might cause this? The Flask app is hosted under Apache. Could it be any setting related to Apache or mod_wsgi? Thanks
/r/flask
https://redd.it/5l6bex
I have a small Flask app that needs to use scikit-learn. However, it works if I test it on local machine, but when I test it using browser, the webpage just never load. It seems that there is something wrong with the line of import any functions from scikit-learn. Iit just doesn't allow me to import any function from scikit-learn. Any idea of the reason that might cause this? The Flask app is hosted under Apache. Could it be any setting related to Apache or mod_wsgi? Thanks
/r/flask
https://redd.it/5l6bex
reddit
[AF] cannot load scikit-learn from Flask app • /r/flask
I have a small Flask app that needs to use scikit-learn. However, it works if I test it on local machine, but when I test it using browser, the...
Does the ORM have a bulk read function?
For example if there's a table with two columns: `id` and `city`, I have a list of cities and want to fetch their corresponding id's, can it be done efficiently in bulk? Or is it necessary to loop a round trip to Postgres for each city in the list?
This is mostly for the purposes of normalizing and conserving space.
/r/django
https://redd.it/5mr5qy
For example if there's a table with two columns: `id` and `city`, I have a list of cities and want to fetch their corresponding id's, can it be done efficiently in bulk? Or is it necessary to loop a round trip to Postgres for each city in the list?
This is mostly for the purposes of normalizing and conserving space.
/r/django
https://redd.it/5mr5qy
reddit
Does the ORM have a bulk read function? • /r/django
For example if there's a table with two columns: `id` and `city`, I have a list of cities and want to fetch their corresponding id's, can it be...