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
| """ Project Euler problem #2. """ | |
| def problem(): | |
| """ Solve the problem. | |
| By considering the terms in the Fibonacci sequence whose values do not | |
| exceed four million, find the sum of the even-valued terms. | |
| Answer: 4613732 |
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
| """ Project Euler problem #1. """ | |
| def problem(): | |
| """ Solve the problem. | |
| If we list all the natural numbers below 10 that are multiples of 3 or 5, | |
| we get 3, 5, 6 and 9. The sum of these multiples is 23. | |
| Find the sum of all the multiples of 3 or 5 below 1000. |
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
| #!/usr/bin/env python | |
| import doctest | |
| import itertools as it | |
| import math | |
| def divisor_generator(num): | |
| """ |
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
| // | |
| // Cell.h | |
| // Cell | |
| // | |
| // Created by Kirill Klenov on 09.11.13. | |
| // Copyright (c) 2013 Kirill Klenov. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
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
| // | |
| // City.h | |
| // city | |
| // | |
| // Created by Kirill Klenov on 09.11.13. | |
| // Copyright (c) 2013 Kirill Klenov. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
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
| #!/bin/sh | |
| # | |
| # Kirill Klenov | |
| # Oct 27, 2013 | |
| # | |
| # Usage: Add it to your PATH and `git submodule-remove path/to/submodule`. | |
| ROOT=$(git rev-parse --show-toplevel) | |
| SUBMODULE_NAME=$(echo "$1" | sed 's/\/$//'); shift | |
| test -z "$SUBMODULE_NAME" && echo "You should define path to submodule." 1>&2 && exit 1 |
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
| // Push payload scheme | |
| // JSON schema: http://json-schema.org/ | |
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "description": "Push payload specification", | |
| "type": "object", | |
| "oneOf": [ | |
| { | |
| "$ref": "#/definitions/ping", |
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
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import Queue | |
| import threading | |
| import sys | |
| import traceback | |
| from pylint.lint import Run | |
| from pylint.utils import UnknownMessage |
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
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import Queue | |
| import threading | |
| import sys | |
| import traceback | |
| from pylint.lint import Run | |
| from pylint.utils import UnknownMessage |
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 pylint(path, **meta): | |
| """ Pylint code checking. | |
| :return list: List of errors. | |
| """ | |
| from sys import version_info | |
| if version_info > (3, 0): | |
| import logging | |
| logging.warn("Pylint don't supported python3 and will be disabled.") |