[Project] Monte-Carlo Search for Magic: The Gathering
https://hackernoon.com/monte-carlo-search-for-magic-the-gathering-6ca60750fcc6
/r/MachineLearning
https://redd.it/8e1ojv
https://hackernoon.com/monte-carlo-search-for-magic-the-gathering-6ca60750fcc6
/r/MachineLearning
https://redd.it/8e1ojv
Hacker Noon
Monte-Carlo Search for Magic: The Gathering
We’ve recently seen an emergence of strong artificial intelligence (AI) for difficult board games such as Go and Poker. There is yet to be…
User Session and Session Data
Is there any way to store session data based on a User's session?
i.e. `request.user['foo'] = 'bar'`
I know the above code doesn't work, so I was wondering if there is something built in where you could individually store data in sessions with each user? Or is there another to do something like this, because I need to use data across different views and I need to keep it separate from each User.
/r/djangolearning
https://redd.it/8e1v8q
Is there any way to store session data based on a User's session?
i.e. `request.user['foo'] = 'bar'`
I know the above code doesn't work, so I was wondering if there is something built in where you could individually store data in sessions with each user? Or is there another to do something like this, because I need to use data across different views and I need to keep it separate from each User.
/r/djangolearning
https://redd.it/8e1v8q
reddit
User Session and Session Data • r/djangolearning
Is there any way to store session data based on a User's session? i.e. `request.user['foo'] = 'bar'` I know the above code doesn't work, so I...
Impressed!
Fastest web development framework I have encountered till now.
Made a website in 24hours, which would have otherwise taken at least a week.
Thanks Flask!
/r/flask
https://redd.it/8e2o6e
Fastest web development framework I have encountered till now.
Made a website in 24hours, which would have otherwise taken at least a week.
Thanks Flask!
/r/flask
https://redd.it/8e2o6e
Reddit
reddit: the front page of the internet
r/flask: Flask is a Python micro-framework for web development. Flask is easy to get started and a great way to build web sites and web applications.
What are the chances of a django site being hacked?
If you were to create a cms in Django what are the chances of it being hacked compared to using wordpress?
Would it be near impossible to get hacked via a vulnerability in your cms if nobody else has access other than you to your django source code?
What if you are lazy/don't know how to update django and python so you end up never updating django versions?
You like a look of a few apps on djangos site so add a few.. would this increase your chances of getting hacked? Does the django repository have a bad reputation of vulnerability plugins like the wordpress one?
*I ask these questions as someone with no knowledge of django but wanting to learn so I can create my own cms and move from wordpress to django.
Thanks in advance :)
/r/django
https://redd.it/8e29do
If you were to create a cms in Django what are the chances of it being hacked compared to using wordpress?
Would it be near impossible to get hacked via a vulnerability in your cms if nobody else has access other than you to your django source code?
What if you are lazy/don't know how to update django and python so you end up never updating django versions?
You like a look of a few apps on djangos site so add a few.. would this increase your chances of getting hacked? Does the django repository have a bad reputation of vulnerability plugins like the wordpress one?
*I ask these questions as someone with no knowledge of django but wanting to learn so I can create my own cms and move from wordpress to django.
Thanks in advance :)
/r/django
https://redd.it/8e29do
Reddit
reddit: the front page of the internet
r/django:
Web API performance: profiling Django REST framework
https://www.dabapps.com/blog/api-performance-profiling-django-rest-framework/
/r/django
https://redd.it/8e5vzu
https://www.dabapps.com/blog/api-performance-profiling-django-rest-framework/
/r/django
https://redd.it/8e5vzu
Leading Web and Mobile App Development agency, Brighton - DabApps
Web API performance: profiling Django REST framework - DabApps
When discussing the scalability of Web services there seems to be a tendency for some developers to overly focus on the framework being used, based on the mistaken assumption that…
[P] Simple Tensorflow implementation of Multimodal Unsupervised Image-to-Image Translation (MUNIT)
/r/MachineLearning
https://redd.it/8e4765
/r/MachineLearning
https://redd.it/8e4765
[D] Million Dollar Salaries for AI Researchers? Well, Quants Have Seen This Before
https://medium.com/@pycy/million-dollar-salaries-for-ai-researchers-well-we-quants-have-seen-this-movie-before-8e7af51f6c63
/r/MachineLearning
https://redd.it/8e5pmr
https://medium.com/@pycy/million-dollar-salaries-for-ai-researchers-well-we-quants-have-seen-this-movie-before-8e7af51f6c63
/r/MachineLearning
https://redd.it/8e5pmr
Medium
Million Dollar Salaries for AI Researchers? Well, we Quants Have Seen this Movie Before
TLDR: Do it if you enjoy it, don’t do it for the money
Struggling with dynamic forms
I need a form that can dynamically create more fields. I have a select, and I need a number of additional parameters depending on the value of the select.
For example, imagine a select "numberOfParameters" and if the user selects 4, I want 4 new fields. This is made even worse by the fact that these are dependent selects: the options on the second select which generates more fields depends on what has been selected on the first one.
This is proving to be pretty challenging in django, is it safe to do this without forms.py in AJAX/JQuery (which is relatively easy)? Or is there a way to do it normally? (or should I just drop the idea altogether if it isn't safe).
Example of what I mean:
An application for selecting a way to travel to school.
* Users can select a school they go to.
* Depending on which school they choose there are different options for the travel, some school have busses, some only have cars, some even have boats.
* Depending on which way they want to travel, there are more options: trains have option for 1st or second class, cars have options for brand, but also for itinerary, type of fuel, type of music you want to listen to, and boats don't have any options at all.
Thanks for reading.
/r/django
https://redd.it/8e376d
I need a form that can dynamically create more fields. I have a select, and I need a number of additional parameters depending on the value of the select.
For example, imagine a select "numberOfParameters" and if the user selects 4, I want 4 new fields. This is made even worse by the fact that these are dependent selects: the options on the second select which generates more fields depends on what has been selected on the first one.
This is proving to be pretty challenging in django, is it safe to do this without forms.py in AJAX/JQuery (which is relatively easy)? Or is there a way to do it normally? (or should I just drop the idea altogether if it isn't safe).
Example of what I mean:
An application for selecting a way to travel to school.
* Users can select a school they go to.
* Depending on which school they choose there are different options for the travel, some school have busses, some only have cars, some even have boats.
* Depending on which way they want to travel, there are more options: trains have option for 1st or second class, cars have options for brand, but also for itinerary, type of fuel, type of music you want to listen to, and boats don't have any options at all.
Thanks for reading.
/r/django
https://redd.it/8e376d
reddit
Struggling with dynamic forms • r/django
I need a form that can dynamically create more fields. I have a select, and I need a number of additional parameters depending on the value of the...
How can I convert my Jupyter notebooks to organizable and searchable documentation such as devdocs.io?
Hello guys.I have thousands of code snippets and jupyter notebooks.I want to create easily, organizable, searchable documentation(such as devdocs.io) for this Jupyter notebooks.
Are there tools for doing this hard work for me?
/r/IPython
https://redd.it/8e6w43
Hello guys.I have thousands of code snippets and jupyter notebooks.I want to create easily, organizable, searchable documentation(such as devdocs.io) for this Jupyter notebooks.
Are there tools for doing this hard work for me?
/r/IPython
https://redd.it/8e6w43
reddit
How can I convert my Jupyter notebooks to organizable... • r/IPython
Hello guys.I have thousands of code snippets and jupyter notebooks.I want to create easily, organizable, searchable documentation(such as...
flask whoosh alchemy: when or where do analyzers/tokenizers run?
Are texts tokenized > indexed > searched? OR
are full texts indexed > read/loaded > tokenized > searched?
Im trying to index my existing db, still trying to get it to work. But not quite sure how to go about it.
/r/flask
https://redd.it/8e7yph
Are texts tokenized > indexed > searched? OR
are full texts indexed > read/loaded > tokenized > searched?
Im trying to index my existing db, still trying to get it to work. But not quite sure how to go about it.
/r/flask
https://redd.it/8e7yph
reddit
flask whoosh alchemy: when or where do... • r/flask
Are texts tokenized > indexed > searched? OR are full texts indexed > read/loaded > tokenized > searched? Im trying to index my existing db,...
This media is not supported in your browser
VIEW IN TELEGRAM
Prototype for a garage door monitor/controller using MicroPython and an ESP8266
/r/Python
https://redd.it/8e3fix
/r/Python
https://redd.it/8e3fix
Build an Instagram "Pin" Effect in Python with Dlib
https://www.makeartwithpython.com/blog/instagram-pin-effect-in-python/
/r/Python
https://redd.it/8e80rw
https://www.makeartwithpython.com/blog/instagram-pin-effect-in-python/
/r/Python
https://redd.it/8e80rw
Make Art with Python
Build an Instagram “Pin” Effect in Python with Dlib
Using correlation tracking to pin images in video
Why when SageMath was before Jupyter, only Jupyter was "accepted" in the community? What are the differences between them? I'm NOT talking about CoCalc but SageMath the software
/r/IPython
https://redd.it/8e5una
/r/IPython
https://redd.it/8e5una
reddit
Why when SageMath was before Jupyter, only Jupyter was... • r/IPython
2 points and 0 comments so far on reddit
Cron script to re-save all of a model's instances
I have a pre-save receiver that updates a model with some supplemental information. I'll need to run it every day or so.
While messing around in the shell, I noticed that I have to exit out and restart the shell if I make any changes to my receiver (which I anticipate having to do).
Some googling suggested I should use importlib to reload a package, in this case profiles.models. But it's not working as I expected. Here's my script:
import importlib
import profiles.models
importlib.reload(profiles.models)
for i in profiles.models.Score.objects.all():
i.save()
I get the error:
django.core.exceptions.AppRegistryNotReady:
Apps aren't loaded yet.
Does that mean I can't run this outside of an active and running Django server? What's the right way to do this?
---
Bonus question: It seems computationally expensive to do this for every Score instance every time. If I want to select a random sample of 100 of them, would the right way to do so be this?
Score.objects.all().order_by('?')[:100]
/r/djangolearning
https://redd.it/8e5w3r
I have a pre-save receiver that updates a model with some supplemental information. I'll need to run it every day or so.
While messing around in the shell, I noticed that I have to exit out and restart the shell if I make any changes to my receiver (which I anticipate having to do).
Some googling suggested I should use importlib to reload a package, in this case profiles.models. But it's not working as I expected. Here's my script:
import importlib
import profiles.models
importlib.reload(profiles.models)
for i in profiles.models.Score.objects.all():
i.save()
I get the error:
django.core.exceptions.AppRegistryNotReady:
Apps aren't loaded yet.
Does that mean I can't run this outside of an active and running Django server? What's the right way to do this?
---
Bonus question: It seems computationally expensive to do this for every Score instance every time. If I want to select a random sample of 100 of them, would the right way to do so be this?
Score.objects.all().order_by('?')[:100]
/r/djangolearning
https://redd.it/8e5w3r
reddit
Cron script to re-save all of a model's instances • r/djangolearning
I have a pre-save receiver that updates a model with some supplemental information. I'll need to run it every day or so. While messing around in...
How to structure a custom built admin?
Hey guys, my application is getting much more complex and the inbuilt django admin isn't cutting it anymore.
So I've decided to build a custom admin for our most used flows.
How do I go about structuring this custom admin? Do I make a new app called `custom_admin` and house all the functionality in there, or do I just add a new `custom_admin.py` file to all my existing apps? (since I already have a lot of stuff in `admin.py`), or simply write the views in `views.py`?
One example I found is that `saleor` (a django project) have their custom admin dashboard as a separate app https://github.com/mirumee/saleor/tree/master/saleor/dashboard
How do you guys build a custom admin?
/r/django
https://redd.it/8e9bvd
Hey guys, my application is getting much more complex and the inbuilt django admin isn't cutting it anymore.
So I've decided to build a custom admin for our most used flows.
How do I go about structuring this custom admin? Do I make a new app called `custom_admin` and house all the functionality in there, or do I just add a new `custom_admin.py` file to all my existing apps? (since I already have a lot of stuff in `admin.py`), or simply write the views in `views.py`?
One example I found is that `saleor` (a django project) have their custom admin dashboard as a separate app https://github.com/mirumee/saleor/tree/master/saleor/dashboard
How do you guys build a custom admin?
/r/django
https://redd.it/8e9bvd
GitHub
mirumee/saleor
saleor - An e-commerce storefront for Python and Django
Submitting multiple forms at once?
New to flask, hello :)
I have a page with two forms that are passed in as parameters.
return render_template(
'survey.html',
clientDetailsForm=ClientDetailsForm(),
houseDetailsForm=HouseDetailsForm())
I like having them as seperate forms because they represent seperate concepts.
On my survey.html I have a save button which I would like to save the values of both forms.
Additionally I have a "Send Report" button which ideally would first call the save view, then the sendReport view.
How can this be achieved?
Thanks!
/r/flask
https://redd.it/8e9fj1
New to flask, hello :)
I have a page with two forms that are passed in as parameters.
return render_template(
'survey.html',
clientDetailsForm=ClientDetailsForm(),
houseDetailsForm=HouseDetailsForm())
I like having them as seperate forms because they represent seperate concepts.
On my survey.html I have a save button which I would like to save the values of both forms.
Additionally I have a "Send Report" button which ideally would first call the save view, then the sendReport view.
How can this be achieved?
Thanks!
/r/flask
https://redd.it/8e9fj1
Reddit
reddit: the front page of the internet
r/flask: Flask is a Python micro-framework for web development. Flask is easy to get started and a great way to build web sites and web applications.
Android development using Python?
Does anybody know the best way to develop for Android in Python? I've heard about a lot of packages /etc but no clear answer to "what is the best / standard / working".
/r/Python
https://redd.it/8e9wae
Does anybody know the best way to develop for Android in Python? I've heard about a lot of packages /etc but no clear answer to "what is the best / standard / working".
/r/Python
https://redd.it/8e9wae
reddit
Android development using Python? • r/Python
Does anybody know the best way to develop for Android in Python? I've heard about a lot of packages /etc but no clear answer to "what is the best...
Are there any good continuous testing tools ?
Hello !
The C# team at my company is using a proprietary tool called [NCrunch](https://www.ncrunch.net/) which amongst other things allow us to have tests continiously running the appropriate unit tests when a part of the codebase is modified.
After working some weeks on the C# codebase, I found myself missing this feature when coding in Python.
Do you know a good tool for continuous testing for a Python codebase ?
Thanks in advance for your feedbacks :)
[EDIT 1]: We already have set up continuous integration on our [Jenkins](https://jenkins.io/) server.
[EDIT 2]: I do not try to find a replacement for NCrunch, but instead I am looking for its equivalent for Python codebases :)
[EDIT 3]: Teamates told me about [Wallaby.js](https://wallabyjs.com/) which is an continuous testing tool for JavaScript. If this kind of stuff exists for JS, I am confident that it can be done for Python too !
/r/Python
https://redd.it/8ea9lx
Hello !
The C# team at my company is using a proprietary tool called [NCrunch](https://www.ncrunch.net/) which amongst other things allow us to have tests continiously running the appropriate unit tests when a part of the codebase is modified.
After working some weeks on the C# codebase, I found myself missing this feature when coding in Python.
Do you know a good tool for continuous testing for a Python codebase ?
Thanks in advance for your feedbacks :)
[EDIT 1]: We already have set up continuous integration on our [Jenkins](https://jenkins.io/) server.
[EDIT 2]: I do not try to find a replacement for NCrunch, but instead I am looking for its equivalent for Python codebases :)
[EDIT 3]: Teamates told me about [Wallaby.js](https://wallabyjs.com/) which is an continuous testing tool for JavaScript. If this kind of stuff exists for JS, I am confident that it can be done for Python too !
/r/Python
https://redd.it/8ea9lx
www.ncrunch.net
NCrunch
NCrunch is the ultimate live testing tool for Microsoft Visual Studio and JetBrains Rider. It runs your unit and integration tests so you don't have to, providing inline code coverage and performance metrics while you type.
sqlalchemy queries
I am learning about flask and sqlalchemy and I have a question about the ways to make queries. I have seen three types of querys: cls.query, db.session.query and model.query. I want to know what are, if there are, the differences between these three methods? Or do the do the exact same thing?
/r/flask
https://redd.it/8eb8go
I am learning about flask and sqlalchemy and I have a question about the ways to make queries. I have seen three types of querys: cls.query, db.session.query and model.query. I want to know what are, if there are, the differences between these three methods? Or do the do the exact same thing?
/r/flask
https://redd.it/8eb8go
reddit
sqlalchemy queries • r/flask
I am learning about flask and sqlalchemy and I have a question about the ways to make queries. I have seen three types of querys: cls.query,...