По ссылке http://tinyurl.com/qyot9y2 расположен текстовый файл. Из этого файла необходимо удалить все символы, оставив лишь те, которые встречаются относительно редко (используйте базовые знания статистики, чтобы определить что такое для данного файла "редко"). На выходе получится фраза, которая и будет результатом выполнения задания.
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
public class PriorityCollection | |
{ | |
private readonly BlockingCollection<Item> low = new BlockingCollection<Item>(); | |
private readonly BlockingCollection<Item> middle = new BlockingCollection<Item>(); | |
private readonly BlockingCollection<Item> high = new BlockingCollection<Item>(); | |
private readonly BlockingCollection<Guid> main = new BlockingCollection<Guid>(); | |
private readonly BlockingCollection<Item>[] queue; | |
private readonly Dictionary<Priority, BlockingCollection<Item>> priorityMap = new Dictionary<Priority, BlockingCollection<Item>>(); | |
public List<Priority> TestList { get; private set; } |
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
10;20;30;40 |
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
Although quite short, this kata is fascinating in the way it shows how ‘if’ statements become ‘while’ statements as the number of test cases increase. It’s also a wonderful example of how algorithms sometimes become simpler as they become more general. | |
1. Write a class named “PrimeFactors” that has one method: generate. The generate method takes an integer argument and returns a List<Integer>. That list contains the prime factors of argument in numerical sequence. | |
2. Write test and code for argument = 1. Result should be empty list. | |
3. Write test and code for argument = 2. Result should be [2]. | |
4. Write test and code for argument = 3. Result should be [3]. | |
5. Write test and code for argument = 4. Result should be [2,2]. | |
6. Write test and code for argument = 6. Result should be [2,3]. | |
7. Write test and code for argument = 8. Result should be [2,2,2]. | |
8. Write test and code for argument = 9. Result should be [3,3]. |
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 math | |
import random | |
import pylab | |
class Node(object): | |
def __init__(self): | |
self.links = [] | |
class RecursiveGraph(list): | |
def add_nodes(self, nodes): |
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 math | |
import random | |
import pylab | |
class Node(object): | |
def __init__(self): | |
self.links = [] | |
class RecursiveGraph(list): | |
def add_nodes(self, nodes): |
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 functools import update_wrapper | |
def decorator(d): | |
return lambda fn: update_wrapper(d(fn), fn) | |
decorator = decorator(decorator) | |
@decorator | |
def n_ary(f): | |
"""Given binary function f(x, y), return an n_ary function such |