Hi, my name is Jürgen Gmach, and I am an open-source advocate by heart.
Although I started writing code already at the age of 13 (generation C64), and I have been a professional software engineer since 2007, I only started contributing to open-source software a couple of years ago.
While I had been using many open-source applications and tools like Drupal, WordPress, Roundcube, Dovecot, Postfix, Apache, Nginx, PHP, Python, and a few Linux distributions for several years, I never felt the need or the urge to contribute to them - they just worked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: | |
- create and activate a virtual env | |
- `pip install launchpadlib` | |
- run `python main.py https://launchpad.net/~deadsnakes` | |
API: | |
https://launchpad.net/+apidoc/devel.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# packages is a list of packages, created from the configuration object (config.job.packages), | |
# but also external plugins can extend this list | |
# so I need something like this here | |
packages = list(itertools.chain(*pm.hook.lpcraft_install_packages())) | |
packages_cmd = ["apt", "install", "-y"] + packages | |
emit.progress("Installing system packages") | |
with emit.open_stream(f"Running {packages_cmd}") as stream: | |
proc = instance.execute_run( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pi_approx.py | |
from math import pi | |
def approximate_pi(iteration_count: int) -> float: | |
sign, result = 1, 0.0 | |
for at in range(iteration_count): | |
result += sign / (2 * at + 1) | |
sign *= -1 | |
return result * 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tox on rewrite [$?] via 🐍 v2.7.17 | |
❯ tox4 -r -e flake8 | |
flake8: remove tox env folder /home/jugmac00/Projects/tox/.tox/4/flake8 | |
flake8: install_deps> python -I -m pip install flake8-bugbear==20.11.1 flake8-comprehensions==3.3.1 flake8-pytest-style==1.3 flake8-spellcheck==0.23 flake8-unused-arguments==0.0.6 flake8==3.8.4 | |
flake8: commands[0]> flake8 src tests docs | |
src/tox/pytest.py:66:1: PT004 fixture 'ensure_logging_framework_not_altered' does not return anything, add leading underscore | |
src/tox/pytest.py:111:1: PT004 fixture 'check_os_environ_stable' does not return anything, add leading underscore | |
src/tox/pytest.py:118:1: PT004 fixture 'no_color' does not return anything, add leading underscore | |
src/tox/pytest.py:274:1: PT004 fixture 'enable_pep517_backend_coverage' does not return anything, add leading underscore | |
src/tox/pytest.py:565:1: PT005 fixture '_invalid_index_fake_port' returns a value, remove leading underscore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ ./configure --with-pydebug --enable-shared | |
❯ make -j2 -s | |
Python build finished successfully! | |
❯ ./python | |
./python: error while loading shared libraries: libpython3.9d.so.1.0: cannot open shared object file: No such file or directory | |
This is reproducible on Linux (Ubuntu 18.04) with the `enable-shared` option. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
cache = dict() | |
def get_data(): | |
if not cache.get("items"): | |
sleep(10) # simulates waiting for data | |
items = ["a", "b", "c"] | |
cache["items"] = items |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
branch: 3.9.0b5 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import os.path | |
import sys | |
import gocept.httpserverlayer.plonetestingzope as gc_httpserverlayer_zope | |
import gocept.selenium | |
import plone.testing.layer | |
import plone.testing.zodb | |
import plone.testing.zope as plone_testing_zope | |
import Products.MailHost.tests.testMailHost |
NewerOlder