<commit_before>import Block


class BlockEngine(object):
    def __init__(self):
        self.tiles = None

    def parseLevel(self, level):
        tiles = []
        for li in level:
            temp = []
            for x in li:
                temp += [x]
            tiles += [temp]
        self.tiles = tiles
        #print 'rotating....'
        #self.printTiles()
        #self.rotateLeft()
        return self.tiles

    #m = 9
    #n = 20
    def rotateRight(self):
        temp = [[0 for x in xrange(len(self.tiles))] for y in xrange(len(self.tiles[0]))]

        for t in temp:
            print t

        for y in xrange(0, len(self.tiles)):
            for x in xrange(0, len(self.tiles[0])):
                #print 'm = ', len(self.tiles), ' n = ', len(self.tiles[x])
                #print 'tile', self.tiles[len(self.tiles) - 1 - x][y], x, y
                #print self.tiles[0]
                #print self.tiles[0][10]
                #print y, -x + len(self.tiles[0]) - 1
                temp[x][y] = self.tiles[y][-x + len(self.tiles[0]) - 1]
            #print 'pass'
        self.tiles = temp
        #self.printTiles()
        return self.tiles

    def rotateLeft(self):
        self.rotateRight()
        self.rotateRight()
        return self.rotateRight()

    def printTiles(self):
        for x in self.tiles:
            print x<commit_msg>Mai raboti i nadqsno<commit_after>import Block


class BlockEngine(object):
    def __init__(self):
        self.tiles = None

    def parseLevel(self, level):
        tiles = []
        for li in level:
            temp = []
            for x in li:
                temp += [x]
            tiles += [temp]
        self.tiles = tiles
        #print 'rotating....'
        #self.printTiles()
        #self.rotateLeft()
        return self.tiles

    #m = 9
    #n = 20
    def rotateRight(self):
        temp = [[0 for x in xrange(len(self.tiles))] for y in xrange(len(self.tiles[0]))]

        for t in temp:
            print t

        for y in xrange(len(self.tiles)):
            for x in xrange(len(self.tiles[0])):
                #print 'm = ', len(self.tiles), ' n = ', len(self.tiles[x])
                #print 'tile', self.tiles[len(self.tiles) - 1 - x][y], x, y
                #print self.tiles[0]
                #print self.tiles[0][10]
                #print y, -x + len(self.tiles[0]) - 1
                temp[x][y] = self.tiles[y][-x + len(self.tiles[0]) - 1]
            #print 'pass'
        self.tiles = temp
        #self.printTiles()
        return self.tiles

    def rotateLeft(self):
        temp = [[0 for x in xrange(len(self.tiles))] for y in xrange(len(self.tiles[0]))]

        for y in xrange(len(self.tiles)):
            for x in xrange(len(self.tiles[0])):
                temp[y][-x+len(temp)-1] = self.tiles[x][y]
        self.tiles = temp
        return self.tiles
                
    def printTiles(self):
        for x in self.tiles:
            print x
{'fraction_non_alphanumeric': 0.14035087719298245, 'fraction_numerical': 0.012145748987854251, 'mean_word_length': 1.5255536626916524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1300669', 'n_tokens_mistral': 1026, 'n_tokens_neox': 982, 'n_words': 242}