Skip to content

Instantly share code, notes, and snippets.

@fasiha
fasiha / posdef.py
Last active April 17, 2024 04:28
Python/Numpy port of John D’Errico’s implementation (https://www.mathworks.com/matlabcentral/fileexchange/42885-nearestspd) of Higham’s 1988 paper (https://doi.org/10.1016/0024-3795(88)90223-6), including a built-in unit test. License: whatever D’Errico’s license, since this is a port of that.
from numpy import linalg as la
import numpy as np
def nearestPD(A):
"""Find the nearest positive-definite matrix to input
A Python/Numpy port of John D'Errico's `nearestSPD` MATLAB code [1], which
credits [2].
@kfigiela
kfigiela / _README.md
Last active July 13, 2023 10:14
Traktor Kontrol S5 S8 hacks

Warnings and instructions

  • You need to modify some Traktor files – do backup before you try – if files are incorrects screens become black.
  • You're doing that at your own risk!
  • If sth goes really bad – reinstall Traktor :-)
  • Traktor QML files are located by default in /Applications/Native Instruments/Traktor 2/Traktor.app/Contents/Resources/qml on Mac, on Windows look for qml in directory where Traktor is installed (I don't have windows machine around)…
  • You need real text-editor to modify files, you should try with Atom or Notepad++ to apply modifications
  • Files here are so called diff files, here is how to read them: http://stackoverflow.com/questions/2529441/how-to-read-the-output-from-git-diff

Hacks

@joshdick
joshdick / email_obfuscation.htm
Created May 8, 2011 05:50
Elegant E-Mail Address Obfuscation
<!DOCTYPE html>
<!-- Created by Josh Dick <http://joshdick.net> -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<title>Elegant E-Mail Address Obfuscation</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
</head>