Skip to content

Instantly share code, notes, and snippets.

View aron-bordin's full-sized avatar

aron aron-bordin

View GitHub Profile
#if !defined(TH_REAL_IS_HALF)
PyObject * THPTensor_(addmv)(PyObject *self, PyObject *args, PyObject *kwargs)
{
PyObject *__kw_beta = NULL;
PyObject *__kw_alpha = NULL;
PyObject *__kw_mat = NULL;
PyObject *__kw_vec = NULL;
if (kwargs) {
__kw_beta = PyDict_GetItemString(kwargs, "beta");
__kw_alpha = PyDict_GetItemString(kwargs, "alpha");
@ianmackinnon
ianmackinnon / match.c
Created August 8, 2012 12:01
C Regex multiple matches and groups example
# gcc -Wall -o match match.c && ./match
#
#include <stdio.h>
#include <string.h>
#include <regex.h>
@perky
perky / ProFi.lua
Created May 30, 2012 20:32
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()