Subscribe: Planet Python
Added By: Feedage Forager Feedage Grade B rated
Language: English
application  code  django  install  integration toolkit  issue  labview  pycon  python integration  python  sessions  version  work 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Planet Python

Planet Python

Planet Python -


Nikola: Nikola v7.8.6 is out!

Fri, 26 May 2017 13:49:38 +0000

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.8.6. It fixes some bugs and adds new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website:


Install using pip install Nikola or download tarballs on GitHub and PyPI.

Or if you prefer, Snapcraft packages are now built automatically, and Nikola v7.8.6 will be available in the stable channel.



  • Guess file format from file name on new_post (Issue #2798)
  • Use BaguetteBox as lightbox in base theme (Issue #2777)
  • New deduplicate_ids filter, for preventing duplication of HTML id attributes (Issue #2570)
  • Ported gallery image layout to base theme (Issue #2775)
  • Better error handling when posts can't be parsed (Issue #2771)
  • Use .theme files to store theme metadata (Issue #2758)
  • New add_header_permalinks filter, for Sphinx-style header links (Issue #2636)
  • Added alternate links for gallery translations (Issue #993)


  • Use locale.getdefaultlocale() for better locale guessing (credit: @madduck)
  • Save dependencies for template hooks properly (using .__doc__ or .template_registry_identifier for callables)
  • Enable larger panorama thumbnails (Issue #2780)
  • Disable archive_rss link handler, which was useless because no such RSS was ever generated (Issue #2783)
  • Ignore files ending wih "bak" (Issue #2740)
  • Use page.tmpl by default, which is inherited from story.tmpl (Issue #1891)


  • Limit Jupyter support to notebook >= 4.0.0 (it already was in requirements-extras.txt; Issue #2733)

EuroPython Society: EuroPython 2017: Full session list online

Fri, 26 May 2017 11:26:04 +0000

After the final review round, we are now happy to announce the complete list of more than 200 accepted sessions.EuroPython 2017 Session ListHere’s what we have on offer:5 keynotes157 talks20 trainings10 posters4 interactive sessions5 help desks2 EuroPython sessionsfor a total of 203 sessions, arranged in 5 tracks from Monday, July 10, thru Friday, July 14, in addition to the Beginners’ Day and Django Girls workshops on Sunday, July 9, and the Sprints on the weekend July 15-16. Please see the session list for details and abstracts. In case you wonder what   poster, interactive and help desk sessions are, please check the call for proposals.  Additional help desk slots availableWe have 5 additional help desk slots available. If you are interested in arranging one, please see our Call for Proposals for details and contact to submit your proposal. Organizers of help desks are eligible for a 25% ticket discount. Schedule to be announced next weekOur program work group is now working hard on scheduling all these sessions. We expect to announce the final schedule by the end of next week.We will use the same conference schedule layout as in previous years:Sunday, July 9: Beginners’ Day and Django Girls workshops; registration desk opens Monday - Friday, July 10-14: Conference talks, trainings, keynotes, help desks, interactive sessions, etc. Saturday - Sunday, July 15-16: Sprints A typical conference day will open the venue at 08:30, have the first session around 09:00 and end at 18:30. Lunch breaks are scheduled for around 13:15. Please note that we don’t serve breakfast.Aside: If you haven’t done yet, please get your EuroPython 2017 ticket soon. We will switch to on-desk rates in June, which will cost around 30% more than the regular rates. Enjoy,–EuroPython 2017 TeamEuroPython SocietyEuroPython 2017 Conference [...]

EuroPython: EuroPython 2017: Full session list online

Fri, 26 May 2017 11:18:00 +0000

After the final review round, we are now happy to announce the complete list of more than 200 accepted sessions.EuroPython 2017 Session ListHere’s what we have on offer:5 keynotes157 talks20 trainings10 posters4 interactive sessions5 help desks2 EuroPython sessionsfor a total of 203 sessions, arranged in 5 tracks from Monday, July 10, thru Friday, July 14, in addition to the Beginners’ Day and Django Girls workshops on Sunday, July 9, and the Sprints on the weekend July 15-16. Please see the session list for details and abstracts. In case you wonder what   poster, interactive and help desk sessions are, please check the call for proposals.  Additional help desk slots availableWe have 5 additional help desk slots available. If you are interested in arranging one, please see our Call for Proposals for details and contact to submit your proposal. Organizers of help desks are eligible for a 25% ticket discount. Schedule to be announced next weekOur program work group is now working hard on scheduling all these sessions. We expect to announce the final schedule by the end of next week.We will use the same conference schedule layout as in previous years:Sunday, July 9: Beginners’ Day and Django Girls workshops; registration desk opens Monday - Friday, July 10-14: Conference talks, trainings, keynotes, help desks, interactive sessions, etc. Saturday - Sunday, July 15-16: Sprints A typical conference day will open the venue at 08:30, have the first session around 09:00 and end at 18:30. Lunch breaks are scheduled for around 13:15. Please note that we don’t serve breakfast.Aside: If you haven’t done yet, please get your EuroPython 2017 ticket soon. We will switch to on-desk rates in June, which will cost around 30% more than the regular rates. Enjoy,–EuroPython 2017 TeamEuroPython SocietyEuroPython 2017 Conference [...]

Django Weekly: DjangoWeekly Issue 41 - Django Admin Customisation Video, Deployment, Pros and Cons of Django

Fri, 26 May 2017 09:00:15 +0000

Worthy ReadDjango Admin Basics and Beyond - PyCon 2017 ( Kenneth Love )Django's admin is a great tool but it isn't always the easiest or friendliest to set up and customize. The ModelAdmin class has a lot of attributes and methods to understand and come to grips with. On top of these attributes, the admin's inlines, custom actions, custom media, and more mean that, really, you can do anything you need with the admin...if you can figure out how. The docs are good but leave a lot to experimentation and the code is notoriously dense. In this tutorial, you'll learn the basics of setting up the admin so you can get your job done. Then we'll dive deeper and see how advanced features like autocomplete, Markdown editors, image editors, and others would be added to make the admin really shine. adminFind Top DevelopersWe help companies like Airbnb, Pfizer, and Artsy find great developers. Let us find your next great hire. Get started today. sponsorSimple is Better Than Complex: How to Deploy a Django Application on RHEL 7In this tutorial, you will learn how to deploy a Django application with PostgreSQL, Nginx, Gunicorn on a Red Hat Enterprise Linux (RHEL) version 7.3. For testing purpose I’m using an Amazon EC2 instance running RHEL 7.3. installation3 Reasons to Upgrade to the Latest Version of DjangoIt helps to have an understanding of why upgrading the backend should be considered a necessary part of any website upgrade project. We offer 3 reasons, focusing on our specialty of Django-based websites. Increases security, reduces development and maintenance costs, and ensures support for future growth. core-djangoRollbarKnow when and why code breaks: Users finding bugs? Searching logs for errors? Find + fix broken code fast! sponsorAdvantages and Disadvantages of Djangocore-djangoDjango Long Running ProcessesThe most commonly suggested solution for long running processes is to use Celery. I suspect that if you need scalabilty or high volume, etc… Celery is the best solution. That said, I have been down the Celery rabbit hole more than once. It has never been pleasant. Since my needs are more modest, maybe there is a better alternative? redisThrottling Specific Actions in Django Rest Framework ViewsetsIf you are using rate limiting with Django Rest Framework you probably already know that it provides some pretty simple methods for setting global rate limits using DEFAULT_THROTTLE_RATES. You can also set rate limits for specific views using the throttle_classes property on class-based views or the @throttle_classes decorator for function based views. DRFDanielle Madeley: PostgreSQL date ranges in Django formsDjango’s postgres extensions support data types like DateRange which is super useful when you want to query your database against dates, however they have no form field to expose this into HTML. Handily Django 1.11 has made it super easy to write custom widgets with complex HTML. postgres, DateRangeDjango: Building REST APIsDRF Projectsdrf-swagger-customization - 4 Stars, 0 ForkThis is a django app which you can modify and improve your autogenerated swagger documentation from your drf API.Django-REST-Boilerplate - 0 Stars, 0 ForkBoilerplate for Django projects using Django REST Framework.[...]

Import Python: ImportPython Issue 126 - Pycon US Videos, PYPI, SQLAlchemy, Debugging, Mocking and more

Fri, 26 May 2017 08:55:48 +0000

Worthy Read PyCon 2017 Videos are Up on YouTube Videos of the just concluded Pycon US 2017. pyconus, pycon How to get PyPI download statistics? This is a short post on how to get download statistics about any package from PyPI. Though there have been efforts in that direction from sites like pypi ranking but this post finds a better solution. Google has been generous enough to donate it’s Big Query capacity to the Python Software Foundation. You can access the pypi downloads table through the Big Query console. I ran a sample query to find out how my personal package arachne has been doing on PyPI. bigquery, pipy Introduction to SQLAlchemy - Agiliq Blog The breadth of SQLAlchemy’s SQL rendering engine, DBAPI integration, transaction integration, and schema description services are documented here. In contrast to the ORM’s domain-centric mode of usage, the SQL Expression Language provides a schema-centric usage paradigm. SQLAlchemy Know when and why code breaks Users finding bugs? Searching logs for errors? Find + fix broken code fast! sponsor [...]

Catalin George Festila: OpenGL and OpenCV with python 2.7 - part 005.

Fri, 26 May 2017 08:46:54 +0000

In this tutorial I will show you how to mount OpenCV in the Windows 10 operating system with any python version.
You can use the same steps for other versions of python.
Get the wheel binary package opencv_python- from here.

C:\Python27>cd Scripts

C:\Python27\Scripts>pip install opencv_python-
Processing c:\python27\scripts\opencv_python-
Requirement already satisfied: numpy>=1.11.1 in c:\python27\lib\site-packages (from opencv-python==
Installing collected packages: opencv-python
Successfully installed opencv-python-

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Let's test it with default source code:

>>> import cv2
>>> dir(cv2)
Now we can test this python script example with PyQt4 python module and cv2.resize function very easy.
The example load a image with PyQt4 python module.
from PyQt4.QtGui import QApplication, QWidget, QVBoxLayout, QImage, QPixmap, QLabel, QPushButton, QFileDialog
import cv2
import sys
app = QApplication([])
window = QWidget()
layout = QVBoxLayout(window)
display = QLabel()
width = 600
height = 400
display.setMinimumSize(width, height)
button = QPushButton('Load', window)

def read_image():
path = QFileDialog.getOpenFileName(window)
if path:
print str(path)
picture = cv2.imread(str(path))
if picture is not None:
print width, height
picture = cv2.resize(picture, (width, height))
image = QImage(picture.tobytes(), # The content of the image
picture.shape[1], # The width (number of columns)
picture.shape[0], # The height (number of rows)
QImage.Format_RGB888) # The image is stored in 3*8-bit format


See the result for this python script:

Robin Parmar: Arduino IDE: Best practices and gotchas

Fri, 26 May 2017 04:17:13 +0000

Programming for the Arduino is designed to be easy for beginners. The Integrated Development Environment (IDE) provides a safe place to write code, and handles the make and compiler steps that are required to create processor instructions from your C++ code. This is fine for trivial applications and school exercises. But as soon as you try to use structured code (including classes and custom libraries) on a larger project, mysterious errors and roadblocks become the order of the day.This article will consider best practices for working within the IDE. I will document a number of common errors and their workarounds. My perspective is of an experienced Python coder who finds C++ full of needless obfuscation. But we can make it work!Why not switch?On encountering limitations with the Arduino IDE, the natural thing to do is switch to a mature development environment. For example, you could use Microsoft Visual Studio by way of Visual Micro, a plugin that enables Arduino coding. Or, use Eclipse with one of several available plugins: Sloeber, PlatformIO, or AVR-eclipse.But there are cases when it is advantageous to stick with the Arduino IDE. For example, I might be working on a team with other less-experienced developers. While I might wish to carry the cognitive burden of Eclipse plus plugins plus project management, they might not. Or I could be in a teaching environment where my code must be developed with the same tools my students will be using.Language features... and what's missingThe Arduino IDE gives you many basic C++ language features plus hardware-specific functions. Control structures, values, and data types are documented in the Reference. But you don't get modern features such as the Standard Template Library (STL). If you want to use stacks, queues, lists, vectors, etc. you must install a library. Start with those by Marc Jacobi (last updated 2 years ago) and Andy Brown (updated 1 year ago). I am sure there are plenty of articles discussing the relative merits of these or other solutions. You also don't get new and delete operators, and there's good reason. Dynamic memory management is discouraged on microprocessor boards, since RAM and other resources are limited. There are libraries that add these to your toolkit, but the IDE encourages us to use C++ as though it was little more than plain vanilla C. It can be frustrating, but my advice is to adapt. Code structureAs you know, when using the Arduino IDE you start coding with a sketch that is your application's entry point. As an example, I'll use project.ino.Inside this file are always two functions, setup() and loop(). These take no parameters and return no values. There's not much you can do with them... except populate them with your code. These functions are part of an implicit code structure that could be written as follows: void main() { // declaration section setup(); // initialisation (runs once) while (true) { loop(); // process-oriented code (runs forever) }}In the IDE you never see the main() function and neither can you manipulate it.Declaration sectionThe declaration section comes at the top of your project.ino. It is effectively outside any code block. Yes, even though it is in an implicit main() function. This means that only declarations and initializations are valid here. You cannot call methods of a class, nor access properties. This is our first rule:Rule 1. The declaration section should contain only includes, initialisations of variables, and instantiations of classes.This restriction can result in subtle errors when using classes. The declaration section is naturally where you will be instantiating classes you wish to use throughout the sketch. This means that the same restrictions just stated must apply to each and every class constructor. For this reason, you cannot use instances or methods of other classes in a constructor. No, no[...]

Full Stack Python: Responsive Bar Charts with Bokeh, Flask and Python 3

Fri, 26 May 2017 04:00:00 +0000

Bokeh is a powerful open source Python library that allows developers to generate JavaScript data visualizations for their web applications without writing any JavaScript. While learning a JavaScript-based data visualization library like d3 can be useful, it's often far easier to knock out a few lines of Python code to get the job done. With Bokeh, we can create incredibly detailed interactive visualizations, or just traditional ones like the following bar chart. Let's use the Flask web framework with Bokeh to create custom bar charts in a Python web app. Our Tools This tutorial works with either Python 2 or 3, but Python 3 is strongly recommended for new applications. I used Python 3.6.1 while writing this post. In addition to Python throughout this tutorial we will also use the following application dependencies: Flask web framework, version 0.12.2 Bokeh data visualization library, version 0.12.5 pandas data structures and analysis library, version 0.20.1 pip and virtualenv, which come packaged with Python 3, to install and isolate the Flask, Bokeh, and pandas libraries from any other Python projects you might be working on If you need help getting your development environment configured before running this code, take a look at this guide for setting up Python 3 and Flask on Ubuntu 16.04 LTS All code in this blog post is available open source under the MIT license on GitHub under the bar-charts-bokeh-flask-python-3 directory of the blog-code-examples repository. Use and abuse the source code as you like for your own applications. Installing Bokeh and Flask Create a fresh virtual environment for this project to isolate our dependencies using the following command in the terminal. I typically run this command within a separate venvs directory where all my virtualenvs are store. python3 -m venv barchart Activate the virtualenv. source barchart/bin/activate The command prompt will change after activating the virtualenv: Keep in mind that you need to activate the virtualenv in every new terminal window where you want to use the virtualenv to run the project. Bokeh and Flask are installable into the now-activated virtualenv using pip. Run this command to get the appropriate Bokeh and Flask versions. pip install bokeh==0.12.5 flask==0.12.2 pandas==0.20.1 After a brief download and installation period our required dependencies should be installed within our virtualenv. Look for output like the following to confirm everything worked. Installing collected packages: six, requests, PyYAML, python-dateutil, MarkupSafe, Jinja2, numpy, tornado, bokeh, Werkzeug, itsdangerous, click, flask, pytz, pandas Running install for PyYAML ... done Running install for MarkupSafe ... done Running install for tornado ... done Running install for bokeh ... done Running install for itsdangerous ... done Successfully installed Jinja2-2.9.6 MarkupSafe-1.0 PyYAML-3.12 Werkzeug-0.12.2 bokeh-0.12.5 click-6.7 flask-0.12.2 itsdangerous-0.24 numpy-1.12.1 pandas-0.20.1 python-dateutil-2.6.0 pytz-2017.2 requests-2.14.2 six-1.10.0 tornado-4.5.1 Now we can start building our web application. Starting Our Flask App We are going to first code a basic Flask application then add our bar chart to the rendered page. Create a folder for your project then within it create a file named with the following initial contents: from flask import Flask, render_template app = Flask(__name__) @app.route("//") def chart(bars_count): if bars_count <= 0: bars_count = 1 return render_template("chart.html", bars_count=bars_count) if __name__ == "__main__": The above code is a short one-route Flask application that defines the chart function. chart takes in an arbitrary integer a[...]

Programming Ideas With Jake: Lots of Programming Videos!

Thu, 25 May 2017 21:53:57 +0000

A whole bunch of videos have recently dropped from programmer conferences. Like, a LOT!(image)

PyBites: How to Write a Python Class

Thu, 25 May 2017 13:44:49 +0000

In this post I cover learning Python classes by walking through one of our 100 days of code submissions.

Python Bytes: #27 The PyCon 2017 recap and functional Python

Thu, 25 May 2017 08:00:00 +0000

  • All videos available:
  • Lessons learned:
    • pick up swag on day one. vendors run out.
    • take business cards with you and keep them on you
    • Not your actual business cards unless you are representing your company.
    • Cards that have your social media, github account, blog, or podcast or whatever on them.
    • 3x3 stickers are too big. 2x2 plenty big enough
    • lightening talks are awesome, because they are a lot of ranges of speaking experience
    • will definitely do that again
    • try to go to the talks that are important to you, but don’t over stress about it, since they are taped. However, it would be lame if all the rooms were empty, so don’t everybody ditch.
    • lastly: everyone knows Michael.

Michael #2: How to Create Your First Python 3.6 AWS Lambda Function

  • Tutorial from Full Stack Python
  • Walks you through creating an account
  • Select your Python version (3.6, yes!)
  • def lambda_handler(event, context): … # write this function, done!
  • Set and read environment variables (could be connection strings and API keys)

Brian #3: How to Publish Your Package on PYPI

  • jetbrains article
    • structure of the package
    • oops. doesn't include src, see
    • decent discussion of a the contents of the file (but interestingly absent is an example file)
    • good discussion of .pypirc file and links to the test and production PyPi
    • example of using twine to push to PyPI
    • overall: good discussion, but you'll still need a decent example.

Michael #4: Coconut: Simple, elegant, Pythonic functional programming

  • Coconut is a functional programming language that compiles to Python.
  • Since all valid Python is valid Coconut, using Coconut will only extend and enhance what you're already capable of in Python.
  • pip install coconut
    1. Some of Coconut’s major features include built-in, syntactic support for:
    2. Pattern-matching,
    3. Algebraic data-types,
    4. Tail call optimization,
    5. Partial application,
    6. Better lambdas,
    7. Parallelization primitives, and
    8. A whole lot more, all of which can be found in Coconut’s detailed documentation.
  • Talk Python episode coming in a week

Brian #5:

Experienced Django: Return of pylint

Thu, 25 May 2017 01:22:48 +0000

Until last fall I was working in python 2 (due to some limitations at work) and was very happy to have the Syntastic module in my Vim configuration to flag error each time I save a python file.  This was great, especially after writing in C/C++ for years where there is no official standard format and really poor tools to enforce coding standards.

Then, last fall when I started on Django, I made the decision to move to Python 3.  I quickly discovered that pylint is very version-dependent and running the python2.7 version of pylint against Python3 code was not going to work.

I wasn’t particularly familiar with virtualenv at the time, so I gave up and moved on with other things at the time.  I finally got back to fixing this and thus getting pylint and flake8 running again on my code.


I won’t cover the details of how to install Syntastic as it depends on how you manage your plugins in Vim and is well documented.  I will only point out here that Syntastic isn’t a checker by itself, it’s merely a plugin to run various checkers for you directly in Vim.  It run checkers for many languages, but I’m only using it for Python currently as the C code I use for work is so ugly that it will never pass.

Switching versions

The key to getting pylint to run against different versions of python is to not install pylint on a global level, but rather to install it in each virtualenv.  This seems obvious now that I’m more familiar with virtualenv, but I’ll admit it wasn’t at the time I first ran into the problem.

The other key to getting this to work is to only initiate Vim from inside the virtualenv.  This hampers my overall workflow a bit, as I tend to have gVim up and running for the long-term and just add files in new tabs as I go.  To get pylint to work properly, I’ll need to restart Vim when I switch python versions (at a minimum).  This shouldn’t be too much of a problem, however, as I’m doing less and less python2x coding these days.

Coding Style Thoughts

As I beat my head against horrible C code on a daily basis at work, I find myself appreciating more-and-more the idea of PEP-8 and having good tools for coding style enforcement.  While I frequently find some of the rules odd (two spaces here, but only one space there?) I really find it comforting to have a tool which runs, and runs quickly, to keep the code looking consistent.  Now if I could only get that kind of tool for C…….


Daniel Bader: In Love, War, and Open-Source: Never Give Up

Thu, 25 May 2017 00:00:00 +0000

In Love, War, and Open-Source: Never Give Up I’ll never forget launching my first open-source project and sharing it publicly on Reddit… I had spent a couple of days at my parents’ place over Christmas that year and decided to use some of my spare time to work on a Python library I christened schedule. The idea behind schedule was very simple and had a narrow focus (I find that that that’s always a good idea for libraries by the way): Developers would use it like a timer to periodically call a function inside their Python programs. The kicker was that schedule used a funky “natural sounding” syntax to specify the timer interval. For example, if you wanted to run a function every 10 minutes you’d do this: schedule.every(10) Or, if you wanted to run a particular task every day at 10:30 in the morning, you’d do this: schedule.every()'10:30').do(mytask) Because I was so frustrated with Cron’s syntax I thought this approach was really cool. And so I decided this would be the first Python module I’d release as open-source. I cleaned up the code and spent some time coming up with a nice README file—because that’s really the first thing that your potential users will see when they check out your library. Once I had my module available on PyPI and the source code on GitHub I decided to call some attention to the project. The same night I posted a link to the repository to Reddit and a couple of other sites. I still remember that I had shaky hands when I clicked the “submit” button… It’s scary to put your work out there for the whole world to judge! Also, I didn’t know what to expect. Would people call me stupid for writing a “simple” library like that? Would they think my code wasn’t good enough? Would they find all kinds of bugs and publicly shame me for them? I felt almost a physical sense of dread about pushing the “submit” button on Reddit that night! The next morning I woke up and immediately checked my email. Were there any comments? Yes, about twenty or so! I started reading through all of them, faster and faster— And of course my still frightful mind immediately zoomed in on the negative ones, like “Cool idea, but not particularly useful”, and “The documentation is not enough”, or “Not a big fan of the pseudo-english syntax. Way too clever and gimmicky.” At this point I was starting to feel a little discouraged… I’d never really shared my code publicly before and to be honest I my skin receiving criticism on it was paper thin. After all, this was just something I wrote in a couple of hours and gave away for free. The comment that really made my stomach churn was one from a well known member of the Python community: “And another library with global state :-( … Such an API should not even exist. It sets a bad example.” Ouch, that stung. I really looked up to that person and had used some of their libraries in other projects… It was almost like my worst fears we’re confirmed and we’re now playing out in front of me! I’d never be able to get another job as a Python developer after this… At the time I didn’t see the positive and supportive comments in that discussion thread. I didn’t see the almost 70 upvotes. I didn’t see the valuable lessons hidden in the seemingly rude comments. I dwelled on the negative and felt terrible and depressed that whole day. So how do you think this story ends? Did I delete the schedule repo, switched careers and never looked at Reddit again? Wrong! schedule now has almost 3,000 stars on GitHub and is among the top 70 Python repositories (out of more than 215,000). When PyPI’s download statistics we’re still working I saw that it got several thousa[...]

Filipe Saraiva: LaKademy 2017

Wed, 24 May 2017 20:37:06 +0000

LaKademy 2017 group photo Some weeks ago we had the fifth edition of the KDE Latin-America summit, LaKademy. Since the first edition, KDE community in Latin-America has grown up and now we has several developers, translators, artists, promoters, and more people from here involved in KDE activities. This time LaKademy was held in Belo Horizonte, a nice city known for the amazing cachaça, cheese, home made beers, cheese, hills, and of course, cheese. The city is very cosmopolitan, with several options of activities and gastronomy, while the people is gentle. I would like to back to Belo Horizonte, maybe in my next vacation. LaKademy activites were held in CEFET, an educational technological institute. During the days of LaKademy there were political demonstrations and a general strike in the country, consequence of the current political crisis here in Brazil. Despite I support the demonstrations, I was in Belo Horizonte for event. So I focused in the tasks while in my mind I was side-by-side with the workers on the streets. Like in past editions I worked a lot with Cantor, the mathematical software I am the maintainer. This time the main tasks performed were an extensive set of reviews: revisions in pending patches, in the bug management system in order to close very old (and invalid) reports, and in the task management workboard, specially to ping developers with old tasks without any comment in the last year. There were some work to implement new features as well. I finished a backends refactoring in order to provide a recommended version of the programming language for each backend in Cantor. How each programming language has its own planning and scheduling, it is common some programming language version not be correctly supported in a Cantor backend (Sage, I am thinking you). This feature presents a “recommended” version of the programming language supported for the Cantor backend, meaning that version was tested and it will work correctly with Cantor. It is more like a workaround in order to maintain the sanity of the developer while he try to support 11 different programming languages. Other feature I worked but it is not finished is a option to select different LaTeX processors in Cantor. Currently there are several LaTeX processors available (like pdflatex, pdftex, luatex, xetex, …), some of them with several additional features. This option will increased the versatility of Cantor and will allow the use of moderns processors and their features in the software. I addition to these tasks I fixed some bugs and helped Fernando Telles, my past SoK student, with some tasks in Cantor. (Like in past editions)², in LaKademy 2017 I also worked in other set of tasks related to the management and promotion of KDE Brazil. I investigated how to bring back our unified feed with Brazilian blogs posts as in the old Planet KDE Português, utilized to send updates about KDE in Brazil to our social networks. Fred implemented the solution. So I updated this feed in social networks, updated our e-mail contact utilized in this networks, and started a bootstrap version of LaKademy website (but the team is migrating to WordPress, I think it will not be used). I also did a large revision in the tasks of KDE Brazil workboard, migrated past year from the TODO website. Besides all this we had the promo meeting to discuss our actions in Latin-America – all the tasks were documented in the workboard. Of course, just as we worked intensely in those days, we also had a lot of fun between a push and other. LaKademy is also a opportunity to find old friends and make new ones. It is amazing see again the KDE fellows, and I invite the newcomers to stay with us and go to ne[...]

EuroPython: EuroPython 2017: Social event tickets available

Wed, 24 May 2017 14:43:17 +0000

After trainings and talks, EuroPython is going (Coco)nuts! Join us for the EuroPython social event in Rimini, which will be held in the Coconuts Club on Thursday, July 13th. 

Tickets for the social event are not included in the conference ticket. They are now available in our ticket store (listed under ‘Goodies’) for the price of 25 €. The social event ticket includes an aperitivo buffet of Italian specialties, a choice of two drinks and a reserved area in the club from 19:00 to 22:00. The club will open to the general public after that. 

(image) (image)

Leave the conference tickets fields blank if you only want to purchase social event tickets.

Take this opportunity to network and socialize with other Python attendees and buy your social event ticket now on the registration page.



EuroPython 2017 Team
EuroPython Society
EuroPython 2017 Conference

Enthought: Enthought Receives 2017 Product of the Year Award From National Instruments LabVIEW Tools Network

Wed, 24 May 2017 13:42:05 +0000

Python Integration Toolkit for LabVIEW recognized for extending LabVIEW connectivity and bringing the power of Python to applications in Test, Measurement and the Industrial Internet of Things (IIoT) AUSTIN, TX – May 24, 2017 – Enthought, a global leader in scientific and analytic computing solutions, was honored this week by National Instruments with the LabVIEW Tools Network Platform Connectivity 2017 Product of the Year Award for its Python Integration Toolkit for LabVIEW. First released at NIWeek 2016, the Python Integration Toolkit enables fast, two-way communication between LabVIEW and Python. With seamless access to the Python ecosystem of tools, LabVIEW users are able to do more with their data than ever before. For example, using the Toolkit, a user can acquire data from test and measurement tools with LabVIEW, perform signal processing or apply machine learning algorithms in Python, display it in LabVIEW, then share results using a Python-enabled web dashboard. Click to see the webinar “Using Python and LabVIEW to Rapidly Solve Engineering Problems” to learn more about adding capabilities such as machine learning by extending LabVIEW applications with Python. “Python is ideally suited for scientists and engineers due to its simple, yet powerful syntax and the availability of an extensive array of open source tools contributed by a user community from industry and R&D,” said Dr. Tim Diller, Director, IIoT Solutions Group at Enthought. “The Python Integration Toolkit for LabVIEW unites the best elements of two major tools in the science and engineering world and we are honored to receive this award.” Key benefits of the Python Integration Toolkit for LabVIEW from Enthought: Click to see the webinar “Introduction to the Python Integration Toolkit for LabVIEW” to learn more about the fast, two-way communication between Python and LabVIEW. Enables fast, two-way communication between LabVIEW and Python Provides LabVIEW users seamless access to tens of thousands of mature, well-tested scientific and analytic software packages in the Python ecosystem, including software for machine learning, signal processing, image processing and cloud connectivity Speeds development time by providing access to robust, pre-developed Python tools Provides a comprehensive out-of-the box solution that allows users to be up and running immediately “Add-on software from our third-party developers is an integral part of the NI ecosystem, and we’re excited to recognize Enthought for its achievement with the Python Integration Toolkit for LabVIEW,” said Matthew Friedman, senior group manager of the LabVIEW Tools Network at NI. The Python Integration Toolkit is available for download via the LabVIEW Tools Network, and also includes the Enthought Canopy analysis environment and Python distribution. Enthought’s training, support and consulting resources are also available to help LabVIEW users maximize their value in leveraging Python. For more information on Enthought’s Python Integration Toolkit for LabVIEW, visit   Additional Resources Product Information Python Integration Toolkit for LabVIEW product page Download a free trial of the Python Integration Toolkit for LabVIEW Webinars Webinar: Using Python and LabVIEW to Rapidly Solve Engineering Problems | Enthought April 2017 Webinar: Introducing the New Python Integration Toolkit for LabVIEW from Enthought September 2016 About Enthought Enthought is a global leader in scientific and analytic software, consulting, and training solutions serving a customer base comprised of s[...]

Caktus Consulting Group: PyCon 2017 Recap

Wed, 24 May 2017 13:30:00 +0000

Caktus attended PyCon 2017 in Portland from May 18-21. It was the first PyCon for some, while others were PyCon veterans. All of us were looking forward to the opportunity to hear some great talks and make or renew connections in the Python community. Getting Set Up Right after arriving from the East Coast on Thursday it was time to set up for Day 1 of the expo. We eagerly prepared for the meet and greet opening night. Our Ultimate Tic Tac Toe game made a comeback this year with a new AI feature. We only had 2 winners, although one of them beat the AI four times! (Our developers think it’s time to turn the difficulty up to 11.) Meetings and Giveaways As expected, booth time was busy. It was exciting to welcome so many members of the Python community. We enjoyed chatting about what we do at Caktus and our work building web apps with Django, as well as making connections or meeting with people we haven’t seen in awhile. Mark was excited to catch up with Tom Christie of Django REST Framework. Best part of PyCon is being a shameless fanboy for those whose work makes my job easier ❤— Mark Lavin (@DrOhYes) May 20, 2017 In addition to Caktus swag, we had two prize giveaways on offer this year. The first one was a social contest on Twitter. Christine was our winner by random selection - congratulations! The second giveaway was a random drawing of people who signed up for our newsletter. Congratulations to Mike for winning that drawing. Lots to Talk About Six Caktus developers attended a variety of talks and came out of each of them feeling inspired by fresh ideas. Interesting idea from @_tomchristie: API mocking. Front End devs can get started immediately & this promotes API design first. #PyCon2017— Erin Mullaney (@_erin_rachel) May 20, 2017 I'm feeling inspired to contribute to some #OpenScience projects after outstanding keynotes by @jakevdp and @katyhuff at #PyCon2017— Jeff Bradberry (@jeff_bradberry) May 20, 2017 .@jsaryer demonstrating how mutation testing can prove that your "covered" code is actually being tested #pycon2017— Charlotte Mays (@charlottecodes) May 19, 2017 We can’t wait to see how they apply what they’ve learned to their work at Caktus. After-hours Event This year, Caktus hosted an exclusive, invite-only event at Fuse Bar. We were excited to welcome clients and special guests for sushi, nibbles, and refreshments. Some of our clients are based across the country from us, so it was nice to have the opportunity to catch up in person and mingle. Job Fair We spoke to lots of interested developers at the PyCon job fair on May 21st. Some of the most common questions we received - and their answers - are below. Question 1: Where is Caktus based? Our office is in a lovely brick building in downtown Durham, North Carolina. Question 2: What does Caktus do / What projects have you worked on? Caktus is a consultancy and development agency. Work primarily focuses on building custom web and SMS apps in Python, using the Django framework. Some of our projects include building the world’s first SMS-based voter registration system, a live event management app, and responsive, database-driven websites for clients in industries like food and beverage, travel and entertainment. We also do team augmentation and offer discovery workshops to help our clients strategically plan out the user experience and technical development aspects of their projects. To find out more about our specialties at Caktus, visit our Services page. Question 3: Do you have opportunities for remote work? We hire remotely for some contract work, but full-[...]

PyBites: PyCon 2017 - Digest, Impressions, Reflection

Wed, 24 May 2017 10:00:00 +0000

PyCon 2017 was such a great conference, I made so many good connections, got to see many good things the community is working on. It was very inspiring. In this article a digest.

NumFOCUS: Welcome Nancy Nguyen, the new NumFOCUS Events Coordinator!

Tue, 23 May 2017 16:48:50 +0000

NumFOCUS is pleased to announce Nancy Nguyen has been hired as our new Events Coordinator. Nancy has over five years of event management experience in the non-profit and higher education sectors. She graduated from The University of Texas at Austin in 2011 with a BA in History. Prior to joining NumFOCUS, Nancy worked in development and fundraising […]

PyCharm: PyCharm 2017.1.3 Out Now!

Tue, 23 May 2017 16:44:12 +0000

We’re happy to announce that PyCharm 2017.1.3 is now available. You can get it now from our website, or using the updater in PyCharm.

Improvements since PyCharm 2017.1.2:

  • Test runner issues: django-nose tests, stdout from tests, and various other fixes
  • Pyramid project creation with Chameleon templates
  • The issue which caused our community edition installer for macOS to be unsigned has been fixed
  • An issue that caused PyCharm to freeze on startup has been resolved
  • Several bugs related to React support have been fixed
  • macOS terminal locale detection
  • As always, you can read the further details in the release notes

We’d like to thank the users who tried the EAP versions of this release for helping us make sure that this version of PyCharm is of the quality you expect from a JetBrains IDE.

If you’d like to see new PyCharm features before we release them, try out the EAP version of our next release.

PyCharm Team
-The Drive to Develop


codeboje: This Problem with PySide, Py2App and Brew drove me Nuts

Tue, 23 May 2017 15:33:05 +0000

I build several desktop applications using PySide. It works like a charm on Windows. However, I found a nasty bug in the Mac version which I could not reproduce on my local machine. This one drove me nuts. It was hard to analyze, I own just one Mac and do not have access to another machine. Luckily, with the help of some very long googling (guessing symptoms) and the help of a user of one of my applications, I could fix the issue. As a reminder for myself and help for you, I document it.


I build the application using PySide, Py2App and Python 3 on a Mac using a virtualenv. I used Brew for installing PySide and Python, and PySide was also installed inside my virutaenv.

The application builds and runs fine on my machine.

However, on a different Mac, the application crashed without any useful traces in the system logs.

My application also writes a separate log file, but this was empty. So it seemed like the application crashed before even reaching my code.

After some google and adjusting my log outputs, however, I found out that it started to execute my code and then crashed when initializing PySide.

First, I thought it was just a problem on this single users machine, but I got a similar bug report which gave me some hints it might be a general problem.

Now, better equipped I found the culprit after some additional googling.

The application could not load the QT binaries.

The problem is a combination of installing PySide and with Brew and using PySide inside a virtualenv. While building the application Py2App can't pick up the correct library path, and the generated application includes the libraries but with an incorrect path in the Mac specific descriptors.

otool -L /Contents/Resources/lib/python3.4/lib-dynload/PySide/

It should list the file with @executable_path and not with an absolute path only valid for your machine.

In my case, the binaries were referenced by absolute paths which were of course not valid on someone else machine.


I do not know who exactly is causing this issue, but the following workaround did help me.

  • Deinstall Python and PySide
  • Deinstall Brew
  • Install Macport
  • Install Python and PySide with Macport
  • PySide is installed in the main python site-packages
  • Create a new virutalenv and let it use the main site-packages

And then continue building the application as before. This time the lib references were fine in the application.

Guess what?

It worked now. Yippie.

Chris Moffitt: How Accurately Can Prophet Project Website Traffic?

Tue, 23 May 2017 12:05:00 +0000

Introduction In early March, I published an article introducing prophet which is an open source library released by Facebook that is used to automate the time series forecasting process. As I promised in that article, I’m going to see how well those predictions held up to the real world after 2.5 months of traffic on this site. Getting Started Before going forward, please review the prior article on prophet. I also encourage you to review the matplotlib article which is a useful starting point for understanding how to plot these trends. Without further discussion, let’s dive into the code. If you wish to follow along, the notebook is posted on github. First, let’s get our imports setup, plotting configured and the forecast data read into our DataFrame: import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline'ggplot') proj = pd.read_excel('') proj[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].head() The projected data is stored in the proj DataFrame. There are many columns but we only care about a couple of them: ds yhat yhat_lower yhat_upper 0 2014-09-25 3.294797 2.770241 3.856544 1 2014-09-26 3.129766 2.564662 3.677923 2 2014-09-27 3.152004 2.577474 3.670529 3 2014-09-28 3.659615 3.112663 4.191708 4 2014-09-29 3.823493 3.279714 4.376206 All of the projections are based on the log scale so we need to convert them back and filter through May 20th: proj["Projected_Sessions"] = np.exp(proj.yhat).round() proj["Projected_Sessions_lower"] = np.exp(proj.yhat_lower).round() proj["Projected_Sessions_upper"] = np.exp(proj.yhat_upper).round() final_proj = proj[(proj.ds > "3-5-2017") & (proj.ds < "5-20-2017")][["ds", "Projected_Sessions_lower", "Projected_Sessions", "Projected_Sessions_upper"]] Next, I’ll read in the actual traffic from March 6th through May 20th and rename the columns for consistency sake: actual = pd.read_excel('Traffic_20170306-20170519.xlsx') actual.columns = ["ds", "Actual_Sessions"] actual.head() ds Actual_Sessions 0 2017-03-06 2227 1 2017-03-07 2093 2 2017-03-08 2068 3 2017-03-09 2400 4 2017-03-10 1888 Pandas makes combining all of this into a single DataFrame simple: df = pd.merge(actual, final_proj) df.head() ds Actual_Sessions Projected_Sessions_lower Projected_Sessions Projected_Sessions_upper 0 2017-03-06 2227 1427.0 2503.0 4289.0 1 2017-03-07 2093 1791.0 3194.0 5458.0 2 2017-03-08 2068 1162.0 1928.0 3273.0 3 2017-03-09 2400 1118.0 1886.0 3172.0 4 2017-03-10 1888 958.0 1642.0 2836.0 Evaluating the Results With the predictions and actuals in a single DataFrame, let’s see how far our projections were off from actuals by calculating the difference and looking at the basic stats. df["Session_Delta"] = df.Actual_Sessions - df.Projected_Sessions df.Session_Delta.describe() count 75.000000 mean 739.440000 std 711.001829 min -1101.000000 25% 377.500000 50% 619.000000 75% 927.000000 max 4584.000000 This gives us a basic idea of the errors but visualizing will be more useful. Let’s use the process described in the matplotlib article to plot the data. # Need to convert to just a date in order to keep plot from throwing errors df['ds'] = df['ds'] fig, ax = plt.subplots(figsize=(9, 6)) df.plot("[...]

Simple is Better Than Complex: How to Deploy a Django Application on RHEL 7

Tue, 23 May 2017 09:02:00 +0000

In this tutorial, you will learn how to deploy a Django application with PostgreSQL, Nginx, Gunicorn on a Red Hat Enterprise Linux (RHEL) version 7.3. For testing purpose I’m using an Amazon EC2 instance running RHEL 7.3. Recently I had to deploy an existing Django project running on Ubuntu 16.04 to a new environment, RHEL 7.3. It gave me some headache because I don’t have much server administration skills and I wasn’t familiar with Security Enhanced Linux (SELinux) distributions, so I thought about sharing the details of the deployment so it could help someone in the same position I was. If you are just getting started with Django deployment, and doesn’t have a good reason to be using RHEL, I suggest you use Ubuntu instead. It requires less configuration, and the process is fairly easier than using RHEL. Perhaps you could check this past tutorial: How to Deploy a Django Application to Digital Ocean. Anyway, for this tutorial I will deploy the following Django application: It is just an empty Django project to demonstrate the deployment process. So, every time you see urban-train, change it for your project name. Initial Setup First, let’s install all the needed resources and applications. Get started by installing git, gcc and python-virtualenv. Everything should be available in the yum repository. sudo yum -y install git gcc python-virtualenv Create a system user for the application: sudo groupadd --system urbantrain sudo useradd --system --gid urbantrain --shell /bin/bash --home /opt/urban-train urbantrain Create the Django project home inside /opt: sudo mkdir /opt/urban-train Give the permissions to the urbantrain user: sudo chown urbantrain:urbantrain /opt/urban-train PostgreSQL Server Now install PostgreSQL 9.6 server and development tools: sudo yum -y install sudo yum -y install postgresql96-server postgresql96-contrib postgresql96-devel Initialize the database: sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb Start and enable the PostgreSQL 9.6 service: sudo systemctl start postgresql-9.6 sudo systemctl enable postgresql-9.6 Log in with the postgres user: sudo su - postgres Create a database user, set a password (save it for later) and create a database for the Bootcamp application: createuser u_urban psql -c "ALTER USER u_urban WITH PASSWORD '123';" createdb --owner u_urban urban_prod Now we have to update the authentication method of the database user in the file pg_hba.conf: vi /var/lib/pgsql/9.6/data/pg_hba.conf Go to the bottom of the file, find this snippet: # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all peer # IPv4 local connections: host all all ident # IPv6 local connections: host all all ::1/128 ident # Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres peer #host replication postgres ident #host replication postgres ::1/128 ident Change the method from ident to md5 on the IPv4 and IPv6 rows: # TYPE DATABASE USER ADDRESS METH[...]

S. Lott: Python under XCode?!? Cool. Sort of.

Tue, 23 May 2017 08:00:29 +0000

(image) Dan Bader (@dbader_org)
"Running Python in Xcode: Step by Step"…

Thanks for the link. There's a fair amount of "this doesn't seem to be what Xcode was designed to do." But it does seem to work.

I'll stick with Komodo Edit.

Daniel Bader: The Meaning of Underscores in Python

Tue, 23 May 2017 00:00:00 +0000

The Meaning of Underscores in Python The various meanings and naming conventions around single and double underscores (“dunder”) in Python, how name mangling works and how it affects your own Python classes. Single and double underscores have a meaning in Python variable and method names. Some of that meaning is merely by convention and intended as a hint to the programmer—and some of it is enforced by the Python interpreter. If you’re wondering “What’s the meaning of single and double underscores in Python variable and method names?” I’ll do my best to get you the answer here. In this article I’ll discuss the following five underscore patterns and naming conventions and how they affect the behavior of your Python programs: Single Leading Underscore: _var Single Trailing Underscore: var_ Double Leading Underscore: __var Double Leading and Trailing Underscore: __var__ Single Underscore: _ At the end of the article you’ll also find a brief “cheat sheet” summary of the five different underscore naming conventions and their meaning, as well as a short video tutorial that gives you a hands-on demo of their behavior. Let’s dive right in! 1. Single Leading Underscore: _var When it comes to variable and method names, the single underscore prefix has a meaning by convention only. It’s a hint to the programmer—and it means what the Python community agrees it should mean, but it does not affect the behavior of your programs. The underscore prefix is meant as a hint to another programmer that a variable or method starting with a single underscore is intended for internal use. This convention is defined in PEP 8. This isn’t enforced by Python. Python does not have strong distinctions between “private” and “public” variables like Java does. It’s like someone put up a tiny underscore warning sign that says: “Hey, this isn’t really meant to be a part of the public interface of this class. Best to leave it alone.” Take a look at the following example: class Test: def __init__(self): = 11 self._bar = 23 What’s going to happen if you instantiate this class and try to access the foo and _bar attributes defined in its __init__ constructor? Let’s find out: >>> t = Test() >>> 11 >>> t._bar 23 You just saw that the leading single underscore in _bar did not prevent us from “reaching into” the class and accessing the value of that variable. That’s because the single underscore prefix in Python is merely an agreed upon convention—at least when it comes to variable and method names. However, leading underscores do impact how names get imported from modules. Imagine you had the following code in a module called my_module: # This is def external_func(): return 23 def _internal_func(): return 42 Now if you use a wildcard import to import all names from the module, Python will not import names with a leading underscore (unless the module defines an __all__ list that overrides this behavior): >>> from my_module import * >>> external_func() 23 >>> _internal_func() NameError: "name '_internal_func' is not defined" By the way, wildcard imports should be avoided as they make it unclear which names are present in the namespace. It’s better to stick to regular imports for the sake of clarity. Unlike wildcard imports, regular im[...]