Cryptocurrency trading bot
Hi guys,
I started a project of a cryptocurrency trading bot with a GUI last year around this time, and I just wanted to the share the current status of this project.
Currently, you can run a simulation, backtest, or a real live bot with the program. You have to write your strategies yourself in the Strategy class, but once that's done, the GUI updates itself automatically and you can select your strategies from the GUI itself.
The program also has Telegram integration, ability to download past data, view news, and a bit more.
I would love to see what you guys think, and it would be awesome if people wanted to contribute to this project (it's open-source after all).
Since this is my first real project out of college, the code is a bit of a mess, but I tried my best. Any constructive criticism is greatly appreciated. One main thing to do right now is revert all the insertions to appends in the code. Not sure why, but when I started, the code had the newest data in the front of the list, so every time there's new data, it had to be inserted to the front of the list which
/r/Python
https://redd.it/mao7qk
Hi guys,
I started a project of a cryptocurrency trading bot with a GUI last year around this time, and I just wanted to the share the current status of this project.
Currently, you can run a simulation, backtest, or a real live bot with the program. You have to write your strategies yourself in the Strategy class, but once that's done, the GUI updates itself automatically and you can select your strategies from the GUI itself.
The program also has Telegram integration, ability to download past data, view news, and a bit more.
I would love to see what you guys think, and it would be awesome if people wanted to contribute to this project (it's open-source after all).
Since this is my first real project out of college, the code is a bit of a mess, but I tried my best. Any constructive criticism is greatly appreciated. One main thing to do right now is revert all the insertions to appends in the code. Not sure why, but when I started, the code had the newest data in the front of the list, so every time there's new data, it had to be inserted to the front of the list which
/r/Python
https://redd.it/mao7qk
reddit
Cryptocurrency trading bot
Hi guys, I started a project of a cryptocurrency trading bot with a GUI last year around this time, and I just wanted to the share the current...
API endpoint or ORM management command for adding web-scraped data to database ?
I am web scraping football scores using selenium and wondering whether I should setup an API (Rest Framework) endpoint and run the script from my local PC, or set up the script as Django management command using the ORM.
Any thoughts ? Thanks
/r/django
https://redd.it/mal188
I am web scraping football scores using selenium and wondering whether I should setup an API (Rest Framework) endpoint and run the script from my local PC, or set up the script as Django management command using the ORM.
Any thoughts ? Thanks
/r/django
https://redd.it/mal188
reddit
API endpoint or ORM management command for adding web-scraped data...
I am web scraping football scores using selenium and wondering whether I should setup an API (Rest Framework) endpoint and run the script from my...
I resurrected an abandoned tiling window manager
PyTyle is a tiling manager for Linux meant to be used on top of other window managers. This project was abandoned by its creator 11 years ago. I spent the last month adjusting it for Python 3, fixing bugs, writing documentation and optimizing. I've just started adding new features requested by users.
I intend to continue developing and maintaining PyTyle.
https://preview.redd.it/qt39eydqqmo61.png?width=1920&format=png&auto=webp&s=60e7e8fbedcc73ba823fdd8ee5aea03af39bd53d
/r/Python
https://redd.it/mavrii
PyTyle is a tiling manager for Linux meant to be used on top of other window managers. This project was abandoned by its creator 11 years ago. I spent the last month adjusting it for Python 3, fixing bugs, writing documentation and optimizing. I've just started adding new features requested by users.
I intend to continue developing and maintaining PyTyle.
https://preview.redd.it/qt39eydqqmo61.png?width=1920&format=png&auto=webp&s=60e7e8fbedcc73ba823fdd8ee5aea03af39bd53d
/r/Python
https://redd.it/mavrii
No-code or learn Django?
Hi all,
I’ve been trying to build a social bookmarking site with discussions similar to Reddit. I’ve been using the no-code platform Bubble so far. On the surface, the progress is amazing. Logins and UI is all there. But I am having some issues. Nested comments are almost impossible (I have checked on the bubble forums). Working on large lists times things out. There are also some speed issues. Lastly, if I ever want to migrate to in-house traditional building, there is vendor lock-in and I can’t move users to a new platform (or do I save passwords??). Should I just keep making workarounds or learn a framework. I have a few months free coming and have a bit of background with Django. Do you think it would be worth it or even possible? My background is in economics and finance? I know that there are some Reddit clones built on Django floating around so I could work off of them. My only issues is I will be going back to a very intense job (consulting) so I am worried I won’t have enough time to learn enough to get it all working and on the job my skills will likely
/r/django
https://redd.it/mb0h2x
Hi all,
I’ve been trying to build a social bookmarking site with discussions similar to Reddit. I’ve been using the no-code platform Bubble so far. On the surface, the progress is amazing. Logins and UI is all there. But I am having some issues. Nested comments are almost impossible (I have checked on the bubble forums). Working on large lists times things out. There are also some speed issues. Lastly, if I ever want to migrate to in-house traditional building, there is vendor lock-in and I can’t move users to a new platform (or do I save passwords??). Should I just keep making workarounds or learn a framework. I have a few months free coming and have a bit of background with Django. Do you think it would be worth it or even possible? My background is in economics and finance? I know that there are some Reddit clones built on Django floating around so I could work off of them. My only issues is I will be going back to a very intense job (consulting) so I am worried I won’t have enough time to learn enough to get it all working and on the job my skills will likely
/r/django
https://redd.it/mb0h2x
reddit
No-code or learn Django?
Hi all, I’ve been trying to build a social bookmarking site with discussions similar to Reddit. I’ve been using the no-code platform Bubble so...
Finally, I was able to fetch raw heart rate and sleep data from Fitbit API today and plot them using python. I am so excited about this.
I have requested data from the Fitbit API using tokens and plotted the Heart rate data and sleep data using pandas for the last 4 days. The gaps in the middle of the Heart rate plot indicate I was not wearing the device.
​
HR Data
​
Sleep data
Here is the detailed Description + code How I made it to work. It took me a long time to figure out as there are no good online resources on this. So, I am happy to share it with you.
How to get the API token: https://github.com/arpanghosh8453/programs/blob/master/Fitbit%20Data%20Analyzer/How%20to%20get%20the%20OAuth%20Token.pdf
Python code + ipynb file ( Jupyter notebook): https://github.com/arpanghosh8453/programs/tree/master/Fitbit%20Data%20Analyzer
I am a beginner and this is one of my biggest achievements without any significant help :)
/r/Python
https://redd.it/maokdp
I have requested data from the Fitbit API using tokens and plotted the Heart rate data and sleep data using pandas for the last 4 days. The gaps in the middle of the Heart rate plot indicate I was not wearing the device.
​
HR Data
​
Sleep data
Here is the detailed Description + code How I made it to work. It took me a long time to figure out as there are no good online resources on this. So, I am happy to share it with you.
How to get the API token: https://github.com/arpanghosh8453/programs/blob/master/Fitbit%20Data%20Analyzer/How%20to%20get%20the%20OAuth%20Token.pdf
Python code + ipynb file ( Jupyter notebook): https://github.com/arpanghosh8453/programs/tree/master/Fitbit%20Data%20Analyzer
I am a beginner and this is one of my biggest achievements without any significant help :)
/r/Python
https://redd.it/maokdp
Post-save signal on e-commerce app
Hello,
I am creating an e-commerce app and am struggling with how my CartItem and Cart models interact.
I am looking to create or update the Cart based on the creation of new CartItem instances, which I believe can be done by using post-save signals. However, a Cart instance is not created.
* [signals.py](https://wtools.io/code/raw/b4oJ)
* [relevant models](https://wtools.io/code/raw/b4oI)
* [relevant views](https://wtools.io/code/raw/b4oH)
Any help would be greatly appreciated! If there is any missing relevant info, let me know and I can provide that as well.
Thanks in advance!
/r/djangolearning
https://redd.it/mayrey
Hello,
I am creating an e-commerce app and am struggling with how my CartItem and Cart models interact.
I am looking to create or update the Cart based on the creation of new CartItem instances, which I believe can be done by using post-save signals. However, a Cart instance is not created.
* [signals.py](https://wtools.io/code/raw/b4oJ)
* [relevant models](https://wtools.io/code/raw/b4oI)
* [relevant views](https://wtools.io/code/raw/b4oH)
Any help would be greatly appreciated! If there is any missing relevant info, let me know and I can provide that as well.
Thanks in advance!
/r/djangolearning
https://redd.it/mayrey
I created a tutorial on how to deploy a Flask application with docker-compose to production, it will be a series with three parts, here is the first one where we are getting started :)
https://youtube.com/watch?v=p0HnnJ6CusM&feature=share
/r/flask
https://redd.it/mak2fk
https://youtube.com/watch?v=p0HnnJ6CusM&feature=share
/r/flask
https://redd.it/mak2fk
YouTube
Python Web Application Deployment Tutorial - Using Docker & Docker Compose - Part 1
#Flask #Docker #DockerCompose #PythonWelcome to a new series about Flask and Docker combined! In this video, you will learn the best practices to deploy your...
Does django.contrib.auth need a Registration view?
I realize there's a bunch of ways to register users, including using CreateView and FormView (or writing a function based view), but why do the auth views include everything but registration? You would think getting a user signed up and logged in would be something we're all doing every time.
Thoughts?
/r/django
https://redd.it/mbb41i
I realize there's a bunch of ways to register users, including using CreateView and FormView (or writing a function based view), but why do the auth views include everything but registration? You would think getting a user signed up and logged in would be something we're all doing every time.
Thoughts?
/r/django
https://redd.it/mbb41i
reddit
Does django.contrib.auth need a Registration view?
I realize there's a bunch of ways to register users, including using CreateView and FormView (or writing a function based view), but why do the...
Recommendations For Using Django DB Sessions With Graphql
Lately I've been learning a modern frontend stack - React and Apollo - and I've been using django-graphene for the graphql implementation.
After reading about the differences between JWT and the default DB based session mechanism which Django uses the latter seems the safest and simplest in many respects. Without graphql, logging in and signing up is easy with the default django forms and views. With graphql, I wasn't sure. In my research for handling authentication with graphql I stumbled upon django-graphql-auth (https://github.com/PedroBern/django-graphql-auth) but it seems to be based on jwt. I cannot seem to find anything else similar which supports the default django session mechanism.
So my question is what is the most painless way for handling authentication for a graphql client using the default django server side session mechanism?
/r/django
https://redd.it/mbdext
Lately I've been learning a modern frontend stack - React and Apollo - and I've been using django-graphene for the graphql implementation.
After reading about the differences between JWT and the default DB based session mechanism which Django uses the latter seems the safest and simplest in many respects. Without graphql, logging in and signing up is easy with the default django forms and views. With graphql, I wasn't sure. In my research for handling authentication with graphql I stumbled upon django-graphql-auth (https://github.com/PedroBern/django-graphql-auth) but it seems to be based on jwt. I cannot seem to find anything else similar which supports the default django session mechanism.
So my question is what is the most painless way for handling authentication for a graphql client using the default django server side session mechanism?
/r/django
https://redd.it/mbdext
GitHub
GitHub - PedroBern/django-graphql-auth: Django registration and authentication with GraphQL.
Django registration and authentication with GraphQL. - PedroBern/django-graphql-auth
Build an Asteroids Game With Python and Pygame – Real Python
https://realpython.com/asteroids-game-python/
/r/Python
https://redd.it/mba5fu
https://realpython.com/asteroids-game-python/
/r/Python
https://redd.it/mba5fu
Realpython
Build an Asteroids Game With Python and Pygame – Real Python
In this tutorial, you'll build a clone of the Asteroids game in Python using Pygame. Step by step, you'll add images, input handling, game logic, sounds, and text to your program.
Run a long task using threads.
app.py
​
result.html
So I have simulated a long process called 'training'. How do I run training in the background? While it's training in the background I want to return 'working on it...', and after 10 secs I want to display 'done'. I really want to implement threading and not Celery, but if you know the sol using Celery, do let me know. Thank you!
/r/flask
https://redd.it/mbe65e
app.py
from flask import Flask, redirect, url_for, render_template import time import threading app = Flask(__name__)@app.route('/') def hello(): return render_template('result.html') def training(): print('training...') time.sleep(10) print('training done.') # return redirect(url_for('done')) return '<h1> Done </h1>' @app.route('/done') def done(): t1= threading.Thread(target=training) t2 = threading.Thread(target=done) t1.start() t2.start() return '<h1> Working on it... </h1>' if __name__ == '__main__': app.run(debug=True)​
result.html
<body> <a href="{url_for('training')}">Start!</a> </body>So I have simulated a long process called 'training'. How do I run training in the background? While it's training in the background I want to return 'working on it...', and after 10 secs I want to display 'done'. I really want to implement threading and not Celery, but if you know the sol using Celery, do let me know. Thank you!
/r/flask
https://redd.it/mbe65e
reddit
Run a long task using threads.
app.py `from flask import Flask, redirect, url_for, render_template` `import time` `import threading` `app = Flask(__name__)` ...
Brains on Python Part 1: Brainwaves theory and getting started
https://youtu.be/QIpgLu4CVpQ
/r/Python
https://redd.it/mbg3r6
https://youtu.be/QIpgLu4CVpQ
/r/Python
https://redd.it/mbg3r6
YouTube
Brains on Python Part 1: Brainwaves theory and getting started
This is a new series on brainwaves and code. In the first part, I'll go through some background theory on brainwaves, and explain the reasoning why this fascinates me. No, this is not Elon Musks Neuralink, but concepts remain the same. In upcoming parts,…
[P] Release of lightly 1.1.3 - A python library for self-supervised learning
We just released a new version of lightly (https://github.com/lightly-ai/lightly) and after the valuable feedback from this subreddit, we thought some of you might be interested in the updates.
Lightly now supports more models: In addition to SimCLR and MoCo, we have added SimSiam and Barlow Twins (a big thank you to our open-source contributors!). More models, such as BYOL and SwAV are in the pipeline.
We did some benchmarking (https://docs.lightly.ai/getting_started/benchmarks.html) on cifar10 and show the various frameworks in action using different training epochs and batch sizes.
Most models run well on multi-GPU setups using PyTorch Lightning in distributed data-parallel settings.
We are curious to hear your feedback.
/r/MachineLearning
https://redd.it/mbb7cl
We just released a new version of lightly (https://github.com/lightly-ai/lightly) and after the valuable feedback from this subreddit, we thought some of you might be interested in the updates.
Lightly now supports more models: In addition to SimCLR and MoCo, we have added SimSiam and Barlow Twins (a big thank you to our open-source contributors!). More models, such as BYOL and SwAV are in the pipeline.
We did some benchmarking (https://docs.lightly.ai/getting_started/benchmarks.html) on cifar10 and show the various frameworks in action using different training epochs and batch sizes.
Most models run well on multi-GPU setups using PyTorch Lightning in distributed data-parallel settings.
We are curious to hear your feedback.
/r/MachineLearning
https://redd.it/mbb7cl
GitHub
GitHub - lightly-ai/lightly: A python library for self-supervised learning on images.
A python library for self-supervised learning on images. - lightly-ai/lightly
starlette-jsonapi now with OpenAPI 3.x support
Disclaimer: I'm the maintainer, trying to make this a bit more visible and gather some feedback.
The latest version of starlette-jsonapi now has "experimental" OpenAPI 3.x (f.k.a. Swagger) support.
GitHub: https://github.com/vladmunteanu/starlette-jsonapi
Documentation: https://starlette-jsonapi.readthedocs.io/en/latest/
Examples: https://github.com/vladmunteanu/starlette-jsonapi/tree/master/examples
/r/Python
https://redd.it/mbc4f9
Disclaimer: I'm the maintainer, trying to make this a bit more visible and gather some feedback.
The latest version of starlette-jsonapi now has "experimental" OpenAPI 3.x (f.k.a. Swagger) support.
GitHub: https://github.com/vladmunteanu/starlette-jsonapi
Documentation: https://starlette-jsonapi.readthedocs.io/en/latest/
Examples: https://github.com/vladmunteanu/starlette-jsonapi/tree/master/examples
/r/Python
https://redd.it/mbc4f9
GitHub
vladmunteanu/starlette-jsonapi
A microframework based on Starlette and marshmallow_jsonapi - vladmunteanu/starlette-jsonapi
BlackJack Game!
Hey all! Just learning python, and did a project where I made a fully functional blackjack script! found it quite fun to play so i linked the GitHub link :)if anyone would know how to make it a little bit more compact? if there is anything i can improve just in general feel free :) hope you enjoy!
/r/Python
https://redd.it/mbjdf7
Hey all! Just learning python, and did a project where I made a fully functional blackjack script! found it quite fun to play so i linked the GitHub link :)if anyone would know how to make it a little bit more compact? if there is anything i can improve just in general feel free :) hope you enjoy!
/r/Python
https://redd.it/mbjdf7
reddit
BlackJack Game!
Hey all! Just learning python, and did a project where I made a fully functional blackjack script! found it quite fun to play so i linked the...
Build Your Own Python App to Track Amazon Prices
https://medium.com/dev-genius/build-your-own-python-app-to-track-amazon-prices-e0e1669bfa9e
/r/Python
https://redd.it/mbnlvi
https://medium.com/dev-genius/build-your-own-python-app-to-track-amazon-prices-e0e1669bfa9e
/r/Python
https://redd.it/mbnlvi
Medium
Build Your Own Python App to Track Amazon Prices
I was tired of having to check for items myself. Now, this app does it for me and send me a message when it finds what i need.
Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/mbsiju
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/mbsiju
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
DjangoCon Europe 2021 early bird ticket sales are now open!
Hi all!
Early bird ticket sales are now open for DjangoCon Europe 2021! The event will be held entirely online so you can join us from all around the world.
Don’t wait too long to get your ticket because the early bird discount price will end on April 30.
Here is the link to grab your ticket: https://2021.djangocon.eu/about/tickets/
All tickets include access to all 3 conference days (June 2 - 4) and the 2 sprints days (June 5 - 6). Don't forget to follow us on Twitter for the latest up to date information!
/r/django
https://redd.it/mbghtn
Hi all!
Early bird ticket sales are now open for DjangoCon Europe 2021! The event will be held entirely online so you can join us from all around the world.
Don’t wait too long to get your ticket because the early bird discount price will end on April 30.
Here is the link to grab your ticket: https://2021.djangocon.eu/about/tickets/
All tickets include access to all 3 conference days (June 2 - 4) and the 2 sprints days (June 5 - 6). Don't forget to follow us on Twitter for the latest up to date information!
/r/django
https://redd.it/mbghtn
Twitter
DjangoCon Europe (@DjangoConEurope) | Twitter
The latest Tweets from DjangoCon Europe (@DjangoConEurope). DjangoCon Europe 2022 | September 21-25 | Grab
your ticket !. Porto, Portugal
your ticket !. Porto, Portugal
Has anyone here used Django with MSSQL? Is it a good idea?
I am interning at a company that is looking to move their back-end CRUD APIs to a Python based framework. We are using on premise MSSQL to fetch the data. I was considering Flask earlier but now I am also looking into Django owing to it's own advantages. Does anyone have experience with Django-MSSQL? Were you able to use connection pooling? Would you suggest it?
/r/django
https://redd.it/mbvzbp
I am interning at a company that is looking to move their back-end CRUD APIs to a Python based framework. We are using on premise MSSQL to fetch the data. I was considering Flask earlier but now I am also looking into Django owing to it's own advantages. Does anyone have experience with Django-MSSQL? Were you able to use connection pooling? Would you suggest it?
/r/django
https://redd.it/mbvzbp
reddit
Has anyone here used Django with MSSQL? Is it a good idea?
I am interning at a company that is looking to move their back-end CRUD APIs to a Python based framework. We are using on premise MSSQL to fetch...
[D] Advanced Takeaways from fast.ai book
I recently read the Fast AI deep learning [book](https://www.goodreads.com/book/show/50204643-deep-learning-for-coders-with-fastai-and-pytorch) and wanted to summarise some of the many advanced takeaways & tricks I got from it. I’m going to leave out the basic things because there’s enough posts about them, i’m just focusing on what I found new or special in the book.
I’ve also put the insights into a [deck](https://saveall.ai/shared/deck/140&4&eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJvd25lciI6NCwiZGVja19pZCI6MTQwfQ.Xd5RK2RLlHjGKoYQET39IqjAZ4JLCkqf119wOjZLjSCdGxwjGxZFWTBbXLvMoHAbhnXOOi6A2bSu3KwGH_S8L5WEn5Cej8kRZ_Bp_XMD_AzFQYM9cR8TvfqSaYQT07HnLkbSCZnM-9OL9rdrzm-hKA2sjLqxOLkDQEqcwCQHiZT0KoweH8Y0nqqKuymWVNUb4A8hyYnORyNXgTaTFbwU2YpEdU43z7PMnPXmr1MtWMe4GQdhCTAfCrsQout8nkHyLE-yUWAFa4jAo-GUAVALgiFr5n0Q7ya5wgA9OWHFwrXYkLSFKzCpw90hpZ_8UYh1dpBCwIIK0CJpOaeIN0ieAg) on save all to help you remember them over the long-term. I would **massively recommend using a spaced repetition app (video** [**explanation**](https://youtu.be/AD0aFdRCskQ)**) like anki or** [**save all**](https://saveall.ai/) **for the things you learn** otherwise you’ll just forget so much of what is important. Here’s the takeaways:
# Neural Network Training Fundamentals
* Always **start** an ML project by **producing simple baselines**
* If is binary classification then could even be as simple as predicting the most common class in the training dataset
* Other baselines: linear regression, random forest, boosting etc…
* Then you can **use your baseline to clean your data** by looking at the datapoints it gets most incorrect and checking to see if they are actually classified correctly in the data
* In general you can also **leverage your baselines** to **help debug** your models
/r/MachineLearning
https://redd.it/mbhewa
I recently read the Fast AI deep learning [book](https://www.goodreads.com/book/show/50204643-deep-learning-for-coders-with-fastai-and-pytorch) and wanted to summarise some of the many advanced takeaways & tricks I got from it. I’m going to leave out the basic things because there’s enough posts about them, i’m just focusing on what I found new or special in the book.
I’ve also put the insights into a [deck](https://saveall.ai/shared/deck/140&4&eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJvd25lciI6NCwiZGVja19pZCI6MTQwfQ.Xd5RK2RLlHjGKoYQET39IqjAZ4JLCkqf119wOjZLjSCdGxwjGxZFWTBbXLvMoHAbhnXOOi6A2bSu3KwGH_S8L5WEn5Cej8kRZ_Bp_XMD_AzFQYM9cR8TvfqSaYQT07HnLkbSCZnM-9OL9rdrzm-hKA2sjLqxOLkDQEqcwCQHiZT0KoweH8Y0nqqKuymWVNUb4A8hyYnORyNXgTaTFbwU2YpEdU43z7PMnPXmr1MtWMe4GQdhCTAfCrsQout8nkHyLE-yUWAFa4jAo-GUAVALgiFr5n0Q7ya5wgA9OWHFwrXYkLSFKzCpw90hpZ_8UYh1dpBCwIIK0CJpOaeIN0ieAg) on save all to help you remember them over the long-term. I would **massively recommend using a spaced repetition app (video** [**explanation**](https://youtu.be/AD0aFdRCskQ)**) like anki or** [**save all**](https://saveall.ai/) **for the things you learn** otherwise you’ll just forget so much of what is important. Here’s the takeaways:
# Neural Network Training Fundamentals
* Always **start** an ML project by **producing simple baselines**
* If is binary classification then could even be as simple as predicting the most common class in the training dataset
* Other baselines: linear regression, random forest, boosting etc…
* Then you can **use your baseline to clean your data** by looking at the datapoints it gets most incorrect and checking to see if they are actually classified correctly in the data
* In general you can also **leverage your baselines** to **help debug** your models
/r/MachineLearning
https://redd.it/mbhewa
Goodreads
Deep Learning for Coders with Fastai and Pytorch: AI Ap…
Deep learning is often viewed as the exclusive domain o…