text:
"""
    Talon.One API

    Use the Talon.One API to integrate with your application and to manage applications and campaigns:  - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns.  ## Determining the base URL of the endpoints  The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}`   # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""

from __future__ import absolute_import

__version__ = "3.4.1"

# import apis into sdk package
from talon_one.api.integration_api import IntegrationApi
from talon_one.api.management_api import ManagementApi

# import ApiClient
from talon_one.api_client import ApiClient
from talon_one.configuration import Configuration
from talon_one.exceptions import OpenApiException
from talon_one.exceptions import ApiTypeError
from talon_one.exceptions import ApiValueError
from talon_one.exceptions import ApiKeyError
from talon_one.exceptions import ApiException
# import models into sdk package
from talon_one.models.api_error import APIError
from talon_one.models.accept_coupon_effect_props import AcceptCouponEffectProps
from talon_one.models.accept_referral_effect_props import AcceptReferralEffectProps
from talon_one.models.access_log_entry import AccessLogEntry
from talon_one.models.account import Account
from talon_one.models.account_additional_cost import AccountAdditionalCost
from talon_one.models.account_analytics import AccountAnalytics
from talon_one.models.account_entity import AccountEntity
from talon_one.models.account_limits import AccountLimits
from talon_one.models.add_free_item_effect_props import AddFreeItemEffectProps
from talon_one.models.add_item_catalog_action import AddItemCatalogAction
from talon_one.models.add_loyalty_points_effect_props import AddLoyaltyPointsEffectProps
from talon_one.models.additional_cost import AdditionalCost
from talon_one.models.application import Application
from talon_one.models.application_api_key import ApplicationAPIKey
from talon_one.models.application_api_health import ApplicationApiHealth
from talon_one.models.application_campaign_stats import ApplicationCampaignStats
from talon_one.models.application_customer import ApplicationCustomer
from talon_one.models.application_customer_entity import ApplicationCustomerEntity
from talon_one.models.application_entity import ApplicationEntity
from talon_one.models.application_event import ApplicationEvent
from talon_one.models.application_notification import ApplicationNotification
from talon_one.models.application_referee import ApplicationReferee
from talon_one.models.application_session import ApplicationSession
from talon_one.models.application_session_entity import ApplicationSessionEntity
from talon_one.models.async_coupon_creation_response import AsyncCouponCreationResponse
from talon_one.models.attribute import Attribute
from talon_one.models.attributes_mandatory import AttributesMandatory
from talon_one.models.attributes_settings import AttributesSettings
from talon_one.models.audience import Audience
from talon_one.models.audience_analytics import AudienceAnalytics
from talon_one.models.audience_integration_id import AudienceIntegrationID
from talon_one.models.audience_membership import AudienceMembership
from talon_one.models.award_giveaway_effect_props import AwardGiveawayEffectProps
from talon_one.models.base_loyalty_program import BaseLoyaltyProgram
from talon_one.models.base_saml_connection import BaseSamlConnection
from talon_one.models.binding import Binding
from talon_one.models.bulk_application_notification import BulkApplicationNotification
from talon_one.models.bulk_campaign_notification import BulkCampaignNotification
from talon_one.models.campaign import Campaign
from talon_one.models.campaign_activation_request import CampaignActivationRequest
from talon_one.models.campaign_analytics import CampaignAnalytics
from talon_one.models.campaign_collection import CampaignCollection
from talon_one.models.campaign_collection_without_payload import CampaignCollectionWithoutPayload
from talon_one.models.campaign_copy import CampaignCopy
from talon_one.models.campaign_created_notification import CampaignCreatedNotification
from talon_one.models.campaign_deleted_notification import CampaignDeletedNotification
from talon_one.models.campaign_edited_notification import CampaignEditedNotification
from talon_one.models.campaign_entity import CampaignEntity
from talon_one.models.campaign_group import CampaignGroup
from talon_one.models.campaign_group_entity import CampaignGroupEntity
from talon_one.models.campaign_notification import CampaignNotification
from talon_one.models.campaign_priorities_changed_notification import CampaignPrioritiesChangedNotification
from talon_one.models.campaign_priorities_v2 import CampaignPrioritiesV2
from talon_one.models.campaign_ruleset_changed_notification import CampaignRulesetChangedNotification
from talon_one.models.campaign_search import CampaignSearch
from talon_one.models.campaign_set import CampaignSet
from talon_one.models.campaign_set_branch_node import CampaignSetBranchNode
from talon_one.models.campaign_set_i_ds import CampaignSetIDs
from talon_one.models.campaign_set_leaf_node import CampaignSetLeafNode
from talon_one.models.campaign_set_node import CampaignSetNode
from talon_one.models.campaign_set_v2 import CampaignSetV2
from talon_one.models.campaign_state_changed_notification import CampaignStateChangedNotification
from talon_one.models.campaign_template import CampaignTemplate
from talon_one.models.campaign_template_collection import CampaignTemplateCollection
from talon_one.models.campaign_template_params import CampaignTemplateParams
from talon_one.models.card_ledger_transaction_log_entry import CardLedgerTransactionLogEntry
from talon_one.models.card_ledger_transaction_log_entry_integration_api import CardLedgerTransactionLogEntryIntegrationAPI
from talon_one.models.cart_item import CartItem
from talon_one.models.catalog import Catalog
from talon_one.models.catalog_action import CatalogAction
from talon_one.models.catalog_action_filter import CatalogActionFilter
from talon_one.models.catalog_item import CatalogItem
from talon_one.models.catalog_sync_request import CatalogSyncRequest
from talon_one.models.change import Change
from talon_one.models.change_profile_password import ChangeProfilePassword
from talon_one.models.code_generator_settings import CodeGeneratorSettings
from talon_one.models.collection import Collection
from talon_one.models.collection_item import CollectionItem
from talon_one.models.collection_without_payload import CollectionWithoutPayload
from talon_one.models.coupon import Coupon
from talon_one.models.coupon_constraints import CouponConstraints
from talon_one.models.coupon_created_effect_props import CouponCreatedEffectProps
from talon_one.models.coupon_creation_job import CouponCreationJob
from talon_one.models.coupon_limit_configs import CouponLimitConfigs
from talon_one.models.coupon_rejection_reason import CouponRejectionReason
from talon_one.models.coupon_reservations import CouponReservations
from talon_one.models.coupon_search import CouponSearch
from talon_one.models.coupon_value import CouponValue
from talon_one.models.create_application_api_key import CreateApplicationAPIKey
from talon_one.models.create_management_key import CreateManagementKey
from talon_one.models.create_template_campaign import CreateTemplateCampaign
from talon_one.models.create_template_campaign_response import CreateTemplateCampaignResponse
from talon_one.models.custom_effect import CustomEffect
from talon_one.models.custom_effect_props import CustomEffectProps
from talon_one.models.customer_activity_report import CustomerActivityReport
from talon_one.models.customer_analytics import CustomerAnalytics
from talon_one.models.customer_inventory import CustomerInventory
from talon_one.models.customer_profile import CustomerProfile
from talon_one.models.customer_profile_audience_request import CustomerProfileAudienceRequest
from talon_one.models.customer_profile_audience_request_item import CustomerProfileAudienceRequestItem
from talon_one.models.customer_profile_integration_request_v2 import CustomerProfileIntegrationRequestV2
from talon_one.models.customer_profile_search_query import CustomerProfileSearchQuery
from talon_one.models.customer_session import CustomerSession
from talon_one.models.customer_session_v2 import CustomerSessionV2
from talon_one.models.deduct_loyalty_points_effect_props import DeductLoyaltyPointsEffectProps
from talon_one.models.effect import Effect
from talon_one.models.effect_entity import EffectEntity
from talon_one.models.email_entity import EmailEntity
from talon_one.models.endpoint import Endpoint
from talon_one.models.entity import Entity
from talon_one.models.entity_with_talang_visible_id import EntityWithTalangVisibleID
from talon_one.models.environment import Environment
from talon_one.models.error_effect_props import ErrorEffectProps
from talon_one.models.error_response import ErrorResponse
from talon_one.models.error_response_with_status import ErrorResponseWithStatus
from talon_one.models.error_source import ErrorSource
from talon_one.models.event import Event
from talon_one.models.event_type import EventType
from talon_one.models.event_v2 import EventV2
from talon_one.models.export import Export
from talon_one.models.feature_flag import FeatureFlag
from talon_one.models.features_feed import FeaturesFeed
from talon_one.models.feed_notification import FeedNotification
from talon_one.models.func_arg_def import FuncArgDef
from talon_one.models.function_def import FunctionDef
from talon_one.models.giveaway import Giveaway
from talon_one.models.giveaways_pool import GiveawaysPool
from talon_one.models.import_entity import ImportEntity
from talon_one.models.inline_response200 import InlineResponse200
from talon_one.models.inline_response2001 import InlineResponse2001
from talon_one.models.inline_response20010 import InlineResponse20010
from talon_one.models.inline_response20011 import InlineResponse20011
from talon_one.models.inline_response20012 import InlineResponse20012
from talon_one.models.inline_response20013 import InlineResponse20013
from talon_one.models.inline_response20014 import InlineResponse20014
from talon_one.models.inline_response20015 import InlineResponse20015
from talon_one.models.inline_response20016 import InlineResponse20016
from talon_one.models.inline_response20017 import InlineResponse20017
from talon_one.models.inline_response20018 import InlineResponse20018
from talon_one.models.inline_response20019 import InlineResponse20019
from talon_one.models.inline_response2002 import InlineResponse2002
from talon_one.models.inline_response20020 import InlineResponse20020
from talon_one.models.inline_response20021 import InlineResponse20021
from talon_one.models.inline_response20022 import InlineResponse20022
from talon_one.models.inline_response20023 import InlineResponse20023
from talon_one.models.inline_response20024 import InlineResponse20024
from talon_one.models.inline_response20025 import InlineResponse20025
from talon_one.models.inline_response20026 import InlineResponse20026
from talon_one.models.inline_response20027 import InlineResponse20027
from talon_one.models.inline_response20028 import InlineResponse20028
from talon_one.models.inline_response20029 import InlineResponse20029
from talon_one.models.inline_response2003 import InlineResponse2003
from talon_one.models.inline_response20030 import InlineResponse20030
from talon_one.models.inline_response20031 import InlineResponse20031
from talon_one.models.inline_response20032 import InlineResponse20032
from talon_one.models.inline_response20033 import InlineResponse20033
from talon_one.models.inline_response20034 import InlineResponse20034
from talon_one.models.inline_response2004 import InlineResponse2004
from talon_one.models.inline_response2005 import InlineResponse2005
from talon_one.models.inline_response2006 import InlineResponse2006
from talon_one.models.inline_response2007 import InlineResponse2007
from talon_one.models.inline_response2008 import InlineResponse2008
from talon_one.models.inline_response2009 import InlineResponse2009
from talon_one.models.inline_response201 import InlineResponse201
from talon_one.models.integration_customer_session_response import IntegrationCustomerSessionResponse
from talon_one.models.integration_entity import IntegrationEntity
from talon_one.models.integration_event import IntegrationEvent
from talon_one.models.integration_event_v2_request import IntegrationEventV2Request
from talon_one.models.integration_profile_entity import IntegrationProfileEntity
from talon_one.models.integration_request import IntegrationRequest
from talon_one.models.integration_state import IntegrationState
from talon_one.models.integration_state_v2 import IntegrationStateV2
from talon_one.models.inventory_coupon import InventoryCoupon
from talon_one.models.inventory_referral import InventoryReferral
from talon_one.models.item_attribute import ItemAttribute
from talon_one.models.ledger_entry import LedgerEntry
from talon_one.models.ledger_info import LedgerInfo
from talon_one.models.ledger_transaction_log_entry_integration_api import LedgerTransactionLogEntryIntegrationAPI
from talon_one.models.library_attribute import LibraryAttribute
from talon_one.models.limit_config import LimitConfig
from talon_one.models.limit_counter import LimitCounter
from talon_one.models.login_params import LoginParams
from talon_one.models.loyalty import Loyalty
from talon_one.models.loyalty_balance import LoyaltyBalance
from talon_one.models.loyalty_balances import LoyaltyBalances
from talon_one.models.loyalty_card import LoyaltyCard
from talon_one.models.loyalty_card_profile_registration import LoyaltyCardProfileRegistration
from talon_one.models.loyalty_card_registration import LoyaltyCardRegistration
from talon_one.models.loyalty_dashboard_data import LoyaltyDashboardData
from talon_one.models.loyalty_dashboard_points_breakdown import LoyaltyDashboardPointsBreakdown
from talon_one.models.loyalty_ledger import LoyaltyLedger
from talon_one.models.loyalty_ledger_entry import LoyaltyLedgerEntry
from talon_one.models.loyalty_ledger_transactions import LoyaltyLedgerTransactions
from talon_one.models.loyalty_membership import LoyaltyMembership
from talon_one.models.loyalty_points import LoyaltyPoints
from talon_one.models.loyalty_program import LoyaltyProgram
from talon_one.models.loyalty_program_balance import LoyaltyProgramBalance
from talon_one.models.loyalty_program_entity import LoyaltyProgramEntity
from talon_one.models.loyalty_program_ledgers import LoyaltyProgramLedgers
from talon_one.models.loyalty_projection import LoyaltyProjection
from talon_one.models.loyalty_projection_data import LoyaltyProjectionData
from talon_one.models.loyalty_statistics import LoyaltyStatistics
from talon_one.models.loyalty_sub_ledger import LoyaltySubLedger
from talon_one.models.loyalty_tier import LoyaltyTier
from talon_one.models.management_key import ManagementKey
from talon_one.models.manager_config import ManagerConfig
from talon_one.models.meta import Meta
from talon_one.models.model_import import ModelImport
from talon_one.models.model_return import ModelReturn
from talon_one.models.multi_application_entity import MultiApplicationEntity
from talon_one.models.multiple_attribute import MultipleAttribute
from talon_one.models.multiple_audiences import MultipleAudiences
from talon_one.models.multiple_audiences_item import MultipleAudiencesItem
from talon_one.models.multiple_customer_profile_integration_request import MultipleCustomerProfileIntegrationRequest
from talon_one.models.multiple_customer_profile_integration_request_item import MultipleCustomerProfileIntegrationRequestItem
from talon_one.models.multiple_customer_profile_integration_response_v2 import MultipleCustomerProfileIntegrationResponseV2
from talon_one.models.multiple_new_attribute import MultipleNewAttribute
from talon_one.models.multiple_new_audiences import MultipleNewAudiences
from talon_one.models.mutable_entity import MutableEntity
from talon_one.models.new_account import NewAccount
from talon_one.models.new_account_sign_up import NewAccountSignUp
from talon_one.models.new_additional_cost import NewAdditionalCost
from talon_one.models.new_application import NewApplication
from talon_one.models.new_application_api_key import NewApplicationAPIKey
from talon_one.models.new_attribute import NewAttribute
from talon_one.models.new_audience import NewAudience
from talon_one.models.new_campaign import NewCampaign
from talon_one.models.new_campaign_collection import NewCampaignCollection
from talon_one.models.new_campaign_group import NewCampaignGroup
from talon_one.models.new_campaign_set import NewCampaignSet
from talon_one.models.new_campaign_set_v2 import NewCampaignSetV2
from talon_one.models.new_campaign_template import NewCampaignTemplate
from talon_one.models.new_catalog import NewCatalog
from talon_one.models.new_collection import NewCollection
from talon_one.models.new_coupon_creation_job import NewCouponCreationJob
from talon_one.models.new_coupons import NewCoupons
from talon_one.models.new_coupons_for_multiple_recipients import NewCouponsForMultipleRecipients
from talon_one.models.new_custom_effect import NewCustomEffect
from talon_one.models.new_customer_profile import NewCustomerProfile
from talon_one.models.new_customer_session import NewCustomerSession
from talon_one.models.new_customer_session_v2 import NewCustomerSessionV2
from talon_one.models.new_event import NewEvent
from talon_one.models.new_event_type import NewEventType
from talon_one.models.new_giveaways_pool import NewGiveawaysPool
from talon_one.models.new_internal_audience import NewInternalAudience
from talon_one.models.new_invitation import NewInvitation
from talon_one.models.new_invite_email import NewInviteEmail
from talon_one.models.new_loyalty_program import NewLoyaltyProgram
from talon_one.models.new_loyalty_tier import NewLoyaltyTier
from talon_one.models.new_management_key import NewManagementKey
from talon_one.models.new_multiple_audiences_item import NewMultipleAudiencesItem
from talon_one.models.new_notification_webhook import NewNotificationWebhook
from talon_one.models.new_password import NewPassword
from talon_one.models.new_password_email import NewPasswordEmail
from talon_one.models.new_referral import NewReferral
from talon_one.models.new_referrals_for_multiple_advocates import NewReferralsForMultipleAdvocates
from talon_one.models.new_return import NewReturn
from talon_one.models.new_role import NewRole
from talon_one.models.new_ruleset import NewRuleset
from talon_one.models.new_saml_connection import NewSamlConnection
from talon_one.models.new_template_def import NewTemplateDef
from talon_one.models.new_user import NewUser
from talon_one.models.new_webhook import NewWebhook
from talon_one.models.notification import Notification
from talon_one.models.notification_webhook import NotificationWebhook
from talon_one.models.patch_item_catalog_action import PatchItemCatalogAction
from talon_one.models.patch_many_items_catalog_action import PatchManyItemsCatalogAction
from talon_one.models.profile_audiences_changes import ProfileAudiencesChanges
from talon_one.models.redeem_referral_effect_props import RedeemReferralEffectProps
from talon_one.models.referral import Referral
from talon_one.models.referral_constraints import ReferralConstraints
from talon_one.models.referral_created_effect_props import ReferralCreatedEffectProps
from talon_one.models.referral_rejection_reason import ReferralRejectionReason
from talon_one.models.reject_coupon_effect_props import RejectCouponEffectProps
from talon_one.models.reject_referral_effect_props import RejectReferralEffectProps
from talon_one.models.remove_item_catalog_action import RemoveItemCatalogAction
from talon_one.models.remove_many_items_catalog_action import RemoveManyItemsCatalogAction
from talon_one.models.return_integration_request import ReturnIntegrationRequest
from talon_one.models.returned_cart_item import ReturnedCartItem
from talon_one.models.role import Role
from talon_one.models.role_assign import RoleAssign
from talon_one.models.role_membership import RoleMembership
from talon_one.models.rollback_added_loyalty_points_effect_props import RollbackAddedLoyaltyPointsEffectProps
from talon_one.models.rollback_coupon_effect_props import RollbackCouponEffectProps
from talon_one.models.rollback_deducted_loyalty_points_effect_props import RollbackDeductedLoyaltyPointsEffectProps
from talon_one.models.rollback_discount_effect_props import RollbackDiscountEffectProps
from talon_one.models.rollback_referral_effect_props import RollbackReferralEffectProps
from talon_one.models.rule import Rule
from talon_one.models.rule_failure_reason import RuleFailureReason
from talon_one.models.ruleset import Ruleset
from talon_one.models.saml_connection import SamlConnection
from talon_one.models.saml_connection_metadata import SamlConnectionMetadata
from talon_one.models.saml_login_endpoint import SamlLoginEndpoint
from talon_one.models.session import Session
from talon_one.models.set_discount_effect_props import SetDiscountEffectProps
from talon_one.models.set_discount_per_additional_cost_effect_props import SetDiscountPerAdditionalCostEffectProps
from talon_one.models.set_discount_per_additional_cost_per_item_effect_props import SetDiscountPerAdditionalCostPerItemEffectProps
from talon_one.models.set_discount_per_item_effect_props import SetDiscountPerItemEffectProps
from talon_one.models.show_bundle_metadata_effect_props import ShowBundleMetadataEffectProps
from talon_one.models.show_notification_effect_props import ShowNotificationEffectProps
from talon_one.models.slot_def import SlotDef
from talon_one.models.template_arg_def import TemplateArgDef
from talon_one.models.template_def import TemplateDef
from talon_one.models.template_limit_config import TemplateLimitConfig
from talon_one.models.tier import Tier
from talon_one.models.trigger_webhook_effect_props import TriggerWebhookEffectProps
from talon_one.models.update_account import UpdateAccount
from talon_one.models.update_application import UpdateApplication
from talon_one.models.update_attribute_effect_props import UpdateAttributeEffectProps
from talon_one.models.update_audience import UpdateAudience
from talon_one.models.update_campaign import UpdateCampaign
from talon_one.models.update_campaign_collection import UpdateCampaignCollection
from talon_one.models.update_campaign_group import UpdateCampaignGroup
from talon_one.models.update_campaign_template import UpdateCampaignTemplate
from talon_one.models.update_catalog import UpdateCatalog
from talon_one.models.update_collection import UpdateCollection
from talon_one.models.update_coupon import UpdateCoupon
from talon_one.models.update_coupon_batch import UpdateCouponBatch
from talon_one.models.update_custom_effect import UpdateCustomEffect
from talon_one.models.update_loyalty_card import UpdateLoyaltyCard
from talon_one.models.update_loyalty_program import UpdateLoyaltyProgram
from talon_one.models.update_referral import UpdateReferral
from talon_one.models.update_referral_batch import UpdateReferralBatch
from talon_one.models.update_role import UpdateRole
from talon_one.models.update_user import UpdateUser
from talon_one.models.update_user_latest_feed_timestamp import UpdateUserLatestFeedTimestamp
from talon_one.models.user import User
from talon_one.models.user_entity import UserEntity
from talon_one.models.user_feed_notifications import UserFeedNotifications
from talon_one.models.webhook import Webhook
from talon_one.models.webhook_activation_log_entry import WebhookActivationLogEntry
from talon_one.models.webhook_log_entry import WebhookLogEntry
from talon_one.models.will_award_giveaway_effect_props import WillAwardGiveawayEffectProps


text:
RSpec.feature 'OpenHumans page' do
  let!(:user) { create(:user, name: 'Alice') }

  context 'as not signed in user' do
    scenario 'visit open humans index' do
      visit '/openhumans'
      expect(page).not_to have_content('Connect to Open Humans')
    end

    scenario 'visit open humans connector' do
      visit '/openhumans/new'
      expect(page).to have_content('You must be logged in to access this page')
    end
  end

  context 'as a signed-in user' do
    before do
      sign_in(user)
    end
    scenario 'visit open humans index' do
      visit '/openhumans'
      expect(page).to have_content('Connect to Open Humans')
    end

    scenario 'visit open humans connector' do
      visit '/openhumans/new'
      expect(page).not_to have_content('You must be logged in to access this page')
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
package com.be.android.library.worker.base;

public interface InvocationHandler {
    boolean canApply(Object receiver, JobEvent event);
    boolean isFitEvent(Object receiver, JobEvent event);
    boolean apply(Object receiver, JobEvent event) throws Exception;
}


text:
package com.comandante.pushpackage;

import com.google.common.collect.ImmutableList;
import org.apache.commons.configuration.Configuration;

import java.util.List;

public class PackageZipConfiguration {

    public static final String PUSH_PACKAGE_FILES = "stickypunch.pushpackagefiles";
    public static final String PUSH_PACKAGE_FILES_DEFAULT = "pushpackage.raw";
    public final String pushPackageFiles;

    public static final String PUSH_PACKAGE_SIGNER_CERT_PROP= "stickypunch.signercert";
    public static final String PUSH_PACKAGE_SIGNER_CERT_DEFAULT = "pushpackage.raw/cert.p12";
    public final String pushPackageSignerCertPath;

    public static final String PUSH_PACKAGE_SIGNER_CERT_PASSWORD_PROP= "stickypunch.signercertpassword";
    public static final String PUSH_PACKAGE_SIGNER_CERT_PASSWORD_DEFAULT = "password";
    public final String pushPackageSignerCertPassword;

    public static final String PUSH_PACKAGE_SIGNER_CERT_NAME_PROP= "stickypunch.signercertname";
    public static final String PUSH_PACKAGE_SIGNER_CERT_NAME_DEFAULT = "name";
    public final String pushPackageSignerCertName;

    public static final String PUSH_PACKAGE_WEBSITE_NAME_PROP = "stickypunch.websiteName";
    public static final String PUSH_PACKAGE_WEBSITE_NAME_DEFAULT = "Sticky Punch";
    public final String websiteName;

    public static final String PUSH_PACKAGE_WEBSITE_PUSH_ID = "stickypunch.websitePushID";
    public static final String PUSH_PACKAGE_WEBSITE_PUSH_ID_DEFAULT = "web.com.purplestickypunch.demo";
    public final String websitePushID;

    public static final String PUSH_PACKAGE_WEBSITE_ALLOWED_DOMAINS_PROP = "stickypunch.allowedDomains";
    public static final List<Object> PUSH_PACKAGE_WEBSITE_ALLOWED_DOMAINS_DEFAULT = ImmutableList.<Object>of("https://purplestickypunch.com");
    public final List<Object> allowedDomains;

    public static final String PUSH_PACKAGE_WEBSITE_URL_FORMAT_STRING_PROP = "stickypunch.urlFormatString";
    public static final String PUSH_PACKAGE_WEBSITE_URL_FORMAT_STRING_DEFAULT = "https://purplestickypunch.com/notificationreceived";
    public final String urlFormatString;

    public static final String PUSH_PACKAGE_WEBSITE_WEBSERVICE_URL_PROP = "stickypunch.webServiceUrl";
    public static final String PUSH_PACKAGE_WEBSITE_WEBSERVICE_URL_DEFAULT = "https://purplestickypunch.com/push";
    public final String webServiceUrl;

    public static final String PUSH_PACKAGE_PACKAGE_ZIP_QUEUE_SIZE_PROP = "stickypunch.packageZipQueueSize";
    public static final int PUSH_PACKAGE_PACKAGE_ZIP_QUEUE_SIZE_DEFAULT = 50;
    public final int packageZipQueueSize;

    public PackageZipConfiguration(Configuration configuration) {
        pushPackageFiles = configuration.getString(PUSH_PACKAGE_FILES, PUSH_PACKAGE_FILES_DEFAULT);
        pushPackageSignerCertPath = configuration.getString(PUSH_PACKAGE_SIGNER_CERT_PROP, PUSH_PACKAGE_SIGNER_CERT_DEFAULT);
        pushPackageSignerCertPassword = configuration.getString(PUSH_PACKAGE_SIGNER_CERT_PASSWORD_PROP, PUSH_PACKAGE_SIGNER_CERT_PASSWORD_DEFAULT);
        websiteName = configuration.getString(PUSH_PACKAGE_WEBSITE_NAME_PROP, PUSH_PACKAGE_WEBSITE_NAME_DEFAULT);
        websitePushID = configuration.getString(PUSH_PACKAGE_WEBSITE_PUSH_ID, PUSH_PACKAGE_WEBSITE_PUSH_ID_DEFAULT);
        allowedDomains = configuration.getList(PUSH_PACKAGE_WEBSITE_ALLOWED_DOMAINS_PROP, PUSH_PACKAGE_WEBSITE_ALLOWED_DOMAINS_DEFAULT);
        urlFormatString = configuration.getString(PUSH_PACKAGE_WEBSITE_URL_FORMAT_STRING_PROP, PUSH_PACKAGE_WEBSITE_URL_FORMAT_STRING_DEFAULT);
        webServiceUrl = configuration.getString(PUSH_PACKAGE_WEBSITE_WEBSERVICE_URL_PROP, PUSH_PACKAGE_WEBSITE_WEBSERVICE_URL_DEFAULT);
        packageZipQueueSize = configuration.getInt(PUSH_PACKAGE_PACKAGE_ZIP_QUEUE_SIZE_PROP, PUSH_PACKAGE_PACKAGE_ZIP_QUEUE_SIZE_DEFAULT);
        pushPackageSignerCertName = configuration.getString(PUSH_PACKAGE_SIGNER_CERT_NAME_PROP, PUSH_PACKAGE_SIGNER_CERT_NAME_DEFAULT);
    }
}


text:
author: tejas17
comments: true
date: 2013-03-30 06:25:09+00:00
layout: post
link: https://tkalawatia.wordpress.com/2013/03/30/sunderland-v-manchester-united-preview/
slug: sunderland-v-manchester-united-preview
title: 'Sunderland v Manchester United : Preview'
wordpress_id: 211
categories:
- Football
tags:
- Barclays Premier League
- chelsea
- English Premier League
- Manchester United
- news
- sir alex ferguson
- soccer
- sports
- stadium of light
- stamford bridge
- sunderland fc
- thoughts
- uefa champions league
- wearside
---

I have had thoughts about reviving this blog for quite a while now. The dwindling viewership which was one of the biggest factors in the discontinuation of this blog still exists but I have this huge urge at times, those extreme moments of joy and despair that you want to share someone with and at that time I remember this blog, about how I used to regularly update it for close to 4 months at the end of last year.
To be precise, its been almost 3 months since I wrote something meaningful here, a lot of water has flown down the river since. There has been a lot of joy with the right mix of sorrow thrown in. A 15 point lead at the top of the table has been a source of joy and it swells me with pride everytime I look at it.
On the other hand we got knocked out of Europe by a Real Madrid side that was admittedly better than us at crucial stages of the game. Following that game we suffered another disappointment at home again as Chelsea rose back from the dead to draw 2-2 to setup a tantalising game at Stamford Bridge on monday, a game which they will have an upper hand on for sure as we have struggled historically over the years there. But come to think of it we haven't  lost at the Bridge since February 2011, so there are signs of optimism for sure.
Today, we make the trip to the Stadium of Light-Sunderland, the scene of epic disappointment last year as we saw Manchester City take away the title from our grasp, the jubilant scenes of Wearside supporters performing the poznan added to the pain; the feeling of quite how we allowed them to wrestle back the title after holding an 8 point lead with 6 games to go. It was an un-Manchester United thing to do, A feeling that still gives me nightmares at times.
Coming to the game, with Sunderland in relegation trouble, Steven Fletcher and Lee Cattermole out for the season, things are extremely gloomy at the Stadium of Light but one thing Martin O'Neill's side will make sure is that the defence wont be breached easily, mark my words it is going to be a very difficult game for us today and scoring will in turn be even more difficult and a draw would be a decent result for us keeping in mind the team that Fergie sends out today with the clash at Stamford Bridge looming large. I would have loved to have said with the game at Galatasaray looming large in midweek but destiny had other things in mind.
Never mind, enjoy the game.
Till next time.....................


text:
using Orchard.ContentManagement;
using System.Collections.Generic;

namespace Airbrush.ViewModels
{
    public class GalleryViewModel
    {
        public List<GalleryItemViewModel> GalleryItems { get; set; }

        public GalleryViewModel()
        {
            GalleryItems = new List<GalleryItemViewModel>();
        }

        public class GalleryItemViewModel
        {
            public string MediaUrl { get; set; }
            public string Title { get; set; }
            public string Caption { get; set; }

            public GalleryItemViewModel()
            { }
            public GalleryItemViewModel(string mediaUrl, string title, string caption)
            {
                MediaUrl = mediaUrl;
                Title = title;
                Caption = caption;
            }
        }

    }

}


text:
class AddPrimaryFieldToCategories < ActiveRecord::Migration
  def change
    add_column :categories, :primary_field, :string
  end
end


text:
require 'spec_helper'

describe "Aptsource" do
  before(:all) do
    @a = FactoryBot.create(:aptsource, { uri: 'https://download.docker.com/linux/debian',
                                         distribution: 'stretch',
                                         component: 'stable',
                                         arch: 'binary-amd64' })
  end

  it "should update database downloading from network" do
    @a.update_db
    expect(@a.packages.where(name: 'docker-ce')).not_to be_empty
  end
end


text:
subscription-dispatcher
=======================

To customize logging, add the following lines to $STORM_HOME/logback/cluster.xml
```
  <appender name="SERVIOTICY" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${storm.log.dir}/servioticy.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>${storm.log.dir}/logs/servioticy.log.%i</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>9</maxIndex>
    </rollingPolicy>

    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>20MB</maxFileSize>
    </triggeringPolicy>

    <encoder>
      <pattern>%d %-8r %m%n</pattern>
    </encoder>
  </appender>

  <logger name="com.servioticy.dispatcher" additivity="false" >
    <level value="INFO"/>
    <appender-ref ref="SERVIOTICY"/>
  </logger>
```


text:
package com.nomeautomation.utility.datagen;

import java.sql.SQLException;
import java.util.Calendar;
import java.util.List;

import com.nomeautomation.database.DBRegistrar;
import com.nomeautomation.devicemanager.devices.Device;
import com.nomeautomation.devicemanager.devices.Device.DeviceCommand;
import com.nomeautomation.devicemanager.devices.Device.DeviceState;
import com.nomeautomation.devicemanager.devices.Device.DeviceType;
import com.nomeautomation.scheduler.Action;
import com.nomeautomation.scheduler.Event;
import com.nomeautomation.scheduler.Schedule;
import com.nomeautomation.scheduler.ScheduleManager;
import com.nomeautomation.scheduler.trigger.DeviceTriggerData;
import com.nomeautomation.scheduler.trigger.TimeTriggerData;
import com.nomeautomation.scheduler.trigger.Trigger;
import com.nomeautomation.scheduler.trigger.Trigger.TriggerType;

public class ScheduleGenerator {
	private static final long THREE_MIN = 3*60;

	Device radio = null;
	Device officeLight1 = null;
	Device officeLight2 = null;
	Device computer = null;
	Device kitchenLight = null;
	Device bedroomLamp = null;
	Device oven = null;
	Device dishwasher = null;

	public static void main(String[] args)
	{
		ScheduleGenerator sg = new ScheduleGenerator();
		sg.createActiveSchedule();
		sg.createLowPowerSchedule();
		sg.createVacationSchedule();
	}

	public ScheduleGenerator()
	{
		//Initialize required devices
		try {
			List<Device> devices = DBRegistrar.getRegistrar().getObjects(Device.class);
			for(Device d : devices)
			{
				if(d.type == DeviceType.ELECTRONICS)
					radio = d;
				else if(d.type == DeviceType.LAMP)
				{
					if(d.nickname.equalsIgnoreCase("Lamp1"))
						officeLight1 = d;
					else if(d.nickname.equalsIgnoreCase("Lamp2"))
						officeLight2 = d;
					else if(d.nickname.equalsIgnoreCase("Kitchen Light"))
						kitchenLight = d;
					else if(d.nickname.equalsIgnoreCase("Bedroom Light"))
						bedroomLamp = d;
				}
				else if(d.type == DeviceType.COMPUTER)
					computer = d;
				else if(d.type ==DeviceType.OVEN)
					oven = d;
				else if(d.type == DeviceType.DISHWASHER)
					dishwasher = d;
			}
		} catch (SQLException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
	}

	public void createActiveSchedule()
	{
		Schedule s;
		Event e;
		Trigger t;
		Action a;
		Calendar c;

		//Create active schedule
		s = new Schedule("Work Week", true);
		//Create event
		e = new Event("Wake Me Up");
		s.addEvent(e);
		//Create 7:00 am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 7);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Wake Up", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action - turn radio on
		a = new Action("Turn Radio On", DeviceCommand.ON, radio.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Start Breakfast");
		s.addEvent(e);
		//Create 7:30 am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 7);
		c.set(Calendar.MINUTE, 30);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Making Pancakes", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action - turn oven on
		a = new Action("Turn Oven On", DeviceCommand.ON, oven.getUID());
		e.addAction(a);
		//Create 8:00 am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY,8);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Breakfast Done", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action - turn devices off
		a = new Action("Turn Oven Off", DeviceCommand.OFF, oven.getUID());
		a = new Action("Turn Radio Off", DeviceCommand.OFF, radio.getUID());
		a = new Action("Turn Dishwasher On", DeviceCommand.ON, dishwasher.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Go To Work");
		s.addEvent(e);
		//Create 7:00 am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 9);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Go To Work", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action
		a = new Action("Turn Dishwasher Off", DeviceCommand.OFF, dishwasher.getUID());
		e.addAction(a);

		//Create event
		e = new Event("Set Up Office");
		s.addEvent(e);
		//Create device trigger - when office light is turned on
		t = new Trigger("Open Office", TriggerType.DEVICE, new DeviceTriggerData(officeLight1.getUID(), DeviceState.ON));
		e.addTrigger(t);
		//Create action - turn computer on
		a = new Action("Turn Computer On", DeviceCommand.ON, computer.getUID());
		e.addAction(a);

		//Create event
		e = new Event("Start Dinner");
		s.addEvent(e);
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 18);
		c.set(Calendar.MINUTE, 30);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Making Dinner", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action - turn oven on
		a = new Action("Turn Oven On", DeviceCommand.ON, oven.getUID());
		e.addAction(a);
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY,19);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Dinner Done", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action - turn devices off
		a = new Action("Turn Oven Off", DeviceCommand.OFF, oven.getUID());
		a = new Action("Turn Dishwasher On", DeviceCommand.ON, dishwasher.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Finish Kitchen Clean-up");
		s.addEvent(e);
		//Create 7:00 am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 19);
		c.set(Calendar.MINUTE, 30);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Dishwasher Done", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action
		a = new Action("Turn Dishwasher Off", DeviceCommand.OFF, dishwasher.getUID());
		e.addAction(a);

		//Save schedule
		ScheduleManager.getInstance().save(s);
		ScheduleManager.getInstance().setActiveSchedule(s);
	}

	public void createVacationSchedule()
	{
		Schedule s;
		Event e;
		Trigger t;
		Action a;
		Calendar c;

		//Create sample schedule (vacation)
		s = new Schedule("Vacation", false);

		//Create event
		e = new Event("Simulate Morning");
		s.addEvent(e);
		//Create 7:00am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 7);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Wake Up", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create actions - turn light on
		a = new Action("Turn Bedroom Light On", DeviceCommand.ON, bedroomLamp.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Simulate Off To Work");
		s.addEvent(e);
		//Create 8:00am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 8);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Off To Work", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create actions - turn light on
		a = new Action("Turn Bedroom Light Off", DeviceCommand.OFF, bedroomLamp.getUID());
		e.addAction(a);

		//Create event
		e = new Event("Simulate Bedtime");
		s.addEvent(e);
		//Create 8:00 pm time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 20);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Off To Bed", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action - turn light off
		a = new Action("Turn Kitchen Light Off", DeviceCommand.OFF, kitchenLight.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Simulate Evening");
		s.addEvent(e);
		//Create 5:00pm time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 17);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Honey I'm Home", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create actions - turn light on
		a = new Action("Turn Kitchen Light On", DeviceCommand.ON, kitchenLight.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Simulate Bedtime");
		s.addEvent(e);
		//Create 8:00 pm time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 20);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Off To Bed", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action - turn light off
		a = new Action("Turn Kitchen Light Off", DeviceCommand.OFF, kitchenLight.getUID());
		e.addAction(a);
		//Create action - turn light on
		a = new Action("Turn Bedroom Light On", DeviceCommand.ON, bedroomLamp.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Simulate Morning");
		s.addEvent(e);
		//Create 6:00 am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 6);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Wake Up", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create action - turn light off
		a = new Action("Turn Bedroom Light Off", DeviceCommand.OFF, bedroomLamp.getUID());
		e.addAction(a);
		//Save schedule
		ScheduleManager.getInstance().save(s);
	}

	public void createLowPowerSchedule()
	{
		Schedule s;
		Event e;
		Trigger t;
		Action a;
		Calendar c;

		//Create sample schedule (low power)
		s = new Schedule("Power Saver", false);

		//Create event
		e = new Event("Turn On Minimal Lights - Morning");
		s.addEvent(e);
		//Create 6:00 am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 6);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Morning Start", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create actions (turn lights on)
		a = new Action("Turn Bedroom Light On", DeviceCommand.ON, bedroomLamp.getUID());
		e.addAction(a);
		a = new Action("Turn Kitchen Light On", DeviceCommand.ON, kitchenLight.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Turn Off All Lights");
		s.addEvent(e);
		//Create 6:30 am time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 6);
		c.set(Calendar.MINUTE, 30);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Morning End", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create actions (turn all lights off)
		a = new Action("Turn Bedroom Light Off", DeviceCommand.OFF, bedroomLamp.getUID());
		e.addAction(a);
		a = new Action("Turn Office Light Off", DeviceCommand.OFF, officeLight1.getUID());
		e.addAction(a);
		a = new Action("Turn Office Light Off", DeviceCommand.OFF, officeLight2.getUID());
		e.addAction(a);
		a = new Action("Turn Kitchen Light Off", DeviceCommand.OFF, kitchenLight.getUID());
		e.addAction(a);

		//Create event
		e = new Event("Turn On Minimal Lights - Evening");
		s.addEvent(e);
		//Create 8:00 pm time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 20);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Evening Start", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create actions (turn lights on)
		a = new Action("Turn Bedroom Light On", DeviceCommand.ON, bedroomLamp.getUID());
		e.addAction(a);
		a = new Action("Turn Office Light On", DeviceCommand.ON, officeLight1.getUID());
		e.addAction(a);
		a = new Action("Turn Kitchen Light On", DeviceCommand.ON, kitchenLight.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Turn Off All Lights");
		s.addEvent(e);
		//Create 10:00 pm time trigger
		c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 22);
		c.set(Calendar.MINUTE, 0);
		c.set(Calendar.SECOND, 0);
		t = new Trigger("Evening End", TriggerType.TIME, new TimeTriggerData(c, THREE_MIN));
		e.addTrigger(t);
		//Create actions (turn all lights off)
		a = new Action("Turn Bedroom Light Off", DeviceCommand.OFF, bedroomLamp.getUID());
		e.addAction(a);
		a = new Action("Turn Office Light Off", DeviceCommand.OFF, officeLight1.getUID());
		e.addAction(a);
		a = new Action("Turn Office Light Off", DeviceCommand.OFF, officeLight2.getUID());
		e.addAction(a);
		a = new Action("Turn Kitchen Light Off", DeviceCommand.OFF, kitchenLight.getUID());
		e.addAction(a);
		//Create event
		e = new Event("Shutdown Office");
		s.addEvent(e);
		//Create device trigger - when computer is turned off
		t = new Trigger("Computer Off", TriggerType.DEVICE, new DeviceTriggerData(computer.getUID(), DeviceState.OFF));
		e.addTrigger(t);
		//Create action - turn office lights off
		a = new Action("Turn Office Light Off", DeviceCommand.OFF, officeLight1.getUID());
		e.addAction(a);
		a = new Action("Turn Office Light Off", DeviceCommand.OFF, officeLight2.getUID());
		e.addAction(a);
		//Save schedule
		ScheduleManager.getInstance().save(s);
	}
}


text:
package com.davidbracewell.apollo;

import com.davidbracewell.function.SerializableToDoubleFunction;
import com.davidbracewell.stream.MStream;
import com.davidbracewell.tuple.Tuple2;
import lombok.NonNull;

import java.util.Comparator;
import java.util.Optional;
import java.util.stream.Stream;

/**
 *
Defines methodologies for comparing, testing, and selecting values and indexes based on optimizing values in a
 * specific direction, i.e. MAXIMUM or MINIMUM

 *
 * @author David B. Bracewell
 */
public enum Optimum implements Comparator<Double> {
   /**
    * Optimizes for minimum values
    */
   MINIMUM {
      @Override
      public int compare(double v1, double v2) {
         return Double.compare(v1, v2);
      }

      @Override
      public boolean test(double value, double threshold) {
         return value <= threshold;
      }

      @Override
      public double startingValue() {
         return Double.POSITIVE_INFINITY;
      }

   },
   /**
    * Optimizes for maximum values
    */
   MAXIMUM {
      @Override
      public int compare(double v1, double v2) {
         return -Double.compare(v1, v2);
      }

      @Override
      public boolean test(double value, double threshold) {
         return value >= threshold;
      }

      @Override
      public double startingValue() {
         return Double.NEGATIVE_INFINITY;
      }
   };

   @Override
   public int compare(Double o1, Double o2) {
      if (o1 == null) return -1;
      if (o2 == null) return 1;
      return compare(o1.doubleValue(), o2.doubleValue());
   }

   /**
    * Compares two values such that the most optimum value would result in being sorted to the front.
    *
    * @param v1 the first value
    * @param v2 the second value
    * @return the result of comparison (optimum value should be < 0)
    */
   public abstract int compare(double v1, double v2);

   /**
    * Select the best index and value from the given array.
    *
    * @param array the array to select from
    * @return the index and value of the best entry
    */
   public Tuple2<Integer, Double> optimum(@NonNull double[] array) {
      int bestIndex = optimumIndex(array);
      return Tuple2.of(bestIndex, array[bestIndex]);
   }

   /**
    * Optimum optional.
    *
    * @param <T>      the type parameter
    * @param stream   the stream
    * @param function the function
    * @return the optional
    */
   public <T> Optional<T> optimum(@NonNull MStream<T> stream, @NonNull SerializableToDoubleFunction<T> function) {
      if (this == MAXIMUM) {
         return stream.max((t1, t2) -> Double.compare(function.applyAsDouble(t1), function.applyAsDouble(t2)));
      } else if (this == MINIMUM) {
         return stream.min((t1, t2) -> Double.compare(function.applyAsDouble(t1), function.applyAsDouble(t2)));
      }
      throw new IllegalStateException();
   }

   /**
    * Optimum optional.
    *
    * @param <T>      the type parameter
    * @param stream   the stream
    * @param function the function
    * @return the optional
    */
   public <T> Optional<T> optimum(@NonNull Stream<T> stream, @NonNull SerializableToDoubleFunction<T> function) {
      if (this == MAXIMUM) {
         return stream.max(Comparator.comparingDouble(function));
      } else if (this == MINIMUM) {
         return stream.min(Comparator.comparingDouble(function));
      }
      throw new IllegalStateException();
   }

   /**
    * Selects the index of the best value in the given array
    *
    * @param array the array to select from
    * @return the index of the optimum value
    */
   public int optimumIndex(@NonNull double[] array) {
      double val = startingValue();
      int index = -1;
      for (int i = 0; i < array.length; i++) {
         if (test(array[i], val)) {
            val = array[i];
            index = i;
         }
      }
      return index;
   }

   /**
    * Selects the best value from the given array
    *
    * @param array the array to select from
    * @return the most optimum value
    */
   public double optimumValue(@NonNull double[] array) {
      double val = startingValue();
      for (double anArray : array) {
         if (test(anArray, val)) {
            val = anArray;
         }
      }
      return val;
   }

   /**
    * Gets a value that will also be the worst possible solution.
    *
    * @return the double
    */
   public abstract double startingValue();

   /**
    * Test if the given value passes the given threshold based on the direction of the optimum. For MINIMUM
    * this uses a less than equal to operator and for MAXIMUM this uses a greater than equal to operator.
    *
    * @param value     the value
    * @param threshold the threshold
    * @return the boolean
    */
   public abstract boolean test(double value, double threshold);

}//END OF Optimum


text:
package filter

import (
	"fmt"

	"github.com/200sc/klangsynthese/audio/filter/supports"
)

// Speed modifies the filtered audio by a speed ratio, changing its sample rate
// in the process while maintaining pitch.
func Speed(ratio float64, pitchShifter PitchShifter) Encoding {
	return func(senc supports.Encoding) {
		r := ratio
		fmt.Println(ratio)
		for r < .5 {
			r *= 2
			pitchShifter.PitchShift(.5)(senc)
		}
		for r > 2.0 {
			r /= 2
			pitchShifter.PitchShift(2.0)(senc)
		}
		pitchShifter.PitchShift(1 / r)(senc)
		ModSampleRate(ratio)(senc.GetSampleRate())
	}
}


text:
// +build !ignore_autogenerated

// Code generated by deepcopy-gen. DO NOT EDIT.

package v1

import (
	runtime "k8s.io/apimachinery/pkg/runtime"
	types "k8s.io/apimachinery/pkg/types"
)

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIGroup) DeepCopyInto(out *APIGroup) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	if in.Versions != nil {
		in, out := &in.Versions, &out.Versions
		*out = make([]GroupVersionForDiscovery, len(*in))
		copy(*out, *in)
	}
	out.PreferredVersion = in.PreferredVersion
	if in.ServerAddressByClientCIDRs != nil {
		in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
		*out = make([]ServerAddressByClientCIDR, len(*in))
		copy(*out, *in)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroup.
func (in *APIGroup) DeepCopy() *APIGroup {
	if in == nil {
		return nil
	}
	out := new(APIGroup)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIGroup) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIGroupList) DeepCopyInto(out *APIGroupList) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	if in.Groups != nil {
		in, out := &in.Groups, &out.Groups
		*out = make([]APIGroup, len(*in))
		for i := range *in {
			(*in)[i].DeepCopyInto(&(*out)[i])
		}
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupList.
func (in *APIGroupList) DeepCopy() *APIGroupList {
	if in == nil {
		return nil
	}
	out := new(APIGroupList)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIGroupList) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIResource) DeepCopyInto(out *APIResource) {
	*out = *in
	if in.Verbs != nil {
		in, out := &in.Verbs, &out.Verbs
		*out = make(Verbs, len(*in))
		copy(*out, *in)
	}
	if in.ShortNames != nil {
		in, out := &in.ShortNames, &out.ShortNames
		*out = make([]string, len(*in))
		copy(*out, *in)
	}
	if in.Categories != nil {
		in, out := &in.Categories, &out.Categories
		*out = make([]string, len(*in))
		copy(*out, *in)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResource.
func (in *APIResource) DeepCopy() *APIResource {
	if in == nil {
		return nil
	}
	out := new(APIResource)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIResourceList) DeepCopyInto(out *APIResourceList) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	if in.APIResources != nil {
		in, out := &in.APIResources, &out.APIResources
		*out = make([]APIResource, len(*in))
		for i := range *in {
			(*in)[i].DeepCopyInto(&(*out)[i])
		}
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResourceList.
func (in *APIResourceList) DeepCopy() *APIResourceList {
	if in == nil {
		return nil
	}
	out := new(APIResourceList)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIResourceList) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIVersions) DeepCopyInto(out *APIVersions) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	if in.Versions != nil {
		in, out := &in.Versions, &out.Versions
		*out = make([]string, len(*in))
		copy(*out, *in)
	}
	if in.ServerAddressByClientCIDRs != nil {
		in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
		*out = make([]ServerAddressByClientCIDR, len(*in))
		copy(*out, *in)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersions.
func (in *APIVersions) DeepCopy() *APIVersions {
	if in == nil {
		return nil
	}
	out := new(APIVersions)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIVersions) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeleteOptions) DeepCopyInto(out *DeleteOptions) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	if in.GracePeriodSeconds != nil {
		in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds
		*out = new(int64)
		**out = **in
	}
	if in.Preconditions != nil {
		in, out := &in.Preconditions, &out.Preconditions
		*out = new(Preconditions)
		(*in).DeepCopyInto(*out)
	}
	if in.OrphanDependents != nil {
		in, out := &in.OrphanDependents, &out.OrphanDependents
		*out = new(bool)
		**out = **in
	}
	if in.PropagationPolicy != nil {
		in, out := &in.PropagationPolicy, &out.PropagationPolicy
		*out = new(DeletionPropagation)
		**out = **in
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteOptions.
func (in *DeleteOptions) DeepCopy() *DeleteOptions {
	if in == nil {
		return nil
	}
	out := new(DeleteOptions)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DeleteOptions) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Duration) DeepCopyInto(out *Duration) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration.
func (in *Duration) DeepCopy() *Duration {
	if in == nil {
		return nil
	}
	out := new(Duration)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExportOptions) DeepCopyInto(out *ExportOptions) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportOptions.
func (in *ExportOptions) DeepCopy() *ExportOptions {
	if in == nil {
		return nil
	}
	out := new(ExportOptions)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ExportOptions) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GetOptions) DeepCopyInto(out *GetOptions) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GetOptions.
func (in *GetOptions) DeepCopy() *GetOptions {
	if in == nil {
		return nil
	}
	out := new(GetOptions)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GetOptions) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GroupKind) DeepCopyInto(out *GroupKind) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupKind.
func (in *GroupKind) DeepCopy() *GroupKind {
	if in == nil {
		return nil
	}
	out := new(GroupKind)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GroupResource) DeepCopyInto(out *GroupResource) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResource.
func (in *GroupResource) DeepCopy() *GroupResource {
	if in == nil {
		return nil
	}
	out := new(GroupResource)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GroupVersion) DeepCopyInto(out *GroupVersion) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersion.
func (in *GroupVersion) DeepCopy() *GroupVersion {
	if in == nil {
		return nil
	}
	out := new(GroupVersion)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GroupVersionForDiscovery) DeepCopyInto(out *GroupVersionForDiscovery) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionForDiscovery.
func (in *GroupVersionForDiscovery) DeepCopy() *GroupVersionForDiscovery {
	if in == nil {
		return nil
	}
	out := new(GroupVersionForDiscovery)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GroupVersionKind) DeepCopyInto(out *GroupVersionKind) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionKind.
func (in *GroupVersionKind) DeepCopy() *GroupVersionKind {
	if in == nil {
		return nil
	}
	out := new(GroupVersionKind)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GroupVersionResource) DeepCopyInto(out *GroupVersionResource) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionResource.
func (in *GroupVersionResource) DeepCopy() *GroupVersionResource {
	if in == nil {
		return nil
	}
	out := new(GroupVersionResource)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Initializer) DeepCopyInto(out *Initializer) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Initializer.
func (in *Initializer) DeepCopy() *Initializer {
	if in == nil {
		return nil
	}
	out := new(Initializer)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Initializers) DeepCopyInto(out *Initializers) {
	*out = *in
	if in.Pending != nil {
		in, out := &in.Pending, &out.Pending
		*out = make([]Initializer, len(*in))
		copy(*out, *in)
	}
	if in.Result != nil {
		in, out := &in.Result, &out.Result
		*out = new(Status)
		(*in).DeepCopyInto(*out)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Initializers.
func (in *Initializers) DeepCopy() *Initializers {
	if in == nil {
		return nil
	}
	out := new(Initializers)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InternalEvent) DeepCopyInto(out *InternalEvent) {
	*out = *in
	if in.Object == nil {
		out.Object = nil
	} else {
		out.Object = in.Object.DeepCopyObject()
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalEvent.
func (in *InternalEvent) DeepCopy() *InternalEvent {
	if in == nil {
		return nil
	}
	out := new(InternalEvent)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LabelSelector) DeepCopyInto(out *LabelSelector) {
	*out = *in
	if in.MatchLabels != nil {
		in, out := &in.MatchLabels, &out.MatchLabels
		*out = make(map[string]string, len(*in))
		for key, val := range *in {
			(*out)[key] = val
		}
	}
	if in.MatchExpressions != nil {
		in, out := &in.MatchExpressions, &out.MatchExpressions
		*out = make([]LabelSelectorRequirement, len(*in))
		for i := range *in {
			(*in)[i].DeepCopyInto(&(*out)[i])
		}
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelector.
func (in *LabelSelector) DeepCopy() *LabelSelector {
	if in == nil {
		return nil
	}
	out := new(LabelSelector)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LabelSelectorRequirement) DeepCopyInto(out *LabelSelectorRequirement) {
	*out = *in
	if in.Values != nil {
		in, out := &in.Values, &out.Values
		*out = make([]string, len(*in))
		copy(*out, *in)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirement.
func (in *LabelSelectorRequirement) DeepCopy() *LabelSelectorRequirement {
	if in == nil {
		return nil
	}
	out := new(LabelSelectorRequirement)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *List) DeepCopyInto(out *List) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]runtime.RawExtension, len(*in))
		for i := range *in {
			(*in)[i].DeepCopyInto(&(*out)[i])
		}
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new List.
func (in *List) DeepCopy() *List {
	if in == nil {
		return nil
	}
	out := new(List)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *List) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ListMeta) DeepCopyInto(out *ListMeta) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListMeta.
func (in *ListMeta) DeepCopy() *ListMeta {
	if in == nil {
		return nil
	}
	out := new(ListMeta)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ListOptions) DeepCopyInto(out *ListOptions) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	if in.TimeoutSeconds != nil {
		in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
		*out = new(int64)
		**out = **in
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListOptions.
func (in *ListOptions) DeepCopy() *ListOptions {
	if in == nil {
		return nil
	}
	out := new(ListOptions)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ListOptions) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MicroTime.
func (in *MicroTime) DeepCopy() *MicroTime {
	if in == nil {
		return nil
	}
	out := new(MicroTime)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) {
	*out = *in
	in.CreationTimestamp.DeepCopyInto(&out.CreationTimestamp)
	if in.DeletionTimestamp != nil {
		in, out := &in.DeletionTimestamp, &out.DeletionTimestamp
		*out = (*in).DeepCopy()
	}
	if in.DeletionGracePeriodSeconds != nil {
		in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds
		*out = new(int64)
		**out = **in
	}
	if in.Labels != nil {
		in, out := &in.Labels, &out.Labels
		*out = make(map[string]string, len(*in))
		for key, val := range *in {
			(*out)[key] = val
		}
	}
	if in.Annotations != nil {
		in, out := &in.Annotations, &out.Annotations
		*out = make(map[string]string, len(*in))
		for key, val := range *in {
			(*out)[key] = val
		}
	}
	if in.OwnerReferences != nil {
		in, out := &in.OwnerReferences, &out.OwnerReferences
		*out = make([]OwnerReference, len(*in))
		for i := range *in {
			(*in)[i].DeepCopyInto(&(*out)[i])
		}
	}
	if in.Initializers != nil {
		in, out := &in.Initializers, &out.Initializers
		*out = new(Initializers)
		(*in).DeepCopyInto(*out)
	}
	if in.Finalizers != nil {
		in, out := &in.Finalizers, &out.Finalizers
		*out = make([]string, len(*in))
		copy(*out, *in)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.
func (in *ObjectMeta) DeepCopy() *ObjectMeta {
	if in == nil {
		return nil
	}
	out := new(ObjectMeta)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OwnerReference) DeepCopyInto(out *OwnerReference) {
	*out = *in
	if in.Controller != nil {
		in, out := &in.Controller, &out.Controller
		*out = new(bool)
		**out = **in
	}
	if in.BlockOwnerDeletion != nil {
		in, out := &in.BlockOwnerDeletion, &out.BlockOwnerDeletion
		*out = new(bool)
		**out = **in
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnerReference.
func (in *OwnerReference) DeepCopy() *OwnerReference {
	if in == nil {
		return nil
	}
	out := new(OwnerReference)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Patch) DeepCopyInto(out *Patch) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patch.
func (in *Patch) DeepCopy() *Patch {
	if in == nil {
		return nil
	}
	out := new(Patch)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Preconditions) DeepCopyInto(out *Preconditions) {
	*out = *in
	if in.UID != nil {
		in, out := &in.UID, &out.UID
		*out = new(types.UID)
		**out = **in
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preconditions.
func (in *Preconditions) DeepCopy() *Preconditions {
	if in == nil {
		return nil
	}
	out := new(Preconditions)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RootPaths) DeepCopyInto(out *RootPaths) {
	*out = *in
	if in.Paths != nil {
		in, out := &in.Paths, &out.Paths
		*out = make([]string, len(*in))
		copy(*out, *in)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootPaths.
func (in *RootPaths) DeepCopy() *RootPaths {
	if in == nil {
		return nil
	}
	out := new(RootPaths)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServerAddressByClientCIDR) DeepCopyInto(out *ServerAddressByClientCIDR) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerAddressByClientCIDR.
func (in *ServerAddressByClientCIDR) DeepCopy() *ServerAddressByClientCIDR {
	if in == nil {
		return nil
	}
	out := new(ServerAddressByClientCIDR)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Status) DeepCopyInto(out *Status) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	out.ListMeta = in.ListMeta
	if in.Details != nil {
		in, out := &in.Details, &out.Details
		*out = new(StatusDetails)
		(*in).DeepCopyInto(*out)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (in *Status) DeepCopy() *Status {
	if in == nil {
		return nil
	}
	out := new(Status)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Status) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatusCause) DeepCopyInto(out *StatusCause) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCause.
func (in *StatusCause) DeepCopy() *StatusCause {
	if in == nil {
		return nil
	}
	out := new(StatusCause)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatusDetails) DeepCopyInto(out *StatusDetails) {
	*out = *in
	if in.Causes != nil {
		in, out := &in.Causes, &out.Causes
		*out = make([]StatusCause, len(*in))
		copy(*out, *in)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusDetails.
func (in *StatusDetails) DeepCopy() *StatusDetails {
	if in == nil {
		return nil
	}
	out := new(StatusDetails)
	in.DeepCopyInto(out)
	return out
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Time.
func (in *Time) DeepCopy() *Time {
	if in == nil {
		return nil
	}
	out := new(Time)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Timestamp) DeepCopyInto(out *Timestamp) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timestamp.
func (in *Timestamp) DeepCopy() *Timestamp {
	if in == nil {
		return nil
	}
	out := new(Timestamp)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in Verbs) DeepCopyInto(out *Verbs) {
	{
		in := &in
		*out = make(Verbs, len(*in))
		copy(*out, *in)
		return
	}
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Verbs.
func (in Verbs) DeepCopy() Verbs {
	if in == nil {
		return nil
	}
	out := new(Verbs)
	in.DeepCopyInto(out)
	return *out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WatchEvent) DeepCopyInto(out *WatchEvent) {
	*out = *in
	in.Object.DeepCopyInto(&out.Object)
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchEvent.
func (in *WatchEvent) DeepCopy() *WatchEvent {
	if in == nil {
		return nil
	}
	out := new(WatchEvent)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *WatchEvent) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}


text:
package org.cyclops.integrateddynamics.core.item;

import net.minecraft.network.chat.Component;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage;
import org.cyclops.cyclopscore.helper.L10NHelpers;

import java.util.List;

/**
 * @author rubensworks
 */
public class ItemBlockEnergyContainerAutoSupply extends ItemBlockEnergyContainer {

    public ItemBlockEnergyContainerAutoSupply(Block block, Properties builder) {
        super(block, builder);
    }

    @Override
    public void appendHoverText(ItemStack itemStack, Level world, List<Component> list, TooltipFlag flag) {
        super.appendHoverText(itemStack, world, list, flag);
        L10NHelpers.addStatusInfo(list, isActivated(itemStack), getDescriptionId() + ".info.auto_supply");
    }

    @Override
    public InteractionResultHolder<ItemStack> use(Level world, Player player, InteractionHand hand) {
        return new InteractionResultHolder<>(InteractionResult.PASS, toggleActivation(player.getItemInHand(hand), world, player));
    }

    public static void autofill(IEnergyStorage source, Level world, Entity entity) {
        if(entity instanceof Player && !world.isClientSide()) {
            int tickAmount = source.extractEnergy(Integer.MAX_VALUE, true);
            if(tickAmount > 0) {
                Player player = (Player) entity;
                for (InteractionHand hand : InteractionHand.values()) {
                    ItemStack held = player.getItemInHand(hand);
                    ItemStack filled = tryFillContainerForPlayer(source, held, tickAmount, player);
                    if (!filled.isEmpty()) {
                        player.setItemInHand(hand, filled);
                    }
                }
            }
        }
    }

    public static ItemStack tryFillContainerForPlayer(IEnergyStorage source, ItemStack held, int tickAmount, Player player) {
        return held.getCapability(CapabilityEnergy.ENERGY, null)
                .map(target -> {
                    int moved = target.receiveEnergy(source.extractEnergy(target.receiveEnergy(tickAmount, true), false), false);
                    if (moved > 0) {
                        return held;
                    }
                    return ItemStack.EMPTY;
                }).orElse(ItemStack.EMPTY);
    }

    @Override
    public void inventoryTick(ItemStack itemStack, Level world, Entity entity, int itemSlot, boolean par5) {
        if (isActivated(itemStack)) {
            itemStack.getCapability(CapabilityEnergy.ENERGY, null)
                    .ifPresent(energyStorage -> autofill(energyStorage, world, entity));
        }
        super.inventoryTick(itemStack, world, entity, itemSlot, par5);
    }

    public ItemStack toggleActivation(ItemStack itemStack, Level world, Player player) {
        if(player.isSecondaryUseActive()) {
            if(!world.isClientSide()) {
                ItemStack activated = itemStack.copy();
                activated.setDamageValue(1 - activated.getDamageValue());
                return activated;
            }
            return itemStack;
        }
        return itemStack;
    }

    public boolean isActivated(ItemStack itemStack) {
        return itemStack.getDamageValue() == 1;
    }

    @Override
    public boolean isFoil(ItemStack itemStack) {
        return isActivated(itemStack);
    }
}


text:
import firebase from 'firebase'
import {List} from 'immutable'
import {pullArticles} from './article'
import {updateAppState} from './ui'
import {simpleAction} from '../helper'
import history from '../history'
import shortid from 'shortid';

import {
  createEditorState,
} from 'medium-draft';

import {convertToRaw} from 'draft-js';
import {
  SET_CURRENT_ARTICLE,
  NETWORK_STATUS,
  CREATE_ARTICLE,
  SAVE_ARTICLE,
  DELETE_ARTICLE,
  GROUP_KEYS
} from "../constants";

import {defaultBlockProps} from '../../pages/blocks'

const database = firebase.database();

const defaultEditorState = () => {
  return [{type:"PROFILE",props:defaultBlockProps("PROFILE"),hash:shortid.generate()}]
}

const updateLocalArticles = (dispatch,getState) => {
  return pullArticles()(dispatch,getState)
}

export const setCurrent = (id) => {
  return (dispatch,getState) => {
    dispatch(simpleAction({
      type:SET_CURRENT_ARTICLE,
      article:getState().get("article").get("articles").get(id)
    }))
  }
}

export const saveArticleTitle = (title) => {
  return (dispatch,getState) => {
    dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.LOADING,title}));
    var updates = {};
    const articleId = getState().get("current").get("article").get("uid")
    updates[`articles/${articleId}/title`] = title
    return database.ref().update(updates).then(()=>{
      dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.SUCCESS,title}));
    }).catch((error)=>{
      dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.ERROR,error}))
    })
  }
}

export const saveArticlePublic = (status) => {
  return (dispatch,getState) => {
    dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.LOADING,public:status}));
    var updates = {};
    const articleId = getState().get("current").get("article").get("uid")
    updates[`articles/${articleId}/public`] = status
    return database.ref().update(updates).then(()=>{
      dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.SUCCESS,public:status}));
    }).catch((error)=>{
      dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.ERROR,error}))
    })
  }
}

export const saveArticleState = (editorState) => {
  return (dispatch,getState) => {
    dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.LOADING,editorState}));
    var updates = {};
    const articleId = getState().get("current").get("article").get("uid");
    const newEditorState = (editorState.length == 0 ? defaultEditorState():editorState);
    updates[`articles/${articleId}/editorState`] = newEditorState;
    return database.ref().update(updates).then(()=>{
      dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.SUCCESS,editorState:newEditorState}));
    }).catch((error)=>{
      dispatch(simpleAction({type:SAVE_ARTICLE,status:NETWORK_STATUS.ERROR,error}))
    })
  }
}

export const createArticle = (title) => {
  return (dispatch,getState) => {
    dispatch(simpleAction({type:CREATE_ARTICLE,status:NETWORK_STATUS.LOADING}));
    var updates = {};
    const uid = history.getCurrentLocation().query.uid;
    const articleId = database.ref('/articles').push().key
    const shortId = shortid.generate()
    updates[`user_articles/${uid}/${articleId}`] = true;
    updates[`articles/${articleId}/`] = {author:uid,views:0,title,shortId,editorState:defaultEditorState(),public:false};
    updates[`shorten/${shortId}`] = articleId
    return database.ref().update(updates).then(()=>{
      dispatch(simpleAction({type:CREATE_ARTICLE,status:NETWORK_STATUS.SUCCESS}));
      history.push(`/edit?uid=${uid}&aid=${shortId}`)
    }).catch((error)=>{
      dispatch(simpleAction({type:CREATE_ARTICLE,status:NETWORK_STATUS.ERROR,error}))
    })
  }
}

export const deleteArticle = (article) => {
  return (dispatch,getState) => {
    dispatch(simpleAction({type:DELETE_ARTICLE,status:NETWORK_STATUS.LOADING}));
    var updates = {};
    const uid = history.getCurrentLocation().query.uid;
    const current = getState().get("current");
    updates[`user_articles/${uid}/${article.uid}`] = null;
    updates[`articles/${article.uid}/`] = null;
    updates[`shorten/${article.shortId}`] = null;
    return database.ref().update(updates).then(()=>{
      dispatch(simpleAction({type:DELETE_ARTICLE,status:NETWORK_STATUS.SUCCESS}));
      return updateLocalArticles(dispatch,getState);
    }).catch((error)=>{
      dispatch(simpleAction({type:DELETE_ARTICLE,status:NETWORK_STATUS.ERROR,error}))
    })
  }
}


text:
#include "tensorflow/contrib/lite/optional_debug_tools.h"

namespace tflite {

void PrintIntVector(const std::vector<int>& v) {
  for (const auto& it : v) {
    printf(" %d", it);
  }
  printf("\n");
}

void PrintTfLiteIntVector(const TfLiteIntArray* v) {
  if (!v) {
    printf(" (null)");
    return;
  }
  for (int k = 0; k < v->size; k++) {
    printf(" %d", v->data[k]);
  }
  printf("\n");
}

const char* TensorTypeName(TfLiteType type) {
  switch (type) {
    case kTfLiteNoType:
      return "kTfLiteNoType";
    case kTfLiteFloat32:
      return "kTfLiteFloat32";
    case kTfLiteInt32:
      return "kTfLiteInt32";
    case kTfLiteUInt8:
      return "kTfLiteUInt8";
    case kTfLiteInt64:
      return "kTfLiteInt64";
    case kTfLiteString:
      return "kTfLiteString";
  }
  return "(invalid)";
}

const char* AllocTypeName(TfLiteAllocationType type) {
  switch (type) {
    case kTfLiteMemNone:
      return "kTfLiteMemNone";
    case kTfLiteMmapRo:
      return "kTfLiteMmapRo";
    case kTfLiteDynamic:
      return "kTfLiteDynamic";
    case kTfLiteArenaRw:
      return "kTfLiteArenaRw";
    case kTfLiteArenaRwPersistent:
      return "kTfLiteArenaRwPersistent";
  }
  return "(invalid)";
}

// Prints a dump of what tensors and what nodes are in the interpreter.
void PrintInterpreterState(Interpreter* interpreter) {
  printf("Interpreter has %d tensors and %d nodes\n",
         interpreter->tensors_size(), interpreter->nodes_size());
  printf("Inputs:");
  PrintIntVector(interpreter->inputs());
  printf("Outputs:");
  PrintIntVector(interpreter->outputs());
  printf("\n");
  for (int tensor_index = 0; tensor_index < interpreter->tensors_size();
       tensor_index++) {
    TfLiteTensor* tensor = interpreter->tensor(tensor_index);
    printf("Tensor %3d %10s %15s %10zu bytes (%4.1f MB) ", tensor_index,
           TensorTypeName(tensor->type), AllocTypeName(tensor->allocation_type),
           tensor->bytes, float(tensor->bytes) / float(1 << 20));
    PrintTfLiteIntVector(tensor->dims);
    printf("\n");
  }

  for (int node_index = 0; node_index < interpreter->nodes_size();
       node_index++) {
    const std::pair<TfLiteNode, TfLiteRegistration>* node_and_reg =
        interpreter->node_and_registration(node_index);
    const TfLiteNode& node = node_and_reg->first;
    const TfLiteRegistration& reg = node_and_reg->second;
    printf("Node %3d Operator Builtin Code %3d\n", node_index,
           reg.builtin_code);
    printf("  Inputs:");
    PrintTfLiteIntVector(node.inputs);
    printf("  Outputs:");
    PrintTfLiteIntVector(node.outputs);
  }
}

// Prints a dump of what tensors and what nodes are in the interpreter.
TfLiteStatus ValidateInterpreterState(const Interpreter* interpreter);

}  // namespace tflite


text:
from distutils.core import setup

import da

setup(name = "DistAlgo",
      version = da.__version__,
      author= "bolin",
      author_email = "bolin@cs.stonybrook.edu",
      packages = ['da', 'da.compiler'])


text:
<?php

/* /views/news/update.twig */
class __TwigTemplate_fa76611529a55ed7b4eec28e8e05ba47f040c3153c6c2c891372ab148facd8e5 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = $this->env->loadTemplate("//views/layouts/zurb.twig");

        $this->blocks = array(
            'content' => array($this, 'block_content'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "//views/layouts/zurb.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 2
    public function block_content($context, array $blocks = array())
    {
        // line 3
        echo "\t";
        if (isset($context["this"])) { $_this_ = $context["this"]; } else { $_this_ = null; }
        if (isset($context["model"])) { $_model_ = $context["model"]; } else { $_model_ = null; }
        echo $this->getAttribute($_this_, "renderPartial", array(0 => "_form", 1 => array("model" => $_model_)), "method");
        echo "
";
    }

    public function getTemplateName()
    {
        return "/views/news/update.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  31 => 3,  28 => 2,);
    }
}


text:
body{
    /*display: flex;
    flex-flow: column;*/
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    height:100%;
}
.bg-dark{
    background-color: #263238;
}
.app-nav{
    height:70px;
}
.container{
    height:90%;
    flex:1;
    display:flex;
    flex-flow: column;
}

h3{
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
}

.select2-container--default.select2-container--focus .select2-selection--multiple{
    border:solid #0275d8 1px;
}

.select2-container--default .select2-selection--multiple{
    border: 1px solid #ccc;
    padding-top: 6px;
    padding-bottom: :10px;
}

.select2-selection__choice{
    background-color: #0275d8 !important;
    color: #ffffff!important;
    border: none!important;
    padding: 6px!important;
    margin: 0px !important;
    font-size: 14px;
}

.flex-container {
    height: 100%;
    padding: 0;
    margin: 0;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom_row {
    width: auto;
}

.flex-item {
    padding: 5px;
    margin: 10px;
    line-height: 20px;
    color: white;
    font-weight: bold;
    font-size: 2em;
    text-align: center;
}