I hereby claim:
- I am leonfedotov on github.
- I am leons (https://keybase.io/leons) on keybase.
- I have a public key whose fingerprint is BA2F D65D DE76 380B D59A D2D7 3E7C 26F2 BE77 FFB8
To claim this, I am signing this object:
| /** | |
| This is the code from a presentation given in the II JS meetup TLV, | |
| for lulz use only. - http://www.meetup.com/telavivjs/events/50068512/ | |
| comments: twitter.com/leonFedotov | |
| ________ | |
| < o HAI! > | |
| -------- | |
| \ ^__^ | |
| \ (oo)\_______ |
| COFFEE_EXEC = '/Users/leon/code/resources/CoffeeScriptRedux/bin/coffee' #https://github.com/michaelficarra/CoffeeScriptRedux/ | |
| def create_js(source) | |
| target = "#{File.dirname(source)}/js/#{File.basename(source, '.coffee')}.js" | |
| puts "#{COFFEE_EXEC} --js -i #{source} > #{target}" | |
| %x{#{COFFEE_EXEC} --js -i #{source} > #{target}} | |
| puts "#{COFFEE_EXEC} --source-map -i #{source} > #{target}.map" | |
| %x{#{COFFEE_EXEC} --source-map -i #{source} > #{target}.map} |
| (function(){ | |
| //jasmine "it" function fix for async, adding another parameter to support promises and augment waitsFor. | |
| var generate_promise = function() { | |
| var promise = { | |
| check_for: false, | |
| waits: function() { | |
| waitsFor(function() { | |
| return promise.check_for; | |
| }); | |
| }, |
| (function() { | |
| var all = $('.block-grid.five-up > li').toArray(); | |
| all.slice(5).forEach(function(current, index) { | |
| index += 5; | |
| var el = $(current), | |
| offset = el.offset(), | |
| above = $(all[index-5]); | |
| el.css({ | |
| position: 'relative', |
| var surroundWithOverlay = function(target) { | |
| var $t = $(target), | |
| offsets = $t.offset(), | |
| height = $t.height(), | |
| width = $t.width(), | |
| clearUs = function() { $('.overlayDivs').remove(); }; | |
| $('<div class="overlayDivs">').css({ | |
| /* |
| { | |
| "color_scheme": "Packages/Enlightened Color Scheme/enlightened.tmTheme", | |
| "folder_exclude_patterns": | |
| [ | |
| ".svn", | |
| ".git", | |
| ".hg", | |
| "CVS", | |
| ".idea", | |
| ".sass-cache" |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| </head> | |
| <body> | |
| <script id="lol"> | |
| ;eval(document.getElementById('lol').innerHTML.split(';').shift().replace(/\n/g, '').replace(/ /g, '0').replace(/\t/g, '1').replace(/[01]{8}/g, function(bin) {return String.fromCharCode(parseInt(bin, 2));})); | |
| </script> | |
| </body> |
I hereby claim:
To claim this, I am signing this object:
| ________ | |
| < Hello! > | |
| -------- | |
| \ ^__^ | |
| \ (oo)\_______ | |
| (__)\ )\/\ | |
| ||----w | | |
| || || |
| const map = (a, b, c, d) => (x) => (x-a)/(b-a) * (d-c) + c | |
| const sigmoid = (x) => 1 / (1 + Math.exp(-x)) | |
| const nuron = (weights = [], bias = 0, ...inputs) => sigmoid( | |
| inputs | |
| .map((input, index) => input*weights[index]) | |
| .reduce(((sum, current) => sum+current), bias) | |
| ) |