Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| using UnityEngine; | |
| using System.Collections; | |
| public class TestBehaviour : MonoBehaviour { | |
| TestBehaviour() | |
| { | |
| // Will be called in Editor(play in game view, stop and back to scene) and Game. | |
| // Will also be called when script get recompiled. | |
| Debug.Log("TestBehaviour ctor: " + System.DateTime.Now.Ticks); |
| @Use /J to create a hard link pointing to a directory, also known as a directory junction: | |
| mklink /J Link Target |
| import audio_io | |
| import numpy | |
| audio1, _ = audio_io.ReadWavFile('voice_nodelay.wav') | |
| audio1 = audio1.ravel() | |
| audio2, _ = audio_io.ReadWavFile('voice_mic_blend3.wav') | |
| audio2 = audio2.ravel() | |
| # Truncate all signals same length, then pad to avoid boundary effects. |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| #!/bin/bash | |
| find -maxdepth 1 -type d | while read -r dir; do printf "%s:\t" "$dir"; find "$dir" -type f | wc -l; done |
| if (midiNote > 0) | |
| { | |
| int octave = midiNote / 12; | |
| int noteNum = midiNote % 12; | |
| int normalizedNote; | |
| if (octave % 2 == 0) | |
| { | |
| normalizedNote = noteNum; | |
| } |
| import android.media.MediaCodec; | |
| import android.media.MediaCodecInfo; | |
| import android.media.MediaFormat; | |
| import android.util.Log; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; |
| //From http://stackoverflow.com/questions/111102/how-do-javascript-closures-work | |
| function sayHello2(name) { | |
| var text = 'Hello ' + name; // Local variable | |
| var say = function() { console.log(text); } | |
| return say; | |
| } | |
| var say2 = sayHello2('Bob'); | |
| say2(); // logs "Hello Bob" |
| http://pin.it/zuSovQT |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)