Is there an extension like Flask-Admin, but for the user to use?
So If I have a web application with users, and they have a lot of data in databases is there an extension out there to make displaying all this data to them easier than building out tables in html and passing the data through?
/r/flask
https://redd.it/6x2txp
So If I have a web application with users, and they have a lot of data in databases is there an extension out there to make displaying all this data to them easier than building out tables in html and passing the data through?
/r/flask
https://redd.it/6x2txp
reddit
Is there an extension like Flask-Admin, but for the user... • r/flask
So If I have a web application with users, and they have a lot of data in databases is there an extension out there to make displaying all this...
Hunter 2.0 - can now trace other processes
Just made a release (https://pypi.python.org/pypi/hunter#changelog) with a process tracing feature. It works in two ways:
* GDB injection. Like all the other projects, it's prone to the same kinds of problems, deadlocks, segfaults and whatnot. But for development I guess it's ok ...
* Bootstrapping via [manhole](https://pypi.python.org/pypi/manhole). A convenience `hunter.remote.install()` is provided.
Give it a try, eg `pip install -U 'hunter[remote]'` and `hunter-trace -p PID --gdb`.
Also, it has filters, eg: `hunter-trace -p PID stdlib=False`.
Windows ain't supported. If you have ideas for Windows support let me know.
PS. Yes, I don't know how to reddit.
/r/Python
https://redd.it/6xpcxx
Just made a release (https://pypi.python.org/pypi/hunter#changelog) with a process tracing feature. It works in two ways:
* GDB injection. Like all the other projects, it's prone to the same kinds of problems, deadlocks, segfaults and whatnot. But for development I guess it's ok ...
* Bootstrapping via [manhole](https://pypi.python.org/pypi/manhole). A convenience `hunter.remote.install()` is provided.
Give it a try, eg `pip install -U 'hunter[remote]'` and `hunter-trace -p PID --gdb`.
Also, it has filters, eg: `hunter-trace -p PID stdlib=False`.
Windows ain't supported. If you have ideas for Windows support let me know.
PS. Yes, I don't know how to reddit.
/r/Python
https://redd.it/6xpcxx
pypi.python.org
hunter 2.0.2 : Python Package Index
Hunter is a flexible code tracing toolkit.
What I'm Currently Working On
https://github.com/PyPiPie/Scarlet-1.0-Virtual-Assistant-Made-With-Python
/r/Python
https://redd.it/6xpomj
https://github.com/PyPiPie/Scarlet-1.0-Virtual-Assistant-Made-With-Python
/r/Python
https://redd.it/6xpomj
GitHub
PyPiPie/Scarlet-1.0-Virtual-Assistant-Made-With-Python
Scarlet-1.0-Virtual-Assistant-Made-With-Python - S.C.A.R.L.E.T (Sorta Crappy Assistant Robot Lazily Engineered Today) To be honest making up that acronym was easier than making this virtual assista...
[AF] Beginner Question: "object is not callable" from inside a route
Having this problem that I can't figure out what is wrong with it.
[Link to pastebin of code](https://pastebin.com/xykEQ3qG)
I must be not understanding some fundamental aspect of all of python to not being able to understand it.
edit:
here is the error code: *TypeError: 'Test' object is not callable*
/r/flask
https://redd.it/6wr1i9
Having this problem that I can't figure out what is wrong with it.
[Link to pastebin of code](https://pastebin.com/xykEQ3qG)
I must be not understanding some fundamental aspect of all of python to not being able to understand it.
edit:
here is the error code: *TypeError: 'Test' object is not callable*
/r/flask
https://redd.it/6wr1i9
Pastebin
[Python] Python-Flask Object is not callable - Pastebin.com
syntax error when following the official tutorial!
I've gotten [this](https://docs.djangoproject.com/en/1.11/intro/tutorial02/#playing-with-the-api) far into the official tutorail for Django, but I keep getting an error when getting to the filter function.
Here's the command I tried to run, and its consequent output:
>>> Question.objects.filter(id=1)
File "<console>", line 1
Question.objects.filter(id=1)
^
SyntaxError: invalid syntax
What have I done wrong? I've been sure to import the models and that doens't return any errors.
Here's my models.py: https://gist.github.com/wOstensen/d55c63135df9da9c99a61e80a7a7aeee
EDIT: Running on Windows 10 with Python 3.6.0 in Cygwin.
/r/djangolearning
https://redd.it/6xlw4j
I've gotten [this](https://docs.djangoproject.com/en/1.11/intro/tutorial02/#playing-with-the-api) far into the official tutorail for Django, but I keep getting an error when getting to the filter function.
Here's the command I tried to run, and its consequent output:
>>> Question.objects.filter(id=1)
File "<console>", line 1
Question.objects.filter(id=1)
^
SyntaxError: invalid syntax
What have I done wrong? I've been sure to import the models and that doens't return any errors.
Here's my models.py: https://gist.github.com/wOstensen/d55c63135df9da9c99a61e80a7a7aeee
EDIT: Running on Windows 10 with Python 3.6.0 in Cygwin.
/r/djangolearning
https://redd.it/6xlw4j
Gist
models.py
Best Practices: OOP in Python.
I sure this question is nothing new but I want to hear your answers anyways. I am actually new to object-oriented programming (even though I know the theoretical concepts; OOP has a lot of resemblance in pure math, particularly in set theory).
What are some best practices in creating OOP systems in Python? And what are some bad practices to avoid?
Throughout my programming experience, I spent most of my time organizing my programs into functions/definitions, not necessarily relying much on classes. But I think OOP, as a paradigm, is pretty good for implementing mathematical structures.
/r/Python
https://redd.it/6xs6od
I sure this question is nothing new but I want to hear your answers anyways. I am actually new to object-oriented programming (even though I know the theoretical concepts; OOP has a lot of resemblance in pure math, particularly in set theory).
What are some best practices in creating OOP systems in Python? And what are some bad practices to avoid?
Throughout my programming experience, I spent most of my time organizing my programs into functions/definitions, not necessarily relying much on classes. But I think OOP, as a paradigm, is pretty good for implementing mathematical structures.
/r/Python
https://redd.it/6xs6od
reddit
Best Practices: OOP in Python. • r/Python
I sure this question is nothing new but I want to hear your answers anyways. I am actually new to object-oriented programming (even though I know...
How to count choices in aggregation?
suppose we have a model of a document:
class Document(TitleDescriptionModel, TimeStampedModel):
...
source = models.ForeignKey(Source, related_name='docs', blank=True, null=True)
class Meta:
ordering = ('year', 'month', 'title' )
and its source:
class Source(models.Model):
PHOTO = 'photo'
NEWSPAPER = 'newspaper'
MAGAZINE = 'magazine'
BOOK = 'book'
OTHER = 'other'
...
kind = models.CharField(max_length=32, choices=TYPE_CHOICES, default=PHOTO)
class Meta:
ordering = ('title', 'id', )
how to get how many photos, newspapers and magazines are in db?
the only solution i know is to use standard Counter:
qs = Document.objects.values_list('source__kind', flat=True)
counter = Counter(qs)
Counter({'other': 123,
'newspaper': 234,
'magazine': 345,
'book': 456,
'photo': 567,
None: 111})
i tried to do the same with `aggregate` but in vain. how could it be done?
/r/django
https://redd.it/6xrodm
suppose we have a model of a document:
class Document(TitleDescriptionModel, TimeStampedModel):
...
source = models.ForeignKey(Source, related_name='docs', blank=True, null=True)
class Meta:
ordering = ('year', 'month', 'title' )
and its source:
class Source(models.Model):
PHOTO = 'photo'
NEWSPAPER = 'newspaper'
MAGAZINE = 'magazine'
BOOK = 'book'
OTHER = 'other'
...
kind = models.CharField(max_length=32, choices=TYPE_CHOICES, default=PHOTO)
class Meta:
ordering = ('title', 'id', )
how to get how many photos, newspapers and magazines are in db?
the only solution i know is to use standard Counter:
qs = Document.objects.values_list('source__kind', flat=True)
counter = Counter(qs)
Counter({'other': 123,
'newspaper': 234,
'magazine': 345,
'book': 456,
'photo': 567,
None: 111})
i tried to do the same with `aggregate` but in vain. how could it be done?
/r/django
https://redd.it/6xrodm
reddit
How to count choices in aggregation? • r/django
suppose we have a model of a document: class Document(TitleDescriptionModel, TimeStampedModel): ... source =...
pyppeteer: Headless Chrome/Chromium Automation Library (Unofficial Port Of Puppeteer)
https://github.com/miyakogi/pyppeteer
/r/Python
https://redd.it/6xstch
https://github.com/miyakogi/pyppeteer
/r/Python
https://redd.it/6xstch
GitHub
GitHub - miyakogi/pyppeteer: Headless chrome/chromium automation library (unofficial port of puppeteer)
Headless chrome/chromium automation library (unofficial port of puppeteer) - miyakogi/pyppeteer
nbconvert 5.3.0 Release — adds tag-based element filtering
https://groups.google.com/forum/#!topic/jupyter/W2M_nLbboj4
/r/IPython
https://redd.it/6xtak5
https://groups.google.com/forum/#!topic/jupyter/W2M_nLbboj4
/r/IPython
https://redd.it/6xtak5
[R] Summary of DataScience Summer School at Polytechnique, with Bengio et al.
https://gmarti.gitlab.io/ml/2017/09/02/ds3-datascience-polytechnique.html
/r/MachineLearning
https://redd.it/6xt4ou
https://gmarti.gitlab.io/ml/2017/09/02/ds3-datascience-polytechnique.html
/r/MachineLearning
https://redd.it/6xt4ou
gmarti.gitlab.io
[Field report] Data Science Summer School at Ecole Polytechnique (with Bengio, Russell, Bousquet, Archambeau and others)
A small field report with personal viewpoint about the Data Science Summer School (Ecole Polytechnique) Monday, Aug. 28 – Friday, Sept. 1, 2017.
Do not reload all Flask apps
Hi There,
I'm using flask blueprints just as written here:
http://flask.pocoo.org/docs/0.12/patterns/appdispatch/
Specifically, I'm running the following piece of code:
from werkzeug.wsgi import DispatcherMiddleware
from frontend_app import application as frontend
from backend_app import application as backend
application = DispatcherMiddleware(frontend, {
'/backend': backend
})
Flask has an awesome feature of reloading application as it detects change in code. However, in my case it is not desirable for both apps: backend app is too heavy to be reloaded every few minutes. When I reload fronend, backend gets reloaded as well and it takes too long. Is there any way to reload only app that was changed?
I realize it might be difficult, because as far as I understand at this point
application = DispatcherMiddleware(frontend, {
'/backend': backend
})
applications are merged into a single one and they are not separate anymore.
Anyway, maybe there is a different way to achieve what I want?
Thanks.
/r/flask
https://redd.it/6xsh81
Hi There,
I'm using flask blueprints just as written here:
http://flask.pocoo.org/docs/0.12/patterns/appdispatch/
Specifically, I'm running the following piece of code:
from werkzeug.wsgi import DispatcherMiddleware
from frontend_app import application as frontend
from backend_app import application as backend
application = DispatcherMiddleware(frontend, {
'/backend': backend
})
Flask has an awesome feature of reloading application as it detects change in code. However, in my case it is not desirable for both apps: backend app is too heavy to be reloaded every few minutes. When I reload fronend, backend gets reloaded as well and it takes too long. Is there any way to reload only app that was changed?
I realize it might be difficult, because as far as I understand at this point
application = DispatcherMiddleware(frontend, {
'/backend': backend
})
applications are merged into a single one and they are not separate anymore.
Anyway, maybe there is a different way to achieve what I want?
Thanks.
/r/flask
https://redd.it/6xsh81
reddit
Do not reload all Flask apps • r/flask
Hi There, I'm using flask blueprints just as written here: http://flask.pocoo.org/docs/0.12/patterns/appdispatch/ Specifically, I'm running the...
I made a Pinterest clone for practice
Hey guys,
I made this week this [Pinterest](https://pinclone-django.herokuapp.com/) clone to practice my skill with Django, you can tell me everything wrong with it and I wll try to improve it, also I'll try to create a new app this week, maybe a hacker news clone to keep practicing
[github repo](https://github.com/iKenshu/pinclone)
/r/django
https://redd.it/6xu9em
Hey guys,
I made this week this [Pinterest](https://pinclone-django.herokuapp.com/) clone to practice my skill with Django, you can tell me everything wrong with it and I wll try to improve it, also I'll try to create a new app this week, maybe a hacker news clone to keep practicing
[github repo](https://github.com/iKenshu/pinclone)
/r/django
https://redd.it/6xu9em
[AF] How to separate individual form from others in for loop and then do ajax post?
I'm having trouble with submitting a certain form if they are all identical(for loop). Only the first one is submitted. I want to be able to enter the credentials into a form 2-10 and have that one submit instead of the first. Here is the code: https://gist.github.com/anonymous/f5a34a14c79d5de59d28b37c85daacdf
screenshots: http://imgur.com/a/Ndequ
In the first image, the program works fine because the two fields are filled out for the first form.
In the second image it doesn't work because the second field of the first form is not filled out.
The third image shows that only the first form is being submitted.
/r/flask
https://redd.it/6xvhr1
I'm having trouble with submitting a certain form if they are all identical(for loop). Only the first one is submitted. I want to be able to enter the credentials into a form 2-10 and have that one submit instead of the first. Here is the code: https://gist.github.com/anonymous/f5a34a14c79d5de59d28b37c85daacdf
screenshots: http://imgur.com/a/Ndequ
In the first image, the program works fine because the two fields are filled out for the first form.
In the second image it doesn't work because the second field of the first form is not filled out.
The third image shows that only the first form is being submitted.
/r/flask
https://redd.it/6xvhr1
Gist
ajax multiple submissions
[P] Word Ordering: Can Neural Networks Put a Scramble of Words in Correct Order?
https://github.com/Kyubyong/word_ordering
/r/MachineLearning
https://redd.it/6xtivu
https://github.com/Kyubyong/word_ordering
/r/MachineLearning
https://redd.it/6xtivu
GitHub
GitHub - Kyubyong/word_ordering: Can neural networks order a scramble of words correctly?
Can neural networks order a scramble of words correctly? - GitHub - Kyubyong/word_ordering: Can neural networks order a scramble of words correctly?
Seeking Django Tutor
Hi, I'm seeking a Django tutor, where might I be able to find one?
/r/django
https://redd.it/6xvenm
Hi, I'm seeking a Django tutor, where might I be able to find one?
/r/django
https://redd.it/6xvenm
reddit
Seeking Django Tutor • r/django
Hi, I'm seeking a Django tutor, where might I be able to find one?
Alexa Brower Client – Talk to Alexa through your browser (pluggable Django Channels App)
https://richardtier.com/2017/09/03/alexa-brower-client-talk-to-alexa-from-your-desktop-phone-or-tablet-browser/
/r/django
https://redd.it/6xw462
https://richardtier.com/2017/09/03/alexa-brower-client-talk-to-alexa-from-your-desktop-phone-or-tablet-browser/
/r/django
https://redd.it/6xw462
Richard Tier
Alexa Brower Client – Talk to Alexa from your desktop, phone, or tablet browser.
I made a pluggable Django app that allows you to talk to Alexa through your browser: Add alexa_browser_client to your INSTALLED_APPS Run the Django app ./manage.py runserver Go to Say somethin…
Python overtakes R, becomes the leader in Data Science, Machine Learning platforms
http://www.kdnuggets.com/2017/08/python-overtakes-r-leader-analytics-data-science.html
/r/Python
https://redd.it/6xtb87
http://www.kdnuggets.com/2017/08/python-overtakes-r-leader-analytics-data-science.html
/r/Python
https://redd.it/6xtb87
reddit
Python overtakes R, becomes the leader in Data Science,... • r/Python
798 points and 69 comments so far on reddit