<commit_before>#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSBundle.h>
#import <Foundation/NSPathUtilities.h>
#import <Foundation/NSProcessInfo.h>
#import "IPhonePlatform.hpp"
#import <UIKit/UIDevice.h>
#import <UIKit/UIScreen.h>
#import <UIKit/UIScreenMode.h>

#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>

IPhonePlatform::IPhonePlatform()
{
  NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];    

  NSBundle * bundle = [NSBundle mainBundle];
  NSString * path = [bundle resourcePath];
	m_resourcesPath = [path UTF8String];
  m_resourcesPath += '/';
	
  NSArray * dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString * docsDir = [dirPaths objectAtIndex:0];
  m_writablePath = [docsDir UTF8String];
  m_writablePath += '/';

  m_StartDate = [[NSDate alloc] init];
  
	/// Hardcoding screen resolution depending on the device we are running.
 	m_visualScale = 1.0;
	m_skinName = "basic.skn";
	m_isMultiSampled = false;
	m_doPeriodicalUpdate = true;
	m_periodicalUpdateInterval = 0.3;

	/// Calculating resolution
	UIDevice * device = [UIDevice currentDevice];
		
	NSRange range = [device.name rangeOfString:@"iPad"];
	if (range.location != NSNotFound)
	{
		m_deviceID = "iPad";
		m_visualScale = 1.3;
	}
	else {
		range = [device.name rangeOfString:@"iPod"];
		float ver = [device.systemVersion floatValue];
		if (ver >= 3.1999)
		{
			m_deviceID = "iPod";
			UIScreen * mainScr = [UIScreen mainScreen];
			if (mainScr.currentMode.size.width == 640)
			{
				m_deviceID = "iPod";
				m_visualScale = 2.0;
				m_isMultiSampled = false;
				m_skinName = "basic_highres.skn";
			}
		}
	}
	
	m_scaleEtalonSize = 256 * m_visualScale;
	
	NSLog(@"Device Name : %@, SystemName : %@, SystemVersion : %@", device.name, device.systemName, device.systemVersion);<commit_msg>changed scaleEtalonSize.<commit_after>#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSBundle.h>
#import <Foundation/NSPathUtilities.h>
#import <Foundation/NSProcessInfo.h>
#import "IPhonePlatform.hpp"
#import <UIKit/UIDevice.h>
#import <UIKit/UIScreen.h>
#import <UIKit/UIScreenMode.h>

#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>

IPhonePlatform::IPhonePlatform()
{
  NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];    

  NSBundle * bundle = [NSBundle mainBundle];
  NSString * path = [bundle resourcePath];
	m_resourcesPath = [path UTF8String];
  m_resourcesPath += '/';
	
  NSArray * dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString * docsDir = [dirPaths objectAtIndex:0];
  m_writablePath = [docsDir UTF8String];
  m_writablePath += '/';

  m_StartDate = [[NSDate alloc] init];
  
	/// Hardcoding screen resolution depending on the device we are running.
 	m_visualScale = 1.0;
	m_skinName = "basic.skn";
	m_isMultiSampled = false;
	m_doPeriodicalUpdate = true;
	m_periodicalUpdateInterval = 0.3;

	/// Calculating resolution
	UIDevice * device = [UIDevice currentDevice];
		
	NSRange range = [device.name rangeOfString:@"iPad"];
	if (range.location != NSNotFound)
	{
    m_deviceID = "iPad";
    m_visualScale = 1.3;
	}
	else {
		range = [device.name rangeOfString:@"iPod"];
		float ver = [device.systemVersion floatValue];
		if (ver >= 3.1999)
		{
			m_deviceID = "iPod";
			UIScreen * mainScr = [UIScreen mainScreen];
			if (mainScr.currentMode.size.width == 640)
			{
				m_deviceID = "iPod";
				m_visualScale = 2.0;
				m_isMultiSampled = false;
				m_skinName = "basic_highres.skn";
			}
		}
	}
	
	m_scaleEtalonSize = (256 * 1.5) * m_visualScale;
	
	NSLog(@"Device Name : %@, SystemName : %@, SystemVersion : %@", device.name, device.systemName, device.systemVersion);
{'fraction_non_alphanumeric': 0.13352956917313352, 'fraction_numerical': 0.01230933904201231, 'mean_word_length': 4.480938416422287, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, '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': '2477564', 'n_tokens_mistral': 1480, 'n_tokens_neox': 1341, 'n_words': 265}