Skip to content

Instantly share code, notes, and snippets.

View SachinGanesh's full-sized avatar
🎯
Focusing

Sachin SachinGanesh

🎯
Focusing
View GitHub Profile
@SachinGanesh
SachinGanesh / Singleton.cs
Created May 25, 2018 09:10
C# Singleton for Unity3D
using UnityEngine;
/// <summary>
/// Be aware this will not prevent a non singleton constructor
/// such as `T myT = new T();`
/// To prevent that, add `protected T () {}` to your singleton class.
/// </summary>
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
{
private static T _instance;
import os
import sys
import numpy as np
from data_util import *
import datetime
ply_filelist = 'scripts/modelnet40_ply_filelist_shuffled.txt'
H5_BATCH_SIZE = 2000