I Made a Massively Multiplayer Board Game to Test Django Channels
http://codewords.io/
I've been trying to get permission to run a game of it from the publisher and designer (CGE & Vlaada Chvátil) but I haven't heard back. I've found demonstrating that there's interest in what you're doing is the best way to get ahold of people. So..
Anyone interested in trying a massive game of Codenames over Twitch? Not quite "For Science!" more "For Engineering!" Which, let's be honest here, has a much better ring to it.
If you'd like to know more, I put up an FAQ up here: http://codewords.io/faq/
If you'd like to sign up to help, there's a form over there: http://codewords.io/
Screenshots and a game play overview can be found somewhere under this: https://imgur.com/a/3xtZC
Never haven’t heard of Codenames?! You’re in for a treat, it's one of this (or any) decade's best games. Here’s the super short rulebook (https://czechgames.com/en/codenames/downloads/).. And a video: https://www.youtube.com/watch?v=emlI43ZE9-c
/r/django
https://redd.it/7cieeu
http://codewords.io/
I've been trying to get permission to run a game of it from the publisher and designer (CGE & Vlaada Chvátil) but I haven't heard back. I've found demonstrating that there's interest in what you're doing is the best way to get ahold of people. So..
Anyone interested in trying a massive game of Codenames over Twitch? Not quite "For Science!" more "For Engineering!" Which, let's be honest here, has a much better ring to it.
If you'd like to know more, I put up an FAQ up here: http://codewords.io/faq/
If you'd like to sign up to help, there's a form over there: http://codewords.io/
Screenshots and a game play overview can be found somewhere under this: https://imgur.com/a/3xtZC
Never haven’t heard of Codenames?! You’re in for a treat, it's one of this (or any) decade's best games. Here’s the super short rulebook (https://czechgames.com/en/codenames/downloads/).. And a video: https://www.youtube.com/watch?v=emlI43ZE9-c
/r/django
https://redd.it/7cieeu
codewords.io
Codewords · FAQ
A Massively Multiplayer Online Adapation of Vlaada Chvátil's Codenames.
Please recommend good Python books for the following topics.
Hey Redditors,
I am looking for books on following topics using python programming:
* Automata with Python
* Design & Algorithm with Python
* Operational Research with Python
* Probability & Vectors with Python.
Thanks.
/r/Python
https://redd.it/7cj6v2
Hey Redditors,
I am looking for books on following topics using python programming:
* Automata with Python
* Design & Algorithm with Python
* Operational Research with Python
* Probability & Vectors with Python.
Thanks.
/r/Python
https://redd.it/7cj6v2
reddit
Please recommend good Python books for the following... • r/Python
Hey Redditors, I am looking for books on following topics using python programming: * Automata with Python * Design & Algorithm with Python *...
Show generated image file to html
I have generated image file from matplotlib with various filename, like this :
figure_name="Sentiment_Analysis_of_{}_Tweets_About_{}".format(number, query)
plt.savefig("{}.png".format(figure_name))
full_filename=figure_name+'.png'
return render_template("index.html", figure_filename=full_filename)
how to return the generated image to html?
I use this code but it doesn't work
<img src="/{{ figure_filename }}" class="img-fluid" alt="">
/r/flask
https://redd.it/7br7sx
I have generated image file from matplotlib with various filename, like this :
figure_name="Sentiment_Analysis_of_{}_Tweets_About_{}".format(number, query)
plt.savefig("{}.png".format(figure_name))
full_filename=figure_name+'.png'
return render_template("index.html", figure_filename=full_filename)
how to return the generated image to html?
I use this code but it doesn't work
<img src="/{{ figure_filename }}" class="img-fluid" alt="">
/r/flask
https://redd.it/7br7sx
reddit
Show generated image file to html • r/flask
I have generated image file from matplotlib with various filename, like this : ...
Question about thread model of Flask application
Would it be safe to have the built-in Flask webserver running in the same process with other background tasks?
Performance should not be a problem as only 1-2 Users are accessing the system at a time. It would be very convenient to have only a single process with shared data running and the possibility to have application internal events shared between tasks.
/r/flask
https://redd.it/7bkv62
Would it be safe to have the built-in Flask webserver running in the same process with other background tasks?
Performance should not be a problem as only 1-2 Users are accessing the system at a time. It would be very convenient to have only a single process with shared data running and the possibility to have application internal events shared between tasks.
/r/flask
https://redd.it/7bkv62
reddit
Question about thread model of Flask application • r/flask
Would it be safe to have the built-in Flask webserver running in the same process with other background tasks? Performance should not be a problem...
url variable
How do you get the url variable in flask.
http://localhost/page?a=22
How do I print the value of a in jinga2.
/r/flask
https://redd.it/7bcn72
How do you get the url variable in flask.
http://localhost/page?a=22
How do I print the value of a in jinga2.
/r/flask
https://redd.it/7bcn72
reddit
url variable • r/flask
How do you get the url variable in flask. http://localhost/page?a=22 How do I print the value of a in jinga2.
PathsJSON is a JSON-based DSL for describing paths in your project.
http://pathsjson.falsifiable.com/
/r/Python
https://redd.it/7cniu5
http://pathsjson.falsifiable.com/
/r/Python
https://redd.it/7cniu5
Falsifiable
A JSON-based format for describing paths in your project.
Show /r/django: a mini-language to add filtering and sorting capabilities to rest_framework views
https://github.com/dlr-eoc/rest_framework_filterdsl
/r/django
https://redd.it/7cmiv6
https://github.com/dlr-eoc/rest_framework_filterdsl
/r/django
https://redd.it/7cmiv6
GitHub
GitHub - dlr-eoc/rest_framework_filterdsl: A filtering and sorting DSL for the Django REST framework
A filtering and sorting DSL for the Django REST framework - dlr-eoc/rest_framework_filterdsl
A simple python3 library to convert JSON into XML via file, URL or string.
https://github.com/vinitkumar/json2xml
/r/Python
https://redd.it/7cp91g
https://github.com/vinitkumar/json2xml
/r/Python
https://redd.it/7cp91g
GitHub
GitHub - vinitkumar/json2xml: json to xml converter in python3
json to xml converter in python3. Contribute to vinitkumar/json2xml development by creating an account on GitHub.
Django-UserForeignKey - Automatically set the current user on a model (e.g., for created_by information)
Hi there,
today I want to show the Django community a library called **django-userforeignkey** (disclaimer: I know the author of the package in person, and I have contributed to that package too), that essentially allows you to add **created_by** and **last_modified_by** information to your Django Models like this:
class MyModel(models.Model):
title = models.CharField(max_length=128)
description = models.TextField()
created_by = UserForeignKey(auto_user_add=True)
created_at = models.DateTimeField(auto_now_add=True)
last_modified_by = UserForeignKey(auto_user=True, auto_user_add=True)
last_modified_at = models.DateTimeField(auto_now_add=True, auto_now=True)
And all of that comes without needing to read request.user in your views or forms! It's all done "automatically".
The github repo of **django-userforeignkey** including a quickstart guide is available here: https://github.com/beachmachine/django-userforeignkey - it's also published on pypi
I showcased this library in a video which is available here: https://youtu.be/iJCbYMgUDW8
/r/django
https://redd.it/7cq29w
Hi there,
today I want to show the Django community a library called **django-userforeignkey** (disclaimer: I know the author of the package in person, and I have contributed to that package too), that essentially allows you to add **created_by** and **last_modified_by** information to your Django Models like this:
class MyModel(models.Model):
title = models.CharField(max_length=128)
description = models.TextField()
created_by = UserForeignKey(auto_user_add=True)
created_at = models.DateTimeField(auto_now_add=True)
last_modified_by = UserForeignKey(auto_user=True, auto_user_add=True)
last_modified_at = models.DateTimeField(auto_now_add=True, auto_now=True)
And all of that comes without needing to read request.user in your views or forms! It's all done "automatically".
The github repo of **django-userforeignkey** including a quickstart guide is available here: https://github.com/beachmachine/django-userforeignkey - it's also published on pypi
I showcased this library in a video which is available here: https://youtu.be/iJCbYMgUDW8
/r/django
https://redd.it/7cq29w
GitHub
GitHub - beachmachine/django-userforeignkey
Contribute to beachmachine/django-userforeignkey development by creating an account on GitHub.
Senior Python Programmers, what tricks do you want to impart to us young guns?
Like basic looping, performance improvement, etc.
/r/Python
https://redd.it/7cs8dq
Like basic looping, performance improvement, etc.
/r/Python
https://redd.it/7cs8dq
reddit
Senior Python Programmers, what tricks do you want to... • r/Python
Like basic looping, performance improvement, etc.
Is there a way to put the result at the top of a notebook?
I've recently started using Jupyter Notebooks. I'm using Folium in them to create interactive maps. [HERE](http://gis.ironcountywi.org/jupyter/Remon_Project_2018-C.html) is a simple example. Is there a way to get the final map to the top of the Notebook so people see it first and don't have to scroll down to see how it was produced unless they want to? Thanks.
/r/IPython
https://redd.it/7cs7eu
I've recently started using Jupyter Notebooks. I'm using Folium in them to create interactive maps. [HERE](http://gis.ironcountywi.org/jupyter/Remon_Project_2018-C.html) is a simple example. Is there a way to get the final map to the top of the Notebook so people see it first and don't have to scroll down to see how it was produced unless they want to? Thanks.
/r/IPython
https://redd.it/7cs7eu
so. just spend 7 hours trying to set up my Android app to connect with django's csrf. let me save you some time
all of the everything about connecting to django using csrf and authentication talks about AJAX, and there is very little information about actually connecting with Android. Throw in the fact that Android httpurlconnection objects are obtuse, have terrible documentation, and there are no good tuturials about cookies that don't use some random persons half-baked personal library, and you get me spending 7 hours trying to get my app to log in.
so here heres how to do it.
#YOU NEED TO SET THE FULL COOKIE, NOT JUST THE CSRF TOKEN
**WRONG:**
csrftoken=3JR5KZ4tHrDRlPvVwufhrT8Zn83sklwk;
**CORRECT:**
csrftoken=3JR5KZ4tHrDRlPvVwufhrT8Zn83sklwk; expires=Tue, 13-Nov-2018 00:29:33 GMT; Max-Age=31449600; Path=/
grumble grumble grumble
I literally went into django.middleware.csrf and put in a bunch of print statements to try to figure out what was happening.
edit:
heres the full android code for setting the cookies (lots of non-important details omited):
URL url = new URL(serverURL + myurl);
//URL url = new URL(myurl);
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestProperty("Content-Type","application/json");
//getFullCSRFcookie() returns the full cookie string with time stamps and everything
urlConnection.setRequestProperty("Cookie", getFullCSRFcookie());
urlConnection.connect();
Edit: love how the only comments basically boil down to "I don't know what your project is, but you're doing it wrong." Lol you keep being you, reddit
/r/django
https://redd.it/7crsn5
all of the everything about connecting to django using csrf and authentication talks about AJAX, and there is very little information about actually connecting with Android. Throw in the fact that Android httpurlconnection objects are obtuse, have terrible documentation, and there are no good tuturials about cookies that don't use some random persons half-baked personal library, and you get me spending 7 hours trying to get my app to log in.
so here heres how to do it.
#YOU NEED TO SET THE FULL COOKIE, NOT JUST THE CSRF TOKEN
**WRONG:**
csrftoken=3JR5KZ4tHrDRlPvVwufhrT8Zn83sklwk;
**CORRECT:**
csrftoken=3JR5KZ4tHrDRlPvVwufhrT8Zn83sklwk; expires=Tue, 13-Nov-2018 00:29:33 GMT; Max-Age=31449600; Path=/
grumble grumble grumble
I literally went into django.middleware.csrf and put in a bunch of print statements to try to figure out what was happening.
edit:
heres the full android code for setting the cookies (lots of non-important details omited):
URL url = new URL(serverURL + myurl);
//URL url = new URL(myurl);
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestProperty("Content-Type","application/json");
//getFullCSRFcookie() returns the full cookie string with time stamps and everything
urlConnection.setRequestProperty("Cookie", getFullCSRFcookie());
urlConnection.connect();
Edit: love how the only comments basically boil down to "I don't know what your project is, but you're doing it wrong." Lol you keep being you, reddit
/r/django
https://redd.it/7crsn5
reddit
so. just spend 7 hours trying to set up my Android app... • r/django
all of the everything about connecting to django using csrf and authentication talks about AJAX, and there is very little information about...
[R] DiracNets: Training Very Deep Neural Networks Without Skip-Connections
https://github.com/szagoruyko/diracnets/blob/master/README.md
/r/MachineLearning
https://redd.it/7cockz
https://github.com/szagoruyko/diracnets/blob/master/README.md
/r/MachineLearning
https://redd.it/7cockz
GitHub
szagoruyko/diracnets
diracnets - Training Very Deep Neural Networks Without Skip-Connections
Hey, here's a very active discord server based around python and coding help, and many other tech topics. Come join our python and raspberry pi discord server! 2.6k members.
https://discord.gg/bB5vZSy
/r/Python
https://redd.it/7cqhu6
https://discord.gg/bB5vZSy
/r/Python
https://redd.it/7cqhu6
Discord
Discord - Free voice and text chat for gamers
Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!
Tutorial: User Authentication with Django REST Framework
https://michaelwashburnjr.com/django-user-authentication/
/r/django
https://redd.it/7cv7kl
https://michaelwashburnjr.com/django-user-authentication/
/r/django
https://redd.it/7cv7kl
Michael Washburn Jr
User Authentication with Django REST Framework
User Authentication is a simple concept, but when it comes to properly implementing it in Django, things can get complicated. Learn how to do it right.
Flask Beginner
I've started to read Flask Web Development by Miguel Grinberg. I am on part two where we create a social blogging website. I feel somewhat uncomfortable with the information. It feels quite over whelming. Is this book a fast pace book or is flask from a beginner still quite complicated?
/r/flask
https://redd.it/7crxog
I've started to read Flask Web Development by Miguel Grinberg. I am on part two where we create a social blogging website. I feel somewhat uncomfortable with the information. It feels quite over whelming. Is this book a fast pace book or is flask from a beginner still quite complicated?
/r/flask
https://redd.it/7crxog
reddit
Flask Beginner • r/flask
I've started to read Flask Web Development by Miguel Grinberg. I am on part two where we create a social blogging website. I feel somewhat...
Maintain Production Server
I recently moved my Django app from Heroku to DigitalOcean to save some $$$. In my reading prior to making the switch, people noted that managing your own server on DO is more work than Heroku. They mentioned security patches and other maintenance that is required.
My question is, now that my app is up and running on DO, what ongoing maintenance should I be doing to keep it secure and running smoothly?
/r/django
https://redd.it/7cw24q
I recently moved my Django app from Heroku to DigitalOcean to save some $$$. In my reading prior to making the switch, people noted that managing your own server on DO is more work than Heroku. They mentioned security patches and other maintenance that is required.
My question is, now that my app is up and running on DO, what ongoing maintenance should I be doing to keep it secure and running smoothly?
/r/django
https://redd.it/7cw24q
reddit
Maintain Production Server • r/django
I recently moved my Django app from Heroku to DigitalOcean to save some $$$. In my reading prior to making the switch, people noted that managing...
Which mobile app dev. framework do you recommend for use w/flask?
As far as user auth, i am using flask-login.
Any u guys recommend that's fast, easy, and cross platform? Was thinking react native..
/r/flask
https://redd.it/7cwzg6
As far as user auth, i am using flask-login.
Any u guys recommend that's fast, easy, and cross platform? Was thinking react native..
/r/flask
https://redd.it/7cwzg6
reddit
Which mobile app dev. framework do you recommend for use... • r/flask
As far as user auth, i am using flask-login. Any u guys recommend that's fast, easy, and cross platform? Was thinking react native..