Skip to content

Instantly share code, notes, and snippets.

@rvlasveld
rvlasveld / graphs_controller.rb
Created September 19, 2013 12:34
This Gist summaries the files as created in the blog post [INSERT LINK]. It shows how to use the Presenter design pattern in a Rails application.
# app/controllers/graphs_controller.rb
def show
...
@presenter = GraphPresenters::LineGraphPresenter.new graph
end
@rvlasveld
rvlasveld / visualize_projection.m
Last active December 6, 2017 21:33
Matlab demo for visualization of 2D projection to 3D using a Gaussian Radial Basis Function
% Demo to visualize the mapping with a Gaussian Radial Basis Function,
% especially in the context of Support Vector Machines.
%
% When this script is executed, first a collection of red points can be
% clicked on the graph.
% After that, the blue points can be generated.
% Then the user must provide a gamma value.
% The final graph can be rotated to inspect the 3D-space (use the "turn"
% icon next the hand in the toolbar)
%
@rvlasveld
rvlasveld / quit-open.applescript
Last active August 12, 2021 17:27
Cocoa-AppleScript to open and close applications when an other launches or terminates. See http://rvlasveld.github.io/blog/2013/04/21/open-and-close-applications-when-an-other-launches-or-terminates/ for more information.
-- main.scpt
-- Cocoa-AppleScript Applet
--
-- This app can close and open applications when an other application,
-- the trigger, is launced or terminated. This can be useful when two
-- applications interfere with eachother or when one is dependend on the
-- other (e.g. with setting an VPN connection).
--
--
-- Roemer Vlasveld ([email protected])