Skip to content

Instantly share code, notes, and snippets.

View gcr's full-sized avatar

Kimmy gcr

  • Google AI
  • 14:47 (UTC -04:00)
View GitHub Profile
{
"metadata": {
"name": "Triplet Cluster-assisted triplet convergence"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "Triplet affinity matrix"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(define (pin-over2 base f1 p1 f2 p2)
(define-values (x1 y1) (f1 base p1))
(define-values (x2 y2) (f2 p2 p2))
(panorama (pin-over base (- x1 x2) (- y1 y2) p2)))
type
Tx=object
foo: string
proc destruct*(x: var Tx) {.destructor.}=
echo "Destructing "&x.foo
proc main_broken() =
var y = Tx(foo:"y")
var z = Tx(foo:"z")
type GLBuffer = distinct int
proc foo(): GLBuffer =
var
a = GLBuffer(6)
b = GLBuffer(7)
c = GLBuffer(8)
return a
proc destruct(o: var GLBuffer) {.destructor.} =
echo "GOODBYE "& $int(o)
int main()
{
printf("Hello\n");
// wtf???????????/
printf("World\n");
}
{
"metadata": {
"name": "How many CONSISTENT triplets are there?"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gcr
gcr / test.c
Created November 23, 2013 19:42
#include "stdio.h" // includes definiton of printf
#include "stdlib.h" // includes definiton of malloc
void copy_string(char *dest, char *src) {
// Copy bytes from src into dest
while ((*(dest++) = *(src++))) {};
}
int main(){