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
| # first you need a new empty branch; let's call it `newroot` | |
| git checkout --orphan newroot | |
| git rm -rf . | |
| # then you apply the same steps | |
| git commit --allow-empty -m 'root commit' | |
| git rebase --onto newroot --root master | |
| git branch -d newroot |
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
| # found this from Armin R. on Twitter, what a beautiful gem ;) | |
| import ctypes | |
| from types import DictProxyType, MethodType | |
| # figure out side of _Py_ssize_t | |
| if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'): | |
| _Py_ssize_t = ctypes.c_int64 | |
| else: | |
| _Py_ssize_t = ctypes.c_int |
NewerOlder