Skip to content

Instantly share code, notes, and snippets.

View papr's full-sized avatar
🏠
Working from home

Pablo Prietz papr

🏠
Working from home
  • Berlin
  • 20:20 (UTC +02:00)
View GitHub Profile
#import <Foundation/Foundation.h>
typedef void (^completeBlock_t)(NSData *data);
typedef void (^errorBlock_t)(NSError *error);
@interface AsyncURLConnection : NSURLConnection
{
NSMutableData *data_;
completeBlock_t completeBlock_;
errorBlock_t errorBlock_;
#import "AsyncURLConnection.h"
@implementation AsyncURLConnection
+ (id)request:(NSString *)requestUrl completeBlock:(completeBlock_t)completeBlock errorBlock:(errorBlock_t)errorBlock
{
return [[[self alloc] initWithRequest:requestUrl
completeBlock:completeBlock errorBlock:errorBlock] autorelease];
}
@cboulay
cboulay / replay_pupil_data.py
Last active July 21, 2019 08:04
A script to replay pupil-labs/hmd-eyes data to trigger calibration and gaze processing
import os
import zmq
from time import sleep, time
import numpy as np
import sys
sys.path.append('E:\SachsLab\Tools\VR\Pupil\pupil')
import pupil_src.shared_modules.file_methods as fm
from pupil_src.shared_modules import zmq_tools