This file contains 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 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 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 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 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 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 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 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 #3. """ | |
def problem(): | |
""" Solve the problem. | |
What is the largest prime factor of the number 600851475143 ? | |
Answer: 6857 |
This file contains 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 #4. """ | |
import itertools as it | |
def problem(): | |
u""" Solve the problem. | |
A palindromic number reads the same both ways. The largest palindrome made | |
from the product of two 2-digit numbers is 9009 = 91 * 99. |
This file contains 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 #5. """ | |
from fractions import gcd | |
def problem(): | |
""" Solve the problem. | |
2520 is the smallest number that can be divided by each of the numbers | |
from 1 to 10 without any remainder. |