A promising competitor for pygame: Arcade
I've been using pygame for a long time now (just check my GitHub), and while it gets the job done, it has its downsides. Some of the stuff is very confusing; I for one hate how the sprites can only be positioned on integer coordinates, forces me to write my own wrapper around the sprites every time. And the whole game loop is just a bunch of boiler plate, since you're gonna do it the same way everytime anyways. I even made a library to avoid having to write all the boiler plate: https://github.com/Mahi/EzPyGame.
However, there is a better solution! Let me introduce you to [Arcade](http://arcade.academy/). It's a similar game library, but has way less quirks and it's much more pythonic. It's also being actively maintained and developed further as you can see on the [GitHub](https://github.com/pvcraven/arcade) page. It uses OpenGL and pyglet underneath, and there are a ton of examples on getting started on its website. There's even a [subreddit](/r/pythonarcade), although a bit inactive.
Just wanted to give you all a heads up, I'm not connected to the developer in any way, I'm just very happy to see a "better" pygame and wanted to let you all know. It takes some time to get into (coming from pygame), but for me it has been worth the time.
/r/Python
https://redd.it/8hz8p8
I've been using pygame for a long time now (just check my GitHub), and while it gets the job done, it has its downsides. Some of the stuff is very confusing; I for one hate how the sprites can only be positioned on integer coordinates, forces me to write my own wrapper around the sprites every time. And the whole game loop is just a bunch of boiler plate, since you're gonna do it the same way everytime anyways. I even made a library to avoid having to write all the boiler plate: https://github.com/Mahi/EzPyGame.
However, there is a better solution! Let me introduce you to [Arcade](http://arcade.academy/). It's a similar game library, but has way less quirks and it's much more pythonic. It's also being actively maintained and developed further as you can see on the [GitHub](https://github.com/pvcraven/arcade) page. It uses OpenGL and pyglet underneath, and there are a ton of examples on getting started on its website. There's even a [subreddit](/r/pythonarcade), although a bit inactive.
Just wanted to give you all a heads up, I'm not connected to the developer in any way, I'm just very happy to see a "better" pygame and wanted to let you all know. It takes some time to get into (coming from pygame), but for me it has been worth the time.
/r/Python
https://redd.it/8hz8p8
GitHub
Mahi/EzPyGame
EzPyGame - An easier way to use pygame
pipenv: wanted to try out a specific version of python, ran into some bugs
tldr: used pipenv --python path/to/2.7.15, but pipenv shell still thinks i'm using 2.7.6
---
twig@nix:~/src/TestProject$ rm -rf Pipfile Pipfile.lock ~/.virtualenvs/TestProject-nEJHdvQJ
twig@nix:~/src/TestProject$ pipenv install --python ~/python/compiled/2.7.15/bin/python2.7
Creating a virtualenv for this project…
Using /home/twig/python/compiled/2.7.15/bin/python2.7 (2.7.15) to create virtualenv…
⠋Running virtualenv with interpreter /home/twig/python/compiled/2.7.15/bin/python2.7
New python executable in /home/twig/.virtualenvs/TestProject-nEJHdvQJ/bin/python2.7
Also creating executable in /home/twig/.virtualenvs/TestProject-nEJHdvQJ/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/twig/.virtualenvs/TestProject-nEJHdvQJ
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (dfae9f)!
Installing dependencies from Pipfile.lock (dfae9f)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run the following:
$ pipenv shell
twig@nix:~/src/TestProject$ pipenv shell
Loading .env environment variables…
Spawning environment shell (/bin/bash). Use 'exit' to leave.
. /home/twig/.virtualenvs/TestProject-nEJHdvQJ/bin/activate
(TestProject-nEJHdvQJ) twig@nix:~/src/TestProject$ python --version
Python 2.7.6
(TestProject-nEJHdvQJ) twig@nix:~/src/TestProject$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.4m /usr/bin/python3.4 /usr/bin/python2.7-config /etc/python /etc/python2.7 /etc/python3.4 /usr/lib/python2.7 /usr/lib/python3.4 /usr/bin/X11/python /usr/bin/X11/python2.7 /usr/bin/X11/python3.4m /usr/bin/X11/python3.4 /usr/bin/X11/python2.7-config /usr/local/lib/python2.7 /usr/local/lib/python3.4 /usr/include/python2.7 /usr/share/python /usr/share/man/man1/python.1.gz
any ideas?
/r/Python
https://redd.it/8i1qdq
tldr: used pipenv --python path/to/2.7.15, but pipenv shell still thinks i'm using 2.7.6
---
twig@nix:~/src/TestProject$ rm -rf Pipfile Pipfile.lock ~/.virtualenvs/TestProject-nEJHdvQJ
twig@nix:~/src/TestProject$ pipenv install --python ~/python/compiled/2.7.15/bin/python2.7
Creating a virtualenv for this project…
Using /home/twig/python/compiled/2.7.15/bin/python2.7 (2.7.15) to create virtualenv…
⠋Running virtualenv with interpreter /home/twig/python/compiled/2.7.15/bin/python2.7
New python executable in /home/twig/.virtualenvs/TestProject-nEJHdvQJ/bin/python2.7
Also creating executable in /home/twig/.virtualenvs/TestProject-nEJHdvQJ/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/twig/.virtualenvs/TestProject-nEJHdvQJ
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (dfae9f)!
Installing dependencies from Pipfile.lock (dfae9f)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run the following:
$ pipenv shell
twig@nix:~/src/TestProject$ pipenv shell
Loading .env environment variables…
Spawning environment shell (/bin/bash). Use 'exit' to leave.
. /home/twig/.virtualenvs/TestProject-nEJHdvQJ/bin/activate
(TestProject-nEJHdvQJ) twig@nix:~/src/TestProject$ python --version
Python 2.7.6
(TestProject-nEJHdvQJ) twig@nix:~/src/TestProject$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.4m /usr/bin/python3.4 /usr/bin/python2.7-config /etc/python /etc/python2.7 /etc/python3.4 /usr/lib/python2.7 /usr/lib/python3.4 /usr/bin/X11/python /usr/bin/X11/python2.7 /usr/bin/X11/python3.4m /usr/bin/X11/python3.4 /usr/bin/X11/python2.7-config /usr/local/lib/python2.7 /usr/local/lib/python3.4 /usr/include/python2.7 /usr/share/python /usr/share/man/man1/python.1.gz
any ideas?
/r/Python
https://redd.it/8i1qdq
reddit
r/Python - pipenv: wanted to try out a specific version of python, ran into some bugs
4 votes and 0 so far on reddit
I have a 64 bit machine, but I had to install the 32 bit version of Python 3.6.5
I’m new to programming as a whole. I had installed Python 3.6.5 on my 64 bit computer, but I have the 32 bit version of Python. Can anyone explain this please?
/r/Python
https://redd.it/8i17ks
I’m new to programming as a whole. I had installed Python 3.6.5 on my 64 bit computer, but I have the 32 bit version of Python. Can anyone explain this please?
/r/Python
https://redd.it/8i17ks
reddit
r/Python - I have a 64 bit machine, but I had to install the 32 bit version of Python 3.6.5
2 votes and 4 so far on reddit
Content scraping with Selenium
Hi
I am building a site that allows users to enter a URL with the aim of it grabbing the images from that site and allowing the user to pick one to use on their page. Standard concept I imagine. I have it all working, along with some code that checks the file size to make sure it's above a certain size. However it's slow, for instance running this on my local machine for a given site may take 12seconds, doing the same on a site with similar functionality takes 3 seconds. Even if I disable the portion of my code that determines the file size it's still as slow.
Is there a way to optimise this? I notice the site that I compared mine with only grabbed 5 images whereas mine took about 20+.
Can I tell selenium to only run for maybe 3 seconds and then use whatever it grabs within that time frame? Or anything else that would help speed this up in any way. I would be happy to only expend as much energy as is required to take the first 5 images from the page - some of the pages that will be scraped by users will be really large I imagine.
Thanks in advance for any assistance / pointers.
/r/django
https://redd.it/8hz6p6
Hi
I am building a site that allows users to enter a URL with the aim of it grabbing the images from that site and allowing the user to pick one to use on their page. Standard concept I imagine. I have it all working, along with some code that checks the file size to make sure it's above a certain size. However it's slow, for instance running this on my local machine for a given site may take 12seconds, doing the same on a site with similar functionality takes 3 seconds. Even if I disable the portion of my code that determines the file size it's still as slow.
Is there a way to optimise this? I notice the site that I compared mine with only grabbed 5 images whereas mine took about 20+.
Can I tell selenium to only run for maybe 3 seconds and then use whatever it grabs within that time frame? Or anything else that would help speed this up in any way. I would be happy to only expend as much energy as is required to take the first 5 images from the page - some of the pages that will be scraped by users will be really large I imagine.
Thanks in advance for any assistance / pointers.
/r/django
https://redd.it/8hz6p6
reddit
r/django - Content scraping with Selenium
5 votes and 18 so far on reddit
[AF]Flask + Multicore: will flask use all cores automatically?
I have very little knowledge in this area but I'm curious. If I write a Flask application and deploy it onto a virtual machine with multiple cores, then will my Flask application be able to utilize all cores out of the box? If not, then can it be configured to (conceptually)?
/r/flask
https://redd.it/8gafpl
I have very little knowledge in this area but I'm curious. If I write a Flask application and deploy it onto a virtual machine with multiple cores, then will my Flask application be able to utilize all cores out of the box? If not, then can it be configured to (conceptually)?
/r/flask
https://redd.it/8gafpl
reddit
[AF]Flask + Multicore: will flask use all cores... • r/flask
I have very little knowledge in this area but I'm curious. If I write a Flask application and deploy it onto a virtual machine with multiple...
Anyone have a spare ticket they could sell for euroDjangoCon this month? I'm keen to go, but just found out about it....
/r/django
https://redd.it/8i46xe
/r/django
https://redd.it/8i46xe
reddit
Anyone have a spare ticket they could sell for... • r/django
2 points and 0 comments so far on reddit
Thumbnail for file fields
Hey guys,
Has anyone come up with an effective way to display image thumbnails within an ImageField (or VersatileImage) field in Django after the user uploads the image? I see that there are a few code snippets out that that handles thumbnail images for the admin area, but I'm interested in displaying the thumbnail of a user uploaded image on my web page. I'd imagine that I'd need a custom widget, but I don't know much about widgets or how to implement them. Any thoughts would be greatly appreciated.
Thanks!
/r/django
https://redd.it/8i4agq
Hey guys,
Has anyone come up with an effective way to display image thumbnails within an ImageField (or VersatileImage) field in Django after the user uploads the image? I see that there are a few code snippets out that that handles thumbnail images for the admin area, but I'm interested in displaying the thumbnail of a user uploaded image on my web page. I'd imagine that I'd need a custom widget, but I don't know much about widgets or how to implement them. Any thoughts would be greatly appreciated.
Thanks!
/r/django
https://redd.it/8i4agq
reddit
r/django - Thumbnail for file fields
1 votes and 1 so far on reddit
Advice on database topology? visualizer
Hi all, I'm looking for advice as to the approach I should take.
I have a database something like this;
Animal
Mammal Fish
Cat Dog Cod Plaice
And I'm just wondering of a *sexy* way to visualize the data using a django approach where you can explore along the options tree branches and see the Cat at the end of the tree. I've used django a fair bit before.
Wonder if anyone has any advice or can point me in any direction of good platforms/github repos I could copy and paste my database into and tweak? Something ideally relatively secure such that I could put onto the web at the end.
/r/django
https://redd.it/8hxkfy
Hi all, I'm looking for advice as to the approach I should take.
I have a database something like this;
Animal
Mammal Fish
Cat Dog Cod Plaice
And I'm just wondering of a *sexy* way to visualize the data using a django approach where you can explore along the options tree branches and see the Cat at the end of the tree. I've used django a fair bit before.
Wonder if anyone has any advice or can point me in any direction of good platforms/github repos I could copy and paste my database into and tweak? Something ideally relatively secure such that I could put onto the web at the end.
/r/django
https://redd.it/8hxkfy
reddit
Advice on database topology? visualizer • r/django
Hi all, I'm looking for advice as to the approach I should take. I have a database something like this; Animal ...
How to write a command-line application using Python and Click
http://progogo.work/how-to-write-a-command-line-application-using-python-and-click
/r/Python
https://redd.it/8i48un
http://progogo.work/how-to-write-a-command-line-application-using-python-and-click
/r/Python
https://redd.it/8i48un
Boostlog
How to write a command-line application using Python and Click
I have always been fascinated by commandline.
I wanted to build a command-line application for myself. I had the idea, I knew
in which language I
I wanted to build a command-line application for myself. I had the idea, I knew
in which language I
Django Vs Rails
hi
i am interested in learning a framework for web. i have read that Django is more modern but rails is fast. it is not clear which one i should learn. rails has been around for a while now and people are saying it is dying. is this true?
i would love to know your opinions
/r/django
https://redd.it/8i5b0y
hi
i am interested in learning a framework for web. i have read that Django is more modern but rails is fast. it is not clear which one i should learn. rails has been around for a while now and people are saying it is dying. is this true?
i would love to know your opinions
/r/django
https://redd.it/8i5b0y
reddit
Django Vs Rails • r/django
hi i am interested in learning a framework for web. i have read that Django is more modern but rails is fast. it is not clear which one i should...
Django Tutuorial 03: More Views, and CSS
https://youtu.be/MSYcVKUy_eU
/r/djangolearning
https://redd.it/8i2kg1
https://youtu.be/MSYcVKUy_eU
/r/djangolearning
https://redd.it/8i2kg1
YouTube
Django Tutuorial 03: More Views, and CSS
We build another view and apply a CSS framework. Learn from my mistakes!
Help with wtforms and socketio/session data
Hi, I’m new to flask and web development. I’m building my first web app with flask and loving it, learning a lot. My web app allows people to join groups and chat with each other on the specific group page. Wondering what is a good way to pass the username back to client with the message? Or should I put the username in the html (I have it as a variable in the view function), and then try to access it in my jquery script?
Also, I have a basic question about wtforms classes. I am currently using the Form class but am interested in the FlaskForm class. It seems from what I’ve read that FlaskForm offers more. Just interested in the difference/benefits of either.
/r/flask
https://redd.it/8gacsp
Hi, I’m new to flask and web development. I’m building my first web app with flask and loving it, learning a lot. My web app allows people to join groups and chat with each other on the specific group page. Wondering what is a good way to pass the username back to client with the message? Or should I put the username in the html (I have it as a variable in the view function), and then try to access it in my jquery script?
Also, I have a basic question about wtforms classes. I am currently using the Form class but am interested in the FlaskForm class. It seems from what I’ve read that FlaskForm offers more. Just interested in the difference/benefits of either.
/r/flask
https://redd.it/8gacsp
reddit
Help with wtforms and socketio/session data • r/flask
Hi, I’m new to flask and web development. I’m building my first web app with flask and loving it, learning a lot. My web app allows people to...
Post your Flask questions : Miguel Grinberg's Flask Webcast is LIVE
https://www.youtube.com/watch?v=Z4X5Oddhcc8
/r/flask
https://redd.it/8dwyio
https://www.youtube.com/watch?v=Z4X5Oddhcc8
/r/flask
https://redd.it/8dwyio
YouTube
Flask Webcast #2: Request and Application Contexts
Join me for a live session in which I'll discuss the Flask contexts and the very confusing errors that these can cause when used incorrectly. After the session I will answer your questions and give away some books!
Building a notification system part 3: Dropbox
https://smetj.net/building_a_notification_system_part_3_dropbox.html
/r/Python
https://redd.it/8i85jj
https://smetj.net/building_a_notification_system_part_3_dropbox.html
/r/Python
https://redd.it/8i85jj
Project site of Jelle Smet
Building a notification system part 3: Dropbox
Dropbox is a file hosting service operated by American company Dropbox, Inc., headquartered in San Francisco, California, that offers cloud storage, file synchronization, personal cloud, and client software. In this article we will cover how to integrate…
Air pollution analysis with pandas
Hi,
I have started a project where I try to analyse air pollution data from monitoring sites in Munich, Germany. Anybody knows of publicly accessible air quality analysis using python/pandas? My initial scripts:
https://github.com/jsln/aq-sensor-data-analysis
I want to extract as much information as I can from the samples before attempting to use scikit-learn to:
- Compare the performance of different forecasting models.
- Study correlations between samples at different monitoring stations.
Any work in this area you can point me at, I would appreciate it.
Thanks,
Juan.
/r/pystats
https://redd.it/8i8fhe
Hi,
I have started a project where I try to analyse air pollution data from monitoring sites in Munich, Germany. Anybody knows of publicly accessible air quality analysis using python/pandas? My initial scripts:
https://github.com/jsln/aq-sensor-data-analysis
I want to extract as much information as I can from the samples before attempting to use scikit-learn to:
- Compare the performance of different forecasting models.
- Study correlations between samples at different monitoring stations.
Any work in this area you can point me at, I would appreciate it.
Thanks,
Juan.
/r/pystats
https://redd.it/8i8fhe
GitHub
jsln/aq-sensor-data-analysis
aq-sensor-data-analysis - Air quality sensor analysis with pandas and python, using data from Munich, Germany.
[Code Review] I'm working on a vinyl trading API and it's currently WIP but I'd like some feedback.
Link: https://github.com/mabbie/vinylhandelsclub-api
I still have ways to go before the project is complete, mainly security and handling logging in and out users. But so far, how am I doing? I used Flask-RESTful to build the API, and Flask-JWT-Extended for JWT authentication.
/r/flask
https://redd.it/8dzhyb
Link: https://github.com/mabbie/vinylhandelsclub-api
I still have ways to go before the project is complete, mainly security and handling logging in and out users. But so far, how am I doing? I used Flask-RESTful to build the API, and Flask-JWT-Extended for JWT authentication.
/r/flask
https://redd.it/8dzhyb
GitHub
mabbie/vinylhandelsclub-api
vinylhandelsclub-api - (WIP) A vinyl trading club API built using Flask.
Humble Bundle Python dev kit - charity
https://www.humblebundle.com/software/python-dev-kit-bundle?hmb_source=humble_home&hmb_medium=product_tile&hmb_campaign=mosaic_section_1_layout_index_2_layout_type_twos_tile_index_2
/r/django
https://redd.it/8i5po0
https://www.humblebundle.com/software/python-dev-kit-bundle?hmb_source=humble_home&hmb_medium=product_tile&hmb_campaign=mosaic_section_1_layout_index_2_layout_type_twos_tile_index_2
/r/django
https://redd.it/8i5po0
Humble Bundle
Humble Software Bundle: Python Dev Kit
Pay what you want for a bundle of Python resources and support charity!
Is anybody doing qualitative data analysis in Jupyter / IPython?
For R there is the RQDA package and a number of other tools related to qualitative data analysis. There are very few IPython notebooks on the web that deal with qualitative sociological approaches, but most of them are undocumented.
Therefore my question: is anybody doing a qualitative project in a Jupyter notebook? Would you like to present it here and post a short description of what it is about?
/r/IPython
https://redd.it/8i3r72
For R there is the RQDA package and a number of other tools related to qualitative data analysis. There are very few IPython notebooks on the web that deal with qualitative sociological approaches, but most of them are undocumented.
Therefore my question: is anybody doing a qualitative project in a Jupyter notebook? Would you like to present it here and post a short description of what it is about?
/r/IPython
https://redd.it/8i3r72
reddit
Is anybody doing qualitative data analysis in Jupyter... • r/IPython
For R there is the RQDA package and a number of other tools related to qualitative data analysis. There are very few IPython notebooks on the web...
[R] Holy shit you guys, the new google assistant is incredible.
https://youtu.be/pKVppdt_-B4
/r/MachineLearning
https://redd.it/8i3zll
https://youtu.be/pKVppdt_-B4
/r/MachineLearning
https://redd.it/8i3zll
YouTube
Google Assistant making a phone call
From Google I/O'18
This is really some fascinating stuff.
This is really some fascinating stuff.