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
| (require 'twittering-mode) | |
| (twittering-enable-unread-status-notifier) | |
| (setq twittering-use-master-password t) | |
| (add-hook 'twittering-mode-hook | |
| (lambda () | |
| (setq twittering-timer-interval 300) | |
| (setq twittering-url-show-status nil) | |
| (setq twittering-icon-mode nil) |
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
| <div class="slider hero__slider"> | |
| <input class="slider__input" type="radio" name="point" id="slide-1" checked /> | |
| <input class="slider__input" type="radio" name="point" id="slide-2" /> | |
| <input class="slider__input" type="radio" name="point" id="slide-3" /> | |
| <input class="slider__input" type="radio" name="point" id="slide-4" /> | |
| <input class="slider__input" type="radio" name="point" id="slide-5" /> | |
| <div class="slider__content"> | |
| <div class="slider__slide slider__slide--1"><img src="{{ static('temp/slide1.png') }}" class="slider__slide__image" /></div> | |
| <div class="slider__slide slider__slide--2"><img src="{{ static('temp/slide2.png') }}" class="slider__slide__image" /></div> |
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
| class Base(object): | |
| def process(self, s=''): | |
| return s | |
| class M1(object): | |
| def process(self, *args, **kwargs): | |
| s = super(M1, self).process(*args, **kwargs) | |
| s += '_1_' | |
| return s |
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
| {% extends "layout.html" %} | |
| {% block body %} | |
| <input type="text" id="interaction"> | |
| <input type="submit" value="submit" id="submit"> | |
| <script type="text/javascript" src="/static/js/jquery-1.11.1.min.js"></script> | |
| <script type="text/javascript"> |
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 -*- | |
| import random | |
| class Dot(object): | |
| def __init__(self, x, y): | |
| self.coords = [x, y] | |
| class Line(object): |
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
| def retry(times, *exception_types): | |
| def try_it(func, *fargs, **fkwargs): | |
| for i in xrange(times - 1): | |
| try: | |
| return func(*fargs, **fkwargs) | |
| except exception_types or Exception: | |
| pass | |
| return func(*fargs, **fkwargs) | |
| return try_it |
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
| import decorator | |
| def retry(times, *exception_types): | |
| @decorator.decorator | |
| def try_it(func, *fargs, **fkwargs): | |
| for i in xrange(times): | |
| try: | |
| return func(*fargs, **fkwargs) | |
| except exception_types or Exception: |
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
| log(logger.debug, 'Getting browser instance...', { | |
| 'Proxy': proxy.proxy_ip, | |
| 'User-Agent': user_agent, | |
| }) |
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
| def log(func, message, data={}): | |
| for k, v in data.items(): | |
| message += '\n\t %s: %%(%s)s' % (k, k) | |
| if data: | |
| return func(message, data) | |
| return func(func) |
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
| browser.find_element_by_id('firstName').send_keys(first_name) | |
| browser.find_element_by_id('lastName').send_keys(last_name) | |
| browser.find_element_by_id('email').send_keys(email) | |
| browser.find_element_by_id('emailRepeat').send_keys(email) | |
| browser.find_element_by_id('skypeName').send_keys(username) | |
| browser.find_element_by_id('password').send_keys(password) | |
| browser.find_element_by_id('repeatPassword').send_keys(password) |