EuroPython 2015
Bilbao, 20-26 July
Euskalduna Conference Centre and Concert Hall
Fun fact #2
Streets in Bilbao have names both in Spanish and in Basque.
Open Street Maps displays names in one language and Google Maps is using the other one.
We came back with a lot of...
...knowledge about interesting talks that we would like to share today
MySQL 5.6 comes with some interesting features like:
- Managing replications
- Failover setup
- Orchestration of multiple machines
- Improved replications
MySQL version 5.6 and up comes with MySQL fabric that can be used to easily orchestrate machines (especially if you are using virtual machines) and setup failover solutions.
Also another interesting thing is that since this version, the replication mechanism was changed: it no longer keeps track in a binary log, but each master/slave contains a list of transactions, so slaves can replicate not only the last operations, but they can catch up with past operations (they just look what transactions were not yet synchronized and synchronize them).
Using various tools and text expanders for:
- Translating phrases
- Checking you IP
- Pretty formatting of code
- Automatic image processing when you upload a file to a folder
- etc.
Nice presentation about how to make your life easier with some automation tools and text expanders. Speaker talks about using Alfred for: translating phrases, checking you IP, checking weather or money conversion rates, pretty formatting of code, automatic image processing when you upload a file to a folder, etc.
He shows various tools for Mac but also gives alternatives for Linux and Windows.
Fun fact about Guido #1
His favorite text editor is ...
- Don't use hardcoded directory separators
- Use six library
- If six doesn't work, use you own conversion.py file
Another nice talk from a guy working for Amazon AWS. He talks about how to write code that will work nicely on various machines (for example, don't use hard-coded directory separators - because they are different on Linux: "dir/file" and on Windows "dir\file") and on different Python versions - six is a good library that allows you to prepare to move from Python2 to Python3 (you can also write your own conversion.py file that contains some conditional imports that you can later use in your project).
Tools and techniques for measuring the quality of the code:
- Cyclomatic complexity
- Halstead metrics
- Maintainability index
- radon
- pylint
- Good practices for code reviews
Speakers talks about various metrics that can help to measure the "quality" of the code and gives examples of the tools that could help you with getting those metrics (you don't want to calculate them each time by hand).
The second part of his talk is about code review - why it is important and what are the best practices for code review.
Fun fact about Guido #2
His favorite exception is ...
KeyboardInterrupt
Pattern based review tool for identifing issues and bugs:
Diferent way how to understand code using graph techniques.
https://ep2015.europython.eu/conference/talks/code-as-data-surprising-insights-we-get-when-stopping
Interactive visualization library for large datasets.
https://ep2015.europython.eu/conference/talks/big-data-beautiful-visualization-on-the-browser-with-bokeh
Library for building and running distributed, asynchronous workflows on different backends (Amazon SWF, Redis, Local).
def process_video(embed_subtitle, find_chapters, ...):
def workflow(video_URL, subtitle_URL):
new_URL = embed_subtitle(video_URL, subtitle_URL)
webm_URL = encode_video(new_URL, 'webm')
mpeg4_URL = encode_video(new_URL, 'mpeg4')
ad_tags = target_ads(subtitle_URL)
chapters = find_chapters(video_URL)
thumbnails = [extract_thumbnail(video_URL, c)
for c in chapters]
return video_URL, webm_URL, mpeg4_URL, thumbnails, ad_tags
return workflow
https://ep2015.europython.eu/conference/talks/big-data-beautiful-visualization-on-the-browser-with-bokeh
Save your time and avoid packaging-induced-pain.
How many of you knows what MANIFEST.in is? Have you ever released
package without needed file?
Check your manifest and include it in your CI tools.
Another tips are useful if you are creating package for various
python versions or operating systems.
Do not parse Python version yourself! Save yourself some troubles
and use selectors to specify dependencies.
Do you ♥ TTD but you hate waiting?
The usual developer problem when a testuite gets big. Should I run
the whole testsuite when I change only a small fraction of code?
People tend to re-run only failing tests but can one be sure that
passed tests are not failing again?
Testmon monitors code changes and executes only affected tests.
code line -> list of tests
pytest-watch
Fun fact about Python
It is time to write code for Python 2.7 3.5.
- matrix multipliers (@)
- type hints
- PEP492 - async
EuroPython 2015
Bilbao, 20-26 July