What framework to use to build a MOOC website ?
Hi !
As the title says, I need to build a MOOCs website (website that presents a series of online video courses). I know some django, I use it for simple websites, I thought I could built it using simply Django, but then I saw the python-based CMS (mezzanine, django-cms ...etc ) but I'm not sure if I should use them.
​
My project should include :
\- Courses : each course has a number of pages, each page contains either a video or some notes.
\- playlists : a way to play all videos in one course in a row
\- Editing capabilities for "old school" teachers who have no idea what programming is
\- Commenting ! students should be able to have their own accounts and courses follow ups.
\- And some kind of a discussion forum for students to ask questions and get answered by other students or the teachers
​
I took few hours reading about some solutions, and I think Django-CMS could be great for this.
What do you guys think about it ? do you have any experience with different python-CMSs ?
Thanks a lot !
/r/django
https://redd.it/az2c63
Hi !
As the title says, I need to build a MOOCs website (website that presents a series of online video courses). I know some django, I use it for simple websites, I thought I could built it using simply Django, but then I saw the python-based CMS (mezzanine, django-cms ...etc ) but I'm not sure if I should use them.
​
My project should include :
\- Courses : each course has a number of pages, each page contains either a video or some notes.
\- playlists : a way to play all videos in one course in a row
\- Editing capabilities for "old school" teachers who have no idea what programming is
\- Commenting ! students should be able to have their own accounts and courses follow ups.
\- And some kind of a discussion forum for students to ask questions and get answered by other students or the teachers
​
I took few hours reading about some solutions, and I think Django-CMS could be great for this.
What do you guys think about it ? do you have any experience with different python-CMSs ?
Thanks a lot !
/r/django
https://redd.it/az2c63
reddit
r/django - What framework to use to build a MOOC website ?
14 votes and 10 comments so far on Reddit
Not trusted when using remote jupiter notebook
Hi,
I am using jupiter notebook remotely using my universities remote computer system. This was all working fine but now when I login with my token and try to work on the files they are read only. There is also a message saying they are 'not trusted'. Any advice on how to fix this?
I have tried to use the 'jupyter trust notebook.iymb' command but I get a
​
\> Error executing Jupyter command 'trust': \[Errno 2\] No such file or directory
​
error message. Thanks for the help!
/r/IPython
https://redd.it/az61yk
Hi,
I am using jupiter notebook remotely using my universities remote computer system. This was all working fine but now when I login with my token and try to work on the files they are read only. There is also a message saying they are 'not trusted'. Any advice on how to fix this?
I have tried to use the 'jupyter trust notebook.iymb' command but I get a
​
\> Error executing Jupyter command 'trust': \[Errno 2\] No such file or directory
​
error message. Thanks for the help!
/r/IPython
https://redd.it/az61yk
reddit
r/IPython - Not trusted when using remote jupiter notebook
1 vote and 1 comment so far on Reddit
Problem with trailing slashes ("/") while building a website using Frozen Flask
I'm using Flask & Frozen Flask to generate a website, though for some reason the trailing "/" it uses to get the reference to the stylesheet as well as other images seem to break the website from being able to retrieve it.
I'm using `url_for('static', filename='style.css')` within the jinja templates to retrieve the file path.
This generates the URL: `/static/style.css`
This works perfectly fine while the server is running, though after freezing the website using Frozen Flask, Chrome & Firefox both have issues loading the required files, and the stylesheet nor the images load at all.
After removing the trailing slash within the URLs using Inspect Element, the frozen website is able to load the files just fine: `static/style.css`
Does anyone know a way to remove the trailing slash while freezing with Frozen Flask, or at least can enlighten me on why this problem is happening?
Thanks.
/r/flask
https://redd.it/az8wu7
I'm using Flask & Frozen Flask to generate a website, though for some reason the trailing "/" it uses to get the reference to the stylesheet as well as other images seem to break the website from being able to retrieve it.
I'm using `url_for('static', filename='style.css')` within the jinja templates to retrieve the file path.
This generates the URL: `/static/style.css`
This works perfectly fine while the server is running, though after freezing the website using Frozen Flask, Chrome & Firefox both have issues loading the required files, and the stylesheet nor the images load at all.
After removing the trailing slash within the URLs using Inspect Element, the frozen website is able to load the files just fine: `static/style.css`
Does anyone know a way to remove the trailing slash while freezing with Frozen Flask, or at least can enlighten me on why this problem is happening?
Thanks.
/r/flask
https://redd.it/az8wu7
reddit
r/flask - Problem with trailing slashes ("/") while building a website using Frozen Flask
2 votes and 3 comments so far on Reddit
[D] The Promise of Hierarchical Reinforcement Learning
PhD student Yannis Flet-Berliac gives a comprehensive overview of the latest in Hierarchical Reinforcement Learning. [https://thegradient.pub/the-promise-of-hierarchical-reinforcement-learning/](https://thegradient.pub/the-promise-of-hierarchical-reinforcement-learning/)
/r/MachineLearning
https://redd.it/az7pi9
PhD student Yannis Flet-Berliac gives a comprehensive overview of the latest in Hierarchical Reinforcement Learning. [https://thegradient.pub/the-promise-of-hierarchical-reinforcement-learning/](https://thegradient.pub/the-promise-of-hierarchical-reinforcement-learning/)
/r/MachineLearning
https://redd.it/az7pi9
The Gradient
The Promise of Hierarchical Reinforcement Learning
This idea of temporal abstraction, once incorporated into reinforcement learning (RL), converts it into *hierarchical* reinforcement learning (HRL).
Blog Post: React with Django (Part 1)
Hello!
I put up a new blog post that talks about integrating React and Django.
[https://www.codexplore.io/blog/integrating-react-and-django/](https://www.codexplore.io/blog/integrating-react-and-django/)
I am also interested in hearing how you all integrate the two.
/r/django
https://redd.it/az8nil
Hello!
I put up a new blog post that talks about integrating React and Django.
[https://www.codexplore.io/blog/integrating-react-and-django/](https://www.codexplore.io/blog/integrating-react-and-django/)
I am also interested in hearing how you all integrate the two.
/r/django
https://redd.it/az8nil
reddit
r/django - Blog Post: React with Django (Part 1)
0 votes and 3 comments so far on Reddit
I wrote a proof of concept pastejacker which replaces semicolon with Greek Question Mark as soon as any text is copied to clipboard. GitHub - aydwi/chaos
Hi
A few months back, I read about a malicious [clipboard hijacker discovered in PyPi](https://medium.com/@bertusk/cryptocurrency-clipboard-hijacker-discovered-in-pypi-repository-b66b8a534a8), and decided to write a tool that demonstrates how easy it is for a rogue program to mess with your system clipboard without you knowing.
To make things interesting, I built this tool around the [classic idea](https://twitter.com/peterritchie/status/534011965132120064) of replacing semicolon with a similar looking unicode character "Greek Question Mark", so that many, if not all compilers will throw cryptic error messages when such (modified) code is compiled. I've named this monstrosity `chaos`.
-------------------------------------------------------------
##### Repository: https://github.com/aydwi/chaos
--------------------------------------------------------------
Once executed, `chaos` runs as a silent daemon process and monitors the operating system clipboard. Once a change is detected, it reads, modifies and rewrites the clipboard data while preserving formatting and making sure it only ever touches textual data. So, **you copy something, but you paste something else**, without any indication of what happened.
Implementation wise, I decided to use [Qt](https://www.qt.io/) to write this, particularly because it's [QClipboard](https://doc.qt.io/qt-5/qclipboard.html) class is way more powerful that anything else I could find, and it has widely used Python bindings ([PyQt](https://riverbankcomputing.com/software/pyqt/intro)) available.
Find more details on the GitHub repo. Check it out and let me know what do you think. I'd be glad if you decide to take a
/r/Python
https://redd.it/az8m1m
Hi
A few months back, I read about a malicious [clipboard hijacker discovered in PyPi](https://medium.com/@bertusk/cryptocurrency-clipboard-hijacker-discovered-in-pypi-repository-b66b8a534a8), and decided to write a tool that demonstrates how easy it is for a rogue program to mess with your system clipboard without you knowing.
To make things interesting, I built this tool around the [classic idea](https://twitter.com/peterritchie/status/534011965132120064) of replacing semicolon with a similar looking unicode character "Greek Question Mark", so that many, if not all compilers will throw cryptic error messages when such (modified) code is compiled. I've named this monstrosity `chaos`.
-------------------------------------------------------------
##### Repository: https://github.com/aydwi/chaos
--------------------------------------------------------------
Once executed, `chaos` runs as a silent daemon process and monitors the operating system clipboard. Once a change is detected, it reads, modifies and rewrites the clipboard data while preserving formatting and making sure it only ever touches textual data. So, **you copy something, but you paste something else**, without any indication of what happened.
Implementation wise, I decided to use [Qt](https://www.qt.io/) to write this, particularly because it's [QClipboard](https://doc.qt.io/qt-5/qclipboard.html) class is way more powerful that anything else I could find, and it has widely used Python bindings ([PyQt](https://riverbankcomputing.com/software/pyqt/intro)) available.
Find more details on the GitHub repo. Check it out and let me know what do you think. I'd be glad if you decide to take a
/r/Python
https://redd.it/az8m1m
Medium
Cryptocurrency Clipboard Hijacker Discovered in PyPI Repository
21 Oct 2018
Keep only the last day of the month in the list of dates and filter all other dates in multiple year lists.
Lets say I have a list of all the dates in the year 2016 and 2017. Now I want to find out the last dates of months from those list of dates and remove all others.
What would be a best way to achieve this?
/r/django
https://redd.it/az6d6p
Lets say I have a list of all the dates in the year 2016 and 2017. Now I want to find out the last dates of months from those list of dates and remove all others.
What would be a best way to achieve this?
/r/django
https://redd.it/az6d6p
reddit
r/django - Keep only the last day of the month in the list of dates and filter all other dates in multiple year lists.
0 votes and 3 comments so far on Reddit
[D] Undergrad student: better to focus on one area (e.g. NLP) or diversify?
As an undergrad student interested in ML and with some experience in NLP, should I continue focusing on this area in my future projects and research positions? Or would it be better to diversify and seek out some projects or research involving things like computer vision? One reason I am wondering is because a lot of companies are working with computer vision in areas such as robotics and self driving vehicles so I am wondering if it would lead to better job prospects in the future. Also, which would likely be more useful for grad school (which is my main goal at the moment)?
/r/MachineLearning
https://redd.it/aza3nv
As an undergrad student interested in ML and with some experience in NLP, should I continue focusing on this area in my future projects and research positions? Or would it be better to diversify and seek out some projects or research involving things like computer vision? One reason I am wondering is because a lot of companies are working with computer vision in areas such as robotics and self driving vehicles so I am wondering if it would lead to better job prospects in the future. Also, which would likely be more useful for grad school (which is my main goal at the moment)?
/r/MachineLearning
https://redd.it/aza3nv
reddit
r/MachineLearning - [D] Undergrad student: better to focus on one area (e.g. NLP) or diversify?
28 votes and 11 comments so far on Reddit
How to update value on associate table in many to many relationship?
I have a follow model, but I don't know how to update value rating (I want user can rate the story), can I update rating value with this or I must re-declare my user\_story using class?
class Story(db.Model):
id = db.Column(db.Integer, primary_key=True)
users = db.relationship(
'User',
secondary=user_story,
lazy='subquery',
backref=db.backref('stories', lazy=True)
)
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_story = db.Table('user_story',
db.Column('user_id', db.Integer, db.ForeignKey('user.id'), primary_key=True),
db.Column('story_id', db.Integer, db.ForeignKey('story.id'), primary_key=True),
db.Column('rating', db.Integer)
)
​
/r/flask
https://redd.it/azc43h
I have a follow model, but I don't know how to update value rating (I want user can rate the story), can I update rating value with this or I must re-declare my user\_story using class?
class Story(db.Model):
id = db.Column(db.Integer, primary_key=True)
users = db.relationship(
'User',
secondary=user_story,
lazy='subquery',
backref=db.backref('stories', lazy=True)
)
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_story = db.Table('user_story',
db.Column('user_id', db.Integer, db.ForeignKey('user.id'), primary_key=True),
db.Column('story_id', db.Integer, db.ForeignKey('story.id'), primary_key=True),
db.Column('rating', db.Integer)
)
​
/r/flask
https://redd.it/azc43h
reddit
r/flask - How to update value on associate table in many to many relationship?
2 votes and 1 comment so far on Reddit
Help needed for test configuration
[Flask Project](https://github.com/BenLHedgepeth/flask_journal)
`FLASK_ENV` only accepts two values (`production` and `development`). I'm using classes to set the configuration depending on the environment, but how can I set `TestConfig` as the configuration object that is defined in `flask_config.config` when I execute `python tests.py`?
/r/flask
https://redd.it/azb7mk
[Flask Project](https://github.com/BenLHedgepeth/flask_journal)
`FLASK_ENV` only accepts two values (`production` and `development`). I'm using classes to set the configuration depending on the environment, but how can I set `TestConfig` as the configuration object that is defined in `flask_config.config` when I execute `python tests.py`?
/r/flask
https://redd.it/azb7mk
GitHub
BenLHedgepeth/flask_journal
Contribute to BenLHedgepeth/flask_journal development by creating an account on GitHub.
Python command line closes before it finishes running program (video included)
I have a [program](http://recordit.co/5MBOFKNprG) that runs correctly in the command line and I can interact with it but at the end its supposed to give me a response, however, whenever it gets to the point were it should calculate a response and I press enter the window automatically closes. Any help please?
/r/Python
https://redd.it/azfmoz
I have a [program](http://recordit.co/5MBOFKNprG) that runs correctly in the command line and I can interact with it but at the end its supposed to give me a response, however, whenever it gets to the point were it should calculate a response and I press enter the window automatically closes. Any help please?
/r/Python
https://redd.it/azfmoz
Django 2fa registration form
I'm trying to make my own 2fa implementation for my project. I found [this](https://github.com/Bouke/django-two-factor-auth) library. They have [this example](https://github.com/Bouke/django-two-factor-auth/tree/master/example), i'm studying it in order to understand how it all works.
I'm now running the example using py -3.7 manage.py runserver
, but i'm having some trobules understanding the following:
1) I would like to add an email address to the registration form, where do i edit the form? I tried to open the views.py
file but there is nothing there.
2) How do i edit the login form? I would like to add captcha to the form, but still, there is nothing in the views
file
/r/django
https://redd.it/azess4
I'm trying to make my own 2fa implementation for my project. I found [this](https://github.com/Bouke/django-two-factor-auth) library. They have [this example](https://github.com/Bouke/django-two-factor-auth/tree/master/example), i'm studying it in order to understand how it all works.
I'm now running the example using py -3.7 manage.py runserver
, but i'm having some trobules understanding the following:
1) I would like to add an email address to the registration form, where do i edit the form? I tried to open the views.py
file but there is nothing there.
2) How do i edit the login form? I would like to add captcha to the form, but still, there is nothing in the views
file
/r/django
https://redd.it/azess4
GitHub
GitHub - jazzband/django-two-factor-auth: Complete Two-Factor Authentication for Django providing the easiest integration into…
Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects. - jazzband/django-two-factor-auth
django sessiins with iis
I have django application its work fine locally with `DEBUG=False`
but when I deploy it to iis server its every post request with custom `login_required` decorate it return to login page and iis not keep session and delete it every request
/r/django
https://redd.it/azhly6
I have django application its work fine locally with `DEBUG=False`
but when I deploy it to iis server its every post request with custom `login_required` decorate it return to login page and iis not keep session and delete it every request
/r/django
https://redd.it/azhly6
reddit
r/django - django sessiins with iis
0 votes and 0 comments so far on Reddit
A question from sqlalchemy noob about db commit
Hi everyone,
If i get an object from database with for example, `a = Model.query.get(<id>)` , then call db.session.add(a), would this affect anything?
Also, do we call db.session.add anytime other than adding a new record to database?
Thank you
/r/flask
https://redd.it/azisyx
Hi everyone,
If i get an object from database with for example, `a = Model.query.get(<id>)` , then call db.session.add(a), would this affect anything?
Also, do we call db.session.add anytime other than adding a new record to database?
Thank you
/r/flask
https://redd.it/azisyx
reddit
r/flask - A question from sqlalchemy noob about db commit
0 votes and 1 comment so far on Reddit
Python simple image to 'ascii art' converter tutorial
Hi /r/python,
I've been playing around with Jupyter notebooks recently and thought those learning Python might appreciate this simple tutorial where we take an image, convert it into black and white pixels only and from there we turn it into a text file. It's a fun way to learn some file manipulation: [https://github.com/benWindsorCode/asciiConverter/blob/master/asciiPictureGenerator.ipynb](https://github.com/benWindsorCode/asciiConverter/blob/master/asciiPictureGenerator.ipynb)
Hope the tutorial is useful for those getting started and wanting a small project. There is lots that can be improved here such as edge detection, or using a wider range of characters in the output image. Happy coding!
/r/Python
https://redd.it/azh0hd
Hi /r/python,
I've been playing around with Jupyter notebooks recently and thought those learning Python might appreciate this simple tutorial where we take an image, convert it into black and white pixels only and from there we turn it into a text file. It's a fun way to learn some file manipulation: [https://github.com/benWindsorCode/asciiConverter/blob/master/asciiPictureGenerator.ipynb](https://github.com/benWindsorCode/asciiConverter/blob/master/asciiPictureGenerator.ipynb)
Hope the tutorial is useful for those getting started and wanting a small project. There is lots that can be improved here such as edge detection, or using a wider range of characters in the output image. Happy coding!
/r/Python
https://redd.it/azh0hd
GitHub
benWindsorCode/asciiConverter
A simple script to take a file and output a text file representation of the image - benWindsorCode/asciiConverter
Free Custom HTTPS on PythonAnywhere
In case people didn't realize this was available:
[https://help.pythonanywhere.com/pages/HTTPSSetup](https://help.pythonanywhere.com/pages/HTTPSSetup)
/r/Python
https://redd.it/aziynt
In case people didn't realize this was available:
[https://help.pythonanywhere.com/pages/HTTPSSetup](https://help.pythonanywhere.com/pages/HTTPSSetup)
/r/Python
https://redd.it/aziynt
PythonAnywhere Help
How to set up an HTTPS/SSL certificate for a custom domain
In order for a website to prove that it really is the site it says it is, it needs
an HTTPS certificate. Once you've set up a website on a custom domain on PythonAnywhere, you'll need
to have one, as
an HTTPS certificate. Once you've set up a website on a custom domain on PythonAnywhere, you'll need
to have one, as