Skip to content

Instantly share code, notes, and snippets.

View zwn's full-sized avatar

Zbyněk Winkler zwn

  • Senior Consultant, Analyst, Software Engineer, Entrepreneur
  • Prague, Czech Republic
View GitHub Profile
@zwn
zwn / list-streams.py
Last active December 12, 2019 10:21
Handy realsense t265 examples in python
import pyrealsense2 as rs
def main():
pipeline = rs.pipeline()
pipeline.start()
profile = pipeline.get_active_profile()
streams = profile.get_streams()
for s in streams:
print(f'{s.__class__.__name__}: index:{s.stream_index()} @ {s.fps():>3d}fps type:{s.stream_type()} format:{s.format()}')
@zwn
zwn / fix-extraneous-bytes-before-marker-0xd9.py
Last active June 4, 2021 02:50
Fix corrupt JPEG data extraneous bytes before marker 0xd9
from __future__ import print_function, unicode_literals
import binascii
import os
import sys
import time
import re
import cv2
class capture:
#!/usr/bin/env bash
set -e # exit when any command fails
# configure apt for postgres-9.3
codename=`lsb_release -cs`
aptlist="deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main"
echo $aptlist | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -