Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEgn+cKNDjDeEyrkcOlPC8qsMqzn6sdMRm02EctZ3c/TDcKp3BheWxvYWTESpcCB8QgRqSCJYNPNZpSJdLrBtTxP+Ecsg3gRfV2QcAVT4EA+jrEIC51ewx6VipNATlRp7hXSkJBVkObe7jOqFNep6HwZIaAAgHCo3NpZ8RA0JiwMzC/KJmh0kZ6EKAhWwVNV3nVaViklUNZOHj7ER4//G/CwEIJDNc+rzw8CSe5Bfyu5Wa9Y1kiVJz2wQUBB6hzaWdfdHlwZSCkaGFzaIKkdHlwZQildmFsdWXEIO7cxNT/Bgx3n9SCKx1vVAV49PWWc48WLP90rMI/jI5Xo3RhZ80CAqd2ZXJzaW9uAQ== |
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
desc "Default deploy task" | |
task :deploy do | |
# Check if preview posts exist, which should not be published | |
if File.exists?(".preview-mode") | |
puts "## Found posts in preview mode, regenerating files ..." | |
File.delete(".preview-mode") | |
Rake::Task[:generate].execute | |
end | |
Rake::Task[:copydot].invoke(source_dir, public_dir) |
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 model is the most naive one | |
# find the occurences of the keywords listed and consider them to be matched. | |
# TODO will be to apply a Bag of Words model or some sort and assign credit score | |
# read raw caption files | |
caption_data, metadata = next(load_caption_files(path_to_caption_file)) | |
# combine captions by 10 seconds (i.e. make time blocks) | |
X = split_caption_to_X(caption_data) | |
keywords = ['caption', 'type=story', 'type=commercial'] |
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
fp = FingerPrint(path_to_dejavu_config_file) | |
timestamp_pb = 20000 # program boundary timestamp in secs from | |
PAD = 10 # temporal padding to apply to the timestamp | |
# slice an audio segement off the video | |
fp.slice_audio_segment(path_to_full_video_or_audio, pb - PAD, pb + PAD, "mp4") | |
# extract the fingerprint of the segment and save it to db | |
# db's configured in the .config file | |
# the path for the full video/audio and the segment may be different |
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
var fizzbuzz = function(n){ | |
var answer = ''; | |
if (n % 3 === 0) { | |
answer = 'Fizz'; | |
} | |
if (n % 5 === 0) { | |
answer += 'Buzz'; | |
} | |
if (!answer){ | |
answer = n; |
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
var fibonacci = function(){ | |
var _cache = []; | |
var fib = function(i){ | |
if (i < 0) { | |
console.err('invalid input. i must be >= 0'); | |
return; | |
} | |
if (i < 2) { | |
_cache[i] = 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
if (!require(phaseR)){ | |
install.packages('phaseR') | |
require(phaseR) | |
} | |
# a system of two non-linear autonomous ODE's | |
ode = function (t, y, parameters) { | |
x <- y[1] | |
y <- y[2] | |
dy <- numeric(2) |
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
// by default, it fetches pdf | |
// change pdf to an extension you want | |
var pdflinks = []; | |
Array.prototype.map.call(document.querySelectorAll("a[href$=\".pdf\"]"), function(e, i) { | |
if ((pdflinks || []).indexOf(e.href) == -1) { | |
pdflinks.push(e.href); | |
} | |
}); | |
console.log(pdflinks.join(" ")); | |
// copy the logged file names |
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
<Response> | |
<Dial callerId="16501112222" dialMusic="real"> | |
<Number>15556667777</Number> | |
</Dial> | |
</Response> |
NewerOlder