Skip to content

Instantly share code, notes, and snippets.

@purkhusid
purkhusid / bazel-diff.sh
Created May 10, 2022 09:16
Bazel diff script
#! /usr/bin/env bash
function get_affected_targets_path() {
echo "/tmp/bazel_diff_affected_targets"
}
function get_affected_targets() {
#Path to your Bazel WORKSPACE directory
local workspace_path=$1
# Path to your Bazel executable
@ubershmekel
ubershmekel / decision_tree_code_gen.py
Created November 27, 2012 13:35
Generate python code from orange-canvas decision trees
"""
How to use:
1. Place a "Python Script" node on your canvas
2. Hook your "Classification Tree" node out into the "Python Script" input
3. Paste this gist in the python script and hit "Execute"
The output should be similar to this:
# slope (<32.000, 34.000>)
if slope <=1.008: return False #(<7.000, 0.000>)