Skip to content

Instantly share code, notes, and snippets.

View dilanshah's full-sized avatar

Dilan Shah dilanshah

View GitHub Profile
newmtl lambert2SG
illum 4
Kd 0.40 0.40 0.40
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.33 0.04 0.04
Ka 0.00 0.00 0.00
# This file uses meters as units for non-parametric coordinates.
mtllib Lo_poly_Spaceship_01_by_Liz_Reddington.mtl
g default
v 58.229046 -24.446524 -277.894653
v 114.326607 -13.917201 -277.894653
v 58.229046 24.446524 -277.894653
v 114.326607 13.917201 -277.894653
v 47.697781 33.625286 -306.243042
v 124.857857 19.142588 -306.243042
newmtl lambert2SG
illum 4
Kd 0.40 0.40 0.40
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.33 0.04 0.04
Ka 0.00 0.00 0.00
@dilanshah
dilanshah / ObjectRuntime.cs
Last active April 4, 2018 18:11
Inheriting from scriptableobject
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName ="New User Object", menuName = "ObjectRuntime/Cube")]
public class ObjectRuntime : ScriptableObject {
public string name;
public List<FaceGroupData> faceGroups = new List<FaceGroupData>();
public List<FaceIndices> allFaces = new List<FaceIndices>();
public bool hasNormals = false;
@dilanshah
dilanshah / FakeModelData.cs
Created April 2, 2018 21:48
FakeModelData is a wrapper for .obj byte data that will be treated like an asset at runtime for a generated object in the scene from dropbox
using UnityEngine;
using System.Collections;
public class FakeModelData : ScriptableObject {
public static bool splitByMaterial = false;
public static string[] searchPaths = new string[] { "", "%FileName%_Textures" + Path.DirectorySeparatorChar };
struct FakeModelFace
{
public string materialName;
public string meshName;
@dilanshah
dilanshah / ScriptableObjectUtility.cs
Created April 2, 2018 21:47
Incomplete - design for importing fakemodel using scriptableObject (Unity resource which is an implementation of Object) at runtime
using UnityEngine;
using UnityEditor;
using System.IO;
// this goes into the editor folder
// we give it a specific scriptable object it will make that object for us
public static class ScriptableObjectUtility
{
public static void CreateAsset<T> () where T : ScriptableObject
{
// Interviewer: Alexis Palangie Position: Apple Senior Software Engineer
// Date: 4/2/2018 10:30am
// Tested my knowledge of Unity Engine
// Question 1
// MyBehavior b = this.GetComponent<MyBehavior>();
// transform.parent.gameobject
// template<T>
// T GetComponentInParent()
// template<T> T GetComponent()
# users can layout rect, text, and images
# explore data structures
# want to be able to given a completed mock up which is a collection of
# rectangles, text, and images
# Document class – How would you render a whole Document to JSON?
# Document has an array of [rectangles, text, images]
# Rectangle , Text , Images all have —> .renderToJSON() function

Call with Sarah

Main Takeaway Action Items

  • What are the patients going to get out of Insight
  • Literature review
  • Clinical impact

Sarah Input:

  • Low-hanging fruit according to Sarah surrounds cues for parkinson's patients (Cue - a thing said or done that serves as a signal to an actor or other performer)
  • SurveyMonkey - for data collection
  • Most importantly get real patients, and get feedback on how it works for them.
@dilanshah
dilanshah / simulate_five_sided_die.py
Last active March 2, 2018 19:31
Exactly what the title of the script says
# Simulate a five sided die using a seven sided die
import random
def rand7():
return random.randrange(1,8)
def rand5():
roll = rand7()
return roll if roll <= 5 else rand5()