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
| String.prototype.title_case = function () { | |
| return this.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); | |
| }; | |
| r = ''; | |
| $('#IdModelo option').each(function(){ | |
| r += 'u\''+$(this).text().title_case()+'\', '; | |
| }); | |
| console.log(r); |
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
| # Compress Files | |
| tar -zcvf foo.tar.gz /home/douglas/foo | |
| # Extract files | |
| tar -zxvf foo.tar.gz |
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
| #-*-coding: utf-8 -*- | |
| ''' | |
| This module represents the recommender system for recommending | |
| new friends based on 'mutual friends'. | |
| ''' | |
| __author__ = 'Marcel Caraciolo <caraciol@gmail.com>' |
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
| from fabric.api import * | |
| # current_git_branch = local('git symbolic-ref HEAD', capture=True).split('/')[-1] | |
| # === Environments === | |
| def development(): | |
| env.env = 'development' | |
| env.settings = '{{ project_name }}.settings.development' |
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 apt-get build-dep python-numpy python-scipy python-libsvm python-matplotlib | |
| pip install numpy | |
| pip install scipy | |
| pip install python-libsvm | |
| pip install matplotlib |
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
| from splinter.browser import Browser | |
| browser = Browser() | |
| browser.visit('http://media.douglasmiranda.com/labs/exemplos/splinter_pop-up/') | |
| parent_window = browser.current_window # Save the parent window | |
| browser.find_by_id('open-popup').first.click() | |
| for window in browser.windows: | |
| # Switch to a different window (the pop-up) |
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
| hello new gist :) |
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 add-apt-repository ppa:videolan/stable-daily | |
| sudo apt-get update | |
| sudo apt-get install vlc |
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
| https://extensions.gnome.org/extension/37/quicklaunch/ | |
| https://extensions.gnome.org/extension/354/maximus/ | |
| https://extensions.gnome.org/extension/307/dash-to-dock/ | |
| https://extensions.gnome.org/extension/2/move-clock/ |
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
| # This is a really old post, in the comments (and stackoverflow too) you'll find better solutions. | |
| def find(key, dictionary): | |
| for k, v in dictionary.iteritems(): | |
| if k == key: | |
| yield v | |
| elif isinstance(v, dict): | |
| for result in find(key, v): | |
| yield result | |
| elif isinstance(v, list): |