How are you (regularly) deploying new Django projects?
I find myself spending 2\+ hours every time I want to deploy a new Django project. I've started using django\-cookie\-cutter which has made a big difference in development as I can use Docker \(and our other developers can therefore get set up much more easily\) but getting those projects deployed to a server is still a frustrating and tedious task. I use Linode and do everything manually per\-project \(add SSH keys, updates hosts, install docker, pull project set up\).
Would something like beanstalk help here? Any suggestions to help simplify this process? Do other people struggle with the time deployment takes?
/r/django
https://redd.it/8fiz89
I find myself spending 2\+ hours every time I want to deploy a new Django project. I've started using django\-cookie\-cutter which has made a big difference in development as I can use Docker \(and our other developers can therefore get set up much more easily\) but getting those projects deployed to a server is still a frustrating and tedious task. I use Linode and do everything manually per\-project \(add SSH keys, updates hosts, install docker, pull project set up\).
Would something like beanstalk help here? Any suggestions to help simplify this process? Do other people struggle with the time deployment takes?
/r/django
https://redd.it/8fiz89
reddit
How are you (regularly) deploying new Django projects? • r/django
I find myself spending 2\+ hours every time I want to deploy a new Django project. I've started using django\-cookie\-cutter which has made a big...
What exactly is caching and how do I add it to an app I have on heroku?
I have a data science type application where I am getting public information from FPDS and SAM gov't website. The site is currently on heroku.
I would like cache views so if a person is researching more than one company they can quickly go back to earlier pages without having to fetch the results from the database everytime.
Based on my limited knowledge that is what casheing does?
Second, I am looking at [flash-caching](https://flask-caching.readthedocs.io/en/latest/#) and it doesn't appear to be that difficult to implement to the route's I would like to cashe.
The question is on heroku, you wouldn't use `simplecashe` would you? Would you use a different cashe strategy? From the docs the `CASHE_TYPE` can be `simple`, `redis`, `memcached` and serveral more. On heroku would I need to store the cache on something like redis or can I store it in memory?
/r/flask
https://redd.it/8e4yj1
I have a data science type application where I am getting public information from FPDS and SAM gov't website. The site is currently on heroku.
I would like cache views so if a person is researching more than one company they can quickly go back to earlier pages without having to fetch the results from the database everytime.
Based on my limited knowledge that is what casheing does?
Second, I am looking at [flash-caching](https://flask-caching.readthedocs.io/en/latest/#) and it doesn't appear to be that difficult to implement to the route's I would like to cashe.
The question is on heroku, you wouldn't use `simplecashe` would you? Would you use a different cashe strategy? From the docs the `CASHE_TYPE` can be `simple`, `redis`, `memcached` and serveral more. On heroku would I need to store the cache on something like redis or can I store it in memory?
/r/flask
https://redd.it/8e4yj1
Blockchain Explained in 7 Python Functions
https://www.kdnuggets.com/2018/04/blockchain-explained-7-python-functions.html
/r/Python
https://redd.it/8fiftx
https://www.kdnuggets.com/2018/04/blockchain-explained-7-python-functions.html
/r/Python
https://redd.it/8fiftx
reddit
r/Python - Blockchain Explained in 7 Python Functions
36 votes and 1 so far on reddit
A tool to generate Jupyter notebooks programmatically
I recently found myself needing to generate many Jupyter notebooks in different directories, that were all very similar, save for a few differences in a variable name.
Hence, I decided to write a Python script that generates a Jupyter notebook from an input template:
https://github.com/ismailuddin/jupyter-nb-templater
Maybe it might be useful to somebody? Comments and suggestions welcome!
/r/IPython
https://redd.it/8fk8sz
I recently found myself needing to generate many Jupyter notebooks in different directories, that were all very similar, save for a few differences in a variable name.
Hence, I decided to write a Python script that generates a Jupyter notebook from an input template:
https://github.com/ismailuddin/jupyter-nb-templater
Maybe it might be useful to somebody? Comments and suggestions welcome!
/r/IPython
https://redd.it/8fk8sz
GitHub
ismailuddin/jupyter-nb-templater
jupyter-nb-templater - A tool for generating Python scripts to programmatically generate Jupyter notebooks.
How to create a count down timer on Django?
Hi guys,
I just started Django. Though it is really challenging but it is exciting.
I just wrote a little hello world web app and also a web app that displays time.
I want to get my hands dirty before I move on to the next topic.
I want to create a countdown timer on Django.
I don't know how to go about it and I need your help guys.
if you have any little project for beginners, pls I would love to read your suggestion as well.
/r/django
https://redd.it/8fkpb0
Hi guys,
I just started Django. Though it is really challenging but it is exciting.
I just wrote a little hello world web app and also a web app that displays time.
I want to get my hands dirty before I move on to the next topic.
I want to create a countdown timer on Django.
I don't know how to go about it and I need your help guys.
if you have any little project for beginners, pls I would love to read your suggestion as well.
/r/django
https://redd.it/8fkpb0
reddit
How to create a count down timer on Django? • r/django
Hi guys, I just started Django. Though it is really challenging but it is exciting. I just wrote a little hello world web app and also a web app...
The Forgotten Optional `else` in Python Loops
https://medium.com/@s16h/the-forgotten-optional-else-in-python-loops-90d9c465c830
/r/Python
https://redd.it/8fkbem
https://medium.com/@s16h/the-forgotten-optional-else-in-python-loops-90d9c465c830
/r/Python
https://redd.it/8fkbem
Medium
The Forgotten Optional `else` in Python Loops
In this post we’ll discuss Python’s for...else and while...else syntax, one of the most rarely used and misunderstood features in Python.
What is flask used for
Hi, I am currently learning flask but would like to know how exactly are flask applications used in software development of companies.
For instance if a company is using the MEAN stack, where do the flask applications come into play?
The tutorial for the flask framework illustrates its use as a web application. However if I only need it as a web server, do I need to care about the templates?
Thank you all in advance! I’m a beginner in software engineering and would like to have a fuller picture of how different frameworks come together in a company.
Edit: Grammar
/r/flask
https://redd.it/8e7yli
Hi, I am currently learning flask but would like to know how exactly are flask applications used in software development of companies.
For instance if a company is using the MEAN stack, where do the flask applications come into play?
The tutorial for the flask framework illustrates its use as a web application. However if I only need it as a web server, do I need to care about the templates?
Thank you all in advance! I’m a beginner in software engineering and would like to have a fuller picture of how different frameworks come together in a company.
Edit: Grammar
/r/flask
https://redd.it/8e7yli
reddit
What is flask used for • r/flask
Hi, I am currently learning flask but would like to know how exactly are flask applications used in software development of companies. For...
How to prevent a customer from adding items just before the Confirm Payment button is clicked?
First, I am sorry I post it here because r/webdev is all about frontend, and r/backend is empty.
Currently I am working on an ecommerce project based on django-oscar. Since its accompanying paypal integration library is abandoned(and it's a two-step checkout), I decided to use BrainTree SDK to implement Paypal Express Checkout. Paypal EC gives you a button on the final review page that customer can click to have a pop-up window that they can login to paypal and pay.
The problem is, on the review page, the button needs a pre-determined checkout amount. That means when the page is generated, it has to fill in the button with the amount in the cart. If the customer add items after the review page is loaded but before clicking the button, the checkouted cart will have more items than those are paid.
I know django-oscar has a "freeze basket" function. But it will remove all items from the cart. I think a good place to call it would be during the review page generation. But I can't think of a reliable way to determine whether and when to restore the cart if the customer stops at review page and decides to checkout later, which I think would happen quite a lot.
Thanks for your help!
/r/django
https://redd.it/8fk1c1
First, I am sorry I post it here because r/webdev is all about frontend, and r/backend is empty.
Currently I am working on an ecommerce project based on django-oscar. Since its accompanying paypal integration library is abandoned(and it's a two-step checkout), I decided to use BrainTree SDK to implement Paypal Express Checkout. Paypal EC gives you a button on the final review page that customer can click to have a pop-up window that they can login to paypal and pay.
The problem is, on the review page, the button needs a pre-determined checkout amount. That means when the page is generated, it has to fill in the button with the amount in the cart. If the customer add items after the review page is loaded but before clicking the button, the checkouted cart will have more items than those are paid.
I know django-oscar has a "freeze basket" function. But it will remove all items from the cart. I think a good place to call it would be during the review page generation. But I can't think of a reliable way to determine whether and when to restore the cart if the customer stops at review page and decides to checkout later, which I think would happen quite a lot.
Thanks for your help!
/r/django
https://redd.it/8fk1c1
reddit
r/django - How to prevent a customer from adding items just before the Confirm Payment button is clicked?
4 votes and 3 so far on reddit
Widgets wont show in HTML/Azure/NBViewer
So from my running my notebook the widgets work fine, but saving them as html, uploading them to azure/github/nbviewer and then opening them through the link, the widgets don't display.
With a basic example I get "
interactive(children=(IntSlider(value=5, description='n', max=10), Output()), _dom_classes=('widget-interact',…"
displayed where the output widget should be.
Is there any way I can share my notebook so that the other user does not need to install ipython/jupyter to see the widgets?
/r/IPython
https://redd.it/8fli20
So from my running my notebook the widgets work fine, but saving them as html, uploading them to azure/github/nbviewer and then opening them through the link, the widgets don't display.
With a basic example I get "
interactive(children=(IntSlider(value=5, description='n', max=10), Output()), _dom_classes=('widget-interact',…"
displayed where the output widget should be.
Is there any way I can share my notebook so that the other user does not need to install ipython/jupyter to see the widgets?
/r/IPython
https://redd.it/8fli20
reddit
Widgets wont show in HTML/Azure/NBViewer • r/IPython
So from my running my notebook the widgets work fine, but saving them as html, uploading them to azure/github/nbviewer and then opening them...
[D] Statement on Nature Machine Intelligence
https://openaccess.engineering.oregonstate.edu/home
/r/MachineLearning
https://redd.it/8fmtr9
https://openaccess.engineering.oregonstate.edu/home
/r/MachineLearning
https://redd.it/8fmtr9
reddit
[D] Statement on Nature Machine Intelligence • r/MachineLearning
194 points and 41 comments so far on reddit
Where is the option to change the local host port?
Sometimes to spice things up I change the local host port, and I was wondering where this resides in Django?
/r/djangolearning
https://redd.it/8fnuz9
Sometimes to spice things up I change the local host port, and I was wondering where this resides in Django?
/r/djangolearning
https://redd.it/8fnuz9
reddit
Where is the option to change the local host port? • r/djangolearning
Sometimes to spice things up I change the local host port, and I was wondering where this resides in Django?
You can accidentally override local variables with PEP 572 -- Assignment Expressions
/r/Python
https://redd.it/8fokpw
/r/Python
https://redd.it/8fokpw
[D] Why is Z-dimension for GANs usually 100?
I'm playing around with GANs, I've got a question which I can't find answer for. Why is Z-dimension (random vector noise) for GANs usually 100? I saw a lot of GitHub projects and online tutorials, seems like the random vector has always the size of 100. Is it confirmed that it gives the best results? What if I changed that to e.g 1000? How does it affect the generated images?
/r/MachineLearning
https://redd.it/8fqcfv
I'm playing around with GANs, I've got a question which I can't find answer for. Why is Z-dimension (random vector noise) for GANs usually 100? I saw a lot of GitHub projects and online tutorials, seems like the random vector has always the size of 100. Is it confirmed that it gives the best results? What if I changed that to e.g 1000? How does it affect the generated images?
/r/MachineLearning
https://redd.it/8fqcfv
reddit
[D] Why is Z-dimension for GANs usually 100? • r/MachineLearning
I'm playing around with GANs, I've got a question which I can't find answer for. Why is Z-dimension (random vector noise) for GANs usually 100? I...
Data Scientist interview in Python: what essential knowledge should I have?
If you search "Python Interview Questions" on this subreddit, nearly every one has a top comment along the lines of "these are rubbish". So, tell me, for a Data Scientist job requiring 5 years of Python, what should you know? Are there any resources that are *actually* any good?
/r/Python
https://redd.it/8fqyj6
If you search "Python Interview Questions" on this subreddit, nearly every one has a top comment along the lines of "these are rubbish". So, tell me, for a Data Scientist job requiring 5 years of Python, what should you know? Are there any resources that are *actually* any good?
/r/Python
https://redd.it/8fqyj6
reddit
Data Scientist interview in Python: what essential... • r/Python
If you search "Python Interview Questions" on this subreddit, nearly every one has a top comment along the lines of "these are rubbish". So, tell...
Which Front End with Flask?
Hi, currently working on a project with flask sqlalchemy, and need to do something on Front End but can't figure out which one I should use? Thanks for help!
/r/flask
https://redd.it/8ft6e9
Hi, currently working on a project with flask sqlalchemy, and need to do something on Front End but can't figure out which one I should use? Thanks for help!
/r/flask
https://redd.it/8ft6e9
reddit
Which Front End with Flask? • r/flask
Hi, currently working on a project with flask sqlalchemy, and need to do something on Front End but can't figure out which one I should use?...
Migrating database(MySQL to PostreSQL): Attach migrated database to application
Good day,
I would just like to get some idea/s on how to do this task properly. I am a newbie in programming and got a job as Django Dev. My current task is to migrate a MySQL to PostgreSQL. Reading resources online, I found out this tool which helps me do a test migration in my local environment [https://github.com/dimitri/pgloader](https://github.com/dimitri/pgloader) .
MySQL database has 70 rows. I can confirm that when I access postgresql in cli, I can see all the tables as well as the data. Now my problem is, this is my first time to perform this kind of task. I have no idea how will I attach the database to our applications. The rows and fields from mysql database are not matched fully identical to our fields in [models.py](https://models.py) . Perhaps typing manually to admin is an option but its tedious especially if we will encounter this task again. I am planning to automate it.
Can someone share some light here to a newbie? Sorry for the long post, I just don't know how to approach this.
Thanks,
J
/r/django
https://redd.it/8frs6y
Good day,
I would just like to get some idea/s on how to do this task properly. I am a newbie in programming and got a job as Django Dev. My current task is to migrate a MySQL to PostgreSQL. Reading resources online, I found out this tool which helps me do a test migration in my local environment [https://github.com/dimitri/pgloader](https://github.com/dimitri/pgloader) .
MySQL database has 70 rows. I can confirm that when I access postgresql in cli, I can see all the tables as well as the data. Now my problem is, this is my first time to perform this kind of task. I have no idea how will I attach the database to our applications. The rows and fields from mysql database are not matched fully identical to our fields in [models.py](https://models.py) . Perhaps typing manually to admin is an option but its tedious especially if we will encounter this task again. I am planning to automate it.
Can someone share some light here to a newbie? Sorry for the long post, I just don't know how to approach this.
Thanks,
J
/r/django
https://redd.it/8frs6y
GitHub
GitHub - dimitri/pgloader: Migrate to PostgreSQL in a single command!
Migrate to PostgreSQL in a single command! Contribute to dimitri/pgloader development by creating an account on GitHub.
How to implement invisble recaptcha in django
Hello
I was researching on available apps for django that can implement Google's invisible recaptcha in django forms. Is there any module available or how do I implement it in my project?
Thanks
Edit:
Is there an alternative way I can handle spam in django? Which is the preferred method
/r/django
https://redd.it/8fshdt
Hello
I was researching on available apps for django that can implement Google's invisible recaptcha in django forms. Is there any module available or how do I implement it in my project?
Thanks
Edit:
Is there an alternative way I can handle spam in django? Which is the preferred method
/r/django
https://redd.it/8fshdt
reddit
How to implement invisble recaptcha in django • r/django
Hello I was researching on available apps for django that can implement Google's invisible recaptcha in django forms. Is there any module...
First Steps To Create The Website With Django
https://www.zeolearn.com/magazine/first-steps-to-create-the-website-with-django
/r/django
https://redd.it/8fw47c
https://www.zeolearn.com/magazine/first-steps-to-create-the-website-with-django
/r/django
https://redd.it/8fw47c
Zeolearn
Steps to Create Website with Django | Create Django Website from Scratch
Go through the steps for creating and managing Django websites with minimal programming experience. Learn how to create a full-fledged end-user web sites from scratch using Django.
Python Pygame Zelda Game Tutorial for Beginners
https://www.youtube.com/watch?v=iRrMsxQCiJg
/r/Python
https://redd.it/8ftqey
https://www.youtube.com/watch?v=iRrMsxQCiJg
/r/Python
https://redd.it/8ftqey
YouTube
Python Pygame Zelda Game Tutorial for Beginners
Learn how to make a game with Python and Pygame. Hope you guys enjoyed this video!
Join the community on Discord! https://discordapp.com/invite/QZd3aaN
If you have any questions, comments, or want to collaborate on functionality definitely leave a comment…
Join the community on Discord! https://discordapp.com/invite/QZd3aaN
If you have any questions, comments, or want to collaborate on functionality definitely leave a comment…