skip to navigation
skip to content

Planet Python

Last update: May 24, 2016 07:48 AM

May 23, 2016


Davy Wybiral

Quantum Circuit Simulator

All I wanted for Christmas was a quantum circuit simulator. So I wrote one in Javascript using NumericJS.


Check it out: http://www.davyw.com/quantum


For a good "Hello world" circuit, here's the diagram for a Bell State...

Try evaluating it yourself and see that |00> or |11> are the only possible outcomes.

You can even compile your own circuits into gates to use in other circuits.

Construct a circuit that transforms a single qubit into |0> with 75% probability and |1> with 25% probability, such as:
Then compile that into gate "F" and use it to create a superposition of |00> with 75% prob and |11> with 25% prob, like this:
Let me know if you find any use out of this. And definitely let me know if you find any bugs.

May 23, 2016 06:47 PM


Kushal Das

dgplug summer training student Tosin Damilare James Animashaun

Your name (blog/twitter) and what do you do

My name is Tosin Damilare James Animashaun (IRC: acetakwas; Twitter: @acetakwas; Github: github.com/takwas, Blog: takwas.github.io).

I am currently a part-time Software Engineering student at NIIT, Lagos. I am also a co-founder at a startup called Krohx. We are in the final stages of deploying a job/hiring web platform that targets seekers of short-term jobs while also easing the process of getting service delivery for the hirers.

With my involvements with the burgeoning Python community in Nigeria, I recently got elected as secretary for the organization.

How did you learn about the training? (++ My Experience) I fail to recall

exactly how I learnt about the community now, but I remember joining the mailing list and going on from there. This was in fact my first time of joining a mailing list. Upon learning about the #dgplug IRC channel, I promptly enlisted the channel to my IRC client’s favourites.

I was so enthusiastic about this, as I had no prior experience of an online tutoring session. The feeling was truly exhilarating.

Having come from a Java background, I was really interested in learning the Python programming language as soon as I caught on waves with. At the time, I had volunteered to write some scripts to help automate some of the manual processing of NIIT’s annual scholarship exam records/documents at my school for that year. I accomplished that using Java, but in hind-sight, I feel I could have saved a lot of time if I had utilised Python in the situation.

This was a blog post I wrote as part of tasks given to us. I have failed to maintain that blog though. I now write here

How this training changed (if at all) your life? Python is surely the more

beginner-friendly language and it’s making its rounds these days. Every programmer should have it in their arsenal. One of the things I love most about the language is it versatility in application.

No doubt, I have continued to improve with Python everyday, but more so in my programming journey. I have become more and more familiar with various mainstream concepts and tools. The idea of contributing to open-source can be overwhelming at first, but following the path laid out in this course, one would be surprised to learn how easy it could be.

I have volunteered to mentor attendees at a Django Girls workshop, which held in Lagos, Nigeria. I picked-up Django in a week prior to the event, because frankly, there wasn’t much of a learning curve to it since I already used Flask, a different Python-based web development framework.

Flask was a framework I first got introduced to at the summer training, but I did not revisit it until months later. As a backend web-developer, I now do most of my work in Flask.

In my experience, there is no better or faster way to grow, than to collaborate; and that is what open source preaches. Note that growth here is not only about the project, but the growth applies to each contributing individual. Heck, even if you do not contribute, you will grow by reading good open-source code – this I can attest to. And joining the dgplug community has surely made open-source a more approachable endeavour. # #

Have you contributed to any upstream project(s)? If yes, then details.

While (and a bit disappointingly) I have yet to contribute to an upstream project, I do have quite a number of them lined up. Most probably, the first would be to the [official Slack Client]() written in Python. Having recently developed a bot, which was used in conducting the election of committee members of the Python Users Nigeria Group, I do have a number of changes I plan to push to the aforementioned API library.

With this forked project, I have also tried my hands at revamping the architecture of the official dgplug bot ekanora, which is used in running the summer training sessions.

Some other projects I’d like to contribute to include:

Any tips for the next batch of participants. (++Final words)

I am not sure I am in the best position to answer this. However, I would advise that you endeavour to remain focused through this; simply keep at it. Even if your experience at the summer camp doesn’t go as you expect, you should definitely not count it loss. Instead, make it a reason to put in more effort and grow as you go.

Depending on your personal activity schedule, you might miss one/two classes. But that shouldn’t deter you from continuing the program. The logs are available for covering such lapses. Also, you could consult the summer training docs to get a hang of the agenda, so you can anticipate classes beforehand and be better prepared.

While I participated in the training, there were times when there was no power supply, and I had to use my phone. Thankfully, there are IRC clients for mobile phones (I recommend AndChat).

The class sessions have a few rules, and the community would love it if you played by them. Not to worry, they are no stringent rules; just there to keep everyone behaving. For instance, the use of SMS-speak is discouraged.

You should keep notes beside you when attending the sessions. Writing is a good way to memorize things in my opinion. Also, although most clients would have this by default, you should ensure your IRC client is configured to log conversations. Going back over what you’ve learnt would do you great good as you mightn’t be able to keep up with the speed of the class at times.

If you have some time before program begins, two things I’d advise you become familiar with are: - Your OS (Linux, preferably Fedora or Ubuntu) - An IRC client (I suggest HexChat)

I learned quite a lot from the summer training. I was really obsessed with attending whenever I could. Although coming from a different country, the timing wasn’t favourable, often meeting me in the middle of the day’s activities – school especially. I made efforts to invite a few friends to join on – one or two did, but the determination to keep on was obviously lacking, which reminds me of a statement I heard a while back that reads something like this:

"If 40 people begin a course like this together, only about 5 get to
finish."

That in my experience is very often the case. Be aware that a lot of people are on this bandwagon. The question to ask yourself, is “Do I want to be among the surviving commutants at the end of this journey?” Unless you plan to experiment with this experience, if your answer is yes, then I congratulate you as you begin the journey that could potentially kick-start your software engineering career/journey.

Know this, free and open source software is for the good of all. The open source community is wide and continues to grow. It welcomes all and sundry, but it poses a few hurdles to sieve the wheat from the chaff. In the end, the gains are worth it.

May 23, 2016 05:45 PM


Trey Hunner

Weekly Python Chat: Live From PyCon

TL;DR: If you’ve never been to PyCon and are curious what the big deal is about, sign up for the PyCon Day 1 live chat and PyCon Sprints live chat.

I have been holding live webcasts every week for almost 2 months now. I started this trend after my regular expressions webinar in March. I soon came up with a name and made a website for these weekly python chat events. Now there’s also a Twitter account and a Facebook page.

Guest speakers and other experimentation

I’ve really enjoyed holding these events. The audience participation has been great: ample questions and plenty of helpful chat adding on to the discussion and occasionally correcting my mistakes.

I’ve been experimenting with the chat format by bringing in guest speakers the last couple weeks and I plan to introduce more general topics occasionally in the future.

Web chats about PyCon, live from PyCon

Next week I’ll be continuing my experimentation by hosting two Weekly Python Chat events live from PyCon.

The first chat next week will be during the first day of PyCon. I will likely be in the hallway accompanied by a couple other Python friends. We’ll answer your questions about what there is to do at PyCon, how it’s different from other cons, and why we go.

The second chat will be during the first day of the sprints. We’ll chat about who the sprints are for, how new contributors can get involved with the sprints, and what makes the sprints rewarding.

I want to convince you to join me at PyCon 2017

If you’ve never attended the sprints, sign up for the second chat to ask your questions and state your concerns. Hopefully I can convince you to stay for the sprints next time.

If you’ve never been to PyCon, sign up for both chats and voice your questions and concerns in each. I will address your questions and concerns, even if you can’t make the live event. Both chats will be recorded and you can re-watch them afterward.

Chat 1: Live from Day 1 of PyCon

Monday May 30, 2016 at 3:30pm PDT

We’ll discuss what PyCon is all about.

Sign up here to attend the PyCon Day 1 live chat

Chat 2: Live from the PyCon sprints

Thursday June 2, 2016 at 11:00am PDT

We’ll chat about how the sprints work.

Sign up here to attend the PyCon Sprints live chat

Get in touch

Have questions? Want to share your PyCon experiences during the live chat? Going to PyCon next week and want to meet up? Contact me!

May 23, 2016 04:00 PM


PyCharm

PyCharm 2016.1.4 RC is Available

Today we announce the PyCharm 2016.1.4 Release Candidate build #145.1503. The list of bug fixes and improvements for this build can be found in the release notes.

Some highlights of the PyCharm 2016.1.4 RC are:

Patch updates from the previous PyCharm releases should be available shortly.

Please give PyCharm 2016.1.4 RC a try before its official release and please report any bugs and feature request to our issue tracker.

-PyCharm team

May 23, 2016 01:04 PM


Doug Hellmann

bisect — Maintain Lists in Sorted Order — PyMOTW 3

The bisect module implements an algorithm for inserting elements into a list while maintaining the list in sorted order. Read more… This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.

May 23, 2016 01:00 PM


Mike Driscoll

PyDev of the Week: Wesley Chun

This week we welcome Wesley Chun as our PyDev of the Week! Wesley Chun, MSCS, is author of Prentice Hall’s bestselling “Core Python” series (corepython.com), the “Python Fundamentals” companion videos, co-author of “Python Web Development with Django” (withdjango.com), and has written for Linux Journal, CNET, and InformIT. In addition to being an engineer at Google, he runs CyberWeb (cyberwebconsulting.com), a consultancy specializing in Python training. Wesley has over 25 years of programming, teaching, and writing experience, including more than a decade of Python. While at Yahoo!, helped create Yahoo!Mail using Python. Wesley holds degrees in Computer Science, Mathematics, and Music from the University of California. He is based in Silicon Valley and can be reached on Twitter (twitter.com/wescpy) or Google+ (google.com/+WesleyChun). Let’s spend a few minutes getting to know him better!

 

chun_wesley_c

 

Can you tell us a little about yourself (hobbies, education, etc):

 

I’ve been a software engineer by profession, coding in Python, JavaScript, and a few others, at big companies as well as startups. I’m currently at Google, a nice blend of both worlds. I enjoy helping the next generation of developers get up-to-speed on the latest technologies and best practices with the least amount of friction, meaning that in addition to coding, I also teach technology, publish books & blogposts, and give talks at conferences. Stuff I like to do away from the keyboard include family time, piano, personal finance, world travel, physical fitness (cycling, yoga, biking, basketball), poker, and learning a few words in as many languages as I can.

 

Why did you start using Python?

 

After leaving Sun Microsystems in the mid-90s with C and a few scripting languages under my belt, I went to a startup where our small team of ~10 engineers built what was eventually to become Yahoo!Mail using Python at a time when very few people had ever heard of it. It was amazing how fast we could create our own web framework and build the mail service with. It was like a breath of fresh air, and learning Python at that job changed the course of the rest of my career. Because of its uniqueness at encouraging group collaboration and being both powerful and expressive, I really didn’t want to work in any other language ever again. As a result, I’ve quite a challenging and rewarding career as a senior engineer working at companies where Python is a primary development tool.

 

What other programming languages do you know and which is your favorite?

 

In high school, I was exposed to programming in (Commodore) BASIC, FORTRAN, 6502 assembly, and Pascal. I added Logo and C to that collection in college. These days, I mostly tinker in Unix shell, Python, and JavaScript, with some Java, C++, Dart, and Go thrown in there. This is my 20th year coding in Python, so I’ll stick with that for a little while longer.

 

What projects are you working on now?

 

I’ve officially started work on the 3rd edition of my well-received, “Core Python Programming” book. The 2nd edition (ISBN 0132269937) is still doing quite well, and with all the new material going into it, the publishers and I have split that original book of two parts into two volumes. The 3rd edition of part 2 has already published as “Core Python: Applications Programming” (ISBN 0132678209), so now I need to complete the 3rd ed. of part 1 (tentatively called, “Core Python: Language Fundamentals”. It will feature both Python 2 and 3 prominently. We’re at the crossroads whereby adoption of 3.x has picked up, so while much legacy code still runs 2.x, there’s no reason why a new book should focus solely on either version, but can serve the community better as a bridge between both worlds.

 

At work, I’m currently bringing the goodness of Google developer tools, APIs, and platforms to the global community. I advocate for our devtools to engineers in industry as well as the next generation in the classroom, building sample code, writing about best practices, making product announcements, and creating Python or JavaScript-flavored developer videos (http://goo.gl/kFMUa6) that help on-board developers with integrating Google techologies into the web, mobile, and server-side apps *they’re* building. If it’s Python, then there’s a high likelihood that a deeper dive into the code covered in the video will be featured on my Python blog (wescpy.blogspot.com).

 

Which Python libraries are your favorite (core or 3rd party)?

 

I don’t really have one particular favorite. I think everyone should learn unittest. I thought doctest was pretty awesome the first time I heard of it. I feel that csv, json, and the xml and email packages are “must-have”s in every Python developers toolbox. I also think large tools like pip, ipython, Jupyter (formerly “IPython Notebook”), Django, Pyramid, and Sphinx are pretty awesome. Finally, I think that the Google APIs Client Library for Python is also great because it gives Python developers access to integrating the use of Google APIs into any Python script.

 

Where do you see Python going as a programming language?

 

Since I started learning Python way back in 1997 with 1.4(!), it has taken off like a weed. Back then, Python appeared on NO job listings whatsoever. In fact, at the startup where I learned Python, they had no expectations that anyone knew any Python. Today, it’s fairly clear that Python is everywhere and continues to grow in mindshare. Now developers can have an entire career writing Python code, and better yet, the next generation will also be familiar with it as it’s being taught in primary and secondary schools in addition to many colleges and universities worldwide!

 

The next step for Python is the growth of 3.x adoption. Many are skeptical when they hear that “no one” has been using it since it came out at the end of 2008 which isn’t true. It’s just that the term “backwards-incompatible” tends to scare the timid away and requires porting of dependencies before considering migration. Fortunately most experienced Python developers recognize that while it *is* a big deal, the core language itself isn’t changing in a way that 2.x developers would be completely lost. It’s not being rewritten from scratch. Much progress has already been made on the porting front, and it represents a good opportunity to continue Python’s growth and evolution as all new features are only going into the 3.x branch. When it first came out, I called for adoption to take a decade because it was backwards-incompatible — I have about two years left on this prediction, so I’m curious how things will turn out.

 

What is your take on the current market for Python programmers?

 

It can’t be a more exciting time for Python developers. With the growing mindshare and number of libraries and jobs available in all industries, the future for Python developers has never been brighter. I will continue to support the community with books, talks, volunteering, and general advocacy. I hope to continue bringing new engineers into the Python community, which while not a language feature, is one of the best things about Python itself.

 

Is there anything else you’d like to say?

 

Hope to see you all at PyCon next week or in one of my future courses!!

 

Thanks for doing the interview!

 

May 23, 2016 12:30 PM

May 22, 2016


Graeme Cross

PyCon AU 2016 registrations are open!

Online registration is now open for PyCon Australia 2016, including for the Science and Data miniconference.

The seventh PyCon Australia is being held in Melbourne, Victoria from August 12th – 16th at the Melbourne Convention and Exhibition Centre, and will draw hundreds of Python developers, enthusiasts and students from Australasia and afar.

Starting today, early bird offers are up for grabs. To take advantage of these discounted ticket rates, be among the first 90 to register. To begin the registration process, and find out more about each level of ticket, visit the conference registration page.

PyCon Australia has endeavoured to keep tickets as affordable as possible, and financial assistance is also available. We are able to make such offers thanks to our Sponsors and Contributors.

May 22, 2016 11:26 PM


Evennia

Evennia 0.6 !


As of today, I merged the development branch to make version 0.6 of the MU* development system and server Evennia.

Evennia 0.6 comes with a lot of updates, mainly in the way Evennia talks to the outside world. All communication is now standardized, so there are no particular treatment of things like text - text is just one of any standardized commands being passed between the server the client (whether over telnet, ssh, websockets or ajax/comet).

For example the user can now easily plug in "inputfuncs" to handle any data coming from the client. If you want your client to offer some particular functionality, you just need to plop in a python function to handle it, server-side. We also now offer a lot of utility functions for things like monitoring change (tell the client whenever your health status changes so it can update a health bar or flash the screen).

The HTML5 webclient has itself updated considerably. Most is happening behind the scenes though. Notably the webclient's javascript component is split into two:

There are a truckload of more updates and features that are covered on the mailing list.
.
Griatch

May 22, 2016 11:17 PM


Richard Jones

PyCon Australia 2016: Registration Opens!

We are delighted to announce that online registration is now open for PyCon Australia 2016. The seventh PyCon Australia is being held in Melbourne, Victoria from August 12th – 16th at the Melbourne Convention and Exhibition Centre, will draw hundreds of Python developers, enthusiasts and students from Australasia and afar.

Starting today, early bird offers are up for grabs. To take advantage of these discounted ticket rates, be among the first 90 to register. Early bird registration starts from $60 for full-time students, $190 for enthusiasts and $495 for professionals. Offers this good won’t last long, so register right away.

We strongly encourage attendees to organise their accommodation as early as possible, as demand for cheaper rooms is very strong during the AFL season.

PyCon Australia has endeavoured to keep tickets as affordable as possible. Financial assistance is also available: for information about eligibility, head to our financial assistance page and apply. We are able to make such offers thanks to our Sponsors and Contributors.

To begin the registration process, and find out more about each level of ticket, visit our registration information page.

Important Dates to Help You Plan

About PyCon Australia

PyCon Australia is the national conference for the Python programming community. The seventh PyCon Australia will be held on August 12-16 2016 in Melbourne, bringing together professional, student and enthusiast developers with a love for programming in Python. PyCon Australia informs the country’s developers with presentations by experts and core developers of Python, as well as the libraries and frameworks that they rely on.

To find out more about PyCon Australia 2016, visit our website at pycon-au.org, follow us at @pyconau or e-mail us at contact@pycon-au.org.

PyCon Australia is presented by Linux Australia (www.linux.org.au) and acknowledges the support of our Platinum Sponsors, DevDemand.co and IRESS; and our Gold sponsors, Google Australia and Optiver. For full details of our sponsors, see our website.

May 22, 2016 10:52 PM


Mikko Ohtamaa

Python standard logging pattern

(this article originally appeared in Websauna documentation)

1. Introduction

Python standard library provides logging module as a de facto solution for libraries and applications to log their behavior. logging is extensively used by Websauna, Pyramid, SQLAlchemy and other Python packages.

  • Python logging subsystem can be configured using external configuration file and the logging configuration format is specified in Python standard library.
  • Python logger can be individually turned on, off and their verbosity adjusted on per module basis. For example by default, Websauna development server sets SQLALchemy logging level to INFO instead of DEBUG to avoid flooding the console with verbose SQL logs. However if you are debugging issues related to a database you might want to set the SQLAlchemy logging back to INFO.
  • Logging is preferred diagnose method over print statements cluttered around source code.. Well designed logging calls can be left in the source code and later turned back on if the problems must be diagnosed further.
  • Python logging output can be directed to console, file, rotating file, syslog, remote server, email, etc.

2. Log colorization

  • Websauna uses rainbow_logging_handler which colorizes the logs, making it easier to read them in the console of the development web server.

logging

3. Standard logging pattern

A common logging pattern in Python is:

import logging


logger = logging.getLogger(__name__)


def my_view(request):
    logger.debug("my_view got request: %s", request)
    logger.info("my_view got request: %s", request)
    logger.error("my_view got request: %s and BAD STUFF HAPPENS", request)

    try:
        raise RuntimeError("OH NOES")
    except Exception as e:
        # Let's log full traceback even when we ignore this exception
        # and it's not risen again
        logger.exception(e)
  • This names a logger based on a module so you can switch logger on/off on module basis.
  • Pass logged objects to logging.Logger.debug() and co. as full and let the logger handle the string formatting. This allows intelligent display of logged objects when using non-console logging solutions like Sentry.
  • Use logging.Logger.exception() to report exceptions. This will record the full traceback of the exception and not just the error message.

Please note that although this logging pattern is common, it’s not a universal solution. For example if you are creating third party APIs, you might want to pass the logger to a class instance of an API, so that the API consumer can take over the logger setup and there is no inversion of control.

4. Changing logging level using INI settings

Websauna defines development web server log levels in its core development.ini. Your Websauna application inherits settings from this file and can override them for each logger in the conf/development.ini file of your application.

For example to set SQLAlchemy and transaction logging level to more verbose you can do:

[logger_sqlalchemy]
level = DEBUG

[logger_transaction]
level = DEBUG

Now console is flooded with very verbose logging:

[2016-05-22 20:39:55,429] [sqlalchemy.engine.base.Engine _begin_impl] BEGIN (implicit)
[2016-05-22 20:39:55,429] [txn.123145312813056 __init__] new transaction
[2016-05-22 20:39:55,429] [sqlalchemy.engine.base.Engine _execute_context] SELECT users.password AS users_password, users.id AS users_id, users.uuid AS users_uuid, users.username AS users_username, users.email AS users_email, users.created_at AS users_created_at, users.updated_at AS users_updated_at, users.activated_at AS users_activated_at, users.enabled AS users_enabled, users.last_login_at AS users_last_login_at, users.last_login_ip AS users_last_login_ip, users.user_data AS users_user_data, users.last_auth_sensitive_operation_at AS users_last_auth_sensitive_operation_at, users.activation_id AS users_activation_id

5. Initialization loggers from INI file

If you need to initialize loggers in your own applications see websauna.system.devop.cmdline.setup_logging() for how Websauna picks up loggers from INI configuration file.

6. More information

How Websauna logs username and email for every internal server error. It’s impressive service if your devops teams calls a customer on a second an error happens and guide the customer around the error. As a bonus if using Sentry you will see the Gravatar profile image of the user when viewing the exception.

Logbook is an alternative for Python standard library logging if performance is critical or the application has more complex logging requirements .

Discussion about log message formatting and why we are still using old style string formatting.

structlog package – add context to your logged messages like user id or HTTP request URL.

 Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+

May 22, 2016 07:30 PM


Programando Ciência

Complex scatter plots on Python [PART III] – Inserting labels into elements and defining more than one legend

Hey scientist! How is it going? Do you remember our scatter plot based on IBGE [1] data? In the last post of this series we’ll make it even better, inserting labels indicating the states and defining two legends related to the regions and the population. Now the plot will be awesome! Let’s do this! Do […]

May 22, 2016 06:32 PM


Weekly Python Chat

PyCon Sprints

If you're interested in contributing to open source but you've never been to a PyCon sprint, join this chat and learn what the PyCon sprints are really like.

We'll chat with first-time contributors and experienced contributors about their PyCon sprint experience.

May 22, 2016 06:00 PM


Abu Ashraf Masnun

Building a Facebook Messenger Bot with Python

Facebook now has the Messenger Platform which allows us to build bots which can accept messages from users and respond to them. In this tutorial, we shall see how we can build a bot and add it to one of our pages so that the users can interact with the bot by sending messages to the page.

To get started, we have three requirements to fulfill:

I am assuming you already have a Facebook Page. If you don’t, go ahead and create one. It’s very simple.

Creating and Configuring The Facebook App

(1) First, we create a generic facebook app. We need to provide the name, namespace, category, contact email. Simple and straightforward. This is how it looks for me:

Create a New FB App.

(2) Now we have to browse the “Add Product” section and add “Messenger”.

Add Messenger

(3) Generate access token for a Page you manage. A popup will open asking you for permissions. Grant the permission and you will soon see the access token for that page. Please take a note of this token. We shall use it later send messages to the users on behalf of the page.

Next, click the “Webhooks” section.

(4) Before we can setup a webhook, we need to setup an URL which is publicly accessible on the internet. The URL must have SSL (that is it needs to be https). To meet this requirement and set up a local dev environment, we setup a quick flask app on our local machine.

Install Flask from PyPi using pip:

pip install Flask

Facebook will send a GET request to the callback URL we provide. The request will contain a custom secret we can add (while setting up the webhook) and a challenge code from Facebook. They expect us to output the challenge code to verify ourselves. To do so, we write a quick GET handler using Flask.

## Filename: server.py 

from flask import Flask, request

app = Flask(__name__)

@app.route('/', methods=['GET'])
def handle_verification():
    return request.args['hub.challenge']

if __name__ == '__main__':
    app.run(debug=True)

We run the local server using python server.py. The app will launch at port 5000 by default. Next we use ngrok to expose the server to the internet. ngrok is a fantastic tool and you should seriously give it a try for running and debugging webhooks/callback urls on your local machine.

ngrok http 5000

With that command, we will get an address like https://ac433506.ngrok.io. Copy that url and paste it in the Webhook setup popup. Checkmark the events we’re interested in. I check them all. Then we input a secret, which our code doesn’t care about much. So just add anything you like. The popup now looks like this:

Click “Verify and Save”. If the verification succeeds, the popup will close and you will be back to the previous screen.

Select a Page again and click “Subscribe”. Now our app should be added to the page we selected. Please note, if we haven’t generated an access token for that page in the earlier step, the subscription will fail. So make sure we have an access token generated for that page.

Handling Messages

Now every time someone sends a message to the “Masnun” page, Facebook will make a POST request to our callback url. So we need to write a POST handler for that url. We also need respond back to the user using the Graph API. For that we would need to use the awesome requests module.

pip install requests

Here’s the code for accepting incoming messages and sending them a reply:

from flask import Flask, request
import requests

app = Flask(__name__)

ACCESS_TOKEN = "EAAP9MMaGh1cBAHS7jZCnuQgm2GWx5grLraIElFlWlIw2r3Afb34m2c2rP0xdkkkKEeiBOykGINAP0tScwmL5NNBJQN9ayPCuq13syvWocmbYZA7BXL86FsZCyZBxTmkgYYp8MDulLc1Tx70FGdU5ebQZAJV28nMkZD"


def reply(user_id, msg):
    data = {
        "recipient": {"id": user_id},
        "message": {"text": msg}
    }
    resp = requests.post("https://graph.facebook.com/v2.6/me/messages?access_token=" + ACCESS_TOKEN, json=data)
    print(resp.content)


@app.route('/', methods=['POST'])
def handle_incoming_messages():
    data = request.json
    sender = data['entry'][0]['messaging'][0]['sender']['id']
    message = data['entry'][0]['messaging'][0]['message']['text']
    reply(sender, message[::-1])

    return "ok"


if __name__ == '__main__':
    app.run(debug=True)

The code here accepts a message, retrieves the user id and the message content. It reverses the message and sends back to the user. For this we use the ACCESS_TOKEN we generated before hand. The incoming request must be responded with a status code 200 to acknowledge the message. Otherwise Facebook will try the message a few more times and then disable the webhook. So sending a http status code 200 is important. We just output “ok” to do so.

You can now send a message to your page and see if it responds correctly. Check out Flask’s and ngrok’s logs to debug any issues you might face.

You can download the sample code from here: https://github.com/masnun/fb-bot

May 22, 2016 04:44 PM


PyCon Australia

Tickets now on sale!

We are delighted to announce that online registration is now open for PyCon Australia 2016. The seventh PyCon Australia is being held in Melbourne, Victoria from August 12th – 16th at the Melbourne Convention and Exhibition Centre, and will draw hundreds of Python developers, enthusiasts and students from Australasia and afar.

Starting today, early bird offers are up for grabs. To take advantage of these discounted ticket rates, be among the first 90 to register. Early bird registration starts from $60 for full-time students, $190 for enthusiasts and $495 for professionals. Offers this good won’t last long, so we recommend registering right away.

We strongly encourage attendees to organise their accommodation as early as possible, as demand for cheaper rooms is very strong during the AFL season.

PyCon Australia has endeavoured to keep tickets as affordable as possible. Financial assistance is also available. We are able to make such offers thanks to our Sponsors and Contributors.

To begin the registration process, and find out more about each level of ticket, visit https://2016.pycon-au.org/register/prices.

Important Dates to Help You Plan

May 22, 2016 01:28 PM

May 21, 2016


BangPypers

Talks About Mesh Networks - 2016 May Meetup

May meetup happened at the Blue Jeans in Prestige tech park. 35 people attended the event. This time we had a series of talks about Mesh networks.

Prasanna gave first talk. He explained about how internet works, what is a mesh network and why we need one. He also explained how mesh networks were used during chennai floods for communication when there was no other way to communicate. He also explained advantages of setting up a mesh network in rural areas and challenges in setting up them.

talk1

Second talk was given by Ganesh. He explained about the hardware for Mesh networks. He started with basics of routers, how router works, their design and how we can take complete control of it using OpenWRT. He also explained FM, design of various antennas and showed several softwares available for it.

talk2

talk21

talk22

Third talk was by Surya. He talked about P2P software applications. He explained why we need a p2p approach. Later he explained about several interesting projects Zeronet, ZeroConf, Avahi, Serval Mesh, Rumble, Murmur, opentracker, etc. Some of them are built with Python.

talk3

Slides about talks are available here and here.
At the end, there was a flash talk by Saurabh about defaultdict(collections). He explained how to implement a recursive defaultdict(a tree) and use cases of it.

talk4

Bluejeans livestreamed the event. Several people who couldn't come to venue watched it online.

In case if You're interested to give talk or a workshop, please leave comment in the meetup page.

Thanks to speakers and BlueJeans for hosting & streaming the event.

May 21, 2016 05:31 PM


Podcast.__init__

Episode 58 - Wagtail with Tom Dyson

Visit our site to sign up for the newsletter, explore past episodes, subscribe to the show, and help support our work.

Summary

If you are operating a website that needs to publish and manage content on a regular basis, a CMS (Content Management System) becomes the obvious choice for reducing your workload. There are a plethora of options available, but if you are looking for a solution that leverages the power of Python and exposes its flexibility then you should take a serious look at Wagtail. In this episode Tom Dyson explains how Wagtail came to be created, what sets it apart from other options, and when you should implement it for your projects.

Brief Introduction

Linode Sponsor Banner

Use the promo code podcastinit20 to get a $20 credit when you sign up!

Rollbar Logo

I’m excited to tell you about a new sponsor of the show, Rollbar.

One of the frustrating things about being a developer, is dealing with errors… (sigh)

  • Relying on users to report errors
  • Digging thru log files trying to debug issues
  • A million alerts flooding your inbox ruining your day…

With Rollbar’s full-stack error monitoring, you get the context, insights and control you need to find and fix bugs faster. It’s easy to get started tracking the errors and exceptions in your stack.You can start tracking production errors and deployments in 8 minutes - or less, and Rollbar works with all major languages and frameworks, including Ruby, Python, Javascript, PHP, Node, iOS, Android and more.You can integrate Rollbar into your existing workflow such as sending error alerts to Slack or Hipchat, or automatically create new issues in Github, JIRA, Pivotal Tracker etc.

We have a special offer for Podcast.__init__ listeners. Go to rollbar.com/podcastinit, signup, and get the Bootstrap Plan free for 90 days. That’s 300,000 errors tracked for free.Loved by developers at awesome companies like Heroku, Twilio, Kayak, Instacart, Zendesk, Twitch and more. Help support Podcast.__init__ and give Rollbar a try a today. Go to rollbar.com/podcastinit

Interview with Tom Dyson

Keep In Touch

Picks

Links

The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA

Visit our site to sign up for the newsletter, explore past episodes, subscribe to the show, and help support our work.Summary If you are operating a website that needs to publish and manage content on a regular basis, a CMS (Content Management System) becomes the obvious choice for reducing your workload. There are a plethora of options available, but if you are looking for a solution that leverages the power of Python and exposes its flexibility then you should take a serious look at Wagtail. In this episode Tom Dyson explains how Wagtail came to be created, what sets it apart from other options, and when you should implement it for your projects.Brief IntroductionHello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.I would like to thank everyone who has donated to the show. Your contributions help us make the show sustainable. For details on how to support the show you can visit our site at pythonpodcast.comLinode is sponsoring us this week. Check them out at linode.com/podcastinit and get a $20 credit to try out their fast and reliable Linux virtual servers for your next projectWe also have a new sponsor this week. Rollbar is a service for tracking and aggregating your application errors so that you can find and fix the bugs in your application before your users notice they exist. Use the link rollbar.com/podcastinit to get 90 days and 300,000 errors for free on their bootstrap plan.Visit our site to subscribe to our show, sign up for our newsletter, read the show notes, and get in touch.To help other people find the show you can leave a review on iTunes, or Google Play Music, and tell your friends and co-workersJoin our community! Visit discourse.pythonpodcast.com for your opportunity to find out about upcoming guests, suggest questions, and propose show ideas.Your hosts as usual are Tobias Macey and Chris PattiToday we are interviewing Tom Dyson about Wagtail, a modern and sophisticated CMS for Django. Use the promo code podcastinit20 to get a $20 credit when you sign up! I’m excited to tell you about a new sponsor of the show, Rollbar. One of the frustrating things about being a developer, is dealing with errors… (sigh)Relying on users to report errorsDigging thru log files trying to debug issuesA million alerts flooding your inbox ruining your day...With Rollbar’s full-stack error monitoring, you get the context, insights and control you need to find and fix bugs faster. It's easy to get started tracking the errors and exceptions in your stack.You can start tracking production errors and deployments in 8 minutes - or less, and Rollbar works with all major languages and frameworks, including Ruby, Python, Javascript, PHP, Node, iOS, Android and more.You can integrate Rollbar into your existing workflow such as sending error alerts to Slack or Hipchat, or automatically create new issues in Github, JIRA, Pivotal Tracker etc. We have a special offer for Podcast.__init__ listeners. Go to rollbar.com/podcastinit, signup, and get the Bootstrap Plan free for 90 days. That's 300,000 errors tracked for free.Loved by developers at awesome companies like Heroku, Twilio, Kayak, Instacart, Zendesk, Twitch and more. Help support Podcast.__init__ and give Rollbar a try a today. Go to rollbar.com/podcastinitInterview with Tom DysonIntroductionsHow did you get introduced to Python? - ChrisCan you start by explaining what a content management system is and why they are useful? - TobiasHow did the Wagtail project get started and what makes it stand out from other comparable offerings? - TobiasWhat made you choose Django as the basis for the project as opposed to another framework or language such as Pyramid, Flask, or Rails? - TobiasWhat is your target user and are there any situations in which you would encourage someone to use a different CMS? - TobiasCan you explain the software design approach that was taken with Wagtail and describe the challenges that have been overcome along the way? - T

May 21, 2016 04:23 PM


EuroPython

PyData EuroPython 2016

We are excited to announce a complete PyData track at EuroPython 2016 in Bilbao, Basque Country, Spain, from July 14-24.

image

PyData EuroPython 2016

The PyData track will be part of the EuroPython 2016 conference, so you won’t need to buy extra tickets to join.

We will have more than 30 talks, 5 training and 2 poster sessions dedicated to PyData on Thursday 21st and Friday 22nd of July.

If you’d like to attend the PyData EuroPython 2016 track, please register for EuroPython 2016 soon.

With gravitational regards,

EuroPython 2016 Team

May 21, 2016 10:03 AM


Ian Ozsvald

Will we see “[module] on Python 3.4+ is free but only paid-support for Python 2.7”?

I’m curious about the transition in our ecosystem from Python 2 to Python 3. On stage at our monthly PyDataLondon meetups I’m known to badger folk to take the step and upgrade to reduce the support burden on developers. The transition gathers pace but it still feels slow. I’ve noted my recommendations for moving to Python 3+ at the end. See also the reddit discussion.

I’m wondering – when will we see the point where open source projects say “We support Python 3.x for free but if you want bugs fixed for Python 2.7, you’ll have to pay“? I’m not saying “if”, but “when”. There’s already one example below and others will presumably follow.

In the last couple of years a slew of larger projects have dropped or are dropping support for Python 2.6 – numpy (some discussion), pandas, scipy, matplotlib, NLTK, astropy, ipythondjango, numba, twisted, scrapy. Good – Python 2.6 was deprecated when 2.7 was released in 2010 (that’s 6 years ago!).

The position of the matplotlib and django teams is clearly “Python 2.7 and Python 3.4+”. Django states that Python 2.7 will be supported until the 2020 sunset date:

“As a final heads up, Django 1.11 is likely to be the last version to support Python 2.7 as it will be supported until the end of Python 2 upstream support in 2020. We’ve adopted a Python version support policy…”

We can expect the larger projects to support legacy userbases with a mix of Python 2.7 and 3.4+ for 3.5 years (at least until 2020). After this we should expect projects to start to drop 2.7 support, some (hopefully) more aggressively than others.

What about smaller projects? Several have outright dropped Python 2.7 support already – nikola, python-thumbnails – or never supported it – wordfreq, featherweight. Which others have I missed? UpdateJupyterHub (cheers Thomas) too.

More interestingly David MacIver (of Hypothesis) stated a while back that he’d support Python 2.7 for free but Python 2.6 would be a paid support option. He’s also tagged (regardless of version) a bunch of bugs that can be fixed for a fee. Viewflow is another – Python 3.4 is free for non-commercial use but a commercial license or support for Python 2.7 requires a fee. Asking for money to support old, PITA or difficult options seems mightily sensible. I guess we’ll see this first for tools that have a good industrial userbase who’d be used to paying for support (like Viewflow).

Aaron Meurer (lead dev on SymPy) has taken the position that library leaders should pledge for a switch to Python 3.x only by 2020. The pledge shows that scikit-bio is about to go Python 3-only and that IPython 6.x+ will be Python 3 only (from 2017). Increasingly we’ll see new libraries adding the shiny features for their Python 3 branch only.

What next? I imagine most new smaller projects will be Python 3.4+ (probably 3.5+ only soon), they’ll have no legacy userbase to support. They could widen their potential userbase by supporting Python 2.7 but this window only exists for 3 years and those users will have to upgrade anyhow. So why bother going backwards?

Once users notice that cooler new toys are Python 3.4+ only they’ll want to upgrade (e.g. NetworKit is Python 3.3+ only for high volume graph network analysis). They’ll only hold back if they’re supporting legacy internal systems (which will be the case for an awful lot of people). We’ll see this more as we get closer to 2020. What about after 2020?

I guess many companies will be slow to jump to Python 3 (it’d take a lot of effort for no practical improvement), so I’d imagine separate groups will start to support Python 2.7 libraries as forks. Hopefully the main library developers will drop support fairly quickly, to stop open source (cost-free) developers having a tax on their time supporting both platforms.

Separate evidence – Drupal 6 adopted a commercial-support-for-old-versions policy (thanks @chx). It is also worth noting that Ubuntu 16.04 LTS ships without Python 2. Microsoft and Brett Cannon have discussed the benefits of moving to Python 3+ recently.

My recommendations (coming from a Senior Industrial Data Scientist with 15+ years commercial experience and 10+ years using Python):

Graham and I did a lightning talk on jumping to Python 3 six months back, there’s a lot of new features in Python 3.4+ that will make your life easier (and make your code safer, so you burn less time hunting for problems). Jake also discussed the general problem for scientists back in 2013, it’ll be lovely when we get past this (now-very-boring) discussion.


Ian applies Data Science as an AI/Data Scientist for companies in ModelInsight, sign-up for Data Science tutorials in London. Historically Ian ran Mor Consulting. He also founded the image and text annotation API Annotate.io, co-authored SocialTies, programs Python, authored The Screencasting Handbook, lives in London and is a consumer of fine coffees.

May 21, 2016 08:05 AM


Weekly Python StackOverflow Report

(xx) stackoverflow python report

These are the ten most rated questions at Stack Overflow last week.
Between brackets: [question score / answers count]
Build date: 2016-05-21 06:52:12 GMT


  1. Why a comparison with a comma at the end "(1,) == 1," gives a tuple "(False,)" in Python? - [64/4]
  2. Attributes of Python module `this` - [13/1]
  3. What is the x = [m]*n syntax in Python? - [10/2]
  4. Is looping through a generator in a loop over that same generator safe in Python? - [9/3]
  5. Using python to calculate radial angle, in clockwise/counterclockwise directions, given pixel coordinates (and then vice-versa) - [8/3]
  6. How to pad and align unicode strings with special characters in python? - [8/1]
  7. Convert redundant array to dict (or JSON)? - [8/1]
  8. How can I vectorize and speed up this large array calculation? - [7/3]
  9. "Fire and forget" python async/await - [7/2]
  10. Merge two or more lists with given order of merging - [7/2]

May 21, 2016 07:00 AM

May 20, 2016


Continuum Analytics News

New Pip 8.1.2 Release Leaves Anaconda Cloud Broken - Fix in Progress

Posted Friday, May 20, 2016

This is an important update for Anaconda Cloud users who are upgrading to the latest version of Pip. Due to changes in a recent release of Pip v8.1.2, Anaconda Cloud users that are installing packages from the PyPI channel where the package name contains a "." or "-" (period or hypen) will be unable to install those packages.

The short-term fix is to downgrade Pip to v8.1.1. (The Pip 8.1.2 conda package has been removed from repo.continuum.io so it's not conda-installable currently because of this issue but will be restored to the repo as soon as this issue is resolved in Anaconda Cloud)

We anticipate having an updated version of Anaconda Cloud released in the next 1-2 weeks to address this issue and allow users to upgrade to 8.1.2. An update to this post will be shared when it's resolved. 

To read more about the underlying nature of the issue, please refer to this issue: pypa/pip#3666

May 20, 2016 06:47 PM


بايثون العربي

موقع Github القيادة والسيطرة (الجزء الثاني) إنشاء الوحدات

في الأجزاء القادمة من هذه السلسلة سنكون قادرين على القيام بأعمال حقيرة مع أحصنة طراودة التي قمنا بإنشاءها مثل تسجيل ضربات لوحة المفاتيح ، إلتقاط صور للشاشة وقبل كل هذا دعونا نقوم بإنشاء بعض الوحدات البسيطة التي يمكننا تجربتها ونشرها بكل سهولة .

قم بفتح ملف جديد على دليل الوحدات وقم بتسميته ب dirlister.py وأكتب السطور التالية :


import os
def run(**args):
    print "[*] In dirlister module."
    files = os.listdir(".")
    return str(files)

السطور السابقة عبارة عن مقتطف صغير من الكود يقوم ببساطة عرض و تشغيل دالة تقوم بعرض جميع الملفات الموجودة في الدليل الحالي وطبعا على شكل سلسلة نصية ، وكل وحدة تقوم بتطويرها يجب ان تقوم بعرض وتشغيل دالة يكون لديها مدخلات على شكل متغيرات وهذا يسمح لك بتحميل كل وحدة بنفس الطريقة ويترك لك مساحة كافية حتى يمكنك تخصيص ملفات الإعدادات لتمرير المدخلات إلى الوحدة إذا أردت ذلك .

الأن سنقوم بإنشاء وحدة جديدة تحت إسم environment.py


import os
def run(**args):
    print "[*] In environment module."
    return str(os.environ)

تقوم هذه الوحدة بإستيراد اي متغير التي تم تعيينها على الجهاز المستهدف والذي تم تشغيل عليه حصان طراودة ، الأن دعونا نقوم برفع الكود على مستودع Github بحيث يكون قابل للإستخدام من قبل حصان طراودة .

قم بفتح الطرفية بحيث يكون المسار الذي قمنا بإنشاء من قبل وأكتب الأوامر التالية :


$ git add .
$ git commit -m "Adding new modules"
$ git push origin master
Username: ********
Password: ********</pre>
<pre>

يمكنك تسجيل الدخول على حسابك في موقع Github والتأكد من رفع الكود على المستودع الصحيح وهذه هي الطريقة الوحيدة التي سنتبعها في المستقبل من أجل تطوير الكود

May 20, 2016 06:35 PM


Django Weblog

Django 1.10 alpha 1 released

As part of the Django 1.10 release process, today we've released Django 1.10 alpha 1, a preview/testing package that represents the first stage in the 1.10 release cycle and an opportunity for you to try out the changes coming in Django 1.10.

Django 1.10 has a panoply of new features which you can read about in the in-development 1.10 release notes.

This alpha milestone marks a complete feature freeze. The current release schedule calls for a beta release in about a month and a release candidate about a month from then. We'll only be able to keep this schedule if we get early and often testing from the community. Updates on the release schedule schedule are available on the django-developers mailing list.

As with all alpha and beta packages, this is not for production use. But if you'd like to take some of the new features for a spin, or to help find and fix bugs (which should be reported to the issue tracker), you can grab a copy of the alpha package from our downloads page or on PyPI.

The PGP key ID used for this release is Tim Graham: 1E8ABDC773EDE252.

May 20, 2016 03:48 PM


Python Software Foundation

Python-Cuba Workgroup

Today I’d like to report on some of the progress that has been made as a result of last years' controversy over an April 1st joke post about a (fictional) PyCon to be held in Cuba. As you may recall, the joke fell flat for many–nonetheless, the intent to instigate a real movement toward greater communication with Cuban Pythonistas, and perhaps to someday hold a conference on the island, was fulfilled beyond the authors' expectations! 
The first step occurred in May with the formation of a Python-Cuba Workgroup, which was recognized in June by the PSF board as an official workgroup with a charter. Since some group members already had contacts with Cuban programmers, the workgroup was able to begin a healthy collaboration. In addition, several Cuban Pythonistas made contact with us after the April 1st newsblog post. Discussion and analysis of issues, including internet access in Cuba, how to accommodate a multi-lingual group, governmental involvement and obstacles, etc., began in earnest over the summer. 
Thanks to the hard work of many, including Kirby Unger, David Mertz, Roberto Rosario, Steve Holden, Luciano Ramalho, Pablo Celayes in Argentina, Olemis Lang in Cuba, and dozens of other supporters and members, the group has recently gotten off the ground, and it looks like great things are about to happen!
Pablo Celayes deserves special mention for his efforts in involving his recently formed Python meet-up group in Cordoba, Argentina in the Python-Cuba effort (Cordoba, Argentina meet-up). Cuban developer, Alejandro Zamora Fonesca, is planning to visit Pablo and the rest of this group in Argentina this month to further discuss the growth of Python in Cuba. We look forward to hearing about that meeting on the Python Cuba mail list. In addition, Pablo will be traveling to Cuba in January, and again in March,  and hopes to have some sort of Python event organized for that time.
Indeed, Python events were already happening in Cuba prior to the formation of our group, and those of us in the US found that there were many Cuban Python developers eager to get more involved (for example, see Twitter). Newer groups, such as the Merchise Start Up Circle in Havana, are quickly growing and are busy planning future events. And plans are also underway to offer workshops on Python and Django  as part of the Cuba Free Software Conference, to take place April 25 - 27.  This large, international event, sponsored by The User Group of Free Technologies in Cuba (GUTL) and The Best of Open Techonologies in Germany (BOOT), is currently looking for speakers and mentors, so if you’re interested, please contact Pablo Mestre (pmdcuba at gmail.com).
These are just a few of the many ideas that are beginning to take form, and I’ve mentioned only a few of the many people involved. But the excitement and momentum are truly building. The Python-Cuba work group communicates by mailman listserv. Please read the archives and subscribe to the list if you’d like to help.
I would love to hear from readers. Please send feedback, comments, or blog ideas to me at msushi@gnosis.cx.

May 20, 2016 01:01 PM

CubaConf, Day 1

This is the second in a series of posts on my trip in April to Havana, Cuba to attend CubaConf, an International Conference on Free Software. 
Day one of CubaConf started out with a bit of confusion. A last minute change of venue was necessary due to some bureaucratic red tape surrounding the government controlled Palacio del Segundo Cabo. Luckily, a short walk across the Plaza de Armas, the Colegia San Geronimo was available and happy to step in to provide meeting rooms for the approximately 180 speakers and attendees. And in spite of the spotty internet service that plagues the island, difficulties in communicating the change did not prevent the conference from starting smoothly and nearly on schedule. The organizers, including Pablo Mestre, a member of the PSF-Cuba workgroup, deserve much credit for their smooth handling of the situation.

Preliminary announcements and welcoming remarks revealed that speakers and attendees came from 17 different countries: Argentina, Bolivia, Brazil, Canada, Columbia, Costa Rica, Cuba, France, Germany, Italy, Mexico, Peru, Spain, Turkey, Uruguay, United States, and Venezuela. Sponsors, including the PSF, were mentioned and thanked. 
The keynote by Hamlet López García, a social psychologist from the Cuban Institute of Cultural Research at Juan Marinello, explored the relationship between free software and Cuba’s politics and culture. 
Hamlet López García
López' main thesis, (citing Richard Stallman), was that technologies develop as social processes and are shaped by cultural values. In this way, the general principles of the Cuban revolution can be seen to be in harmony with those of free software. The further adoption and use of free software, according to López, is leading to more democratic access to knowledge and opportunity, not just in Cuba, but globally. This opening talk was enthusiastically received and set a positive tone for the rest of the day.

Once the conference broke into three tracks, I attended a talk by Jacob Appelbaum on the TOR network and the importance of anonymity. Appelbaum explained the ways in which the TOR network was designed to ensure four types of freedom: it's decentralized, encrypted, distributed, and unlike other internet networks, meta-data free (i.e., it does not collect or aggregate meta-data).









Additional talks occurring on day one shared speakers' experiences using open source for projects such as collaborative mapping and creating an online payment system, as well as more theoretical topics such as web development and encryption. Former PSF Director, David Mertz, gave a talk on teaching Python to Data Scientists, a topic that he will reprise in Portland at PyCon's education summit at the end of this month. Talks were given in either English or Spanish, with simultaneous translation provided by one of several bilingual volunteers. 
Another talk worth singling out was a provocative talk by  Heather Marsh on the illusory nature of the power that users assume to derive from the internet. According to Marsh, such internet features as "thought bubbles" and "noise" pose obstacles to collaboration and to challenging the "Ponzi schemes of power." These ideas are more fully presented in Marsh's book, Binding Chaos.
At the end of the day, a tired, but excited crowd posed for a group photo before walking down the block to the conference dinner of Cuban food, mojitos, and beer.  (And by the way, beer costs about $1 per can/bottle--I almost didn't come home.)
CubaConf end of Day 1
Outside the Colegia San Geronimo
I would love to hear from readers. Please send feedback, comments, or blog ideas to me at msushi@gnosis.cx.

May 20, 2016 12:55 PM

Python and Open Source Alive and Well in Havana, Cuba

I recently had the amazing opportunity to travel to Havana, Cuba to attend several free software events. My partner, David Mertz, was invited to talk at a meet-up of open-software developers and to present at the International Conference of Free Software sponsored by the Grupo de Usarios de Technologias Libres.
On my first day in Cuba, I attended the tenth Encuentro Social de Desarrolladores. This group, a regular meet-up of open-software developers, just last month held the first "PyDay Havana." At the meeting I attended, approximately 70 people gathered at a local Havana restaurant, La Casa de Potin. I was told that more people were interested in attending, but the space was limited so advance registration was cut off at 70. Several members of the enthusiastic crowd sported PyCon T-shirts--many from PyCon Montreal, perhaps as one could expect, but one from as far back as PyCon Chicago in 2009 (elegance begets simplicity). Clearly, this group has been using Python for quite awhile.
I met some wonderful people there: not only Olemis Lang and Medardo Antonio Rodriguez, members of the PSF’s Python-Cuba Work Group with whom I had been in touch previously, but also entrepreneurs and developers who regularly use free software. Justin, a graduate student in Astronomy at Yale, is spending several months in Cuba on a research project using Python. 
Another new connection I made is Abel Meneses Abad, a Computer Science professor at Central University of Las Villas in Santa Clara, Cuba. He told me about his use of Python with his students in Linguistics and his desire to share his experiences and get input from the larger Python community. We should be hearing more from him in the future.
The agenda for the meet-up included talks by Olemis Lang on Brython (and how to sign up for a Brython sprint to be held at the next week’s CubaConf) and by David Mertz on functional programming in Python. 
David Mertz talks about functional programming in Python

Medardo and Stripe Atlas reps address the meet-up
But the talk that garnered the most discussion was a presentation given by Medardo Rodriguez from Merchise Start-Ups on how to start an online business. He was joined by representatives from the San Francisco-based company Stripe, which provides payment processing and business services for start-ups. Their newly launched service, Stripe Atlas, helps foreign online businesses incorporate in Delaware, MD, enabling them to take advantage of the well-developed business infrastructure in the U.S.

The overall mood of the meet-up was incredibly optimistic–surely a foreshadowing of the positive changes about to take place for Cuban software developers as more intercourse develops with the rest of the world and especially with the U.S. This is a community poised to grow, and I am beyond thrilled that the PSF will be a part of this.
I would love to hear from readers. Please send feedback, comments, or blog ideas to me at msushi@gnosis.cx.

May 20, 2016 12:54 PM