text:
#include "dispatch.h"

namespace GFR {

void InitInstanceDispatchTable(VkInstance instance,
                               PFN_vkGetInstanceProcAddr pa,
                               InstanceDispatchTable *dt) {

  dt->GetPhysicalDeviceDisplayPropertiesKHR =
      (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)pa(
          instance, "vkGetPhysicalDeviceDisplayPropertiesKHR");
  dt->GetPhysicalDeviceDisplayPlanePropertiesKHR =
      (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)pa(
          instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
  dt->GetDisplayPlaneSupportedDisplaysKHR =
      (PFN_vkGetDisplayPlaneSupportedDisplaysKHR)pa(
          instance, "vkGetDisplayPlaneSupportedDisplaysKHR");
  dt->GetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR)pa(
      instance, "vkGetDisplayModePropertiesKHR");
  dt->CreateDisplayModeKHR =
      (PFN_vkCreateDisplayModeKHR)pa(instance, "vkCreateDisplayModeKHR");
  dt->GetDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR)pa(
      instance, "vkGetDisplayPlaneCapabilitiesKHR");
  dt->CreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR)pa(
      instance, "vkCreateDisplayPlaneSurfaceKHR");
  dt->DestroySurfaceKHR =
      (PFN_vkDestroySurfaceKHR)pa(instance, "vkDestroySurfaceKHR");
  dt->GetPhysicalDeviceSurfaceSupportKHR =
      (PFN_vkGetPhysicalDeviceSurfaceSupportKHR)pa(
          instance, "vkGetPhysicalDeviceSurfaceSupportKHR");
  dt->GetPhysicalDeviceSurfaceCapabilitiesKHR =
      (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)pa(
          instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
  dt->GetPhysicalDeviceSurfaceFormatsKHR =
      (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)pa(
          instance, "vkGetPhysicalDeviceSurfaceFormatsKHR");
  dt->GetPhysicalDeviceSurfacePresentModesKHR =
      (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)pa(
          instance, "vkGetPhysicalDeviceSurfacePresentModesKHR");
  dt->CreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)pa(
      instance, "vkCreateDebugReportCallbackEXT");
  dt->DestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)pa(
      instance, "vkDestroyDebugReportCallbackEXT");
  dt->DebugReportMessageEXT =
      (PFN_vkDebugReportMessageEXT)pa(instance, "vkDebugReportMessageEXT");
  dt->GetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2)pa(
      instance, "vkGetPhysicalDeviceFeatures2");
  dt->GetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR)pa(
      instance, "vkGetPhysicalDeviceFeatures2KHR");
  dt->GetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2)pa(
      instance, "vkGetPhysicalDeviceProperties2");
  dt->GetPhysicalDeviceProperties2KHR =
      (PFN_vkGetPhysicalDeviceProperties2KHR)pa(
          instance, "vkGetPhysicalDeviceProperties2KHR");
  dt->GetPhysicalDeviceFormatProperties2 =
      (PFN_vkGetPhysicalDeviceFormatProperties2)pa(
          instance, "vkGetPhysicalDeviceFormatProperties2");
  dt->GetPhysicalDeviceFormatProperties2KHR =
      (PFN_vkGetPhysicalDeviceFormatProperties2KHR)pa(
          instance, "vkGetPhysicalDeviceFormatProperties2KHR");
  dt->GetPhysicalDeviceImageFormatProperties2 =
      (PFN_vkGetPhysicalDeviceImageFormatProperties2)pa(
          instance, "vkGetPhysicalDeviceImageFormatProperties2");
  dt->GetPhysicalDeviceImageFormatProperties2KHR =
      (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)pa(
          instance, "vkGetPhysicalDeviceImageFormatProperties2KHR");
  dt->GetPhysicalDeviceQueueFamilyProperties2 =
      (PFN_vkGetPhysicalDeviceQueueFamilyProperties2)pa(
          instance, "vkGetPhysicalDeviceQueueFamilyProperties2");
  dt->GetPhysicalDeviceQueueFamilyProperties2KHR =
      (PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)pa(
          instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR");
  dt->GetPhysicalDeviceMemoryProperties2 =
      (PFN_vkGetPhysicalDeviceMemoryProperties2)pa(
          instance, "vkGetPhysicalDeviceMemoryProperties2");
  dt->GetPhysicalDeviceMemoryProperties2KHR =
      (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)pa(
          instance, "vkGetPhysicalDeviceMemoryProperties2KHR");
  dt->GetPhysicalDeviceSparseImageFormatProperties2 =
      (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)pa(
          instance, "vkGetPhysicalDeviceSparseImageFormatProperties2");
  dt->GetPhysicalDeviceSparseImageFormatProperties2KHR =
      (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)pa(
          instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
  dt->GetPhysicalDeviceExternalBufferProperties =
      (PFN_vkGetPhysicalDeviceExternalBufferProperties)pa(
          instance, "vkGetPhysicalDeviceExternalBufferProperties");
  dt->GetPhysicalDeviceExternalBufferPropertiesKHR =
      (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)pa(
          instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR");
  dt->GetPhysicalDeviceExternalSemaphoreProperties =
      (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)pa(
          instance, "vkGetPhysicalDeviceExternalSemaphoreProperties");
  dt->GetPhysicalDeviceExternalSemaphorePropertiesKHR =
      (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)pa(
          instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
  dt->GetPhysicalDeviceExternalFenceProperties =
      (PFN_vkGetPhysicalDeviceExternalFenceProperties)pa(
          instance, "vkGetPhysicalDeviceExternalFenceProperties");
  dt->GetPhysicalDeviceExternalFencePropertiesKHR =
      (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)pa(
          instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR");
  dt->EnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups)pa(
      instance, "vkEnumeratePhysicalDeviceGroups");
  dt->EnumeratePhysicalDeviceGroupsKHR =
      (PFN_vkEnumeratePhysicalDeviceGroupsKHR)pa(
          instance, "vkEnumeratePhysicalDeviceGroupsKHR");
  dt->GetPhysicalDevicePresentRectanglesKHR =
      (PFN_vkGetPhysicalDevicePresentRectanglesKHR)pa(
          instance, "vkGetPhysicalDevicePresentRectanglesKHR");
  dt->GetPhysicalDeviceMultisamplePropertiesEXT =
      (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)pa(
          instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT");
  dt->GetPhysicalDeviceSurfaceCapabilities2KHR =
      (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)pa(
          instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR");
  dt->GetPhysicalDeviceSurfaceFormats2KHR =
      (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)pa(
          instance, "vkGetPhysicalDeviceSurfaceFormats2KHR");
  dt->GetPhysicalDeviceDisplayProperties2KHR =
      (PFN_vkGetPhysicalDeviceDisplayProperties2KHR)pa(
          instance, "vkGetPhysicalDeviceDisplayProperties2KHR");
  dt->GetPhysicalDeviceDisplayPlaneProperties2KHR =
      (PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR)pa(
          instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
  dt->GetDisplayModeProperties2KHR = (PFN_vkGetDisplayModeProperties2KHR)pa(
      instance, "vkGetDisplayModeProperties2KHR");
  dt->GetDisplayPlaneCapabilities2KHR =
      (PFN_vkGetDisplayPlaneCapabilities2KHR)pa(
          instance, "vkGetDisplayPlaneCapabilities2KHR");
  dt->GetPhysicalDeviceCalibrateableTimeDomainsEXT =
      (PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)pa(
          instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT");
  dt->CreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT)pa(
      instance, "vkCreateDebugUtilsMessengerEXT");
  dt->DestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT)pa(
      instance, "vkDestroyDebugUtilsMessengerEXT");
  dt->SubmitDebugUtilsMessageEXT = (PFN_vkSubmitDebugUtilsMessageEXT)pa(
      instance, "vkSubmitDebugUtilsMessageEXT");
  dt->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR =
      (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR)pa(
          instance,
          "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
  dt->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR =
      (PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR)pa(
          instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
  dt->CreateHeadlessSurfaceEXT = (PFN_vkCreateHeadlessSurfaceEXT)pa(
      instance, "vkCreateHeadlessSurfaceEXT");
  dt->GetPhysicalDeviceToolPropertiesEXT =
      (PFN_vkGetPhysicalDeviceToolPropertiesEXT)pa(
          instance, "vkGetPhysicalDeviceToolPropertiesEXT");
  dt->GetPhysicalDeviceFragmentShadingRatesKHR =
      (PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR)pa(
          instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR");
  dt->AcquireDrmDisplayEXT =
      (PFN_vkAcquireDrmDisplayEXT)pa(instance, "vkAcquireDrmDisplayEXT");
  dt->GetDrmDisplayEXT =
      (PFN_vkGetDrmDisplayEXT)pa(instance, "vkGetDrmDisplayEXT");
  dt->CreateInstance = (PFN_vkCreateInstance)pa(instance, "vkCreateInstance");
  dt->DestroyInstance =
      (PFN_vkDestroyInstance)pa(instance, "vkDestroyInstance");
  dt->EnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices)pa(
      instance, "vkEnumeratePhysicalDevices");
  dt->GetInstanceProcAddr =
      (PFN_vkGetInstanceProcAddr)pa(instance, "vkGetInstanceProcAddr");
  dt->GetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties)pa(
      instance, "vkGetPhysicalDeviceProperties");
  dt->GetPhysicalDeviceQueueFamilyProperties =
      (PFN_vkGetPhysicalDeviceQueueFamilyProperties)pa(
          instance, "vkGetPhysicalDeviceQueueFamilyProperties");
  dt->GetPhysicalDeviceMemoryProperties =
      (PFN_vkGetPhysicalDeviceMemoryProperties)pa(
          instance, "vkGetPhysicalDeviceMemoryProperties");
  dt->GetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures)pa(
      instance, "vkGetPhysicalDeviceFeatures");
  dt->GetPhysicalDeviceFormatProperties =
      (PFN_vkGetPhysicalDeviceFormatProperties)pa(
          instance, "vkGetPhysicalDeviceFormatProperties");
  dt->GetPhysicalDeviceImageFormatProperties =
      (PFN_vkGetPhysicalDeviceImageFormatProperties)pa(
          instance, "vkGetPhysicalDeviceImageFormatProperties");
  dt->CreateDevice = (PFN_vkCreateDevice)pa(instance, "vkCreateDevice");
  dt->EnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties)pa(
      instance, "vkEnumerateDeviceLayerProperties");
  dt->EnumerateDeviceExtensionProperties =
      (PFN_vkEnumerateDeviceExtensionProperties)pa(
          instance, "vkEnumerateDeviceExtensionProperties");
  dt->GetPhysicalDeviceSparseImageFormatProperties =
      (PFN_vkGetPhysicalDeviceSparseImageFormatProperties)pa(
          instance, "vkGetPhysicalDeviceSparseImageFormatProperties");

#ifdef VK_USE_PLATFORM_GGP
  dt->CreateStreamDescriptorSurfaceGGP =
      (PFN_vkCreateStreamDescriptorSurfaceGGP)pa(
          instance, "vkCreateStreamDescriptorSurfaceGGP");

#endif // VK_USE_PLATFORM_GGP
}

void InitDeviceDispatchTable(VkDevice device, PFN_vkGetDeviceProcAddr pa,
                             DeviceDispatchTable *dt) {

  dt->ResetQueryPool = (PFN_vkResetQueryPool)pa(device, "vkResetQueryPool");
  dt->ResetQueryPoolEXT =
      (PFN_vkResetQueryPoolEXT)pa(device, "vkResetQueryPoolEXT");
  dt->CmdDrawMultiEXT = (PFN_vkCmdDrawMultiEXT)pa(device, "vkCmdDrawMultiEXT");
  dt->CmdDrawMultiIndexedEXT =
      (PFN_vkCmdDrawMultiIndexedEXT)pa(device, "vkCmdDrawMultiIndexedEXT");
  dt->CreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)pa(
      device, "vkCreateSharedSwapchainsKHR");
  dt->CreateSwapchainKHR =
      (PFN_vkCreateSwapchainKHR)pa(device, "vkCreateSwapchainKHR");
  dt->DestroySwapchainKHR =
      (PFN_vkDestroySwapchainKHR)pa(device, "vkDestroySwapchainKHR");
  dt->GetSwapchainImagesKHR =
      (PFN_vkGetSwapchainImagesKHR)pa(device, "vkGetSwapchainImagesKHR");
  dt->AcquireNextImageKHR =
      (PFN_vkAcquireNextImageKHR)pa(device, "vkAcquireNextImageKHR");
  dt->QueuePresentKHR = (PFN_vkQueuePresentKHR)pa(device, "vkQueuePresentKHR");
  dt->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)pa(
      device, "vkDebugMarkerSetObjectNameEXT");
  dt->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)pa(
      device, "vkDebugMarkerSetObjectTagEXT");
  dt->CmdDebugMarkerBeginEXT =
      (PFN_vkCmdDebugMarkerBeginEXT)pa(device, "vkCmdDebugMarkerBeginEXT");
  dt->CmdDebugMarkerEndEXT =
      (PFN_vkCmdDebugMarkerEndEXT)pa(device, "vkCmdDebugMarkerEndEXT");
  dt->CmdDebugMarkerInsertEXT =
      (PFN_vkCmdDebugMarkerInsertEXT)pa(device, "vkCmdDebugMarkerInsertEXT");
  dt->CmdPushDescriptorSetKHR =
      (PFN_vkCmdPushDescriptorSetKHR)pa(device, "vkCmdPushDescriptorSetKHR");
  dt->TrimCommandPool = (PFN_vkTrimCommandPool)pa(device, "vkTrimCommandPool");
  dt->TrimCommandPoolKHR =
      (PFN_vkTrimCommandPoolKHR)pa(device, "vkTrimCommandPoolKHR");
  dt->GetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)pa(device, "vkGetMemoryFdKHR");
  dt->GetMemoryFdPropertiesKHR =
      (PFN_vkGetMemoryFdPropertiesKHR)pa(device, "vkGetMemoryFdPropertiesKHR");
  dt->GetSemaphoreFdKHR =
      (PFN_vkGetSemaphoreFdKHR)pa(device, "vkGetSemaphoreFdKHR");
  dt->ImportSemaphoreFdKHR =
      (PFN_vkImportSemaphoreFdKHR)pa(device, "vkImportSemaphoreFdKHR");
  dt->GetFenceFdKHR = (PFN_vkGetFenceFdKHR)pa(device, "vkGetFenceFdKHR");
  dt->ImportFenceFdKHR =
      (PFN_vkImportFenceFdKHR)pa(device, "vkImportFenceFdKHR");
  dt->GetDeviceGroupPeerMemoryFeatures =
      (PFN_vkGetDeviceGroupPeerMemoryFeatures)pa(
          device, "vkGetDeviceGroupPeerMemoryFeatures");
  dt->GetDeviceGroupPeerMemoryFeaturesKHR =
      (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)pa(
          device, "vkGetDeviceGroupPeerMemoryFeaturesKHR");
  dt->BindBufferMemory2 =
      (PFN_vkBindBufferMemory2)pa(device, "vkBindBufferMemory2");
  dt->BindBufferMemory2KHR =
      (PFN_vkBindBufferMemory2KHR)pa(device, "vkBindBufferMemory2KHR");
  dt->BindImageMemory2 =
      (PFN_vkBindImageMemory2)pa(device, "vkBindImageMemory2");
  dt->BindImageMemory2KHR =
      (PFN_vkBindImageMemory2KHR)pa(device, "vkBindImageMemory2KHR");
  dt->CmdSetDeviceMask =
      (PFN_vkCmdSetDeviceMask)pa(device, "vkCmdSetDeviceMask");
  dt->CmdSetDeviceMaskKHR =
      (PFN_vkCmdSetDeviceMaskKHR)pa(device, "vkCmdSetDeviceMaskKHR");
  dt->GetDeviceGroupPresentCapabilitiesKHR =
      (PFN_vkGetDeviceGroupPresentCapabilitiesKHR)pa(
          device, "vkGetDeviceGroupPresentCapabilitiesKHR");
  dt->GetDeviceGroupSurfacePresentModesKHR =
      (PFN_vkGetDeviceGroupSurfacePresentModesKHR)pa(
          device, "vkGetDeviceGroupSurfacePresentModesKHR");
  dt->AcquireNextImage2KHR =
      (PFN_vkAcquireNextImage2KHR)pa(device, "vkAcquireNextImage2KHR");
  dt->CmdDispatchBase = (PFN_vkCmdDispatchBase)pa(device, "vkCmdDispatchBase");
  dt->CmdDispatchBaseKHR =
      (PFN_vkCmdDispatchBaseKHR)pa(device, "vkCmdDispatchBaseKHR");
  dt->CreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate)pa(
      device, "vkCreateDescriptorUpdateTemplate");
  dt->CreateDescriptorUpdateTemplateKHR =
      (PFN_vkCreateDescriptorUpdateTemplateKHR)pa(
          device, "vkCreateDescriptorUpdateTemplateKHR");
  dt->DestroyDescriptorUpdateTemplate =
      (PFN_vkDestroyDescriptorUpdateTemplate)pa(
          device, "vkDestroyDescriptorUpdateTemplate");
  dt->DestroyDescriptorUpdateTemplateKHR =
      (PFN_vkDestroyDescriptorUpdateTemplateKHR)pa(
          device, "vkDestroyDescriptorUpdateTemplateKHR");
  dt->UpdateDescriptorSetWithTemplate =
      (PFN_vkUpdateDescriptorSetWithTemplate)pa(
          device, "vkUpdateDescriptorSetWithTemplate");
  dt->UpdateDescriptorSetWithTemplateKHR =
      (PFN_vkUpdateDescriptorSetWithTemplateKHR)pa(
          device, "vkUpdateDescriptorSetWithTemplateKHR");
  dt->CmdPushDescriptorSetWithTemplateKHR =
      (PFN_vkCmdPushDescriptorSetWithTemplateKHR)pa(
          device, "vkCmdPushDescriptorSetWithTemplateKHR");
  dt->GetSwapchainStatusKHR =
      (PFN_vkGetSwapchainStatusKHR)pa(device, "vkGetSwapchainStatusKHR");
  dt->CmdSetSampleLocationsEXT =
      (PFN_vkCmdSetSampleLocationsEXT)pa(device, "vkCmdSetSampleLocationsEXT");
  dt->GetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2)pa(
      device, "vkGetBufferMemoryRequirements2");
  dt->GetBufferMemoryRequirements2KHR =
      (PFN_vkGetBufferMemoryRequirements2KHR)pa(
          device, "vkGetBufferMemoryRequirements2KHR");
  dt->GetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2)pa(
      device, "vkGetImageMemoryRequirements2");
  dt->GetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)pa(
      device, "vkGetImageMemoryRequirements2KHR");
  dt->GetImageSparseMemoryRequirements2 =
      (PFN_vkGetImageSparseMemoryRequirements2)pa(
          device, "vkGetImageSparseMemoryRequirements2");
  dt->GetImageSparseMemoryRequirements2KHR =
      (PFN_vkGetImageSparseMemoryRequirements2KHR)pa(
          device, "vkGetImageSparseMemoryRequirements2KHR");
  dt->CreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion)pa(
      device, "vkCreateSamplerYcbcrConversion");
  dt->CreateSamplerYcbcrConversionKHR =
      (PFN_vkCreateSamplerYcbcrConversionKHR)pa(
          device, "vkCreateSamplerYcbcrConversionKHR");
  dt->DestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion)pa(
      device, "vkDestroySamplerYcbcrConversion");
  dt->DestroySamplerYcbcrConversionKHR =
      (PFN_vkDestroySamplerYcbcrConversionKHR)pa(
          device, "vkDestroySamplerYcbcrConversionKHR");
  dt->GetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport)pa(
      device, "vkGetDescriptorSetLayoutSupport");
  dt->GetDescriptorSetLayoutSupportKHR =
      (PFN_vkGetDescriptorSetLayoutSupportKHR)pa(
          device, "vkGetDescriptorSetLayoutSupportKHR");
  dt->GetShaderInfoAMD =
      (PFN_vkGetShaderInfoAMD)pa(device, "vkGetShaderInfoAMD");
  dt->SetLocalDimmingAMD =
      (PFN_vkSetLocalDimmingAMD)pa(device, "vkSetLocalDimmingAMD");
  dt->GetCalibratedTimestampsEXT = (PFN_vkGetCalibratedTimestampsEXT)pa(
      device, "vkGetCalibratedTimestampsEXT");
  dt->SetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT)pa(
      device, "vkSetDebugUtilsObjectNameEXT");
  dt->SetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT)pa(
      device, "vkSetDebugUtilsObjectTagEXT");
  dt->QueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT)pa(
      device, "vkQueueBeginDebugUtilsLabelEXT");
  dt->QueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT)pa(
      device, "vkQueueEndDebugUtilsLabelEXT");
  dt->QueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT)pa(
      device, "vkQueueInsertDebugUtilsLabelEXT");
  dt->CmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT)pa(
      device, "vkCmdBeginDebugUtilsLabelEXT");
  dt->CmdEndDebugUtilsLabelEXT =
      (PFN_vkCmdEndDebugUtilsLabelEXT)pa(device, "vkCmdEndDebugUtilsLabelEXT");
  dt->CmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT)pa(
      device, "vkCmdInsertDebugUtilsLabelEXT");
  dt->GetMemoryHostPointerPropertiesEXT =
      (PFN_vkGetMemoryHostPointerPropertiesEXT)pa(
          device, "vkGetMemoryHostPointerPropertiesEXT");
  dt->CmdWriteBufferMarkerAMD =
      (PFN_vkCmdWriteBufferMarkerAMD)pa(device, "vkCmdWriteBufferMarkerAMD");
  dt->CreateRenderPass2 =
      (PFN_vkCreateRenderPass2)pa(device, "vkCreateRenderPass2");
  dt->CreateRenderPass2KHR =
      (PFN_vkCreateRenderPass2KHR)pa(device, "vkCreateRenderPass2KHR");
  dt->CmdBeginRenderPass2 =
      (PFN_vkCmdBeginRenderPass2)pa(device, "vkCmdBeginRenderPass2");
  dt->CmdBeginRenderPass2KHR =
      (PFN_vkCmdBeginRenderPass2KHR)pa(device, "vkCmdBeginRenderPass2KHR");
  dt->CmdNextSubpass2 = (PFN_vkCmdNextSubpass2)pa(device, "vkCmdNextSubpass2");
  dt->CmdNextSubpass2KHR =
      (PFN_vkCmdNextSubpass2KHR)pa(device, "vkCmdNextSubpass2KHR");
  dt->CmdEndRenderPass2 =
      (PFN_vkCmdEndRenderPass2)pa(device, "vkCmdEndRenderPass2");
  dt->CmdEndRenderPass2KHR =
      (PFN_vkCmdEndRenderPass2KHR)pa(device, "vkCmdEndRenderPass2KHR");
  dt->GetSemaphoreCounterValue =
      (PFN_vkGetSemaphoreCounterValue)pa(device, "vkGetSemaphoreCounterValue");
  dt->GetSemaphoreCounterValueKHR = (PFN_vkGetSemaphoreCounterValueKHR)pa(
      device, "vkGetSemaphoreCounterValueKHR");
  dt->WaitSemaphores = (PFN_vkWaitSemaphores)pa(device, "vkWaitSemaphores");
  dt->WaitSemaphoresKHR =
      (PFN_vkWaitSemaphoresKHR)pa(device, "vkWaitSemaphoresKHR");
  dt->SignalSemaphore = (PFN_vkSignalSemaphore)pa(device, "vkSignalSemaphore");
  dt->SignalSemaphoreKHR =
      (PFN_vkSignalSemaphoreKHR)pa(device, "vkSignalSemaphoreKHR");
  dt->CmdDrawIndirectCount =
      (PFN_vkCmdDrawIndirectCount)pa(device, "vkCmdDrawIndirectCount");
  dt->CmdDrawIndirectCountKHR =
      (PFN_vkCmdDrawIndirectCountKHR)pa(device, "vkCmdDrawIndirectCountKHR");
  dt->CmdDrawIndirectCountAMD =
      (PFN_vkCmdDrawIndirectCountAMD)pa(device, "vkCmdDrawIndirectCountAMD");
  dt->CmdDrawIndexedIndirectCount = (PFN_vkCmdDrawIndexedIndirectCount)pa(
      device, "vkCmdDrawIndexedIndirectCount");
  dt->CmdDrawIndexedIndirectCountKHR = (PFN_vkCmdDrawIndexedIndirectCountKHR)pa(
      device, "vkCmdDrawIndexedIndirectCountKHR");
  dt->CmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD)pa(
      device, "vkCmdDrawIndexedIndirectCountAMD");
  dt->DestroyAccelerationStructureKHR =
      (PFN_vkDestroyAccelerationStructureKHR)pa(
          device, "vkDestroyAccelerationStructureKHR");
  dt->CmdCopyAccelerationStructureKHR =
      (PFN_vkCmdCopyAccelerationStructureKHR)pa(
          device, "vkCmdCopyAccelerationStructureKHR");
  dt->CopyAccelerationStructureKHR = (PFN_vkCopyAccelerationStructureKHR)pa(
      device, "vkCopyAccelerationStructureKHR");
  dt->CmdCopyAccelerationStructureToMemoryKHR =
      (PFN_vkCmdCopyAccelerationStructureToMemoryKHR)pa(
          device, "vkCmdCopyAccelerationStructureToMemoryKHR");
  dt->CopyAccelerationStructureToMemoryKHR =
      (PFN_vkCopyAccelerationStructureToMemoryKHR)pa(
          device, "vkCopyAccelerationStructureToMemoryKHR");
  dt->CmdCopyMemoryToAccelerationStructureKHR =
      (PFN_vkCmdCopyMemoryToAccelerationStructureKHR)pa(
          device, "vkCmdCopyMemoryToAccelerationStructureKHR");
  dt->CopyMemoryToAccelerationStructureKHR =
      (PFN_vkCopyMemoryToAccelerationStructureKHR)pa(
          device, "vkCopyMemoryToAccelerationStructureKHR");
  dt->CmdWriteAccelerationStructuresPropertiesKHR =
      (PFN_vkCmdWriteAccelerationStructuresPropertiesKHR)pa(
          device, "vkCmdWriteAccelerationStructuresPropertiesKHR");
  dt->WriteAccelerationStructuresPropertiesKHR =
      (PFN_vkWriteAccelerationStructuresPropertiesKHR)pa(
          device, "vkWriteAccelerationStructuresPropertiesKHR");
  dt->CmdTraceRaysKHR = (PFN_vkCmdTraceRaysKHR)pa(device, "vkCmdTraceRaysKHR");
  dt->GetRayTracingShaderGroupHandlesKHR =
      (PFN_vkGetRayTracingShaderGroupHandlesKHR)pa(
          device, "vkGetRayTracingShaderGroupHandlesKHR");
  dt->GetRayTracingShaderGroupHandlesNV =
      (PFN_vkGetRayTracingShaderGroupHandlesNV)pa(
          device, "vkGetRayTracingShaderGroupHandlesNV");
  dt->GetRayTracingCaptureReplayShaderGroupHandlesKHR =
      (PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)pa(
          device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR");
  dt->CreateRayTracingPipelinesKHR = (PFN_vkCreateRayTracingPipelinesKHR)pa(
      device, "vkCreateRayTracingPipelinesKHR");
  dt->CmdTraceRaysIndirectKHR =
      (PFN_vkCmdTraceRaysIndirectKHR)pa(device, "vkCmdTraceRaysIndirectKHR");
  dt->GetDeviceAccelerationStructureCompatibilityKHR =
      (PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)pa(
          device, "vkGetDeviceAccelerationStructureCompatibilityKHR");
  dt->GetRayTracingShaderGroupStackSizeKHR =
      (PFN_vkGetRayTracingShaderGroupStackSizeKHR)pa(
          device, "vkGetRayTracingShaderGroupStackSizeKHR");
  dt->CmdSetRayTracingPipelineStackSizeKHR =
      (PFN_vkCmdSetRayTracingPipelineStackSizeKHR)pa(
          device, "vkCmdSetRayTracingPipelineStackSizeKHR");
  dt->AcquireProfilingLockKHR =
      (PFN_vkAcquireProfilingLockKHR)pa(device, "vkAcquireProfilingLockKHR");
  dt->ReleaseProfilingLockKHR =
      (PFN_vkReleaseProfilingLockKHR)pa(device, "vkReleaseProfilingLockKHR");
  dt->GetImageDrmFormatModifierPropertiesEXT =
      (PFN_vkGetImageDrmFormatModifierPropertiesEXT)pa(
          device, "vkGetImageDrmFormatModifierPropertiesEXT");
  dt->GetBufferOpaqueCaptureAddress = (PFN_vkGetBufferOpaqueCaptureAddress)pa(
      device, "vkGetBufferOpaqueCaptureAddress");
  dt->GetBufferOpaqueCaptureAddressKHR =
      (PFN_vkGetBufferOpaqueCaptureAddressKHR)pa(
          device, "vkGetBufferOpaqueCaptureAddressKHR");
  dt->GetBufferDeviceAddress =
      (PFN_vkGetBufferDeviceAddress)pa(device, "vkGetBufferDeviceAddress");
  dt->GetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)pa(
      device, "vkGetBufferDeviceAddressKHR");
  dt->GetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT)pa(
      device, "vkGetBufferDeviceAddressEXT");
  dt->GetDeviceMemoryOpaqueCaptureAddress =
      (PFN_vkGetDeviceMemoryOpaqueCaptureAddress)pa(
          device, "vkGetDeviceMemoryOpaqueCaptureAddress");
  dt->GetDeviceMemoryOpaqueCaptureAddressKHR =
      (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)pa(
          device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR");
  dt->GetPipelineExecutablePropertiesKHR =
      (PFN_vkGetPipelineExecutablePropertiesKHR)pa(
          device, "vkGetPipelineExecutablePropertiesKHR");
  dt->GetPipelineExecutableStatisticsKHR =
      (PFN_vkGetPipelineExecutableStatisticsKHR)pa(
          device, "vkGetPipelineExecutableStatisticsKHR");
  dt->GetPipelineExecutableInternalRepresentationsKHR =
      (PFN_vkGetPipelineExecutableInternalRepresentationsKHR)pa(
          device, "vkGetPipelineExecutableInternalRepresentationsKHR");
  dt->CmdSetLineStippleEXT =
      (PFN_vkCmdSetLineStippleEXT)pa(device, "vkCmdSetLineStippleEXT");
  dt->CreateAccelerationStructureKHR = (PFN_vkCreateAccelerationStructureKHR)pa(
      device, "vkCreateAccelerationStructureKHR");
  dt->CmdBuildAccelerationStructuresKHR =
      (PFN_vkCmdBuildAccelerationStructuresKHR)pa(
          device, "vkCmdBuildAccelerationStructuresKHR");
  dt->CmdBuildAccelerationStructuresIndirectKHR =
      (PFN_vkCmdBuildAccelerationStructuresIndirectKHR)pa(
          device, "vkCmdBuildAccelerationStructuresIndirectKHR");
  dt->BuildAccelerationStructuresKHR = (PFN_vkBuildAccelerationStructuresKHR)pa(
      device, "vkBuildAccelerationStructuresKHR");
  dt->GetAccelerationStructureDeviceAddressKHR =
      (PFN_vkGetAccelerationStructureDeviceAddressKHR)pa(
          device, "vkGetAccelerationStructureDeviceAddressKHR");
  dt->CreateDeferredOperationKHR = (PFN_vkCreateDeferredOperationKHR)pa(
      device, "vkCreateDeferredOperationKHR");
  dt->DestroyDeferredOperationKHR = (PFN_vkDestroyDeferredOperationKHR)pa(
      device, "vkDestroyDeferredOperationKHR");
  dt->GetDeferredOperationMaxConcurrencyKHR =
      (PFN_vkGetDeferredOperationMaxConcurrencyKHR)pa(
          device, "vkGetDeferredOperationMaxConcurrencyKHR");
  dt->GetDeferredOperationResultKHR = (PFN_vkGetDeferredOperationResultKHR)pa(
      device, "vkGetDeferredOperationResultKHR");
  dt->DeferredOperationJoinKHR =
      (PFN_vkDeferredOperationJoinKHR)pa(device, "vkDeferredOperationJoinKHR");
  dt->CmdSetCullModeEXT =
      (PFN_vkCmdSetCullModeEXT)pa(device, "vkCmdSetCullModeEXT");
  dt->CmdSetFrontFaceEXT =
      (PFN_vkCmdSetFrontFaceEXT)pa(device, "vkCmdSetFrontFaceEXT");
  dt->CmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)pa(
      device, "vkCmdSetPrimitiveTopologyEXT");
  dt->CmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)pa(
      device, "vkCmdSetViewportWithCountEXT");
  dt->CmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)pa(
      device, "vkCmdSetScissorWithCountEXT");
  dt->CmdBindVertexBuffers2EXT =
      (PFN_vkCmdBindVertexBuffers2EXT)pa(device, "vkCmdBindVertexBuffers2EXT");
  dt->CmdSetDepthTestEnableEXT =
      (PFN_vkCmdSetDepthTestEnableEXT)pa(device, "vkCmdSetDepthTestEnableEXT");
  dt->CmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)pa(
      device, "vkCmdSetDepthWriteEnableEXT");
  dt->CmdSetDepthCompareOpEXT =
      (PFN_vkCmdSetDepthCompareOpEXT)pa(device, "vkCmdSetDepthCompareOpEXT");
  dt->CmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)pa(
      device, "vkCmdSetDepthBoundsTestEnableEXT");
  dt->CmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)pa(
      device, "vkCmdSetStencilTestEnableEXT");
  dt->CmdSetStencilOpEXT =
      (PFN_vkCmdSetStencilOpEXT)pa(device, "vkCmdSetStencilOpEXT");
  dt->CmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT)pa(
      device, "vkCmdSetPatchControlPointsEXT");
  dt->CmdSetRasterizerDiscardEnableEXT =
      (PFN_vkCmdSetRasterizerDiscardEnableEXT)pa(
          device, "vkCmdSetRasterizerDiscardEnableEXT");
  dt->CmdSetDepthBiasEnableEXT =
      (PFN_vkCmdSetDepthBiasEnableEXT)pa(device, "vkCmdSetDepthBiasEnableEXT");
  dt->CmdSetLogicOpEXT =
      (PFN_vkCmdSetLogicOpEXT)pa(device, "vkCmdSetLogicOpEXT");
  dt->CmdSetPrimitiveRestartEnableEXT =
      (PFN_vkCmdSetPrimitiveRestartEnableEXT)pa(
          device, "vkCmdSetPrimitiveRestartEnableEXT");
  dt->CmdCopyBuffer2KHR =
      (PFN_vkCmdCopyBuffer2KHR)pa(device, "vkCmdCopyBuffer2KHR");
  dt->CmdCopyImage2KHR =
      (PFN_vkCmdCopyImage2KHR)pa(device, "vkCmdCopyImage2KHR");
  dt->CmdBlitImage2KHR =
      (PFN_vkCmdBlitImage2KHR)pa(device, "vkCmdBlitImage2KHR");
  dt->CmdCopyBufferToImage2KHR =
      (PFN_vkCmdCopyBufferToImage2KHR)pa(device, "vkCmdCopyBufferToImage2KHR");
  dt->CmdCopyImageToBuffer2KHR =
      (PFN_vkCmdCopyImageToBuffer2KHR)pa(device, "vkCmdCopyImageToBuffer2KHR");
  dt->CmdResolveImage2KHR =
      (PFN_vkCmdResolveImage2KHR)pa(device, "vkCmdResolveImage2KHR");
  dt->CmdSetFragmentShadingRateKHR = (PFN_vkCmdSetFragmentShadingRateKHR)pa(
      device, "vkCmdSetFragmentShadingRateKHR");
  dt->GetAccelerationStructureBuildSizesKHR =
      (PFN_vkGetAccelerationStructureBuildSizesKHR)pa(
          device, "vkGetAccelerationStructureBuildSizesKHR");
  dt->CmdSetVertexInputEXT =
      (PFN_vkCmdSetVertexInputEXT)pa(device, "vkCmdSetVertexInputEXT");
  dt->CmdSetColorWriteEnableEXT = (PFN_vkCmdSetColorWriteEnableEXT)pa(
      device, "vkCmdSetColorWriteEnableEXT");
  dt->CmdSetEvent2KHR = (PFN_vkCmdSetEvent2KHR)pa(device, "vkCmdSetEvent2KHR");
  dt->CmdResetEvent2KHR =
      (PFN_vkCmdResetEvent2KHR)pa(device, "vkCmdResetEvent2KHR");
  dt->CmdWaitEvents2KHR =
      (PFN_vkCmdWaitEvents2KHR)pa(device, "vkCmdWaitEvents2KHR");
  dt->CmdPipelineBarrier2KHR =
      (PFN_vkCmdPipelineBarrier2KHR)pa(device, "vkCmdPipelineBarrier2KHR");
  dt->QueueSubmit2KHR = (PFN_vkQueueSubmit2KHR)pa(device, "vkQueueSubmit2KHR");
  dt->CmdWriteTimestamp2KHR =
      (PFN_vkCmdWriteTimestamp2KHR)pa(device, "vkCmdWriteTimestamp2KHR");
  dt->CmdWriteBufferMarker2AMD =
      (PFN_vkCmdWriteBufferMarker2AMD)pa(device, "vkCmdWriteBufferMarker2AMD");
  dt->GetQueueCheckpointData2NV = (PFN_vkGetQueueCheckpointData2NV)pa(
      device, "vkGetQueueCheckpointData2NV");
  dt->GetDeviceProcAddr =
      (PFN_vkGetDeviceProcAddr)pa(device, "vkGetDeviceProcAddr");
  dt->DestroyDevice = (PFN_vkDestroyDevice)pa(device, "vkDestroyDevice");
  dt->EnumerateInstanceVersion =
      (PFN_vkEnumerateInstanceVersion)pa(device, "vkEnumerateInstanceVersion");
  dt->EnumerateInstanceLayerProperties =
      (PFN_vkEnumerateInstanceLayerProperties)pa(
          device, "vkEnumerateInstanceLayerProperties");
  dt->EnumerateInstanceExtensionProperties =
      (PFN_vkEnumerateInstanceExtensionProperties)pa(
          device, "vkEnumerateInstanceExtensionProperties");
  dt->GetDeviceQueue = (PFN_vkGetDeviceQueue)pa(device, "vkGetDeviceQueue");
  dt->QueueSubmit = (PFN_vkQueueSubmit)pa(device, "vkQueueSubmit");
  dt->QueueWaitIdle = (PFN_vkQueueWaitIdle)pa(device, "vkQueueWaitIdle");
  dt->DeviceWaitIdle = (PFN_vkDeviceWaitIdle)pa(device, "vkDeviceWaitIdle");
  dt->AllocateMemory = (PFN_vkAllocateMemory)pa(device, "vkAllocateMemory");
  dt->FreeMemory = (PFN_vkFreeMemory)pa(device, "vkFreeMemory");
  dt->MapMemory = (PFN_vkMapMemory)pa(device, "vkMapMemory");
  dt->UnmapMemory = (PFN_vkUnmapMemory)pa(device, "vkUnmapMemory");
  dt->FlushMappedMemoryRanges =
      (PFN_vkFlushMappedMemoryRanges)pa(device, "vkFlushMappedMemoryRanges");
  dt->InvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges)pa(
      device, "vkInvalidateMappedMemoryRanges");
  dt->GetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment)pa(
      device, "vkGetDeviceMemoryCommitment");
  dt->GetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements)pa(
      device, "vkGetBufferMemoryRequirements");
  dt->BindBufferMemory =
      (PFN_vkBindBufferMemory)pa(device, "vkBindBufferMemory");
  dt->GetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements)pa(
      device, "vkGetImageMemoryRequirements");
  dt->BindImageMemory = (PFN_vkBindImageMemory)pa(device, "vkBindImageMemory");
  dt->GetImageSparseMemoryRequirements =
      (PFN_vkGetImageSparseMemoryRequirements)pa(
          device, "vkGetImageSparseMemoryRequirements");
  dt->QueueBindSparse = (PFN_vkQueueBindSparse)pa(device, "vkQueueBindSparse");
  dt->CreateFence = (PFN_vkCreateFence)pa(device, "vkCreateFence");
  dt->DestroyFence = (PFN_vkDestroyFence)pa(device, "vkDestroyFence");
  dt->ResetFences = (PFN_vkResetFences)pa(device, "vkResetFences");
  dt->GetFenceStatus = (PFN_vkGetFenceStatus)pa(device, "vkGetFenceStatus");
  dt->WaitForFences = (PFN_vkWaitForFences)pa(device, "vkWaitForFences");
  dt->CreateSemaphore = (PFN_vkCreateSemaphore)pa(device, "vkCreateSemaphore");
  dt->DestroySemaphore =
      (PFN_vkDestroySemaphore)pa(device, "vkDestroySemaphore");
  dt->CreateEvent = (PFN_vkCreateEvent)pa(device, "vkCreateEvent");
  dt->DestroyEvent = (PFN_vkDestroyEvent)pa(device, "vkDestroyEvent");
  dt->GetEventStatus = (PFN_vkGetEventStatus)pa(device, "vkGetEventStatus");
  dt->SetEvent = (PFN_vkSetEvent)pa(device, "vkSetEvent");
  dt->ResetEvent = (PFN_vkResetEvent)pa(device, "vkResetEvent");
  dt->CreateQueryPool = (PFN_vkCreateQueryPool)pa(device, "vkCreateQueryPool");
  dt->DestroyQueryPool =
      (PFN_vkDestroyQueryPool)pa(device, "vkDestroyQueryPool");
  dt->GetQueryPoolResults =
      (PFN_vkGetQueryPoolResults)pa(device, "vkGetQueryPoolResults");
  dt->CreateBuffer = (PFN_vkCreateBuffer)pa(device, "vkCreateBuffer");
  dt->DestroyBuffer = (PFN_vkDestroyBuffer)pa(device, "vkDestroyBuffer");
  dt->CreateBufferView =
      (PFN_vkCreateBufferView)pa(device, "vkCreateBufferView");
  dt->DestroyBufferView =
      (PFN_vkDestroyBufferView)pa(device, "vkDestroyBufferView");
  dt->CreateImage = (PFN_vkCreateImage)pa(device, "vkCreateImage");
  dt->DestroyImage = (PFN_vkDestroyImage)pa(device, "vkDestroyImage");
  dt->GetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout)pa(
      device, "vkGetImageSubresourceLayout");
  dt->CreateImageView = (PFN_vkCreateImageView)pa(device, "vkCreateImageView");
  dt->DestroyImageView =
      (PFN_vkDestroyImageView)pa(device, "vkDestroyImageView");
  dt->CreateShaderModule =
      (PFN_vkCreateShaderModule)pa(device, "vkCreateShaderModule");
  dt->DestroyShaderModule =
      (PFN_vkDestroyShaderModule)pa(device, "vkDestroyShaderModule");
  dt->CreatePipelineCache =
      (PFN_vkCreatePipelineCache)pa(device, "vkCreatePipelineCache");
  dt->DestroyPipelineCache =
      (PFN_vkDestroyPipelineCache)pa(device, "vkDestroyPipelineCache");
  dt->GetPipelineCacheData =
      (PFN_vkGetPipelineCacheData)pa(device, "vkGetPipelineCacheData");
  dt->MergePipelineCaches =
      (PFN_vkMergePipelineCaches)pa(device, "vkMergePipelineCaches");
  dt->CreateGraphicsPipelines =
      (PFN_vkCreateGraphicsPipelines)pa(device, "vkCreateGraphicsPipelines");
  dt->CreateComputePipelines =
      (PFN_vkCreateComputePipelines)pa(device, "vkCreateComputePipelines");
  dt->DestroyPipeline = (PFN_vkDestroyPipeline)pa(device, "vkDestroyPipeline");
  dt->CreatePipelineLayout =
      (PFN_vkCreatePipelineLayout)pa(device, "vkCreatePipelineLayout");
  dt->DestroyPipelineLayout =
      (PFN_vkDestroyPipelineLayout)pa(device, "vkDestroyPipelineLayout");
  dt->CreateSampler = (PFN_vkCreateSampler)pa(device, "vkCreateSampler");
  dt->DestroySampler = (PFN_vkDestroySampler)pa(device, "vkDestroySampler");
  dt->CreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout)pa(
      device, "vkCreateDescriptorSetLayout");
  dt->DestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout)pa(
      device, "vkDestroyDescriptorSetLayout");
  dt->CreateDescriptorPool =
      (PFN_vkCreateDescriptorPool)pa(device, "vkCreateDescriptorPool");
  dt->DestroyDescriptorPool =
      (PFN_vkDestroyDescriptorPool)pa(device, "vkDestroyDescriptorPool");
  dt->ResetDescriptorPool =
      (PFN_vkResetDescriptorPool)pa(device, "vkResetDescriptorPool");
  dt->AllocateDescriptorSets =
      (PFN_vkAllocateDescriptorSets)pa(device, "vkAllocateDescriptorSets");
  dt->FreeDescriptorSets =
      (PFN_vkFreeDescriptorSets)pa(device, "vkFreeDescriptorSets");
  dt->UpdateDescriptorSets =
      (PFN_vkUpdateDescriptorSets)pa(device, "vkUpdateDescriptorSets");
  dt->CreateFramebuffer =
      (PFN_vkCreateFramebuffer)pa(device, "vkCreateFramebuffer");
  dt->DestroyFramebuffer =
      (PFN_vkDestroyFramebuffer)pa(device, "vkDestroyFramebuffer");
  dt->CreateRenderPass =
      (PFN_vkCreateRenderPass)pa(device, "vkCreateRenderPass");
  dt->DestroyRenderPass =
      (PFN_vkDestroyRenderPass)pa(device, "vkDestroyRenderPass");
  dt->GetRenderAreaGranularity =
      (PFN_vkGetRenderAreaGranularity)pa(device, "vkGetRenderAreaGranularity");
  dt->CreateCommandPool =
      (PFN_vkCreateCommandPool)pa(device, "vkCreateCommandPool");
  dt->DestroyCommandPool =
      (PFN_vkDestroyCommandPool)pa(device, "vkDestroyCommandPool");
  dt->ResetCommandPool =
      (PFN_vkResetCommandPool)pa(device, "vkResetCommandPool");
  dt->AllocateCommandBuffers =
      (PFN_vkAllocateCommandBuffers)pa(device, "vkAllocateCommandBuffers");
  dt->FreeCommandBuffers =
      (PFN_vkFreeCommandBuffers)pa(device, "vkFreeCommandBuffers");
  dt->BeginCommandBuffer =
      (PFN_vkBeginCommandBuffer)pa(device, "vkBeginCommandBuffer");
  dt->EndCommandBuffer =
      (PFN_vkEndCommandBuffer)pa(device, "vkEndCommandBuffer");
  dt->ResetCommandBuffer =
      (PFN_vkResetCommandBuffer)pa(device, "vkResetCommandBuffer");
  dt->CmdBindPipeline = (PFN_vkCmdBindPipeline)pa(device, "vkCmdBindPipeline");
  dt->CmdSetViewport = (PFN_vkCmdSetViewport)pa(device, "vkCmdSetViewport");
  dt->CmdSetScissor = (PFN_vkCmdSetScissor)pa(device, "vkCmdSetScissor");
  dt->CmdSetLineWidth = (PFN_vkCmdSetLineWidth)pa(device, "vkCmdSetLineWidth");
  dt->CmdSetDepthBias = (PFN_vkCmdSetDepthBias)pa(device, "vkCmdSetDepthBias");
  dt->CmdSetBlendConstants =
      (PFN_vkCmdSetBlendConstants)pa(device, "vkCmdSetBlendConstants");
  dt->CmdSetDepthBounds =
      (PFN_vkCmdSetDepthBounds)pa(device, "vkCmdSetDepthBounds");
  dt->CmdSetStencilCompareMask =
      (PFN_vkCmdSetStencilCompareMask)pa(device, "vkCmdSetStencilCompareMask");
  dt->CmdSetStencilWriteMask =
      (PFN_vkCmdSetStencilWriteMask)pa(device, "vkCmdSetStencilWriteMask");
  dt->CmdSetStencilReference =
      (PFN_vkCmdSetStencilReference)pa(device, "vkCmdSetStencilReference");
  dt->CmdBindDescriptorSets =
      (PFN_vkCmdBindDescriptorSets)pa(device, "vkCmdBindDescriptorSets");
  dt->CmdBindIndexBuffer =
      (PFN_vkCmdBindIndexBuffer)pa(device, "vkCmdBindIndexBuffer");
  dt->CmdBindVertexBuffers =
      (PFN_vkCmdBindVertexBuffers)pa(device, "vkCmdBindVertexBuffers");
  dt->CmdDraw = (PFN_vkCmdDraw)pa(device, "vkCmdDraw");
  dt->CmdDrawIndexed = (PFN_vkCmdDrawIndexed)pa(device, "vkCmdDrawIndexed");
  dt->CmdDrawIndirect = (PFN_vkCmdDrawIndirect)pa(device, "vkCmdDrawIndirect");
  dt->CmdDrawIndexedIndirect =
      (PFN_vkCmdDrawIndexedIndirect)pa(device, "vkCmdDrawIndexedIndirect");
  dt->CmdDispatch = (PFN_vkCmdDispatch)pa(device, "vkCmdDispatch");
  dt->CmdDispatchIndirect =
      (PFN_vkCmdDispatchIndirect)pa(device, "vkCmdDispatchIndirect");
  dt->CmdCopyBuffer = (PFN_vkCmdCopyBuffer)pa(device, "vkCmdCopyBuffer");
  dt->CmdCopyImage = (PFN_vkCmdCopyImage)pa(device, "vkCmdCopyImage");
  dt->CmdBlitImage = (PFN_vkCmdBlitImage)pa(device, "vkCmdBlitImage");
  dt->CmdCopyBufferToImage =
      (PFN_vkCmdCopyBufferToImage)pa(device, "vkCmdCopyBufferToImage");
  dt->CmdCopyImageToBuffer =
      (PFN_vkCmdCopyImageToBuffer)pa(device, "vkCmdCopyImageToBuffer");
  dt->CmdUpdateBuffer = (PFN_vkCmdUpdateBuffer)pa(device, "vkCmdUpdateBuffer");
  dt->CmdFillBuffer = (PFN_vkCmdFillBuffer)pa(device, "vkCmdFillBuffer");
  dt->CmdClearColorImage =
      (PFN_vkCmdClearColorImage)pa(device, "vkCmdClearColorImage");
  dt->CmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage)pa(
      device, "vkCmdClearDepthStencilImage");
  dt->CmdClearAttachments =
      (PFN_vkCmdClearAttachments)pa(device, "vkCmdClearAttachments");
  dt->CmdResolveImage = (PFN_vkCmdResolveImage)pa(device, "vkCmdResolveImage");
  dt->CmdSetEvent = (PFN_vkCmdSetEvent)pa(device, "vkCmdSetEvent");
  dt->CmdResetEvent = (PFN_vkCmdResetEvent)pa(device, "vkCmdResetEvent");
  dt->CmdWaitEvents = (PFN_vkCmdWaitEvents)pa(device, "vkCmdWaitEvents");
  dt->CmdPipelineBarrier =
      (PFN_vkCmdPipelineBarrier)pa(device, "vkCmdPipelineBarrier");
  dt->CmdBeginQuery = (PFN_vkCmdBeginQuery)pa(device, "vkCmdBeginQuery");
  dt->CmdEndQuery = (PFN_vkCmdEndQuery)pa(device, "vkCmdEndQuery");
  dt->CmdResetQueryPool =
      (PFN_vkCmdResetQueryPool)pa(device, "vkCmdResetQueryPool");
  dt->CmdWriteTimestamp =
      (PFN_vkCmdWriteTimestamp)pa(device, "vkCmdWriteTimestamp");
  dt->CmdCopyQueryPoolResults =
      (PFN_vkCmdCopyQueryPoolResults)pa(device, "vkCmdCopyQueryPoolResults");
  dt->CmdPushConstants =
      (PFN_vkCmdPushConstants)pa(device, "vkCmdPushConstants");
  dt->CmdBeginRenderPass =
      (PFN_vkCmdBeginRenderPass)pa(device, "vkCmdBeginRenderPass");
  dt->CmdNextSubpass = (PFN_vkCmdNextSubpass)pa(device, "vkCmdNextSubpass");
  dt->CmdEndRenderPass =
      (PFN_vkCmdEndRenderPass)pa(device, "vkCmdEndRenderPass");
  dt->CmdExecuteCommands =
      (PFN_vkCmdExecuteCommands)pa(device, "vkCmdExecuteCommands");
  dt->GetDeviceQueue2 = (PFN_vkGetDeviceQueue2)pa(device, "vkGetDeviceQueue2");

#ifdef VK_USE_PLATFORM_GGP

#endif // VK_USE_PLATFORM_GGP
} // NOLINT(readability/fn_size)

} // namespace GFR


text:
// Grocery List

// Pseudocode

/*
Create a new object that stores grocery lists
Create an object called list item that has a name and a quantity

DEFINE a new list function
	REQUEST user input - "What do you want to call this list?"
	Create a new object in grocery lists with this name
	Add list name to dropdown menu
	Display list name

DEFINE an add function
	REQUEST user input - "What item would you like to add?"
	REQUEST user input - "How much?"
	Create a new list item (with checkbox input) with the item and quantity
	Display revised list

DEFINE a remove function
	IF list item is checked
		DELETE list item from grocery list
	Display revised list

DEFINE remove list function
	GET list selected in dropdown menu
	CONFIRM "Are you sure you want to delete (list name)?"
		IF TRUE
			DELETE list from grocery lists

*/

// Initial Solution (Linked to HTML and CSS files in Grocery Lists folder)

// var newList = document.getElementById("new_list");
// var newItem = document.getElementById("new_item");
// var removeItem = document.getElementById("remove_item");
// var list = document.getElementById("list");
// var listTitle = document.getElementById("list_title");
// var listItems = document.getElementsByTagName("input");
// var displayList = document.getElementById("display_list");
// var switchList = document.getElementById("switch_list");
// var removeList = document.getElementById("remove_list");

// newItem.style.display = "none";
// removeItem.style.display = "none";
// displayList.style.display = "none";
// switchList.style.display = "none";
// removeList.style.display = "none";

// groceryLists = new Object();

// var listItem = function() {
//     this.item = item;
//     this.quantity = quantity;
// }

// function printList(object) {
// 	list.innerHTML = "";
// 	for (item in object) {
// 		list.innerHTML += "
<input type = 'checkbox' value = " + item + ">" + item + ": " + object[item] + "</input>
"
// 	}
//    	removeItem.style.display = "block";
// }

// function listMenu(object) {
// 	displayList.innerHTML = "";
// 	for (item in object) {
// 		displayList.innerHTML += "<option value = '" + item + "' >" + item + "</option>";
// 	}
// }

// function displayButtons() {
// 	newItem.style.display = "block";
//     displayList.style.display = "block";
//     switchList.style.display = "block";
//     removeList.style.display = "block";
// }

// newList.addEventListener("click", function() {
//     var listName = prompt("What would you like to name this list?");
//     listTitle.innerHTML = listName;
//     list.innerHTML = "";
//     groceryLists[listName] = new Object();
//     listMenu(groceryLists);
//     displayButtons();
// });

// newItem.addEventListener("click", function() {
// 	var item = prompt("Which item would you like to add?");
// 	var quantity = prompt("How much?");
// 	var listName = displayList.options[displayList.selectedIndex].value;
// 	listTitle.innerHTML = listName;
// 	groceryLists[listName][item] = quantity;
// 	printList(groceryLists[listName]);
// });

// removeItem.addEventListener("click", function() {
// 	var listName = displayList.options[displayList.selectedIndex].value;
// 	for (var i = 0; i < listItems.length; i++) {
// 		if (listItems[i].checked) {
// 			delete groceryLists[listName][listItems[i].value];
// 		}
// 	}
// 	printList(groceryLists[listName]);
// });

// switchList.addEventListener("click", function() {
// 	var listName = displayList.options[displayList.selectedIndex].value;
// 	listTitle.innerHTML = listName;
// 	printList(groceryLists[listName]);
// });

// removeList.addEventListener("click", function() {
// 	var listName = displayList.options[displayList.selectedIndex].value;
// 	if(confirm("Are you sure you want to delete " + listName + "?")) {
// 		delete groceryLists[listName];
// 	}
// 	listMenu(groceryLists);
// 	if (listTitle.innerHTML === listName) {
// 		listTitle.innerHTML = "";
// 		list.innerHTML = "";
// 	}
// });

// Reflection

/*
What concepts did you solidify in working on this challenge? (reviewing the passing of information, objects, constructors, etc.)

I think this challenge really solidified creating objects and adding properties and values to the object.
After last week's challenges, I was surprised by how easy this one seemed.  It was pretty simple to manipulate
the properties of each list using objects.

What was the most difficult part of this challenge?

Though this wasn't my first time using JavaScript to interact with the DOM, the most time-consuming part of this
project was getting HTML values, such as the values of the selected items in the browser.  It was pretty simple
in the end, but it took some time to research the new concepts.

Did an array or object make more sense to use and why?

I used an object constructor to create each list item, and nested each list item in a list object, which is nested in the Grocery Lists object.

*/

// Ruby to JavaScript - Validate Credit Card

/*
DEFINE a function called array sum that takes an array
	FOR EACH number in the array
		ADD the number to the sum
	RETURN the sum

DEFINE a function called validate that takes a number
	RETURN true IF number is a multiple of 10

DEFINE a function called check that takes sixteen numbers
	Split the numbers into an array
	IF the number's index is even
		Push the number times 2 into a string
		Remove the number from the current array
	Split the doubled string back into an array
	CALL sum on both arrays
	CALL validate on sum
*/

// Initial Solution

// function checkDigits(array) {
// 	if(array.length === 16) {
// 		return true;
// 	}
// }

// function arraySum(array) {
// 	var sum = 0;
// 	array.forEach(function(value) {
// 		sum += parseInt(value);
// 	});
// 	return sum;
// }

// function validate(integer) {
// 	if (integer % 10 === 0) {
// 		return true;
// 	}
// 	else
// 		return false;
// }

// function cardCheck(number) {
// 	var numArray = number.toString().split("");
// 	var arrayOne = [];
// 	if (checkDigits(numArray) === true) {
// 		var doubleString = "";
// 		numArray.forEach(function(n, i) {
// 			if (i % 2 === 0) {
// 				doubleString += parseInt(numArray[i] * 2);
// 			}
// 			else {
// 				arrayOne.push(n);
// 			}
// 		});
// 		var arrayTwo = doubleString.split("");
// 		return validate(arraySum(arrayOne) + arraySum(arrayTwo));
// 	}
// 	else {
// 		console.log("Must be a 16 digit number.");
// 	}
// }

// Refactored Solution

function checkDigits(array) {
	if(array.length === 16) {
		return true;
	}
}

function arraySum(array) {
	var sum = 0;
	array.forEach(function(value) {
		sum += parseInt(value);
	});
	return sum;
}

function validate(integer) {
	return integer % 10 === 0 ? true : false;
}

function cardCheck(number) {
	var checkArray = number.toString().split("");
	var arrayOne = [];
	if (checkDigits(checkArray) === true) {
		var doubleString = "";
		checkArray.forEach(function(n, i) {
			i % 2 === 0 ? doubleString += parseInt(Array[i] * 2) : arrayOne.push(n);
		});
		var arrayTwo = doubleString.split("");
		return validate(arraySum(arrayOne) + arraySum(arrayTwo));
	}
	else {
		return "Must be a 16 digit number.";
	}
}

// Reflection
/*

What concepts did you solidify in working on this challenge?

I reviewed JavaScript methods for strings and arrays.  I also practiced writing multiple functions and
calling each function in another function.

What was the most difficult part of this challenge?

When dealing with multiple methods, it was difficult making sure the functions return what I expect.
Sometimes, I had to take more time to print the results, and make sure the output was a string or an integer.

Did you solve the problem in a new way this time?

For the most part, yes.  Though I could have taken this much further, I was able to divide parts of the
function into individual functions.  I also added the numbers with an even index to a string, which eliminated
some of the ruby methods I used he first time.

Was your pseudocode different from the Ruby version? What was the same and what was different?

The pseudocode was slightly different, as it incorperated the mutiple functions and string methods.
*/

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/side_nav_bar"
    android:gravity="bottom"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:theme="@style/ThemeOverlay.AppCompat.Dark">

    <ImageView
        android:id="@+id/imageView"
        android:layout_width="160dp"
        android:layout_height="160dp"
        android:paddingTop="@dimen/nav_header_vertical_spacing"
        app:srcCompat="@drawable/ic_puck"/>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/nav_header_vertical_spacing"
        android:text="@string/app_name"
        android:layout_below="@+id/imageView"
        android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>

</RelativeLayout>


text:
var GLOBAL_HEADER_LENGTH = 24; //bytes
var PACKET_HEADER_LENGTH = 16; //bytes

$(document).ready(function() {
	require(['pcap', 'packetDissector', 'ipv4', 'ipv6', 'utils', 'protocole', 'wireshark', 'http'], function (pcap){

		var invocation = new XMLHttpRequest();
		var url = 'http://192.168.0.38/traces/';
		var invocationHistoryText;

		function dissectFixedFile(evt)
		{
			if(invocation)
			{
				invocation.open('GET', url, true);
				invocation.onreadystatechange = handler;
				invocation.send();
			}
			else
			{
				console.log('fail');
			}
		}

		function handler(evtXHR)
		{
			if(invocation.readyState == 4)
			{
				if (invocation.status == 200)
				{
					console.log(typeof invocation.response);
					console.log(invocation);
					console.log(invocation.response.length);
					var response = invocation.responseText;
					console.log(typeof response);
					console.log(response.length);
					response = pairHex(response);
					console.log(response)
					handlePcapFile(hexToStr(response));
				}
				else
				{
					console.log("Invocation error Ocured");
				}
			}
		}

		function dissectChoosenFile(evt)
		{
			var reader = new FileReader();

			reader.onload = function(evt)
			{
				if (evt.target.readyState == FileReader.DONE)
				{
					handlePcapFile(evt.target.result);
				};
			};
			reader.readAsBinaryString(document.getElementById('pcap-file').files[0]);
			//handlePcapFile(document.getElementById('pcap-file').files[0]);
		}

		function handlePcapFile(stringData)
		{
			clearWiresharkTop();
			this.pcap = pcapDissector(stringData, false);
			document.pcapDissected = {
				header: this.pcap.globalHeader,
				packets: new Array()
			}
			console.log(document.pcapDissected);
			for (var i=0; i<this.pcap.packetsData.length; i++)
			{
				dissectedValue = dissectPacketData(this.pcap.packetsHeaders[i], this.pcap.packetsData[i]);
				document.pcapDissected['packets'][i] = dissectedValue[0]
				document.pcapDissected['packets'][i].frame = this.pcap.packetsHeaders[i];
				document.pcapDissected['packets'][i].frame.protocols = dissectedValue[1];
			}
			wiresharkDisplay(document.pcapDissected.packets);
			attachEvent();
			$('tr#0').trigger("click");
		}

		document.getElementById('pcap-file').addEventListener('change', dissectChoosenFile, false);
		document.getElementById('dissect').addEventListener('click', dissectFixedFile, false);
	});

});


text:
std::string getActivation(std::ifstream *file);
#endif //CPP_UTILS_H_H


text:
using Machine.Specifications;

namespace Stripe.Tests
{
	public class when_creating_a_recipient
	{
		protected static StripeRecipientCreateOptions StripeRecipientCreateOptions;
		protected static StripeRecipient StripeRecipient;

		private static StripeRecipientService _stripeRecipientService;

		Establish context = () =>
		{
			_stripeRecipientService = new StripeRecipientService();
			StripeRecipientCreateOptions = test_data.stripe_recipient_create_options.ValidIndividual();
		};

		Because of = () =>
			StripeRecipient = _stripeRecipientService.Create(StripeRecipientCreateOptions);

		Behaves_like<recipient_behaviors> behaviors;

		It should_have_metadata = () =>
			StripeRecipient.Metadata.Count.ShouldBeGreaterThan(0);

		It should_have_correct_metadata = () =>
			StripeRecipient.Metadata.ShouldContainOnly(StripeRecipientCreateOptions.Metadata);
	}
}


text:
from pathlib import Path
import logging

import numpy as np
import pandas as pd
import tensorflow as tf

import setags.data.utils as utils
from setags.data.utils import encode_text

log = logging.getLogger(__name__)

INDEX_FILENAME = 'index.csv'
NUM_EXAMPLES_PER_RECORDS_FILE = 2000

def prepare_data(filenames: list, data_dir: Path, train_fraction=1.0):
    input_dir = data_dir / utils.RAW_DATA_SUBDIR
    train_dir = data_dir / utils.TRAIN_DATA_SUBDIR
    test_dir = data_dir / utils.TEST_DATA_SUBDIR

    train_dir.mkdir(parents=True, exist_ok=True)
    test_dir.mkdir(parents=True, exist_ok=True)

    word_encoder = utils.WordEncoder(data_dir)
    test_dfs = []

    for filename in filenames:
        log.info("Preprocessing file '{}'".format(filename))
        name, _ = filename.split('.')
        with (input_dir / filename).open() as f:
            df = pd.read_csv(f)
        df['id'] = df['id'].apply(lambda x: name + str(x))

        if train_fraction == 1.0:
            train_df = df
        else:
            np.random.seed(0)
            train_df = df.sample(frac=train_fraction)

        store_tfrecords_from_df(name, word_encoder, train_df, train_dir)
        if train_fraction < 1.0:
            test_df = df.drop(train_df.index)
            store_tfrecords_from_df(name, word_encoder, test_df, test_dir)
            test_dfs.append(test_df)

    log.info("Storing valid tags for the test set")
    whole_test_df = pd.concat(test_dfs)
    assert(isinstance(whole_test_df, pd.DataFrame))
    whole_test_df.to_csv(data_dir / utils.TEST_TAGS_CSV_SUBPATH, columns=['id', 'tags'], index=False)
    log.info("Storing direct embeddings")
    word_encoder.store_direct_embeddings()

def encoded_string_features_dict(name: str, value: str, word_encoding: dict, token_tag_mapping: dict) -> dict:
    tokens = encode_text(value, word_encoding)
    bio_tags = [token_tag_mapping.get(token, utils.BIOTag.OUTSIDE).value for token in tokens]
    return {
        name: tf.train.Feature(int64_list=tf.train.Int64List(value=tokens)),
        name + '_bio': tf.train.Feature(int64_list=tf.train.Int64List(value=bio_tags)),
        name + '_length': tf.train.Feature(int64_list=tf.train.Int64List(value=[len(tokens)]))
    }

def string_feature(value: str) -> tf.train.Feature:
    return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value.encode()]))

def parse_tags(value: str, word_encoding) -> dict:
    tags = value.split()
    token_mapping = {}
    for tag in tags:
        [tag_head, *tag_tail] = encode_text(tag, word_encoding)[:-1]
        token_mapping[tag_head] = utils.BIOTag.BEGINNING
        for tail_word in tag_tail:
            token_mapping[tail_word] = utils.BIOTag.INSIDE
    return token_mapping

def store_tfrecords_from_df(name: str,
                            word_encoding: dict,
                            df: pd.DataFrame,
                            output_dir: Path):
    """
    Store a data frame as TFRecords. It splits the data frame across multiple files to allow better shuffling.

    :param name: base name for the output filename (without extension)
    :param word_encoding: words encoding to be used
    :param df: data frame to store
    :param output_dir: directory used to store the output files
    """
    df.to_csv(output_dir / INDEX_FILENAME, columns=['id'], header=False, index=False, mode='a')
    record_writer = None
    for i, (_, row) in enumerate(df.iterrows()):
        if i % NUM_EXAMPLES_PER_RECORDS_FILE == 0:
            file_number = int(i / NUM_EXAMPLES_PER_RECORDS_FILE)
            record_writer = tf.python_io.TFRecordWriter(str(output_dir / '{}{:04d}.tfrecords'.format(name, file_number)))
        features = {
            'id': string_feature(row['id']),
        }
        token_tag_mapping = parse_tags(row['tags'], word_encoding)
        features.update(encoded_string_features_dict('title', row['title'], word_encoding, token_tag_mapping))
        features.update(encoded_string_features_dict('content', row['content'], word_encoding, token_tag_mapping))
        example = tf.train.Example(features=tf.train.Features(feature=features))
        record_writer.write(example.SerializeToString())


text:
<?php

namespace PB\Bundle\SuluStorageBundle\Media\FormatCache;

use PB\Bundle\SuluStorageBundle\Media\Resolver\FileResolverInterface;
use PB\Bundle\SuluStorageBundle\Provider\Filesystem\FilesystemProviderInterface;
use Sulu\Bundle\MediaBundle\Media\Exception\ImageProxyMediaNotFoundException;
use Sulu\Bundle\MediaBundle\Media\FormatCache\LocalFormatCache;

/**
 * PB Sulu format cache.
 *
 * @author Paweł Brzeziński <pawel.brzezinski@smartint.pl>
 */
final class PBFormatCache extends LocalFormatCache implements FormatCacheInterface
{
    /**
     * @var FilesystemProviderInterface
     */
    private $filesystemProvider;

    /**
     * @var FileResolverInterface
     */
    private $fileResolver;

    /**
     * PBFormatCache constructor.
     *
     * @param FilesystemProviderInterface $filesystemProvider
     * @param FileResolverInterface $fileResolver
     * @param string $pathUrl
     * @param int $segments
     * @param array $formats
     */
    public function __construct(
        FilesystemProviderInterface $filesystemProvider,
        FileResolverInterface $fileResolver,
        $pathUrl,
        $segments,
        $formats
    ) {
        $this->filesystemProvider = $filesystemProvider;
        $this->fileResolver = $fileResolver;
        $this->pathUrl = $pathUrl;
        $this->segments = $segments;
        $this->formats = $formats;
    }

    /**
     * {@inheritdoc}
     */
    public function getFilesystemProvider()
    {
        return $this->filesystemProvider;
    }

    /**
     * {@inheritdoc}
     */
    public function load($id, $fileName, $options, $format)
    {
        $segmentPath = '/'.$this->getSegment($id);
        $fileName = $this->fileResolver->resolveFileName($fileName);
        $filePath = $this->fileResolver->resolveFormatFilePath($segmentPath, $format, $fileName);

        if (false === $this->filesystemProvider->exists($filePath)) {
            return null;
        }

        try {
            return  $this->filesystemProvider->read($filePath);
        } catch (\Exception $exception) {
            throw new ImageProxyMediaNotFoundException(sprintf('Format media at path "%s" not found', $filePath));
        }
    }

    /**
     * {@inheritdoc}
     */
    public function save($content, $id, $fileName, $options, $format)
    {
        $segmentPath = '/'.$this->getSegment($id);
        $fileName = $this->fileResolver->resolveFileName($fileName);
        $filePath = $this->fileResolver->resolveFormatFilePath($segmentPath, $format, $fileName);

        try {
            $this->filesystemProvider->write($filePath, $content);
        } catch (\Exception $exception) {
            return false;
        }

        return true;
    }

    /**
     * {@inheritdoc}
     */
    public function purge($id, $fileName, $options)
    {
        $segmentPath = '/'.$this->getSegment($id);
        $fileName = $this->fileResolver->resolveFileName($fileName);

        foreach ($this->formats as $format) {
            $filePath = $this->fileResolver->resolveFormatFilePath($segmentPath, $format['key'], $fileName);

            try {
                $this->filesystemProvider->delete($filePath);
            } catch (\Exception $exception) {
            }
        }

        return true;
    }

    /**
     * {@inheritdoc}
     */
    public function clear()
    {
        foreach ($this->formats as $format) {
            $path = '/'.$format['key'];

            try {
                $this->filesystemProvider->deleteDir($path);
            } catch (\Exception $exception) {
            }
        }
    }
}


text:
package me.termax.practice.lab11;

import javax.swing.*;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import java.awt.*;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

public class App extends JFrame {
    private JTable booksTable;
    private BooksModel booksTableModel;
    private JCheckBoxMenuItem validateXML;

    private final int COL_COUNT = 5;
    private enum BookField {
        TITLE, AUTHOR, ISBN, YEAR, PAGES;
    }

    public App() {
        super("Lab 11");

        setSize(800, 400);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        JMenuBar menuBar = new JMenuBar();
        JMenu file = new JMenu("File");
        JMenuItem loadFromXML = new JMenuItem("[DOM] Load XML...");
        loadFromXML.addActionListener(e -> {
            JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
            int option = chooser.showOpenDialog(this);
            if (option == JFileChooser.APPROVE_OPTION) {
                try {
                    booksTableModel = new BooksModel(chooser.getSelectedFile(), validateXML.getState());
                    booksTable.setModel(booksTableModel);
                    if (validateXML.getState())
                        JOptionPane.showMessageDialog(this,
                                "XML is valid and matches XSD schema",
                                "Info", JOptionPane.INFORMATION_MESSAGE);
                } catch (Exception err) {
                    JOptionPane.showMessageDialog(this, "Invalid XML file", "Error", JOptionPane.ERROR_MESSAGE);
                }
            }
        });
        file.add(loadFromXML);

        validateXML = new JCheckBoxMenuItem("Validate XML");
        validateXML.setState(true);
        file.add(validateXML);
        file.addSeparator();

        JMenuItem saveToXML = new JMenuItem("Save to XML");
        saveToXML.addActionListener(e -> {
            JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
            int option = chooser.showSaveDialog(this);
            if (option == JFileChooser.APPROVE_OPTION) {
                try {
                    booksTableModel.saveToXML(chooser.getSelectedFile());
                } catch (FileNotFoundException err) {
                    JOptionPane.showMessageDialog(this, "Invalid file path", "Error", JOptionPane.ERROR_MESSAGE);
                }
            }

        });
        file.add(saveToXML);

        JMenuItem calcXml = new JMenuItem("[SAX] Do calculations");
        calcXml.addActionListener(e -> {
            JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
            int option = chooser.showOpenDialog(this);
            if (option == JFileChooser.APPROVE_OPTION) {
                try {
                    SAXParserFactory factory = SAXParserFactory.newInstance();
                    SAXParser parser = factory.newSAXParser();
                    BookSAXHandler bookHandler = new BookSAXHandler();
                    parser.parse(chooser.getSelectedFile(), bookHandler);
                    JOptionPane.showMessageDialog(this,
                            "Books count: " + bookHandler.getBooksCount() +
                                    "\nTotal pages: " + bookHandler.getTotalPages() +
                                    "\nAverage page count: " + bookHandler.getAvgPages(),
                            "Info", JOptionPane.INFORMATION_MESSAGE);
                } catch (Exception err) {
                    JOptionPane.showMessageDialog(this, "Invalid XML file", "Error", JOptionPane.ERROR_MESSAGE);
                }
            }
        });
        file.add(calcXml);

        file.addSeparator();

        JMenuItem saveToBinary = new JMenuItem("Save to binary");
        saveToBinary.addActionListener(e -> {
            JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
            int option = chooser.showSaveDialog(this);
            if (option == JFileChooser.APPROVE_OPTION) {
                try {
                    booksTableModel.saveToBinary(chooser.getSelectedFile());
                } catch (IOException err) {
                    JOptionPane.showMessageDialog(this, "Invalid file path", "Error", JOptionPane.ERROR_MESSAGE);
                }
            }

        });
        file.add(saveToBinary);

        JMenuItem loadFromBinary = new JMenuItem("Load from binary");
        loadFromBinary.addActionListener(e -> {
            JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
            int option = chooser.showOpenDialog(this);
            if (option == JFileChooser.APPROVE_OPTION) {
                try {
                    booksTableModel = BooksModel.loadFromBinary(chooser.getSelectedFile());
                    booksTable.setModel(booksTableModel);
                } catch (Exception err) {
                    JOptionPane.showMessageDialog(this, "Invalid binary file", "Error", JOptionPane.ERROR_MESSAGE);
                }
            }

        });
        file.add(loadFromBinary);

        file.addSeparator();

        JMenuItem convertToHTML = new JMenuItem("Convert to HTML");
        convertToHTML.addActionListener(e -> {
            JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
            int option = chooser.showOpenDialog(this);
            if (option == JFileChooser.APPROVE_OPTION) {
                try {
                    TransformerFactory factory = TransformerFactory.newInstance();
                    Transformer transformer = factory.newTransformer(new StreamSource(BooksModel.class.getClassLoader().getResourceAsStream("html.xsl")));

                    transformer.transform(new StreamSource(chooser.getSelectedFile()), new StreamResult(new File("output.html")));
                } catch (Exception err) {
                    JOptionPane.showMessageDialog(this, "Invalid XML file", "Error", JOptionPane.ERROR_MESSAGE);
                }
            }

        });
        file.add(convertToHTML);

        JMenuItem convertToTXT = new JMenuItem("Convert to TXT");
        convertToTXT.addActionListener(e -> {
            JFileChooser chooser = new JFileChooser();
            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
            int option = chooser.showOpenDialog(this);
            if (option == JFileChooser.APPROVE_OPTION) {
                try {
                    TransformerFactory factory = TransformerFactory.newInstance();
                    Transformer transformer = factory.newTransformer(new StreamSource(BooksModel.class.getClassLoader().getResourceAsStream("txt.xsl")));

                    transformer.transform(new StreamSource(chooser.getSelectedFile()), new StreamResult(new File("output.txt")));
                } catch (Exception err) {
                    JOptionPane.showMessageDialog(this, "Invalid XML file", "Error", JOptionPane.ERROR_MESSAGE);
                }
            }

        });
        file.add(convertToTXT);

        JMenu booksMunu = new JMenu("Books");
        JMenuItem addBook = new JMenuItem("Add book");
        addBook.addActionListener(e -> {
            booksTableModel.getItems().add(new Book());
            booksTable.updateUI();
        });
        booksMunu.add(addBook);

        JMenuItem deleteBook = new JMenuItem("Delete selected book");
        deleteBook.addActionListener(e -> {
            booksTableModel.deleteRows(booksTable.getSelectedRows());
            booksTable.updateUI();
        });
        booksMunu.add(deleteBook);

        menuBar.add(file);
        menuBar.add(booksMunu);
        add(menuBar, BorderLayout.NORTH);

        booksTableModel = new BooksModel();
        booksTable = new JTable(booksTableModel);
        add(new JScrollPane(booksTable), BorderLayout.CENTER);
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        App app = new App();
        app.setVisible(true);
    }
}


text:
import React, { PropTypes } from 'react'
import R from 'ramda'
import { pure, compose, setPropTypes } from 'recompose'
import { pie, arc } from 'd3-shape'
import emptyFunction from './utils/emptyFunction'

const defaultValueAccessor = R.identity
const defaultInnerRadiusAccessor = R.always(0)
const defaultOuterRadiusAccessor = R.prop('outerRadius')
const defaultStartAngleAccessor = R.always(0)
const defaultEndAngleAccessor = R.always(2 * Math.PI)
const defaultPadAngleAccessor = R.always(0)

const enhance = compose(
  pure,
  setPropTypes({
    getArcProps: PropTypes.func,
    data: PropTypes.array,
    valueAccessor: PropTypes.func,
    innerRadiusAccessor: PropTypes.func,
    outerRadiusAccessor: PropTypes.func,
    startAngleAccessor: PropTypes.func,
    endAngleAccessor: PropTypes.func,
    padAngleAccessor: PropTypes.func,
    sortComparator: PropTypes.func,
    renderLabel: PropTypes.func,
  }),
)

const PieChart = ({
  data = [],
  valueAccessor = defaultValueAccessor,
  innerRadiusAccessor = defaultInnerRadiusAccessor,
  outerRadiusAccessor = defaultOuterRadiusAccessor,
  startAngleAccessor = defaultStartAngleAccessor,
  endAngleAccessor = defaultEndAngleAccessor,
  padAngleAccessor = defaultPadAngleAccessor,
  sortComparator = null,
  getArcProps = emptyFunction,
  renderLabel,
  ...otherProps
}) => {
  const pieGen = pie()
    .padAngle(padAngleAccessor)
    .startAngle(startAngleAccessor)
    .endAngle(endAngleAccessor)
    .value(valueAccessor)
    .sort(sortComparator)

  const arcGen = arc()
    .innerRadius(innerRadiusAccessor)
    .outerRadius(outerRadiusAccessor)

  return (
    <g {...otherProps}>
      {
        pieGen(data).map((d, i) => (
          /* eslint react/no-array-index-key: 0 */
          <g key={i}>
            <path
              fill="#EFEFEF"
              d={arcGen(d)}
              {...getArcProps(d)}
            />
            {
              R.is(Function, renderLabel) && renderLabel(d, arcGen.centroid(d))
            }
          </g>
        ))
      }
    </g>
  )
}

export default enhance(PieChart)


text:
#ifndef TENSORFLOW_C_EAGER_immediate_execution_distributed_manager_H_
#define TENSORFLOW_C_EAGER_immediate_execution_distributed_manager_H_

#include "tensorflow/core/platform/status.h"

namespace tensorflow {
class CoordinationServiceAgent;
class ImmediateExecutionContext;
class ServerDef;
class WorkerEnv;
class WorkerCacheInterface;

class ImmediateExecutionDistributedManager {
 public:
  virtual ~ImmediateExecutionDistributedManager() {}

  // Set up distributed execution environment on local and remote tasks.
  // When `reset_context` is true, initialize new cluster context state based on
  // cluster configurations provided in `server_def`; otherwise, update existing
  // context state with the provided `server_def`.
  // Contexts created on remote tasks will be considered stale and garbage
  // collected after `keep_alive_secs` of inactivity.
  virtual Status SetOrUpdateServerDef(const ServerDef& server_def,
                                      bool reset_context,
                                      int keep_alive_secs) = 0;

  // Set up a multi-client distributed execution environment. Must be called on
  // all tasks in the cluster.
  // This call internally coordinates with other tasks to initialize the eager
  // context and TF server for multi-client execution.
  virtual Status EnableCollectiveOps(const ServerDef& server_def) = 0;

  // Enable coordination service instance for the distributed cluster. The
  // service is owned by the current distributed manager.
  // See CoordinationServiceInterface for details.
  virtual Status EnableCoordinationService(
      const std::string& service_type, const WorkerEnv* worker_env,
      const ServerDef& server_def, WorkerCacheInterface* worker_cache) = 0;

  // Check if the remote task is alive.
  virtual Status CheckRemoteAlive(const std::string& remote_task_name,
                                  bool* is_alive) = 0;

  // Get pointer to the coordination service agent instance.
  virtual CoordinationServiceAgent* GetCoordinationServiceAgent() = 0;
};
}  // namespace tensorflow

#endif  // TENSORFLOW_C_EAGER_immediate_execution_distributed_manager_H_


text:
module Demote.LetIn1 where

--A definition can be demoted to the local 'where' binding of a friend declaration,
--if it is only used by this friend declaration.

--Demoting a definition narrows down the scope of the definition.
--In this example, demote the local  'pow' to 'sq'
--This example also aims to test the demoting a local declaration in 'let'.

sumSquares x y = let sq 0=0
                     sq z=z^pow
                     pow=2
                 in sq x + sq y

anotherFun 0 y = sq y
     where  sq x = x^2


text:
<?xml version="1.0" encoding="utf-8"?>

<chapter>

  <title>
      AMQP Java JMS Messaging Client
  </title>

  <para>The Java Client supported by Qpid implements the <ulink
  url="http://java.sun.com/products/jms/docs.html">Java JMS 1.1
  Specification</ulink>.  </para>

    <title>General User Guides</title>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="System-Properties.xml"/>
    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Connection-URL-Format.xml"/>
    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Binding-URL-Format.xml"/>
    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java-JMS-Selector-Syntax.xml"/>

	    <title>AMQP Java JMS Examples </title>

	  <itemizedlist>
            <listitem><para>
              <ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/">Examples Directory</ulink>
            </para></listitem>

            <listitem><para>
              <ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/runSample.sh">Script for running examples</ulink>
            </para></listitem>
            <listitem><para>
              <ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/direct/">Direct Example</ulink>
            </para></listitem>
            <listitem><para>
              <ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/">Fanout Example</ulink>
            </para></listitem>
            <listitem><para>
              <ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub">Pub-Sub Example</ulink>
            </para></listitem>
            <listitem><para>
              <ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/">Request/Response Example</ulink>
            </para></listitem>
	    <listitem><para>
	      <ulink url="https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/transacted/">Transacted Example</ulink></para></listitem>
          </itemizedlist>

</chapter>


text:
from flask import request, Response
from flask.blueprints import Blueprint
from sqlalchemy.sql.expression import cast
from sqlalchemy import String
from security_monkey import rbac
from security_monkey.datastore import Item, ItemRevision, Account, Technology, ItemAudit, AuditorSettings
from sqlalchemy.orm import joinedload

export_blueprint = Blueprint("export", __name__)

@export_blueprint.route("/export/items")
@rbac.allow(roles=["View"], methods=["GET"])
def export_items():
    args = {}
    args['regions'] = request.args.get('regions', None)
    args['accounts'] = request.args.get('accounts', None)
    args['active'] = request.args.get('active', None)
    args['names'] = request.args.get('names', None)
    args['technologies'] = request.args.get('technologies', None)
    args['searchconfig'] = request.args.get('searchconfig', None)
    args['ids'] = request.args.get('ids', None)

    for k, v in args.items():
        if not v:
            del args[k]

    query = Item.query.join((ItemRevision, Item.latest_revision_id == ItemRevision.id))
    if 'regions' in args:
        regions = args['regions'].split(',')
        query = query.filter(Item.region.in_(regions))
    if 'accounts' in args:
        accounts = args['accounts'].split(',')
        query = query.join((Account, Account.id == Item.account_id))
        query = query.filter(Account.name.in_(accounts))
    if 'technologies' in args:
        technologies = args['technologies'].split(',')
        query = query.join((Technology, Technology.id == Item.tech_id))
        query = query.filter(Technology.name.in_(technologies))
    if 'names' in args:
        names = args['names'].split(',')
        query = query.filter(Item.name.in_(names))
    if 'ids' in args:
        ids = args['ids'].split(',')
        query = query.filter(Item.id.in_(ids))
    if 'active' in args:
        active = args['active'].lower() == "true"
        query = query.filter(ItemRevision.active == active)
    if 'searchconfig' in args:
        searchconfig = args['searchconfig']
        query = query.filter(cast(ItemRevision.config, String).ilike('%{}%'.format(searchconfig)))

    # Eager load the joins and leave the config column out of this.
    query = query.options(joinedload('issues'))
    # Now loaded by the join on line 29 I think...
    #query = query.options(joinedload('revisions').defer('config'))
    query = query.options(joinedload('account'))
    query = query.options(joinedload('technology'))

    query = query.order_by(ItemRevision.date_created.desc())
    attributes = [
        ["technology", "name"],
        ["account", "name"],
        ["account", "identifier"],
        ["region"],
        ["name"],
        ["issues"],
        ["comments"]
    ]

    out = ",".join(["/".join(at) for at in attributes]) + "\n"

    for item in query:
        values = []
        for attribute in attributes:
            val = item
            for at in attribute:
                val = getattr(val, at)
                if val is None:
                    break
            val = str(val).replace('"', '""')
            values.append('"{val}"'.format(val=val))

        out += ",".join(values) + "\n"
    return Response(out, mimetype='text/csv',
                    headers={"Content-disposition": "attachment; filename=security-monkey-items.csv"})

@export_blueprint.route("/export/issues")
@rbac.allow(roles=["View"], methods=["GET"])
def export_issues():
    args = {}
    args['regions'] = request.args.get('regions', None)
    args['accounts'] = request.args.get('accounts', None)
    args['active'] = request.args.get('active', None)
    args['names'] = request.args.get('names', None)
    args['technologies'] = request.args.get('technologies', None)
    args['searchconfig'] = request.args.get('searchconfig', None)
    args['ids'] = request.args.get('ids', None)

    for k, v in args.items():
        if not v:
            del args[k]

    query = ItemAudit.query.join("item")
    query = query.filter(ItemAudit.fixed == False)
    if 'regions' in args:
        regions = args['regions'].split(',')
        query = query.filter(Item.region.in_(regions))
    if 'accounts' in args:
        accounts = args['accounts'].split(',')
        query = query.join((Account, Account.id == Item.account_id))
        query = query.filter(Account.name.in_(accounts))
    if 'technologies' in args:
        technologies = args['technologies'].split(',')
        query = query.join((Technology, Technology.id == Item.tech_id))
        query = query.filter(Technology.name.in_(technologies))
    if 'names' in args:
        names = args['names'].split(',')
        query = query.filter(Item.name.in_(names))
    if 'active' in args:
        active = args['active'].lower() == "true"
        query = query.join((ItemRevision, Item.latest_revision_id == ItemRevision.id))
        query = query.filter(ItemRevision.active == active)
    if 'searchconfig' in args:
        search = args['searchconfig']
        query = query.filter(
            (ItemAudit.issue.ilike('%{}%'.format(search))) |
            (ItemAudit.notes.ilike('%{}%'.format(search))) |
            (ItemAudit.justification.ilike('%{}%'.format(search))) |
            (Item.name.ilike('%{}%'.format(search)))
        )
    if 'enabledonly' in args:
        query = query.join((AuditorSettings, AuditorSettings.id == ItemAudit.auditor_setting_id))
        query = query.filter(AuditorSettings.disabled == False)

    query = query.order_by(ItemAudit.justified, ItemAudit.score.desc())

    attributes = [
        ["item", "technology", "name"],
        ["item", "account", "name"],
        ["item", "account", "identifier"],
        ["item", "region"],
        ["item", "name"],
        ["item", "comments"],
        ["score"],
        ["issue"],
        ["notes"],
        ["justified"],
        ["user", "email"],
        ["justification"]
    ]

    out = ",".join(["/".join(at) for at in attributes]) + "\n"

    for issue in query:
        values = []
        for attribute in attributes:
            val = issue
            for at in attribute:
                val = getattr(val, at)
                if val is None:
                    break
            val = str(val).replace('"', '""')
            values.append('"{val}"'.format(val=val))

        out += ",".join(values) + "\n"
    return Response(out, mimetype='text/csv',
                    headers={"Content-disposition": "attachment; filename=security-monkey-items.csv"})


text:
package com.github.adiesner.jenkins.bitbucketprcoveragestatus.stash;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class StashPullRequestResponseValueRepositoryRepository {
    private String slug;
    private StashPullRequestResponseValueRepositoryProject project;

    @JsonProperty("project")
    public StashPullRequestResponseValueRepositoryProject getRepository() {
        return project;
    }

    @JsonProperty("project")
    public void setRepository(StashPullRequestResponseValueRepositoryProject project) {
        this.project = project;
    }

    public String getSlug() {
        return slug;
    }

    public void setSlug(String slug) {
        this.slug = slug;
    }

    public String getProjectName() {
        if (this.project != null && project.getKey() != null) {
            return project.getKey();
        }
        return null;
    }

    public String getRepositoryName() {
        return this.slug;
    }
}


text:
import numpy as np

class State:
    def __init__(self, ndim):
        self.ndim = ndim
        self.position = np.zeros(self.ndim)
        self.velocity = np.zeros(self.ndim)

class Model:

    def __init__(self, mass=1., stiffness=1.):

        self.mass = mass
        self.stiffness = stiffness

    def compute_acceleration(self, state):

        # F = -k.x
        self.stretch = state.position[0]  # 0 is the "rest" point
        total_external_force = -1. * self.stiffness * self.stretch

        # a = f/m
        acceleration = total_external_force / self.mass

        return acceleration

def compute_new_state(state, acceleration, delta_time):
    "Compute the forward kinematics with finite difference method."

    new_state = State(state.ndim)

    # Velocity (m/s) at time_n+1
    new_state.velocity = state.velocity + acceleration * delta_time

    # Position (m) at time_n+1
    new_state.position = state.position + state.velocity * delta_time

    return new_state

def main():

    state = State(ndim=1)
    state.position[0] = 1.  # initial stiffness (0 is the "rest" point)

    time = 0.
    delta_time = 0.01

    model = Model()

    print("#time  acceleration  velocity  position")

    while time < 12:

        time = time + delta_time

        # Update state (physics)
        acceleration = model.compute_acceleration(state)
        state = compute_new_state(state, acceleration, delta_time)

        print(time, acceleration, state.velocity[0], state.position[0])

if __name__ == "__main__":
    main()