This file contains hidden or 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
function getUsedSelectors() { | |
var allRules = []; | |
_.each(document.styleSheets, function (sheet) { | |
var rules; | |
if (sheet.rules) { | |
rules = _.map(sheet.rules, function (rule) { | |
return rule.selectorText; | |
}); |
This file contains hidden or 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
var codeset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
var base = codeset.length; | |
function encode(n) { | |
var converted = ""; | |
while (n > 0) { | |
converted = converted + codeset[n%base]; | |
n = Math.floor(n/base); |
This file contains hidden or 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
explorer . | |
start . | |
explorer c:\some\folder\path | |
start %systemroot% |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
First a GPS time series is decomposed into sub-time series using the EMD. Then the Hurst parameter is estimated for each sub-time series. Finally the sub-time series with H ≤ 0.5 are selected to extract the statistics of the white noise. | |
1. EMD (Empirical Mode Decomposition) | |
http://www.slideshare.net/EMYJANE/empirical-mode-decomposition | |
http://www.slideshare.net/puneet4gupta/hilbert-huang-transformhht | |
https://github.com/jaidevd/pyhht/blob/master/EMD.py | |
The EMD method consists of decomposing a time series, x(t), into sub-series, also called Intrinsic Mode Function (IMF). The decomposition of x(t) is done via the study of consecutive local extrema (i.e. two minima in the time interval [t1, t2]). | |
Each IMF is the result of applying a different band-pass filter with certain cutoff frequencies. |
This file contains hidden or 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
git log --author="YOUR_NAME" --pretty=tformat: --numstat \ | |
| gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' - |
This file contains hidden or 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
sudo rm -rf /Library/DropboxHelperTools |
This file contains hidden or 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
sudo dscacheutil -flushcache | |
sudo killall -HUP mDNSResponder |
This file contains hidden or 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
/* | |
Task | |
Your task will be to write a program for reversing numbers in binary. | |
For instance, the binary representation of 13 is 1101, | |
and reversing it gives 1011, which corresponds to number 11. | |
Input | |
The input contains a single line with an integer N, 1 ≤ N ≤ 1000000000. | |
Output |
This file contains hidden or 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
memory_size: 8192 | |
cpu_count: 4 |
NewerOlder