/*
 * Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com)
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#include "libavutil/mips/generic_macros_msa.h"
#include "h263dsp_mips.h"

static void h263_dct_unquantize_msa(int16_t *block, int16_t qmul,
                                    int16_t qadd, int8_t n_coeffs,
                                    uint8_t loop_start)
{
    int16_t *block_dup = block;
    int32_t level, cnt;
    v8i16 block_vec, qmul_vec, qadd_vec, sub;
    v8i16 add, mask, mul, zero_mask;

    qmul_vec = __msa_fill_h(qmul);
    qadd_vec = __msa_fill_h(qadd);
    for (cnt = 0; cnt < (n_coeffs >> 3); cnt++) {
        block_vec = LD_SH(block_dup + loop_start);
        mask = __msa_clti_s_h(block_vec, 0);
        zero_mask = __msa_ceqi_h(block_vec, 0);
        mul = block_vec * qmul_vec;
        sub = mul - qadd_vec;
        add = mul + qadd_vec;
        add = (v8i16) __msa_bmnz_v((v16u8) add, (v16u8) sub, (v16u8) mask);
        block_vec = (v8i16) __msa_bmnz_v((v16u8) add, (v16u8) block_vec,
                                         (v16u8) zero_mask);
        ST_SH(block_vec, block_dup + loop_start);
        block_dup += 8;
    }

    cnt = ((n_coeffs >> 3) * 8) + loop_start;

    for (; cnt <= n_coeffs; cnt++) {
        level = block[cnt];
        if (level) {
            if (level < 0) {
                level = level * qmul - qadd;
            } else {
                level = level * qmul + qadd;
            }
            block[cnt] = level;
        }
    }
}

static int32_t mpeg2_dct_unquantize_inter_msa(int16_t *block,
                                              int32_t qscale,
                                              const int16_t *quant_matrix)
{
    int32_t cnt, sum_res = -1;
    v8i16 block_vec, block_neg, qscale_vec, mask;
    v8i16 block_org0, block_org1, block_org2, block_org3;
    v8i16 quant_m0, quant_m1, quant_m2, quant_m3;
    v8i16 sum, mul, zero_mask;
    v4i32 mul_vec, qscale_l, qscale_r, quant_m_r, quant_m_l;
    v4i32 block_l, block_r, sad;

    qscale_vec = __msa_fill_h(qscale);
    for (cnt = 0; cnt < 2; cnt++) {
        LD_SH4(block, 8, block_org0, block_org1, block_org2, block_org3);
        LD_SH4(quant_matrix, 8, quant_m0, quant_m1, quant_m2, quant_m3);
        mask = __msa_clti_s_h(block_org0, 0);
        zero_mask = __msa_ceqi_h(block_org0, 0);
        block_neg = -block_org0;
        block_vec = (v8i16) __msa_bmnz_v((v16u8) block_org0, (v16u8) block_neg,
                                         (v16u8) mask);
        block_vec <<= 1;
        block_vec += 1;
        UNPCK_SH_SW(block_vec, block_r, block_l);
        UNPCK_SH_SW(qscale_vec, qscale_r, qscale_l);
        UNPCK_SH_SW(quant_m0, quant_m_r, quant_m_l);
        mul_vec = block_l * qscale_l;
        mul_vec *= quant_m_l;
        block_l = mul_vec >> 4;
        mul_vec = block_r * qscale_r;
        mul_vec *= quant_m_r;
        block_r = mul_vec >> 4;
        mul = (v8i16) __msa_pckev_h((v8i16) block_l, (v8i16) block_r);
        block_neg = - mul;
        sum = (v8i16) __msa_bmnz_v((v16u8) mul, (v16u8) block_neg,
                                   (v16u8) mask);
        sum = (v8i16) __msa_bmnz_v((v16u8) sum, (v16u8) block_org0,
                                   (v16u8) zero_mask);
        ST_SH(sum, block);
        block += 8;
        quant_matrix += 8;
        sad = __msa_hadd_s_w(sum, sum);
        sum_res += HADD_SW_S32(sad);
        mask = __msa_clti_s_h(block_org1, 0);
        zero_mask = __msa_ceqi_h(block_org1, 0);
        block_neg = - block_org1;
        block_vec = (v8i16) __msa_bmnz_v((v16u8) block_org1, (v16u8) block_neg,
                                         (v16u8) mask);
        block_vec <<= 1;
        block_vec += 1;
        UNPCK_SH_SW(block_vec, block_r, block_l);
        UNPCK_SH_SW(qscale_vec, qscale_r, qscale_l);
        UNPCK_SH_SW(quant_m1, quant_m_r, quant_m_l);
        mul_vec = block_l * qscale_l;
        mul_vec *= quant_m_l;
        block_l = mul_vec >> 4;
        mul_vec = block_r * qscale_r;
        mul_vec *= quant_m_r;
        block_r = mul_vec >> 4;
        mul = __msa_pckev_h((v8i16) block_l, (v8i16) block_r);
        block_neg = - mul;
        sum = (v8i16) __msa_bmnz_v((v16u8) mul, (v16u8) block_neg,
                                   (v16u8) mask);
        sum = (v8i16) __msa_bmnz_v((v16u8) sum, (v16u8) block_org1,
                                   (v16u8) zero_mask);
        ST_SH(sum, block);

        block += 8;
        quant_matrix += 8;
        sad = __msa_hadd_s_w(sum, sum);
        sum_res += HADD_SW_S32(sad);
        mask = __msa_clti_s_h(block_org2, 0);
        zero_mask = __msa_ceqi_h(block_org2, 0);
        block_neg = - block_org2;
        block_vec = (v8i16) __msa_bmnz_v((v16u8) block_org2, (v16u8) block_neg,
                                         (v16u8) mask);
        block_vec <<= 1;
        block_vec += 1;
        UNPCK_SH_SW(block_vec, block_r, block_l);
        UNPCK_SH_SW(qscale_vec, qscale_r, qscale_l);
        UNPCK_SH_SW(quant_m2, quant_m_r, quant_m_l);
        mul_vec = block_l * qscale_l;
        mul_vec *= quant_m_l;
        block_l = mul_vec >> 4;
        mul_vec = block_r * qscale_r;
        mul_vec *= quant_m_r;
        block_r = mul_vec >> 4;
        mul = __msa_pckev_h((v8i16) block_l, (v8i16) block_r);
        block_neg = - mul;
        sum = (v8i16) __msa_bmnz_v((v16u8) mul, (v16u8) block_neg,
                                   (v16u8) mask);
        sum = (v8i16) __msa_bmnz_v((v16u8) sum, (v16u8) block_org2,
                                   (v16u8) zero_mask);
        ST_SH(sum, block);

        block += 8;
        quant_matrix += 8;
        sad = __msa_hadd_s_w(sum, sum);
        sum_res += HADD_SW_S32(sad);
        mask = __msa_clti_s_h(block_org3, 0);
        zero_mask = __msa_ceqi_h(block_org3, 0);
        block_neg = - block_org3;
        block_vec = (v8i16) __msa_bmnz_v((v16u8) block_org3, (v16u8) block_neg,
                                         (v16u8) mask);
        block_vec <<= 1;
        block_vec += 1;
        UNPCK_SH_SW(block_vec, block_r, block_l);
        UNPCK_SH_SW(qscale_vec, qscale_r, qscale_l);
        UNPCK_SH_SW(quant_m3, quant_m_r, quant_m_l);
        mul_vec = block_l * qscale_l;
        mul_vec *= quant_m_l;
        block_l = mul_vec >> 4;
        mul_vec = block_r * qscale_r;
        mul_vec *= quant_m_r;
        block_r = mul_vec >> 4;
        mul = __msa_pckev_h((v8i16) block_l, (v8i16) block_r);
        block_neg = - mul;
        sum = (v8i16) __msa_bmnz_v((v16u8) mul, (v16u8) block_neg,
                                   (v16u8) mask);
        sum = (v8i16) __msa_bmnz_v((v16u8) sum, (v16u8) block_org3,
                                   (v16u8) zero_mask);
        ST_SH(sum, block);

        block += 8;
        quant_matrix += 8;
        sad = __msa_hadd_s_w(sum, sum);
        sum_res += HADD_SW_S32(sad);
    }

    return sum_res;
}

void ff_dct_unquantize_h263_intra_msa(MpegEncContext *s,
                                      int16_t *block, int32_t index,
                                      int32_t qscale)
{
    int32_t qmul, qadd;
    int32_t nCoeffs;

    av_assert2(s->block_last_index[index] >= 0 || s->h263_aic);

    qmul = qscale << 1;

    if (!s->h263_aic) {
        block[0] *= index < 4 ? s->y_dc_scale : s->c_dc_scale;
        qadd = (qscale - 1) | 1;
    } else {
        qadd = 0;
    }
    if (s->ac_pred)
        nCoeffs = 63;
    else
        nCoeffs = s->inter_scantable.raster_end[s->block_last_index[index]];

    h263_dct_unquantize_msa(block, qmul, qadd, nCoeffs, 1);
}

void ff_dct_unquantize_h263_inter_msa(MpegEncContext *s,
                                      int16_t *block, int32_t index,
                                      int32_t qscale)
{
    int32_t qmul, qadd;
    int32_t nCoeffs;

    av_assert2(s->block_last_index[index] >= 0);

    qadd = (qscale - 1) | 1;
    qmul = qscale << 1;

    nCoeffs = s->inter_scantable.raster_end[s->block_last_index[index]];

    h263_dct_unquantize_msa(block, qmul, qadd, nCoeffs, 0);
}

void ff_dct_unquantize_mpeg2_inter_msa(MpegEncContext *s,
                                       int16_t *block, int32_t index,
                                       int32_t qscale)
{
    const uint16_t *quant_matrix;
    int32_t sum = -1;

    quant_matrix = s->inter_matrix;

    sum = mpeg2_dct_unquantize_inter_msa(block, qscale, quant_matrix);

    block[63] ^= sum & 1;
}

{'repo_name': 'mabeijianxi/small-video-record', 'stars': '3214', 'repo_language': 'C', 'file_name': '2.x_en_using_help.md', 'mime_type': 'text/plain', 'hash': -4852285857074603550, 'source_dataset': 'data'}


/*===========================================================================
 *
 *                            PUBLIC DOMAIN NOTICE
 *               National Center for Biotechnology Information
 *
 *  This software/database is a "United States Government Work" under the
 *  terms of the United States Copyright Act.  It was written as part of
 *  the author's official duties as a United States Government employee and
 *  thus cannot be copyrighted.  This software/database is freely available
 *  to the public for use. The National Library of Medicine and the U.S.
 *  Government have not placed any restriction on its use or reproduction.
 *
 *  Although all reasonable efforts have been taken to ensure the accuracy
 *  and reliability of the software and data, the NLM and the U.S.
 *  Government do not and cannot warrant the performance or results that
 *  may be obtained by using this software or data. The NLM and the U.S.
 *  Government disclaim all warranties, express or implied, including
 *  warranties of performance, merchantability or fitness for any particular
 *  purpose.
 *
 *  Please cite the author in any work or product based on this material.
 *
 * ===========================================================================
 *
 */

#ifndef BAM_LOAD_SEQUENCE_WRITER_H_
#define BAM_LOAD_SEQUENCE_WRITER_H_ 1

#include <vdb/manager.h>
#include <vdb/database.h>
#include <vdb/table.h>
#include <vdb/cursor.h>

#include <klib/text.h>
#include <klib/data-buffer.h>

struct TableWriterSeq;

typedef struct s_sequence_record {
    char *seq;
    uint8_t *qual;
    uint32_t *readStart;
    uint32_t *readLen;
    uint8_t *orientation;
    uint8_t *is_bad;
    uint8_t *alignmentCount;
    char const *spotGroup;
    char const *linkageGroup;
    bool *aligned;
    char *cskey;
    uint64_t *ti;
    uint64_t keyId;
    unsigned spotGroupLen;
    unsigned linkageGroupLen;
    unsigned numreads;
} SequenceRecord;

typedef struct s_sequence_record_storage {
    uint64_t ti[2];
    uint32_t readStart[2];
    uint32_t readLen[2];
    uint8_t orientation[2];
    uint8_t is_bad[2];
    uint8_t alignmentCount[2];
    bool aligned[2];
    char cskey[2];
} SequenceRecordStorage;

typedef struct s_sequence {
    VDatabase *db;
    struct TableWriterSeq const *tbl;
} Sequence;

Sequence *SequenceInit(Sequence *self, VDatabase *db);

rc_t SequenceWriteRecord(Sequence *self, SequenceRecord const *rec,
                         bool color, bool isDup, INSDC_SRA_platform_id platform);

rc_t SequenceDoneWriting(Sequence *self);
rc_t SequenceReadKey(const Sequence *self, int64_t row, uint64_t *key);
rc_t SequenceUpdateAlignData(Sequence *self, int64_t row, unsigned nreads,
                             const int64_t primeId[/* nreads */],
                             const uint8_t alignCount[/* nreads */]);

void SequenceWhack(Sequence *self, bool commit);

#endif /* ndef BAM_LOAD_SEQUENCE_WRITER_H_ */

{'repo_name': 'ncbi/sra-tools', 'stars': '436', 'repo_language': 'C', 'file_name': 'Makefile', 'mime_type': 'text/plain', 'hash': 9041216649757246292, 'source_dataset': 'data'}


package org.domeos.framework.api.consolemodel.monitor;

import java.util.List;
import java.util.Map;
import java.util.TreeMap;

/**
 * Created by baokangwang on 2016/3/7.
 */
public class MonitorResult {

    private String targetType;
    private int interval;
    private String dataSpec;
    private Map<String, List<Map<String, Double>>> counterResults;

    public MonitorResult() {
        counterResults = new TreeMap<>();

    }

    public MonitorResult(String targetType, int interval, String dataSpec, Map<String, List<Map<String, Double>>> counterResults) {
        this.targetType = targetType;
        this.interval = interval;
        this.dataSpec = dataSpec;
        this.counterResults = counterResults;
    }

    public String getTargetType() {
        return targetType;
    }

    public void setTargetType(String targetType) {
        this.targetType = targetType;
    }

    public int getInterval() {
        return interval;
    }

    public void setInterval(int interval) {
        this.interval = interval;
    }

    public String getDataSpec() {
        return dataSpec;
    }

    public void setDataSpec(String dataSpec) {
        this.dataSpec = dataSpec;
    }

    public Map<String, List<Map<String, Double>>> getCounterResults() {
        return counterResults;
    }

    public void setCounterResults(Map<String, List<Map<String, Double>>> counterResults) {
        this.counterResults = counterResults;
    }
}

{'repo_name': 'domeos/server', 'stars': '265', 'repo_language': 'Java', 'file_name': 'login.html', 'mime_type': 'text/html', 'hash': -4213777834917920597, 'source_dataset': 'data'}


/**
 * External Dependencies
 */
import 'url-polyfill';
import { isEqual, pick } from 'lodash';
import queryString from 'query-string';

/**
 * WordPress dependencies
 */
import { BlockControls, BlockIcon, InnerBlocks, InspectorControls } from '@wordpress/block-editor';
import {
	Button,
	ExternalLink,
	Notice,
	PanelBody,
	Placeholder,
	Spinner,
	ToggleControl,
	Toolbar,
	withNotices,
} from '@wordpress/components';
import { useEffect, useState } from '@wordpress/element';
import { __, _x } from '@wordpress/i18n';
import { getBlockDefaultClassName } from '@wordpress/blocks';
import { select, dispatch } from '@wordpress/data';

/**
 * Internal dependencies
 */
import './editor.scss';
import './view.scss';
import icon from './icon';
import attributeDetails from './attributes';
import { getValidatedAttributes } from '../../shared/get-validated-attributes';
import { getAttributesFromEmbedCode } from './utils';
import BlockStylesSelector from '../../shared/components/block-styles-selector';
import { CALENDLY_EXAMPLE_URL, innerButtonBlock } from './';
import testEmbedUrl from '../../shared/test-embed-url';

function CalendlyEdit( props ) {
	const {
		attributes,
		className,
		clientId,
		name,
		noticeOperations,
		noticeUI,
		setAttributes,
	} = props;
	const defaultClassName = getBlockDefaultClassName( name );
	const validatedAttributes = getValidatedAttributes( attributeDetails, attributes );

	if ( ! isEqual( validatedAttributes, attributes ) ) {
		setAttributes( validatedAttributes );
	}

	const {
		backgroundColor,
		submitButtonText,
		hideEventTypeDetails,
		primaryColor,
		textColor,
		style,
		url,
	} = validatedAttributes;
	const [ embedCode, setEmbedCode ] = useState( url );
	const [ isEditingUrl, setIsEditingUrl ] = useState( false );
	const [ isResolvingUrl, setIsResolvingUrl ] = useState( false );
	const [ embedButtonAttributes, setEmbedButtonAttributes ] = useState( {} );

	const setErrorNotice = () => {
		noticeOperations.removeAllNotices();
		noticeOperations.createErrorNotice(
			__( "Your calendar couldn't be embedded. Please double check your URL or code.", 'jetpack' )
		);
	};

	useEffect( () => {
		if ( ! url || CALENDLY_EXAMPLE_URL === url || 'link' === style ) {
			return;
		}
		testEmbedUrl( url, setIsResolvingUrl ).catch( () => {
			setAttributes( { url: undefined } );
			setErrorNotice();
		} );
	}, [] );

	const parseEmbedCode = event => {
		if ( ! event ) {
			setErrorNotice();
			return;
		}

		event.preventDefault();

		const newAttributes = getAttributesFromEmbedCode( embedCode );
		if ( ! newAttributes ) {
			setErrorNotice();
			return;
		}

		if ( newAttributes.buttonAttributes && 'link' === newAttributes.style ) {
			const innerButtons = select( 'core/editor' ).getBlocksByClientId( clientId );

			if ( innerButtons.length ) {
				innerButtons[ 0 ].innerBlocks.forEach( block => {
					dispatch( 'core/editor' ).updateBlockAttributes(
						block.clientId,
						newAttributes.buttonAttributes
					);
				} );
			}
			setEmbedButtonAttributes( newAttributes.buttonAttributes );
		}

		testEmbedUrl( newAttributes.url, setIsResolvingUrl )
			.then( () => {
				const newValidatedAttributes = getValidatedAttributes( attributeDetails, newAttributes );
				setAttributes( newValidatedAttributes );
				setIsEditingUrl( false );
				noticeOperations.removeAllNotices();
			} )
			.catch( () => {
				setAttributes( { url: undefined } );
				setErrorNotice();
			} );
	};

	const embedCodeForm = (
		<>
			<form onSubmit={ parseEmbedCode }>
				<input
					type="text"
					id="embedCode"
					onChange={ event => setEmbedCode( event.target.value ) }
					placeholder={ __( 'Calendly web address or embed code…', 'jetpack' ) }
					value={ embedCode }
					className="components-placeholder__input"
				/>

					<Button isSecondary isLarge type="submit">
						{ _x( 'Embed', 'button label', 'jetpack' ) }
					</Button>

			</form>
			<div className={ `${ defaultClassName }-learn-more` }>
				<ExternalLink href="https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview">
					{ __( 'Need help finding your embed code?', 'jetpack' ) }
				</ExternalLink>

		</>
	);

	const blockEmbedding = (

			<Spinner />

{ __( 'Embedding…', 'jetpack' ) }

	);

	const blockPlaceholder = (
		<Placeholder
			label={ __( 'Calendly', 'jetpack' ) }
			instructions={ __( 'Enter your Calendly web address or embed code below.', 'jetpack' ) }
			icon={ <BlockIcon icon={ icon } /> }
			notices={ noticeUI }
		>
			{ embedCodeForm }
		</Placeholder>
	);

	const iframeSrc = () => {
		const query = queryString.stringify( {
			embed_domain: 'wordpress.com',
			embed_type: 'Inline',
			hide_event_type_details: hideEventTypeDetails ? 1 : 0,
			background_color: backgroundColor,
			primary_color: primaryColor,
			text_color: textColor,
		} );
		return `${ url }?${ query }`;
	};

	const inlinePreview = (
		<>
			<div className={ `${ defaultClassName }-overlay` }>

		</>
	);

	const buttonPreview = (
		<InnerBlocks
			template={ [
				[
					innerButtonBlock.name,
					{
						...innerButtonBlock.attributes,
						...embedButtonAttributes,
						passthroughAttributes: { url: 'url' },
					},
				],
			] }
			templateLock="all"
		/>
	);

	const linkPreview = (
		<>

				{ submitButtonText }

		</>
	);

	const blockPreview = ( previewStyle, disabled ) => {
		if ( previewStyle === 'inline' ) {
			return inlinePreview;
		}

		if ( disabled ) {
			return linkPreview;
		}

		return buttonPreview;
	};

	const styleOptions = [
		{ value: 'inline', label: __( 'Inline', 'jetpack' ) },
		{ value: 'link', label: __( 'Link', 'jetpack' ) },
	];

	const inspectorControls = (
		<>
			{ url && ! isEditingUrl && (
				<BlockControls>
					<Toolbar>
						<Button onClick={ () => setIsEditingUrl( true ) }>{ __( 'Edit', 'jetpack' ) }</Button>
					</Toolbar>
				</BlockControls>
			) }
			{ url && (
				<BlockStylesSelector
					clientId={ clientId }
					styleOptions={ styleOptions }
					onSelectStyle={ setAttributes }
					activeStyle={ style }
					attributes={ attributes }
					viewportWidth={ 500 }
				/>
			) }
			<InspectorControls>
				<PanelBody title={ __( 'Calendar Settings', 'jetpack' ) } initialOpen={ false }>
					<form
						onSubmit={ parseEmbedCode }
						className={ `${ defaultClassName }-embed-form-sidebar` }
					>
						<input
							type="text"
							id="embedCode"
							onChange={ event => setEmbedCode( event.target.value ) }
							placeholder={ __( 'Calendly web address or embed code…', 'jetpack' ) }
							value={ embedCode }
							className="components-placeholder__input"
						/>

							<Button isSecondary isLarge type="submit">
								{ _x( 'Embed', 'button label', 'jetpack' ) }
							</Button>

					</form>

					<ToggleControl
						label={ __( 'Hide Event Type Details', 'jetpack' ) }
						checked={ hideEventTypeDetails }
						onChange={ () => setAttributes( { hideEventTypeDetails: ! hideEventTypeDetails } ) }
					/>
				</PanelBody>
				{ url && (
					<Notice className={ `${ defaultClassName }-color-notice` } isDismissible={ false }>
						<ExternalLink href="https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-">
							{ __( 'Follow these instructions to change the colors in this block.', 'jetpack' ) }
						</ExternalLink>
					</Notice>
				) }
			</InspectorControls>
		</>
	);

	if ( isResolvingUrl ) {
		return blockEmbedding;
	}

	const classes = `${ className } calendly-style-${ style }`;

	return (

			{ inspectorControls }
			{ url && ! isEditingUrl ? blockPreview( style ) : blockPlaceholder }

	);
}

export default withNotices( CalendlyEdit );

{'repo_name': 'Automattic/jetpack', 'stars': '1211', 'repo_language': 'PHP', 'file_name': 'must-connect-main-blog.php', 'mime_type': 'text/html', 'hash': 4170176784632954668, '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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.vision.v1.model;

/**
 * Logical element on the page.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Vision API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudVisionV1p1beta1Block extends com.google.api.client.json.GenericJson {

  /**
   * Detected block type (text, image etc) for this block.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String blockType;

  /**
   * The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-
   * right, bottom-left. When a rotation of the bounding box is detected the rotation is represented
   * as around the top-left corner as defined when the text is read in the 'natural' orientation.
   * For example:
   *
   * * when the text is horizontal it might look like:
   *
   *         0----1         |    |         3----2
   *
   * * when it's rotated 180 degrees around the top-left corner it becomes:
   *
   *         2----3         |    |         1----0
   *
   *   and the vertex order will still be (0, 1, 2, 3).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudVisionV1p1beta1BoundingPoly boundingBox;

  /**
   * Confidence of the OCR results on the block. Range [0, 1].
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float confidence;

  /**
   * List of paragraphs in this block (if this blocks is of type text).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<GoogleCloudVisionV1p1beta1Paragraph> paragraphs;

  /**
   * Additional information detected for the block.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudVisionV1p1beta1TextAnnotationTextProperty property;

  /**
   * Detected block type (text, image etc) for this block.
   * @return value or {@code null} for none
   */
  public java.lang.String getBlockType() {
    return blockType;
  }

  /**
   * Detected block type (text, image etc) for this block.
   * @param blockType blockType or {@code null} for none
   */
  public GoogleCloudVisionV1p1beta1Block setBlockType(java.lang.String blockType) {
    this.blockType = blockType;
    return this;
  }

  /**
   * The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-
   * right, bottom-left. When a rotation of the bounding box is detected the rotation is represented
   * as around the top-left corner as defined when the text is read in the 'natural' orientation.
   * For example:
   *
   * * when the text is horizontal it might look like:
   *
   *         0----1         |    |         3----2
   *
   * * when it's rotated 180 degrees around the top-left corner it becomes:
   *
   *         2----3         |    |         1----0
   *
   *   and the vertex order will still be (0, 1, 2, 3).
   * @return value or {@code null} for none
   */
  public GoogleCloudVisionV1p1beta1BoundingPoly getBoundingBox() {
    return boundingBox;
  }

  /**
   * The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-
   * right, bottom-left. When a rotation of the bounding box is detected the rotation is represented
   * as around the top-left corner as defined when the text is read in the 'natural' orientation.
   * For example:
   *
   * * when the text is horizontal it might look like:
   *
   *         0----1         |    |         3----2
   *
   * * when it's rotated 180 degrees around the top-left corner it becomes:
   *
   *         2----3         |    |         1----0
   *
   *   and the vertex order will still be (0, 1, 2, 3).
   * @param boundingBox boundingBox or {@code null} for none
   */
  public GoogleCloudVisionV1p1beta1Block setBoundingBox(GoogleCloudVisionV1p1beta1BoundingPoly boundingBox) {
    this.boundingBox = boundingBox;
    return this;
  }

  /**
   * Confidence of the OCR results on the block. Range [0, 1].
   * @return value or {@code null} for none
   */
  public java.lang.Float getConfidence() {
    return confidence;
  }

  /**
   * Confidence of the OCR results on the block. Range [0, 1].
   * @param confidence confidence or {@code null} for none
   */
  public GoogleCloudVisionV1p1beta1Block setConfidence(java.lang.Float confidence) {
    this.confidence = confidence;
    return this;
  }

  /**
   * List of paragraphs in this block (if this blocks is of type text).
   * @return value or {@code null} for none
   */
  public java.util.List<GoogleCloudVisionV1p1beta1Paragraph> getParagraphs() {
    return paragraphs;
  }

  /**
   * List of paragraphs in this block (if this blocks is of type text).
   * @param paragraphs paragraphs or {@code null} for none
   */
  public GoogleCloudVisionV1p1beta1Block setParagraphs(java.util.List<GoogleCloudVisionV1p1beta1Paragraph> paragraphs) {
    this.paragraphs = paragraphs;
    return this;
  }

  /**
   * Additional information detected for the block.
   * @return value or {@code null} for none
   */
  public GoogleCloudVisionV1p1beta1TextAnnotationTextProperty getProperty() {
    return property;
  }

  /**
   * Additional information detected for the block.
   * @param property property or {@code null} for none
   */
  public GoogleCloudVisionV1p1beta1Block setProperty(GoogleCloudVisionV1p1beta1TextAnnotationTextProperty property) {
    this.property = property;
    return this;
  }

  @Override
  public GoogleCloudVisionV1p1beta1Block set(String fieldName, Object value) {
    return (GoogleCloudVisionV1p1beta1Block) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudVisionV1p1beta1Block clone() {
    return (GoogleCloudVisionV1p1beta1Block) super.clone();
  }

}

{'repo_name': 'googleapis/google-api-java-client-services', 'stars': '127', 'repo_language': 'Java', 'file_name': 'RemoteBuildExecution.java', 'mime_type': 'text/html', 'hash': -5940440509815258676, 'source_dataset': 'data'}


#include "driver.h"
#include "cpuintrf.h"
#include "state.h"
#include "armnecintrf.h"
#include "armnec.h"

#define VEZ_MEM_SHIFT	11
#define VEZ_PAGE_COUNT	(1 << (20 - VEZ_MEM_SHIFT))

/* structure definition */
typedef struct
{
    struct ArmNec regs; /* ArmNec structure */
	UINT32	int_vector; /* interrupt vector (not used) */
	UINT32	pending_irq; /* pending irq */
	UINT32	nmi_state; /* NMI state */
	UINT32	irq_state; /* IRQ state */
	int     (*irq_callback)(int irqline); /* MAME IRQ callback */
	unsigned char * ppMemRead[VEZ_PAGE_COUNT];
	unsigned char * ppMemWrite[VEZ_PAGE_COUNT];
} armnec_regs;

/* static structure */
static armnec_regs ARMNEC;

/* cycles */
int *armnec_cycles=&ARMNEC.regs.cycles;

/* interrupt types */
#define INT_IRQ 0x01
#define NMI_IRQ 0x02

/* ArmNec required functions */

static int armnec_UnrecognizedCallback(unsigned int a) { return 0; }

static unsigned int armnec_read8(unsigned int Addr)
{
    return ((cpu_readmem20(Addr))&0xff);
}

static unsigned int armnec_read16(unsigned int Addr)
{
	return (((cpu_readmem20(Addr))&0xff)|((cpu_readmem20(Addr+1)&0xff)<<8));
}

static void armnec_write8(unsigned int Addr,unsigned int Value)
{
	cpu_writemem20(Addr,Value);
}

static void armnec_write16(unsigned int Addr,unsigned int Value)
{
	cpu_writemem20(Addr,(unsigned char)Value&0xff);
	cpu_writemem20(Addr+1,((unsigned char)(Value>>8))&0xff);
}

static unsigned int armnec_in8(unsigned int Addr)
{
	return ((cpu_readport(Addr))&0xff);
}

static void armnec_out8(unsigned int Addr, unsigned int Value)
{
	cpu_writeport(Addr,Value);
}

static unsigned int armnec_checkpc(unsigned int ps, unsigned int ip)
{
	change_pc20((ps << 4) + ip);
    ARMNEC.regs.mem_base=(unsigned int) OP_ROM;
    ARMNEC.regs.pc=ARMNEC.regs.mem_base + ((ps << 4) + ip);
    return (ARMNEC.regs.pc);
}

#define CHECK_PC armnec_checkpc(ARMNEC.regs.sreg[1], ARMNEC.regs.ip)

/* NEC required functions */

void armnec_init(void) { }
void armnec_set_irq_callback(int (*callback)(int irqline)) { ARMNEC.irq_callback = callback; }
unsigned armnec_dasm(char *buffer, unsigned pc) { sprintf( buffer, "$%02X", cpu_readop(pc) ); return 1; }
void armnec_exit(void) { }

void armnec_reset(void *param)
{
    memset(&ARMNEC,0,sizeof(armnec_regs));

	ARMNEC.regs.read8 = armnec_read8;
	ARMNEC.regs.read16 = armnec_read16;
	ARMNEC.regs.write8 = armnec_write8;
	ARMNEC.regs.write16 = armnec_write16;
	ARMNEC.regs.in8 = armnec_in8;
	ARMNEC.regs.out8 = armnec_out8;
	ARMNEC.regs.checkpc = armnec_checkpc;
	ARMNEC.regs.UnrecognizedCallback = armnec_UnrecognizedCallback;
	ARMNEC.regs.ReadMemMap=ARMNEC.ppMemRead;
	ARMNEC.regs.WriteMemMap=ARMNEC.ppMemRead;

	ARMNEC.regs.sreg[1] = 0xffff;
	ARMNEC.regs.flags = 0x8000; // MF

	CHECK_PC;
}

unsigned armnec_get_context(void *dst)
{
    if (dst) memcpy (dst,&ARMNEC,sizeof (armnec_regs));
    return sizeof(armnec_regs);
}

void armnec_set_context(void *src)
{
    if (src) memcpy (&ARMNEC, src, sizeof (armnec_regs));
    CHECK_PC;
}

unsigned armnec_get_pc(void)
{
    return ((ARMNEC.regs.sreg[1] << 4) + ARMNEC.regs.ip);
}

void armnec_set_pc(unsigned val)
{
	if( val - (ARMNEC.regs.sreg[1]<<4) < 0x10000 )
	{
		ARMNEC.regs.ip = val - (ARMNEC.regs.sreg[1]);
	}
	else
	{
		ARMNEC.regs.sreg[1] = val >> 4;
		ARMNEC.regs.ip = val & 0x0000f;
	}
	CHECK_PC;
}

unsigned armnec_get_sp(void)
{
    unsigned short *regs=(unsigned short *)ARMNEC.regs.reg;
   	return (ARMNEC.regs.sreg[2]<<4) + regs[4];
}

void armnec_set_sp(unsigned val)
{
    unsigned short *regs=(unsigned short *)ARMNEC.regs.reg;
	if( val - (ARMNEC.regs.sreg[2]<<4) < 0x10000 )
	{
		regs[4] = val - (ARMNEC.regs.sreg[2]<<4);
	}
	else
	{
		ARMNEC.regs.sreg[2] = val >> 4;
		regs[4] = val & 0x0000f;
	}
}

unsigned armnec_get_reg(int regnum)
{
    unsigned short *regs=(unsigned short *)ARMNEC.regs.reg;

	switch( regnum )
	{
		case ARMNEC_IP: return ARMNEC.regs.ip;
		case ARMNEC_FLAGS: return ARMNEC.regs.flags;
        case ARMNEC_AW: return regs[0];
		case ARMNEC_CW: return regs[1];
		case ARMNEC_DW: return regs[2];
		case ARMNEC_BW: return regs[3];
		case ARMNEC_SP: return regs[4];
		case ARMNEC_BP: return regs[5];
		case ARMNEC_IX: return regs[6];
		case ARMNEC_IY: return regs[7];
		case ARMNEC_ES: return ARMNEC.regs.sreg[0];
		case ARMNEC_CS: return ARMNEC.regs.sreg[1];
		case ARMNEC_SS: return ARMNEC.regs.sreg[2];
		case ARMNEC_DS: return ARMNEC.regs.sreg[3];
		case ARMNEC_VECTOR: return ARMNEC.int_vector;
		case ARMNEC_PENDING: return ARMNEC.pending_irq;
		case ARMNEC_NMI_STATE: return ARMNEC.nmi_state;
		case ARMNEC_IRQ_STATE: return ARMNEC.irq_state;
		case REG_PREVIOUSPC: return 0;	/* not supported */
		default:
			if( regnum <= REG_SP_CONTENTS )
			{
				unsigned offset = armnec_get_sp() + 2 * (REG_SP_CONTENTS - regnum);
				return cpu_readmem20( offset ) | ( cpu_readmem20( offset + 1) << 8 );
			}
	}
	return 0;
}

void armnec_set_reg(int regnum, unsigned val)
{
    unsigned short *regs=(unsigned short *)ARMNEC.regs.reg;

	switch( regnum )
	{
		case ARMNEC_IP: ARMNEC.regs.ip = val; break;
		case ARMNEC_FLAGS: ARMNEC.regs.flags = val; break;
        case ARMNEC_AW: regs[0] = val; break;
		case ARMNEC_CW: regs[1] = val; break;
		case ARMNEC_DW: regs[2] = val; break;
		case ARMNEC_BW: regs[3] = val; break;
		case ARMNEC_SP: regs[4] = val; break;
		case ARMNEC_BP: regs[5] = val; break;
		case ARMNEC_IX: regs[6] = val; break;
		case ARMNEC_IY: regs[7] = val; break;
		case ARMNEC_ES: ARMNEC.regs.sreg[0] = val; break;
		case ARMNEC_CS: ARMNEC.regs.sreg[1] = val; break;
		case ARMNEC_SS: ARMNEC.regs.sreg[2] = val; break;
		case ARMNEC_DS: ARMNEC.regs.sreg[3] = val; break;
		case ARMNEC_VECTOR: ARMNEC.int_vector = val; break;
		case ARMNEC_PENDING: ARMNEC.pending_irq = val; break;
		case ARMNEC_NMI_STATE: armnec_set_nmi_line(val); break;
		case ARMNEC_IRQ_STATE: armnec_set_irq_line(0,val); break;
		default:
			if( regnum <= REG_SP_CONTENTS )
			{
				unsigned offset = armnec_get_sp() + 2 * (REG_SP_CONTENTS - regnum);
				cpu_writemem20( offset, val & 0xff );
				cpu_writemem20( offset+1, (val >> 8) & 0xff );
			}
    }
}

void armnec_set_nmi_line(int state)
{
	if( ARMNEC.nmi_state == state ) return;
    ARMNEC.nmi_state = state;
	if (state != CLEAR_LINE)
	{
		ARMNEC.pending_irq |= NMI_IRQ;
	}
}

void armnec_set_irq_line(int irqline, int state)
{
	ARMNEC.irq_state = state;
	if (state == CLEAR_LINE)
	{
		if (!(ARMNEC.regs.flags & 0x0200))
			ARMNEC.pending_irq &= ~INT_IRQ;
	}
	else
	{
		if (ARMNEC.regs.flags & 0x0200)
			ARMNEC.pending_irq |= INT_IRQ;
	}
}

static void armv30_interrupt(void)
{
	if( ARMNEC.pending_irq & NMI_IRQ )
	{
        ArmV30Irq(&ARMNEC.regs, ARMNEC_NMI_INT);
    	CHECK_PC;
		ARMNEC.pending_irq &= ~NMI_IRQ;
	}
	else if( ARMNEC.pending_irq )
	{
        ArmV30Irq(&ARMNEC.regs,(*ARMNEC.irq_callback)(0));
    	CHECK_PC;
		ARMNEC.irq_state = CLEAR_LINE;
		ARMNEC.pending_irq &= ~INT_IRQ;
	}
}

static void armv33_interrupt(void)
{
	if( ARMNEC.pending_irq & NMI_IRQ )
	{
        ArmV33Irq(&ARMNEC.regs, ARMNEC_NMI_INT);
    	CHECK_PC;
		ARMNEC.pending_irq &= ~NMI_IRQ;
	}
	else if( ARMNEC.pending_irq )
	{
        ArmV33Irq(&ARMNEC.regs,(*ARMNEC.irq_callback)(0));
    	CHECK_PC;
		ARMNEC.irq_state = CLEAR_LINE;
		ARMNEC.pending_irq &= ~INT_IRQ;
	}
}

int armv30_execute(int cycles)
{
    int exec=0;
	ARMNEC.regs.cycles = cycles;
	if (ARMNEC.pending_irq) armv30_interrupt();
    exec=ArmV30Run(&ARMNEC.regs);
	CHECK_PC;
	return (cycles-exec);
}

int armv33_execute(int cycles)
{
    int exec=0;
	ARMNEC.regs.cycles = cycles;
	if (ARMNEC.pending_irq) armv33_interrupt();
    exec=ArmV33Run(&ARMNEC.regs);
	CHECK_PC;
	return (cycles-exec);
}

const char *armv30_info(void *context, int regnum)
{
    switch( regnum )
    {
        case CPU_INFO_NAME: return "ArmNec V30";
        case CPU_INFO_FAMILY: return "NEC V-Series";
        case CPU_INFO_VERSION: return "1.0";
        case CPU_INFO_FILE: return __FILE__;
        case CPU_INFO_CREDITS: return "ArmNec emulator by Oopsware";
    }
    return "";
}

const char *armv33_info(void *context, int regnum)
{
    switch( regnum )
    {
        case CPU_INFO_NAME: return "ArmNec V33";
        case CPU_INFO_FAMILY: return "NEC V-Series";
        case CPU_INFO_VERSION: return "1.0";
        case CPU_INFO_FILE: return __FILE__;
        case CPU_INFO_CREDITS: return "ArmNec emulator by Oopsware";
    }
    return "";
}

{'repo_name': 'kevsmithpublic/MameAppleTV', 'stars': '223', 'repo_language': 'C++', 'file_name': 'Main.storyboard', 'mime_type': 'text/xml', 'hash': 7880210461247502857, 'source_dataset': 'data'}


<!doctype html>

<title>CodeMirror: Closure Stylesheets (GSS) mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">

<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../addon/hint/show-hint.css">

CodeMirror

Home

Manual

Code

Language modes

Closure Stylesheets (GSS)

Closure Stylesheets (GSS) mode

<form><textarea id="code" name="code">
/* Some example Closure Stylesheets */

@provide 'some.styles';

@require 'other.styles';

@component {

@def FONT_FAMILY           "Times New Roman", Georgia, Serif;
@def FONT_SIZE_NORMAL      15px;
@def FONT_NORMAL           normal FONT_SIZE_NORMAL FONT_FAMILY;

@def BG_COLOR              rgb(235, 239, 249);

@def DIALOG_BORDER_COLOR   rgb(107, 144, 218);
@def DIALOG_BG_COLOR       BG_COLOR;

@def LEFT_HAND_NAV_WIDTH    180px;
@def LEFT_HAND_NAV_PADDING  3px;

@defmixin size(WIDTH, HEIGHT) {
  width: WIDTH;
  height: HEIGHT;
}

body {
  background-color: BG_COLOR;
  margin: 0;
  padding: 3em 6em;
  font: FONT_NORMAL;
  color: #000;
}

#navigation a {
  font-weight: bold;
  text-decoration: none !important;
}

.dialog {
  background-color: DIALOG_BG_COLOR;
  border: 1px solid DIALOG_BORDER_COLOR;
}

.content {
  position: absolute;
  margin-left: add(LEFT_HAND_NAV_PADDING,  /* padding left */
                   LEFT_HAND_NAV_WIDTH,
                   LEFT_HAND_NAV_PADDING); /* padding right */

}

.logo {
  @mixin size(150px, 55px);
  background-image: url('http://www.google.com/images/logo_sm.gif');
}

}
</textarea></form>

A mode for Closure Stylesheets (GSS).

MIME type defined: text/x-gss.

Parsing/Highlighting Tests: normal,  verbose.

{'repo_name': 'shi-yang/jnoj', 'stars': '118', 'repo_language': 'JavaScript', 'file_name': 'detail.php', 'mime_type': 'text/x-php', 'hash': -3625982877399163506, 'source_dataset': 'data'}


{'repo_name': 'SAPDocuments/Tutorials', 'stars': '319', 'repo_language': 'Jupyter Notebook', 'file_name': 'tags.json', 'mime_type': 'text/plain', 'hash': 742144978845583526, 'source_dataset': 'data'}


name: "VGG16"

#precision default_forward_type: __FORWARD_TYPE___
#precision default_backward_type: __BACKWARD_TYPE___
#precision default_forward_math: __FORWARD_MATH___
#precision default_backward_math: __BACKWARD_MATH___

#synthetic layer {
#synthetic   name: "data"
#synthetic   type: "Input"
#synthetic   top: "data"
#synthetic   input_param { shape: { dim: __EXP_DEVICE_BATCH__ dim: 3 dim: 224 dim: 224 } }
#synthetic }
#synthetic layer {
#synthetic   name: "label"
#synthetic   type: "Input"
#synthetic   top: "label"
#synthetic   input_param { shape: { dim: __EXP_DEVICE_BATCH__ dim: 1 } }
#synthetic }

#data layer {
#data   name: "data"
#data   type: "Data"
#data   top: "data"
#data   top: "label"
#data   include {
#data     phase: TRAIN
#data   }
#data   transform_param {
#data     mirror: __CAFFE_MIRROR__
#data     crop_size: 224
#data     mean_file: "__CAFFE_DATA_MEAN_FILE__"
#data   }
#data   data_param {
#data     source: "__CAFFE_DATA_DIR__"
#data     batch_size: __EXP_DEVICE_BATCH__
#data     backend: __CAFFE_DATA_BACKEND__
#data   }
#data }

layer {
  name: "conv1_1"
  type: "Convolution"
  bottom: "data"
  top: "conv1_1"
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu1_1"
  type: "ReLU"
  bottom: "conv1_1"
  top: "conv1_1"
}
layer {
  name: "conv1_2"
  type: "Convolution"
  bottom: "conv1_1"
  top: "conv1_2"
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu1_2"
  type: "ReLU"
  bottom: "conv1_2"
  top: "conv1_2"
}
layer {
  name: "pool1"
  type: "Pooling"
  bottom: "conv1_2"
  top: "pool1"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv2_1"
  type: "Convolution"
  bottom: "pool1"
  top: "conv2_1"
  convolution_param {
    num_output: 128
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu2_1"
  type: "ReLU"
  bottom: "conv2_1"
  top: "conv2_1"
}
layer {
  name: "conv2_2"
  type: "Convolution"
  bottom: "conv2_1"
  top: "conv2_2"
  convolution_param {
    num_output: 128
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu2_2"
  type: "ReLU"
  bottom: "conv2_2"
  top: "conv2_2"
}
layer {
  name: "pool2"
  type: "Pooling"
  bottom: "conv2_2"
  top: "pool2"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv3_1"
  type: "Convolution"
  bottom: "pool2"
  top: "conv3_1"
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu3_1"
  type: "ReLU"
  bottom: "conv3_1"
  top: "conv3_1"
}
layer {
  name: "conv3_2"
  type: "Convolution"
  bottom: "conv3_1"
  top: "conv3_2"
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu3_2"
  type: "ReLU"
  bottom: "conv3_2"
  top: "conv3_2"
}
layer {
  name: "conv3_3"
  type: "Convolution"
  bottom: "conv3_2"
  top: "conv3_3"
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu3_3"
  type: "ReLU"
  bottom: "conv3_3"
  top: "conv3_3"
}
layer {
  name: "pool3"
  type: "Pooling"
  bottom: "conv3_3"
  top: "pool3"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv4_1"
  type: "Convolution"
  bottom: "pool3"
  top: "conv4_1"
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu4_1"
  type: "ReLU"
  bottom: "conv4_1"
  top: "conv4_1"
}
layer {
  name: "conv4_2"
  type: "Convolution"
  bottom: "conv4_1"
  top: "conv4_2"
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu4_2"
  type: "ReLU"
  bottom: "conv4_2"
  top: "conv4_2"
}
layer {
  name: "conv4_3"
  type: "Convolution"
  bottom: "conv4_2"
  top: "conv4_3"
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu4_3"
  type: "ReLU"
  bottom: "conv4_3"
  top: "conv4_3"
}
layer {
  name: "pool4"
  type: "Pooling"
  bottom: "conv4_3"
  top: "pool4"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "conv5_1"
  type: "Convolution"
  bottom: "pool4"
  top: "conv5_1"
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu5_1"
  type: "ReLU"
  bottom: "conv5_1"
  top: "conv5_1"
}
layer {
  name: "conv5_2"
  type: "Convolution"
  bottom: "conv5_1"
  top: "conv5_2"
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu5_2"
  type: "ReLU"
  bottom: "conv5_2"
  top: "conv5_2"
}
layer {
  name: "conv5_3"
  type: "Convolution"
  bottom: "conv5_2"
  top: "conv5_3"
  convolution_param {
    num_output: 512
    pad: 1
    kernel_size: 3
  }
}
layer {
  name: "relu5_3"
  type: "ReLU"
  bottom: "conv5_3"
  top: "conv5_3"
}
layer {
  name: "pool5"
  type: "Pooling"
  bottom: "conv5_3"
  top: "pool5"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}
layer {
  name: "fc6"
  type: "InnerProduct"
  bottom: "pool5"
  top: "fc6"
  inner_product_param {
    num_output: 4096
  }
}
layer {
  name: "relu6"
  type: "ReLU"
  bottom: "fc6"
  top: "fc6"
}
layer {
  name: "drop6"
  type: "Dropout"
  bottom: "fc6"
  top: "fc6"
  dropout_param {
    dropout_ratio: 0.5
  }
}
layer {
  name: "fc7"
  type: "InnerProduct"
  bottom: "fc6"
  top: "fc7"
  inner_product_param {
    num_output: 4096
  }
}
layer {
  name: "relu7"
  type: "ReLU"
  bottom: "fc7"
  top: "fc7"
}
layer {
  name: "drop7"
  type: "Dropout"
  bottom: "fc7"
  top: "fc7"
  dropout_param {
    dropout_ratio: 0.5
  }
}
layer {
  name: "fc8"
  type: "InnerProduct"
  bottom: "fc7"
  top: "fc8"
  inner_product_param {
    num_output: 1000
  }
}
layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "fc8"
  bottom: "label"
  top: "loss"
}

{'repo_name': 'HewlettPackard/dlcookbook-dlbs', 'stars': '105', 'repo_language': 'Python', 'file_name': 'index.rst', 'mime_type': 'text/plain', 'hash': -1597965614194574847, 'source_dataset': 'data'}


# Copyright 2016 The TensorFlow Authors. 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.
# ==============================================================================
"""Contains utilities for downloading and converting datasets."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os
import sys
import tarfile

from six.moves import urllib
import tensorflow as tf

LABELS_FILENAME = 'labels.txt'

def int64_feature(values):
  """Returns a TF-Feature of int64s.

  Args:
    values: A scalar or list of values.

  Returns:
    a TF-Feature.
  """
  if not isinstance(values, (tuple, list)):
    values = [values]
  return tf.train.Feature(int64_list=tf.train.Int64List(value=values))

def bytes_feature(values):
  """Returns a TF-Feature of bytes.

  Args:
    values: A string.

  Returns:
    a TF-Feature.
  """
  return tf.train.Feature(bytes_list=tf.train.BytesList(value=[values]))

def image_to_tfexample(image_data, image_format, height, width, class_id):
  return tf.train.Example(features=tf.train.Features(feature={
      'image/encoded': bytes_feature(image_data),
      'image/format': bytes_feature(image_format),
      'image/class/label': int64_feature(class_id),
      'image/height': int64_feature(height),
      'image/width': int64_feature(width),
  }))

def download_and_uncompress_tarball(tarball_url, dataset_dir):
  """Downloads the `tarball_url` and uncompresses it locally.

  Args:
    tarball_url: The URL of a tarball file.
    dataset_dir: The directory where the temporary files are stored.
  """
  filename = tarball_url.split('/')[-1]
  filepath = os.path.join(dataset_dir, filename)

  def _progress(count, block_size, total_size):
    sys.stdout.write('\r>> Downloading %s %.1f%%' % (
        filename, float(count * block_size) / float(total_size) * 100.0))
    sys.stdout.flush()
  filepath, _ = urllib.request.urlretrieve(tarball_url, filepath, _progress)
  print()
  statinfo = os.stat(filepath)
  print('Successfully downloaded', filename, statinfo.st_size, 'bytes.')
  tarfile.open(filepath, 'r:gz').extractall(dataset_dir)

def write_label_file(labels_to_class_names, dataset_dir,
                     filename=LABELS_FILENAME):
  """Writes a file with the list of class names.

  Args:
    labels_to_class_names: A map of (integer) labels to class names.
    dataset_dir: The directory in which the labels file should be written.
    filename: The filename where the class names are written.
  """
  labels_filename = os.path.join(dataset_dir, filename)
  with tf.gfile.Open(labels_filename, 'w') as f:
    for label in labels_to_class_names:
      class_name = labels_to_class_names[label]
      f.write('%d:%s\n' % (label, class_name))

def has_labels(dataset_dir, filename=LABELS_FILENAME):
  """Specifies whether or not the dataset directory contains a label map file.

  Args:
    dataset_dir: The directory in which the labels file is found.
    filename: The filename where the class names are written.

  Returns:
    `True` if the labels file exists and `False` otherwise.
  """
  return tf.gfile.Exists(os.path.join(dataset_dir, filename))

def read_label_file(dataset_dir, filename=LABELS_FILENAME):
  """Reads the labels file and returns a mapping from ID to class name.

  Args:
    dataset_dir: The directory in which the labels file is found.
    filename: The filename where the class names are written.

  Returns:
    A map from a label (integer) to class name.
  """
  labels_filename = os.path.join(dataset_dir, filename)
  with tf.gfile.Open(labels_filename, 'r') as f:
    lines = f.read().decode()
  lines = lines.split('\n')
  lines = filter(None, lines)

  labels_to_class_names = {}
  for line in lines:
    index = line.index(':')
    labels_to_class_names[int(line[:index])] = line[index+1:]
  return labels_to_class_names

{'repo_name': 'rohitgirdhar/AttentionalPoolingAction', 'stars': '232', 'repo_language': 'Python', 'file_name': 'overfeat.py', 'mime_type': 'text/x-python', 'hash': -4901216690872030604, 'source_dataset': 'data'}


package cloudauth

//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// MaterialInVerifyMaterial is a nested struct in cloudauth response
type MaterialInVerifyMaterial struct {
	FaceImageUrl  string     `json:"FaceImageUrl" xml:"FaceImageUrl"`
	IdCardName    string     `json:"IdCardName" xml:"IdCardName"`
	IdCardNumber  string     `json:"IdCardNumber" xml:"IdCardNumber"`
	FaceQuality   string     `json:"FaceQuality" xml:"FaceQuality"`
	FaceGlobalUrl string     `json:"FaceGlobalUrl" xml:"FaceGlobalUrl"`
	FaceMask      string     `json:"FaceMask" xml:"FaceMask"`
	IdCardInfo    IdCardInfo `json:"IdCardInfo" xml:"IdCardInfo"`
}

{'repo_name': 'aliyun/alibaba-cloud-sdk-go', 'stars': '747', 'repo_language': 'Go', 'file_name': 'struct_cert_list.go', 'mime_type': 'text/plain', 'hash': -2627328217997497863, 'source_dataset': 'data'}


CMFCRibbonPanel* pPanel3 = pCategory->AddPanel(_T("Font"));

CMFCRibbonFontComboBox::m_bDrawUsingFont = TRUE;
CMFCRibbonFontComboBox* pBtn7 = new CMFCRibbonFontComboBox(ID_RIBBON_EBTN_7);
pBtn7->SelectItem(_T("Arial"));
pPanel3->Add(pBtn7);

{'repo_name': 'dotnet/docs', 'stars': '2342', 'repo_language': 'PowerShell', 'file_name': 'class1.vb', 'mime_type': 'text/plain', 'hash': 4152435423891778579, 'source_dataset': 'data'}


var mysql = require('../lib/mysql.js');
var Util = require('../lib/util.js');

/**
 * 查询文件
 */
exports.queryFile = function(fileId, callback){
    mysql.queryOne('select * from file where id = ?', [fileId], function(err, file) {
        callback(err, file);
    });
};

/**
 * 保存文件
 */
exports.saveFile = function(fileName, userId, folderId, fileHashname, fileSize, fileMime, is_public, date ,description, callback){
    mysql.update('insert into file(name, user_id, folder_id, hash, size, mime, is_public, create_at, description) values(?,?,?,?,?,?,?,?,?)', [ fileName, userId, folderId, fileHashname, fileSize, fileMime, is_public, date ,description ], function(err, info) {
        callback(err, info);
    });
};

/**
 * 查询用户文件夹下的所有文件
 */
exports.queryFiles = function(folderId, userId, callback){
    mysql.query('select * from file where folder_id = ? and user_id =?  order by create_at desc', [ folderId, userId ], function(err, files) {
        callback(err, files);
    });
};

/**
 * 查询文件夹下的所有文件
 */
exports.queryFilesOfFolder = function(folderId, callback){
    mysql.query('select * from file where folder_id = ? order by create_at desc', [ folderId ], function(err, files) {
        callback(err, files);
    });
};

/**
 * 批量按文件夹id查询文件总数
 */
exports.queryFilesCountOfFolders = function(folderIds, callback){
    mysql.query('select count(id) as count, folder_id from file where folder_id in(' + folderIds.join(',') + ') group by folder_id', [], function(err, kvs) {
        callback(err, kvs);
    });
};

/**
 * 删除文件
 */
exports.deleteFile = function(fileId, userId, callback){
    mysql.update('delete from file where id = ? and user_id = ?', [fileId, userId], function(err, info){
        callback(err, info);
    });
};

/**
 * 设置文件可见性：isPublic=1为可见，0为不可见
 */
exports.updateFileVisibility = function(isPublic, fileId, userId, callback){
    mysql.update('update file set is_public = ? where id = ? and user_id = ?', [isPublic, fileId, userId], function(err, info){
        callback(err, info);
    });
};

/**
 * 设置文件下载量
 */
exports.updateFileDownload = function(fileId, callback){
    mysql.update('update file set down_count = down_count+1 where id = ?', [fileId], function(err,info){
        callback(err, info);
    });
};

/**
 * 设置文件所属文件夹
 */
exports.updateFileFolder = function(fileId, folderId, userId, callback){
    mysql.update('update file set folder_id = ? where id = ? and user_id = ?', [ folderId, fileId, userId ], function(err,info){
        callback(err, info);
    });
};

/**
 * 查询最新文件
 */
exports.queryNewFiles = function(limit, callback){
    mysql.query('select * from file  where is_public = ? order by id desc limit ?', [ 1, limit ], function(err, files) {
        callback(err, files);
    });
};

/**
 * 查询下载量最多文件
 */
exports.queryHotFiles = function(limit, callback){
    mysql.query('select * from file  where is_public = ? order by down_count desc limit ?', [ 1, limit ], function(err, files) {
        callback(err, files);
    });
};

/**
 * 查询用户的公开文件
 */
exports.queryPublicFilesOfUser = function(userId, callback){
    mysql.query('select * from file where user_id = ? and is_public = ?', [ userId, 1 ], function(err, files) {
        callback(err, files);
    });
};

{'repo_name': 'sumory/sumorio', 'stars': '137', 'repo_language': 'JavaScript', 'file_name': 'message.js', 'mime_type': 'text/plain', 'hash': 1646537586086330001, 'source_dataset': 'data'}


/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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.
 */
package support.ui.utilities.time;

import java.text.DateFormat;
import java.text.FieldPosition;
import java.text.Format;
import java.text.ParseException;
import java.text.ParsePosition;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

/**
 *
FastDateFormat is a fast and thread-safe version of
 * {@link java.text.SimpleDateFormat}.

 *
 *
This class can be used as a direct replacement to
 * {@code SimpleDateFormat} in most formatting and parsing situations.
 * This class is especially useful in multi-threaded server environments.
 * {@code SimpleDateFormat} is not thread-safe in any JDK version,
 * nor will it be as Sun have closed the bug/RFE.
 *

 *
 *
All patterns are compatible with
 * SimpleDateFormat (except time zones and some year patterns - see below).

 *
 *
Since 3.2, FastDateFormat supports parsing as well as printing.

 *
 *
Java 1.4 introduced a new pattern letter, {@code 'Z'}, to represent
 * time zones in RFC822 format (eg. {@code +0800} or {@code -1100}).
 * This pattern letter can be used here (on all JDK versions).

 *
 *
In addition, the pattern {@code 'ZZ'} has been made to represent
 * ISO8601 full format time zones (eg. {@code +08:00} or {@code -11:00}).
 * This introduces a minor incompatibility with Java 1.4, but at a gain of
 * useful functionality.

 *
 *
Javadoc cites for the year pattern: For formatting, if the number of
 * pattern letters is 2, the year is truncated to 2 digits; otherwise it is
 * interpreted as a number. Starting with Java 1.7 a pattern of 'Y' or
 * 'YYY' will be formatted as '2003', while it was '03' in former Java
 * versions. FastDateFormat implements the behavior of Java 7.

 *
 * @since 2.0
 * @version $Id: FastDateFormat.java 1572877 2014-02-28 08:42:25Z britter $
 */
public class FastDateFormat extends Format implements DateParser, DatePrinter {
  /**
   * Required for serialization support.
   *
   * @see java.io.Serializable
   */
  private static final long serialVersionUID = 2L;

  /**
   * FULL locale dependent date or time style.
   */
  public static final int FULL = DateFormat.FULL;
  /**
   * LONG locale dependent date or time style.
   */
  public static final int LONG = DateFormat.LONG;
  /**
   * MEDIUM locale dependent date or time style.
   */
  public static final int MEDIUM = DateFormat.MEDIUM;
  /**
   * SHORT locale dependent date or time style.
   */
  public static final int SHORT = DateFormat.SHORT;

  private static final FormatCache<FastDateFormat> cache = new FormatCache<FastDateFormat>() {
    @Override
    protected FastDateFormat createInstance(final String pattern, final TimeZone timeZone, final Locale locale) {
      return new FastDateFormat(pattern, timeZone, locale);
    }
  };

  private final FastDatePrinter printer;
  private final FastDateParser parser;

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

  /**
   *
Gets a formatter instance using the default pattern in the
   * default locale.

   *
   * @return a date/time formatter
   */
  public static FastDateFormat getInstance() {
    return cache.getInstance();
  }

  /**
   *
Gets a formatter instance using the specified pattern in the
   * default locale.

   *
   * @param pattern {@link java.text.SimpleDateFormat} compatible
   *                pattern
   * @return a pattern based date/time formatter
   * @throws IllegalArgumentException if pattern is invalid
   */
  public static FastDateFormat getInstance(final String pattern) {
    return cache.getInstance(pattern, null, null);
  }

  /**
   *
Gets a formatter instance using the specified pattern and
   * time zone.

   *
   * @param pattern  {@link java.text.SimpleDateFormat} compatible
   *                 pattern
   * @param timeZone optional time zone, overrides time zone of
   *                 formatted date
   * @return a pattern based date/time formatter
   * @throws IllegalArgumentException if pattern is invalid
   */
  public static FastDateFormat getInstance(final String pattern, final TimeZone timeZone) {
    return cache.getInstance(pattern, timeZone, null);
  }

  /**
   *
Gets a formatter instance using the specified pattern and
   * locale.

   *
   * @param pattern {@link java.text.SimpleDateFormat} compatible
   *                pattern
   * @param locale  optional locale, overrides system locale
   * @return a pattern based date/time formatter
   * @throws IllegalArgumentException if pattern is invalid
   */
  public static FastDateFormat getInstance(final String pattern, final Locale locale) {
    return cache.getInstance(pattern, null, locale);
  }

  /**
   *
Gets a formatter instance using the specified pattern, time zone
   * and locale.

   *
   * @param pattern  {@link java.text.SimpleDateFormat} compatible
   *                 pattern
   * @param timeZone optional time zone, overrides time zone of
   *                 formatted date
   * @param locale   optional locale, overrides system locale
   * @return a pattern based date/time formatter
   * @throws IllegalArgumentException if pattern is invalid
   *                                  or {@code null}
   */
  public static FastDateFormat getInstance(final String pattern, final TimeZone timeZone, final Locale locale) {
    return cache.getInstance(pattern, timeZone, locale);
  }

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

  /**
   *
Gets a date formatter instance using the specified style in the
   * default time zone and locale.

   *
   * @param style date style: FULL, LONG, MEDIUM, or SHORT
   * @return a localized standard date formatter
   * @throws IllegalArgumentException if the Locale has no date
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getDateInstance(final int style) {
    return cache.getDateInstance(style, null, null);
  }

  /**
   *
Gets a date formatter instance using the specified style and
   * locale in the default time zone.

   *
   * @param style  date style: FULL, LONG, MEDIUM, or SHORT
   * @param locale optional locale, overrides system locale
   * @return a localized standard date formatter
   * @throws IllegalArgumentException if the Locale has no date
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getDateInstance(final int style, final Locale locale) {
    return cache.getDateInstance(style, null, locale);
  }

  /**
   *
Gets a date formatter instance using the specified style and
   * time zone in the default locale.

   *
   * @param style    date style: FULL, LONG, MEDIUM, or SHORT
   * @param timeZone optional time zone, overrides time zone of
   *                 formatted date
   * @return a localized standard date formatter
   * @throws IllegalArgumentException if the Locale has no date
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone) {
    return cache.getDateInstance(style, timeZone, null);
  }

  /**
   *
Gets a date formatter instance using the specified style, time
   * zone and locale.

   *
   * @param style    date style: FULL, LONG, MEDIUM, or SHORT
   * @param timeZone optional time zone, overrides time zone of
   *                 formatted date
   * @param locale   optional locale, overrides system locale
   * @return a localized standard date formatter
   * @throws IllegalArgumentException if the Locale has no date
   *                                  pattern defined
   */
  public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone, final Locale locale) {
    return cache.getDateInstance(style, timeZone, locale);
  }

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

  /**
   *
Gets a time formatter instance using the specified style in the
   * default time zone and locale.

   *
   * @param style time style: FULL, LONG, MEDIUM, or SHORT
   * @return a localized standard time formatter
   * @throws IllegalArgumentException if the Locale has no time
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getTimeInstance(final int style) {
    return cache.getTimeInstance(style, null, null);
  }

  /**
   *
Gets a time formatter instance using the specified style and
   * locale in the default time zone.

   *
   * @param style  time style: FULL, LONG, MEDIUM, or SHORT
   * @param locale optional locale, overrides system locale
   * @return a localized standard time formatter
   * @throws IllegalArgumentException if the Locale has no time
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getTimeInstance(final int style, final Locale locale) {
    return cache.getTimeInstance(style, null, locale);
  }

  /**
   *
Gets a time formatter instance using the specified style and
   * time zone in the default locale.

   *
   * @param style    time style: FULL, LONG, MEDIUM, or SHORT
   * @param timeZone optional time zone, overrides time zone of
   *                 formatted time
   * @return a localized standard time formatter
   * @throws IllegalArgumentException if the Locale has no time
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getTimeInstance(final int style, final TimeZone timeZone) {
    return cache.getTimeInstance(style, timeZone, null);
  }

  /**
   *
Gets a time formatter instance using the specified style, time
   * zone and locale.

   *
   * @param style    time style: FULL, LONG, MEDIUM, or SHORT
   * @param timeZone optional time zone, overrides time zone of
   *                 formatted time
   * @param locale   optional locale, overrides system locale
   * @return a localized standard time formatter
   * @throws IllegalArgumentException if the Locale has no time
   *                                  pattern defined
   */
  public static FastDateFormat getTimeInstance(final int style, final TimeZone timeZone, final Locale locale) {
    return cache.getTimeInstance(style, timeZone, locale);
  }

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

  /**
   *
Gets a date/time formatter instance using the specified style
   * in the default time zone and locale.

   *
   * @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
   * @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
   * @return a localized standard date/time formatter
   * @throws IllegalArgumentException if the Locale has no date/time
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle) {
    return cache.getDateTimeInstance(dateStyle, timeStyle, null, null);
  }

  /**
   *
Gets a date/time formatter instance using the specified style and
   * locale in the default time zone.

   *
   * @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
   * @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
   * @param locale    optional locale, overrides system locale
   * @return a localized standard date/time formatter
   * @throws IllegalArgumentException if the Locale has no date/time
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final Locale locale) {
    return cache.getDateTimeInstance(dateStyle, timeStyle, null, locale);
  }

  /**
   *
Gets a date/time formatter instance using the specified style and
   * time zone in the default locale.

   *
   * @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
   * @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
   * @param timeZone  optional time zone, overrides time zone of
   *                  formatted date
   * @return a localized standard date/time formatter
   * @throws IllegalArgumentException if the Locale has no date/time
   *                                  pattern defined
   * @since 2.1
   */
  public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone) {
    return getDateTimeInstance(dateStyle, timeStyle, timeZone, null);
  }

  /**
   *
Gets a date/time formatter instance using the specified style,
   * time zone and locale.

   *
   * @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT
   * @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT
   * @param timeZone  optional time zone, overrides time zone of
   *                  formatted date
   * @param locale    optional locale, overrides system locale
   * @return a localized standard date/time formatter
   * @throws IllegalArgumentException if the Locale has no date/time
   *                                  pattern defined
   */
  public static FastDateFormat getDateTimeInstance(
          final int dateStyle, final int timeStyle, final TimeZone timeZone, final Locale locale) {
    return cache.getDateTimeInstance(dateStyle, timeStyle, timeZone, locale);
  }

  // Constructor
  //-----------------------------------------------------------------------

  /**
   *
Constructs a new FastDateFormat.

   *
   * @param pattern  {@link java.text.SimpleDateFormat} compatible pattern
   * @param timeZone non-null time zone to use
   * @param locale   non-null locale to use
   * @throws NullPointerException if pattern, timeZone, or locale is null.
   */
  protected FastDateFormat(final String pattern, final TimeZone timeZone, final Locale locale) {
    this(pattern, timeZone, locale, null);
  }

  // Constructor
  //-----------------------------------------------------------------------

  /**
   *
Constructs a new FastDateFormat.

   *
   * @param pattern      {@link java.text.SimpleDateFormat} compatible pattern
   * @param timeZone     non-null time zone to use
   * @param locale       non-null locale to use
   * @param centuryStart The start of the 100 year period to use as the "default century" for 2 digit year parsing.  If centuryStart is null, defaults to now - 80 years
   * @throws NullPointerException if pattern, timeZone, or locale is null.
   */
  protected FastDateFormat(final String pattern, final TimeZone timeZone, final Locale locale, final Date centuryStart) {
    printer = new FastDatePrinter(pattern, timeZone, locale);
    parser = new FastDateParser(pattern, timeZone, locale, centuryStart);
  }

  // Format methods
  //-----------------------------------------------------------------------

  /**
   *
Formats a {@code Date}, {@code Calendar} or
   * {@code Long} (milliseconds) object.

   *
   * @param obj        the object to format
   * @param toAppendTo the buffer to append to
   * @param pos        the position - ignored
   * @return the buffer passed in
   */
  @Override
  public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) {
    return printer.format(obj, toAppendTo, pos);
  }

  /**
   *
Formats a millisecond {@code long} value.

   *
   * @param millis the millisecond value to format
   * @return the formatted string
   * @since 2.1
   */
  @Override
  public String format(final long millis) {
    return printer.format(millis);
  }

  /**
   *
Formats a {@code Date} object using a {@code GregorianCalendar}.

   *
   * @param date the date to format
   * @return the formatted string
   */
  @Override
  public String format(final Date date) {
    return printer.format(date);
  }

  /**
   *
Formats a {@code Calendar} object.

   *
   * @param calendar the calendar to format
   * @return the formatted string
   */
  @Override
  public String format(final Calendar calendar) {
    return printer.format(calendar);
  }

  /**
   *
Formats a millisecond {@code long} value into the
   * supplied {@code StringBuffer}.

   *
   * @param millis the millisecond value to format
   * @param buf    the buffer to format into
   * @return the specified string buffer
   * @since 2.1
   */
  @Override
  public StringBuffer format(final long millis, final StringBuffer buf) {
    return printer.format(millis, buf);
  }

  /**
   *
Formats a {@code Date} object into the
   * supplied {@code StringBuffer} using a {@code GregorianCalendar}.

   *
   * @param date the date to format
   * @param buf  the buffer to format into
   * @return the specified string buffer
   */
  @Override
  public StringBuffer format(final Date date, final StringBuffer buf) {
    return printer.format(date, buf);
  }

  /**
   *
Formats a {@code Calendar} object into the
   * supplied {@code StringBuffer}.

   *
   * @param calendar the calendar to format
   * @param buf      the buffer to format into
   * @return the specified string buffer
   */
  @Override
  public StringBuffer format(final Calendar calendar, final StringBuffer buf) {
    return printer.format(calendar, buf);
  }

  // Parsing
  //-----------------------------------------------------------------------

  /* (non-Javadoc)
   * @see DateParser#parse(java.lang.String)
   */
  @Override
  public Date parse(final String source) throws ParseException {
    return parser.parse(source);
  }

  /* (non-Javadoc)
   * @see DateParser#parse(java.lang.String, java.text.ParsePosition)
   */
  @Override
  public Date parse(final String source, final ParsePosition pos) {
    return parser.parse(source, pos);
  }

  /* (non-Javadoc)
   * @see java.text.Format#parseObject(java.lang.String, java.text.ParsePosition)
   */
  @Override
  public Object parseObject(final String source, final ParsePosition pos) {
    return parser.parseObject(source, pos);
  }

  // Accessors
  //-----------------------------------------------------------------------

  /**
   *
Gets the pattern used by this formatter.

   *
   * @return the pattern, {@link java.text.SimpleDateFormat} compatible
   */
  @Override
  public String getPattern() {
    return printer.getPattern();
  }

  /**
   *
Gets the time zone used by this formatter.

   *

   *
This zone is always used for {@code Date} formatting.

   *
   * @return the time zone
   */
  @Override
  public TimeZone getTimeZone() {
    return printer.getTimeZone();
  }

  /**
   *
Gets the locale used by this formatter.

   *
   * @return the locale
   */
  @Override
  public Locale getLocale() {
    return printer.getLocale();
  }

  /**
   *
Gets an estimate for the maximum string length that the
   * formatter will produce.

   *

   *
The actual formatted length will almost always be less than or
   * equal to this amount.

   *
   * @return the maximum formatted length
   */
  public int getMaxLengthEstimate() {
    return printer.getMaxLengthEstimate();
  }

  // Basics
  //-----------------------------------------------------------------------

  /**
   *
Compares two objects for equality.

   *
   * @param obj the object to compare to
   * @return {@code true} if equal
   */
  @Override
  public boolean equals(final Object obj) {
    if (!(obj instanceof FastDateFormat)) {
      return false;
    }
    final FastDateFormat other = (FastDateFormat) obj;
    // no need to check parser, as it has same invariants as printer
    return printer.equals(other.printer);
  }

  /**
   *
Returns a hashcode compatible with equals.

   *
   * @return a hashcode compatible with equals
   */
  @Override
  public int hashCode() {
    return printer.hashCode();
  }

  /**
   *
Gets a debugging string version of this formatter.

   *
   * @return a debugging string
   */
  @Override
  public String toString() {
    return "FastDateFormat[" + printer.getPattern() + "," + printer.getLocale() + "," + printer.getTimeZone().getID() + "]";
  }

  /**
   *
Performs the formatting by applying the rules to the
   * specified calendar.

   *
   * @param calendar the calendar to format
   * @param buf      the buffer to format into
   * @return the specified string buffer
   */
  protected StringBuffer applyRules(final Calendar calendar, final StringBuffer buf) {
    return printer.applyRules(calendar, buf);
  }
}

{'repo_name': 'CameloeAnthony/Ant', 'stars': '808', 'repo_language': 'Java', 'file_name': 'ExampleUnitTest.java', 'mime_type': 'text/html', 'hash': -7571631657821969841, 'source_dataset': 'data'}


//
//  AppDelegate.h
//  HJCarouselDemo
//
//  Created by haijiao on 15/8/20.
//  Copyright (c) 2015年 olinone. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end

{'repo_name': 'panghaijiao/HJCarouselDemo', 'stars': '434', 'repo_language': 'Objective-C', 'file_name': 'HJCarouselDemo.xccheckout', 'mime_type': 'text/xml', 'hash': -912502141018607508, 'source_dataset': 'data'}


var SINE_SUMMATION_INTERACTIVE = (function() {

var canvasWidth = 550;
var canvasHeight = 250;
var MARGINS =
  {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0
  };

plotWidth = canvasWidth - MARGINS.left - MARGINS.right,
plotHeight = canvasHeight - MARGINS.top - MARGINS.bottom;

var subPlotHeight = plotHeight / 3;

var xRangeCorr = d3.scale.linear().range([MARGINS.left, plotWidth]);
var yRangeCorr = d3.scale.linear().range([subPlotHeight, MARGINS.top]);

var yRangeCorr1 = d3.scale.linear().range([subPlotHeight * 2 + 20, subPlotHeight + 20]);
var yRangeCorr2 = d3.scale.linear().range([subPlotHeight * 3 + 70, subPlotHeight * 2 + 70]);

xRangeCorr.domain([0, 4 * Math.PI]);
yRangeCorr.domain([-1.25, 1.25]);
yRangeCorr1.domain([-1.25, 1.25]);
yRangeCorr2.domain([-1.25, 1.25]);

var signalPhase = 0;
var signalFreq = 1;
var signalAmp = 1.0;

var xAxis = d3.svg.axis()
  .scale(xRangeCorr)
  .tickSize(0)
  .ticks(0)
  .tickSubdivide(true);

var xAxis1 = d3.svg.axis()
  .scale(xRangeCorr)
  .tickSize(0)
  .ticks(0)
  .tickSubdivide(true);

var xAxis2 = d3.svg.axis()
  .scale(xRangeCorr)
  .tickSize(0)
  .ticks(0)
  .tickSubdivide(true);

var vis = d3.select('#sineSummationInteractive');

vis.append('svg:g')
  .attr('class', 'x axis')
  .attr('transform', 'translate(0,' + yRangeCorr(0) + ')')
  .style('opacity', 0.25)
  .call(xAxis);

vis.append('svg:g')
  .attr('class', 'x axis')
  .attr('transform', 'translate(0,' + yRangeCorr1(0) + ')')
  .style('opacity', 0.25)
  .call(xAxis1);

vis.append('svg:g')
  .attr('class', 'x axis')
  .attr('transform', 'translate(0,' + yRangeCorr2(0) + ')')
  .style('opacity', 0.25)
  .call(xAxis2);

var color1 = "red";
var color2 = "steelblue";
var color3 = "purple";

var corrSigPath1 = vis.append('svg:path')
  .attr("stroke-width", 2.0)
  .attr("stroke", color1)
  .attr("fill", "none")
  .attr("opacity", 0.4);

var corrSigPath2 = vis.append('svg:path')
  .attr("stroke-width", 2.0)
  .attr("stroke", color2)
  .attr("fill", "none")
  .attr("opacity", 0.5);

var corrSigPath3 = vis.append('svg:path')
  .attr("stroke-width", 2.0)
  .attr("stroke", color3)
  .attr("fill", "none")
  .attr("fill-opacity", 0.20)
  .attr("opacity", 0.5);

var corrSig1 = d3.svg.line()
  .x(function (d, i) { return xRangeCorr(d)})
  .y(function (d, i) { return yRangeCorr(inputSignal(d)); });

var corrSig2 = d3.svg.line()
  .x(function (d, i) { return xRangeCorr(d)})
  .y(function (d, i) { return yRangeCorr1(signalAmp * Math.sin(d + signalPhase)); });

var corrSig3 = d3.svg.line()
  .x(function (d, i) { return xRangeCorr(d)})
  .y(function (d, i) { return yRangeCorr2(inputSignal(d) + signalAmp * Math.sin(d + signalPhase)); });

var corrSigData = d3.range(0, 4 * Math.PI + 0.1, 0.1);

corrSigPath1.attr("d", corrSig1(corrSigData));
corrSigPath2.attr("d", corrSig2(corrSigData));
corrSigPath3.attr("d", corrSig3(corrSigData));

var corrSigSampleData = d3.range(0, 4 * Math.PI, 4 * Math.PI / 30);

vis.append("text")
  .attr("text-anchor", "begin")
  .attr("x", xRangeCorr(0))
  .attr("y", yRangeCorr(1))
  .attr("stroke", "none")
  .style("font-size", "11px")
  .attr("fill", "#333")
  .text("Signal A");

vis.append("text")
  .attr("text-anchor", "begin")
  .attr("x", xRangeCorr(0))
  .attr("y", yRangeCorr1(1.1))
  .attr("stroke", "none")
  .style("font-size", "11px")
  .attr("fill", "#333")
  .text("Signal B");

vis.append("text")
  .attr("text-anchor", "begin")
  .attr("x", xRangeCorr(0))
  .attr("y", yRangeCorr2(2.2))
  .attr("stroke", "none")
  .style("font-size", "11px")
  .attr("fill", "#333")
  .text("Signal A + Signal B");

function inputSignal(d)
{
  return Math.sin(d);
}

var samples1 = vis.selectAll(".point1")
  .data(corrSigSampleData)
  .enter().append("svg:circle")
    .attr("stroke", "none")
    .attr("fill", color1)
    .attr("cx", function(d, i) { return xRangeCorr(d); })
    .attr("cy", function(d, i) { return yRangeCorr(inputSignal(d)); })
    .attr("r", function(d, i) { return 2.0 });

var samples2 = vis.selectAll(".point2")
  .data(corrSigSampleData)
  .enter().append("svg:circle")
    .attr("stroke", "none")
    .attr("fill", color2)
    .attr("cx", function(d, i) { return xRangeCorr(d); })
    .attr("cy", function(d, i) { return yRangeCorr1(Math.sin(d * signalFreq + signalPhase)); })
    .attr("r", function(d, i) { return 2.0 });

var connectors = vis.selectAll(".connectors")
  .data(corrSigSampleData)
  .enter().append("line")
    .attr("x1", function(d, i) { return xRangeCorr(d); })
    .attr("y1", function(d, i) { return yRangeCorr(inputSignal(d)); })
    .attr("x2", function(d, i) { return xRangeCorr(d); })
    .attr("y2", function(d, i) { return yRangeCorr2(inputSignal(d) + signalAmp * Math.sin(d + signalPhase)); })
    .attr("stroke-width", 1.0)
    .attr("stroke", "grey")
    .style("opacity", 0.20)
    .style("stroke-dasharray", ("3, 3"))
    ;

var samples3 = vis.selectAll(".point3")
  .data(corrSigSampleData)
  .enter().append("svg:circle")
    .attr("stroke", "none")
    .attr("fill", color3)
    .attr("cx", function(d, i) { return xRangeCorr(d); })
    .attr("cy", function(d, i) { return yRangeCorr2(inputSignal(d) + Math.sin(d * signalFreq + signalPhase)); })
    .attr("r", function(d, i) { return 2.0 });

function draw() {
  if (signalPhase === SIMPLE_CORRELATION_OFFSET && signalAmp === SIMPLE_CORRELATION_AMP)
  {
    return;
  }

  signalPhase = SIMPLE_CORRELATION_OFFSET;
  signalAmp = SIMPLE_CORRELATION_AMP;

  samples2.data(corrSigSampleData)
    .attr("cx", function(d, i) { return xRangeCorr(d); })
    .attr("cy", function(d, i) { return yRangeCorr1(Math.sin(d * signalFreq + signalPhase) * signalAmp); });

  samples3.data(corrSigSampleData)
    .attr("cx", function(d, i) { return xRangeCorr(d); })
    .attr("cy", function(d, i) { return yRangeCorr2(inputSignal(d) + Math.sin(d * signalFreq + signalPhase) * signalAmp); });

  connectors.data(corrSigSampleData)
    .attr("x1", function(d, i) { return xRangeCorr(d); })
    .attr("y1", function(d, i) { return yRangeCorr(inputSignal(d)); })
    .attr("x2", function(d, i) { return xRangeCorr(d); })
    .attr("y2", function(d, i) { return yRangeCorr2(inputSignal(d) + signalAmp * Math.sin(d + signalPhase) * signalAmp); });

  corrSigPath2.attr("d", corrSig2(corrSigData));
  corrSigPath3.attr("d", corrSig3(corrSigData));
}

d3.timer(draw, 100);

}) ();

{'repo_name': 'jackschaedler/circles-sines-signals', 'stars': '820', 'repo_language': 'JavaScript', 'file_name': 'example.css', 'mime_type': 'text/plain', 'hash': -3719835529041299771, 'source_dataset': 'data'}


ansi-regex

Regular expression for matching ANSI escape codes

ansi styles color colour colors terminal console cli string tty escape formatting rgb 256 shell xterm command-line text regex regexp re match test find pattern

{'repo_name': 'silklabs/silk', 'stars': '160', 'repo_language': 'JavaScript', 'file_name': 'silk-wifi.js.flow', 'mime_type': 'text/x-java', 'hash': 3067001624031434310, 'source_dataset': 'data'}


/*

FAR Style (c) MajestiC <majestic2k@gmail.com>

*/

pre code {
  display: block; padding: 0.5em;
  background: #000080;
}

pre code,
.ruby .subst {
  color: #0FF;
}

pre .string,
pre .ruby .string,
pre .haskell .type,
pre .tag .value,
pre .css .rules .value,
pre .css .rules .value .number,
pre .preprocessor,
pre .ruby .symbol,
pre .ruby .symbol .string,
pre .ruby .symbol .keyword,
pre .ruby .symbol .keymethods,
pre .built_in,
pre .sql .aggregate,
pre .django .template_tag,
pre .django .variable,
pre .smalltalk .class,
pre .addition,
pre .apache .tag,
pre .apache .cbracket,
pre .tex .command {
  color: #FF0;
}

pre .keyword,
pre .css .id,
pre .title,
pre .haskell .type,
pre .vbscript .built_in,
pre .sql .aggregate,
pre .rsl .built_in,
pre .smalltalk .class,
pre .xml .tag .title,
pre .winutils,
pre .flow,
pre .change,
pre .envvar,
pre .bash .variable,
pre .tex .special {
  color: #FFF;
}

pre .comment,
pre .phpdoc,
pre .javadoc,
pre .java .annotation,
pre .template_comment,
pre .deletion,
pre .apache .sqbracket,
pre .tex .formula {
  color: #888;
}

pre .number,
pre .date,
pre .regexp,
pre .literal,
pre .smalltalk .symbol,
pre .smalltalk .char {
  color: #0F0;
}

pre .python .decorator,
pre .django .filter .argument,
pre .smalltalk .localvars,
pre .smalltalk .array,
pre .attr_selector,
pre .pseudo,
pre .xml .pi,
pre .diff .header,
pre .chunk,
pre .shebang,
pre .nginx .built_in,
pre .input_number {
  color: #008080;
}

pre .keyword,
pre .css .id,
pre .title,
pre .haskell .type,
pre .vbscript .built_in,
pre .sql .aggregate,
pre .rsl .built_in,
pre .smalltalk .class,
pre .winutils,
pre .flow,
pre .apache .tag,
pre .nginx .built_in,
pre .tex .command,
pre .tex .special,
pre .request,
pre .status {
  font-weight: bold;
}

{'repo_name': 'jtleek/dataanalysis', 'stars': '702', 'repo_language': 'JavaScript', 'file_name': 'MathOperators.js', 'mime_type': 'text/plain', 'hash': 797176627916489888, 'source_dataset': 'data'}


'use strict';

module.exports = function (app) {
  class Bar extends app.Service {
    constructor(ctx) {
      super(ctx);
    }

    * get(name) {
      return {
        name: name,
        bar: 'bar1',
      };
    }
  }

  return Bar;
};

{'repo_name': 'eggjs/egg-core', 'stars': '182', 'repo_language': 'JavaScript', 'file_name': 'user.js', 'mime_type': 'text/plain', 'hash': -2926882200414140803, 'source_dataset': 'data'}


  <foo></foo>
  <foo bar="baz"></foo>
  <foo/>
  <foo bar="baz"/>
  <foo>/</foo>
  <foo bar="baz">/</foo>

{'repo_name': 'neuland/jade4j', 'stars': '679', 'repo_language': 'Java', 'file_name': 'JadeExceptionTest.java', 'mime_type': 'text/html', 'hash': 4590493343536528531, 'source_dataset': 'data'}


namespace ClassLib037
{
    public class Class047
    {
        public static string Property => "ClassLib037";
    }
}

{'repo_name': 'dotnet/performance', 'stars': '329', 'repo_language': 'C#', 'file_name': 'Class067.cs', 'mime_type': 'text/plain', 'hash': -1745256458764915318, 'source_dataset': 'data'}


/* Generated by RuntimeBrowser.
 */

@protocol SFMapRegion <NSObject>

@required

- (NSDictionary *)dictionaryRepresentation;
- (double)eastLng;
- (NSData *)jsonData;
- (double)northLat;
- (void)setEastLng:(double)arg1;
- (void)setNorthLat:(double)arg1;
- (void)setSouthLat:(double)arg1;
- (void)setWestLng:(double)arg1;
- (double)southLat;
- (double)westLng;

@end

{'repo_name': 'nst/iOS-Runtime-Headers', 'stars': '7551', 'repo_language': 'Objective-C', 'file_name': 'NPNameParser.h', 'mime_type': 'text/plain', 'hash': 8264231185335294129, 'source_dataset': 'data'}


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Commercial Tools Scorecard</title>

    <link href="content/css/bootstrap.min.css" rel="stylesheet">

    <link href="content/dashboard.css" rel="stylesheet">

          OWASP Benchmark v1.1,1.2

Home

	          Tools

FBwFindSecBugs v1.4.0

FBwFindSecBugs v1.4.3

FBwFindSecBugs v1.4.4

FBwFindSecBugs v1.4.5

FBwFindSecBugs v1.4.6

FindBugs v3.0.1

OWASP ZAP vD-2015-08-24

OWASP ZAP vD-2016-09-05

PMD v5.2.3

SAST-01

SAST-02

SAST-03

SAST-04

SAST-05

SAST-06

SonarQube Java Plugin v3.14

Commercial Average

	          Vulnerabilities

Command Injection

Cross-Site Scripting

Insecure Cookie

LDAP Injection

Path Traversal

SQL Injection

Trust Boundary Violation

Weak Encryption Algorithm

Weak Hash Algorithm

Weak Random Number

XPath Injection

Guide

empty

empty

OWASP Benchmark Scorecard for Commercial Tools

The OWASP Benchmark is a test suite designed to evaluate the speed, coverage, and accuracy of automated vulnerability detection tools. Without the ability to measure these tools,
it is difficult to understand their strengths and weaknesses, and compare them to each other. The Benchmark contains thousands of test cases that are fully runnable and exploitable.
The following is the scorecard showing how well the commercial tools collectively performed against version 1.1,1.2 of the Benchmark. For each vulnerability
it shows the lowest, average, and highest scores across all the commercial tools included in this scorecard calculation.

For more information, please visit the OWASP Benchmark Project Site.

Average Scores Per Vulnerability for Commercial Tools

Vulnerability Category	Low Tool Type	Low Score	Ave Score	High Score	High Tool Type

Command Injection	SAST	0	16	29	SAST

Cross-Site Scripting	SAST	9	23	39	SAST

Insecure Cookie	SAST	0	33	100	SAST

LDAP Injection	SAST	0	17	54	SAST

Path Traversal	SAST	1	19	35	SAST

SQL Injection	SAST	9	24	34	SAST

Trust Boundary Violation	SAST	0	8	16	SAST

Weak Encryption Algorithm	SAST	0	39	74	SAST

Weak Hash Algorithm	SAST	0	38	77	SAST

Weak Random Number	SAST	0	36	90	SAST

XPath Injection	SAST	0	27	59	SAST

Average across all categories for 6 tools		1.7	25.5	55.2

Key

Tool Type
SAST - Static Application Security Testing.  DAST - Dynamic Application Security Testing.
IAST - Interactive Application Security Testing. These terms were coined by Gartner.

True Positive (TP)
Tests with real vulnerabilities that were correctly reported as vulnerable by the tool.

False Negative (FN)
Tests with real vulnerabilities that were not correctly reported as vulnerable by the tool.

True Negative (TN)
Tests with fake vulnerabilities that were correctly not reported as vulnerable by the tool.

False Positive (FP)
Tests with fake vulnerabilities that were incorrectly reported as vulnerable by the tool.

True Positive Rate (TPR) = TP / ( TP + FN )
The rate at which the tool correctly reports real vulnerabilities. Also referred to as Recall, as defined at
Wikipedia.

False Positive Rate (FPR) = FP / ( FP + TN )
The rate at which the tool incorrectly reports fake vulnerabilities as real.

Score = TPR - FPR
Normalized distance from the random guess line.

{'repo_name': 'OWASP/Benchmark', 'stars': '268', 'repo_language': 'Java', 'file_name': 'extensions.xml', 'mime_type': 'text/xml', 'hash': -1408230334676580680, 'source_dataset': 'data'}