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 java.awt.Graphics2D; | |
import java.awt.image.BufferedImage; | |
import javax.imageio.ImageIO; | |
import java.io.*; | |
import java.util.*; | |
public class FindClone { | |
static final int SIZE = 20; | |
BufferedImage changeSize(String file_name) throws IOException{ |
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 PIL import Image, ImageFont, ImageDraw | |
import sys | |
from encodings import koi8_r | |
font_path = sys.argv[1] | |
char_size = int(sys.argv[2]) | |
def create_image(ch, image_name, font_path, font_size): | |
image = Image.new(mode='RGB', size=[char_size, char_size], color=(0xff, 0xff, 0xff)) | |
draw = ImageDraw.Draw(image) |
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 java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ConcurrentLinkedQueue; | |
import java.util.stream.Collectors; | |
public class FastSplitter { | |
// Очищаем и делим строку на списки строк за один проход | |
public List<List<String>> splitAndClear(String input) { |
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 java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
import java.util.stream.Collectors; | |
public class FastSplitter { |