This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
<summary> | |
A two-way dictionary. Can get T1 given T2 or T2 given T1. | |
</summary> | |
public class BidirectionalDictionary<T1, T2> : Dictionary<T1, T2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace Utility | |
{ | |
public abstract class Singleton<T> : MonoBehaviour where T : MonoBehaviour | |
{ | |
public static T Instance | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Timer.cs | |
(c) 2017 Ritoban Roy-Chowdhury. All rights reserved | |
*/ | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using UnityEngine; | |
namespace Utility | |
{ | |
static class Util | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
// printf() displays the string inside quotation | |
printf("Hello, World!"); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import requests | |
from PIL import Image | |
from io import BytesIO | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as anim | |
import matplotlib as mpl | |
import numpy as np | |
width = height = 800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vispy import app, gloo, io | |
import numpy as np | |
from scipy.spatial.distance import pdist, squareform | |
REFLECT_MATRIX_X = np.array([[1, 0], | |
[0, -1]]) | |
REFLECT_MATRIX_Y = np.array([[-1, 0], | |
[0, 1]]) | |
IDEAL_GAS_CONST = 5 # J/Kmol | |
REST_DENSITY = 0.8 # Experimentally determined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; | |
uniform float u_time; | |
const float iterations = 100.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Stack: | |
def __init__(self): | |
self.items = [] | |
def isEmpty(self): | |
return self.items == [] | |
def push(self, item): | |
self.items.append(item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Jan 10 08:43:47 2018 | |
@title: Hidato Puzzle Solver | |
@author: Ritoban | |
""" | |
import csv | |
import numpy as np |
OlderNewer