Skip to content

Instantly share code, notes, and snippets.

View FelixWeichselgartner's full-sized avatar

Felix Weichselgartner FelixWeichselgartner

View GitHub Profile
@davidfoster
davidfoster / KalmanFilterFloat.cs
Last active October 21, 2023 07:58
Simple Kalman filtering in Unity.
using System.Collections.Generic;
/// <summary>A Kalman filter implementation for <c>float</c> values.</summary>
public class KalmanFilterFloat {
//-----------------------------------------------------------------------------------------
// Constants:
//-----------------------------------------------------------------------------------------
public const float DEFAULT_Q = 0.000001f;
import os
os.environ['PYTHONASYNCIODEBUG'] = '1'
import asyncio
import logging
import cv2
import base64
import cv2
import numpy as np
import numpy as np
import scipy
@chris-marsh
chris-marsh / print_table.py
Created October 13, 2017 14:55
PyQt5 - Print paginated QTableWidget
from PyQt5 import QtWidgets, QtCore, QtPrintSupport, QtGui
class Window(QtWidgets.QWidget):
def __init__(self):
QtWidgets.QWidget.__init__(self)
self.setWindowTitle(self.tr('Document Printer'))
self.table = QtWidgets.QTableWidget(200, 5, self)
for row in range(self.table.rowCount()):
for col in range(self.table.columnCount()):
@fopina
fopina / mic_client.py
Created July 28, 2016 12:24
microphone streaming with pyAudio
#!/usr/bin/env python
import pyaudio
import socket
import sys
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
CHUNK = 4096
@drhelius
drhelius / Interrupt INT 48h - LCD STAT
Last active March 25, 2020 20:05
Interrupt INT 48h - LCD STAT
Interrupt INT 48h - LCD STAT
----------------------------
The STAT register (FF41) selects the conditions that will generate this
interrupt (expecting that interrupts are enabled via EI or RETI and that
IE.1 (FFFF.1) is set).
STAT.3 HBLANK (start of mode 0)
STAT.4 VBLANK (start of mode 1) (additional to INT 40)
STAT.5 OAM (start of mode 2 and mode 1)
@royshil
royshil / opencv_capture_v4l2.py
Created March 4, 2016 18:59
A way to set V4L2 camera params for OpenCV, when cv2.VideoCapture doesn't work. This requires the python-v42lcapture module (https://github.com/gebart/python-v4l2capture)
#!/usr/bin/env python
import numpy as np
import cv2
import os
import v4l2capture
import select
if __name__ == '__main__':
#cap = cv2.VideoCapture(0)

THIS DOCUMENT

IS OUT OF

DATE

C++ Coding Standards Part 0: Automated Code Analysis

Automated analysis is the main advantage to working with a modern statically typed compiled language like C++. Code analysis tools can inform us when we have implemented an operator overload with a non-canonical form, when we should have made a method const, or when the scope of a variable can be reduced.

@gitaarik
gitaarik / git_submodules.md
Last active April 22, 2024 10:52
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@bradley219
bradley219 / .gitignore
Last active April 9, 2024 09:03
PID C++ implementation
.DS_Store
@endolith
endolith / LICENSE.txt
Last active January 14, 2024 07:37
Arduino hardware true random number generator
MIT License
Copyright (c) 2012 endolith
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: