Skip to content

Instantly share code, notes, and snippets.

@ronen
ronen / ___pyi_so_conflict___.md
Created December 13, 2014 04:22
Minimal example of pyinstaller --onefile .so conflict

Minimal example to reproduce pyinstaller issue #1105

Problem with conflicting .so files pyinstaller/pyinstaller#1105

To reproduce:

  1. Download the gist
  2. Gist doesn't support directories, so manually create the submodule:
@ronen
ronen / vpn
Last active October 1, 2015 16:04
convenient wrapper around openconnect
Moved to https://github.com/ronen/vpn
Teaspoon.configure do |config|
# Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
# `http://localhost:3000/jasmine` to run your tests.
config.mount_at = "/teaspoon"
# Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
# be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
# Note: Defaults to `Rails.root` if nil.
config.root = nil
@ronen
ronen / Makefile
Last active June 6, 2016 18:32
Demo of halide Metal AOT backend initialization/termination bug
CXXFLAGS = -std=c++11 -g
HALIDE_TOOLS_DIR = /usr/local/share/halide/tools
default: demo
.PHONY: clean
demo: build/main.o build/halide_dummy_metal.o
$(CXX) $(CXXFLAGS) -o $@ $^ -framework Cocoa -framework Metal
#include "Halide.h"
using namespace Halide;
Var x{"x"};
Var y{"y"};
Var c{"c"};
Buffer<float> input(100,100,3);
Buffer<float> dir(100);
#include "Halide.h"
#include <stdio.h>
/*
Bounds inference bug?
Two versions of the same accumulation, one uses RDom the other defines a chain of Funcs.
Compile and run with -DUSE_RDOM=0 and it reports:
@ronen
ronen / false-positive-unusedFunction.cpp
Last active May 16, 2018 10:44
cppcheck false positive unused Function
#include <functional>
#include <iostream>
int foo() { return 12345; } // FALSE POSITIVE: unusedFunction
int bar(std::function<int()> func) { return func(); }
class A {
public:
A() : a(bar([] { return foo(); })) {}