Skip to content

Instantly share code, notes, and snippets.

View gzuidhof's full-sized avatar

Guido Zuidhof gzuidhof

  • Friendly Captcha
  • The Netherlands
  • 10:51 (UTC +02:00)
View GitHub Profile
@gzuidhof
gzuidhof / Example.cs
Created October 14, 2014 21:15
Unity3D 2D Raycasting
public Plane gamePlane;
// Use this for initialization
void Start () {
gamePlane = new Plane(Vector3.zero, Vector3.up, Vector3.right);
}
// Update is called once per frame
void Update () {
@gzuidhof
gzuidhof / parallel.py
Created June 9, 2016 11:28
Parallel Batch Iterator, for preparing batches in different threads of processes.
from __future__ import division
import math
from multiprocessing import Process, Queue, JoinableQueue, Value
from threading import Thread
from functools import partial
class ParallelBatchIterator(object):
"""
Uses a producer-consumer model to prepare batches on the CPU in different processes or threads (while you are training on the GPU).
from __future__ import division
import theano
import theano.tensor as T
import lasagne
class MirrorPadLayer(lasagne.layers.Layer):
def __init__(self, incoming, width, batch_ndim=2, **kwargs):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gzuidhof
gzuidhof / net.http.ts
Created March 8, 2022 00:29
Tygo Go stdlib output examples
// "net/http" package tygo output
// Code generated by tygo. DO NOT EDIT.
//////////
// source: client.go
/**
* A Client is an HTTP client. Its zero value (DefaultClient) is a
* usable client that uses DefaultTransport.
* The Client's Transport typically has internal state (cached TCP