Skip to content

Instantly share code, notes, and snippets.

View ablakey's full-sized avatar

Andrew Blakey ablakey

View GitHub Profile
having a car. Even a scooter.
getting pulled over just for your car and hair looking ratty.
having insurance.
realizing years later that you still live like you're poor.
paying for a monthly phone subscription.
3-years-old glasses and squinting from the front row.
risking losing your job in order to negotiate a better contract with your boss.
never going back.
buying alcohol.
looking at house prices.
>>> def foo():
... '''foo'''
... pass
...
>>> foo
<function foo at 0x7f442820e048>
>>> dir(foo)
['__annotations__', '__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__get__', '__getattribute__', '__globals__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__kwdefaults__', '__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', '__qualname__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']
>>> foo.__doc__
'foo'
@ablakey
ablakey / route_logger_to_ros.py
Last active May 19, 2023 07:05
Fixing broken logging after rospy.init_node()
import logging
import rospy
class ConnectPythonLoggingToROS(logging.Handler):
level_map = {
logging.DEBUG: rospy.logdebug,
logging.INFO: rospy.loginfo,
logging.WARNING: rospy.logwarn,