Questions about flask html rendering.
I started web development with flask, with all server side routing and rendering. Now I am in the process of learning single page with react where flask (I think) renders only the first page then after that returns only JSON. So my question is, have I progressed as a programmer? i.e. will I mostly use flask like this now, as an api? Or are there situations where I might create a modified single page where I still render some pages with flask, and along with that still use jinja2, flask_wtf, flask_login, etc... the bulk of the flask extensions that I have learned thus far?
/r/flask
https://redd.it/ambsoh
I started web development with flask, with all server side routing and rendering. Now I am in the process of learning single page with react where flask (I think) renders only the first page then after that returns only JSON. So my question is, have I progressed as a programmer? i.e. will I mostly use flask like this now, as an api? Or are there situations where I might create a modified single page where I still render some pages with flask, and along with that still use jinja2, flask_wtf, flask_login, etc... the bulk of the flask extensions that I have learned thus far?
/r/flask
https://redd.it/ambsoh
reddit
r/flask - Questions about flask html rendering.
2 votes and 1 comment so far on Reddit
Django CMS - add Placeholderfield with TextPlugin from script
Hi reddit,
My friend have a blog on old django cms 2.X
I'm trying to help him automate some stuff, like create post in dropbox paper and export it to html with all text formatting stuff, and add it as a draft to his blog.
And my problem is :
How can i get instance of PlaceholderField, and add 'TextPlugin" in it from outside script
Models looks something like this :
class Post(models.Model):
author = models.ForeignKey(Author, verbose_name=_("Author"), blank=True, null=True)
........
draft = models.BooleanField(default=True)
class PostData(models.Model):
post = models.ForeignKey(Post, verbose_name=_("Post"))
post_content = PlaceholderField('Posts Content',related_name="%(app_label)s_%(class)s_posts_content")
......
My script is simple as f:
html_data = """<b>formatted html from dropbox paper</b>"""
author = Author.objects.get(id=1)
new_post = Post(author=author,draft=True, ...)
new_post.save()
post_data = PostData(post=new_post,language='en', post_content=???????)
I've read somewhere to override save method in PostData ie:
/r/django
https://redd.it/am8wex
Hi reddit,
My friend have a blog on old django cms 2.X
I'm trying to help him automate some stuff, like create post in dropbox paper and export it to html with all text formatting stuff, and add it as a draft to his blog.
And my problem is :
How can i get instance of PlaceholderField, and add 'TextPlugin" in it from outside script
Models looks something like this :
class Post(models.Model):
author = models.ForeignKey(Author, verbose_name=_("Author"), blank=True, null=True)
........
draft = models.BooleanField(default=True)
class PostData(models.Model):
post = models.ForeignKey(Post, verbose_name=_("Post"))
post_content = PlaceholderField('Posts Content',related_name="%(app_label)s_%(class)s_posts_content")
......
My script is simple as f:
html_data = """<b>formatted html from dropbox paper</b>"""
author = Author.objects.get(id=1)
new_post = Post(author=author,draft=True, ...)
new_post.save()
post_data = PostData(post=new_post,language='en', post_content=???????)
I've read somewhere to override save method in PostData ie:
/r/django
https://redd.it/am8wex
reddit
r/django - Django CMS - add Placeholderfield with TextPlugin from script
2 votes and 0 comments so far on Reddit
[1901.11390] MONet: Unsupervised Scene Decomposition and Representation
https://arxiv.org/abs/1901.11390
/r/MachineLearning
https://redd.it/am76v7
https://arxiv.org/abs/1901.11390
/r/MachineLearning
https://redd.it/am76v7
arXiv.org
MONet: Unsupervised Scene Decomposition and Representation
The ability to decompose scenes in terms of abstract building blocks is crucial for general intelligence. Where those basic building blocks share meaningful properties, interactions and other...
Building a Browsable Web API project using The Django-Rest Framework
https://www.reddit.com/r/djangolearning/comments/am95u2/building_a_browsable_web_api_project_using_the/
/r/django
https://redd.it/am990m
https://www.reddit.com/r/djangolearning/comments/am95u2/building_a_browsable_web_api_project_using_the/
/r/django
https://redd.it/am990m
reddit
r/djangolearning - Building a Browsable Web API project using The Django-Rest Framework
2 votes and 3 comments so far on Reddit
stupid question
How do i describe django?
So typically html and css are front end and java script is backend?
but with django html and css are front end and django python is backend?
I feel like im completely wrong i probably am
/r/django
https://redd.it/amdmhn
How do i describe django?
So typically html and css are front end and java script is backend?
but with django html and css are front end and django python is backend?
I feel like im completely wrong i probably am
/r/django
https://redd.it/amdmhn
reddit
r/django - stupid question
3 votes and 4 comments so far on Reddit
[1901.06955v1] Deep Neural Network Approximation for Custom Hardware: Where We've Been, Where We're Going
https://arxiv.org/abs/1901.06955v1
/r/MachineLearning
https://redd.it/amedjh
https://arxiv.org/abs/1901.06955v1
/r/MachineLearning
https://redd.it/amedjh
arXiv.org
Deep Neural Network Approximation for Custom Hardware: Where...
Deep neural networks have proven to be particularly effective in visual and
audio recognition tasks. Existing models tend to be computationally expensive
and memory intensive, however, and so...
audio recognition tasks. Existing models tend to be computationally expensive
and memory intensive, however, and so...
Trouble with HTMLCalendar
I'm having trouble with setting the first day within an HTMLCalendar to Sunday. Here is my code:
​
I'd like to make Sunday the first day in my calendar, but I'm not sure how to. I know that calendar.setfirstweekday() is a method that can be used for calendars, but I don't know that it's available for HTMLCalendar.
**utils.py**
class Calendar(HTMLCalendar):
def __init__(self, year=None, month=None, user=None):
self.year = year
self.month = month
self.user = user
super(Calendar, self).__init__()
Views.py
class CalendarView(generic.ListView):
model = Event
template_name = 'accounts/calendar.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
/r/django
https://redd.it/amafsc
I'm having trouble with setting the first day within an HTMLCalendar to Sunday. Here is my code:
​
I'd like to make Sunday the first day in my calendar, but I'm not sure how to. I know that calendar.setfirstweekday() is a method that can be used for calendars, but I don't know that it's available for HTMLCalendar.
**utils.py**
class Calendar(HTMLCalendar):
def __init__(self, year=None, month=None, user=None):
self.year = year
self.month = month
self.user = user
super(Calendar, self).__init__()
Views.py
class CalendarView(generic.ListView):
model = Event
template_name = 'accounts/calendar.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
/r/django
https://redd.it/amafsc
reddit
r/django - Trouble with HTMLCalendar
0 votes and 2 comments so far on Reddit
This media is not supported in your browser
VIEW IN TELEGRAM
ASCII generator (image2text, image2image and video2video) written in Python (Github repo: https://github.com/vietnguyen91/ASCII-generator)
/r/Python
https://redd.it/amfbjz
/r/Python
https://redd.it/amfbjz
what the best way to write/run a js test with django?
I'm using bootstrap (inc jquery depedency) on the front end together will full stack django. I'm used to just writing tests for django, but currently I need to write one to test a bootstrap modal is working. (it no longer works for some reason).
What's the best way to do this?
​
Thanks,
/r/django
https://redd.it/am3wbl
I'm using bootstrap (inc jquery depedency) on the front end together will full stack django. I'm used to just writing tests for django, but currently I need to write one to test a bootstrap modal is working. (it no longer works for some reason).
What's the best way to do this?
​
Thanks,
/r/django
https://redd.it/am3wbl
reddit
r/django - what the best way to write/run a js test with django?
0 votes and 12 comments so far on Reddit
IoT with Django
Hi, I want to make an IoT project, and I am thinking to display data in real time, how can I do that in Django,
so basic question if there is change (addition or deletion) in Database how can I show it on my webpage without refreshing it
/r/django
https://redd.it/amhwu9
Hi, I want to make an IoT project, and I am thinking to display data in real time, how can I do that in Django,
so basic question if there is change (addition or deletion) in Database how can I show it on my webpage without refreshing it
/r/django
https://redd.it/amhwu9
reddit
r/django - IoT with Django
2 votes and 2 comments so far on Reddit
[Project] nlp-tutoral repository who is studying NLP(Natural Language Processing) using TensorFlow and Pytorch
Hello. This is my first post in reddit
I created nlp-tutoral repository who is studying NLP(Natural Language Processing) using TensorFlow and Pytorch inspired by other example code.
You can see NNLM which is first language model, baseline model such as RNN, LSTM, TextCNN, Word2Vec in NLP. Also You can more easily learn NLP model, training steps as implemented Only ONE file (\*.py) from seq2seq, attention, bi-LSTM attenton, Transformer(self-attention), to BERT model.
I implemented with Pytorch, Tensorflow both.
[https://github.com/graykode/nlp-tutorial](https://github.com/graykode/nlp-tutorial?fbclid=IwAR3_DRc1-fcWQjumjDTM6e8xCpwZ09kYcXKOLBaS3AC2zbVeGvXKJOz4voo) This is my repository
/r/MachineLearning
https://redd.it/amfinl
Hello. This is my first post in reddit
I created nlp-tutoral repository who is studying NLP(Natural Language Processing) using TensorFlow and Pytorch inspired by other example code.
You can see NNLM which is first language model, baseline model such as RNN, LSTM, TextCNN, Word2Vec in NLP. Also You can more easily learn NLP model, training steps as implemented Only ONE file (\*.py) from seq2seq, attention, bi-LSTM attenton, Transformer(self-attention), to BERT model.
I implemented with Pytorch, Tensorflow both.
[https://github.com/graykode/nlp-tutorial](https://github.com/graykode/nlp-tutorial?fbclid=IwAR3_DRc1-fcWQjumjDTM6e8xCpwZ09kYcXKOLBaS3AC2zbVeGvXKJOz4voo) This is my repository
/r/MachineLearning
https://redd.it/amfinl
GitHub
GitHub - graykode/nlp-tutorial: Natural Language Processing Tutorial for Deep Learning Researchers
Natural Language Processing Tutorial for Deep Learning Researchers - graykode/nlp-tutorial
This media is not supported in your browser
VIEW IN TELEGRAM
ASCII generator (image2text, image2image and video2video) written in Python (Github repo: https://github.com/vietnguyen91/ASCII-generator)
/r/IPython
https://redd.it/amcagt
/r/IPython
https://redd.it/amcagt
A Python Interpreter written in Rust
https://github.com/RustPython/RustPython
/r/Python
https://redd.it/amj25o
https://github.com/RustPython/RustPython
/r/Python
https://redd.it/amj25o
GitHub
GitHub - RustPython/RustPython: A Python Interpreter written in Rust
A Python Interpreter written in Rust. Contribute to RustPython/RustPython development by creating an account on GitHub.
Next programming language after Python?
Hi all,
I've been learning/working with Python for over a year now. Python was my first programming language and I feel comfortable saying I've got an intermediate level when working with it: I use it daily at my job (research institute), automating data analysis and figuring out new ways to look at our data. I've also done a bit of GUI development with PyQt5 so I can share my tools with my colleagues in a more intuitive fashion.
The thing is, I sorta want to learn a second programming language to complement my skills, but I don't really know which to pick. Does anyone have a good suggestion? Some points to consider:
* I don't have much interest in web development, so JavaScript and PHP are off the table, at least for now.
* Java... well I've looked at it and it seems interesting, but apart from the fact that it's easier to port anywhere due to the JVM it kinda feels the same as Python? Not sure I will gain that much from learning it.
* I've considered learning SQL and databases in general, and I'm sure that I'll learn about them at some point in the future, but since it's more of a
/r/Python
https://redd.it/amdz21
Hi all,
I've been learning/working with Python for over a year now. Python was my first programming language and I feel comfortable saying I've got an intermediate level when working with it: I use it daily at my job (research institute), automating data analysis and figuring out new ways to look at our data. I've also done a bit of GUI development with PyQt5 so I can share my tools with my colleagues in a more intuitive fashion.
The thing is, I sorta want to learn a second programming language to complement my skills, but I don't really know which to pick. Does anyone have a good suggestion? Some points to consider:
* I don't have much interest in web development, so JavaScript and PHP are off the table, at least for now.
* Java... well I've looked at it and it seems interesting, but apart from the fact that it's easier to port anywhere due to the JVM it kinda feels the same as Python? Not sure I will gain that much from learning it.
* I've considered learning SQL and databases in general, and I'm sure that I'll learn about them at some point in the future, but since it's more of a
/r/Python
https://redd.it/amdz21
reddit
r/Python - Next programming language after Python?
101 votes and 153 comments so far on Reddit
I wrote this geometry library based on the lectures on projective geometry that are taught at my university. I hope someone finds it useful. Any feedback is welcome!
https://github.com/jan-mue/geometer
/r/Python
https://redd.it/amewg5
https://github.com/jan-mue/geometer
/r/Python
https://redd.it/amewg5
GitHub
GitHub - jan-mue/geometer: A geometry library written in Python
A geometry library written in Python. Contribute to jan-mue/geometer development by creating an account on GitHub.
[D] Growing collection of Deep Learning, Machine Learning, Reinforcement Learning lectures
Hello everyone,
I have collected a list of freely available courses on *Machine Learning, Deep Learning, Reinforcement Learning, Natural Language Processing, Computer Vision, Probabilistic Graphical Models, Machine Learning Fundamentals, and Deep Learning boot camps or summer schools*.
The complete list is available here: [deep learning drizzle](https://github.com/kmario23/deep-learning-drizzle)
Feel free to share it with your friends, colleagues, or anyone who would be interested in learning ML independently. Also, please make yourself comfortable in forking or starring the repo as you'd like.
Also, if you have some suggestions, please leave a comment here or raise an issue in the git repo.
GitHub repo: [deep learning drizzle](https://github.com/kmario23/deep-learning-drizzle)
I wish you all a nice weekend!
/r/MachineLearning
https://redd.it/amjiyj
Hello everyone,
I have collected a list of freely available courses on *Machine Learning, Deep Learning, Reinforcement Learning, Natural Language Processing, Computer Vision, Probabilistic Graphical Models, Machine Learning Fundamentals, and Deep Learning boot camps or summer schools*.
The complete list is available here: [deep learning drizzle](https://github.com/kmario23/deep-learning-drizzle)
Feel free to share it with your friends, colleagues, or anyone who would be interested in learning ML independently. Also, please make yourself comfortable in forking or starring the repo as you'd like.
Also, if you have some suggestions, please leave a comment here or raise an issue in the git repo.
GitHub repo: [deep learning drizzle](https://github.com/kmario23/deep-learning-drizzle)
I wish you all a nice weekend!
/r/MachineLearning
https://redd.it/amjiyj
GitHub
GitHub - kmario23/deep-learning-drizzle: Drench yourself in Deep Learning, Reinforcement Learning, Machine Learning, Computer Vision…
Drench yourself in Deep Learning, Reinforcement Learning, Machine Learning, Computer Vision, and NLP by learning from these exciting lectures!! - kmario23/deep-learning-drizzle
Python decorators explanation for absolute beginners
Hi, everyone!
I have made a video about decorators concept:
\- how to write them
\- how to use
​
I'm reviewing three versions of decorators:
\- simple decorator for a function without arguments
\- a decorator for a function that takes some arguments
\- and a decorator that takes arguments itself for a function that has arguments (like the Flask's route())
Youtube video: [https://www.youtube.com/watch?v=bCQDdA84aCo](https://www.youtube.com/watch?v=bCQDdA84aCo)
Thanks for watching.
P.S.
The next video will be a small project for beginners - the Apache logs parser with exporting data to a csv.
/r/Python
https://redd.it/ammmsl
Hi, everyone!
I have made a video about decorators concept:
\- how to write them
\- how to use
​
I'm reviewing three versions of decorators:
\- simple decorator for a function without arguments
\- a decorator for a function that takes some arguments
\- and a decorator that takes arguments itself for a function that has arguments (like the Flask's route())
Youtube video: [https://www.youtube.com/watch?v=bCQDdA84aCo](https://www.youtube.com/watch?v=bCQDdA84aCo)
Thanks for watching.
P.S.
The next video will be a small project for beginners - the Apache logs parser with exporting data to a csv.
/r/Python
https://redd.it/ammmsl
YouTube
Python decorators: a beginner's guide
A Python function decorators explanation for absolute beginners with simple examples. What is decorators in Python, how to use them, and how they work. I sta...
I made a Telegram bot you can send messages to, from the console, and get responses back
This is a small project I've been working on. It's a Telegram bot that listens for JSON POSTs on a local port, and forwards the messages to you in Telegram. The coolest feature is that you can send questions, and it will render buttons in Telegram you can click, and receive the response through the JSON API.
I'm using it to monitor my machine learning stuff, i.e., long-running processes that periodically push me the info on current performance. It would be awesome to get feedback on this, especially on interesting features to add. My original vision was to have something on Telegram feeding me with things happening on my servers, and that I could quickly tap something in Telegram to restart a broken process or kill or run something off. This is just a start, but it needs "clients", i.e., ways for people to push messages without having to `curl` or `request` it. All ideas are welcome.
[https://github.com/apiad/logbot](https://github.com/apiad/logbot)
/r/Python
https://redd.it/amhuty
This is a small project I've been working on. It's a Telegram bot that listens for JSON POSTs on a local port, and forwards the messages to you in Telegram. The coolest feature is that you can send questions, and it will render buttons in Telegram you can click, and receive the response through the JSON API.
I'm using it to monitor my machine learning stuff, i.e., long-running processes that periodically push me the info on current performance. It would be awesome to get feedback on this, especially on interesting features to add. My original vision was to have something on Telegram feeding me with things happening on my servers, and that I could quickly tap something in Telegram to restart a broken process or kill or run something off. This is just a start, but it needs "clients", i.e., ways for people to push messages without having to `curl` or `request` it. All ideas are welcome.
[https://github.com/apiad/logbot](https://github.com/apiad/logbot)
/r/Python
https://redd.it/amhuty
GitHub
GitHub - apiad/logbot: A Telegram bot that you can log to from Python and manage long running processes.
A Telegram bot that you can log to from Python and manage long running processes. - apiad/logbot
How to benchmark django to know whether the server is CPU-bound or IO-bound?
1. Figure out CPU-bound or IO-bound
2. Find the offending code in each case
How do you go about them?
Thanks!
/r/django
https://redd.it/amopnz
1. Figure out CPU-bound or IO-bound
2. Find the offending code in each case
How do you go about them?
Thanks!
/r/django
https://redd.it/amopnz
reddit
r/django - How to benchmark django to know whether the server is CPU-bound or IO-bound?
3 votes and 8 comments so far on Reddit