This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* GScript for adding edit urls to the response sheet. Needs to be run after every submit/form edit */ | |
function assignEditUrls() { | |
var form = FormApp.openById('FORM_ID'); | |
var sheet = SpreadsheetApp.openById('SPREADSHEET_ID').getSheetByName('SPREADSHEET_NAME'); | |
var data = sheet.getDataRange().getValues(); | |
var urlCol = 7; //COLUMN NUMBER | |
var responses = form.getResponses(); | |
var timestamps = [], urls = [], resultUrls = []; | |
for (var i = 0; i < responses.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Code for Preemphasis filter in fm_emph.py. | |
################## | |
class fm_preemph(gr.hier_block): | |
""" | |
FM Preemphasis IIR filter. | |
""" | |
def __init__(self, fg, fs, tau1=50e-6, f2): | |
""" | |
@param fg: flow graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// It's assumed this function is defined in a class extending 'ImageView' | |
void addEffectBrightness(){ | |
float brightness = mBrightnessValue; | |
mCm = new ColorMatrix(); | |
mCm.set(new float[] { 1, 0, 0, 0, brightness, | |
0, 1, 0, 0,brightness, | |
0, 0, 1, 0, brightness, | |
0, 0, 0, 1, 0 }); | |
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is accomplished by implementing android.hardware.SensorListener in an Activity | |
// You will also need to register for SENSOR_SERVICE using android.hardware.SensorManager | |
// The rules of Physics in 3-Dimensional space apply! | |
public void onSensorChanged(int sensor, float[] values) { | |
if (sensor == SensorManager.SENSOR_ACCELEROMETER) { | |
double sensitivity = 1.0f; //tweak this to ignore slight hand movements. |