| from collections import deque | |
| import logging | |
| import signal | |
| from threading import Condition, Event, Thread | |
| import time | |
| logging.basicConfig(level=logging.INFO) | |
| class Stop(Exception): |
These instructions are for how to build librealsense on OSX
with OpenMP support.
| Copyright 2020 Brad Montgomery | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |
| and associated documentation files (the "Software"), to deal in the Software without restriction, | |
| including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
| subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial | |
| portions of the Software. |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
This is way more complicated than it should be. The following conditions need to be met :
- need to be able to track and merge in upstream changes
- don't want remote commit messages in master
- only interested in sub-directory of another repo
- needs to go in a subdirectory in my repo.
In this particular case, I'm interested in bringing in the 'default' template of jsdoc as a sub-directory in my project so I could potentially make changes to the markup it genereates while also being able to update from upstream if there are changes. Ideally their template should be a separate repo added to jsdoc via a submodule -- this way I could fork it and things would be much easier.... but, it is what it is.
After much struggling with git, subtree and git-subtree, I ended up finding this http://archive.h2ik.co/2011/03/having-fun-with-git-subtree/ -- it basically sets up separate branches from tracking remote, the particular sub-directory, and uses git subtree contrib module to pull it all togther. Following are
| // church numerals and lambda calculus in C++ using meta-template | |
| // programming, everything evaluated at compile-time. This code should | |
| // never be used in the real world. If I catch people using this for | |
| // real-world code just because it's awesome I will track said people | |
| // down and have a length discussion on why their existance is the | |
| // reason I need to question the ethics of writing this code in the | |
| // first place. | |
| // all code is licensed under MIT under one condition, never actually | |
| // use this code in real world programs, you can share it, and modify it |
| #!/usr/bin/env python | |
| import sqlite3 | |
| class dbopen(object): | |
| """ | |
| Simple CM for sqlite3 databases. Commits everything at exit. | |
| """ | |
| def __init__(self, path): | |
| self.path = path |
| import contextlib | |
| import subprocess | |
| # Unix, Windows and old Macintosh end-of-line | |
| newlines = ['\n', '\r\n', '\r'] | |
| def unbuffered(proc, stream='stdout'): | |
| stream = getattr(proc, stream) | |
| with contextlib.closing(stream): | |
| while True: | |
| out = [] |