text:
package componentconfigs

import (
	"path/filepath"

	"k8s.io/klog"

	kubeproxyconfigv1alpha1 "k8s.io/kube-proxy/config/v1alpha1"
	kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"
	kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
	kubeadmapiv1beta2 "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2"
	"k8s.io/kubernetes/cmd/kubeadm/app/constants"
	"k8s.io/kubernetes/cmd/kubeadm/app/features"
	kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config"
	kubeproxyconfig "k8s.io/kubernetes/pkg/proxy/apis/config"
	utilpointer "k8s.io/utils/pointer"
)

const (
	// kubeproxyKubeConfigFileName defines the file name for the kube-proxy's kubeconfig file
	kubeproxyKubeConfigFileName = "/var/lib/kube-proxy/kubeconfig.conf"

	// kubeletReadOnlyPort specifies the default insecure http server port
	// 0 will disable insecure http server.
	kubeletReadOnlyPort int32 = 0

	// kubeletRotateCertificates specifies the default value to enable certificate rotation
	kubeletRotateCertificates = true

	// kubeletAuthenticationAnonymousEnabled specifies the default value to disable anonymous access
	kubeletAuthenticationAnonymousEnabled = false

	// kubeletAuthorizationMode specifies the default authorization mode
	kubeletAuthorizationMode = kubeletconfigv1beta1.KubeletAuthorizationModeWebhook

	// kubeletAuthenticationWebhookEnabled set the default value to enable authentication webhook
	kubeletAuthenticationWebhookEnabled = true

	// kubeletHealthzBindAddress specifies the default healthz bind address
	kubeletHealthzBindAddress = "127.0.0.1"
)

// DefaultKubeProxyConfiguration assigns default values for the kube-proxy ComponentConfig
func DefaultKubeProxyConfiguration(internalcfg *kubeadmapi.ClusterConfiguration) {
	externalproxycfg := &kubeproxyconfigv1alpha1.KubeProxyConfiguration{}
	kind := "KubeProxyConfiguration"

	// Do a roundtrip to the external version for defaulting
	if internalcfg.ComponentConfigs.KubeProxy != nil {
		Scheme.Convert(internalcfg.ComponentConfigs.KubeProxy, externalproxycfg, nil)
	}

	if externalproxycfg.ClusterCIDR == "" && internalcfg.Networking.PodSubnet != "" {
		externalproxycfg.ClusterCIDR = internalcfg.Networking.PodSubnet
	} else if internalcfg.Networking.PodSubnet != "" && externalproxycfg.ClusterCIDR != internalcfg.Networking.PodSubnet {
		warnDefaultComponentConfigValue(kind, "clusterCIDR", internalcfg.Networking.PodSubnet, externalproxycfg.ClusterCIDR)
	}

	if externalproxycfg.ClientConnection.Kubeconfig == "" {
		externalproxycfg.ClientConnection.Kubeconfig = kubeproxyKubeConfigFileName
	} else if externalproxycfg.ClientConnection.Kubeconfig != kubeproxyKubeConfigFileName {
		warnDefaultComponentConfigValue(kind, "clientConnection.kubeconfig", kubeproxyKubeConfigFileName, externalproxycfg.ClientConnection.Kubeconfig)
	}

	// TODO: The following code should be remvoved after dual-stack is GA.
	// Note: The user still retains the ability to explicitly set feature-gates and that value will overwrite this base value.
	if enabled, present := internalcfg.FeatureGates[features.IPv6DualStack]; present {
		externalproxycfg.FeatureGates[features.IPv6DualStack] = enabled
	}

	// Run the rest of the kube-proxy defaulting code
	Scheme.Default(externalproxycfg)

	if internalcfg.ComponentConfigs.KubeProxy == nil {
		internalcfg.ComponentConfigs.KubeProxy = &kubeproxyconfig.KubeProxyConfiguration{}
	}

	// TODO: Figure out how to handle errors in defaulting code
	// Go back to the internal version
	Scheme.Convert(externalproxycfg, internalcfg.ComponentConfigs.KubeProxy, nil)
}

// DefaultKubeletConfiguration assigns default values for the kubelet ComponentConfig
func DefaultKubeletConfiguration(internalcfg *kubeadmapi.ClusterConfiguration) {
	externalkubeletcfg := &kubeletconfigv1beta1.KubeletConfiguration{}
	kind := "KubeletConfiguration"

	// Do a roundtrip to the external version for defaulting
	if internalcfg.ComponentConfigs.Kubelet != nil {
		Scheme.Convert(internalcfg.ComponentConfigs.Kubelet, externalkubeletcfg, nil)
	}

	if externalkubeletcfg.StaticPodPath == "" {
		externalkubeletcfg.StaticPodPath = kubeadmapiv1beta2.DefaultManifestsDir
	} else if externalkubeletcfg.StaticPodPath != kubeadmapiv1beta2.DefaultManifestsDir {
		warnDefaultComponentConfigValue(kind, "staticPodPath", kubeadmapiv1beta2.DefaultManifestsDir, externalkubeletcfg.StaticPodPath)
	}

	clusterDNS := ""
	dnsIP, err := constants.GetDNSIP(internalcfg.Networking.ServiceSubnet)
	if err != nil {
		clusterDNS = kubeadmapiv1beta2.DefaultClusterDNSIP
	} else {
		clusterDNS = dnsIP.String()
	}

	if externalkubeletcfg.ClusterDNS == nil {
		externalkubeletcfg.ClusterDNS = []string{clusterDNS}
	} else if len(externalkubeletcfg.ClusterDNS) != 1 || externalkubeletcfg.ClusterDNS[0] != clusterDNS {
		warnDefaultComponentConfigValue(kind, "clusterDNS", []string{clusterDNS}, externalkubeletcfg.ClusterDNS)
	}

	if externalkubeletcfg.ClusterDomain == "" {
		externalkubeletcfg.ClusterDomain = internalcfg.Networking.DNSDomain
	} else if internalcfg.Networking.DNSDomain != "" && externalkubeletcfg.ClusterDomain != internalcfg.Networking.DNSDomain {
		warnDefaultComponentConfigValue(kind, "clusterDomain", internalcfg.Networking.DNSDomain, externalkubeletcfg.ClusterDomain)
	}

	// Require all clients to the kubelet API to have client certs signed by the cluster CA
	clientCAFile := filepath.Join(internalcfg.CertificatesDir, constants.CACertName)
	if externalkubeletcfg.Authentication.X509.ClientCAFile == "" {
		externalkubeletcfg.Authentication.X509.ClientCAFile = clientCAFile
	} else if externalkubeletcfg.Authentication.X509.ClientCAFile != clientCAFile {
		warnDefaultComponentConfigValue(kind, "authentication.x509.clientCAFile", clientCAFile, externalkubeletcfg.Authentication.X509.ClientCAFile)
	}

	if externalkubeletcfg.Authentication.Anonymous.Enabled == nil {
		externalkubeletcfg.Authentication.Anonymous.Enabled = utilpointer.BoolPtr(kubeletAuthenticationAnonymousEnabled)
	} else if *externalkubeletcfg.Authentication.Anonymous.Enabled != kubeletAuthenticationAnonymousEnabled {
		warnDefaultComponentConfigValue(kind, "authentication.anonymous.enabled", kubeletAuthenticationAnonymousEnabled, *externalkubeletcfg.Authentication.Anonymous.Enabled)
	}

	// On every client request to the kubelet API, execute a webhook (SubjectAccessReview request) to the API server
	// and ask it whether the client is authorized to access the kubelet API
	if externalkubeletcfg.Authorization.Mode == "" {
		externalkubeletcfg.Authorization.Mode = kubeletAuthorizationMode
	} else if externalkubeletcfg.Authorization.Mode != kubeletAuthorizationMode {
		warnDefaultComponentConfigValue(kind, "authorization.mode", kubeletAuthorizationMode, externalkubeletcfg.Authorization.Mode)
	}

	// Let clients using other authentication methods like ServiceAccount tokens also access the kubelet API
	if externalkubeletcfg.Authentication.Webhook.Enabled == nil {
		externalkubeletcfg.Authentication.Webhook.Enabled = utilpointer.BoolPtr(kubeletAuthenticationWebhookEnabled)
	} else if *externalkubeletcfg.Authentication.Webhook.Enabled != kubeletAuthenticationWebhookEnabled {
		warnDefaultComponentConfigValue(kind, "authentication.webhook.enabled", kubeletAuthenticationWebhookEnabled, *externalkubeletcfg.Authentication.Webhook.Enabled)
	}

	// Serve a /healthz webserver on localhost:10248 that kubeadm can talk to
	if externalkubeletcfg.HealthzBindAddress == "" {
		externalkubeletcfg.HealthzBindAddress = kubeletHealthzBindAddress
	} else if externalkubeletcfg.HealthzBindAddress != kubeletHealthzBindAddress {
		warnDefaultComponentConfigValue(kind, "healthzBindAddress", kubeletHealthzBindAddress, externalkubeletcfg.HealthzBindAddress)
	}

	if externalkubeletcfg.HealthzPort == nil {
		externalkubeletcfg.HealthzPort = utilpointer.Int32Ptr(constants.KubeletHealthzPort)
	} else if *externalkubeletcfg.HealthzPort != constants.KubeletHealthzPort {
		warnDefaultComponentConfigValue(kind, "healthzPort", constants.KubeletHealthzPort, *externalkubeletcfg.HealthzPort)
	}

	if externalkubeletcfg.ReadOnlyPort != kubeletReadOnlyPort {
		warnDefaultComponentConfigValue(kind, "readOnlyPort", kubeletReadOnlyPort, externalkubeletcfg.ReadOnlyPort)
	}

	// We cannot show a warning for RotateCertificates==false and we must hardcode it to true.
	// There is no way to determine if the user has set this or not, given the field is a non-pointer.
	externalkubeletcfg.RotateCertificates = kubeletRotateCertificates

	Scheme.Default(externalkubeletcfg)

	if internalcfg.ComponentConfigs.Kubelet == nil {
		internalcfg.ComponentConfigs.Kubelet = &kubeletconfig.KubeletConfiguration{}
	}

	// TODO: Figure out how to handle errors in defaulting code
	// Go back to the internal version
	Scheme.Convert(externalkubeletcfg, internalcfg.ComponentConfigs.Kubelet, nil)
}

// warnDefaultComponentConfigValue prints a warning if the user modified a field in a certain
// CompomentConfig from the default recommended value in kubeadm.
func warnDefaultComponentConfigValue(componentConfigKind, paramName string, defaultValue, userValue interface{}) {
	klog.Warningf("The recommended value for %q in %q is: %v; the provided value is: %v",
		paramName, componentConfigKind, defaultValue, userValue)
}


text:
FROM ruby:2.3.1

RUN apt-get update -qq
RUN apt-get install -y build-essential nodejs nodejs-legacy npm mysql-client vim cmake

WORKDIR /tmp
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN gem install bundler && bundle install && bundle update

RUN mkdir /myapp
ADD . /myapp
WORKDIR /myapp

ENTRYPOINT scripts/deploy

redpajama_set_name: RedPajamaGithub


text:
require 'nokogiri'
require 'watir-webdriver'
require 'csv'

t = Time.new
stores = [
  "650 Stillwater Ave, Bangor",
  "2435 Lafayette St, Santa Clara",
  "Bennington VT",
  "Rhode Island Ave Washington DC",
  "Ellicott City MD",
  "Catonsville MD",
  "W Little Rock AR",
  "Conway AR",
  "Ellsworth ME",
  "West Mifflin PA",
  "Ross Township PA",
  " 3550 William Penn Highway, PA Wilkins",
  "Sioux Falls",
  "Iron Mountain MI",
  "Cicero IL",
  "Evanston IL",
  "Las Cruces NM",
  "7545 N Mesa Street, El Paso 79912",
  "East El Paso TX",
  "Roosevelt Blvd Philadelphia, PA 19124",
  "2539 Castor Avenue, Philadelphia, PA, 19134",
  "1350 Macarthur Road, Whitehall, PA 18052",
  "Dickson City PA",
  "615 Arsenal Street, Watertown, MA, 02472",
  "Glastonbury, CT",
  "80 Buckland Hills Dr; Manchester, CT",
  "Chicopee MA",
  "179 Dagget Drive, West Springfield, MA",
  "350 Russell Street Hadley",
  "759 Harvest Ln, Williston",
  "245 Riverside St, Portland, ME 04103",
  "154 Topsham Fair Mall Rd, Topsham",
  "346 Middle Country Rd, Coram",
  "555 Hubbard Ave-Unit 21, Pittsfield",
  "65 Independence Dr, Hyannis",
  "387 Charles St, Providence",
  "350 Barnum Ave Cutoff, Stratford",
  "2905 E Market Street, York",
  "51 N Mccain Drive, Frederick",
  "3301 E West Highway, Hyattsville",
  "4700 Cherry Hill Rd, College Park",
  "1621 N Olden Avenue, Ewing",
  "399-443 Springfield Ave, Newark",
  "400 N Highland Ave, Pittsburgh",
  "9971 Mountain View Dr, West Mifflin",
  "100 South Grener Rd, Columbus",
  "1680 Stringtown Road, Grove City",
  "100 Cross Terrace Blvd, Charleston",
  "3051 West Radio Drive, Florence",
  "2031 Walnut Street, Cary, NC, 27518",
  "650 Ponce De Leon, Atlanta",
  "855 Lane Ave South, Jacksonville",
  "6325 I-55 North, Jackson",
  "1627 Poplar Avenue, Memphis",
  "12300 I-10 Service Rd, New Orleans",
  "1100 S Claiborne Ave, New Orleans, Louisiana, 70125",
  "6900 Pines Road, Shreveport",
  "2225 N Post Road, Indianapolis",
  "9320 Corporation Dr, Indianapolis, IN 46256",
  "18700 Meyers Road; Detroit, MI 48235",
  "3300 Carpenter Rd, Ypsilanti",
  "W8141 Highway Us 2, Iron Mountain",
  "3202 S Kings Hwy Blvd, Saint Louis",
  "1520 New Brighton Blvd, Minneapolis",
  "4900 Se 14th St, Des Moines",
  "415 Cunningham Drive, Sioux City",
  "2523 S Louise Ave, Sioux Falls",
  "12610 Chenal Pkwy, Little Rock",
  "507 West 19th Street, El Dorado",
  "500 Elsinger Blvd, Conway",
  "4900 East 2nd Street, Casper",
  "1925 Foothill Blvd, Rock Springs",
  "1740 Fleischli Pkwy, Cheyenne",
  "3870 Quebec Street, Denver",
  "2436 F Road, Grand Junction",
  "1200 Milwaukee Street, Boise",
  "937 N Westridge Drive, Saint George, UT, 84770",
  "7345 Delridge Way SW Seattle, WA 98106",
  "2701 Utah Ave South, Seattle",
  "2601 Bickford Avenue, Snohomish",
  "420 Telegraph Rd, Bellingham",
  "10120 Se Washington St, Portland",
  "2115 S First Street, Yakima",
  "520 Us Highway 101 North, Crescent City",
  "3272 W Shaw Avenue, Fresno",
  "1781 E Bayshore Rd, East Palo Alto",
  "27952 Hillcrest, Mission Viejo, CA, 92692",
  "4750 S Decatur Blvd, Las Vegas",
  "5125 Summit Ridge Ct, Reno",
  "2650 W Thunderbird Rd, Phoenix",
  "2820 Coors Blvd Nw, Albuquerque",
  "1200 Barbara Jordan Blvd, Suite 100, Austin",
  "4041 S Sheridan, Tulsa",
  "Park City UT",
  "1461 Meadowview Road, CA 95832",
  "8000 Folsom Blvd, Sacramento",
  "3398 S Highland Drive, Salt Lake City, Utah 84106",
  "6400 Alondra Blvd Paramount, CA",
  "355 Marketplace Ave San Diego, CA 92113",
  "12185 Carmel Mountain Rd, San Diego, CA 92128",
  "1550 W Valley Parkway, Escondido, California 92029",
  "86004 AZ"
  ]

products = [
  "Philips Lightbulbs SlimStyle 40W Equivalent Soft White",
  "Philips Lightbulbs SlimStyle 40W Equivalent Daylight (5000K) A19",
  "75W Equivalent Daylight A19 Dimmable LED Light Bulb",
  "75W Equivalent Soft White A19 Dimmable LED Light Bulb",
  "100W Equivalent Soft White (2700K) A21 Dimmable LED Light Bulb",
  "100W Equivalent Daylight (5000K) A21 Dimmable LED Light Bulb",
  "Cree Lightbulbs 100W Equivalent Daylight (5000K) A21 Dimmable LED Light Bulb BA21-16050OMF-12DE26-1U100",
  "00849665009788",
  "Cree Lightbulbs TW Series 40W Equivalent Soft White Candelabra Decorative Dimmable LED Light Bulb (3-Pack) BB13-03527OMC-12DE12-1C600",
  "Cree Lightbulbs 30/60/100W Equivalent Soft White (2700K) A21 3-Way LED Light Bulb BA21-16027OMF-12WE26-1U100",
  "Cree Lightbulbs 100W Equivalent Soft White (2700K) A21 Dimmable LED Light Bulb BA21-16027OMF-12DE26-1U100",
  "Cree Lightbulbs 75W Equivalent Daylight A19 Dimmable LED Light Bulb BA19-11050OMF-12DE26-1U100",
  "00810048029969",
  "Connected 60W Equivalent Daylight A19 Dimmable LED Light Bulb",
  "Cree Lightbulbs TW Series 25W Equivalent Soft White Candelabra Decorative Dimmable LED Light Bulb (3-Pack) BB13-02027OMC-12DE12-1C600",
  "Cree Lightbulbs 40W Equivalent Soft White A19 Dimmable LED Light Bulb with 4-Flow Filament Design BA19-04527OMB-12DE26-3_1",
  "Connected 60W Equivalent Soft White A19 Dimmable LED Light Bulb",
  "65W Equivalent Daylight BR40 Dimmable LED Flood Light Bulb",
  "65W Equivalent Soft White BR40 Dimmable LED Flood Light Bulb",
  "Cree Lightbulbs 75W Equivalent Soft White A19 Dimmable LED Light Bulb BA19-11027OMF-12DE26-1U100",
  "Cree Lightbulbs 60W Equivalent Soft White A19 Dimmable LED Light Bulb with 4-Flow Filament Design BA19-08027OMB-12DE26-3_1",
  "Cree Lightbulbs 65W Equivalent Daylight (5000K) BR30 Dimmable LED Flood Light BBR30-06550FLF-12DE26-4U100",
  "Cree Lightbulbs 40W Equivalent Daylight A19 Dimmable LED Light Bulb with 4-Flow Filament Design BA19-04550OMB-12DE26-3_1",
  "Cree Lightbulbs 6 in. TW Series 65W Equivalent Daylight (5000K) Dimmable LED Retrofit Recessed Downlight DRDL6-06250009-12DE26-1C100",
  "Cree Lightbulbs 6 in. TW Series 65W Equivalent Soft White (2700K) Dimmable LED Retrofit Recessed Downlight DRDL6-06227009-12DE26-1C100",
  "90W Equivalent Bright White PAR38 Dimmable LED 47° Flood Light Bulb",
  "90W Equivalent Bright White PAR38 Dimmable LED 27° Spot Light Bulb",
  "Philips Lightbulbs 60W Equivalent Daylight A19 LED Light Bulb 455955",
  "00046677455507",
  "Philips Lightbulbs SlimStyle 75W Equivalent Soft White A21 LED Light Bulb 452755",
  "Philips Lightbulbs 4 ft. T8 17-Watt Cool White Linear LED Light Bulb 456590",
  "Philips Lightbulbs 65W Equivalent Soft White BR30 Dimmable LED with Warm Glow Effect Light Bulb (E) 457069",
  "Philips Lightbulbs 4 ft. T8 14.5-Watt Daylight (5000K) Linear LED Light Bulb 453886",
  "00046677800000",
  "Philips Lightbulbs SlimStyle 60W Equivalent Daylight (5000K) A19 LED Light Bulb 452986",
  "Philips Lightbulbs SlimStyle 40W Equivalent Daylight (5000K) A19 Dimmable LED Light Bulb 433219",
  "00046677434991",
  "Philips Lightbulbs 40W Equivalent Soft White B11 Candelabra Base LED Light Bulb (3-Pack) 458711",
  "00046677178628",
  "00046677433208",
  "Philips Lightbulbs 60W Equivalent Soft White A19 Dimmable LED with Warm Glow Light Effect Household Light Bulb 455840",
  "Philips Lightbulbs 35W Equivalent Bright White (3000K) MR16 Dimmable LED Light Bulb 453498",
  "Philips Lightbulbs 60W Equivalent Daylight (5000K) A19 Dimmable LED Light Bulb 455873",
  "Philips Lightbulbs 65W Equivalent Daylight BR30 Dimmable LED Light Bulb 457085",
  "Philips Lightbulbs 50W Equivalent Bright White (3000K) MR16 Dimmable LED Flood Light Bulb 453480",
  "Philips Lightbulbs SlimStyle 60W Equivalent Soft White A19 Dimmable LED Light Bulb (3-Pack) 453530",
  "Philips Lightbulbs 50W Equivalent Bright White GU10 Dimmable LED Flood Light Bulb (E) 454363",
  "Philips Lightbulbs 65W Equivalent Daylight 5/6 in. Retrofit Trim Recessed Downlight Dimmable LED Flood Light Bulb (E)* 800061",
  "00046677433239",
  "50W Equivalent Bright White PAR20 Dimmable LED Flood Light Bulb (E)*",
  "Philips Lightbulbs 100W Equivalent Soft White Household A19 Dimmable LED with Warm Glow Light Effect Light Bulb 459107",
  "Philips Lightbulbs 75W Equivalent Soft White Household A19 Dimmable LED with Warm Glow Light Effect Light Bulb 459065",
  "Philips Lightbulbs 50W Equivalent Daylight 4 in. Retrofit Trim Recessed Downlight Dimmable LED Flood Light Bulb (E)* 800020",
  "Philips Lightbulbs 40W Equivalent Soft White Clear Multipurpose A15 Dimmable LED with Warm Glow Light Effect Light Bulb 458760",
  "Philips Lightbulbs 60W Equivalent Soft White Clear G25 Dimmable LED with Warm Glow Light Effect Light Bulb 459339",
  "Philips Lightbulbs 75W Equivalent Soft White (2700K) A21 Dimmable LED Light Bulb 451898",
  "Philips Lightbulbs 60W Equivalent Soft White Clear A19 Dimmable LED with Warm Glow Light Effect Light Bulb 458828",
  "Philips Lightbulbs 60W Equivalent Soft White F15 Post Light Dimmable LED Light Bulb 458620",
  "Philips Lightbulbs 40W Equivalent Soft White Clear G25 Dimmable LED with Warm Glow Light Effect Light Bulb 458794",
  "Philips Lightbulbs 40W Equivalent Soft White (2700K) B13 Dimmable Blunt Tip Candle LED Light Bulb 435065",
  "Philips Lightbulbs 40W Equivalent Soft White Clear A19 Dimmable LED with Warm Glow Light Effect Light Bulb 458737",
  "Philips Lightbulbs 65W Equivalent Soft White BR40 Dimmable with Warm Glow Light Effect LED Light Bulb (E) 457002",
  "Philips Lightbulbs 40W Equivalent Soft White (2200K - 2700K) A19 Dimmable LED with Warm Glow Light Effect Light Bulb (E) 455741",
  "Philips Lightbulbs 20W Equivalent Bright White (3000K) MR11 LED Flood Light Bulb 454157",
  "75W Equivalent Daylight (5000K) PAR30L Dimmable LED Flood Light Bulb",
  "Philips Lightbulbs 50W Equivalent Soft White R20 Dimmable with Warm Glow Light Effect LED Light Bulb (E) 456995",
  "Philips Lightbulbs 60W Equivalent Soft White B12 Dimmable Blunt Tip Candle with Warm Glow Light Effect LED Light Bulb 458687",
  "Philips Lightbulbs SlimStyle 65W Equivalent Daylight (5000K) BR30 Dimmable LED Flood Light Bulb 452482",
  "Philips Lightbulbs 40W Equivalent Soft White B12 Dimmable Blunt Tip Candle with Warm Glow Light Effect LED Light Bulb (E) 457119",
  "00046677458652",
  "00046677457181",
  "Philips Lightbulbs 25W Equivalent Soft White B12 Dimmable Blunt Tip Candle with Warm Glow Light Effect LED Light Bulb (E) 457226",
  "Philips Lightbulbs 65W Equivalent Soft White 5/6 in. Retrofit Trim Recessed Downlight Dimmable LED Flood Light Bulb (E)* 800038",
  "Philips Lightbulbs 60W Equivalent Soft White (2700K) F15 Post Light Dimmable LED Light Bulb 435081",
  "00046677454463",
  "00046677179380",
  "Philips Lightbulbs 25W Equivalent Soft White (2700K) B13 Dimmable LED Blunt Tip Candle Light Bulb 435040",
  "Philips Lightbulbs 40W Equivalent Soft White (2700K) A15 Fan Dimmable LED Light Bulb 435073",
  "Philips Lightbulbs 60W Equivalent Soft White Spiral Dusk-Till-Dawn CFL Light Bulb (E*) 405852",
  "Philips Lightbulbs 60W Equivalent Daylight (6500K) T2 Spiral CFL Light Bulb (E*) (4-Pack) 434399",
  "Philips Electric Shavers 100W Equivalent Daylight Deluxe T2 Twister CFL Light Bulb (4-Pack) (E*) 433557",
  "Philips Lightbulbs 100W Equivalent Soft White (2700K) T2 Spiral CFL Light Bulb (E*) 434738",
  "00762148265610",
  "EcoSmart Lightbulbs 65W Equivalent Soft White BR30 CFL Light Bulb (6-Pack) ESBR30146",
  "EcoSmart Lightbulbs 150W Equivalent Soft White (2700K) Spiral 3-Way CFL Light Bulb ESB9032",
  "EcoSmart Lightbulbs 60W Equivalent Bright White Spiral CFL Light Bulb (4-Pack) ESBM814435K",
  "EcoSmart Lightbulbs 90W Equivalent Day Light (5000K) PAR38 LED Flood Light Bulb ECS 38 90WE CW FL 120 FS1 BL",
  "EcoSmart Lightbulbs 65W Equivalent Soft White (2700K) Dimmable LED Indirect Recessed Downlight Bulb ECS RFK6 65WE W27 120 REC",
  "00887437021897",
  "EcoSmart Lightbulbs 60W Equivalent Soft White A19 Energy Star + Dimmable LED Light Bulb (4-Pack) A810SS-Q1D-01",
  "EcoSmart Lightbulbs 60W Equivalent Daylight A19 Energy Star + Dimmable LED Light Bulb (4-Pack) A810SS-Q1D-04",
  "EcoSmart Lightbulbs 50W Equivalent Bright White (3000K) PAR20 LED Flood Light Bulb ECS 20 50WE WW FL 120 TP",
  "EcoSmart Lightbulbs 120W Equivalent Bright White (3000K) PAR38 LED Flood Light Bulb (E)* ECS 38 120WE WW FL 120 TP",
  "EcoSmart Lightbulbs 75W Equivalent Bright White (3000K) PAR30 LED Flood Light Bulb (E)* ECS 30 75WE WW FL 120 TP",
  "EcoSmart Lightbulbs 90W Equivalent Day Light (5000K) PAR38 LED Flood Light Bulb ECS 38 90WE CW FL 120 FS1 BL",
  "75W Equivalent BR30 Daylight LED Light Bulb",
  "65W Equivalent BR30 Soft White LED Light Bulb (3-Pack)",
  "65W Equivalent Daylight BR30 LED Light Bulb (3-Pack)",
  "EcoSmart Lightbulbs 90W Equivalent Soft White (3000K) PAR38 LED Flood Light Bulb ECS 38 90WE WW FL 120 FS1 BL",
  "75W Equivalent BR40 Daylight LED Light Bulb",
  "EcoSmart Lightbulbs 40W Equivalent Soft White A19 Energy Star + Dimmable LED Light Bulb (4-Pack) A460ST-Q1D-0",
  "75W Equivalent BR30 Soft White LED Light Bulb",
  "EcoSmart Lightbulbs 35W Equivalent Soft White (3000K) MR16 GU10 LED Flood Light Bulb ECS 16 35WE WW FL GU10 120 FS1 BL",
  "65W Equivalent BR30 Bright White LED Light Bulb",
  "50W Equivalent R20 Daylight LED Light Bulb",
  "00887437027981",
  "GE Lightbulbs 60W Equivalent Soft White General Purpose LED Bright Stik light bulb (3-Pack) LED10S3/96",
  "GE Reveal Lightbulbs 60W Equivalent Reveal (2700K) A19 Dimmable LED Light Bulb LED10DA19RVLESTP",
  "00043168835725",
  "GE Reveal Lightbulbs 65W Equivalent Reveal (2700K) BR30 Dimmable LED Flood Light Bulb LED12DR303RVLES",
  "GE Lightbulbs 60W Equivalent Soft White (2700K) General Purpose LED Light Bulb (8-Pack) LED10LS8/32",
  "00043168219075",
  "00046677459031",
  "00046677458089",
  "Philips Lightbulbs SlimStyle 65W Equivalent Soft White A19 Dimmable LED with CRI 90 Light Bulb 455493",
  "Philips Lightbulbs SlimStyle 65W Equivalent Soft White (2700K) BR30 Dimmable LED with CRI 90 Light Bulb 455485",
  "Feit Electric Lightbulbs 65W Equivalent Soft White (2700K) BR30 Dimmable Enhance LED Light Bulb BR30/927/LED/36",
  "Feit Electric Lightbulbs 65W Equivalent Soft White BR30 Dimmable Enhance LED Light Bulb (6-Pack) BR30DM65/LED/MP/6/24",
  "Commercial Electric Ceiling Mounted Lighting Brushed Nickel LED Energy Star Flushmount HUI8011L-2/BN",
  "00046335979390",
  "Commercial Electric Recessed Lighting 6 in. White LED Recessed Gimbal Trim CER6742AWH30",
  "Commercial Electric Ceiling Mounted Lighting Brushed Nickel LED Mushroom Flushmount IPF3011L/BN",
  "00080083580071",
          ]

=begin

FileUtils.mkdir ("/Users/David/dropbox/JDP_Trading/#{t}")

stores.each do |store|
  output = []
  browser = Watir::Browser.new
  browser.goto "https://www.google.com/search?lsf=seller:8740,store:2221886705553283364&tbm=shop&q=Philips+Lightbulbs+SlimStyle+40W+Equivalent+Soft+White&sa=X&ved=0ahUKEwi5r8H664LKAhVQxWMKHZE5CeAQljAIEQ&biw=772&bih=724"
  change_store = browser.link :text => 'Change store'
  if change_store.exists?
    change_store.click
  else
    sleep 45
    browser.close
    puts "error with clicking change store link"
    next
  end
  store_text = browser.text_field :class => '_pWb jfk-textinput'
  if store_text.exists?
    store_text.set "#{store}"
  else
    browser.close
    puts "error with changing #{store}"
    next
  end
  find_stores = browser.input(:class => 'jfk-button jfk-button-standard')
  if find_stores.exists?
    find_stores.click
  else
    browser.close
    puts "error with clicking #{store}"
    next
  end
  sleep 3
  click_stores = browser.link(:class => '_Muc jfk-button jfk-button-standard')
  if click_stores.exists?
    click_stores.click
  else
    browser.close
    puts "error with clicking #{store}"
    next
  end
  q = "#{browser.html}"
  unless q.downcase.include?("#{store.downcase}")
    puts "#{store} name does not match search on Google"
  end
  z = "#{browser.url}"
  y = "#{z.to_s.gsub("https://www.google.com/search?lsf=seller:8740,store:2221886705553283364&tbm=shop&q=Philips+Lightbulbs+SlimStyle+40W+Equivalent+Soft+White&sa=X&ved=0ahUKEwi5r8H664LKAhVQxWMKHZE5CeAQljAIEQ&biw=772&bih=724#lsf=seller:8740,store:","'").gsub('&tbm=shop&q=Philips+Lightbulbs+SlimStyle+40W+Equivalent+Soft+White',"',")}"
  File.open("/Users/David/dropbox/JDP_Trading/#{t}/#{store}.csv", "wb") { |file| file.write("#{y}") }
  browser.close
end
=end

FileUtils.mkdir ("/Users/David/dropbox/JDP_Trading/#{t}")

i = 0

products.each do |product|
  output = []
  browser = Watir::Browser.new
  browser.goto "https://www.google.com/search?lsf=seller:8740,store:2221886705553283364&tbm=shop&q=Philips+Lightbulbs+SlimStyle+40W+Equivalent+Soft+White&sa=X&ved=0ahUKEwi5r8H664LKAhVQxWMKHZE5CeAQljAIEQ&biw=772&bih=724"
  product_text = browser.text_field :class => '_fGf'
  if product_text.exists?
    product_text.set "#{product}"
  else
    sleep 45
    browser.refresh
    product_text.set "#{product}"
  end
  product_btn = browser.button :id => '_dGf'
  if product_btn.exists?
    product_btn.click
  else
    sleep 5
    product_btn.click
  end
  item_html = "#{browser.html}"
  nokogiri_object = Nokogiri::HTML(item_html)
  p_id = nokogiri_object.xpath("//h3[@class='r']/descendant::a[@class='pstl']").first
  w = "#{p_id.to_s}"
  unless w.downcase.include?("#{product.downcase}")
    puts "#{product} name does not match search on Google"
  end
  w_2 = w.gsub("<a href=\"/shopping/product/","'").gsub(/[?].*/,"',")
  File.open("/Users/David/dropbox/JDP_Trading/#{t}/#{i}.csv", "wb") { |file| file.write("#{w_2}") }
  browser.close
  i += 1
end


text:
\documentclass[a4paper,11pt]{article}
\usepackage{graphicx}

\begin{document}

\begin{flushright}

\vspace{1.1cm}

%Put ISR Title
{\bf\Huge Problem Set 3}

\rule{0.25\linewidth}{0.5pt}

\vspace{0.5cm}
%Put Authors
Justin Ely
\linebreak
\newline
%Put Author's affiliations
\footnotesize{AST615 University of Maryland College Park, MD\\}
\vspace{0.5cm}
% Date here below
06 November, 2011
\end{flushright}

\noindent\rule{\linewidth}{1.0pt}
\section*{Problem 1}
\subsection*{a,b,c}
Please see included txt files for the output from the script.  For sections b and c, please refer to Figures 1 and 2 below.  The coordinates for the Lagrange points are given in Table 1 below.

\begin{figure}[h!]
\begin{center}
\includegraphics[scale=.4]{3_1_1_system.pdf}
\caption{Plot showing the system for M1=3,M2=1,separation=1.  Contours show effective potential and vectors show effective acceleration.  Note that large acceleration vectors have been suppressed so as not to crowd plot.  As such, vectors close around the masses will appear as zero.  For higher resolution, please open the included pdf.}
\end{center}
\end{figure}

\begin{figure}[h!]
\begin{center}
\includegraphics[scale=.4]{100_1_1_system.pdf}
\caption{Plot showing the system for M1=100,M2=1,separation=1.  Contours show effective potential and vectors show effective acceleration.  Note that large acceleration vectors have been suppressed so as not to crowd plot.  As such, vectors close around the masses will appear as zero.  For higher resolution, please open the included pdf.}
\end{center}
\end{figure}

\begin{table}[h!]
\begin{center}
\begin{tabular}{|c||c|c|c|c|c|}
\hline
 (3,1,1)&L1&L2&L3&L4&L5\\
\hline
 Plotted& (40.5,50)& (76.5,50) & (18.5,50) & (43,70.5) & (43,28.5)\\
 Computed& (-.38,0)& (1.06,0) & (-1.26,0) & (-.28,.82) & (-.28,-.86)\\
\hline
\hline
 (100,1,1)&L1&L2&L3&L4&L5\\
\hline
 Plotted& (28.5,50)& (74.5,50) & (21.5,50) & (37,70.5) & (37,28.5)\\
 Computed& (-.86,0)& (.98,0) & (-1.14,0) & (-.52,.82) & (-.52,-.86)\\
\hline
\end{tabular}
\end{center}
\caption{Plotted and computed coordinates of the Lagrange points for the two systems.  Plotted coordinates give the (x,y) coordinates of the point in the coordinate grid of the figures.  Computed coordinates give the (x,y) coordinates of the point in the G==1 coordinate system.}
\end{table}

\section*{Problem 2}
\section*{a}
After fitting the data in the file, I find $\alpha_{L}=7.69$ and $\nu_{0}=48.28$ for the Lorentzian profile and $\alpha_{D}=12.15$ and $\nu_{0}=47.667$ for the Gaussian profile.  The error estimate for the Lorentzian fit was $9.83x10^{-4}$ and for the Gaussian fit was $-8.74x10^{-6}$.  We can see from both the smaller error estimate and the profiles plotted below in Figure 3, the Gaussian profile is the much better fit to the data.
\section*{b}
\begin{figure}[!h]
\begin{center}
\includegraphics[scale=.7]{fit.pdf}
\caption{Gaussian and Lorentzian fit to ps3.dat.}
\end{center}
\end{figure}

\end{document}


text:
<?php

abstract class Ess_M2ePro_Model_Amazon_Listing_Product_Action_Type_Validator
{
    /**
     * @var array
     */
    protected $_params = array();

    /**
     * @var Ess_M2ePro_Model_Listing_Product
     */
    protected $_listingProduct = null;

    /** @var Ess_M2ePro_Model_Amazon_Listing_Product_Action_Configurator $_configurator */
    protected $_configurator = null;

    /**
     * @var array
     */
    protected $_messages = array();

    /**
     * @var array
     */
    protected $_data = array();

    //########################################

    /**
     * @param array $params
     */
    public function setParams(array $params)
    {
        $this->_params = $params;
    }

    /**
     * @return array
     */
    protected function getParams()
    {
        return $this->_params;
    }

    // ---------------------------------------

    /**
     * @param Ess_M2ePro_Model_Listing_Product $listingProduct
     */
    public function setListingProduct(Ess_M2ePro_Model_Listing_Product $listingProduct)
    {
        $this->_listingProduct = $listingProduct;
    }

    /**
     * @return Ess_M2ePro_Model_Listing_Product
     */
    protected function getListingProduct()
    {
        return $this->_listingProduct;
    }

    // ---------------------------------------

    /**
     * @param Ess_M2ePro_Model_Amazon_Listing_Product_Action_Configurator $configurator
     * @return $this
     */
    public function setConfigurator(Ess_M2ePro_Model_Amazon_Listing_Product_Action_Configurator $configurator)
    {
        $this->_configurator = $configurator;
        return $this;
    }

    /**
     * @return Ess_M2ePro_Model_Amazon_Listing_Product_Action_Configurator
     */
    protected function getConfigurator()
    {
        return $this->_configurator;
    }

    //########################################

    /**
     * @return Ess_M2ePro_Model_Marketplace
     */
    protected function getMarketplace()
    {
        $this->getAmazonAccount()->getMarketplace();
    }

    /**
     * @return Ess_M2ePro_Model_Amazon_Marketplace
     */
    protected function getAmazonMarketplace()
    {
        return $this->getMarketplace()->getChildObject();
    }

    // ---------------------------------------

    /**
     * @return Ess_M2ePro_Model_Account
     */
    protected function getAccount()
    {
        return $this->getListing()->getAccount();
    }

    /**
     * @return Ess_M2ePro_Model_Amazon_Account
     */
    protected function getAmazonAccount()
    {
        return $this->getAccount()->getChildObject();
    }

    // ---------------------------------------

    /**
     * @return Ess_M2ePro_Model_Listing
     */
    protected function getListing()
    {
        return $this->getListingProduct()->getListing();
    }

    /**
     * @return Ess_M2ePro_Model_Amazon_Listing
     */
    protected function getAmazonListing()
    {
        return $this->getListing()->getChildObject();
    }

    // ---------------------------------------

    /**
     * @return Ess_M2ePro_Model_Amazon_Listing_Product
     */
    protected function getAmazonListingProduct()
    {
        return $this->getListingProduct()->getChildObject();
    }

    /**
     * @return Ess_M2ePro_Model_Magento_Product
     */
    protected function getMagentoProduct()
    {
        return $this->getListingProduct()->getMagentoProduct();
    }

    // ---------------------------------------

    /**
     * @return Ess_M2ePro_Model_Amazon_Listing_Product_Variation_Manager
     */
    protected function getVariationManager()
    {
        return $this->getAmazonListingProduct()->getVariationManager();
    }

    //########################################

    abstract public function validate();

    protected function addMessage($message, $type = Ess_M2ePro_Model_Connector_Connection_Response_Message::TYPE_ERROR)
    {
        $this->_messages[] = array(
            'text' => $message,
            'type' => $type,
        );
    }

    // ---------------------------------------

    /**
     * @return array
     */
    public function getMessages()
    {
        return $this->_messages;
    }

    // ---------------------------------------

    /**
     * @param $key
     * @return array
     */
    public function getData($key = null)
    {
        if ($key === null) {
            return $this->_data;
        }

        return isset($this->_data[$key]) ? $this->_data[$key] : null;
    }

    /**
     * @param $data
     * @return $this
     */
    public function setData($data)
    {
        $this->_data = $data;
        return $this;
    }

    //########################################

    protected function validateSku()
    {
        if (!$this->getAmazonListingProduct()->getSku()) {
            // M2ePro_TRANSLATIONS
            // You have to list Item first.
            $this->addMessage('You have to list Item first.');

            return false;
        }

        return true;
    }

    // ---------------------------------------

    protected function validateBlocked()
    {
        if ($this->getListingProduct()->isBlocked()) {
// M2ePro_TRANSLATIONS
// The Action can not be executed as the Item was Closed, Incomplete or Blocked on Amazon.
// Please, go to Amazon Seller Central and activate the Item.
// After the next Synchronization the Item will be available.
            $this->addMessage(
                'The Action can not be executed as the Item was Closed, Incomplete or Blocked on Amazon.
                 Please, go to Amazon Seller Central and activate the Item.
                 After the next Synchronization the Item will be available.'
            );

            return false;
        }

        return true;
    }

    // ---------------------------------------

    protected function validateQty()
    {
        if (!$this->getConfigurator()->isQtyAllowed()) {
            return true;
        }

        $qty = $this->getQty();
        if ($qty <= 0) {
            if (isset($this->_params['status_changer']) &&
                $this->_params['status_changer'] == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_USER) {
                // M2ePro_TRANSLATIONS
                // 'You are submitting an Item with zero quantity. It contradicts Amazon requirements.
                // Please apply the Stop Action instead.'
                $message = 'You are submitting an Item with zero quantity. It contradicts Amazon requirements.';

                if ($this->getListingProduct()->isStoppable()) {
                    $message .= ' Please apply the Stop Action instead.';
                }

                $this->addMessage($message);
            } else {
                // M2ePro_TRANSLATIONS
                // 'Cannot submit an Item with zero quantity. It contradicts Amazon requirements.
                // This action has been generated automatically based on your Synchronization Rule settings.
                // The error occurs when the Stop Rules are not properly configured or disabled.
                // Please review your settings.'
                $message = 'Cannot submit an Item with zero quantity. It contradicts Amazon requirements.
                            This action has been generated automatically based on your Synchronization Rule settings. ';

                if ($this->getListingProduct()->isStoppable()) {
                    $message .= 'The error occurs when the Stop Rules are not properly configured or disabled. ';
                }

                $message .= 'Please review your settings.';

                $this->addMessage($message);
            }

            return false;
        }

        $this->_data['qty'] = $qty;

        return true;
    }

    protected function validateRegularPrice()
    {
        if (!$this->getConfigurator()->isRegularPriceAllowed()) {
            return true;
        }

        if (!$this->getAmazonListingProduct()->isAllowedForRegularCustomers()) {
            $this->getConfigurator()->disallowRegularPrice();

            if ($this->getAmazonListingProduct()->getOnlineRegularPrice()) {
                $this->addMessage(
                    'B2C Price can not be disabled by Revise/Relist action due to Amazon restrictions.
                    Both B2C and B2B Price values will be available on the Channel.',
                    Ess_M2ePro_Model_Connector_Connection_Response_Message::TYPE_WARNING
                );
            }

            return true;
        }

        if (Mage::helper('M2ePro/Component_Amazon_Repricing')->isEnabled() &&
            $this->getAmazonListingProduct()->isRepricingManaged()
        ) {
            $this->getConfigurator()->disallowRegularPrice();

            $this->addMessage(
                'This product is used by Amazon Repricing Tool.
                 The Price cannot be updated through the M2E Pro.',
                Ess_M2ePro_Model_Connector_Connection_Response_Message::TYPE_WARNING
            );

            return true;
        }

        $regularPrice = $this->getRegularPrice();
        if ($regularPrice <= 0) {
            // M2ePro_TRANSLATIONS
            // The Price must be greater than 0. Please, check the Selling Policy and Product Settings.
            $this->addMessage(
                'The Price must be greater than 0. Please, check the Selling Policy and Product Settings.'
            );

            return false;
        }

        $this->_data['regular_price'] = $regularPrice;

        return true;
    }

    protected function validateBusinessPrice()
    {
        if (!$this->getConfigurator()->isBusinessPriceAllowed()) {
            return true;
        }

        if (!$this->getAmazonListingProduct()->isAllowedForBusinessCustomers()) {
            $this->getConfigurator()->disallowBusinessPrice();

            if ($this->getAmazonListingProduct()->getOnlineBusinessPrice()) {
                $this->addMessage(
                    'B2B Price can not be disabled by Revise/Relist action due to Amazon restrictions.
                    Both B2B and B2C Price values will be available on the Channel.',
                    Ess_M2ePro_Model_Connector_Connection_Response_Message::TYPE_WARNING
                );
            }

            return true;
        }

        $businessPrice = $this->getBusinessPrice();
        if ($businessPrice <= 0) {
            // M2ePro_TRANSLATIONS
            // The Business Price must be greater than 0. Please, check the Selling Policy and Product Settings.
            $this->addMessage(
                'The Business Price must be greater than 0. Please, check the Selling Policy and Product Settings.'
            );

            return false;
        }

        $this->_data['business_price'] = $businessPrice;

        return true;
    }

    // ---------------------------------------

    protected function validateLogicalUnit()
    {
        if (!$this->getVariationManager()->isLogicalUnit()) {
            // M2ePro_TRANSLATIONS
            // Only logical Products can be processed.
            $this->addMessage('Only logical Products can be processed.');

            return false;
        }

        return true;
    }

    // ---------------------------------------

    protected function validateParentListingProductFlags()
    {
        if ($this->getListingProduct()->getData('no_child_for_processing')) {
// M2ePro_TRANSLATIONS
// This Parent has no Child Products on which the chosen Action can be performed.
            $this->addMessage('This Parent has no Child Products on which the chosen Action can be performed.');
            return false;
        }

// M2ePro_TRANSLATIONS
// This Action cannot be fully performed because there are different actions in progress on some Child Products
        if ($this->getListingProduct()->getData('child_locked')) {
            $this->addMessage(
                'This Action cannot be fully performed because there are
                                different Actions in progress on some Child Products'
            );
            return false;
        }

        return true;
    }

    // ---------------------------------------

    protected function validatePhysicalUnitAndSimple()
    {
        if (!$this->getVariationManager()->isPhysicalUnit() && !$this->getVariationManager()->isSimpleType()) {
            // M2ePro_TRANSLATIONS
            // Only physical Products can be processed.
            $this->addMessage('Only physical Products can be processed.');

            return false;
        }

        return true;
    }

    protected function validatePhysicalUnitMatching()
    {
        if (!$this->getVariationManager()->getTypeModel()->isVariationProductMatched()) {
            // M2ePro_TRANSLATIONS
            // You have to select Magento Variation.
            $this->addMessage('You have to select Magento Variation.');

            return false;
        }

        if ($this->getVariationManager()->isIndividualType()) {
            return true;
        }

        /** @var Ess_M2ePro_Model_Amazon_Listing_Product_Variation_Manager_Type_Relation_Child $typeModel */
        $typeModel = $this->getVariationManager()->getTypeModel();

        if (!$this->getAmazonListingProduct()->isGeneralIdOwner() && !$typeModel->isVariationChannelMatched()) {
            // M2ePro_TRANSLATIONS
            // You have to select Channel Variation.
            $this->addMessage('You have to select Channel Variation.');

            return false;
        }

        return true;
    }

    //########################################

    protected function getRegularPrice()
    {
        if (isset($this->_data['regular_price'])) {
            return $this->_data['regular_price'];
        }

        return $this->getAmazonListingProduct()->getRegularPrice();
    }

    protected function getBusinessPrice()
    {
        if (isset($this->_data['business_price'])) {
            return $this->_data['business_price'];
        }

        return $this->getAmazonListingProduct()->getBusinessPrice();
    }

    protected function getQty()
    {
        if (isset($this->_data['qty'])) {
            return $this->_data['qty'];
        }

        return $this->getAmazonListingProduct()->getQty();
    }

    //########################################
}


text:
package waffle.windows.auth;

/**
 * Implements Windows authentication functions.
 *
 * @author dblock[at]dblock[dot]org
 */
public interface IWindowsAuthProvider {

    /**
     * The LogonUser function attempts to log a user on to the local computer using a network logon type and the default
     * authentication provider.
     *
     * @param username
     *            A string that specifies the name of the user in the UPN format.
     * @param password
     *            A string that specifies the plaintext password for the user account specified by username.
     *
     * @return Windows identity.
     */
    IWindowsIdentity logonUser(final String username, final String password);

    /**
     * The LogonDomainUser function attempts to log a user on to the local computer using a network logon type and the
     * default authentication provider.
     *
     * @param username
     *            A string that specifies the name of the user. This is the name of the user account to log on to. If
     *            you use the user principal name (UPN) format, user@DNS_domain_name, the domain parameter must be NULL.
     * @param domain
     *            A string that specifies the name of the domain or server whose account database contains the username
     *            account. If this parameter is NULL, the user name must be specified in UPN format. If this parameter
     *            is ".", the function validates the account by using only the local account database.
     * @param password
     *            A string that specifies the plaintext password for the user account specified by username.
     *
     * @return Windows identity.
     */
    IWindowsIdentity logonDomainUser(final String username, final String domain, final String password);

    /**
     * The LogonDomainUserEx function attempts to log a user on to the local computer. The local computer is the
     * computer from which LogonUser was called. You cannot use LogonUser to log on to a remote computer. You specify
     * the user with a user name and domain and authenticate the user with a plaintext password.
     *
     * @param username
     *            A string that specifies the name of the user. This is the name of the user account to log on to. If
     *            you use the user principal name (UPN) format, user@DNS_domain_name, the domain parameter must be NULL.
     * @param domain
     *            A string that specifies the name of the domain or server whose account database contains the username
     *            account. If this parameter is NULL, the user name must be specified in UPN format. If this parameter
     *            is ".", the function validates the account by using only the local account database.
     * @param password
     *            A string that specifies the plaintext password for the user account specified by username.
     * @param logonType
     *            The type of logon operation to perform.
     * @param logonProvider
     *            Specifies the logon provider.
     *
     * @return Windows identity.
     */
    IWindowsIdentity logonDomainUserEx(final String username, final String domain, final String password,
            final int logonType, final int logonProvider);

    /**
     * Retrieve a security identifier (SID) for the account and the name of the domain or local computer on which the
     * account was found.
     *
     * @param username
     *            Fully qualified or partial username.
     *
     * @return Windows account.
     */
    IWindowsAccount lookupAccount(final String username);

    /**
     * Retrieve the current computer information.
     *
     * @return Current computer information.
     */
    IWindowsComputer getCurrentComputer();

    /**
     * Retrieve a list of domains (Active Directory) on the local server.
     *
     * @return A list of domains.
     */
    IWindowsDomain[] getDomains();

    /**
     * Attempts to validate the user using an SSPI token. This token is generated by the client via the
     * InitializeSecurityContext(package) method described in
     * https://msdn.microsoft.com/en-us/library/aa375509(VS.85).aspx
     *
     * @param connectionId
     *            A unique connection id.
     * @param token
     *            The security token generated by the client wishing to logon.
     * @param securityPackage
     *            The name of the security package to use. Can be any security package supported by both the client and
     *            the server. This is usually set to "Negotiate" which will use SPNEGO to determine which security
     *            package to use. Other common values are "Kerberos" and "NTLM".
     *
     * @return Windows account.
     */
    IWindowsSecurityContext acceptSecurityToken(final String connectionId, final byte[] token,
            final String securityPackage);

    /**
     * Reset a previously saved continuation security token for a given connection id.
     *
     * @param connectionId
     *            Connection id.
     */
    void resetSecurityToken(final String connectionId);
}


text:
import { nodeResolve } from '@rollup/plugin-node-resolve'
import babel from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
import path from 'path'

export default {
  output: {
    dir: path.join('dist', 'web-workers', 'min-bundles'),
    format: 'iife'
  },
  context: 'self',
  plugins: [
    nodeResolve({ preferBuiltins: false, browser: true }),
    commonjs({ transformMixedEsModules: true }),
    babel({
      extensions: ['.js'],
      exclude: 'node_modules/**',
      babelHelpers: 'runtime',
    }),
    terser(),
  ]
}