I hereby claim:
- I am abele on github.
- I am abele (https://keybase.io/abele) on keybase.
- I have a public key whose fingerprint is 795B A0E1 6F1B 751B 6860 F91F B067 98E2 1D27 99BE
To claim this, I am signing this object:
| /** | |
| var bookView = 'https://www.amazon.com/mn/dcw/myx.html#/home/content/booksAll/dateDsc/'; | |
| */ | |
| function downloadContentCSV() { | |
| var lis = [].slice.call(document.querySelector('.nav.nav-grid.ui-grid').querySelectorAll('li')), | |
| csvContent = 'data:text/csv;charset=utf-8,'; | |
| lis.forEach(function (el, i) { | |
| var title = el.querySelector('#title' + i).innerHTML, | |
| author = el.querySelector('#author' + i).innerHTML, |
| import pytest | |
| def square(num): | |
| return num * num | |
| def recursive_map(f, _list): | |
| """Recusive map implementation.""" | |
| if not _list: |
| set_viewable_dates: function (task, month_to_check, now) { | |
| /* | |
| it will set: | |
| start_to_show, end_to_show (and postponed_to_show) | <-- moment() dates | | |
| variables to be used in list template, | |
| so that original start, end (and postponed) values of a task wouldn't be affected | |
| if a tasks start, end, postponed values span over month_to_check, | |
| start, end, postponed will be reduced to only contain values which cover month_to_check | |
| so that start_to_show <= month_to_check >= end_to_show |
| # -*- coding: utf-8 -*- | |
| import random | |
| def getRandomPerson(ppl): | |
| return ppl[random.randint(0,len(ppl)-1)] | |
| def good_pair(ignore_ppl, chosen1, chosen2): | |
| for pair in ignore_ppl: |
I hereby claim:
To claim this, I am signing this object:
| from fabric.api import sudo, task, env, local, settings | |
| from fabric.contrib.files import upload_template | |
| from fabric.contrib.project import upload_project | |
| import os | |
| salt_task = hosts('@'.join([os.environ['AS_MASTER_USER'], os.environ['AS_MASTER_HOST']])) | |
| """Decorator to specify Salt-Stack master user and host.""" |
Automate everything!
http://virtualenv.readthedocs.org/en/latest/virtualenv.html#installation https://pypi.python.org/pypi/virtualenv/1.11.6 http://www.fabfile.org/
For Fabric to work we need couple things:
| import re | |
| from functools import reduce | |
| def test_handles_words_with_vowels(): | |
| assert pig_latin('egg') == 'eggway' | |
| def test_handles_words_starting_with_consonat(): | |
| assert pig_latin('happy') == 'appyhay' |
| import re | |
| def test_with_with_vowels_ends_with_hey(): | |
| assert pig_latin('egg') == 'eggway' | |
| def test_handle_words_with_consonants(): | |
| assert pig_latin('happy') == 'appyhay' |
| var Robot = function(robot) { | |
| robot.rotateCannon(-90); | |
| }; | |
| Robot.prototype.onIdle = function(ev) { | |
| var robot = ev.robot; | |
| robot.ahead(); | |
| //i'll add a clone but i need to refactor collision | |
| //robot.clone(); | |
| }; |