I hereby claim:
- I am b3ql on github.
- I am b3ql (https://keybase.io/b3ql) on keybase.
- I have a public key ASBtoYLiGte8kq9W3zCfEozC2AD_MyObNDtQL8tDy1i5QAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
My simple service discovery mechanism is built upon Python 3.4 and the asyncio module. It uses a UDP socket bound to a specified discovery port to allow applications to discover network services. System applications running on the same node bind to the same discovery port in order to receive discovery messages broadcast onto the network.
It is not working on OSX. The current asyncio implementation does not provide a convenient developer access point for setting the SO_REUSEPORT socket option prior to the call to bind.
| In [1]: class Foo: | |
| ...: def __iter__(self): | |
| ...: return iter([]) | |
| ...: def __len__(self): | |
| ...: print("LEN") | |
| ...: return 10 | |
| ...: | |
| In [2]: foo = Foo() |
FWIW: I didn't produce the content present here. I've just copy-pasted it from somewhere over the Internet, but I cannot remember exactly the original source. I was also not able to find the author's name, so I cannot give him/her the proper credit.
I'm a Python programmer and frequently work with the excellent [virtualenv][] tool by Ian Bicking.
Virtualenv is a great tool on the whole but there is one glaring problem: the activate script that virtualenv provides as a convenience to enable its functionality requires you to source it with your shell to invoke it. The activate script sets some environment variables in your current environment and defines for you a deactivate shell function which will (attempt to) help you to undo those changes later.
This pattern is abhorrently wrong and un-unix-y. activate should instead do what ssh-agent does, and launch a sub-shell or sub-command with a modified environment.