Skip to content

Instantly share code, notes, and snippets.

Avatar

Rafael Hautekiet lejafar

View GitHub Profile
View pyproject.toml
[tool.poetry]
name = "foo"
version = "0.1.0"
description = ""
authors = ["Rafael Hautekiet <rafaelhautekiet@gmail.com>"]
[tool.poetry.dependencies]
python = "3.7.4"
bar = {path="submodules/bar", develop=false}
@lejafar
lejafar / openctm.rb
Last active Oct 24, 2018
OpenCTM Homebrew recipe
View openctm.rb
class Openctm < Formula
homepage "http://openctm.sourceforge.net/"
url "https://downloads.sourceforge.net/project/openctm/OpenCTM-1.0.3/OpenCTM-1.0.3-src.zip"
sha256 "1310346651d96dc310022fde23a7d1a7810f32bccdfda4be0ea1b7a3cfd2b583"
depends_on "cmake" => :build
depends_on "llvm" => :build
depends_on "tinyxml" => :optional
depends_on "jpeg"
@lejafar
lejafar / NBPattern.py
Last active Jan 14, 2018
Determine the most likely value that is about to follow based on binary sequence using Naive Bayes
View NBPattern.py
#!/usr/bin/env python3
"""
Example implementation of https://stats.stackexchange.com/q/322943/190938
Determine the most likely value that is about to follow based on binary sequence using Naive Bayes
Test should output:
Predicted 1 CORRECTLY for [0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0] , pattern: [0, 1]
Predicted 1 CORRECTLY for [1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0] , pattern: [0, 1]
Predicted 0 CORRECTLY for [1, 1, 0, 1, 0, 0, 1] , pattern: [0, 1, 0]
@lejafar
lejafar / private.xml
Last active Jun 19, 2016
private.xml example to trigger a custom script using bluetooth remote using Karabiner, I'm using it with my Qmote from @qblinks
View private.xml
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_SHELL_whatever</name>
<url type="shell">
<![CDATA[ /bin/bash ~/whatever.sh ]]>
</url>
</vkopenurldef>
<item>
<name>Set remote trigger for ~/whatever.sh</name>
You can’t perform that action at this time.