/*
 Copyright 2016 OpenMarket Ltd

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

#import "MXOlmSessionResult.h"

@implementation MXOlmSessionResult

- (instancetype)initWithDevice:(MXDeviceInfo *)device andOlmSession:(NSString *)sessionId
{
    self = [self init];
    if (self)
    {
        _device = device;
        _sessionId = sessionId;
    }

    return self;
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"<MXOlmSessionResult> %@: %@", _device.deviceId, _sessionId];
}

@end

{'repo_name': 'matrix-org/matrix-ios-sdk', 'stars': '183', 'repo_language': 'Objective-C', 'file_name': 'MXContentScanResult.h', 'mime_type': 'text/x-objective-c', 'hash': 2699194137581142698, 'source_dataset': 'data'}


# Lines starting with '#' and sections without content
# are not displayed by a call to 'details'
#
[Website]
http://rootzwiki.com/_/articles/the-samsung-galaxy-s-ii-for-att-gets-todays-ics-leak-love-r582

[filters]
http://rootzwiki.com/public/style_images/social/currents.png
http://rootzwiki.com/public/style_images/social/facebook.png
http://rootzwiki.com/public/style_images/social/gplus.png
http://rootzwiki.com/public/style_images/social/rss.png
http://rootzwiki.com/public/style_images/social/twitter.png

[other]
# Any other details

[comments]
fanboy

{'repo_name': 'ryanbr/fanboy-adblock', 'stars': '230', 'repo_language': 'Shell', 'file_name': 'Readme.txt', 'mime_type': 'text/plain', 'hash': -5300597512203851975, 'source_dataset': 'data'}


/*
 * -------------------------------------------
 *    CC3220 SDK - v0.10.00.00
 * -------------------------------------------
 *
 *  Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
 *
 *    Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 *    Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the
 *    distribution.
 *
 *    Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
//*****************************************************************************
//
//  utils.c
//
//  Utility APIs
//
//*****************************************************************************

//*****************************************************************************
//
//! \addtogroup Utils_api
//! @{
//
//*****************************************************************************
#include "utils.h"

//*****************************************************************************
//
//! Provides a small delay.
//!
//! \param ulCount is the number of delay loop iterations to perform.
//!
//! This function provides a means of generating a constant length delay.  It
//! is written in assembly to keep the delay consistent across tool chains,
//! avoiding the need to tune the delay based on the tool chain in use.
//!
//! The loop takes 3 cycles/loop.
//!
//! \return None.
//
//*****************************************************************************
#if defined(ewarm) || defined(DOXYGEN)
void
UtilsDelay(unsigned long ulCount)
{
    __asm("    subs    r0, #1\n"
          "    bne.n   UtilsDelay\n");
}
#endif

#if defined(gcc)
void __attribute__((naked))
UtilsDelay(unsigned long ulCount)
{
    __asm("    subs    r0, #1\n"
          "    bne     UtilsDelay\n"
          "    bx      lr");
}
#endif

//
// For CCS implement this function in pure assembly.  This prevents the TI
// compiler from doing funny things with the optimizer.
//
#if defined(ccs)
    __asm("    .sect \".text:UtilsDelay\"\n"
          "    .clink\n"
          "    .thumbfunc UtilsDelay\n"
          "    .thumb\n"
          "    .global UtilsDelay\n"
          "UtilsDelay:\n"
          "    subs r0, #1\n"
          "    bne.n UtilsDelay\n"
          "    bx lr\n");
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

{'repo_name': 'cjlano/freertos', 'stars': '226', 'repo_language': 'C', 'file_name': 'xddrps.h', 'mime_type': 'text/x-c', 'hash': -5412193548266246916, 'source_dataset': 'data'}


@charset "UTF-8";

@import "lib/global";

/* Breadcrumb */

.pui-breadcrumb {
    padding: 0.5rem;
    margin-bottom: 2rem;
    list-style: none;
    font-size: 12px;
    font-size: 1.2rem;
    background: transparent;
    @include border-radius(2px);
}

.pui-breadcrumb li {
    display: inline-block;
}

.pui-breadcrumb li + li:before {
    color: #ddd;
    content: "/\00a0";
    padding: 0 6px;
    padding: 0 0.6rem;
}

.pui-breadcrumb li a {
    color: $link-color;

    html.no-touch &:hover, &.hover {
        text-decoration: underline;
    }
}

.pui-breadcrumb-right {
    .pui-breadcrumb {
        float: right;
    }

    @include clearfix();
}

.pui-breadcrumb-arrow li + li:before {
    font-family: "FontAwesome";
    font-size: 16px;
    padding: 0 8px 0 7px;
    content : "\F105";
}

{'repo_name': 'pandao/planeui', 'stars': '205', 'repo_language': 'CSS', 'file_name': 'scrollbar.css', 'mime_type': 'text/plain', 'hash': 1418983431689720498, 'source_dataset': 'data'}


//! moment.js locale configuration
//! locale : Frisian [fy]
//! author : Robin van der Vliet : https://github.com/robin0van0der0v

import moment from '../moment';

var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
    monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');

export default moment.defineLocale('fy', {
    months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
    monthsShort : function (m, format) {
        if (!m) {
            return monthsShortWithDots;
        } else if (/-MMM-/.test(format)) {
            return monthsShortWithoutDots[m.month()];
        } else {
            return monthsShortWithDots[m.month()];
        }
    },
    monthsParseExact : true,
    weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),
    weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'),
    weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
    weekdaysParseExact : true,
    longDateFormat : {
        LT : 'HH:mm',
        LTS : 'HH:mm:ss',
        L : 'DD-MM-YYYY',
        LL : 'D MMMM YYYY',
        LLL : 'D MMMM YYYY HH:mm',
        LLLL : 'dddd D MMMM YYYY HH:mm'
    },
    calendar : {
        sameDay: '[hjoed om] LT',
        nextDay: '[moarn om] LT',
        nextWeek: 'dddd [om] LT',
        lastDay: '[juster om] LT',
        lastWeek: '[ôfrûne] dddd [om] LT',
        sameElse: 'L'
    },
    relativeTime : {
        future : 'oer %s',
        past : '%s lyn',
        s : 'in pear sekonden',
        m : 'ien minút',
        mm : '%d minuten',
        h : 'ien oere',
        hh : '%d oeren',
        d : 'ien dei',
        dd : '%d dagen',
        M : 'ien moanne',
        MM : '%d moannen',
        y : 'ien jier',
        yy : '%d jierren'
    },
    dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
    ordinal : function (number) {
        return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
    },
    week : {
        dow : 1, // Monday is the first day of the week.
        doy : 4  // The week that contains Jan 4th is the first week of the year.
    }
});

{'repo_name': 'MiYogurt/nodelover-books', 'stars': '111', 'repo_language': 'None', 'file_name': 'settings.json', 'mime_type': 'text/plain', 'hash': 5251385939445661940, 'source_dataset': 'data'}


---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.2.9
  creationTimestamp: null
  name: machinehealthchecks.cluster.x-k8s.io
spec:
  group: cluster.x-k8s.io
  names:
    categories:
    - cluster-api
    kind: MachineHealthCheck
    listKind: MachineHealthCheckList
    plural: machinehealthchecks
    shortNames:
    - mhc
    - mhcs
    singular: machinehealthcheck
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: Maximum number of unhealthy machines allowed
      jsonPath: .spec.maxUnhealthy
      name: MaxUnhealthy
      type: string
    - description: Number of machines currently monitored
      jsonPath: .status.expectedMachines
      name: ExpectedMachines
      type: integer
    - description: Current observed healthy machines
      jsonPath: .status.currentHealthy
      name: CurrentHealthy
      type: integer
    name: v1alpha3
    schema:
      openAPIV3Schema:
        description: MachineHealthCheck is the Schema for the machinehealthchecks
          API
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: Specification of machine health check policy
            properties:
              clusterName:
                description: ClusterName is the name of the Cluster this object belongs
                  to.
                minLength: 1
                type: string
              maxUnhealthy:
                anyOf:
                - type: integer
                - type: string
                description: Any further remediation is only allowed if at most "MaxUnhealthy"
                  machines selected by "selector" are not healthy.
                x-kubernetes-int-or-string: true
              nodeStartupTimeout:
                description: Machines older than this duration without a node will
                  be considered to have failed and will be remediated.
                type: string
              selector:
                description: Label selector to match machines whose health will be
                  exercised
                properties:
                  matchExpressions:
                    description: matchExpressions is a list of label selector requirements.
                      The requirements are ANDed.
                    items:
                      description: A label selector requirement is a selector that
                        contains values, a key, and an operator that relates the key
                        and values.
                      properties:
                        key:
                          description: key is the label key that the selector applies
                            to.
                          type: string
                        operator:
                          description: operator represents a key's relationship to
                            a set of values. Valid operators are In, NotIn, Exists
                            and DoesNotExist.
                          type: string
                        values:
                          description: values is an array of string values. If the
                            operator is In or NotIn, the values array must be non-empty.
                            If the operator is Exists or DoesNotExist, the values
                            array must be empty. This array is replaced during a strategic
                            merge patch.
                          items:
                            type: string
                          type: array
                      required:
                      - key
                      - operator
                      type: object
                    type: array
                  matchLabels:
                    additionalProperties:
                      type: string
                    description: matchLabels is a map of {key,value} pairs. A single
                      {key,value} in the matchLabels map is equivalent to an element
                      of matchExpressions, whose key field is "key", the operator
                      is "In", and the values array contains only "value". The requirements
                      are ANDed.
                    type: object
                type: object
              unhealthyConditions:
                description: UnhealthyConditions contains a list of the conditions
                  that determine whether a node is considered unhealthy.  The conditions
                  are combined in a logical OR, i.e. if any of the conditions is met,
                  the node is unhealthy.
                items:
                  description: UnhealthyCondition represents a Node condition type
                    and value with a timeout specified as a duration.  When the named
                    condition has been in the given status for at least the timeout
                    value, a node is considered unhealthy.
                  properties:
                    status:
                      minLength: 1
                      type: string
                    timeout:
                      type: string
                    type:
                      minLength: 1
                      type: string
                  required:
                  - status
                  - timeout
                  - type
                  type: object
                minItems: 1
                type: array
            required:
            - clusterName
            - selector
            - unhealthyConditions
            type: object
          status:
            description: Most recently observed status of MachineHealthCheck resource
            properties:
              currentHealthy:
                description: total number of healthy machines counted by this machine
                  health check
                format: int32
                minimum: 0
                type: integer
              expectedMachines:
                description: total number of machines counted by this machine health
                  check
                format: int32
                minimum: 0
                type: integer
              observedGeneration:
                description: ObservedGeneration is the latest generation observed
                  by the controller.
                format: int64
                type: integer
              targets:
                description: Targets shows the current list of machines the machine
                  health check is watching
                items:
                  type: string
                type: array
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []

{'repo_name': 'kubernetes-sigs/cluster-api', 'stars': '1273', 'repo_language': 'Go', 'file_name': 'filters.go', 'mime_type': 'text/plain', 'hash': -5453108185783755484, 'source_dataset': 'data'}


//
//  Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//

import Foundation
import XCTest
import SignalServiceKit

class ThreadFinderPerformanceTest: PerformanceBaseTest {

    func testYDBPerf_enumerateVisibleThreads() {
        storageCoordinator.useYDBForTests()
        measureMetrics(XCTestCase.defaultPerformanceMetrics, automaticallyStartMeasuring: false) {
            enumerateVisibleThreads(isArchived: false)
        }
    }

    func testYDBPerf_enumerateVisibleThreads_isArchived() {
        storageCoordinator.useYDBForTests()
        measureMetrics(XCTestCase.defaultPerformanceMetrics, automaticallyStartMeasuring: false) {
            enumerateVisibleThreads(isArchived: true)
        }
    }

    func testGRDBPerf_enumerateVisibleThreads() {
        storageCoordinator.useGRDBForTests()
        measureMetrics(XCTestCase.defaultPerformanceMetrics, automaticallyStartMeasuring: false) {
            enumerateVisibleThreads(isArchived: false)
        }
    }

    func testGRDBPerf_enumerateVisibleThreads_isArchived() {
        storageCoordinator.useGRDBForTests()
        measureMetrics(XCTestCase.defaultPerformanceMetrics, automaticallyStartMeasuring: false) {
            enumerateVisibleThreads(isArchived: true)
        }
    }

    func enumerateVisibleThreads(isArchived: Bool) {
        // To properly stress YDB and GRDB, we want a large number
        // of threads with a large number of messages.
        //
        // NOTE: the total thread count is 4 x threadCount.
        let threadCount = 100
        var emptyThreads = [TSThread]()
        var hasMessageThreads = [TSThread]()
        var archivedThreads = [TSThread]()
        var unarchivedThreads = [TSThread]()
        for _ in 0..<threadCount {
            emptyThreads.append(insertThread(threadType: .empty))
            hasMessageThreads.append(insertThread(threadType: .hasMessage))
            archivedThreads.append(insertThread(threadType: .archived))
            unarchivedThreads.append(insertThread(threadType: .unarchived))
        }

        XCTAssertEqual(threadCount, emptyThreads.count)
        XCTAssertEqual(threadCount, hasMessageThreads.count)
        XCTAssertEqual(threadCount, archivedThreads.count)
        XCTAssertEqual(threadCount, unarchivedThreads.count)

        read { transaction in
            XCTAssertEqual(threadCount * 4, TSThread.anyFetchAll(transaction: transaction).count)

            let expectedMessageCount = (
                // .hasMessage
                (threadCount * self.threadMessageCount) +
                // .archived
                (threadCount * self.threadMessageCount) +
                // .unarchived
                (threadCount * (self.threadMessageCount + 1))
                        )
            XCTAssertEqual(expectedMessageCount, TSInteraction.anyFetchAll(transaction: transaction).count)
        }

        // Note that we enumerate _twice_ (archived & non-archived)
        let readCount = 10

        read { transaction in
            self.startMeasuring()
            for _ in 0..<readCount {
                var observedCount = 0
                do {
                    try AnyThreadFinder().enumerateVisibleThreads(isArchived: isArchived, transaction: transaction) { _ in
                        observedCount += 1
                    }
                } catch {
                    owsFailDebug("Error: \(error)")
                }
                let expectedArchivedCount = threadCount * 1
                let expectedUnarchivedCount = threadCount * 2
                let expectedCount = isArchived ? expectedArchivedCount : expectedUnarchivedCount
                XCTAssertEqual(expectedCount, observedCount)
            }
            self.stopMeasuring()
        }

        // cleanup for next iteration
        write { transaction in
            TSThread.anyRemoveAllWithInstantation(transaction: transaction)
            TSInteraction.anyRemoveAllWithInstantation(transaction: transaction)
        }
    }

    // MARK: - insertThreads

    enum ThreadType: Int {
        case empty
        case hasMessage
        case archived
        case unarchived
    }

    func insertThreads(count: Int, threadType: ThreadType) -> [TSThread] {
        var result = [TSThread]()
        for _ in 0..<count {
            result.append(insertThread(threadType: threadType))
        }
        return result
    }

    private let threadMessageCount = 10

    func insertThread(threadType: ThreadType) -> TSThread {
        // .empty
        let contactThread = ContactThreadFactory().create()
        XCTAssertFalse(contactThread.shouldThreadBeVisible)
        XCTAssertFalse(contactThread.isArchived)
        if threadType == .empty {
            return contactThread
        }

        // .hasMessage
        let messageFactory = OutgoingMessageFactory()
        messageFactory.threadCreator = { _ in return contactThread }
        write { transaction in
            if let latestThread = TSThread.anyFetch(uniqueId: contactThread.uniqueId, transaction: transaction) {
                XCTAssertFalse(latestThread.shouldThreadBeVisible)
                XCTAssertFalse(latestThread.isArchived)
            } else {
                XCTFail("Missing thread.")
            }

            // YDB perf suffers with large numbers of messages,
            // so the larger the value here, the better.
            for _ in 0..<self.threadMessageCount {
                let message = messageFactory.build(transaction: transaction)
                message.anyInsert(transaction: transaction)
            }

            if let latestThread = TSThread.anyFetch(uniqueId: contactThread.uniqueId, transaction: transaction) {
                XCTAssertTrue(latestThread.shouldThreadBeVisible)
                XCTAssertFalse(latestThread.isArchived)
            } else {
                XCTFail("Missing thread.")
            }
        }
        if threadType == .hasMessage {
            return contactThread
        }

        // .archived
        write { transaction in
            if let latestThread = TSThread.anyFetch(uniqueId: contactThread.uniqueId, transaction: transaction) {
                XCTAssertTrue(latestThread.shouldThreadBeVisible)
                XCTAssertFalse(latestThread.isArchived)
            } else {
                XCTFail("Missing thread.")
            }

            contactThread.archiveThread(updateStorageService: false, transaction: transaction)

            if let latestThread = TSThread.anyFetch(uniqueId: contactThread.uniqueId, transaction: transaction) {
                XCTAssertTrue(latestThread.shouldThreadBeVisible)
                XCTAssertTrue(latestThread.isArchived)
            } else {
                XCTFail("Missing thread.")
            }
        }
        if threadType == .archived {
            return contactThread
        }

        // .unarchived
        write { transaction in
            if let latestThread = TSThread.anyFetch(uniqueId: contactThread.uniqueId, transaction: transaction) {
                XCTAssertTrue(latestThread.shouldThreadBeVisible)
                XCTAssertTrue(latestThread.isArchived)
            } else {
                XCTFail("Missing thread.")
            }

            let message = messageFactory.build(transaction: transaction)
            message.anyInsert(transaction: transaction)

            if let latestThread = TSThread.anyFetch(uniqueId: contactThread.uniqueId, transaction: transaction) {
                XCTAssertTrue(latestThread.shouldThreadBeVisible)
                XCTAssertFalse(latestThread.isArchived)
            } else {
                XCTFail("Missing thread.")
            }
        }

        return contactThread
    }
}

{'repo_name': 'signalapp/Signal-iOS', 'stars': '4998', 'repo_language': 'Swift', 'file_name': 'README.md', 'mime_type': 'text/plain', 'hash': 7310152109633552403, 'source_dataset': 'data'}


using System;
using System.Threading.Tasks;
using Autofac;
using Crosschat.Server.Infrastructure.Transport;
using Crosschat.Utils.Logging;

namespace Crosschat.Server.ConsoleHost
{
    class Program
    {
        static void Main(string[] args)
        {
            var container = Bootstrapper.Run();
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_OnUnhandledException;
            TaskScheduler.UnobservedTaskException += TaskScheduler_OnUnobservedTaskException;
            Console.WriteLine("Bootstrapper is ran.");
            string command = "";
            while (command != "exit")
            {
                if (command == "stat") //show statistics
                {
                    var measurer = container.Resolve<TransportPerformanceMeasurer>();
                    Console.WriteLine("Sent: {0} ({2} commands),  Received: {1} ({3} commands). MaxCommandSize: {4}, TotalConnections: {5}",
                        StringExtensions.ToShortSizeInBytesString(measurer.SentBytes),
                        StringExtensions.ToShortSizeInBytesString(measurer.ReceivedBytes),
                        measurer.SentCommands, measurer.ReceivedCommands, StringExtensions.ToShortSizeInBytesString(measurer.MaxCommandSize), measurer.TotalConnections);
                }
                command = Console.ReadLine();
            }
        }

        private static void TaskScheduler_OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
        {
            LogFactory.GetLogger<Program>().Exception(e.Exception);
        }

        private static void CurrentDomain_OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            LogFactory.GetLogger<Program>().Exception(e.ExceptionObject as Exception);
        }
    }
}

{'repo_name': 'EgorBo/CrossChat-Xamarin.Forms', 'stars': '310', 'repo_language': 'C#', 'file_name': 'AssemblyInfo.cs', 'mime_type': 'text/plain', 'hash': -8796334963374532315, 'source_dataset': 'data'}


/**
  \addtogroup sample_consensus Module sample_consensus

  \section secSampleConsensusPresentation Overview

  The pcl_sample_consensus library holds SAmple Consensus (SAC) methods like
  RANSAC and models like planes and cylinders.  These can
  combined freely in order to detect specific models and their parameters in point clouds.

  Some of the models implemented in this library include: lines, planes, cylinders, and spheres.  Plane fitting
  is often applied to the task of detecting common indoor surfaces, such as walls, floors, and table tops.
  Other models can be used to detect and segment objects with common geometric structures  (e.g., fitting a cylinder
  model to a mug).

  \image html http://www.pointclouds.org/assets/images/contents/documentation/sample_consensus_planes_cylinders.png

  The following models are supported:

\link pcl::SampleConsensusModelPlane SACMODEL_PLANE \endlink - used to determine plane models. The four coefficients of the plane are its Hessian Normal form: [normal_x normal_y normal_z d]

\link pcl::SampleConsensusModelLine SACMODEL_LINE \endlink - used to determine line models. The six coefficients of the line are given by a point on the line and the direction of the line as: [point_on_line.x point_on_line.y point_on_line.z line_direction.x line_direction.y line_direction.z]

\link pcl::SampleConsensusModelCircle2D SACMODEL_CIRCLE2D \endlink - used to determine 2D circles in a plane. The circle's three coefficients are given by its center and radius as: [center.x center.y radius]

\link pcl::SampleConsensusModelCircle3D SACMODEL_CIRCLE3D \endlink - used to determine 3D circles in a plane. The circle's seven coefficients are given by its center, radius and normal as: [center.x, center.y, center.z, radius, normal.x, normal.y, normal.z]

\link pcl::SampleConsensusModelSphere SACMODEL_SPHERE \endlink - used to determine sphere models. The four coefficients of the sphere are given by its 3D center and radius as: [center.x center.y center.z radius]

\link pcl::SampleConsensusModelCylinder SACMODEL_CYLINDER \endlink - used to determine cylinder models. The seven coefficients of the cylinder are given by a point on its axis, the axis direction, and a radius, as: [point_on_axis.x point_on_axis.y point_on_axis.z axis_direction.x axis_direction.y axis_direction.z radius]

\link pcl::SampleConsensusModelCone SACMODEL_CONE \endlink - used to determine cone models. The seven coefficients of the cone are given by a point of its apex, the axis direction and the opening angle, as: [apex.x, apex.y, apex.z, axis_direction.x, axis_direction.y, axis_direction.z, opening_angle]

SACMODEL_TORUS - not implemented yet

\link pcl::SampleConsensusModelParallelLine SACMODEL_PARALLEL_LINE \endlink - a model for determining a line parallel with a given axis, within a maximum specified angular deviation. The line coefficients are similar to \link pcl::SampleConsensusModelLine SACMODEL_LINE \endlink.

\link pcl::SampleConsensusModelPerpendicularPlane SACMODEL_PERPENDICULAR_PLANE \endlink - a model for determining a plane perpendicular to a user-specified axis, within a maximum specified angular deviation. The plane coefficients are similar to \link pcl::SampleConsensusModelPlane SACMODEL_PLANE \endlink.

SACMODEL_PARALLEL_LINES - not implemented yet

\link pcl::SampleConsensusModelNormalPlane SACMODEL_NORMAL_PLANE \endlink - a model for determining plane models using an additional constraint: the surface normals at each inlier point has to be parallel to the surface normal of the output plane, within a maximum specified angular deviation. The plane coefficients are similar to \link pcl::SampleConsensusModelPlane SACMODEL_PLANE \endlink.

\link pcl::SampleConsensusModelNormalSphere SACMODEL_NORMAL_SPHERE \endlink - similar to \link pcl::SampleConsensusModelSphere SACMODEL_SPHERE \endlink, but with additional surface normal constraints.

\link pcl::SampleConsensusModelParallelPlane SACMODEL_PARALLEL_PLANE \endlink - a model for determining a plane parallel to a user-specified axis, within a maximum specified angular deviation. The plane coefficients are similar to \link pcl::SampleConsensusModelPlane SACMODEL_PLANE \endlink.

\link pcl::SampleConsensusModelNormalParallelPlane SACMODEL_NORMAL_PARALLEL_PLANE \endlink defines a model for 3D plane segmentation using additional surface normal constraints. The plane normal must lie parallel to a user-specified axis. SACMODEL_NORMAL_PARALLEL_PLANE therefore is equivalent to SACMODEL_NORMAL_PLANE + SACMODEL_PERPENDICULAR_PLANE. The plane coefficients are similar to \link pcl::SampleConsensusModelPlane SACMODEL_PLANE \endlink.

\link pcl::SampleConsensusModelStick SACMODEL_STICK \endlink - a model for 3D stick segmentation. A stick is a line with a user given minimum/maximum width.

  The following list describes the robust sample consensus estimators implemented:

SAC_RANSAC - RANdom SAmple Consensus

SAC_LMEDS - Least Median of Squares

SAC_MSAC - M-Estimator SAmple Consensus

SAC_RRANSAC - Randomized RANSAC

SAC_RMSAC - Randomized MSAC

SAC_MLESAC - Maximum LikeLihood Estimation SAmple Consensus

SAC_PROSAC - PROgressive SAmple Consensus

  By default, if you're not familiar with most of the above estimators and how they operate, use RANSAC to test your hypotheses.

	\section secSampleConsensusRequirements Requirements
	- \ref common "common"

*/

{'repo_name': 'PointCloudLibrary/pcl', 'stars': '5251', 'repo_language': 'C++', 'file_name': 'vtkVertexBufferObjectMapper.h', 'mime_type': 'text/x-c++', 'hash': 5832225179430966686, 'source_dataset': 'data'}


# Low Latency Passthrough with volume Pipeline and PCM
#
# Pipeline Endpoints for connection are :-
#
#  host PCM_P --> B0 --> DCBLOCK 0 --> B1 --> Volume 0 --> B2 --> sink DAI0

# Include topology builder
include(`utils.m4')
include(`buffer.m4')
include(`pcm.m4')
include(`pga.m4')
include(`dai.m4')
include(`mixercontrol.m4')
include(`bytecontrol.m4')
include(`pipeline.m4')
include(`dcblock.m4')

#
# Controls
#
# Volume Mixer control with max value of 32
C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
	CONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256),
	CONTROLMIXER_MAX(, 32),
	false,
	CONTROLMIXER_TLV(TLV 32 steps from -64dB to 0dB for 2dB, vtlv_m64s2),
	Channel register and shift for Front Left/Right,
	LIST(`	', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))

#
# Volume configuration
#
define(MY_PGA_TOKENS, concat(`pga_tokens_', PIPELINE_ID))
define(MY_PGA_CONF, concat(`pga_conf_', PIPELINE_ID))
W_VENDORTUPLES(MY_PGA_TOKENS, sof_volume_tokens,
LIST(`		', `SOF_TKN_VOLUME_RAMP_STEP_TYPE	"2"'
     `		', `SOF_TKN_VOLUME_RAMP_STEP_MS		"20"'))

W_DATA(MY_PGA_CONF, MY_PGA_TOKENS)

define(DCBLOCK_priv, concat(`dcblock_bytes_', PIPELINE_ID))
define(MY_DCBLOCK_CTRL, concat(`dcblock_control_', PIPELINE_ID))
include(`dcblock_coef_default.m4')
# DC Block Bytes control with max value of 156
# The max size needs to also take into account the space required to hold the control data IPC message
# struct sof_ipc_ctrl_data requires 92 bytes
# DCBLOCK priv in dcblock_coef_default.m4 (ABI header (32 bytes) + 8 dwords) requires 64 bytes
# Therefore at least 156 bytes are required for this kcontrol
# Any value lower than that would end up in a topology load error
 C_CONTROLBYTES(MY_DCBLOCK_CTRL, PIPELINE_ID,
      CONTROLBYTES_OPS(bytes, 258 binds the control to bytes get/put handlers, 258, 258),
      CONTROLBYTES_EXTOPS(258 binds the control to bytes get/put handlers, 258, 258),
      , , ,
      CONTROLBYTES_MAX(, 156),
      ,
      DCBLOCK_priv)

#
# Components and Buffers
#

# Host "Passthrough Playback" PCM
# with 2 sink and 0 source periods
W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0, SCHEDULE_CORE)

# "Volume" has 2 source and x sink periods
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, MY_PGA_CONF, SCHEDULE_CORE,
	LIST(`		', "PIPELINE_ID Master Playback Volume"))

# "DC Block" has 2 sink periods and 2 source periods
W_DCBLOCK(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE,
	LIST(`   ', "MY_DCBLOCK_CTRL"))

# Playback Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(2,
	COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
	PLATFORM_HOST_MEM_CAP)
W_BUFFER(1, COMP_BUFFER_SIZE(2,
	COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
	PLATFORM_HOST_MEM_CAP)
W_BUFFER(2, COMP_BUFFER_SIZE(DAI_PERIODS,
	COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
	PLATFORM_DAI_MEM_CAP)

#
# Pipeline Graph
#
#  host PCM_P --> B0 --> DCBLOCK 0 --> B1 --> Volume 0 --> B2 --> sink DAI0
P_GRAPH(pipe-pass-vol-playback-PIPELINE_ID, PIPELINE_ID,
	LIST(`		',
	`dapm(N_BUFFER(0), N_PCMP(PCM_ID))',
	`dapm(N_DCBLOCK(0), N_BUFFER(0))',
	`dapm(N_BUFFER(1), N_DCBLOCK(0))',
	`dapm(N_PGA(0), N_BUFFER(1))',
	`dapm(N_BUFFER(2), N_PGA(0))'))

#
# Pipeline Source and Sinks
#
indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(2))
indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_ID)

#
# PCM Configuration
#
PCM_CAPABILITIES(Passthrough Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)

undefine(`MY_DCBLOCK_CTRL')
undefine(`DCBLOCK_priv')
undefine(`MY_PGA_CONF')
undefine(`MY_PGA_TOKENS')

{'repo_name': 'thesofproject/sof', 'stars': '157', 'repo_language': 'C', 'file_name': 'CMakeLists.txt', 'mime_type': 'text/plain', 'hash': -8010702579850163316, 'source_dataset': 'data'}


/*=============================================================================
    Copyright (c) 2001-2007 Joel de Guzman

    Distributed under the Boost Software License, Version 1.0. (See accompanying
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_CONS_TIE)
#define FUSION_INCLUDE_CONS_TIE

#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/generation/cons_tie.hpp>

#endif

{'repo_name': 'CheckPointSW/InviZzzible', 'stars': '246', 'repo_language': 'C++', 'file_name': 'stack.hpp', 'mime_type': 'text/x-c', 'hash': -2990889547138078520, 'source_dataset': 'data'}


--
-- Copyright (C) 2017-2019 Dremio Corporation
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
--     http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--

-- tpch4 using 1395599672 as a seed to the RNG
select
  o.o_orderpriority,
  count(*) as order_count
from
  cp.`tpch/orders.parquet` o

where
  o.o_orderdate >= date '1996-10-01'
  and o.o_orderdate < date '1996-10-01' + interval '3' month
  and
  exists (
    select
      *
    from
      cp.`tpch/lineitem.parquet` l
    where
      l.l_orderkey = o.o_orderkey
      and l.l_commitdate < l.l_receiptdate
  )
group by
  o.o_orderpriority
order by
  o.o_orderpriority;

{'repo_name': 'dremio/dremio-oss', 'stars': '738', 'repo_language': 'Java', 'file_name': 'Hive3PluginOptions.java', 'mime_type': 'text/x-java', 'hash': -2980295338757495744, 'source_dataset': 'data'}


/*
 * Copyright (c) 2010 SimpleServer authors (see CONTRIBUTORS)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package simpleserver.command;

import simpleserver.Authenticator;
import simpleserver.Color;
import simpleserver.Player;

public class RegisterCommand extends AbstractCommand implements PlayerCommand {

  public RegisterCommand() {
    super("register [OLD PASSWORD] NEW_PASSWORD NEW_PASSWORD", "Set or change password for CustAuth.");
  }

  public void execute(Player player, String message) {

    Authenticator auth = player.getServer().authenticator;
    if (!auth.allowRegistration()) {
      player.addTMessage(Color.RED, "Registration failed! CustAuth registration currently not allowed.");
      return;
    }
    if (player.isGuest()) {
      player.addTMessage(Color.RED, "You cannot use the CustAuth registration if you are a Guest on the Server.");
      return;
    }

    String[] arguments = extractArguments(message);
    if (arguments.length == 2) {
      // registration
      registration(player, arguments, auth);
    } else if (arguments.length == 3) {
      // password change
      changePassword(player, arguments, auth);
    } else {
      player.addTMessage(Color.RED, "Wrong number of arguments!");
    }
  }

  private void changePassword(Player player, String[] arguments, Authenticator auth) {
    String oldPw = arguments[0];
    String newPw1 = arguments[1];
    String newPw2 = arguments[2];

    if (!auth.isRegistered(player.getName())) {
      player.addTMessage(Color.RED, "You are not registered yet!");
      return;
    }

    if (checkPasswordFormat(player, newPw1)) {
      if (newPw1.equals(newPw2)) {

        if (auth.changePassword(player, oldPw, newPw1)) {
          player.addTMessage(Color.GRAY, "Passwords successfully changed!");
        } else {
          player.addTMessage(Color.RED, "Your old password seems incorrect!");
        }
      } else {
        player.addTMessage(Color.RED, "New passwords do not match!");
      }
    }

  }

  private void registration(Player player, String[] arguments, Authenticator auth) {
    String newPw1 = arguments[0];
    String newPw2 = arguments[1];

    if (auth.isRegistered(player.getName())) {
      player.addTMessage(Color.RED, "You are already registered!");
      return;
    }

    if (checkPasswordFormat(player, newPw1)) {
      if (newPw1.equals(newPw2)) {

        auth.register(player.getName(), newPw1);
        player.addTMessage(Color.GRAY, "Registration successful!");
      } else {
        player.addTMessage(Color.RED, "New passwords do not match!");
      }
    }
  }

  private boolean checkPasswordFormat(Player player, String pw) {
    boolean r = (pw.length() >= 4 && pw.length() <= 10);
    if (!r) {
      player.addTMessage(Color.RED, "The password must contain 4 to 10 characters.");
    }
    return r;
  }
}

{'repo_name': 'SimpleServer/SimpleServer', 'stars': '117', 'repo_language': 'Java', 'file_name': 'org.eclipse.core.resources.prefs', 'mime_type': 'text/plain', 'hash': 8727515168099894583, 'source_dataset': 'data'}


<?php

/*
 * This file is part of PHPExifTool.
 *
 * (c) 2012 Romain Neutron <imprec@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace PHPExiftool\Driver\Tag\Qualcomm;

use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;

/**
 * @ExclusionPolicy("all")
 */
class ASF5Filter2A12 extends AbstractTag
{

    protected $Id = 'asf5_filter2_a12';

    protected $Name = 'ASF5Filter2A12';

    protected $FullName = 'Qualcomm::Main';

    protected $GroupName = 'Qualcomm';

    protected $g0 = 'MakerNotes';

    protected $g1 = 'Qualcomm';

    protected $g2 = 'Camera';

    protected $Type = '?';

    protected $Writable = false;

    protected $Description = 'ASF5 Filter2 A12';

    protected $flag_Permanent = true;
}

{'repo_name': 'romainneutron/PHPExiftool', 'stars': '112', 'repo_language': 'PHP', 'file_name': 'MetadataBagTest.php', 'mime_type': 'text/x-php', 'hash': -2354625534739957758, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<!--

    ***************************************************************************
    Copyright (c) 2010 Qcadoo Limited
    Project: Qcadoo MES
    Version: 1.4

    This file is part of Qcadoo.

    Qcadoo is free software; you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation; either version 3 of the License,
    or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty
    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    ***************************************************************************

-->
<view defaultAuthorizationRole="ROLE_REQUIREMENTS" name="deliveriesList" modelName="delivery" menuAccessible="true"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/view"
      xsi:schemaLocation="http://schema.qcadoo.org/view http://schema.qcadoo.org/view.xsd">

    <component type="window" name="window" reference="window">

        <ribbon>
            <group name="actions">
                <bigButton name="new" icon="newIcon24.png" state="enabled" action="#{grid}.performNew;" accesskey="n"/>
                <smallButton name="copy" icon="copyIcon16.png" state="disabled" action="#{grid}.performCopy;"
                             accesskey="c">
                    <script><![CDATA[
                #{grid}.addOnChangeListener({
                	onChange: function(selectedArray) {
                		if (selectedArray.length == 0) {
                			this.disable();
                		} else {
                			this.enable();
                		}
                	}
                });
			]]></script>
                </smallButton>
                <smallButton name="delete" icon="deleteIcon16.png" state="disabled" action="#{grid}.performDelete;"
                             accesskey="d">
                    <script><![CDATA[
                #{grid}.addOnChangeListener({
                	onChange: function(selectedArray) {
                		if (selectedArray.length == 0) {
                			this.disable();
                		} else {
                			this.enable();
                		}
                	}
                });
			]]></script>
                </smallButton>
            </group>
            <group name="actions">
                <bigButton name="refresh" icon="updateIcon24.png" state="enabled" action="#{grid}.performRefresh;"
                           accesskey="r"
                        />
            </group>
            <group name="states" if="#view.getComponentByReference('grid').dataDefinition.activable"
                   defaultAuthorizationRole="ROLE_DELIVERIES_EDIT">
                <smallButton name="activate" icon="unactiveVisibleIcon.png" state="disabled"
                             action="#{grid}.performActivate;">
                    <script><![CDATA[
                #{grid}.addOnChangeListener({
                	onChange: function(selectedArray) {
                		if (selectedArray.length == 0) {
                			this.disable();
                		} else {
                			this.enable();
                		}
                	}
                });
			]]></script>
                </smallButton>
                <smallButton name="deactivate" icon="unactiveNotVisibleIcon.png" state="disabled"
                             action="#{grid}.performDeactivate;">
                    <script><![CDATA[
                #{grid}.addOnChangeListener({
                	onChange: function(selectedArray) {
                		if (selectedArray.length == 0) {
                			this.disable();
                		} else {
                			this.enable();
                		}
                	}
                });
			]]></script>
                </smallButton>
            </group>
            <group name="genericExport">
                <smallButton name="csv" state="enabled" icon="exportToCsvIcon16.png">
                    <script>
                        <![CDATA[
					this.addOnChangeListener({
						onClick: function() {
							#{grid}.performEvent('exportToCsv', [], 'exportToCsv');
						}
					});
				]]>
                    </script>
                </smallButton>
                <smallButton name="pdf" state="enabled" icon="pdfIcon16.png">
                    <script>
                        <![CDATA[
					this.addOnChangeListener({
						onClick: function() {
							#{grid}.performEvent('exportToPdf', [], 'exportToPdf');
						}
					});
				]]>
                    </script>
                </smallButton>
            </group>
            <group name="status">
                <smallButton name="accept" icon="startIcon16.png" state="disabled">
                    <script>
                        <![CDATA[
							this.addOnChangeListener({
								onClick: function() {
									if (this.state == "draft") {
										if (window.confirm("#{translate(deliveries.deliveryDetails.window.ribbon.status.accept.confirm)}")) {
											#{grid}.performEvent('changeState', ['02prepared']);
										};
									} else if (this.state == "receive") {
										if (window.confirm("#{translate(deliveries.deliveryDetails.window.ribbon.status.receiveDelivery.confirm)}")) {
											#{grid}.performEvent('changeState', ['06received']);
										};
									}
								}
							});
						]]>
                    </script>
                </smallButton>
                <smallButton name="declineDelivery" icon="deleteIcon16.png"
                             state="disabled">
                    <script>
                        <![CDATA[
							this.addOnChangeListener({
								onClick: function() {
									if (window.confirm("#{translate(deliveries.deliveryDetails.window.ribbon.status.declineDelivery.confirm)}")) {
										#{grid}.performEvent('changeState', ['04declined']);
									};
								}
							});
						]]>
                    </script>
                </smallButton>
                <smallButton name="approveDelivery" icon="acceptIcon16.png"
                             state="disabled">
                    <script>
                        <![CDATA[
							this.addOnChangeListener({
								onClick: function() {
									if (window.confirm("#{translate(deliveries.deliveryDetails.window.ribbon.status.approveDelivery.confirm)}")) {
										#{grid}.performEvent('changeState', ['05approved']);
									};
								}
							});
						]]>
                    </script>
                </smallButton>
                <smallButton name="correctOrder" icon="startIcon16.png"
                             state="disabled">
                    <script>
                        <![CDATA[
							this.addOnChangeListener({
								onClick: function() {
                                    if (window.confirm("#{translate(deliveries.deliveryDetails.window.ribbon.status.correctOrder.confirm)}")) {
                                        #{grid}.performEvent('changeState', ['03duringCorrection']);
                                    };
								}
							});
						]]>
                    </script>
                </smallButton>
            </group>
        </ribbon>

        <windowTab name="mainTab" reference="mainTab">
            <component type="form" name="delivery" reference="delivery"/>

            <component type="grid" name="deliveriesList" reference="grid">
                <script>
                    <![CDATA[
						var copyBtn = #{window}.getRibbonItem("actions.copy");
						var deleteBtn = #{window}.getRibbonItem("actions.delete");

						var acceptBtn = #{window}.getRibbonItem("status.accept");
						var declineDeliveryBtn = #{window}.getRibbonItem("status.declineDelivery");
						var approveDeliveryBtn = #{window}.getRibbonItem("status.approveDelivery");
						var correctDeliveryBtn = #{window}.getRibbonItem("status.correctOrder");

						var listener = {
							onChange: function(selectedEntitiesArray) {
								if (!selectedEntitiesArray || selectedEntitiesArray.length == 0) {
									copyBtn.disable();
									deleteBtn.disable();
									acceptBtn.disable();
									declineDeliveryBtn.disable();
									approveDeliveryBtn.disable();
									correctDeliveryBtn.disable();
								} else {
									var noDifferentStates = true;
	 								if(selectedEntitiesArray.length > 1)
									{
										for (var i = selectedEntitiesArray.length-1 ; i > 0 ; i--) {
											if (selectedEntitiesArray[i-1].fields.state != selectedEntitiesArray[i].fields.state
											|| selectedEntitiesArray[i-1].fields.externalSynchronized == '0'
											|| selectedEntitiesArray[i].fields.externalSynchronized == '0') {
												noDifferentStates = false;
												break;
											}
										}
									}
									if (selectedEntitiesArray.length == 1 || noDifferentStates) {
										var state = selectedEntitiesArray[0].fields.state;

										if (state == "01draft") {
											deleteBtn.enable();
											acceptBtn.enable();
											acceptBtn.state = "draft";
											acceptBtn.setLabel("#{translate(deliveries.deliveryDetails.window.ribbon.status.accept)}");
											acceptBtn.setIcon('startIcon16.png');
											declineDeliveryBtn.enable();
											declineDeliveryBtn.state = "decline";
											declineDeliveryBtn.setLabel("#{translate(deliveries.deliveryDetails.window.ribbon.status.declineDelivery)}");
											declineDeliveryBtn.setIcon('deleteIcon16.png');
											approveDeliveryBtn.enable();
											correctDeliveryBtn.disable();
										} else if (state == "02prepared") {
											deleteBtn.disable();
											acceptBtn.disable();
											acceptBtn.state = "prepare";
											acceptBtn.setLabel("#{translate(deliveries.deliveryDetails.window.ribbon.status.receiveDelivery)}");
											acceptBtn.setIcon('acceptIcon16.png');
											declineDeliveryBtn.enable();
											declineDeliveryBtn.state = "decline";
											declineDeliveryBtn.setLabel("#{translate(deliveries.deliveryDetails.window.ribbon.status.declineDelivery)}");
											declineDeliveryBtn.setIcon('deleteIcon16.png');
											approveDeliveryBtn.enable();
											correctDeliveryBtn.enable();
										} else if (state == "03duringCorrection") {
											deleteBtn.disable();
											acceptBtn.disable();
											acceptBtn.state = "correct";
											acceptBtn.setLabel("#{translate(deliveries.deliveryDetails.window.ribbon.status.receiveDelivery)}");
											acceptBtn.setIcon('acceptIcon16.png');
											declineDeliveryBtn.enable();
											declineDeliveryBtn.state = "decline";
											declineDeliveryBtn.setLabel("#{translate(deliveries.deliveryDetails.window.ribbon.status.declineDelivery)}");
											declineDeliveryBtn.setIcon('deleteIcon16.png');
											approveDeliveryBtn.enable();
											correctDeliveryBtn.disable();
										} else if (state == "05approved"){
											deleteBtn.disable();
											acceptBtn.enable();
											acceptBtn.state = "receive";
											acceptBtn.setLabel("#{translate(deliveries.deliveryDetails.window.ribbon.status.receiveDelivery)}");
											acceptBtn.setIcon('acceptIcon16.png');
											declineDeliveryBtn.enable();
											declineDeliveryBtn.state = "decline";
											declineDeliveryBtn.setLabel("#{translate(deliveries.deliveryDetails.window.ribbon.status.declineDelivery)}");
											declineDeliveryBtn.setIcon('deleteIcon16.png');
											approveDeliveryBtn.disable();
											correctDeliveryBtn.enable();
										} else if (state == "06received"){
											deleteBtn.disable();
											acceptBtn.disable();
											declineDeliveryBtn.disable();
											approveDeliveryBtn.disable();
											correctDeliveryBtn.disable();
										} else {
											deleteBtn.enable();
											acceptBtn.disable();
											declineDeliveryBtn.disable();
											approveDeliveryBtn.disable();
											correctDeliveryBtn.disable();
										}
									} else {
										deleteBtn.disable("#{translate(deliveries.deliveriesList.ribbon.message.deliveriesWithDifferentStatesSelected)}");
										acceptBtn.disable("#{translate(deliveries.deliveriesList.ribbon.message.deliveriesWithDifferentStatesSelected)}");
										declineDeliveryBtn.disable("#{translate(deliveries.deliveriesList.ribbon.message.deliveriesWithDifferentStatesSelected)}");
										approveDeliveryBtn.disable("#{translate(deliveries.deliveriesList.ribbon.message.deliveriesWithDifferentStatesSelected)}");
										correctDeliveryBtn.disable("#{translate(deliveries.deliveriesList.ribbon.message.deliveriesWithDifferentStatesSelected)}");
									}
									copyBtn.enable();
								}
							}
						}

						this.addOnChangeListener(listener);
					]]>
                </script>

                <option type="column" name="number" fields="number" link="true" width="50"/>
                <option type="column" name="name" fields="name" link="true" width="100"/>
                <option type="column" name="supplierName" fields="supplier"
                        expression="#supplier['name']"/>
                <option type="column" name="deliveryDate" fields="deliveryDate" width="100"/>
                <option type="column" name="state" fields="state"/>
                <option type="column" name="createDate" fields="createDate" width="100"/>

                <option type="order" column="number" direction="desc"/>

                <option type="searchable" value="name,number,supplierName,deliveryDate,state,createDate"/>
                <option type="orderable" value="name,number,supplierName,deliveryDate,state,createDate"/>

                <option type="correspondingView" value="deliveries/deliveryDetails"/>
                <option type="correspondingComponent" value="form"/>

                <option type="fullscreen" value="true"/>
                <option type="multiselect" value="true"/>

                <criteriaModifier class="com.qcadoo.mes.deliveries.criteriaModifiers.DeliveriesCriteriaModifier"
                                  method="restrictToUserLocations"/>

                <option type="hasPredefinedFilters" value="true"/>

                <predefinedFilters>
                    <predefinedFilter name="all">
                    </predefinedFilter>
                    <predefinedFilter name="notReceived">
                        <filterRestriction column="state"
                                           value="[01draft,02prepared,03duringCorrection,04declined,05approved,07receiveConfirmWaiting]"/>
                    </predefinedFilter>
                    <predefinedFilter name="notDeclined">
                        <filterRestriction column="state"
                                           value="[01draft,02prepared,03duringCorrection,05approved,06received,07receiveConfirmWaiting]"/>
                    </predefinedFilter>
                </predefinedFilters>

                <listener event="changeState"
                          class="com.qcadoo.mes.deliveries.states.client.DeliveryStateChangeViewClient"
                          method="changeState"/>
            </component>
        </windowTab>

        <option type="fixedHeight" value="true"/>
        <option type="header" value="false"/>
    </component>

    <hooks>
        <beforeRender
                class="com.qcadoo.mes.deliveries.hooks.DeliveriesListHooks"
                method="fillGridWithRelatedDeliveries"/>

        <beforeRender class="com.qcadoo.mes.deliveries.hooks.DeliveryDetailsHooks"
                      method="processRoles"/>
    </hooks>

</view>

{'repo_name': 'qcadoo/mes', 'stars': '322', 'repo_language': 'Java', 'file_name': 'SupplyNegotiationsColumnFillerTest.java', 'mime_type': 'text/x-java', 'hash': -2497302582544440366, 'source_dataset': 'data'}


/**
 * Copyright (c) 2006-2008 Apple Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **/

#include "base64.h"

#include <stdlib.h>
#include <string.h>

// base64 tables
static char basis_64[] =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static signed char index_64[128] =
{
    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
    52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
    -1, 0, 1, 2,  3, 4, 5, 6,  7, 8, 9,10, 11,12,13,14,
    15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
    -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
    41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
};
#define CHAR64(c)  (((c) < 0 || (c) > 127) ? -1 : index_64[(c)])

// base64_encode    :    base64 encode
//
// value            :    data to encode
// vlen             :    length of data
// (result)         :    new char[] - c-str of result
char *base64_encode(const unsigned char *value, int vlen)
{
    char *result = (char *)malloc((vlen * 4) / 3 + 5);
    char *out = result;
    while (vlen >= 3)
    {
        *out++ = basis_64[value[0] >> 2];
        *out++ = basis_64[((value[0] << 4) & 0x30) | (value[1] >> 4)];
        *out++ = basis_64[((value[1] << 2) & 0x3C) | (value[2] >> 6)];
        *out++ = basis_64[value[2] & 0x3F];
        value += 3;
        vlen -= 3;
    }
    if (vlen > 0)
    {
        *out++ = basis_64[value[0] >> 2];
        unsigned char oval = (value[0] << 4) & 0x30;
        if (vlen > 1) oval |= value[1] >> 4;
        *out++ = basis_64[oval];
        *out++ = (vlen < 2) ? '=' : basis_64[(value[1] << 2) & 0x3C];
        *out++ = '=';
    }
    *out = '\0';

    return result;
}

// base64_decode    :    base64 decode
//
// value            :    c-str to decode
// rlen             :    length of decoded result
// (result)         :    new unsigned char[] - decoded result
unsigned char *base64_decode(const char *value, int *rlen)
{
    *rlen = 0;
    int c1, c2, c3, c4;

    int vlen = strlen(value);
    unsigned char *result =(unsigned char *)malloc((vlen * 3) / 4 + 1);
    unsigned char *out = result;

    while (1)
    {
        if (value[0]==0)
            return result;
        c1 = value[0];
        if (CHAR64(c1) == -1)
            goto base64_decode_error;;
        c2 = value[1];
        if (CHAR64(c2) == -1)
            goto base64_decode_error;;
        c3 = value[2];
        if ((c3 != '=') && (CHAR64(c3) == -1))
            goto base64_decode_error;;
        c4 = value[3];
        if ((c4 != '=') && (CHAR64(c4) == -1))
            goto base64_decode_error;;

        value += 4;
        *out++ = (CHAR64(c1) << 2) | (CHAR64(c2) >> 4);
        *rlen += 1;
        if (c3 != '=')
        {
            *out++ = ((CHAR64(c2) << 4) & 0xf0) | (CHAR64(c3) >> 2);
            *rlen += 1;
            if (c4 != '=')
            {
                *out++ = ((CHAR64(c3) << 6) & 0xc0) | CHAR64(c4);
                *rlen += 1;
            }
        }
    }

base64_decode_error:
    *result = 0;
    *rlen = 0;
    return result;
}

{'repo_name': 'yuanzm/microblog', 'stars': '114', 'repo_language': 'JavaScript', 'file_name': 'layout.ejs', 'mime_type': 'text/html', 'hash': -6853484365754579962, 'source_dataset': 'data'}


using Paillave.Etl.Core;
using Paillave.Etl.Core.Streams;
using Paillave.Etl.Reactive.Operators;
using Paillave.Etl.ExcelFile.Core;
using System;
using System.Collections.Generic;
using System.Text;
using SystemIO = System.IO;
using OfficeOpenXml;
using OfficeOpenXml.Table;
using System.IO;
using System.Reflection;
using System.Linq;

namespace Paillave.Etl.ExcelFile.StreamNodes
{
    public class ToExcelFileArgs<TIn>
    {
        public IStream<TIn> MainStream { get; set; }
        public ExcelFileDefinition<TIn> Mapping { get; set; }
    }
    public class ToExcelFileStreamNode<TIn> : StreamNodeBase<Stream, IStream<Stream>, ToExcelFileArgs<TIn>>
    {
        public ToExcelFileStreamNode(string name, ToExcelFileArgs<TIn> args) : base(name, args)
        {
        }

        protected override IStream<Stream> CreateOutputStream(ToExcelFileArgs<TIn> args)
        {
            var obs = args.MainStream.Observable.ToList().Map(ProcessValueToOutput);
            return CreateUnsortedStream(obs);
        }

        protected Stream ProcessValueToOutput(IList<TIn> value)
        {
            MemoryStream stream = new MemoryStream();
            value.WriteExcelListInStream(Args.Mapping, stream);
            return stream;
        }
    }
}

{'repo_name': 'paillave/Etl.Net', 'stars': '103', 'repo_language': 'C#', 'file_name': 'settings.json', 'mime_type': 'text/plain', 'hash': 3585378096409385791, 'source_dataset': 'data'}


# Copyright (c) 2019 Microsoft Corporation
# Distributed under the MIT software license

from ..glassbox import LogisticRegression
from .utils import synthetic_classification

# TODO: Harden these tests later to check content from data method.
def test_mli_visualize_interop():
    data = synthetic_classification()
    lr = LogisticRegression()

    lr.fit(data["train"]["X"], data["train"]["y"])

    global_exp = lr.explain_global()
    assert "mli" in global_exp.data(-1)
    global_overall_viz = global_exp.visualize()
    assert global_overall_viz is not None
    global_specific_viz = global_exp.visualize(0)
    assert global_specific_viz is not None
    mli_global_specific_viz = global_exp.visualize(("mli", 0))
    assert mli_global_specific_viz is not None

    local_exp = lr.explain_local(data["test"]["X"].head(), data["test"]["y"].head())
    assert "mli" in local_exp.data(-1)
    local_specific_viz = local_exp.visualize(0)
    assert local_specific_viz is not None
    mli_local_specific_viz = local_exp.visualize(("mli", 0))
    assert mli_local_specific_viz is not None

{'repo_name': 'interpretml/interpret', 'stars': '2841', 'repo_language': 'C++', 'file_name': 'RandomNumberEquivalency.cpp', 'mime_type': 'text/x-c', 'hash': -5754768306498864220, 'source_dataset': 'data'}


// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package codepipeline

const (

	// ErrCodeActionNotFoundException for service response error code
	// "ActionNotFoundException".
	//
	// The specified action cannot be found.
	ErrCodeActionNotFoundException = "ActionNotFoundException"

	// ErrCodeActionTypeNotFoundException for service response error code
	// "ActionTypeNotFoundException".
	//
	// The specified action type cannot be found.
	ErrCodeActionTypeNotFoundException = "ActionTypeNotFoundException"

	// ErrCodeApprovalAlreadyCompletedException for service response error code
	// "ApprovalAlreadyCompletedException".
	//
	// The approval action has already been approved or rejected.
	ErrCodeApprovalAlreadyCompletedException = "ApprovalAlreadyCompletedException"

	// ErrCodeInvalidActionDeclarationException for service response error code
	// "InvalidActionDeclarationException".
	//
	// The specified action declaration was specified in an invalid format.
	ErrCodeInvalidActionDeclarationException = "InvalidActionDeclarationException"

	// ErrCodeInvalidApprovalTokenException for service response error code
	// "InvalidApprovalTokenException".
	//
	// The approval request already received a response or has expired.
	ErrCodeInvalidApprovalTokenException = "InvalidApprovalTokenException"

	// ErrCodeInvalidBlockerDeclarationException for service response error code
	// "InvalidBlockerDeclarationException".
	//
	// Reserved for future use.
	ErrCodeInvalidBlockerDeclarationException = "InvalidBlockerDeclarationException"

	// ErrCodeInvalidClientTokenException for service response error code
	// "InvalidClientTokenException".
	//
	// The client token was specified in an invalid format
	ErrCodeInvalidClientTokenException = "InvalidClientTokenException"

	// ErrCodeInvalidJobException for service response error code
	// "InvalidJobException".
	//
	// The specified job was specified in an invalid format or cannot be found.
	ErrCodeInvalidJobException = "InvalidJobException"

	// ErrCodeInvalidJobStateException for service response error code
	// "InvalidJobStateException".
	//
	// The specified job state was specified in an invalid format.
	ErrCodeInvalidJobStateException = "InvalidJobStateException"

	// ErrCodeInvalidNextTokenException for service response error code
	// "InvalidNextTokenException".
	//
	// The next token was specified in an invalid format. Make sure that the next
	// token you provided is the token returned by a previous call.
	ErrCodeInvalidNextTokenException = "InvalidNextTokenException"

	// ErrCodeInvalidNonceException for service response error code
	// "InvalidNonceException".
	//
	// The specified nonce was specified in an invalid format.
	ErrCodeInvalidNonceException = "InvalidNonceException"

	// ErrCodeInvalidStageDeclarationException for service response error code
	// "InvalidStageDeclarationException".
	//
	// The specified stage declaration was specified in an invalid format.
	ErrCodeInvalidStageDeclarationException = "InvalidStageDeclarationException"

	// ErrCodeInvalidStructureException for service response error code
	// "InvalidStructureException".
	//
	// The specified structure was specified in an invalid format.
	ErrCodeInvalidStructureException = "InvalidStructureException"

	// ErrCodeJobNotFoundException for service response error code
	// "JobNotFoundException".
	//
	// The specified job was specified in an invalid format or cannot be found.
	ErrCodeJobNotFoundException = "JobNotFoundException"

	// ErrCodeLimitExceededException for service response error code
	// "LimitExceededException".
	//
	// The number of pipelines associated with the AWS account has exceeded the
	// limit allowed for the account.
	ErrCodeLimitExceededException = "LimitExceededException"

	// ErrCodeNotLatestPipelineExecutionException for service response error code
	// "NotLatestPipelineExecutionException".
	//
	// The stage has failed in a later run of the pipeline and the pipelineExecutionId
	// associated with the request is out of date.
	ErrCodeNotLatestPipelineExecutionException = "NotLatestPipelineExecutionException"

	// ErrCodePipelineExecutionNotFoundException for service response error code
	// "PipelineExecutionNotFoundException".
	//
	// The pipeline execution was specified in an invalid format or cannot be found,
	// or an execution ID does not belong to the specified pipeline.
	ErrCodePipelineExecutionNotFoundException = "PipelineExecutionNotFoundException"

	// ErrCodePipelineNameInUseException for service response error code
	// "PipelineNameInUseException".
	//
	// The specified pipeline name is already in use.
	ErrCodePipelineNameInUseException = "PipelineNameInUseException"

	// ErrCodePipelineNotFoundException for service response error code
	// "PipelineNotFoundException".
	//
	// The specified pipeline was specified in an invalid format or cannot be found.
	ErrCodePipelineNotFoundException = "PipelineNotFoundException"

	// ErrCodePipelineVersionNotFoundException for service response error code
	// "PipelineVersionNotFoundException".
	//
	// The specified pipeline version was specified in an invalid format or cannot
	// be found.
	ErrCodePipelineVersionNotFoundException = "PipelineVersionNotFoundException"

	// ErrCodeStageNotFoundException for service response error code
	// "StageNotFoundException".
	//
	// The specified stage was specified in an invalid format or cannot be found.
	ErrCodeStageNotFoundException = "StageNotFoundException"

	// ErrCodeStageNotRetryableException for service response error code
	// "StageNotRetryableException".
	//
	// The specified stage can't be retried because the pipeline structure or stage
	// state changed after the stage was not completed; the stage contains no failed
	// actions; one or more actions are still in progress; or another retry attempt
	// is already in progress.
	ErrCodeStageNotRetryableException = "StageNotRetryableException"

	// ErrCodeValidationException for service response error code
	// "ValidationException".
	//
	// The validation was specified in an invalid format.
	ErrCodeValidationException = "ValidationException"
)

{'repo_name': 'ljfranklin/terraform-resource', 'stars': '145', 'repo_language': 'Go', 'file_name': 'variables.tf', 'mime_type': 'text/plain', 'hash': 4089949883503092683, 'source_dataset': 'data'}


{{#app-view class="kv list" loading=isLoading}}
    {{#block-slot 'breadcrumbs'}}

{{#if (not-eq parent.Key '/') }}

Key / Values

{{/if}}
{{#each (slice 0 -2 (split parent.Key '/')) as |breadcrumb index|}}

{{breadcrumb}}

{{/each}}

    {{/block-slot}}
    {{#block-slot 'header'}}

            {{#if (eq parent.Key '/') }}
                Key / Value
            {{else}}
                {{ take 1 (drop 1 (reverse (split parent.Key '/'))) }}
            {{/if}}

    {{/block-slot}}
    {{#block-slot 'actions'}}
{{#if (not-eq parent.Key '/') }}
        Create
{{else}}
        Create
{{/if}}
    {{/block-slot}}
    {{#block-slot 'content'}}
{{#if (gt items.length 0)}}
        {{#tabular-collection
            items=(sort-by 'isFolder:desc' items) as |item index|
        }}
            {{#block-slot 'header'}}
                Name
            {{/block-slot}}
            {{#block-slot 'row'}}

                    {{right-trim (left-trim item.Key parent.Key) '/'}}

            {{/block-slot}}
            {{#block-slot 'actions' as |index change checked|}}
                {{#confirmation-dialog confirming=false index=index message='Are you sure you want to delete this key?'}}
                    {{#block-slot 'action' as |confirm|}}
                        {{#action-group index=index onchange=(action change) checked=(if (eq checked index) 'checked')}}

                                    {{if item.isFolder 'View' 'Edit'}}

                                    Delete

                        {{/action-group}}
                    {{/block-slot}}
                    {{#block-slot 'dialog' as |execute cancel message|}}

                            {{message}}

                        <button type="button" class="type-delete" {{action execute}}>Confirm Delete</button>
                        <button type="button" class="type-cancel" {{action cancel}}>Cancel</button>
                    {{/block-slot}}
                {{/confirmation-dialog}}
            {{/block-slot}}
        {{/tabular-collection}}
{{else}}

There are no Key / Value pairs.

{{/if}}
    {{/block-slot}}
{{/app-view}}

{'repo_name': 'bottos-project/magiccube', 'stars': '104', 'repo_language': 'Go', 'file_name': 'data_exchange_mng.abi', 'mime_type': 'text/plain', 'hash': -3006410823919068172, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: 64d456e0932a3408181b38bd4be881f6
timeCreated: 1522991819
licenseType: Free
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 2100000
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'EsProgram/uSpringBone', 'stars': '279', 'repo_language': 'C#', 'file_name': 'AudioManager.asset', 'mime_type': 'text/plain', 'hash': 6006601375350325504, 'source_dataset': 'data'}


forge "http://forge.puppetlabs.com"

mod 'puppetlabs/stdlib', :latest
mod 'puppetlabs/concat', :latest
mod 'puppetlabs/apt', :latest
mod 'puppetlabs/chocolatey', :latest
mod 'puppetlabs/powershell', :latest
mod 'puppetlabs/mysql', :latest
mod 'badgerious/windows_env', :latest
mod 'puppet/zypprepo', :latest
mod 'icinga2',
  :git    => 'https://github.com/Icinga/puppet-icinga2.git',
  :branch => 'master'

{'repo_name': 'Icinga/icinga-vagrant', 'stars': '242', 'repo_language': 'Ruby', 'file_name': '25-Openstack.md', 'mime_type': 'text/plain', 'hash': -2354994821868870537, 'source_dataset': 'data'}


From a235841b79e92f57f17bb6e08f02d15ac1990c97 Mon Sep 17 00:00:00 2001
From: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
Date: Thu, 10 Apr 2014 20:09:48 -0400
Subject: [PATCH 1/6] Revert r3134: Remove Systray Whitelist

---
 data/com.canonical.Unity.gschema.xml |  7 ++++
 panel/PanelTray.cpp                  | 48 ++++++++++++++++++--------
 panel/PanelTray.h                    |  4 +--
 tests/CMakeLists.txt                 |  1 -
 tests/test_panel_tray.cpp            | 65 ------------------------------------
 5 files changed, 44 insertions(+), 81 deletions(-)
 delete mode 100644 tests/test_panel_tray.cpp

diff --git a/data/com.canonical.Unity.gschema.xml b/data/com.canonical.Unity.gschema.xml
index bfeeb7d..9c8c3e9 100644
--- a/data/com.canonical.Unity.gschema.xml
+++ b/data/com.canonical.Unity.gschema.xml
@@ -174,6 +174,13 @@
       <description>The position of launcher.</description>
     </key>
   </schema>
+  <schema path="/com/canonical/unity/panel/" id="com.canonical.Unity.Panel" gettext-domain="unity">
+    <key type="as" name="systray-whitelist">
+      <default>[ 'JavaEmbeddedFrame', 'Wine', 'Update-notifier' ]</default>
+      <summary>List of client names, resource classes or wm classes to allow in the Panel's systray implementation.</summary>
+      <description>"" (empty) will not allow any tray icons, "all" will allow all tray icons, otherwise there will be an attempt to match each icon to a value here.</description>
+    </key>
+  </schema>
   <schema path="/com/canonical/unity/devices/" id="com.canonical.Unity.Devices" gettext-domain="unity">
     <key type="as" name="blacklist">
         <default>[]</default>
diff --git a/panel/PanelTray.cpp b/panel/PanelTray.cpp
index 20be87f..90da16b 100644
--- a/panel/PanelTray.cpp
+++ b/panel/PanelTray.cpp
@@ -17,8 +17,6 @@
  *              Marco Trevisan (Treviño) <3v1n0@ubuntu.com>
  */

-#include <array>
-
 #include "PanelTray.h"
 #include "unity-shared/PanelStyle.h"
 #include "unity-shared/UnitySettings.h"
@@ -30,7 +28,6 @@ namespace
 {
 const std::string SETTINGS_NAME = "com.canonical.Unity.Panel";
 const int PADDING = 3;
-const std::array<std::string, 2> WHITELIST {{ "JavaEmbeddedFrame", "Wine" }};
 }

 namespace unity
@@ -38,11 +35,18 @@ namespace unity

 PanelTray::PanelTray(int monitor)
   : View(NUX_TRACKER_LOCATION)
+  , settings_(g_settings_new(SETTINGS_NAME.c_str()))
   , window_(gtk_window_new(GTK_WINDOW_TOPLEVEL))
+  , whitelist_(g_settings_get_strv(settings_, "systray-whitelist"))
   , monitor_(monitor)
 {
   int panel_height = panel::Style::Instance().PanelHeight(monitor_);

+  whitelist_changed_.Connect(settings_, "changed::systray-whitelist", [&] (GSettings*, gchar*) {
+    g_strfreev(whitelist_);
+    whitelist_ = g_settings_get_strv(settings_, "systray-whitelist");
+  });
+
   auto gtkwindow = glib::object_cast<GtkWindow>(window_);
   gtk_window_set_type_hint(gtkwindow, GDK_WINDOW_TYPE_HINT_DOCK);
   gtk_window_set_keep_above(gtkwindow, TRUE);
@@ -77,6 +81,8 @@ PanelTray::PanelTray(int monitor)

 PanelTray::~PanelTray()
 {
+  g_strfreev(whitelist_);
+
   if (gtk_widget_get_realized(window_))
   {
     // We call Release since we're deleting the window here manually,
@@ -127,13 +133,38 @@ void PanelTray::Sync()

 gboolean PanelTray::FilterTrayCallback(NaTray* tray, NaTrayChild* icon, PanelTray* self)
 {
+  int i = 0;
+  bool accept = false;
+  const char *name = nullptr;
+
   glib::String title(na_tray_child_get_title(icon));

   glib::String res_class;
   glib::String res_name;
   na_tray_child_get_wm_class(icon, &res_name, &res_class);

-  bool accept = FilterTray(title.Str(), res_name.Str(), res_class.Str());
+  while ((name = self->whitelist_[i]))
+  {
+    if (g_strcmp0(name, "all") == 0)
+    {
+      accept = true;
+      break;
+    }
+    else if (!name || name[0] == '\0')
+    {
+      accept = false;
+      break;
+    }
+    else if ((title && g_str_has_prefix(title, name))
+             || (res_name && g_str_has_prefix(res_name, name))
+             || (res_class && g_str_has_prefix(res_class, name)))
+    {
+      accept = true;
+      break;
+    }
+
+    i++;
+  }

   if (accept)
   {
@@ -152,15 +183,6 @@ gboolean PanelTray::FilterTrayCallback(NaTray* tray, NaTrayChild* icon, PanelTra
   return accept ? TRUE : FALSE;
 }

-bool PanelTray::FilterTray(std::string const& title, std::string const& res_name, std::string const& res_class)
-{
-  for (auto const& item : WHITELIST)
-    if (title.find(item) == 0 || res_name.find(item) == 0 || res_class.find(item) == 0)
-      return true;
-
-  return false;
-}
-
 void PanelTray::OnTrayIconRemoved(NaTrayManager* manager, NaTrayChild* removed)
 {
   for (auto child : children_)
diff --git a/panel/PanelTray.h b/panel/PanelTray.h
index b2ff8e0..e11fe93 100644
--- a/panel/PanelTray.h
+++ b/panel/PanelTray.h
@@ -46,8 +46,6 @@ public:
   void Sync();
   Window xid();

-  static bool FilterTray(std::string const& title, std::string const& res_name, std::string const& res_class);
-
 protected:
   void Draw(nux::GraphicsEngine& gfx_content, bool force_draw);
   std::string GetName() const;
@@ -61,8 +59,10 @@ private:

   int WidthOfTray();

+  glib::Object<GSettings> settings_;
   glib::Object<GtkWidget> window_;
   glib::Object<NaTray> tray_;
+  char** whitelist_;

   glib::Signal<void, GSettings*, gchar*> whitelist_changed_;
   glib::Signal<gboolean, GtkWidget*, cairo_t*> draw_signal_;
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index a19a151..dab3b7d 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -252,7 +252,6 @@ if (ENABLE_X_SUPPORT)
                  test_panel_menu_view.cpp
                  test_panel_service.cpp
                  test_panel_style.cpp
-                 test_panel_tray.cpp
                  test_panel_view.cpp
                  test_places_group.cpp
                  test_preview_player.cpp
diff --git a/tests/test_panel_tray.cpp b/tests/test_panel_tray.cpp
deleted file mode 100644
index c407576..0000000
--- a/tests/test_panel_tray.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2013 Canonical Ltd.
- *
- * This program is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 3, as published
- * by the  Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranties of
- * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * version 3 along with this program.  If not, see
- * <http://www.gnu.org/licenses/>
- *
- * Authored by: Andrea Azzarone <andrea.azzarone@canonical.com>
- *
- */
-
-#include <gtest/gtest.h>
-
-#include "panel/PanelTray.h"
-
- TEST(TestPanelTray, FilterTray)
- {
-  EXPECT_TRUE(unity::PanelTray::FilterTray("JavaEmbeddedFrame", "", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("", "JavaEmbeddedFrame", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("", "", "JavaEmbeddedFrame"));
-
-  EXPECT_TRUE(unity::PanelTray::FilterTray("Wine", "", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("", "Wine", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("", "", "Wine"));
-
-  EXPECT_TRUE(unity::PanelTray::FilterTray("JavaEmbeddedFrameUbuntu", "", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("", "JavaEmbeddedFrameUbuntu", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("", "", "JavaEmbeddedFrameUbuntu"));
-
-  EXPECT_TRUE(unity::PanelTray::FilterTray("WineUbuntu", "", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("", "WineUbuntu", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("", "", "WineUbuntu"));
-
-  EXPECT_FALSE(unity::PanelTray::FilterTray("UbuntuJavaEmbeddedFrame", "", ""));
-  EXPECT_FALSE(unity::PanelTray::FilterTray("", "UbuntuJavaEmbeddedFrame", ""));
-  EXPECT_FALSE(unity::PanelTray::FilterTray("", "", "UbuntuJavaEmbeddedFrame"));
-
-  EXPECT_FALSE(unity::PanelTray::FilterTray("UbuntuWine", "", ""));
-  EXPECT_FALSE(unity::PanelTray::FilterTray("", "UbuntuWine", ""));
-  EXPECT_FALSE(unity::PanelTray::FilterTray("", "", "UbuntuWine"));
-
-  EXPECT_FALSE(unity::PanelTray::FilterTray("UbuntuJavaEmbeddedFrameUbuntu", "", ""));
-  EXPECT_FALSE(unity::PanelTray::FilterTray("", "UbuntuJavaEmbeddedFrameUbuntu", ""));
-  EXPECT_FALSE(unity::PanelTray::FilterTray("", "", "UbuntuJavaEmbeddedFrameUbuntu"));
-
-  EXPECT_FALSE(unity::PanelTray::FilterTray("UbuntuWineUbuntu", "", ""));
-  EXPECT_FALSE(unity::PanelTray::FilterTray("", "UbuntuWineUbuntu", ""));
-  EXPECT_FALSE(unity::PanelTray::FilterTray("", "", "UbuntuWineUbuntu"));
-
-  EXPECT_TRUE(unity::PanelTray::FilterTray("Wine", "Ubuntu", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("Ubuntu", "JavaEmbeddedFrame", ""));
-  EXPECT_TRUE(unity::PanelTray::FilterTray("Wine", "JavaEmbeddedFrame", "Ubuntu"));
-
-  EXPECT_FALSE(unity::PanelTray::FilterTray("Ubuntu", "Unity", "Hello world!"));
-}
-
--
2.10.2

{'repo_name': 'chenxiaolong/Unity-for-Arch', 'stars': '164', 'repo_language': 'Shell', 'file_name': '0001_autoconf.patch', 'mime_type': 'text/x-diff', 'hash': -3052669991892841100, 'source_dataset': 'data'}


#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Runs hardware independent tests for i915 (drivers/gpu/drm/i915)

if ! /sbin/modprobe -q -r i915; then
	echo "drivers/gpu/i915: [SKIP]"
	exit 77
fi

if /sbin/modprobe -q i915 mock_selftests=-1; then
	/sbin/modprobe -q -r i915
	echo "drivers/gpu/i915: ok"
else
	echo "drivers/gpu/i915: [FAIL]"
	exit 1
fi

{'repo_name': 'GrapheneOS/linux-hardened', 'stars': '324', 'repo_language': 'C', 'file_name': 'wlan_bssdef.h', 'mime_type': 'text/x-c', 'hash': -460311468889479478, 'source_dataset': 'data'}


/**
 * @module flash-detection
 */

var self = this;

exports.name = "flash-detection";
exports.category = "compatibility";
exports.check = function(checker, browser) {

    // TODO: should we detect this at the network level instead?
    browser.do(function(driver) {
        return driver.findElements(browser.webdriver.By.tagName('script')).
        then(function(scripts) {
            browser.webdriver.promise.map(
                scripts,
                function(el) {
                    return el.getAttribute("src");
                }
            ).then(function(srcs) {
                for (var i = 0; i < srcs.length; i++) {
                    if (srcs[i].indexOf('swfobject.js') !== -1) {
                        checker.report("swfobject-lib-detected",
                            self.name,
                            self.category,
                            "error");
                    }
                }
            });
        });
    });

    browser.do(function(driver) {
        return driver.findElements(browser.webdriver.By.tagName('embed')).
        then(function(embeds) {
            browser.webdriver.promise.map(
                embeds,
                function(el) {
                    return el.getAttribute("src");
                }
            ).then(function(srcs) {
                for (var i = 0; i < srcs.length; i++) {
                    if (srcs[i].indexOf('.swf') !== -1) {
                        checker.report("swf-file-detected",
                            self.name, self.category,
                            "error");
                    }
                }
            });
        });
    });
};

{'repo_name': 'w3c/Mobile-Checker', 'stars': '297', 'repo_language': 'JavaScript', 'file_name': 'script.js', 'mime_type': 'text/plain', 'hash': -3470299687339626850, 'source_dataset': 'data'}


..
..
.. Licensed under the Apache License, Version 2.0 (the "License");
.. you may not use this file except in compliance with the License.
.. You may obtain a copy of the License at
..
..     http://www.apache.org/licenses/LICENSE-2.0
..
.. Unless required by applicable law or agreed to in writing, software
.. distributed under the License is distributed on an "AS IS" BASIS,
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.. See the License for the specific language governing permissions and
.. limitations under the License.
..

.. _to-api-federation_resolvers:

************************
``federation_resolvers``
************************

``GET``
=======
Retrieves :term:`Federation` Resolvers.

:Auth. Required: Yes
:Roles Required: None
:Response Type: Array

Request Structure
-----------------
.. table:: Request Query Parameters

	+------------+----------+-----------------------------------------------------------------------------------------------------+
	| Name       | Required | Description                                                                                |
	+============+==========+=====================================================================================================+
	| id         | no       | Return only the Federation Resolver identified by this integral, unique identifier                  |
	+------------+----------+-----------------------------------------------------------------------------------------------------+
	| ipAddress  | no       | Return only the Federation Resolver(s) that has/have this IP Address                                |
	+------------+----------+-----------------------------------------------------------------------------------------------------+
	| type       | no       | Return only the Federation Resolvers of this :term:`Type`                                           |
	+------------+----------+-----------------------------------------------------------------------------------------------------+
	| orderby    | no       | Choose the ordering of the results - must be the name of one of the fields of the objects in the    |
	|            |          | ``response`` array                                                                                |
	+------------+----------+-----------------------------------------------------------------------------------------------------+
	| sortOrder  | no       | Changes the order of sorting. Either ascending (default or "asc") or descending ("desc")            |
	+------------+----------+-----------------------------------------------------------------------------------------------------+
	| limit      | no       | Choose the maximum number of results to return                                                      |
	+------------+----------+-----------------------------------------------------------------------------------------------------+
	| offset     | no       | The number of results to skip before beginning to return results. Must use in conjunction with      |
	|            |          | limit                                                                                |
	+------------+----------+-----------------------------------------------------------------------------------------------------+
	| page       | no       | Return the n\ :sup:`th` page of results, where "n" is the value of this parameter, pages are        |
	|            |          | ``limit`` long and the first page is 1. If ``offset`` was defined, this query parameter has no      |
	|            |          | effect. ``limit`` must be defined to make use of ``page``.                                          |
	+------------+----------+-----------------------------------------------------------------------------------------------------+

.. code-block:: http
	:caption: Request Example

	GET /api/3.0/federation_resolvers?type=RESOLVE6 HTTP/1.1
	Host: trafficops.infra.ciab.test
	User-Agent: curl/7.63.0
	Accept: */*
	Cookie: mojolicious=...

Response Structure
------------------
:id:          The integral, unique identifier of the resolver
:ipAddress:   The IP address or :abbr:`CIDR (Classless Inter-Domain Routing)`-notation subnet of the resolver - may be IPv4 or IPv6
:lastUpdated: The date and time at which this resolver was last updated, in an ISO-like format
:type:        The :term:`Type` of the resolver

.. code-block:: http
	:caption: Response Example

	HTTP/1.1 200 OK
	Access-Control-Allow-Credentials: true
	Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
	Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
	Access-Control-Allow-Origin: *
	Content-Type: application/json
	Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
	Whole-Content-Sha512: 4TLkULAOAuap47H+hpwyf2lHjDbHbSNQHLMj7BCTHtps2CQxCuq7mwctbwqmPdmAjLOUXAIRsHmvSuAp4K64jw==
	X-Server-Name: traffic_ops_golang/
	Date: Wed, 06 Nov 2019 00:03:56 GMT
	Content-Length: 101

	{ "response": [
		{
			"id": 1,
			"ipAddress": "::1/1",
			"lastUpdated": "2019-11-06 00:00:40+00",
			"type": "RESOLVE6"
		}
	]}

``POST``
========
Creates a new federation resolver.

:Auth. Required: Yes
:Roles Required: "admin"
:Response Type:  Object

Request Structure
-----------------
:ipAddress: The IP address of the resolver - may be IPv4 or IPv6
:typeId:    The integral, unique identifier of the :term:`Type` of resolver being created

	.. caution:: This field should only ever be an identifier for one of the :term:`Types` "RESOLVE4" or "RESOLVE6", but there is **no protection for this built into Traffic Ops** and therefore **any valid** :term:`Type` **identifier will be silently accepted by Traffic Ops** and so care should be taken to ensure that these :term:`Types` are properly identified. If any :term:`Type` besides "RESOLVE4" or "RESOLVE6" is identified, the resulting resolver *will* **not** *work*.

	.. seealso:: :ref:`to-api-types` is the endpoint that can be used to determine the identifier for various :term:`Types`

.. code-block:: http
	:caption: Request Example

	POST /api/3.0/federation_resolvers HTTP/1.1
	Host: trafficops.infra.ciab.test
	User-Agent: curl/7.63.0
	Accept: */*
	Cookie: mojolicious=...
	Content-Length: 36
	Content-Type: application/json

	{
		"ipAddress": "::1/1",
		"typeId": 37
	}

Response Structure
------------------
:id:        The integral, unique identifier of the resolver
:ipAddress: The IP address or :abbr:`CIDR (Classless Inter-Domain Routing)`-notation subnet of the resolver - may be IPv4 or IPv6
:type:      The :term:`Type` of the resolver
:typeId:    The integral, unique identifier of the :term:`Type` of the resolver

.. code-block:: http
	:caption: Response Example

	HTTP/1.1 200 OK
	Access-Control-Allow-Credentials: true
	Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
	Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
	Access-Control-Allow-Origin: *
	Content-Type: application/json
	Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 18 Nov 2019 17:40:54 GMT; Max-Age=3600; HttpOnly
	Whole-Content-Sha512: e9D8JNrQb64xpuDwoBwbISSWUkDGCL2l37NuDXsXsPYof2EqmeHondD8NzxDSwWNJ8d9B9DXpZDbRUtgdXR8BQ==
	X-Server-Name: traffic_ops_golang/
	Date: Wed, 06 Nov 2019 00:00:40 GMT
	Content-Length: 153

	{ "alerts": [
		{
			"text": "Federation Resolver created [ IP = ::1/1 ] with id: 1",
			"level": "success"
		}
	],
	"response": {
		"id": 1,
		"ipAddress": "::1/1",
		"type": "RESOLVE6",
		"typeId": 37
	}}

``DELETE``
==========
Deletes a federation resolver.

:Auth. Required: Yes
:Roles Required: "admin"
:Response Type:  Object

Request Structure
-----------------
.. table:: Request Query Parameters

	+------+----------------------------------------------------------------------------------+
	| Name | Required | Description                                                           |
	+======+==========+=======================================================================+
	|  id  | yes      | Integral, unique identifier for the federation resolver to be deleted |
	+------+----------+-----------------------------------------------------------------------+

.. code-block:: http
	:caption: Request Example

	DELETE /api/3.0/federation_resolvers?id=4 HTTP/1.1
	User-Agent: python-requests/2.22.0
	Accept-Encoding: gzip, deflate
	Accept: */*
	Connection: keep-alive
	Cookie: mojolicious=...
	Content-Length: 0

Response Structure
------------------
:id:        The integral, unique identifier of the resolver
:ipAddress: The IP address or :abbr:`CIDR (Classless Inter-Domain Routing)`-notation subnet of the resolver - may be IPv4 or IPv6
:type:      The :term:`Type` of the resolver

.. code-block:: http
	:caption: Response Example

	HTTP/1.1 200 OK
	Access-Control-Allow-Credentials: true
	Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
	Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
	Access-Control-Allow-Origin: *
	Content-Encoding: gzip
	Content-Type: application/json
	Set-Cookie: mojolicious=...; Path=/; HttpOnly
	Whole-Content-Sha512: 2v4LYQdRVhaFJVd86Iv1BWVYzNPSlzpQ222bUB7Zz+Ss8A48FNyHZjPlq5a+a4g9KAQCTUIytWnIQk+L1fF6FQ==
	X-Server-Name: traffic_ops_golang/
	Date: Fri, 08 Nov 2019 23:19:01 GMT
	Content-Length: 161

	{ "alerts": [
		{
			"text": "Federation resolver deleted [ IP = 1.2.6.4/22 ] with id: 4",
			"level": "success"
		}
	],
	"response": {
		"id": 4,
		"ipAddress": "1.2.6.4/22",
		"type": "RESOLVE6"
	}}

{'repo_name': 'apache/trafficcontrol', 'stars': '454', 'repo_language': 'Go', 'file_name': 'torequest.go', 'mime_type': 'text/plain', 'hash': -1284120068939865332, 'source_dataset': 'data'}


---
http_interactions:
- request:
    method: get
    uri: http://ps.pndsn.com/v2/auth/grant/sub-key/sub-a-mock-key?channel=demo&pnsdk=PubNub-Ruby/4.1.0&r=0&signature=-9Oc0eefNV-MsonCT2OiYdguJV7PCW_Vlq_ENv8xbDk=&timestamp=1464193258&ttl=1440&uuid=ruby-test-uuid-client-one&w=1
    body:
      encoding: UTF-8
      string: ''
    headers:
      User-Agent:
      - HTTPClient/1.0 (2.8.0, ruby 2.3.0 (2015-12-25))
      Accept:
      - "*/*"
      Date:
      - Wed, 25 May 2016 16:20:58 GMT
  response:
    status:
      code: 200
      message: OK
    headers:
      Date:
      - Wed, 25 May 2016 16:20:59 GMT
      Content-Type:
      - text/javascript; charset=UTF-8
      Content-Length:
      - '203'
      Connection:
      - keep-alive
      Access-Control-Allow-Origin:
      - "*"
      Access-Control-Allow-Methods:
      - GET
      Access-Control-Allow-Headers:
      - Origin, X-Requested-With, Content-Type, Accept
      Cache-Control:
      - no-cache, no-store, must-revalidate
    body:
      encoding: UTF-8
      string: '{"message":"Success","payload":{"level":"channel","subscribe_key":"sub-a-mock-key","ttl":1440,"channels":{"demo":{"r":0,"w":1,"m":0}}},"service":"Access
        Manager","status":200}'
    http_version:
  recorded_at: Wed, 25 May 2016 16:20:59 GMT
recorded_with: VCR 3.0.1

{'repo_name': 'pubnub/ruby', 'stars': '115', 'repo_language': 'Ruby', 'file_name': 'config', 'mime_type': 'text/plain', 'hash': 2463185283855272868, 'source_dataset': 'data'}