FLOSS Project Planets

Mike Gabriel: [Arctica Project] Release of nx-libs (version 3.5.99.6)

Planet Debian - Mon, 2017-04-24 10:12
Introduction

NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one.

NX (v3) has been originally developed by NoMachine and has been Free Software ever since. Since NoMachine obsoleted NX (v3) some time back in 2013/2014, the maintenance has been continued by a versatile group of developers. The work on NX (v3) is being continued under the project name "nx-libs".

Release Announcement

On Friday, Apr 21st 2017, version 3.5.99.6 of nx-libs has been released [1].

As some of you might have noticed, the release announcements for 3.5.99.4 and 3.5.99.5 have never been posted / written, so this announcement lists changes introduced since 3.5.99.3.

Credits

There are alway many people to thank, so I won't mention all here. The person I need to mention here is Mihai Moldovan, though. He virtually is our QA manager, although not officially entitled. The feedback he gives on code reviews is sooo awesome!!! May you be available to our project for a long time. Thanks a lot, Mihai!!!

Changes between 3.5.99.4 and 3.5.99.3
  • Use RPATH in nxagent now for finding libNX_X11 (our fake libX11 with nxcomp support added).
  • Drop support for various archaic platforms.
  • Fix valgrind issue in new Xinerama code.
  • Regression: Fix crash due to incompletely backported code in 3.5.99.3.
  • RPM packaging review by nx-libs's official Fedora maintainer (thanks, Orion!).
  • Update roll-tarball.sh script.
Changes between 3.5.99.5 and 3.5.99.4
  • Support building against libXfont2 API (using Xfont2, if available in build environment, otherwise falling back to Xfont(1) API)
  • Support built-in fonts, no requirement anymore to have the misc fonts installed.
  • Various Xserver os/ and dix/ backports from X.org.
  • ABI backports: CreatePixmap allocation hints, no index in CloseScreen() destructors propagated anymore, SetNotifyFd ABI, GetClientCmd et al. ABI.
  • Add quilt based patch system for bundled Mesa.
  • Fix upstream ChangeLog creation in roll-tarball.sh.
  • Keystroke.c code fully revisited by Ulrich Sibiller (Thanks!!!).
  • nxcomp now builds again on Cygwin. Thanks to Mike DePaulo for providing the patch!
  • Bump libNX_X11 to a status that resembles latest X.org libX11 HEAD. (Again, thanks Ulrich!!!).
  • Various changes to make valgrind more happy (esp. uninitialized memory issues).
  • Hard-code RGB color values, drop previously shipped rgb.txt config file.
Changes between 3.5.99.6 and 3.5.99.5
  • Regression fix for 3.5.99.5: Now fonts are display correctly again after session resumption.
  • Prefer source tree's nxcomp to system-wide installed nxcomp headers.
  • Provide nxagent specific auto-detection code for available display numbers (see nxagent man page for details, under -displayfd).
  • Man page updates for nxagent (thanks, Ulrich!).
  • Make sure that xkbcomp is available to nxagent (thanks, Mihai!).
  • Switch on building nxagent with MIT-SCREEN-SAVER extension.
  • Fix FTBFS on SPARC64, arm64 and m86k Linux platforms.
  • Avoid duplicate runs of 'make build' due to flaw in main Makefile.
Change Log

Lists of changes (since 3.5.99.3) can be obtained from here (3.5.99.3 -> .4), here (3.5.99.4 -> .5) and here (3.5.99.5 -> .6)

Known Issues

A list of known issues can be obtained from the nx-libs issue tracker [issues].

Binary Builds

You can obtain binary builds of nx-libs for Debian (jessie, stretch, unstable) and Ubuntu (trusty, xenial) via these apt-URLs:

Our package server's archive key is: 0x98DE3101 (fingerprint: 7A49 CD37 EBAE 2501 B9B4 F7EA A868 0F55 98DE 3101). Use this command to make APT trust our package server:

wget -qO - http://packages.arctica-project.org/archive.key | sudo apt-key add -

The nx-libs software project brings to you the binary packages nxproxy (client-side component) and nxagent (nx-X11 server, server-side component). The nxagent Xserver can be used from remote sessions (via nxcomp compression library) or as a next Xserver.

Ubuntu developers, please note: we have added nightly builds for Ubuntu latest to our build server. At the moment, you can obtain nx-libs builds for Ubuntu 16.10 (yakkety) and 17.04 (zenial) as nightly builds.

References
Categories: FLOSS Project Planets

FeatherCast: Jean-Frédéric Clere, Barcamp Apache and Apachecon North America

Planet Apache - Mon, 2017-04-24 09:45

An important event at Apachecon North America will be the #BarCampApache.  It is a free event where the content is organised by the attendees. Here we talk to Jean- Frederic Clere about the barcamp and his role as facilitator.

https://feathercastapache.files.wordpress.com/2017/04/barcamp-clere.mp3

Register for Apachecon at apachecon.com


Categories: FLOSS Project Planets

Doug Hellmann: zlib — GNU zlib Compression — PyMOTW 3

Planet Python - Mon, 2017-04-24 09:00
The zlib module provides a lower-level interface to many of the functions in the zlib compression library from the GNU project. 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.
Categories: FLOSS Project Planets

Mike Driscoll: PyDev of the Week: Honza Král

Planet Python - Mon, 2017-04-24 08:30

This week we welcome Honza Král (@HonzaKral) as our PyDev of the Week! Honza is one of the core developers of the Django web framework. He is also the maintainer of the official Python client to Elasticsearch. You can see some of the projects he is interested in or working on over at Github. Let’s spend some time getting to know Honza better!

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

I grew up in the Old Town of Prague, Czech Republic where I also went to school, including University where I studied computer science (which I didn’t finish). During my studies I discovered Python and immediately fell in love, first with the language and later, after going to my first Pycon in 2008, with the community.

I became a part of the Django community which was (and still is to this day) very welcoming. I became a part of it to learn and, hopefully, contribute something back. For my part it worked amazingly well – I got all my recent jobs through the community and even met my fiancee at a EuroPython conference!

Nowadays I work for Elastic, the company behind Elasticsearch where I do consulting – traveling around the world helping people be successful with open source – and also maintain the official Python client.

Why did you start using Python / Django?

I started in university for a project. I had my eye on Python for some time then and a perfect opportunity presented itself to use it for one of our team projects – we decided it would be a web-based application and Django was the shiny new thing that caught my attention. I introduced it to the rest of the team and have been using it ever since.

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

My other favorite, besides Python of course :), would be shell – I still enjoy writing both simple (or a bit more complex) one-liners as well as longer scripts in shell. I like the variety of it where you have so many possibilities on how to accomplish things with a seemingly limited language. I like how it’s very unlike other languages I am used to working in as it forces you to think more in terms of pipelines and “just” passing off problems to another app/language. It definitely helped my Python skills as well I think – thinking of what I need to keep in a list/variable vs where a simple generator would suffice (as would a pipeline in shell) etc.

Right now I am looking at rust and hoping that a suitable project will come along for me to give it a serious try.

What projects are you working on now?

Currently I am working on elasticsearch-dsl which is an ORM-like abstraction on top of elasticsearch. It is an ambitious project since I wanted to expose all the power of elasticsearch’s query DSL while also trying to make it more accessible to non-experts and generally friendlier. While I think that in some areas I might have achieved this, I still have a long way to go in others; and for some I don’t even see the clear path of what needs to happen which makes it interesting – gives me something to ponder

Categories: FLOSS Project Planets

Import Python: Import Python Weekly Issue 122 - Django ORM vs SQLAlchemy, Type annotation, websockets and more

Planet Python - Mon, 2017-04-24 08:11
Worthy Read
Django ORM vs SQLAlchemy – Vizbi Recently I started using SQLAlchemy and am very impressed with it. I have used Django ORM a lot in the past. This post compares achieving same result using Django and with SQLAlchemy. Let’s see which looks more intuitive.
django, SQLAlchemy, ORM
Know when and why code breaks Users finding bugs? Searching logs for errors? Find + fix broken code fast! You can find the Python integration here - https://rollbar.com/docs/notifier/pyrollbar/
sponsor
Python Type Annotation with Graph Algorithms. Part II (Classes) In this part, we will implement graph data structure using classes and interfaces, and discuss when it’s worth overruling type hints.
type annotation, graph
Speeding up Websockets 60X I recently I had the opportunity to speed up some Websocket code that was a major bottleneck. The final solution was 60X (!) faster than the first pass, and an interesting exercise in optimizing inner loops.
websockets
Graph Databases: Talking about your Data Relationships with Python This trouble to visualise the relationship between entities in a Relational Database is a great reason to introduce the concept of graph. Graph is a data structure formed by a set of vertices V and a set of edges E. It can be represented graphically (where the vertices are shown as circles and edges are shown as lines) or mathematically in the form G = (V, E).
graph databases
Modifying the Python language in 6 minutes This week I raised my first pull-request to the CPython core project, which was declined :-( but as to not completely waste my time I’m writing my findings on how CPython works and show you how easy it is to modify the Python syntax.
core-python, cpython
Realtime Web Apps with Nginx Nchan and Python Nchan makes writing realtime web based pub/sub applications a breeze. In this article, we will build a simple systems monitoring dashboard which displays process information in realtime similar to what you would see when you run the unix top or htop commands.
nginx, nchan
Intersection of Non-Empty Sets in Python Suppose you generate several sets on the fly, and you want to find the elements that are in all the sets. That's easy, it's the intersection of sets.
list, set, code_snippets
Monitoring Directories for File Changes using Watchdog I was working recently on writing Python code using TDD. So every time I change code I wanted to run command that will test my code if it pass unit tests. In order to do that I needed some service/app that will monitor for file changes, and if it changes execute my batch file that runs unit tests.
python, watchdog
Find Top Developers We help companies like Airbnb, Pfizer, and Artsy find great developers. Let us find your next great hire. Get started today.
sponsor
Jupyter Notebook in project’s virtual env jupyter
AWS Lambda now supports 3.6 aws, lamda
SQL Server 2017: Advanced Analytics with Python In this session you will learn how SQL Server 2017 takes in-database analytics to the next level with support for both Python and R; delivering unparalleled scalability and speed with new deep learning algorithms built in.
sqlserver
Control-C handling in Python and Trio core-python
Kubernetes Scheduling in Python kubernetes
Learn a Python script for automating the process of publishing podcasts podcast

Projects
algorithms: - 2112 Stars, 174 Fork Minimal examples of data structures and algorithms in Python
jokekappa - 74 Stars, 7 Fork A library for delivering one-line programming jokes
cashier - 53 Stars, 2 Fork Persistent caching for python functions
crickbuzz_cricket_score - 13 Stars, 2 Fork A Terminal based program to follow live cricket score by scraping crickbuzz.com
MigrateGitlabToGogs - 3 Stars, 0 Fork Migrate repositories from Gitlab to Gogs or Gitea
venvdetect - 3 Stars, 1 Fork Detect available Python virtual environments in your current directory
Categories: FLOSS Project Planets

Django Weekly: Django Weekly 35 - Signals, Django Rest Framework, Djangocon 2017

Planet Python - Mon, 2017-04-24 08:09
Worthy Read
Understanding Django signalsIn many cases when there is a modification in a model’s instance we need execute some action. Django provides us an elegant way to handle with these situations. The signals are utilities that allow us to associate events with actions. We can develop a function that will run when a signal calls it.
signals
Know when and why code breaksUsers finding bugs? Searching logs for errors? Find + fix broken code fast!. You can find the Python integration here - https://rollbar.com/docs/notifier/pyrollbar/
sponsor
Getting Started with Django Rest FrameworkSort of a learning path made up of curated articles.
DRF
Estimated counts for faster Django Admin change_listOne of our tables grew to over 25 million rows. Which, while not a large number, makes the most frequent queries slow. A direct effect it had was on our Admin panel. The change_list form for the model started taking ages to load.
admin
DjangoCon 2017I love DjangoCon. I've been going to it almost every year since I arrived in Europe back in 2010. Sure, a considerable portion of my career has been based on Django, but it's more than that: the community is stuffed full of amazing people who genuinely want us all to succeed and that just makes the conference all the more exciting.
djangocon
Find Top DevelopersWe help companies like Airbnb, Pfizer, and Artsy find great developers. Let us find your next great hire. Get started today.
sponsor
Setting up Python 3, Django and Gunicorn on Ubuntu 16.04 LTSinstallation
DjangoCon US 2017DjangoCon US is a six-day international conference for the community by the community, held each year in North America, about the Django web framework. Early bird tickets avialable.
django, djangocon

Projects
django-webpacker - 18 Stars, 1 ForkA django compressor tool that bundles css, js files to a single css, js file with webpack and updates your html files with respective css, js file path.
django-starter-kit - 12 Stars, 0 ForkOpinionated template for Django projects on Python 3 and PostgreSQL.
mnm - 9 Stars, 0 ForkMastodon Network Monitoring: track and display browsable stats about Mastodon network (instances, toots, users...).
django-multicore - 4 Stars, 0 ForkA framework that makes it easy to parallelize Django code
django-freeradio - 4 Stars, 4 ForkA Django project for managing a radio station for a community radio station. The code was originally based on the Django website for Brum Radio, and was open sourced as part of a sprint session at DjangoCon Europe 2017.
django-confirmation-mixin - 3 Stars, 0 ForkDjango ConfirmationMixin for CreateView and UpdateView
Categories: FLOSS Project Planets

Third & Grove: Third & Grove presents at Magento Imagine Conference 2017

Planet Drupal - Mon, 2017-04-24 07:05
Third & Grove presents at Magento Imagine Conference 2017 antonella Mon, 04/24/2017 - 07:05
Categories: FLOSS Project Planets

eGenix.com: PyDDF Python Spring Sprint 2017

Planet Python - Mon, 2017-04-24 07:00

The following text is in German, since we're announcing a Python sprint in Düsseldorf, Germany.

Ankündigung

PyDDF Python Frühlings-Sprint 2017 in
Düsseldorf


Samstag, 06.05.2017, 10:00-18:00 Uhr
Sonntag, 07.05.2017, 10:00-18:00 Uhr

trivago GmbH,  Karl-Arnold-Platz 1A,  40474 Düsseldorf

Informationen Das Python Meeting Düsseldorf (PyDDF) veranstaltet mit freundlicher Unterstützung der trivago GmbH ein Python Sprint Wochenende im Mai.

Der Sprint findet am Wochenende 6./7.5.2017 in der trivago Niederlassung am Karl-Arnold-Platz 1A statt (nicht am Bennigsen-Platz 1). Folgende Themengebiete haben wir als Anregung angedacht:
  • Openpyxl
Openpyxl ist eine Python Bibliothek, mit der man Excel 2010+ Dateien lesen und schreiben kann.

Charlie Clark ist Co-Maintainer des Pakets.
  • Telegram-Bot

Telegram ist eine Chat-Anwendung, die von vielen Nutzern verwendet wird. Telegram unterstützt das Registrieren von sogenannten Bots - kleinen Programmen, die man vom Chat aus ansteuern kann, um z.B. Informationen zu bekommen.

Im Sprint wollen wir versuchen, einen Telegram-Bot in Python zu schreiben.

  • Jython (Python in Java implementiert)

    Stefan Richthofer, einer der Jython Core Entwickler, wird anwesend sein und über ein Jython Thema sprinten, z.B.

    Using Jython:
    - Jython basics
    - Python/Java integration
    - GUI mit JavaFX in Python

    Developing Jython:
    - Jython internals
    - Bugfixes in Jython core - Können wir ein paar echte Bugs beheben?

    Experimentelles (Was ist schon implementiert? Wir probieren es aus!):
    - JyNI
    - Jython 3
Natürlich kann jeder Teilnehmer weitere Themen vorschlagen, z.B.
  • RaspberryPi-Robot (einen Roboter mit einem Raspi ansteuern)
  • u.a.
Anmeldung und weitere Infos

Alles weitere und die Anmeldung findet Ihr auf der Sprint Seite:

Teilnehmer sollten sich zudem auf der PyDDF Liste anmelden, da wir uns dort koordinieren:
Über das Python Meeting Düsseldorf

Das Python Meeting Düsseldorf ist eine regelmäßige Veranstaltung in Düsseldorf, die sich an Python Begeisterte aus der Region wendet.

Einen guten Überblick über die Vorträge bietet unser PyDDF YouTube-Kanal, auf dem wir Videos der Vorträge nach den Meetings veröffentlichen.

Veranstaltet wird das Meeting von der eGenix.com GmbH, Langenfeld, in Zusammenarbeit mit Clark Consulting & Research, Düsseldorf.

Viel Spaß !

Marc-Andre Lemburg, eGenix.com

Categories: FLOSS Project Planets

ReleaseMe CI States, Help, Git

Planet KDE - Mon, 2017-04-24 06:44

Since we recently wired up the KDE release tool releaseme with KDE neon’s git-build technology I had the opportunity to spend some quality time on the code and managed to sneak in a load of both quality and speed improvements as well as some new features.

CI States

For quite a while I’ve been considering to pull CI data into releaseme. It makes all sorts of sense. You want to release high-quality software, so whenever possible you’d want to make sure CI is green. But to do that you’d have to open a browser, navigate to build.kde.org, and find the right jobs. Yet, there is absolutely no reason why a human would have to do that. So now releaseme does it for you before getting started on assembling the sources.

Help

Unfortunately, the release process itself is often a bit convoluted and it is not clear what to do once you have a tarball. To help people with publishing their new tarball releaseme will now print a handy help suggesting common steps to take once you have a tarball. It also points to the relevant location for publishing tarballs on KDE infrastructure and even gives you a handy link with a sysadmin ticket template to quickly file a publishing request.

Git Builds

Aleix Pol worked on adding a cool new feature to the extra-cmake-modules frameworks, enabling everyone who builds from git to fetch translations as well. This is currently slated to release with KDE Frameworks 5.34. Once landed you’ll be able to run make fetch-translations with just about any git clone of KDE software and grab the latest translations into your build directory.

Categories: FLOSS Project Planets

Efficient barcode scanning with QZXing

Planet KDE - Mon, 2017-04-24 05:00

QZXing is a very useful library: It provides an easy to use Qt integration API around the barcode scanning library ZXing (zebras crossing).

Because it is so easy to setup QZXing in a Qt application, we and most of our customers end up using it when they need to scan images for barcodes. There is, or rather was, a big problem though: When you want to analyze a live camera video stream, e.g. from a phone camera, the latency can …

The post Efficient barcode scanning with QZXing appeared first on KDAB.

Categories: FLOSS Project Planets

EuroPython: EuroPython 2017: How you can sponsor us

Planet Python - Mon, 2017-04-24 04:54

Check out our brand new brochure with all details about our sponsor packages, options and lounge events, available on our website.

Sponsoring EuroPython guarantees you highly targeted visibility and the opportunity to present yourself and your company in a professional and innovative environment. 


With more than 1200 participants, 8 days conference program, international keynotes, more than 200 talks, training sessions for beginners, advanced and experts, EuroPython creates an excellent environment to look for new job-opportunities, recruit people, connect, share and learn. 

New Attractive Location for 2017

This year we move to the Palacongressi in Rimini, the largest convention centre in Italy, unique in its design and technology, with 11,000 m² exhibit space, in addition to 39 conference rooms. Check out EuroPython demographics, refresh your mind with our beautiful location and consult the different opportunities we have created for you

Available Sponsor Options

We offer 7 different sponsor packages, with different levels of engagement.

Would you rather have more flexibility? You can separately book special events and choose from a list of very prominent advertisement options: have a table in the training session or get your logo to be by the ice-cream stall; sponsor our laser-tag and party events. 

Do you have further ideas? We can help you develop a tailored sponsorship package that fits your specific targets. If you would like to engage and sponsor EuroPython 2017, please contact us by e-mail.

Don’t miss the chance to become part of the largest Python conference in Europe!

Enjoy,

EuroPython 2017 Team
http://ep2017.europython.eu/
http://www.europython-society.org/

Categories: FLOSS Project Planets

Norbert Preining: Leaving for BachoTeX 2017

Planet Debian - Sun, 2017-04-23 22:20

Tomorrow we are leaving for TUG 2017 @ BachoTeX, one of the most unusual and great series of conferences (BachoTeX) merged with the most important series of TeX conference (TUG). I am looking forward to this trip and to see all the good friends there.

And having the chance to visit my family at the same time in Vienna makes this trip, how painful the long flight with our daughter will be, worth it.

See you in Vienna and Bachotek!

PS: No pun intended with the photo-logo combination, just a shot of the great surroundings in Bachotek

Categories: FLOSS Project Planets

PythonClub - A Brazilian collaborative blog about Python: Configurando OpenShift com Python 3.5 + Flask + Gunicorn

Planet Python - Sun, 2017-04-23 19:37

Configurando OpenShift com Python 3.5

Introdução

O OpenShift é uma plataforma de PasS que possibilita aos desenvolvedores "subir" aplicações na nuvem de uma maneira simples e rápida. Ele funciona a partir de gears(engrenagens) que representam máquinas que irão rodar as aplicações. Dentro de cada gear é possível instalar serviços, os são chamados de "cartridges".

Existem 3 planos:

  • Online (gratuito, com três gears)
  • Enterprise (pago com suporte)
  • Origin (versão da comunidade e pode ser utilizado livremente)

Um problema que me deparei ao utilizar o Openshift é que ele não possui um cartridge com Python3.5. Porém existe uma forma um pouco mais complicada de resolver esse problema.

Após fazer seu cadastro no OpenShift e instalar o client tools que contém as ferramentas necessárias para configurar nossa aplicação.

Após tudo isso vamos colocar a mão na massa, abra seu terminal e vamos lá.

Criando a aplicação rhc app create <app-name> https://raw.githubusercontent.com/Grief/openshift-cartridge-python-3.5/master/metadata/manifest.yml diy-0.1

Substituindo "<app-name>" pelo nome de sua aplicação. O arquivo manifest.yml criado por Changaco(github) e "forkeado" por Grief(github) contém as configurações de um cartridge customizado que contém o python 3.5.

Para os curiosos o conteúdo do arquivo

--- Name: python Cartridge-Short-Name: PYTHON Display-Name: Only Python Description: 'An embedded cartridge that provides only python, nothing else.' Version: '3.5.0' Versions: ['3.5.0', '2.7.11'] License: The Python License License-Url: http://docs.python.org/3/license.html Vendor: python.org Cartridge-Version: 0.0.2 Cartridge-Vendor: praisebetoscience Categories: - service - python - embedded Website: https://github.com/praisebetoscience/openshift-cartridge-python-3.5 Help-Topics: Developer Center: https://www.openshift.com/developers Provides: - python Publishes: Subscribes: set-env: Type: ENV:* Required: false set-doc-url: Type: STRING:urlpath Required: false Scaling: Min: 1 Max: -1 Version-Overrides: '2.7.11': Display-Name: Python 2.7 License: The Python License, version 2.7 Provides: - python-2.7 - python - python(version) = 2.7 '3.5.0': Display-Name: Python 3.5 License: The Python License, version 3.5 Provides: - python-3.5 - python - python(version) = 3.5

Após isso sua aplicação já estárá executando, caso deseje acessar o endereço da mesma deverá ser http://<app-name>-.rhcloud.com. Você verá que a página do seu projeto não é nada mais do que o diy (Dot It Yourself), que é uma aplicação Ruby de exemplo que você pode alterar, e é o que vamos fazer.

Se você acessar o diretório do seu projeto verá que existe um diretório ".openshift", dentro desse diretório existe um outro diretório chamado "action_hooks", e dentro desse diretório existem dois arquivos "start" e "stop".

  • "<app-name>/.openshift/action_hooks/start"
  • "<app-name>/.openshift/action_hooks/stop"

Os dois arquivos são respectivamente os comandos para "subir" e "pausar" sua aplicação.

Flask

Vamos criar um projeto de exemplo, bem simples, que apenas nos retorne a versão do python utilizada. Primeiramente vamos criar nosso requirements.txt, com gunicorn e o flask.

"requirements.txt"

gunicorn flask

Depois disso vamos criar o arquivo app.py que conterá nossa aplicação.

"app.py"

import sys from flask import Flask app = Flask(__name__) @app.route('/') def index(): return sys.version

Após isso basta fazer o commit de suas alterações.

shell git add . git commit -am 'Minhas alterações'

Após isso você verá que sua aplicação não está rodando, pois ainda não alteramos os arquivos "start" e "stop".

Configurando o Gunicorn no Start e Stop

O projeto diy do openshift nos deixa uma variável de ambiente $OPENSHIFT_DIY_IP com o IP da máquina, dessa forma podemos passar a variável e porta ao gunicorn.

"start"

#!/bin/bash nohup $HOME/python/usr/bin/pip3 install -r $OPENSHIFT_REPO_DIR/requirements.txt cd $OPENSHIFT_REPO_DIR nohup $HOME/python/usr/bin/gunicorn app:app --bind=$OPENSHIFT_DIY_IP:8080 |& /usr/bin/logshifter -tag diy &

A primeira linha é o Shebang, o que significa que esse arquivo será executado pelo bash. Na segunda linha vemos nohup, que executa os comandos em uma sessão separada, vemos logo apóes vemos o uma chamada ao pip para instalar nossas dependências. Na terceira linha vemos o nohup, e depois o gunicorn inicializa nossa aplicação flask.

Isso só funciona pois o cartridge customizado instala o python3.5 dentro da pasta home do servidor do openshift.

"stop"

#!/bin/bash source $OPENSHIFT_CARTRIDGE_SDK_BASH # The logic to stop your application should be put in this script. if [ -z "$(ps -ef | grep gunicorn | grep -v grep)" ] then client_result "Application is already stopped" else kill `ps -ef | grep gunicorn | grep -v grep | awk '{ print $2 }'` > /dev/null 2>&1 fi

Podemos ver que o comando ps procura algum processo do gunicorn, caso ele exista o kill será chamado.

Após isso, é só fazer o commit das alterações e você verá sua aplicação rodando.

Espero que o post ajude a quem quer subir alguma aplicação com python3.5 e só tem o heroku como opção.

Referências
Categories: FLOSS Project Planets

Evennia: The luxury of a creative community

Planet Python - Sun, 2017-04-23 19:10
For this blog post I want to focus on the series of very nice pull requests coming in from a growing cadre of contributors over the last few months.

Contributed goodness

People have put in a lot of good work to boost Evennia, both by improving existing things and by adding new features. Thanks a lot everyone (below is just a small selection)!
  •  Contrib: Turn-based combat system - this is a full, if intentionally bare-bones implementation of a combat system, meant as a template to put in your particular game system into.
  • Contrib: Clothing sytem - a roleplaying mechanic where a character can 'wear' items and have this show in their descriptions. Worn items can also be layered to hide that underneath. Had plenty of opportunities for extensions to a given game.
  • Contrib: An 'event' system is in the works, for allowing privileged builders to add dynamic code to objects that fires when particular events happen. The PR is not yet merged but promises the oft pondered feature of in-game coding without using softcode (and notably also without the security of softcode!). 
  • A lot of PRs, especially from one user, dealt with cleanup and adherence to PEP8 as well as fixing the 'alerts' given by LGTM on our code (LGTM is by the way a pretty nifty service, they parse the code from the github repo without actually running it and try to find problems. Abiding by their advice results is cleaner code and it also found some actual edge-case bugs here and there not covered by unit tests. The joint effort has brought us down from some 600+ alerts to somewhere around 90 - the remaining ones are alerts which I don't agree with or which are not important enough to spend effort on). 
  • The help mechanics of Evennia were improved by splitting up the default help command into smaller parts, making it easier to inject some changes to your help system without completely replacing the default one. 
  • Evennia's Xterm256 implementation was not correctly including the additional greyscale colors, those were added with new tags |=a ... |=z.
  • Evennia has the ability to relay data to external services through 'bots'. An example of this is the IRC bot, which is a sort of 'player' that sits in an in-game channel and connects that to a counterpart-bot sitting in a remote IRC channel. It allows for direct game-IRC communication, something enjoyed by people in the Evennia demo for many years now. The way the bot was defined used to be pretty hard-coded though. A crafty contributor changed that though, but incorporating the bot mechanism into Evennia's normal message flow. This allows for adding new types of bots or extending existing ones without having to modify Evennia's core. There is already an alternative IRC bot out there that represents everyone in the IRC room as a room full of people in the MUD. 
  • Evennia's Attributes is a database table connected to other objects via a ForeignKey relation. This relation is cached on the object. A user however found that for certain implementations, such as using Attributes for large coordinate systems, non-matches (that is failed Attribute lookups on the object) can also be cached and leads to dramatic speed increases for those particular use cases. A PR followed. You live and learn.
  • Another contributor helped improve the EvEditor (Evennia's VIM-like in-game text editor) by giving it a code-mode for editing Python code in-game with auto-indents and code execution. Jump into the code mode with the command @py/edit.
  • Time scheduling is another feature that has been discussed now and then and has now been added through a PR. This means that rather than specifying 'Do this in 400 seconds' you can say 'do this at 12AM, in-game time'. The core system works with the real-world time units. If you want 10 hours to a day or two weeks to a month the same contributor also made an optional calendar contrib for that!
  • A new 'whisper' command was added to the Default cmdset. It's an in-game command for whispering to someone in the same room without other people hearing it. This is a nice thing to have considering Evennia is out-of-the-box pretty much offering the features of a 'talker' type of game.
  • Lots of bug fixes big and small!
  • Some at_* hooks were added, such as at_give(giver, getter). This allows for finer control of the give process without handling all the logics at the command level. There are others hooks in the works but those will not be added until in Evennia 0.7. 
About that Evennia 0.7 ...

So while PRs are popping up left and right in master I've been working in the devel branch towards what will be the Evennia 0.7 release. The branch is not ready for public consumption and testing yet But tentatively it's about halfway there as I am slowly progressing through the tickets. Most of the upcoming features were covered in the previous blog post so I'll leave it at that.

I just want to end by saying that it's a very luxurious (and awesome) feeling for me to see master-branch Evennia expand with lots of new stuff "without me" so to speak. The power of Open Source indeed!
  

Image from http://maxpixel.freegreatpicture.com, released as public domain.
Categories: FLOSS Project Planets

PyBites: Code Challenge 16 - Query Your Favorite API

Planet Python - Sun, 2017-04-23 18:01

Hi Pythonistas, a new week, a new 'bite' of Python coding! This week we'll let you play with Web APIs. They are fun to fiddle with and great for learning and building cool things. Enjoy!

Categories: FLOSS Project Planets

Tim Millwood: Workspaces, Deploy, and Relaxed web services

Planet Drupal - Sun, 2017-04-23 17:00
Workspaces, Deploy, and Relaxed web services

A few weeks ago I recorded an updated screencast of the Workspace, Deploy, and Relaxed Web services module. Here it is:

Please comment, tweet, IRC, or Slack any questions.

timmillwood Sun, 23/04/2017 - 22:00 Tags drupal-planet drupal 8 Add new comment
Categories: FLOSS Project Planets

PyBites: Twitter digest 2017 week 16

Planet Python - Sun, 2017-04-23 14:04

Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.

Categories: FLOSS Project Planets

Riccardo Mottola: GNUstep Graphos 0.6

GNU Planet! - Sun, 2017-04-23 12:12
After (too) many years, finally a new release of Graphos.

This release has two new important features: cusps and images.

Splines support now cusps, that is left and right asymmetrical tangents to a control point.

A new image item object exists. This allows you to paste a preferably small image and move it around like it were a box, resizing it at will.
This is quite useful to be able to manually overlay lines and trace images.
Since the image is directly encoded in the file and not saved as a separate image it is not very efficient and using large images is not advisable. In the future a new bundle file format needs to be implemented.



The screenshot shows an example of tracing the GNUstep logo imported as a bitmap, using the cusp point in the upper right.

Many bug fixes and improvements in these past years, some major:
  •  Text improvements (editor display, reading/&saving, Mac support)
  •  Circles/Ovals save/read fix
  •  Properties inspector fixes
  •  Portability fixes
To support cusps, the file format changed again, reading of old formats is still supported.
Categories: FLOSS Project Planets

Lullabot: Clayton Dewey on Drutopia

Planet Drupal - Sun, 2017-04-23 10:00
In this episode of Hacking Culture, Matthew Tift talks with Clayton Dewey about Drutopia, an initiative to revolutionize the way we build online tools
Categories: FLOSS Project Planets

Shawn McKinney: Advice for the graduating computer science student (on finding their first professional job)

Planet Apache - Sun, 2017-04-23 09:39

I’ve been mentoring a graduating senior in computer science.  Here’s what I told him…

First, read the 10 steps to becoming the developer everyone wants.  It contains some pretty good strategies for what to do after you’ve landed that first job, how to become indispensable.

But even if you get that first job straight away, it’s never too early to start building a public reputation.  If you’re not already a member, join the social media outlets like linkedin, twitter, and the like.  Where you can collaborate over concepts and ideas. Linkedin has some pretty good groups to join.  Once you become fluent in a topic, you can start your own group.  For example, here’s one that I manage: Linkedin Open Source IAM group.

Even more important, open a github account and start publishing work there.  Read about The impact github is having on your software career.

Also be sure to join tech groups in your hometown.  These will put you in the same room with like-minded professionals.  Here’s one that I’ve recently joined: Little Rock JUG.

Then publish articles about topics that interest you.  If they interest you they will likely interest others.  Write about the research that you have completed.  Yes, the nitty-gritty details.  People love technical details when well thought out.  Retweet articles (written by others) that you like or agree with. Follow people that have work that you admire rather than for personal (friendship) reasons.  If you see something you like, let the other person know, ask questions about it.  If you see something you disagree with, offer constructive criticisms.  Above all be respectful and positive in your communications with others.  This is healthy collaboration in action and will be an important part of your technical career, as it blossoms.

Forget about being the genius capable of writing superb software all by yourself.  That genius is a unicorn, at most 1% of the population.  If that’s you (and I don’t think that it is) congratulations and carry on!  You won’t need any more of my advice.  Otherwise, if like 99% of the population (the rest of us), you absorb knowledge by working around others. Surround yourself with the smartest people you can find.  Be humble.  Admit that you don’t understand how it works yet.  Keep your mouth (mostly) shut until you’ve learned from the people who came before, the current experts.  They will respect you for that and will encourage your ideas as they become viable.  Later, once you’ve mastered the basics, you may tell them how to improve, and they will listen.

Eventually, perhaps after many years (less if you are lucky), you’ll have earned a good public reputation, and with it, a large number of loyal followers.  These people will then help you communicate about software projects that you’re interested in.  The latest releases of your software, conferences that you’re speaking at, articles that you’ve written, etc…

Afterwards you need not worry about finding a job again.  They will find you.  A public reputation supersedes any single organizational boundary and gives you complete control over your career’s path.


Categories: FLOSS Project Planets
Syndicate content