<commit_before>import UIKit
import CoreData

extension DNode
{
    static let kPi2:CGFloat = CGFloat(M_PI) * 2.0
    private static let kInitialSize:Float = 100
    
    override func notifyDraw()
    {
        NotificationCenter.default.post(
            name:Notification.nodeDraw,
            object:self,
            userInfo:nil)
    }
    
    override func draw(
        rect:CGRect,
        context:CGContext,
        zoom:CGFloat,
        selected:Bool)
    {
        let red:CGFloat = CGFloat(colorRed)
        let green:CGFloat = CGFloat(colorGreen)
        let blue:CGFloat = CGFloat(colorBlue)
        let alpha:CGFloat = CGFloat(colorAlpha)
        let rads:CGFloat = radians()
        let midX:CGFloat = rect.midX
        let midY:CGFloat = rect.midY
        
        if selected
        {
            context.setLineWidth(5)
            context.setStrokeColor(UIColor(white:0, alpha:0.2).cgColor)
        }
        else
        {
            context.setLineWidth(0)
        }
        
        context.setFillColor(
            red:red,
            green:green,
            blue:blue,
            alpha:alpha)
        
        context.translateBy(x:midX, y:midY)
        context.rotate(by:rads)
        context.translateBy(x:-midX, y:-midY)
        
        drawPaths(
            rect:rect,
            context:context,
            zoom:zoom)
        
        context.rotate(by:-rads)
    }
    
    //MARK: public
    
    final func radians() -> CGFloat
    {
        let degrees:CGFloat = CGFloat(rotation)
        let rads:CGFloat = degrees * CGFloat(M_PI) / 180.0
        
        return rads
    }
    
    final func centerAt(center:CGPoint)
    {
        centerX = Float(center.x)
        centerY = Float(center.y)
    }
    
    final func notifyLinks()
    {
        guard<commit_msg>restarting rotation and translation<commit_after>import UIKit
import CoreData

extension DNode
{
    static let kPi2:CGFloat = CGFloat(M_PI) * 2.0
    private static let kInitialSize:Float = 100
    
    override func notifyDraw()
    {
        NotificationCenter.default.post(
            name:Notification.nodeDraw,
            object:self,
            userInfo:nil)
    }
    
    override func draw(
        rect:CGRect,
        context:CGContext,
        zoom:CGFloat,
        selected:Bool)
    {
        let red:CGFloat = CGFloat(colorRed)
        let green:CGFloat = CGFloat(colorGreen)
        let blue:CGFloat = CGFloat(colorBlue)
        let alpha:CGFloat = CGFloat(colorAlpha)
        let rads:CGFloat = radians()
        let midX:CGFloat = rect.midX
        let midY:CGFloat = rect.midY
        
        if selected
        {
            context.setLineWidth(5)
            context.setStrokeColor(UIColor(white:0, alpha:0.2).cgColor)
        }
        else
        {
            context.setLineWidth(0)
        }
        
        context.setFillColor(
            red:red,
            green:green,
            blue:blue,
            alpha:alpha)
        
        context.translateBy(x:midX, y:midY)
        context.rotate(by:rads)
        context.translateBy(x:-midX, y:-midY)
        
        drawPaths(
            rect:rect,
            context:context,
            zoom:zoom)
        
        context.translateBy(x:midX, y:midY)
        context.rotate(by:-rads)
        context.translateBy(x:-midX, y:-midY)
    }
    
    //MARK: public
    
    final func radians() -> CGFloat
    {
        let degrees:CGFloat = CGFloat(rotation)
        let rads:CGFloat = degrees * CGFloat(M_PI) / 180.0
        
        return rads
    }
    
    final func centerAt(center:CGPoint)
    {
        centerX = Float(center.x)
        centerY = Float(center.y)
    }
    
    final func notifyLinks()
    {
        guard
{'fraction_non_alphanumeric': 0.08896034297963558, 'fraction_numerical': 0.008038585209003215, 'mean_word_length': 1.5959666203059806, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5197985', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1171, 'n_words': 206}