OS
Linux Kernel X Server openbox window manager, blank config so no other programs can be activated
auto login at boot
% Estimate the power spectra of a signal using Bartlett's Method, or, if parameter 'overlap' is specified, using Welch's Method. | |
% This method is based on the concept of using periodogram spectrum estimates, which are the result of converting a signal from the | |
% time domain to the frequency domain. | |
% | |
% @see Bartlett, M.S. (1948). "Smoothing Periodograms from Time-Series with Continuous Spectra". Nature 161: 686–687. | |
% @see Welch, P.D. (1967) "The Use of Fast Fourier Transform for the Estimation of Power Spectra: A Method Based on | |
% Time Averaging Over Short, Modified Periodograms", IEEE Transactions on Audio Electroacoustics, AU-15, 70–73. | |
% | |
% @link http://en.wikipedia.org/wiki/Bartlett%27s_method | |
% @link http://en.wikipedia.org/wiki/Welch_method |
// compile with -std=c++11 | |
// | |
// @author jonbrennecke / https://github.com/jonbrennecke | |
#include <iostream> | |
#include <vector> | |
#include <regex> | |
#include <string> | |
/** |
var board = [ | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 'X', 'X', 'X', 'X', 'X', 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ] | |
]; |
function [ header, records ] = edf ( filepath ) | |
% Parse EDF file information based on the EDF/EDF+ specs | |
% @see http://www.edfplus.info/specs/index.html | |
fid = fopen( filepath, 'rb' ); | |
data = fread(fid,256,'*char'); | |
% TODO regex to strip trailing whitespace |
function [data]= unitactivity(chanNum,sort,snippetWidth,snippetOffset,tank,block,data) | |
%chanNum = channel number from which to draw data; | |
%sort = cluster of units to be plotted in parallel with the EEG. Can be any subset of sort codes for that channel or all of them | |
%snippetWidth = number of seconds of data to plot | |
%snippetOffset= number of seconds into the file to start plotting. | |
%tank and block are the data source. For instance: 'D:\OptoTagging\6_16_14','6_16_14_10min_Stim' | |
% | |
%data = an optional parameter. If a TDT block data set already exists as a structured array, the | |
%function will plot data from that structured array. If the data structure | |
%does not yet exist, DO NOT list data as a a parameter. ONLY input the |
OS
Linux Kernel X Server openbox window manager, blank config so no other programs can be activated
auto login at boot
var cp = require('child_process'), | |
fs = require('fs'), | |
execSync = require('exec-sync'); | |
var fsck = cp.spawn("git", ["fsck", "--cache", "--unreachable","$(git for-each-ref --format=\"%(objectname)\")"]) | |
var stdout = ''; | |
fsck.stdout.on('data',function(data){ | |
stdout += data.toString(); |
Let a = b
a^2 = ab
a^2 + a^2 = a^2 + ab
2a^2 = a^2 + ab
2a^2 - 2ab = a^2 + ab - 2ab
2a^2 - 2ab = a^2 - ab
2(a^2 - ab) = a^2 - ab
2 = 1
A king is throwing a party in 24 hours and has 1000 bottles of wine. But alas, 10 enemy bandits break into his wine cellar! The king's guards catch the spies, but only after they have poisoned 1 bottle of wine. No one knows which bottle of wine was poisoned, and the poison is such that any amount of poison will kill whoever drinks it in exactly 24 hours. The king has a plan! He will use the 10 bandits (who were going to be executed anyways) to find exactly which bottle of wine was poisoned.
What is the kings plan?
// Get env (like `env`) | |
Get-ChildItem Env: | |
// Set var (like `export name=value`) | |
[Environment]::SetEnvironmentVariable("Name", "Value") | |
// Remove var (like `unset name=value`) | |
[Environment]::SetEnvironmentVariable("Name", "Value") |