<commit_before>module Kernel
  
  # Verifies that the device running the app is an iPhone.
  # @return [TrueClass, FalseClass] true will be returned if the device is an iPhone, false otherwise.
  def iphone?
    UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone
  end

  # Verifies that the device running the app is an iPad.
  # @return [TrueClass, FalseClass] true will be returned if the device is an iPad, false otherwise.
  def ipad?
    UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad
  end

  # Returns the application's document directory path where users might be able to upload content.
  # @return [String] the path to the document directory
  def documents_path
    NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0]
  end

  def app_delegate<commit_msg>Front and Rear Camera Helpers<commit_after>module Kernel
  
  # Verifies that the device running the app is an iPhone.
  # @return [TrueClass, FalseClass] true will be returned if the device is an iPhone, false otherwise.
  def iphone?
    UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone
  end

  # Verifies that the device running the app is an iPad.
  # @return [TrueClass, FalseClass] true will be returned if the device is an iPad, false otherwise.
  def ipad?
    UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad
  end

  # Verifies that the device running has a front facing camera.
  # @return [TrueClass, FalseClass] true will be returned if the device has a front facing camera, false otherwise.
  def front_camera?
    UIImagePickerController.isCameraDeviceAvailable(UIImagePickerControllerCameraDeviceFront)
  end

  # Verifies that the device running has a rear facing camera.
  # @return [TrueClass, FalseClass] true will be returned if the device has a rear facing camera, false otherwise.
  def rear_camera?
    UIImagePickerController.isCameraDeviceAvailable(UIImagePickerControllerCameraDeviceRear)
  end

  # Returns the application's document directory path where users might be able to upload content.
  # @return [String] the path to the document directory
  def documents_path
    NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0]
  end

  def app_delegate
{'fraction_non_alphanumeric': 0.04965156794425087, 'fraction_numerical': 0.0008710801393728223, 'mean_word_length': 4.643734643734644, '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': '173973', 'n_tokens_mistral': 626, 'n_tokens_neox': 610, 'n_words': 249}