text:
import os
if not os.path.exists('MRbrain.tar.gz'):
    # Download the data
    import urllib
    print "Downloading data, Please Wait (7.8MB)"
    opener = urllib.urlopen(
                'http://graphics.stanford.edu/data/voldata/MRbrain.tar.gz')
    open('MRbrain.tar.gz', 'wb').write(opener.read())

# Extract the data
import tarfile
tar_file = tarfile.open('MRbrain.tar.gz')
try:
    os.mkdir('mri_data')
except:
    pass
tar_file.extractall('mri_data')
tar_file.close()

### Read the data in a numpy 3D array #########################################
import numpy as np
data = np.array([np.fromfile(os.path.join('mri_data', 'MRbrain.%i' % i),
                                        dtype='>u2') for i in range(1, 110)])
data.shape = (109, 256, 256)
data = data.T

# Display the data ############################################################
from mayavi import mlab

mlab.figure(bgcolor=(0, 0, 0), size=(400, 400))

src = mlab.pipeline.scalar_field(data)
# Our data is not equally spaced in all directions:
src.spacing = [1, 1, 1.5]
src.update_image_data = True

# Extract some inner structures: the ventricles and the inter-hemisphere
# fibers. We define a volume of interest (VOI) that restricts the
# iso-surfaces to the inner of the brain. We do this with the ExtractGrid
# filter.
blur = mlab.pipeline.user_defined(src, filter='ImageGaussianSmooth')
voi = mlab.pipeline.extract_grid(blur)
voi.set(x_min=125, x_max=193, y_min=92, y_max=125, z_min=34, z_max=75)

mlab.pipeline.iso_surface(voi, contours=[1610, 2480], colormap='Spectral')

# Add two cut planes to show the raw MRI data. We use a threshold filter
# to remove cut the planes outside the brain.
thr = mlab.pipeline.threshold(src, low=1120)
cut_plane = mlab.pipeline.scalar_cut_plane(thr,
                                plane_orientation='y_axes',
                                colormap='black-white',
                                vmin=1400,
                                vmax=2600)
cut_plane.implicit_plane.origin = (136, 111.5, 82)
cut_plane.implicit_plane.widget.enabled = False

cut_plane2 = mlab.pipeline.scalar_cut_plane(thr,
                                plane_orientation='z_axes',
                                colormap='black-white',
                                vmin=1400,
                                vmax=2600)
cut_plane2.implicit_plane.origin = (136, 111.5, 82)
cut_plane2.implicit_plane.widget.enabled = False

# Extract two views of the outside surface. We need to define VOIs in
# order to leave out a cut in the head.
voi2 = mlab.pipeline.extract_grid(src)
voi2.set(y_min=112)
outer = mlab.pipeline.iso_surface(voi2, contours=[1776, ],
                                        color=(0.8, 0.7, 0.6))

voi3 = mlab.pipeline.extract_grid(src)
voi3.set(y_max=112, z_max=53)
outer3 = mlab.pipeline.iso_surface(voi3, contours=[1776, ],
                                         color=(0.8, 0.7, 0.6))

mlab.view(-125, 54, 326, (145.5, 138, 66.5))
mlab.roll(-175)

mlab.show()

import shutil
shutil.rmtree('mri_data')


text:
#ifndef TENSORFLOW_COMPILER_MLIR_TFRT_IR_TFRT_FALLBACK_ASYNC_H_
#define TENSORFLOW_COMPILER_MLIR_TFRT_IR_TFRT_FALLBACK_ASYNC_H_

#include "mlir/IR/Dialect.h"  // from @llvm-project
#include "mlir/IR/OpDefinition.h"  // from @llvm-project
#include "mlir/IR/OpImplementation.h"  // from @llvm-project
#include "mlir/Interfaces/SideEffectInterfaces.h"  // from @llvm-project
#include "tfrt/compiler/opdefs/tfrt_op_interfaces.h"  // from @tf_runtime
#include "tfrt/compiler/opdefs/tfrt_traits.h"  // from @tf_runtime
#include "tfrt/core_runtime/opdefs/traits.h"  // from @tf_runtime

using namespace mlir;  // NOLINT

namespace tfrt {
namespace fallback_async {

// Dialect for fallback async operations.
class FallbackAsyncDialect : public Dialect {
 public:
  explicit FallbackAsyncDialect(MLIRContext *context);
  static StringRef getDialectNamespace() { return "tfrt_fallback_async"; }
};

}  // namespace fallback_async
}  // namespace tfrt

#define GET_OP_CLASSES
#include "tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_async.h.inc"

#endif  // TENSORFLOW_COMPILER_MLIR_TFRT_IR_TFRT_FALLBACK_ASYNC_H_

redpajama_set_name: RedPajamaGithub


text:
package com.tiny.demo.firstlinecode.test.view;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;

import com.tiny.demo.firstlinecode.MainActivity;
import com.tiny.demo.firstlinecode.R;
import com.tiny.demo.firstlinecode.common.utils.ActivityInfoUtils;
import com.tiny.demo.firstlinecode.common.utils.LogUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Desc: 工具类测试
 *
 * @author tiny
 * @date 2018/6/1 下午4:37
 */
public class UtilsTestActivity extends AppCompatActivity {

    @BindView(R.id.btn_test_1)
    Button btnTest1;
    @BindView(R.id.btn_test_2)
    Button btnTest2;

    public static void actionStart(Context context) {
        Intent starter = new Intent(context, UtilsTestActivity.class);
        context.startActivity(starter);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_utils_test);
        ButterKnife.bind(this);
    }

    @OnClick(R.id.btn_test_1)
    public void onBtnTest1Clicked() {
        boolean result = ActivityInfoUtils.activityOnceCreated(this, MainActivity.class);
        LogUtils.e("MainActivity started result:" + result);
    }

    @OnClick(R.id.btn_test_2)
    public void onBtnTest2Clicked() {

    }
}


text:
"use strict";

!function (e, n, o, i) {
  e.site = e.fn.site = function (t) {
    var s,
        r,
        a = new Date().getTime(),
        c = [],
        u = arguments[0],
        l = "string" == typeof u,
        m = [].slice.call(arguments, 1),
        d = e.isPlainObject(t) ? e.extend(!0, {}, e.site.settings, t) : e.extend({}, e.site.settings),
        f = d.namespace,
        g = d.error,
        b = "module-" + f,
        p = e(o),
        v = p,
        h = this,
        y = v.data(b);return s = { initialize: function initialize() {
        s.instantiate();
      }, instantiate: function instantiate() {
        s.verbose("Storing instance of site", s), y = s, v.data(b, s);
      }, normalize: function normalize() {
        s.fix.console(), s.fix.requestAnimationFrame();
      }, fix: { console: function (_console) {
          function console() {
            return _console.apply(this, arguments);
          }

          console.toString = function () {
            return _console.toString();
          };

          return console;
        }(function () {
          s.debug("Normalizing window.console"), (console === i || console.log === i) && (s.verbose("Console not available, normalizing events"), s.disable.console()), ("undefined" == typeof console.group || "undefined" == typeof console.groupEnd || "undefined" == typeof console.groupCollapsed) && (s.verbose("Console group not available, normalizing events"), n.console.group = function () {}, n.console.groupEnd = function () {}, n.console.groupCollapsed = function () {}), "undefined" == typeof console.markTimeline && (s.verbose("Mark timeline not available, normalizing events"), n.console.markTimeline = function () {});
        }), consoleClear: function consoleClear() {
          s.debug("Disabling programmatic console clearing"), n.console.clear = function () {};
        }, requestAnimationFrame: function requestAnimationFrame() {
          s.debug("Normalizing requestAnimationFrame"), n.requestAnimationFrame === i && (s.debug("RequestAnimationFrame not available, normailizing event"), n.requestAnimationFrame = n.requestAnimationFrame || n.mozRequestAnimationFrame || n.webkitRequestAnimationFrame || n.msRequestAnimationFrame || function (e) {
            setTimeout(e, 0);
          });
        } }, moduleExists: function moduleExists(n) {
        return e.fn[n] !== i && e.fn[n].settings !== i;
      }, enabled: { modules: function modules(n) {
          var o = [];return n = n || d.modules, e.each(n, function (e, n) {
            s.moduleExists(n) && o.push(n);
          }), o;
        } }, disabled: { modules: function modules(n) {
          var o = [];return n = n || d.modules, e.each(n, function (e, n) {
            s.moduleExists(n) || o.push(n);
          }), o;
        } }, change: { setting: function setting(n, o, t, r) {
          t = "string" == typeof t ? "all" === t ? d.modules : [t] : t || d.modules, r = r !== i ? r : !0, e.each(t, function (i, t) {
            var a,
                c = s.moduleExists(t) ? e.fn[t].settings.namespace || !1 : !0;s.moduleExists(t) && (s.verbose("Changing default setting", n, o, t), e.fn[t].settings[n] = o, r && c && (a = e(":data(module-" + c + ")"), a.size() > 0 && (s.verbose("Modifying existing settings", a), a[t]("setting", n, o))));
          });
        }, settings: function settings(n, o, t) {
          o = "string" == typeof o ? [o] : o || d.modules, t = t !== i ? t : !0, e.each(o, function (o, i) {
            var r;s.moduleExists(i) && (s.verbose("Changing default setting", n, i), e.extend(!0, e.fn[i].settings, n), t && f && (r = e(":data(module-" + f + ")"), r.size() > 0 && (s.verbose("Modifying existing settings", r), r[i]("setting", n))));
          });
        } }, enable: { console: function console() {
          s.console(!0);
        }, debug: function debug(e, n) {
          e = e || d.modules, s.debug("Enabling debug for modules", e), s.change.setting("debug", !0, e, n);
        }, verbose: function verbose(e, n) {
          e = e || d.modules, s.debug("Enabling verbose debug for modules", e), s.change.setting("verbose", !0, e, n);
        } }, disable: { console: function console() {
          s.console(!1);
        }, debug: function debug(e, n) {
          e = e || d.modules, s.debug("Disabling debug for modules", e), s.change.setting("debug", !1, e, n);
        }, verbose: function verbose(e, n) {
          e = e || d.modules, s.debug("Disabling verbose debug for modules", e), s.change.setting("verbose", !1, e, n);
        } }, console: function console(e) {
        if (e) {
          if (y.cache.console === i) return void s.error(g.console);s.debug("Restoring console function"), n.console = y.cache.console;
        } else s.debug("Disabling console function"), y.cache.console = n.console, n.console = { clear: function clear() {}, error: function error() {}, group: function group() {}, groupCollapsed: function groupCollapsed() {}, groupEnd: function groupEnd() {}, info: function info() {}, log: function log() {}, markTimeline: function markTimeline() {}, warn: function warn() {} };
      }, destroy: function destroy() {
        s.verbose("Destroying previous site for", v), v.removeData(b);
      }, cache: {}, setting: function setting(n, o) {
        if (e.isPlainObject(n)) e.extend(!0, d, n);else {
          if (o === i) return d[n];d[n] = o;
        }
      }, internal: function internal(n, o) {
        if (e.isPlainObject(n)) e.extend(!0, s, n);else {
          if (o === i) return s[n];s[n] = o;
        }
      }, debug: function debug() {
        d.debug && (d.performance ? s.performance.log(arguments) : (s.debug = Function.prototype.bind.call(console.info, console, d.name + ":"), s.debug.apply(console, arguments)));
      }, verbose: function verbose() {
        d.verbose && d.debug && (d.performance ? s.performance.log(arguments) : (s.verbose = Function.prototype.bind.call(console.info, console, d.name + ":"), s.verbose.apply(console, arguments)));
      }, error: function error() {
        s.error = Function.prototype.bind.call(console.error, console, d.name + ":"), s.error.apply(console, arguments);
      }, performance: { log: function log(e) {
          var n, o, i;d.performance && (n = new Date().getTime(), i = a || n, o = n - i, a = n, c.push({ Element: h, Name: e[0], Arguments: [].slice.call(e, 1) || "", "Execution Time": o })), clearTimeout(s.performance.timer), s.performance.timer = setTimeout(s.performance.display, 100);
        }, display: function display() {
          var n = d.name + ":",
              o = 0;a = !1, clearTimeout(s.performance.timer), e.each(c, function (e, n) {
            o += n["Execution Time"];
          }), n += " " + o + "ms", (console.group !== i || console.table !== i) && c.length > 0 && (console.groupCollapsed(n), console.table ? console.table(c) : e.each(c, function (e, n) {
            console.log(n.Name + ": " + n["Execution Time"] + "ms");
          }), console.groupEnd()), c = [];
        } }, invoke: function invoke(n, o, t) {
        var a,
            c,
            u,
            l = y;return o = o || m, t = h || t, "string" == typeof n && l !== i && (n = n.split(/[\. ]/), a = n.length - 1, e.each(n, function (o, t) {
          var r = o != a ? t + n[o + 1].charAt(0).toUpperCase() + n[o + 1].slice(1) : n;if (e.isPlainObject(l[r]) && o != a) l = l[r];else {
            if (l[r] !== i) return c = l[r], !1;if (!e.isPlainObject(l[t]) || o == a) return l[t] !== i ? (c = l[t], !1) : (s.error(g.method, n), !1);l = l[t];
          }
        })), e.isFunction(c) ? u = c.apply(t, o) : c !== i && (u = c), e.isArray(r) ? r.push(u) : r !== i ? r = [r, u] : u !== i && (r = u), c;
      } }, l ? (y === i && s.initialize(), s.invoke(u)) : (y !== i && s.destroy(), s.initialize()), r !== i ? r : this;
  }, e.site.settings = { name: "Site", namespace: "site", error: { console: "Console cannot be restored, most likely it was overwritten outside of module", method: "The method you called is not defined." }, debug: !1, verbose: !0, performance: !0, modules: ["accordion", "api", "checkbox", "dimmer", "dropdown", "form", "modal", "nag", "popup", "rating", "shape", "sidebar", "state", "sticky", "tab", "transition", "video", "visit", "visibility"], siteNamespace: "site", namespaceStub: { cache: {}, config: {}, sections: {}, section: {}, utilities: {} } }, e.extend(e.expr[":"], { data: e.expr.createPseudo ? e.expr.createPseudo(function (n) {
      return function (o) {
        return !!e.data(o, n);
      };
    }) : function (n, o, i) {
      return !!e.data(n, i[3]);
    } });
}(jQuery, window, document);


text:
package com.bumptech.glide.load.resource.bitmap;

import android.graphics.Bitmap;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.ResourceDecoder;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPoolAdapter;
import java.io.IOException;

/**
 * Passes through a (hopefully) non-owned {@link Bitmap} as a {@link Bitmap} based {@link Resource}
 * so that the given {@link Bitmap} is not recycled.
 */
public final class UnitBitmapDecoder implements ResourceDecoder<Bitmap, Bitmap> {
  private static final BitmapPoolAdapter BITMAP_POOL = new BitmapPoolAdapter();

  @Override
  public boolean handles(Bitmap source, Options options) throws IOException {
    return true;
  }

  @Override
  public Resource<Bitmap> decode(Bitmap source, int width, int height, Options options)
      throws IOException {
    return new BitmapResource(source, BITMAP_POOL);
  }
}


text:
//using System;
//using System.Diagnostics;

//namespace Lime {
//    [DebuggerDisplay("{DebuggerDisplay()}")]
//    public class Uri : IEquatable<Uri> {
//        private string _value;

//        private Uri(string value) {
//            _value = value;
//        }

//        private string DebuggerDisplay() {
//            return string.Format("{0}", _value);
//        }

//        public override int GetHashCode() {
//            return _value.ToLower().GetHashCode();
//        }

//        public static implicit operator string (Uri value) {
//            return value._value;
//        }

//        public static implicit operator Uri(string value) {
//            return new Uri(value);
//        }

//        public bool Equals(Uri other) {
//            if (ReferenceEquals(null, other)) {
//                return false;
//            }
//            if (ReferenceEquals(this, other)) {
//                return true;
//            }

//            return _value.Equals(other._value, StringComparison.OrdinalIgnoreCase);
//        }

//        public override bool Equals(object obj) {
//            if (ReferenceEquals(null, obj)) {
//                return false;
//            }
//            if (ReferenceEquals(this, obj)) {
//                return true;
//            }
//            if (obj.GetType() != this.GetType()) {
//                return false;
//            }

//            return Equals((Uri)obj);
//        }
//    }
//}


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityStandardAssets.Characters.FirstPerson;

using MyTypes;
using System;

public class Raygun : MonoBehaviour {
    #region Variables
    // Raygun //
    private GunMode m_currentGunMode = GunMode.Scaler;
    [Tooltip("How far the weapon should shoot")]
    public float weaponShootRange = 25;
    [Tooltip("The end of the gun [Empty gameobject]")]
    public Transform gunEnd;
    private Camera fpsCam;      // There should be a better transform reference to use instead of camera, it makes it so if multiple guns are present, there won't be enough transform to instantiate the beacon
    // Raygun //

    // Teleport //
    // TODO: BEACON NEEDS TO BE OBJECT POOLED!!!
    public Beacon beaconProjectile = null;
    private Beacon beacon = null;
    private GameObject lastObject = null;

    [SerializeField]
    private GameObject m_cutsceneCam;
    [SerializeField]
    private Transform m_targetPos;
    [SerializeField]
    private Transform m_originalPos;
    private float m_targetFOV = 25;
    private float m_originalFOV = 60;
    [SerializeField]
    private float m_screenSpeed = 1.0f;
    private bool m_isLooking = false;
    private RigidbodyFirstPersonController m_playerController;
    private Transform m_rotationMarker;
    // Teleport //

    // Sizer //
    private bool stuck = false;//check if you haved hooked to an object
    private bool canFire = true;

    private LineRenderer laserLine;
    private GameObject currentHit;
    private Color currentColor;
    //where the beam ends [it starts from the center of the screen]
    private Vector3 endPos;
    [SerializeField]
    [Tooltip("Layer to consider for the beam")]
    private LayerMask beamMask;

    [SerializeField]
    [Tooltip("Layer to consider for the fit checkers")]
    private LayerMask fitterMask;
    // Sizer //

    // Debuging //
    public Text displayText = null;
    public Text inst1 = null;
    public Text inst2 = null;
    // Debuging //

    //death stuff//
    private Transform parent;
    private DeathComponent deathComp;
    private StoreTransform savePosGun;
    private StoreTransform saveRotGun;
    private RigidbodyFirstPersonController rigController;
    private Renderer cartridgeRenderer;
    private Renderer[] gunPartsRenderers;
    bool isDropGun = false;
    bool isDyingReady = true;

    //faux death gun
    GameObject tempGun = null;
    //private gameObject

    // Audio
    [SerializeField]
    private string shrinkAndGrowSound;
    private AudioManager audioManager;

    private GameObject fauxGun;

    private Animator m_animator;
    private StaffAnimation m_staffAnimator;
    #endregion Variables

    #region Monobehaviour
    void Awake() {
        fauxGun = Resources.Load("RaygunFaux") as GameObject;
        cartridgeRenderer = gameObject.GetComponent<Renderer>();
        gunPartsRenderers = gameObject.GetComponentsInChildren<Renderer>();
        audioManager = GameObject.FindGameObjectWithTag("Audio").GetComponent<AudioManager>();
    }
    void Start() {
        parent = transform.root;
        rigController = parent.GetComponent<RigidbodyFirstPersonController>();
        deathComp = GetComponentInParent<DeathComponent>();
        m_playerController = GetComponentInParent<RigidbodyFirstPersonController>();

        savePosGun = gameObject.transform.Save().Position();
        saveRotGun = gameObject.transform.Save().LocalRotation();
        //m_oldCamPos = Camera.main.transform.position;
        laserLine = GetComponent<LineRenderer>();
        fpsCam = GetComponentInParent<Camera>();
        if (!fpsCam) {
            fpsCam = FindObjectOfType<Camera>();
        }

        m_animator = GetComponentInChildren<Animator>();
        m_staffAnimator = transform.parent.GetComponentInChildren<StaffAnimation>();
    }

    void Update() {
        if (!deathComp.isDead) {
            if (isDropGun) {
                Destroy(tempGun);
                rigController.enabled = true;
                cartridgeRenderer.enabled = true;
                foreach (Renderer rends in gunPartsRenderers) {
                    rends.enabled = true;
                }
                isDyingReady = true;
                isDropGun = false;
            }
            ChangeGunMode();
            MoveToScreen();

            if (displayText) {
                switch (m_currentGunMode) {
                    case GunMode.Teleporter:
                        TeleportBeamInput();
                        displayText.text = "Teleport-Beam";
                        inst1.text = "Teleport object to beacon";
                        inst2.text = "Deploy Beacon";
                        break;
                    case GunMode.Scaler:
                        ScalerBeamInput();
                        StopDisplayingHologram();
                        displayText.text = "Sizer-beam";
                        inst1.text = "Grow object";
                        inst2.text = "Shrink object";
                        break;
                    default:
                        Debug.LogWarning("Current Gun Mode not set properly.");
                        displayText.text = "Current Gun Mode not set properly.";
                        break;
                }
            } else {
                var disText = new GameObject("DisplayText", typeof(RectTransform), typeof(CanvasRenderer), typeof(Text));
                disText.transform.SetParent(FindObjectOfType<Canvas>().transform);
                disText.GetComponent<RectTransform>().anchoredPosition = Vector2.one;
                displayText = disText.GetComponent<Text>();

                switch (m_currentGunMode) {
                    case GunMode.Teleporter:
                        TeleportBeamInput();
                        displayText.text = "Currently in: Teleport Mode";
                        break;
                    case GunMode.Scaler:
                        ScalerBeamInput();
                        StopDisplayingHologram();
                        displayText.text = "Currently in: Scaler Mode";
                        m_isLooking = false;
                        break;
                    default:
                        Debug.LogWarning("Current Gun Mode not set properly.");
                        displayText.text = "Current Gun Mode not set properly.";
                        break;
                }
            }
        } else {
            if (isDyingReady) {
                print("dead");
                tempGun = Instantiate(fauxGun, transform.position, transform.rotation);
                rigController.enabled = false;
                cartridgeRenderer.enabled = false;
                foreach (Renderer rends in gunPartsRenderers) {
                    rends.enabled = false;
                }
                isDropGun = true;
                isDyingReady = false;
            }
        }
    }

    void FixedUpdate() {
        switch (m_currentGunMode) {
            case GunMode.Teleporter:
                TeleportBeam();
                ToggleLookAtScreen();
                break;
            case GunMode.Scaler:

                break;
            default:
                Debug.LogWarning("Current Gun Mode not set properly.");
                break;
        }
    }

    //void OnTriggerEnter(Collider other) {
    //    if (other.CompareTag("ForceField")) {
    //        Debug.Log("ForceField");
    //        DestroyBeacon();
    //        m_rotationMarker = other.GetComponent<LevelStart>().GetRotationMarker();
    //    }
    //}
    #endregion Monobehaviour

    #region Teleport Beam
    private void TeleportBeamInput() {
        if (Input.GetMouseButtonDown(1)) {
            m_staffAnimator.ThrowBeacon();

            // play the next note in the sequence, while throwing the beacon
            gameObject.transform.root.SendMessage("PlayNextNote");

            // TODO: NEEDS TO BE OBJECT POOLED!!!
            if (beacon != null) {
                Destroy(beacon.gameObject);    // Create cool destruction animation call that before destruction
            }

            if (m_rotationMarker != null)
            {
                beacon = Instantiate(beaconProjectile, gunEnd.transform.position/*fpsCam.transform.position*/, fpsCam.transform.rotation) as Beacon;
                beacon.GiveLevelRotation(m_rotationMarker);
            }
            else
            {
                Debug.LogWarning("NO ROTATION SET");
            }
        }

        if (beacon != null)
        {
            if (Input.GetKeyDown(KeyCode.Q))
            {
                beacon.RotateOnXAxis();
            }

            if (Input.GetKeyDown(KeyCode.E))
            {
                beacon.RotateOnYAxis();
            }
        }
    }

    private void TeleportBeam() {
        if (!m_isLooking) {
            RaycastHit hitInfo;
            InteractMessage msg;
            if (Physics.Raycast(gunEnd.transform.position/*fpsCam.transform.position*/, fpsCam.transform.forward, out hitInfo, weaponShootRange)) {
                if (hitInfo.collider.GetComponent<TeleportComponent>()) {
                    if (beacon != null) {
                        lastObject = hitInfo.collider.gameObject;
                        msg = new InteractMessage(Interaction.TELEPORTING, "HitBegin", beacon);

                        lastObject.SendMessage("Interact", msg);

                        // Input
                        if (Input.GetMouseButtonDown(0)) {
                            m_staffAnimator.Teleport();
                            msg = new InteractMessage(Interaction.TELEPORTING, "Teleport", beacon);
                            lastObject.SendMessage("Interact", msg);
                        }
                    }
                } else {
                    StopDisplayingHologram();
                }
            }
        }
    }

    private void StopDisplayingHologram() {
        InteractMessage msg;
        if (beacon != null) {
            if (lastObject != null) {
                msg = new InteractMessage(Interaction.TELEPORTING, "HitEnd");
                lastObject.SendMessage("Interact", msg);
                lastObject = null;
            }
        }
    }

    private void DestroyBeacon() {
        if (beacon != null) {
            Destroy(beacon.gameObject);
            beacon = null;
        }
    }

    public void EnterLevelEntranceTrigger(Transform levelRotation)
    {
        DestroyBeacon();
        m_rotationMarker = levelRotation;
    }

    private void ToggleLookAtScreen() {
        if (Input.GetKey(KeyCode.LeftControl)) {
            Debug.Log("LeftControl");
            m_playerController.enabled = false;
            m_isLooking = true;
            m_cutsceneCam.SetActive(true);
        } else if (Input.GetKeyUp(KeyCode.LeftControl)) {
            m_playerController.enabled = true;
            m_isLooking = false;
            m_cutsceneCam.SetActive(false);
        }
    }

    private void MoveToScreen() {
        if (m_isLooking) {
            if (Vector3.Distance(m_cutsceneCam.transform.position, m_targetPos.position) > 0.05f) {
                Vector3 newGunPos = Vector3.Lerp(m_cutsceneCam.transform.position, m_targetPos.position, m_screenSpeed * Time.deltaTime);
                m_cutsceneCam.transform.position = newGunPos;
                float newFOV = Mathf.Lerp(m_cutsceneCam.GetComponent<Camera>().fieldOfView, m_targetFOV, m_screenSpeed * Time.deltaTime);
                m_cutsceneCam.GetComponent<Camera>().fieldOfView = newFOV;
                Quaternion newRot = Quaternion.Lerp(m_cutsceneCam.transform.rotation, m_targetPos.rotation, m_screenSpeed * Time.deltaTime);
                m_cutsceneCam.transform.rotation = newRot;
            }
        } else {
            if (Vector3.Distance(m_cutsceneCam.transform.position, m_originalPos.position) > 0.05f) {
                Vector3 newGunPos = Vector3.Lerp(m_cutsceneCam.transform.position, m_originalPos.position, m_screenSpeed * Time.deltaTime);
                m_cutsceneCam.transform.position = newGunPos;
                float newFOV = Mathf.Lerp(m_cutsceneCam.GetComponent<Camera>().fieldOfView, m_originalFOV, m_screenSpeed * Time.deltaTime);
                m_cutsceneCam.GetComponent<Camera>().fieldOfView = newFOV;
                Quaternion newRot = Quaternion.Lerp(m_cutsceneCam.transform.rotation, m_originalPos.rotation, m_screenSpeed * Time.deltaTime);
                m_cutsceneCam.transform.rotation = newRot;
            }
        }
    }
    #endregion Teleport Beam

    #region Scaler Beam
    bool scaling = false;
    private void ScalerBeamInput() {
        if (canFire) {
            if (Input.GetButtonDown("Fire1") || Input.GetButtonDown("Fire2"))
            {
                audioManager.PlaySoundConcurrent(shrinkAndGrowSound, true, 1.0f);
                scaling = true;
            }
            if (Input.GetButtonUp("Fire1") || Input.GetButtonUp("Fire2"))
            {
                audioManager.StopSoundsConcurrent(shrinkAndGrowSound);
                scaling = false;
            }

            if (Input.GetButton("Fire1")) {
                m_staffAnimator.Grow(true);
                if (scaling)
                    shootRay("growing");
            }
            if (Input.GetButton("Fire2")) {
                m_staffAnimator.Shrink(true);
                if (scaling)
                    shootRay("shrinking");
            }
        }
        if (Input.GetButtonUp("Fire1") || Input.GetButtonUp("Fire2") || !canFire || !scaling) {
            m_staffAnimator.Grow(false);
            m_staffAnimator.Shrink(false);
            laserLine.enabled = false;
            if (stuck || !canFire) {
                currentHit.GetComponent<Renderer>().material.color = currentColor;
                stuck = false;
                currentHit = null;
                canFire = true;
            }
        }
    }

    private void shootRay(string whatAmIDoing) {
        Vector3 camCenter = fpsCam.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, 0.0f));
        Vector3 rayOrigin = camCenter;
        RaycastHit normalhit;
        //lines 'resting' position
        laserLine.SetPosition(0, gunEnd.position);
        laserLine.SetPosition(1, camCenter);
        if (!stuck) {
            if (Physics.Raycast(rayOrigin, fpsCam.transform.forward, out normalhit, weaponShootRange)) {
                Debug.DrawRay(rayOrigin, fpsCam.transform.forward * weaponShootRange, Color.red);
                if (normalhit.transform.gameObject.GetComponent<ScaleComponent>()) {
                    stuck = true;
                    currentHit = normalhit.transform.gameObject;
                    //first set the raycast to the pos of object [lock it]
                    currentColor = currentHit.GetComponent<Renderer>().material.color;
                    currentHit.GetComponent<Renderer>().material.color = new Color(0, 0, 255);
                    laserLine.enabled = true;
                }
            } else {
                print("too far");
            }
        } else {
            //if you are hooked to an object, draw line to that object
            endPos = currentHit.transform.GetComponent<Renderer>().bounds.center;
            laserLine.SetPosition(1, endPos);
            //TODO: MOVE THIS OUT
            //this.transform.Rotate(new Vector3(0, 0, 60 * Time.deltaTime));
            Debug.DrawLine(rayOrigin, endPos, Color.green);
            if (Physics.Linecast(rayOrigin, endPos, out normalhit, beamMask.value)) {
                if (normalhit.collider.gameObject != currentHit) {
                    print(normalhit.collider.gameObject);
                    print("blocked");
                    canFire = false;
                } else {
                    //send scale msg to obj
                    InteractMessage sendMsg = new InteractMessage(Interaction.SCALING, "");
                    if (whatAmIDoing == "growing") {
                        sendMsg.msg = "GROW";
                        currentHit.SendMessage("Interact", sendMsg);
                    } else if (whatAmIDoing == "shrinking") {
                        sendMsg.msg = "SHRINK";
                        currentHit.SendMessage("Interact", sendMsg);
                    }
                }
            }
        }
    }
    #endregion Scaler Beam

    #region Raygun
    private void ChangeGunMode() {
        if (Input.GetKeyDown(KeyCode.Alpha1)) {
            m_currentGunMode = GunMode.Teleporter;
            m_animator.SetTrigger("OpenScreen");
            scaling = false;
            m_staffAnimator.SwitchToMode(m_currentGunMode);
        }

        if (Input.GetKeyDown(KeyCode.Alpha2)) {
            m_currentGunMode = GunMode.Scaler;
            m_animator.SetTrigger("CloseScreen");
            m_staffAnimator.SwitchToMode(m_currentGunMode);
        }

        if (Input.GetKeyDown(KeyCode.Tab)) {
            m_currentGunMode++;

            if (m_currentGunMode >= GunMode.ModeCount) {
                m_currentGunMode = 0;
            }

            if (m_currentGunMode == GunMode.Teleporter) {
                m_animator.SetTrigger("OpenScreen");
                if (canFire && currentHit != null)
                    scaling = false;
            }
            else
            {
                m_animator.SetTrigger("CloseScreen");
            }
            m_staffAnimator.SwitchToMode(m_currentGunMode);
        }
    }

    public void ChangeGunMode(GunMode mode) {
        m_currentGunMode = mode;
    }
    #endregion Raygun

}


text:
package ch.ethz.scu.obit.microscopy.readers.composite;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import ch.ethz.scu.obit.microscopy.readers.BioFormatsWrapper;

public class YouScopeReader extends AbstractCompositeMicroscopyReader {

    /* Protected instance variables */
    private BioFormatsWrapper bioformatsWrapper = null;
    private File folder;
    private final static String REGEX_POS = "(position: (?<position>\\d+)*(, )?)*(y-tile: (?<y>\\d+)*(, )?)*(x-tile: (?<x>\\d+)*(, )?)*(z-stack: (?<z>\\d+))*";
    private final static String REGEX_TIME_NAME = ".*_time(?<time>\\d*)\\.tif{1,2}$";
    private final static String REGEX_TIME_FB = ".*_time_(.*)_\\(number_(?<time>\\d*)\\)\\.tif{1,2}$";
    private final static String REGEX_POS_NAME_FB = ".*\\(pos_(?<pos>\\d*)\\).*$"; // Fall-back for rare cases

    /* Private instance variables */
    private static Pattern p_pos = Pattern.compile(REGEX_POS, Pattern.CASE_INSENSITIVE);
    private static Pattern p_time = Pattern.compile(REGEX_TIME_NAME, Pattern.CASE_INSENSITIVE);
    private static Pattern p_time_fb = Pattern.compile(REGEX_TIME_FB, Pattern.CASE_INSENSITIVE);
    private static Pattern p_pos_name_fb = Pattern.compile(REGEX_POS_NAME_FB, Pattern.CASE_INSENSITIVE); // Fall-back for rare cases

    private boolean isValid = false;

    private LinkedHashMap<String, String[]> csvTable = null;
    private HashMap<String, String> seriesNamesMapper = null;
    private List<String> channelNames = null;

    /**
     * Constructor
     *
     * @param folder
     *            Folder to be scanned.
     */
    public YouScopeReader(File folder) {

        // Store the root folder
        this.folder = folder;

        // Reset the total file size in bytes
        totalDatasetSizeInBytes = 0;
    }

    @Override
    public String getName() {
        return folder.getName();
    }

    @Override
    public File getFolder() {
        return folder;
    }

    @Override
    public List<Integer> getSeriesIndices() {
        List<Integer> indices = new ArrayList<Integer>();
        for (int i = 0; i < attr.size(); i++) {
            indices.add(i);
        }
        return indices;
    }

    @Override
    public boolean parse() throws Exception {

        // Parse the images.csv file
        Map<String, String[]> csvTable = new LinkedHashMap<String, String[]>();
        csvTable = buildImagesCSVTable(this.folder + "/images.csv");
        if (csvTable.isEmpty()) {
            // The buildImagesCSVTable() function already set the
            // isValid flag and the errorMessage string.
            assert (isValid == false);
            return isValid;
        }

        // Initialize the series name mapper
        seriesNamesMapper = new HashMap<String, String>();

        // Now extract series and build metadata
        for (Map.Entry<String, String[]> entry : csvTable.entrySet()) {

            // Get current row
            String[] row = entry.getValue();

            // Coordinates
            int position = -1;
            int tileX = -1;
            int tileY = -1;
            int planeNum = -1;
            int timeNum = -1;
            String well = "";

            // Get the well (if present) from the Well column
            well = row[4];

            // Get the positions from the Position column
            Matcher m_pos = p_pos.matcher(row[5]);
            if (m_pos.find()) {
                if (m_pos.group("position") != null) {
                    position = Integer.parseInt(m_pos.group("position"));
                }
                if (m_pos.group("x") != null) {
                    tileX = Integer.parseInt(m_pos.group("x"));
                }
                if (m_pos.group("y") != null) {
                    tileY = Integer.parseInt(m_pos.group("y"));
                }
                if (m_pos.group("z") != null) {
                    planeNum = Integer.parseInt(m_pos.group("z"));
                }
            }

            // Try the fall-back option?
            Matcher m_pos_name_fb = p_pos_name_fb.matcher(row[6]);
            if (m_pos_name_fb.find()) {
                if (m_pos_name_fb.group("pos") != null) {
                    String pos = m_pos_name_fb.group("pos");
                    tileX = Integer.parseInt(pos.substring(0, 2));
                    tileY = Integer.parseInt(pos.substring(2, 4));
                }
            }

            // Get the timepoint
            Matcher m_time = p_time.matcher(row[6]);
            if (m_time.find()) {
                if (m_time.group("time") != null) {
                    timeNum = Integer.parseInt(m_time.group("time"));
                }
            } else {
                // Try the fallback option
                Matcher m_time_fb = p_time_fb.matcher(row[6]);
                if (m_time_fb.find()) {
                    if (m_time_fb.group("time") != null) {
                        timeNum = Integer.parseInt(m_time_fb.group("time"));
                    }
                }
            }

            // Fallback
            if (position == -1) {
                position = 1;
            }
            if (tileX == -1) {
                tileX = 1;
            }
            if (tileY == -1) {
                tileY = 1;
            }
            if (planeNum == -1) {
                planeNum = 1;
            }
            if (timeNum == -1) {
                timeNum = 1;
            }

            // Channel name
            String channelName = buildChannelName(row);

            // Build series ID from row (if present, use path information to build a unique
            // id)
            String seriesID = "Well_" + well + "_Pos_" + position + "_" + tileX + "_" + tileY + "_Path_" + pathInfoAsID(row[6]);

            // Build full file name
            File file = new File(this.folder + "/" + row[6]);

            // Make sure that the file exists
            if (!file.exists()) {
                // Mark failure
                isValid = false;
                errorMessage = "File '" + file + "' referenced in 'images.csv' does not exist!";
                return isValid;
            }

            // Add the the file size to the total size of the composite dataset.
            totalDatasetSizeInBytes += file.length();

            // Current series metadata
            HashMap<String, String> metadata;

            // Store the series index if not yet present
            if (seriesNamesMapper.containsKey(seriesID)) {

                // Get the attr key name
                String key = seriesNamesMapper.get(seriesID);

                // Get the metadata
                metadata = attr.get(key);

            } else {

                // Create a new SeriesMetadata object
                metadata = new HashMap<String, String>();

                // Add the unique series ID
                metadata.put("uniqueSeriesID", seriesID);

                // And add it to the attribute map
                int numSeries = seriesNamesMapper.size();
                String attrKey = "series_" + numSeries;
                seriesNamesMapper.put(seriesID, attrKey);
                attr.put(attrKey, metadata);

                // Does the metadata already contain information that can only
                // be obtained by opening at least one file from the series?
                if (!metadata.containsKey("sizeX")) {

                    // Try to open the first image file of the series
                    try {

                        // Initialize the BioFormatsWrapper
                        bioformatsWrapper = new BioFormatsWrapper(file, false);
                        bioformatsWrapper.parse();

                    } catch (Exception e) {

                        // Mark failure
                        isValid = false;
                        errorMessage = e.getMessage();
                        return isValid;

                    }

                    // Store some metadata
                    String width = "";
                    String heigth = "";
                    String datatype = "Unknown";
                    String voxelX = "NaN";
                    String voxelY = "NaN";
                    String voxelZ = "NaN";
                    if (bioformatsWrapper != null) {

                        // Get the attributes for current file
                        Map<String, HashMap<String, String>> currAttrs = bioformatsWrapper.getAttributes();

                        // Assertion: only one series in the file!
                        assert (bioformatsWrapper.getNumberOfSeries() == 1);

                        HashMap<String, String> seriesOneAttrs = currAttrs.get("series_0");

                        // Get width
                        width = seriesOneAttrs.get("sizeX");

                        // Get heigth
                        heigth = seriesOneAttrs.get("sizeY");

                        // Get datatype
                        datatype = bioformatsWrapper.getDataType();

                        // Get voxel size
                        voxelX = seriesOneAttrs.get("voxelX");
                        voxelY = seriesOneAttrs.get("voxelY");
                        voxelZ = seriesOneAttrs.get("voxelZ");

                        // Now close the file
                        bioformatsWrapper.close();
                        bioformatsWrapper = null;

                    }

                    // Store the extracted values
                    metadata.put("sizeX", width);
                    metadata.put("sizeY", heigth);
                    metadata.put("datatype", datatype);

                    // Store default values. These should be replaced
                    // with information extracted from the external
                    // metadata information.
                    metadata.put("voxelX", voxelX);
                    metadata.put("voxelY", voxelY);
                    metadata.put("voxelZ", voxelZ);

                    // Store the well
                    metadata.put("well", well);

                    // TODO: Get wavelengths from metadata

                    // Get acquisition time from metadata
                    metadata.put("acquisitionDate", row[3]);

                    // Give a more useful name to the series
                    String name = "";
                    if (!well.equals("")) {
                        name = attrKey + " (" + well + ")";
                    } else {
                        name = attrKey;
                    }
                    metadata.put("name", name);
                }

            }

            // Update the metadata object

            // Number of planes
            int numPlanes = getMetadataValueOrZero(metadata, "sizeZ");
            if (planeNum == 0) {
                planeNum = 1;
            }
            if (planeNum > numPlanes) {
                metadata.put("sizeZ", Integer.toString(planeNum));
            }

            // Find the channel number from the list of channel names
            int channelNum = channelNames.indexOf(channelName);
            metadata.put("channelName" + channelNum, channelName);

            // Update the count of channels
            int numChannels = countChannelsInMetadata(metadata);
            metadata.put("sizeC", Integer.toString(numChannels));

            // Number of timepoints
            int numTimepoints = getMetadataValueOrZero(metadata, "sizeT");
            if (timeNum == 0) {
                timeNum = 1;
            }
            if (timeNum > numTimepoints) {
                metadata.put("sizeT", Integer.toString(timeNum));
            }

        }

        // Make sure that all files in the folder are referenced
        if (!allFilesInTable(this.folder)) {
            // The allFilesInTable() function already marked failure and set the
            // error message accordingly.
            assert (isValid == false);
            return isValid;
        }

        // Mark success
        isValid = true;
        errorMessage = "";
        return isValid;
    }

    @Override
    public String info() {
        return "YouScope (composite) file format.";
    }

    @Override
    public String getType() {
        return "YouScope Experiment";
    }

    /**
     * Return true if the composite microscopy dataset could be parsed successfully.
     *
     * @return true if the composite microscopy dataset could be parsed
     *         successfully, false otherwise.
     */
    @Override
    public boolean isParsed() {
        return isValid;
    }

    /**
     * Return true if the reader can parse the passed folder
     *
     * @param folder
     *            Folder to be parsed.
     * @return true if the folder can be parsed, false otherwise.
     */
    static public boolean canRead(File folder) {

        boolean foundConfigurationCSB = false;
        boolean foundImagesCSV = false;
        boolean foundYSConfigMicroscopeCFG = false;

        // Get a list of all files
        File[] allFiles = folder.listFiles();
        if (allFiles == null) {
            return false;
        }

        for (File file : allFiles) {

            if (file.getAbsolutePath().toLowerCase().endsWith("configuration.csb")) {
                foundConfigurationCSB = true;
            } else if (file.getAbsolutePath().toLowerCase().endsWith("images.csv")) {
                foundImagesCSV = true;
            } else if (file.getAbsolutePath().toLowerCase().endsWith("ysconfig_microscope.cfg")) {
                foundYSConfigMicroscopeCFG = true;
            } else {
                continue;
            }
        }

        return foundConfigurationCSB & foundImagesCSV & foundYSConfigMicroscopeCFG;
    }

    /**
     * Parse the images.csv file and return a map of the content. Each row is stored
     * with the file name (with relative path) as its key.
     *
     * If something goes wrong while processing the file, this function will set the
     * 'isValid' flag to false, set the 'errorMessage' accordingly and return an
     * empty map.
     *
     * @param fileName
     *            Full path to the images.csv file.
     * @return Linked Hash map of strings with file name as key and array of string for
     *         each row.
     */
    private LinkedHashMap<String, String[]> buildImagesCSVTable(String fileName) {

        // Initialize the table
        csvTable = new LinkedHashMap<String, String[]>();

        // Initialize a linked hash set
        LinkedHashSet<String> channelNamesSet = new LinkedHashSet<String>();

        // Header
        boolean isHeader = true;

        // Read the CSV file
        try (BufferedReader br = new BufferedReader(new FileReader(fileName))) {

            // read the first line from the text file
            String line = br.readLine();

            // loop until all lines are read
            while (line != null) {

                if (isHeader == true) {

                    // We are past the header
                    isHeader = false;

                    // Read next line
                    line = br.readLine();

                    continue;
                }

                // Get all values for current row
                String[] row = line.split(";");

                // Make parsing robust against empty lines
                if (row.length == 0) {

                    // Read next line
                    line = br.readLine();
                    continue;
                }

                // Remove '"' and '\' characters if needed
                for (int i = 0; i < row.length; i++) {
                    row[i] = row[i].replace("\"", "");
                    row[i] = row[i].replace("\\\\", "\\");
                    row[i] = row[i].replace("\\", "/");
                }

                // Check that the file was not erroneously added twice to the images.csv file
                if (csvTable.containsKey(row[6])) {
                    // Mark failure
                    isValid = false;
                    errorMessage = "File '" + row[6] + "' referenced more than once in 'images.csv'!";
                    return new LinkedHashMap<String, String[]>();
                }

                // Add the row with the file name as key
                csvTable.put(row[6], row);

                // Add the (composed) channel to the channelNames linked hash set
                channelNamesSet.add(buildChannelName(row));

                // Read next line
                line = br.readLine();

            }
        } catch (FileNotFoundException e) {
            // Mark failure
            isValid = false;
            errorMessage = "File 'images.csv' not found!";
            return new LinkedHashMap<String, String[]>();
        } catch (IOException e) {
            // Mark failure
            isValid = false;
            errorMessage = "Could not read file 'images.csv'!";
            return new LinkedHashMap<String, String[]>();
        } catch (Exception e) {
            // Mark failure
            isValid = false;
            errorMessage = "Could not read file 'images.csv'! The error was: " + e.getMessage();
            return new LinkedHashMap<String, String[]>();
        }

        // Change the linked hash set to a list
        channelNames = new ArrayList<String>(channelNamesSet);

        // Return the table
        return csvTable;

    }

    /**
     * Make sure that all image files are referenced in the csv file.
     *
     * @param currentFolder Full path to the folder to preocess.
     * @return true if all files are referenced, false otherwise.
     */
    private boolean allFilesInTable(File currentFolder) {

        // Get relative path
        String relativePath;
        if (currentFolder.equals(folder)) {
            relativePath = "";
        } else {
            try {
                int index = this.folder.toString().length();
                relativePath = currentFolder.toString().substring(index + 1);
                // Only forward slashes allowed
                relativePath = relativePath.replace("\\\\", "\\");
                relativePath = relativePath.replace("\\", "/");
            } catch (Exception e) {
                relativePath = "";
            }
        }

        // Initialize result
        boolean result = true;

        // Get and check all image files, recursively
        File[] fList = currentFolder.listFiles();
        for (File file : fList) {
            if (file.isFile()) {

                String filename = file.getName();
                String filenameForCheck = filename.toLowerCase();
                if (filenameForCheck.endsWith(".tif") || filenameForCheck.endsWith(".tiff")) {

                    // Relative path to test
                    String relativePathToTest = "";
                    if (relativePath.equals("")) {
                        relativePathToTest = filename;
                    } else {
                        // Only forward slashes allowed
                        relativePathToTest = relativePath + "/" + filename;
                    }

                    if (!csvTable.containsKey(relativePathToTest)) {
                        // Mark as invalid
                        isValid = false;
                        errorMessage = "File " + relativePathToTest + " is not referenced in images.csv!";
                        return isValid;
                    }
                }
            } else if (file.isDirectory()) {
                result = allFilesInTable(file);
            }
        }
        return result;
    }

    /**
     * Return an ID built from the path information of the file
     *
     * @param filename
     *            Image file with (relative) path as obtained from images.csv
     * @return ID built from the path information of the file.
     */
    private String pathInfoAsID(String filename) {

        // Initialize output
        String pathInfo = "";

        // We work with a relative path
        filename = filename.replace("\\\\", "\\");
        filename = filename.replace("\\", "/");
        int pos = filename.lastIndexOf("/");
        if (pos != -1) {
            pathInfo = filename.substring(0, pos);
            pathInfo = pathInfo.replace("/", "_");
        } else {
            pathInfo = ".";
        }

        return pathInfo;
    }

    /**
     * Return current value for given metadata entry, or zero if not in the map.
     *
     * @param metadata
     *            Map of string - string key:value pairs.
     * @param key
     *            Name of the metadata value to query.
     * @return the value for the requested metadata value, or zero if it is not in
     *         the map.
     */
    protected int getMetadataValueOrZero(Map<String, String> metadata, String key) {
        int value = 0;
        if (metadata.containsKey(key)) {
            value = Integer.parseInt(metadata.get(key));
        }
        return value;
    }

    /**
     * Builds the channel name from the relevant columns in the CSV table row.
     *
     * @param row
     *            Current row
     * @return channel name.
     */
    private String buildChannelName(String[] row) {

        // Get the ID
        String id = row[7];

        // Get the various parts that compose the channel name
        String channelName;
        if (row[9].equals("") && row[10].equals("")) {
            channelName = "undefined";
        } else if (!row[9].equals("") && row[10].equals("")) {
            channelName = row[9];
        } else if (row[9].equals("") && !row[10].equals("")) {
            channelName = row[10];
        } else {
            channelName = row[9] + "_" + row[10];
        }
        if (!id.equals("")) {
            channelName = id + "_" + channelName;
        }

        return channelName;
    }

    /**
     * Count the number of channels in the metadata.
     *
     * Please note that some channels might be missing. One series could have
     * channel 0 and 2 but no 1.
     *
     * @param metadata
     *            Metadata map.
     * @return number of channels in the series.
     */
    private int countChannelsInMetadata(Map<String, String> metadata) {
        int numChannels = 0;
        for (String key : metadata.keySet()) {
            if (key.startsWith("channelName")) {
                numChannels += 1;
            }
        }
        return numChannels;
    }
}


text:
namespace Azure.Media.Analytics.Edge.Models
{
    public partial class ItemNonSetRequestBase : Azure.Media.Analytics.Edge.Models.MethodRequest
    {
        public ItemNonSetRequestBase(string name) { }
        public string Name { get { throw null; } set { } }
    }
    public partial class MediaGraphAssetSink : Azure.Media.Analytics.Edge.Models.MediaGraphSink
    {
        public MediaGraphAssetSink(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs, string assetNamePattern, string localMediaCachePath, string localMediaCacheMaximumSizeMiB) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>)) { }
        public string AssetNamePattern { get { throw null; } set { } }
        public string LocalMediaCacheMaximumSizeMiB { get { throw null; } set { } }
        public string LocalMediaCachePath { get { throw null; } set { } }
        public string SegmentLength { get { throw null; } set { } }
    }
    public partial class MediaGraphCertificateSource
    {
        public MediaGraphCertificateSource() { }
    }
    public partial class MediaGraphCognitiveServicesVisionExtension : Azure.Media.Analytics.Edge.Models.MediaGraphExtensionProcessorBase
    {
        public MediaGraphCognitiveServicesVisionExtension(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs, Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint endpoint, Azure.Media.Analytics.Edge.Models.MediaGraphImage image) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>), default(Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint), default(Azure.Media.Analytics.Edge.Models.MediaGraphImage)) { }
    }
    public partial class MediaGraphCredentials
    {
        public MediaGraphCredentials() { }
    }
    public partial class MediaGraphEndpoint
    {
        public MediaGraphEndpoint(string url) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphCredentials Credentials { get { throw null; } set { } }
        public string Url { get { throw null; } set { } }
    }
    public partial class MediaGraphExtensionProcessorBase : Azure.Media.Analytics.Edge.Models.MediaGraphProcessor
    {
        public MediaGraphExtensionProcessorBase(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs, Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint endpoint, Azure.Media.Analytics.Edge.Models.MediaGraphImage image) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>)) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint Endpoint { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphImage Image { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphSamplingOptions SamplingOptions { get { throw null; } set { } }
    }
    public partial class MediaGraphFileSink : Azure.Media.Analytics.Edge.Models.MediaGraphSink
    {
        public MediaGraphFileSink(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs, string baseDirectoryPath, string fileNamePattern, string maximumSizeMiB) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>)) { }
        public string BaseDirectoryPath { get { throw null; } set { } }
        public string FileNamePattern { get { throw null; } set { } }
        public string MaximumSizeMiB { get { throw null; } set { } }
    }
    public partial class MediaGraphGrpcExtension : Azure.Media.Analytics.Edge.Models.MediaGraphExtensionProcessorBase
    {
        public MediaGraphGrpcExtension(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs, Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint endpoint, Azure.Media.Analytics.Edge.Models.MediaGraphImage image, Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransfer dataTransfer) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>), default(Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint), default(Azure.Media.Analytics.Edge.Models.MediaGraphImage)) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransfer DataTransfer { get { throw null; } set { } }
        public string ExtensionConfiguration { get { throw null; } set { } }
    }
    public partial class MediaGraphGrpcExtensionDataTransfer
    {
        public MediaGraphGrpcExtensionDataTransfer(Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode mode) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode Mode { get { throw null; } set { } }
        public string SharedMemorySizeMiB { get { throw null; } set { } }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphGrpcExtensionDataTransferMode : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphGrpcExtensionDataTransferMode(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode Embedded { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode SharedMemory { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode left, Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode left, Azure.Media.Analytics.Edge.Models.MediaGraphGrpcExtensionDataTransferMode right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class MediaGraphHttpExtension : Azure.Media.Analytics.Edge.Models.MediaGraphExtensionProcessorBase
    {
        public MediaGraphHttpExtension(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs, Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint endpoint, Azure.Media.Analytics.Edge.Models.MediaGraphImage image) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>), default(Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint), default(Azure.Media.Analytics.Edge.Models.MediaGraphImage)) { }
    }
    public partial class MediaGraphHttpHeaderCredentials : Azure.Media.Analytics.Edge.Models.MediaGraphCredentials
    {
        public MediaGraphHttpHeaderCredentials(string headerName, string headerValue) { }
        public string HeaderName { get { throw null; } set { } }
        public string HeaderValue { get { throw null; } set { } }
    }
    public partial class MediaGraphImage
    {
        public MediaGraphImage() { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphImageFormat Format { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphImageScale Scale { get { throw null; } set { } }
    }
    public partial class MediaGraphImageFormat
    {
        public MediaGraphImageFormat() { }
    }
    public partial class MediaGraphImageFormatBmp : Azure.Media.Analytics.Edge.Models.MediaGraphImageFormat
    {
        public MediaGraphImageFormatBmp() { }
    }
    public partial class MediaGraphImageFormatJpeg : Azure.Media.Analytics.Edge.Models.MediaGraphImageFormat
    {
        public MediaGraphImageFormatJpeg() { }
        public string Quality { get { throw null; } set { } }
    }
    public partial class MediaGraphImageFormatPng : Azure.Media.Analytics.Edge.Models.MediaGraphImageFormat
    {
        public MediaGraphImageFormatPng() { }
    }
    public partial class MediaGraphImageFormatRaw : Azure.Media.Analytics.Edge.Models.MediaGraphImageFormat
    {
        public MediaGraphImageFormatRaw(Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat pixelFormat) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat PixelFormat { get { throw null; } set { } }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphImageFormatRawPixelFormat : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphImageFormatRawPixelFormat(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Abgr { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Argb { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Bgr24 { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Bgra { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Rgb24 { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Rgb555Be { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Rgb555Le { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Rgb565Be { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Rgb565Le { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Rgba { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat Yuv420P { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat left, Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat left, Azure.Media.Analytics.Edge.Models.MediaGraphImageFormatRawPixelFormat right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class MediaGraphImageScale
    {
        public MediaGraphImageScale() { }
        public string Height { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode? Mode { get { throw null; } set { } }
        public string Width { get { throw null; } set { } }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphImageScaleMode : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphImageScaleMode(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode Pad { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode PreserveAspectRatio { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode Stretch { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode left, Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode left, Azure.Media.Analytics.Edge.Models.MediaGraphImageScaleMode right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class MediaGraphInstance
    {
        public MediaGraphInstance(string name) { }
        public string Name { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphInstanceProperties Properties { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphSystemData SystemData { get { throw null; } set { } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphInstance Deserialize(string json) { throw null; }
    }
    public partial class MediaGraphInstanceActivateRequest : Azure.Media.Analytics.Edge.Models.ItemNonSetRequestBase
    {
        public MediaGraphInstanceActivateRequest(string name) : base (default(string)) { }
    }
    public partial class MediaGraphInstanceCollection
    {
        public MediaGraphInstanceCollection() { }
        public string ContinuationToken { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphInstance> Value { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphInstanceCollection Deserialize(string json) { throw null; }
    }
    public partial class MediaGraphInstanceDeActivateRequest : Azure.Media.Analytics.Edge.Models.ItemNonSetRequestBase
    {
        public MediaGraphInstanceDeActivateRequest(string name) : base (default(string)) { }
    }
    public partial class MediaGraphInstanceDeleteRequest : Azure.Media.Analytics.Edge.Models.ItemNonSetRequestBase
    {
        public MediaGraphInstanceDeleteRequest(string name) : base (default(string)) { }
    }
    public partial class MediaGraphInstanceGetRequest : Azure.Media.Analytics.Edge.Models.ItemNonSetRequestBase
    {
        public MediaGraphInstanceGetRequest(string name) : base (default(string)) { }
    }
    public partial class MediaGraphInstanceListRequest : Azure.Media.Analytics.Edge.Models.MethodRequest
    {
        public MediaGraphInstanceListRequest() { }
    }
    public partial class MediaGraphInstanceProperties
    {
        public MediaGraphInstanceProperties() { }
        public string Description { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphParameterDefinition> Parameters { get { throw null; } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState? State { get { throw null; } set { } }
        public string TopologyName { get { throw null; } set { } }
    }
    public partial class MediaGraphInstanceSetRequest : Azure.Media.Analytics.Edge.Models.MethodRequest
    {
        public MediaGraphInstanceSetRequest(Azure.Media.Analytics.Edge.Models.MediaGraphInstance instance) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphInstance Instance { get { throw null; } set { } }
        public override string GetPayloadAsJson() { throw null; }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphInstanceState : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphInstanceState(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState Activating { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState Active { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState Deactivating { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState Inactive { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState left, Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState left, Azure.Media.Analytics.Edge.Models.MediaGraphInstanceState right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class MediaGraphIoTHubMessageSink : Azure.Media.Analytics.Edge.Models.MediaGraphSink
    {
        public MediaGraphIoTHubMessageSink(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs, string hubOutputName) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>)) { }
        public string HubOutputName { get { throw null; } set { } }
    }
    public partial class MediaGraphIoTHubMessageSource : Azure.Media.Analytics.Edge.Models.MediaGraphSource
    {
        public MediaGraphIoTHubMessageSource(string name) : base (default(string)) { }
        public string HubInputName { get { throw null; } set { } }
    }
    public partial class MediaGraphMotionDetectionProcessor : Azure.Media.Analytics.Edge.Models.MediaGraphProcessor
    {
        public MediaGraphMotionDetectionProcessor(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>)) { }
        public string EventAggregationWindow { get { throw null; } set { } }
        public bool? OutputMotionRegion { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity? Sensitivity { get { throw null; } set { } }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphMotionDetectionSensitivity : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphMotionDetectionSensitivity(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity High { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity Low { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity Medium { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity left, Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity left, Azure.Media.Analytics.Edge.Models.MediaGraphMotionDetectionSensitivity right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class MediaGraphNodeInput
    {
        public MediaGraphNodeInput(string nodeName) { }
        public string NodeName { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelector> OutputSelectors { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput FromNodeName(string nodeName) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput (string nodeName) { throw null; }
    }
    public partial class MediaGraphOutputSelector
    {
        public MediaGraphOutputSelector() { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator? Operator { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty? Property { get { throw null; } set { } }
        public string Value { get { throw null; } set { } }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphOutputSelectorOperator : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphOutputSelectorOperator(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator Is { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator IsNot { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator left, Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator left, Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorOperator right) { throw null; }
        public override string ToString() { throw null; }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphOutputSelectorProperty : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphOutputSelectorProperty(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty MediaType { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty left, Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty left, Azure.Media.Analytics.Edge.Models.MediaGraphOutputSelectorProperty right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class MediaGraphParameterDeclaration
    {
        public MediaGraphParameterDeclaration(string name, Azure.Media.Analytics.Edge.Models.MediaGraphParameterType type) { }
        public string Default { get { throw null; } set { } }
        public string Description { get { throw null; } set { } }
        public string Name { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphParameterType Type { get { throw null; } set { } }
    }
    public partial class MediaGraphParameterDefinition
    {
        public MediaGraphParameterDefinition(string name, string value) { }
        public string Name { get { throw null; } set { } }
        public string Value { get { throw null; } set { } }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphParameterType : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphParameterType>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphParameterType(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphParameterType Bool { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphParameterType Double { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphParameterType Int { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphParameterType SecretString { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphParameterType String { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphParameterType other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphParameterType left, Azure.Media.Analytics.Edge.Models.MediaGraphParameterType right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphParameterType (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphParameterType left, Azure.Media.Analytics.Edge.Models.MediaGraphParameterType right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class MediaGraphPemCertificateList : Azure.Media.Analytics.Edge.Models.MediaGraphCertificateSource
    {
        public MediaGraphPemCertificateList(System.Collections.Generic.IEnumerable<string> certificates) { }
        public MediaGraphPemCertificateList(System.Collections.Generic.IList<System.Security.Cryptography.X509Certificates.X509Certificate2> certificates) { }
        public MediaGraphPemCertificateList(params System.Security.Cryptography.X509Certificates.X509Certificate2[] certificates) { }
        public System.Collections.Generic.IList<string> Certificates { get { throw null; } }
    }
    public partial class MediaGraphProcessor
    {
        public MediaGraphProcessor(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs) { }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> Inputs { get { throw null; } }
        public string Name { get { throw null; } set { } }
    }
    public partial class MediaGraphRtspSource : Azure.Media.Analytics.Edge.Models.MediaGraphSource
    {
        public MediaGraphRtspSource(string name, Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint endpoint) : base (default(string)) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint Endpoint { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport? Transport { get { throw null; } set { } }
    }
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public readonly partial struct MediaGraphRtspTransport : System.IEquatable<Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport>
    {
        private readonly object _dummy;
        private readonly int _dummyPrimitive;
        public MediaGraphRtspTransport(string value) { throw null; }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport Http { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport Tcp { get { throw null; } }
        public bool Equals(Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport other) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override bool Equals(object obj) { throw null; }
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public override int GetHashCode() { throw null; }
        public static bool operator ==(Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport left, Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport right) { throw null; }
        public static implicit operator Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport (string value) { throw null; }
        public static bool operator !=(Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport left, Azure.Media.Analytics.Edge.Models.MediaGraphRtspTransport right) { throw null; }
        public override string ToString() { throw null; }
    }
    public partial class MediaGraphSamplingOptions
    {
        public MediaGraphSamplingOptions() { }
        public string MaximumSamplesPerSecond { get { throw null; } set { } }
        public string SkipSamplesWithoutAnnotation { get { throw null; } set { } }
    }
    public partial class MediaGraphSignalGateProcessor : Azure.Media.Analytics.Edge.Models.MediaGraphProcessor
    {
        public MediaGraphSignalGateProcessor(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs) : base (default(string), default(System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput>)) { }
        public string ActivationEvaluationWindow { get { throw null; } set { } }
        public string ActivationSignalOffset { get { throw null; } set { } }
        public string MaximumActivationTime { get { throw null; } set { } }
        public string MinimumActivationTime { get { throw null; } set { } }
    }
    public partial class MediaGraphSink
    {
        public MediaGraphSink(string name, System.Collections.Generic.IEnumerable<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> inputs) { }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphNodeInput> Inputs { get { throw null; } }
        public string Name { get { throw null; } set { } }
    }
    public partial class MediaGraphSource
    {
        public MediaGraphSource(string name) { }
        public string Name { get { throw null; } set { } }
    }
    public partial class MediaGraphSystemData
    {
        public MediaGraphSystemData() { }
        public System.DateTimeOffset? CreatedAt { get { throw null; } set { } }
        public System.DateTimeOffset? LastModifiedAt { get { throw null; } set { } }
    }
    public partial class MediaGraphTlsEndpoint : Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint
    {
        public MediaGraphTlsEndpoint(string url) : base (default(string)) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphCertificateSource TrustedCertificates { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphTlsValidationOptions ValidationOptions { get { throw null; } set { } }
    }
    public partial class MediaGraphTlsValidationOptions
    {
        public MediaGraphTlsValidationOptions() { }
        public string IgnoreHostname { get { throw null; } set { } }
        public string IgnoreSignature { get { throw null; } set { } }
    }
    public partial class MediaGraphTopology
    {
        public MediaGraphTopology(string name) { }
        public string Name { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphTopologyProperties Properties { get { throw null; } set { } }
        public Azure.Media.Analytics.Edge.Models.MediaGraphSystemData SystemData { get { throw null; } set { } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphTopology Deserialize(string json) { throw null; }
    }
    public partial class MediaGraphTopologyCollection
    {
        public MediaGraphTopologyCollection() { }
        public string ContinuationToken { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphTopology> Value { get { throw null; } }
        public static Azure.Media.Analytics.Edge.Models.MediaGraphTopologyCollection Deserialize(string json) { throw null; }
    }
    public partial class MediaGraphTopologyDeleteRequest : Azure.Media.Analytics.Edge.Models.ItemNonSetRequestBase
    {
        public MediaGraphTopologyDeleteRequest(string name) : base (default(string)) { }
    }
    public partial class MediaGraphTopologyGetRequest : Azure.Media.Analytics.Edge.Models.ItemNonSetRequestBase
    {
        public MediaGraphTopologyGetRequest(string name) : base (default(string)) { }
    }
    public partial class MediaGraphTopologyListRequest : Azure.Media.Analytics.Edge.Models.MethodRequest
    {
        public MediaGraphTopologyListRequest() { }
    }
    public partial class MediaGraphTopologyProperties
    {
        public MediaGraphTopologyProperties() { }
        public string Description { get { throw null; } set { } }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphParameterDeclaration> Parameters { get { throw null; } }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphProcessor> Processors { get { throw null; } }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphSink> Sinks { get { throw null; } }
        public System.Collections.Generic.IList<Azure.Media.Analytics.Edge.Models.MediaGraphSource> Sources { get { throw null; } }
    }
    public partial class MediaGraphTopologySetRequest : Azure.Media.Analytics.Edge.Models.MethodRequest
    {
        public MediaGraphTopologySetRequest(Azure.Media.Analytics.Edge.Models.MediaGraphTopology graph) { }
        public Azure.Media.Analytics.Edge.Models.MediaGraphTopology Graph { get { throw null; } set { } }
        public override string GetPayloadAsJson() { throw null; }
    }
    public partial class MediaGraphUnsecuredEndpoint : Azure.Media.Analytics.Edge.Models.MediaGraphEndpoint
    {
        public MediaGraphUnsecuredEndpoint(string url) : base (default(string)) { }
    }
    public partial class MediaGraphUsernamePasswordCredentials : Azure.Media.Analytics.Edge.Models.MediaGraphCredentials
    {
        public MediaGraphUsernamePasswordCredentials(string username, string password) { }
        public string Password { get { throw null; } set { } }
        public string Username { get { throw null; } set { } }
    }
    public partial class MethodRequest
    {
        public MethodRequest() { }
        public string ApiVersion { get { throw null; } set { } }
        public string MethodName { get { throw null; } set { } }
        public virtual string GetPayloadAsJson() { throw null; }
    }
}