Skip to content

Instantly share code, notes, and snippets.

@xamox
xamox / balltrack.py
Created April 21, 2012 18:05
Object Tracking with SimpleCV (White Ball)
'''
This is how to track a white ball example using SimpleCV
The parameters may need to be adjusted to match the RGB color
of your object.
The demo video can be found at:
http://www.youtube.com/watch?v=jihxqg3kr-g
'''
print __doc__
@subzey
subzey / gist:4374329
Created December 25, 2012 17:38
Events handling in WSH + JScript example.
// Create a new InternetExplorer.Application object
// 2nd arg is a prefix for events (any string)
var ie = WScript.CreateObject("InternetExplorer.Application", "ieEvent_");
// Set url
ie.Navigate("about:blank");
// Show window (default state is hidden)
ie.Visible = 1;
// Create specially named function using prefix (that 2nd arg above)
// (OnQuit means when IE window is closed)
@courtneyfaulkner
courtneyfaulkner / devices.c
Created December 11, 2013 22:20
List OpenCL platforms and devices
#include <stdio.h>
#include <stdlib.h>
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
int main() {
@krowe
krowe / jgrep.bat
Last active January 6, 2021 19:05
A RegEx match script which uses Hybrid Batch\JScript code
@set @junk=1 /*
@cscript //nologo //E:jscript %~f0 %*
@goto :eof */
var args=WScript.Arguments, argCnt=args.Length, stdin=WScript.StdIn, stdout=WScript.StdOut;
var replaceSingleQuotes=false, printMatchesOnly=false, matchString, flagString, regex, argDx=0;
if(argCnt==0) {
throw new Error("You must provide search criteria.");
}
@jirihnidek
jirihnidek / CMakeLists.txt
Last active November 2, 2021 17:15
C++ OpenCL Example
# Minimal version of CMake
cmake_minimum_required (VERSION 2.6)
# Build type
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif ()
#pragma OPENCL EXTENSION cl_khr_icd : enable
#include <CL/cl.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@tzutalin
tzutalin / clDeviceQuery.cpp
Last active April 16, 2023 19:02
Query OpenCL devices
/* Copyright 1993-2009 NVIDIA Corporation. All rights reserved.
Modified by Mark Zwolinski, December 2009
Modified by Robert McGibbon, August 2013
*/
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
#include <stdlib.h>
@UniDyne
UniDyne / mergeCSV.js
Created October 26, 2015 14:24
Merge similar CSV files, reorder columns in JScript.
/**********************************************************************
mergeCSV.js - Merge similar CSVs
***********************************************************************
Copyright (C) 2015 D. Oliver Brown <unidyne AT gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
anonymous
anonymous / # elmer - 2016-02-02_05-36-52.txt
Created February 1, 2016 21:34
elmer (elmercsc/elmerfem/elmer) on OS X 10.11.3 - Homebrew build logs
Homebrew build logs for elmercsc/elmerfem/elmer on OS X 10.11.3
Build date: 2016-02-02 05:36:52
@simply-coded
simply-coded / CreateExcelFile.vbs
Last active July 24, 2024 20:12
Use VBScript to create, open, and edit excel files. ( Excel needs to be installed on your computer ).
'Microsoft Excel Automation Basics
':: Create and edit an Excel File.
'---------------------------------
'create the excel object
Set objExcel = CreateObject("Excel.Application")
'view the excel program and file, set to false to hide the whole process
objExcel.Visible = True