Skip to content

Instantly share code, notes, and snippets.

View lkollar's full-sized avatar

László Kiss Kollár lkollar

View GitHub Profile
@lkollar
lkollar / README.md
Last active December 29, 2019 14:55
Arch Linux MacBook Air Setup

Touchpad settings

Find touchpad device:

xinput list then xinput list-props <device id>

Create the file and edit settings: sudo vim /etc/X11/xorg.conf.d/30-touchpad.conf

@lkollar
lkollar / six-moves-good.txt
Created July 10, 2019 11:04
PyInstaller `six.moves` hook success - `hiddenimports = ["six.moves.queue"]`
10584 TRACE: _import_hook 'six.moves.queue' Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage']) Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage']) 0
10584 TRACE: determine_parent Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage'])
10584 TRACE: determine_parent -> Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage'])
10585 TRACE: find_head_package Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage']) 'six.moves.queue' 0
10585 TRACE: safe_import_module 'six' 'six' None
10585 TRACE: safe_import_module -> SourceModule('six', '/lib/python3.7/site-packages/six.py')
10585 TRACE: find_head_package -> (SourceModule('six', '/lib/python3.7/site-packages/six.py'), 'moves.queue')
10585 TRACE: loa
@lkollar
lkollar / six-moves-bad.txt
Last active July 10, 2019 11:11
PyInstaller `six.moves` hook failure - `hiddenimports = ["six.moves"]`
11234 TRACE: _import_hook 'six.moves' Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage']) Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage']) 0
11234 TRACE: determine_parent Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage'])
11234 TRACE: determine_parent -> Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage'])
11235 TRACE: find_head_package Package('mypackage', '/lib/python3.7/site-packages/mypackage/__init__.py', ['/lib/python3.7/site-packages/mypackage']) 'six.moves' 0
11235 TRACE: safe_import_module 'six' 'six' None
11235 TRACE: safe_import_module -> SourceModule('six', '/lib/python3.7/site-packages/six.py')
11235 TRACE: find_head_package -> (SourceModule('six', '/lib/python3.7/site-packages/six.py'), 'moves')
11235 TRACE: load_tail SourceModul

Keybase proof

I hereby claim:

  • I am lkollar on github.
  • I am lkollar (https://keybase.io/lkollar) on keybase.
  • I have a public key whose fingerprint is 138D E343 11EA 5E0B CAFD 1338 08A7 AD02 30FC 081F

To claim this, I am signing this object:

Intro

Most of us have faced a point when trying to make things work with the Python datetime module by just trying things around. Datetime is one of those APIs that seems easy to use but requires the developer to have a deep understanding of what things actually mean, as otherwise it is really easy to introduce unexpected bugs given the actual complexity of date and time related issues.

Time Standards

The first concept we need to grasp when working with time is a standard that defines how we can measure units of time. The same way we have standards to measure weight or length that define kilograms or meters, we need a way to accurately define what