GraphQL and Django in 5 minutes
https://joaorafaelm.github.io/blog/graphql-and-django-in-5-minutes
/r/Python
https://redd.it/6wf95q
https://joaorafaelm.github.io/blog/graphql-and-django-in-5-minutes
/r/Python
https://redd.it/6wf95q
Snippets are unofficial and unmaintained.
http://flask.pocoo.org/snippets/
/r/flask
https://redd.it/6wen7j
http://flask.pocoo.org/snippets/
/r/flask
https://redd.it/6wen7j
reddit
Snippets are unofficial and unmaintained. • r/flask
4 points and 3 comments so far on reddit
How do you develop on a remote server?
Hi guys,
i develop primary desktop application, but my next project will be a website for internal use.
My normal workflow is: Write code with PyCharm Community edition on my windows pc, debug and test it locally. After this, deploy it. Because my endtarget are windows clients, this works very well.
Now my next project will be Django on a Linux server with several extensions, who are not a fan of windows. Trust me, tried it, didn't work. So, how do I do this?
Right at the moment I think about using a VM with VMware Player, but I'm afraid about the lagging while writing code all the time on a remote system.
Can anyone recommend a good practice to develop for a remote server?
/r/django
https://redd.it/6wehz1
Hi guys,
i develop primary desktop application, but my next project will be a website for internal use.
My normal workflow is: Write code with PyCharm Community edition on my windows pc, debug and test it locally. After this, deploy it. Because my endtarget are windows clients, this works very well.
Now my next project will be Django on a Linux server with several extensions, who are not a fan of windows. Trust me, tried it, didn't work. So, how do I do this?
Right at the moment I think about using a VM with VMware Player, but I'm afraid about the lagging while writing code all the time on a remote system.
Can anyone recommend a good practice to develop for a remote server?
/r/django
https://redd.it/6wehz1
reddit
How do you develop on a remote server? • r/django
Hi guys, i develop primary desktop application, but my next project will be a website for internal use. My normal workflow is: Write code with...
Quick script to delete your reddit comments
I noticed the tampermonkey script just edits your comments, not deleting them, so I wrote the following script to do both. You'll need to register the app on your account and put in client id/secret
import praw
reddit = praw.Reddit(client_id='',
client_secret='',
password='',
user_agent='deletes my comments',
username='')
redditor = reddit.redditor("")
for comment in redditor.comments.new():
comment.edit(".")
comment.delete()
It deletes your comments most recent to oldest.
Pro tip: make a shell script that includes this code just by adding a shebang followed by a path to your interpreter and run it from there. Also make an alias, helps when you need to find/run this script quickly.
/r/Python
https://redd.it/6wfqsv
I noticed the tampermonkey script just edits your comments, not deleting them, so I wrote the following script to do both. You'll need to register the app on your account and put in client id/secret
import praw
reddit = praw.Reddit(client_id='',
client_secret='',
password='',
user_agent='deletes my comments',
username='')
redditor = reddit.redditor("")
for comment in redditor.comments.new():
comment.edit(".")
comment.delete()
It deletes your comments most recent to oldest.
Pro tip: make a shell script that includes this code just by adding a shebang followed by a path to your interpreter and run it from there. Also make an alias, helps when you need to find/run this script quickly.
/r/Python
https://redd.it/6wfqsv
reddit
Quick script to delete your reddit comments • r/Python
I noticed the tampermonkey script just edits your comments, not deleting them, so I wrote the following script to do both. You'll need to register...
[D] would anyone be interested in a machine-learning focused linux distro?
I was thinking about how hard it is to set everything up (CUDA, installing different frameworks, etc) once you put together a new machine...
Would there be any interest in a linux distribution (ubuntu variant) that comes pre-installed with stuff like CUDA, tensorflow, torch, a nice IDE, etc, so you can just install the distro and get started with machine learning stuff right away? I could easily throw something like this together and put it on github or something over the coming long weekend...
Let me know if there is interest and things that I should include in it.
**Edit: made an empty git repo; I'll put stuff there this weekend when I have time to work on it... https://github.com/robbiebarrat/MachineLearningLinux**
/r/MachineLearning
https://redd.it/6wfgfz
I was thinking about how hard it is to set everything up (CUDA, installing different frameworks, etc) once you put together a new machine...
Would there be any interest in a linux distribution (ubuntu variant) that comes pre-installed with stuff like CUDA, tensorflow, torch, a nice IDE, etc, so you can just install the distro and get started with machine learning stuff right away? I could easily throw something like this together and put it on github or something over the coming long weekend...
Let me know if there is interest and things that I should include in it.
**Edit: made an empty git repo; I'll put stuff there this weekend when I have time to work on it... https://github.com/robbiebarrat/MachineLearningLinux**
/r/MachineLearning
https://redd.it/6wfgfz
Update / Save model date value directly from template?
Hello all,
I am still quite inexperienced in Django and I was wondering if it would be at all possible to update/save today's date in my database directly from the template?
I have a Django-filter filterView (listView) that shows the list of people that are in my department which I currently have in my database. And I would like to update a datetime value (when the people have last been visited) to today's date by clicking on a <a><\a> link that shows in the list. That way I don't have to setup an update view just to update when I've last visited the coworkers. Is something like this even possible?
I did try to implement a function in my models.py with the @property tag but when I refresh the webpage, or visit the page it automatically updates it without having to click on the link.
Edit: Here is the code:
# models.py
@property
def update_visit_date(self):
self.last_visit = timezone.make_aware(datetime.datetime.today())
super(Directory, self).save()
return reverse('directory_list')
# snippet from my template directory_list.html
{% for contact in items %}
<tr>
<td>{{ contact.first_name }}</td>
<td>{{ contact.last_name }}</td>
<th><a href="{{ contact.get_absolute_url }}">{{ contact.email_address }}</a></th>
<td>{{ contact.phone_number_1 }}</td>
<td>{{ contact.get_department_display }}</td>
<td>{{ contact.room_number }}</td>
{% if contact.is_past_due == 'no_visit_performed' %}
<td class="info">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'visit_good' %}
<td class="success">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'visit_old' %}
<td class="warning">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'need_visit' %}
<td class="danger">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% endif %}
</tr>
{% empty %}
Is this something that is possible, the performing a CRUD from a template link? Or am I going about this the wrong way? Any help is greatly appreciated. Thank you very much!
/r/djangolearning
https://redd.it/6wd8ue
Hello all,
I am still quite inexperienced in Django and I was wondering if it would be at all possible to update/save today's date in my database directly from the template?
I have a Django-filter filterView (listView) that shows the list of people that are in my department which I currently have in my database. And I would like to update a datetime value (when the people have last been visited) to today's date by clicking on a <a><\a> link that shows in the list. That way I don't have to setup an update view just to update when I've last visited the coworkers. Is something like this even possible?
I did try to implement a function in my models.py with the @property tag but when I refresh the webpage, or visit the page it automatically updates it without having to click on the link.
Edit: Here is the code:
# models.py
@property
def update_visit_date(self):
self.last_visit = timezone.make_aware(datetime.datetime.today())
super(Directory, self).save()
return reverse('directory_list')
# snippet from my template directory_list.html
{% for contact in items %}
<tr>
<td>{{ contact.first_name }}</td>
<td>{{ contact.last_name }}</td>
<th><a href="{{ contact.get_absolute_url }}">{{ contact.email_address }}</a></th>
<td>{{ contact.phone_number_1 }}</td>
<td>{{ contact.get_department_display }}</td>
<td>{{ contact.room_number }}</td>
{% if contact.is_past_due == 'no_visit_performed' %}
<td class="info">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'visit_good' %}
<td class="success">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'visit_old' %}
<td class="warning">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% elif contact.is_past_due == 'need_visit' %}
<td class="danger">{{ contact.last_visit }}<a href="{{ contact.update_visit_date }}"> {% bootstrap_icon "plus-sign" %}</a></td>
{% endif %}
</tr>
{% empty %}
Is this something that is possible, the performing a CRUD from a template link? Or am I going about this the wrong way? Any help is greatly appreciated. Thank you very much!
/r/djangolearning
https://redd.it/6wd8ue
reddit
Update / Save model date value directly from... • r/djangolearning
Hello all, I am still quite inexperienced in Django and I was wondering if it would be at all possible to update/save today's date in my database...
[P] Pytorch-c++: use your pytorch trained models in c++
https://github.com/warmspringwinds/pytorch-cpp
/r/MachineLearning
https://redd.it/6wgwxb
https://github.com/warmspringwinds/pytorch-cpp
/r/MachineLearning
https://redd.it/6wgwxb
GitHub
GitHub - warmspringwinds/pytorch-cpp: Pytorch C++ Library
Pytorch C++ Library. Contribute to warmspringwinds/pytorch-cpp development by creating an account on GitHub.
Microservices with Docker, Flask, and React - Part 5 (Docker Hub, AWS ECS and RDS)
http://testdriven.io/part-five-intro
/r/flask
https://redd.it/6wjf0p
http://testdriven.io/part-five-intro
/r/flask
https://redd.it/6wjf0p
reddit
Microservices with Docker, Flask, and React - Part 5... • r/flask
2 points and 0 comments so far on reddit
Sound Pattern Recognition with Python
https://medium.com/@almeidneto/sound-pattern-recognition-with-python-9aff69edce5d
/r/Python
https://redd.it/6wiywl
https://medium.com/@almeidneto/sound-pattern-recognition-with-python-9aff69edce5d
/r/Python
https://redd.it/6wiywl
Medium
Sound Pattern Recognition with Python
As you can probably tell from the title in this post I will be toying around with python and sound to detect sound patterns. More…
Is there any tutorial on how to run pyaudio with flask?
I'm basically trying to record audio through a clients web browser from a remote server. I was hoping to use this python script (which imports pyaudio) below to record.
import pyaudio
import wave
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
CHUNK = 1024
RECORD_SECONDS = 5
WAVE_OUTPUT_FILENAME = "file.wav"
audio = pyaudio.PyAudio()
# start Recording
stream = audio.open(format=FORMAT, channels=CHANNELS,
rate=RATE, input=True,
frames_per_buffer=CHUNK)
print ("recording...")
frames = []
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
data = stream.read(CHUNK)
frames.append(data)
print ("finished recording")
# stop Recording
stream.stop_stream()
stream.close()
audio.terminate()
waveFile = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
waveFile.setnchannels(CHANNELS)
waveFile.setsampwidth(audio.get_sample_size(FORMAT))
waveFile.setframerate(RATE)
waveFile.writeframes(b''.join(frames))
waveFile.close()
However i am not sure what to do about the frontend. Is it a simple html form with a post request? I know that it wouldnt make any sense if that were solely the case. If anyone has gone through something similar as this, can you pinpoint me to some tutorials or documents available on how i can connect the python script to a web browser via flask?
Thanks
/r/flask
https://redd.it/6wg24z
I'm basically trying to record audio through a clients web browser from a remote server. I was hoping to use this python script (which imports pyaudio) below to record.
import pyaudio
import wave
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
CHUNK = 1024
RECORD_SECONDS = 5
WAVE_OUTPUT_FILENAME = "file.wav"
audio = pyaudio.PyAudio()
# start Recording
stream = audio.open(format=FORMAT, channels=CHANNELS,
rate=RATE, input=True,
frames_per_buffer=CHUNK)
print ("recording...")
frames = []
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
data = stream.read(CHUNK)
frames.append(data)
print ("finished recording")
# stop Recording
stream.stop_stream()
stream.close()
audio.terminate()
waveFile = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
waveFile.setnchannels(CHANNELS)
waveFile.setsampwidth(audio.get_sample_size(FORMAT))
waveFile.setframerate(RATE)
waveFile.writeframes(b''.join(frames))
waveFile.close()
However i am not sure what to do about the frontend. Is it a simple html form with a post request? I know that it wouldnt make any sense if that were solely the case. If anyone has gone through something similar as this, can you pinpoint me to some tutorials or documents available on how i can connect the python script to a web browser via flask?
Thanks
/r/flask
https://redd.it/6wg24z
reddit
Is there any tutorial on how to run pyaudio with flask? • r/flask
I'm basically trying to record audio through a clients web browser from a remote server. I was hoping to use this python script (which imports...
Jupyter notebook code cell empty lines / scrolling
Since today, all my jupyter code cells have some empty lines at the end of a code block which are not real lines that I can delete, but rather is just empty space. In theory, this does not bother me, but unfortunately, each cell thus has scrolling available, and I inevitable scroll all the time in a cell which is quite annoying. It seems to only happen in Chrome though.
Anyone got an idea how to tackle this? Thanks.
/r/IPython
https://redd.it/6wjm2z
Since today, all my jupyter code cells have some empty lines at the end of a code block which are not real lines that I can delete, but rather is just empty space. In theory, this does not bother me, but unfortunately, each cell thus has scrolling available, and I inevitable scroll all the time in a cell which is quite annoying. It seems to only happen in Chrome though.
Anyone got an idea how to tackle this? Thanks.
/r/IPython
https://redd.it/6wjm2z
reddit
Jupyter notebook code cell empty lines / scrolling • r/IPython
Since today, all my jupyter code cells have some empty lines at the end of a code block which are not real lines that I can delete, but rather is...
A Human's Guide to setup.py (by Kenneth Reitz)
https://github.com/kennethreitz/setup.py
/r/Python
https://redd.it/6wkk9p
https://github.com/kennethreitz/setup.py
/r/Python
https://redd.it/6wkk9p
GitHub
GitHub - kennethreitz/setup.py: 📦 A Human's Ultimate Guide to setup.py.
📦 A Human's Ultimate Guide to setup.py. Contribute to kennethreitz/setup.py development by creating an account on GitHub.
share your jwt/swagger implementation?
I'm having a hard time with this.
Here's what I have so far. The docs work, but the problem is it's not giving me the ability to enter a token on the "try me out!" examples. Also, when passing the token it's expecting `Authorization: JWT <token>` but per setup it's receiving `Authorization: <token>`. I don't want to remove the `JWT` prefix.
settings.py
...
JWT_AUTH = {
'JWT_EXPIRATION_DELTA': datetime.timedelta(seconds=300),
'JWT_ALLOW_REFRESH': True,
'JWT_REFRESH_EXPIRATION_DELTA': datetime.timedelta(days=7),
'JWT_AUTH_HEADER_PREFIX': 'JWT',
'JWT_AUTH_COOKIE': None,
}
SWAGGER_SETTINGS = {
'SECURITY_DEFINITIONS': {
'jwt': {
'type': 'apiKey',
'description': 'jwt Token',
'name': 'Authorization',
'in': 'header'
}
},
'USE_SESSION_AUTH': False,
'SHOW_REQUEST_HEADERS': True,
'JSON_EDITOR': True,
}
...
urls.py
...
schema_view = get_schema_view(title='My API', renderer_classes=[OpenAPIRenderer, SwaggerUIRenderer])
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^api/v1/', include(router.urls)),
url(r'^api/v1/docs', schema_view, name='docs'),
url(r'^rest-api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r'^api/v1/auth/obtain/', obtain_jwt_token),
url(r'^api/v1/auth/refresh/', refresh_jwt_token),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
...
/r/django
https://redd.it/6wnsjs
I'm having a hard time with this.
Here's what I have so far. The docs work, but the problem is it's not giving me the ability to enter a token on the "try me out!" examples. Also, when passing the token it's expecting `Authorization: JWT <token>` but per setup it's receiving `Authorization: <token>`. I don't want to remove the `JWT` prefix.
settings.py
...
JWT_AUTH = {
'JWT_EXPIRATION_DELTA': datetime.timedelta(seconds=300),
'JWT_ALLOW_REFRESH': True,
'JWT_REFRESH_EXPIRATION_DELTA': datetime.timedelta(days=7),
'JWT_AUTH_HEADER_PREFIX': 'JWT',
'JWT_AUTH_COOKIE': None,
}
SWAGGER_SETTINGS = {
'SECURITY_DEFINITIONS': {
'jwt': {
'type': 'apiKey',
'description': 'jwt Token',
'name': 'Authorization',
'in': 'header'
}
},
'USE_SESSION_AUTH': False,
'SHOW_REQUEST_HEADERS': True,
'JSON_EDITOR': True,
}
...
urls.py
...
schema_view = get_schema_view(title='My API', renderer_classes=[OpenAPIRenderer, SwaggerUIRenderer])
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^api/v1/', include(router.urls)),
url(r'^api/v1/docs', schema_view, name='docs'),
url(r'^rest-api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r'^api/v1/auth/obtain/', obtain_jwt_token),
url(r'^api/v1/auth/refresh/', refresh_jwt_token),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
...
/r/django
https://redd.it/6wnsjs
reddit
share your jwt/swagger implementation? • r/django
I'm having a hard time with this. Here's what I have so far. The docs work, but the problem is it's not giving me the ability to enter a token...
Is there a way to make shell context in Django like in Flask?
What I mean is whenever I use python manage.py shell I don't want to keep typing the imports I need from my models, such as from models import User. In Flask, there is a way so that whenever you call python manage.py shell User is already a variable in the shell that you can reference without importing. Can you do a similar thing in Django?
/r/django
https://redd.it/6woap1
What I mean is whenever I use python manage.py shell I don't want to keep typing the imports I need from my models, such as from models import User. In Flask, there is a way so that whenever you call python manage.py shell User is already a variable in the shell that you can reference without importing. Can you do a similar thing in Django?
/r/django
https://redd.it/6woap1
reddit
Is there a way to make shell context in Django like in... • r/django
What I mean is whenever I use python manage.py shell I don't want to keep typing the imports I need from my models, such as from models import...
Python has clearly overtaken Java in popularity on StackOverflow and trails only JavaScript
https://insights.stackoverflow.com/trends?utm_source=so-owned&utm_medium=blog&utm_campaign=trends&utm_content=blog-link&tags=java%2Cpython%2Cphp%2Cjavascript
/r/Python
https://redd.it/6wmsbq
https://insights.stackoverflow.com/trends?utm_source=so-owned&utm_medium=blog&utm_campaign=trends&utm_content=blog-link&tags=java%2Cpython%2Cphp%2Cjavascript
/r/Python
https://redd.it/6wmsbq
Stackoverflow
Stack Overflow
Use Stack Overflow Insights and get information required to understand, reach, and attract developers.Improve tech hiring, recruiting, developer marketing, and and planning initiatives.
Has anyone had problems with Django settings files not interpreting environment variables correctly?
-----------------------
EDIT: Solved! Thanks /u/dirtybutter and /u/mipadi!
-----------------------
I feel like I've come across a sort of weird problem here. On my local machine, I work in virtualenvs when I am building things. Then I primarily push projects up to Heroku.
On most of my projects that are public-facing I set them up using env variables for sensitive stuff like DEBUG, SECRET_KEY, etc. Well a couple days ago I had an issue where I couldn't get debug to turn off on one of my projects on Heroku even though I had this line in my settings file:
DEBUG = bool(os.environ.get('DJANGO_DEBUG', True))
On the Heroku side, just like I always do, I set an ENV variable with the cli like so:
heroku config:set DJANGO_DEBUG=" " #Empty string evals to false
So for whatever reason that wasn't working to turn off debug on Heroku, and it seemed like Heroku wasn't interpreting it correctly because when I would print the variable using the python shell, with that same code above (i.e. bool(...)) when running bash on the Heroku dyno it would still come back as true no matter what I set it as. Finally I adjusted the settings file in my project so now it says this:
if os.environ.get('DJANGO_DEBUG') == 'True':
dbg = True
else:
dbg = False
DEBUG = dbg #bool(os.environ.get('DJANGO_DEBUG', True))
That fixed the problem on Heroku. HOWEVER, now when I run the local python server on my local machine during development, all of a sudden I can't load my static files?!?! If I set an env variable locally on my machine called DJANGO_DEBUG and set it to 'True' (note it's a STRING not a boolean) the application still has debug off. If I change the settings file back to what it originally was, DEBUG = bool(os.environ.get('DJANGO_DEBUG', True)), then my static files load again and debug acts normally, but then debug won't be interpreted right on Heroku!
So basically, my question is: WTF!?!?!?! I don't know what changed...if it's a python versioning thing, a heroku thing, or a django version thing, or something totally different. I have at least 10 other projects running on Heroku AND locally right now and I have used this syntax for years so I don't know what the hell changed or why my settings file doesn't work right on my local machine when I use the "long form" if statement, but doesn't work right on Heroku when I use the short form.
Any ideas? Thanks!!
/r/django
https://redd.it/6wl4bq
-----------------------
EDIT: Solved! Thanks /u/dirtybutter and /u/mipadi!
-----------------------
I feel like I've come across a sort of weird problem here. On my local machine, I work in virtualenvs when I am building things. Then I primarily push projects up to Heroku.
On most of my projects that are public-facing I set them up using env variables for sensitive stuff like DEBUG, SECRET_KEY, etc. Well a couple days ago I had an issue where I couldn't get debug to turn off on one of my projects on Heroku even though I had this line in my settings file:
DEBUG = bool(os.environ.get('DJANGO_DEBUG', True))
On the Heroku side, just like I always do, I set an ENV variable with the cli like so:
heroku config:set DJANGO_DEBUG=" " #Empty string evals to false
So for whatever reason that wasn't working to turn off debug on Heroku, and it seemed like Heroku wasn't interpreting it correctly because when I would print the variable using the python shell, with that same code above (i.e. bool(...)) when running bash on the Heroku dyno it would still come back as true no matter what I set it as. Finally I adjusted the settings file in my project so now it says this:
if os.environ.get('DJANGO_DEBUG') == 'True':
dbg = True
else:
dbg = False
DEBUG = dbg #bool(os.environ.get('DJANGO_DEBUG', True))
That fixed the problem on Heroku. HOWEVER, now when I run the local python server on my local machine during development, all of a sudden I can't load my static files?!?! If I set an env variable locally on my machine called DJANGO_DEBUG and set it to 'True' (note it's a STRING not a boolean) the application still has debug off. If I change the settings file back to what it originally was, DEBUG = bool(os.environ.get('DJANGO_DEBUG', True)), then my static files load again and debug acts normally, but then debug won't be interpreted right on Heroku!
So basically, my question is: WTF!?!?!?! I don't know what changed...if it's a python versioning thing, a heroku thing, or a django version thing, or something totally different. I have at least 10 other projects running on Heroku AND locally right now and I have used this syntax for years so I don't know what the hell changed or why my settings file doesn't work right on my local machine when I use the "long form" if statement, but doesn't work right on Heroku when I use the short form.
Any ideas? Thanks!!
/r/django
https://redd.it/6wl4bq
reddit
Has anyone had problems with Django settings files not... • r/django
----------------------- EDIT: Solved! Thanks /u/dirtybutter and /u/mipadi! ----------------------- I feel like I've come across a sort of weird...
MIT's introduction to CS and programming starts tomorrow. it uses python as tool to teach cs concepts.
https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11
/r/Python
https://redd.it/6wn4ns
https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11
/r/Python
https://redd.it/6wn4ns
edX
MITx: Introduction to Computer Science and Programming Using Python. | edX
An introduction to computer science as a tool to solve real-world analytical problems using Python 3.5.
Building this website using Flask. Feeback needed!
Hi,
I created [https://apileap.com](https://apileap.com) using Flask as the main framework and have to say that it has been an wonderful experience so far. There is a lot of nice extensions and I love being able to keep everything as simple as possible.
I do have a few questions though.
What deployment options do you recommend?
I currently use **nginx**, **gunicorn** and **gevent** on **EC2**. Do you think there are better options? How do you think I should scale if I ever need to? Anybody tried [Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk/) with Flask?
What do you think about the website? What can I improve? Do you think it might be useful?
The website offers only one API right now but the idea is to offer several easy to use APIs for small companies in the near future. Do you think it might be interesting for your company? What API would you like to see added? I was thinking about currency conversion API, IP geolocation API, phone number validation API, sms API, ...
For the curious, here are the dependencies I use:
- Flask==0.12.2
- Flask-SQLAlchemy==2.2
- Flask-Security==3.0.0
- Flask-DebugToolbar==0.10.1
- Flask-Migrate==2.0.4
- Flask-Admin==1.5.0
- SQLAlchemy==1.1.11
- gunicorn==19.7.1
- psutil==5.2.2
- gevent==1.2.2
- requests==2.18.3
- stripe==1.62.0
- websocket-client==0.44.0
- Fabric3==1.13.1.post1
And for the front end:
- jquery==3.2.1
- bootstrap==4.0.0-beta
- vue=2.4.2
Have a good day!
Tim
/r/flask
https://redd.it/6wpynb
Hi,
I created [https://apileap.com](https://apileap.com) using Flask as the main framework and have to say that it has been an wonderful experience so far. There is a lot of nice extensions and I love being able to keep everything as simple as possible.
I do have a few questions though.
What deployment options do you recommend?
I currently use **nginx**, **gunicorn** and **gevent** on **EC2**. Do you think there are better options? How do you think I should scale if I ever need to? Anybody tried [Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk/) with Flask?
What do you think about the website? What can I improve? Do you think it might be useful?
The website offers only one API right now but the idea is to offer several easy to use APIs for small companies in the near future. Do you think it might be interesting for your company? What API would you like to see added? I was thinking about currency conversion API, IP geolocation API, phone number validation API, sms API, ...
For the curious, here are the dependencies I use:
- Flask==0.12.2
- Flask-SQLAlchemy==2.2
- Flask-Security==3.0.0
- Flask-DebugToolbar==0.10.1
- Flask-Migrate==2.0.4
- Flask-Admin==1.5.0
- SQLAlchemy==1.1.11
- gunicorn==19.7.1
- psutil==5.2.2
- gevent==1.2.2
- requests==2.18.3
- stripe==1.62.0
- websocket-client==0.44.0
- Fabric3==1.13.1.post1
And for the front end:
- jquery==3.2.1
- bootstrap==4.0.0-beta
- vue=2.4.2
Have a good day!
Tim
/r/flask
https://redd.it/6wpynb
Apileap
Website screenshot and thumbnails API | ApiLeap
Best URL Screenshot API based on Chrome to make full page snapshots or thumbnails of any website. The service is fully automated and offers many options and features like mobile screenshots, custom resolution, fixed viewport, ...
What's everyone working on this week?
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/6wrgil
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/6wrgil
reddit
What's everyone working on this week? • r/Python
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your...