text:
define_property(TARGET PROPERTY SOURCE_FILES
  BRIEF_DOCS "Source files a flow target is built off"
  FULL_DOCS "When compiling a flow target, this property contains a list of the non-generated source files. \
This property is set by the add_flow_target function")

define_property(TARGET PROPERTY COVERAGE_FILTERS
  BRIEF_DOCS "List of filters for the coverage tool"
  FULL_DOCS "Holds a list of regular expressions. All filenames matching any regular \
expression in this list will be ignored when the coverage.target.xml file is \
generated. This property is set through the add_flow_target function.")

if(WIN32)
  set(compilation_unit_macro_default OFF)
else()
  set(compilation_unit_macro_default ON)
endif()

set(PASS_COMPILATION_UNIT "${compilation_unit_macro_default}" CACHE BOOL
  "Pass path to compilation unit as macro to each compilation unit (useful for code probes)")

function(generate_coverage_xml)
  if(NOT (${ARGC} EQUAL "1"))
    message(FATAL_ERROR "generate_coverage_xml expects one argument")
  endif()
  set(target_name ${ARGV0})
  get_target_property(sources ${target_name} SOURCE_FILES)
  get_target_property(filters ${target_name} COVERAGE_FILTER_OUT)
  foreach(src IN LISTS sources)
    set(include TRUE)
    foreach(f IN LISTS filters)
      if("${f}" MATCHES "${src}")
        set(include FALSE)
      endif()
    endforeach()
    if(include)
      list(APPEND in_files ${src})
    endif()
  endforeach()
  set(target_file ${CMAKE_CURRENT_SOURCE_DIR}/coverage_target_${target_name})
  # we can't get the targets output dir through a generator expression as this would
  # create a cyclic dependency.
  # Instead we follow the following rules:
  # - For executable we place the coverage file into the directory EXECUTABLE_OUTPUT_PATH
  # - For static libraries we place it into the directory LIBRARY_OUTPUT_PATH
  # - For dynamic libraries we place it into LIBRARY_OUTPUT_PATH on Linux and MACOS
  #   and to EXECUTABLE_OUTPUT_PATH on Windows
  get_target_property(type ${target_name} TYPE)
  # STATIC_LIBRARY, MODULE_LIBRARY, SHARED_LIBRARY, OBJECT_LIBRARY, INTERFACE_LIBRARY, EXECUTABLE
  if(type STREQUAL "STATIC_LIBRARY")
    set(target_file ${LIBRARY_OUTPUT_PATH}/coverage.${target_name}.xml)
  elseif(type STREQUAL "SHARED_LIBRARY")
    if(WIN32)
      set(target_file ${EXECUTABLE_OUTPUT_PATH}/coverage.${target_name}.xml)
    else()
      set(target_file ${LIBRARY_OUTPUT_PATH}/coverage.${target_name}.xml)
    endif()
  elseif(type STREQUAL "EXECUTABLE")
    set(target_file ${EXECUTABLE_OUTPUT_PATH}/coverage.${target_name}.xml)
  endif()
  if(WIN32)
    add_custom_command(
      OUTPUT ${target_file}
      COMMAND $<TARGET_FILE:coveragetool> ${target_file} ${in_files}
      DEPENDS ${in_files}
      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
      COMMENT "Generate coverage xml")
  else()
    add_custom_command(
      OUTPUT ${target_file}
      COMMAND ${MONO_EXECUTABLE} ${coveragetool_exe} ${target_file} ${in_files}
      DEPENDS ${in_files}
      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
      COMMENT "Generate coverage xml")
  endif()
  add_custom_target(coverage_${target_name} ALL DEPENDS ${target_file})
  add_dependencies(coverage_${target_name} coveragetool)
endfunction()

add_custom_target(strip_targets)
add_dependencies(packages strip_targets)

function(strip_debug_symbols target)
  if(WIN32)
    return()
  endif()
  get_target_property(target_type ${target} TYPE)
  if(target_type STREQUAL "EXECUTABLE")
    set(path ${CMAKE_BINARY_DIR}/packages/bin)
    set(is_exec ON)
  else()
    set(path ${CMAKE_BINARY_DIR}/packages/lib)
  endif()
  file(MAKE_DIRECTORY "${path}")
  set(strip_command strip)
  set(out_name ${target})
  if(APPLE)
    if(NOT is_exec)
      set(out_name "lib${target}.dylib")
      list(APPEND strip_command -S -x)
    endif()
  else()
    if(is_exec)
      list(APPEND strip_command --strip-debug --strip-unneeded)
    else()
      set(out_name "lib${target}.so")
      list(APPEND strip_command --strip-all)
    endif()
  endif()
  set(out_file "${path}/${out_name}")
  list(APPEND strip_command -o "${out_file}")
  add_custom_command(OUTPUT "${out_file}"
    COMMAND ${strip_command} $<TARGET_FILE:${target}>
    DEPENDS ${target}
    COMMENT "Stripping symbols from ${target}")
  add_custom_target(strip_only_${target} DEPENDS ${out_file})
  if(is_exec AND NOT APPLE)
    add_custom_command(OUTPUT "${out_file}.debug"
      DEPENDS strip_only_${target}
      COMMAND objcopy --verbose --only-keep-debug $<TARGET_FILE:${target}> "${out_file}.debug"
      COMMAND objcopy --verbose --add-gnu-debuglink="${out_file}.debug" "${out_file}"
      COMMENT "Copy debug symbols to ${out_name}.debug")
    add_custom_target(strip_${target} DEPENDS "${out_file}.debug")
  else()
    add_custom_target(strip_${target})
    add_dependencies(strip_${target} strip_only_${target})
  endif()
  add_dependencies(strip_targets strip_${target})
endfunction()

# This will copy the header from a flow target into ${CMAKE_BINARY_DIR}/include/target-name
# We're doing this to enforce proper dependencies. In the past we simply added the source
# and binary dir to the include list, which means that for example a compilation unit in
# flow could include a header file that lives in fdbserver. This is a somewhat hacky solution
# but due to our directory structure it seems to be the least invasive one.
function(copy_headers)
  set(options)
  set(oneValueArgs NAME OUT_DIR INC_DIR)
  set(multiValueArgs SRCS)
  cmake_parse_arguments(CP "${options}" "${oneValueArgs}" "${multiValueArgs}" "${ARGN}")
  get_filename_component(dir_name ${CMAKE_CURRENT_SOURCE_DIR} NAME)
  set(include_dir "${CMAKE_CURRENT_BINARY_DIR}/include")
  set(incl_dir "${include_dir}/${dir_name}")
  make_directory("${incl_dir}")
  foreach(f IN LISTS CP_SRCS)
    is_prefix(bd "${CMAKE_CURRENT_BINARY_DIR}" "${f}")
    is_prefix(sd "${CMAKE_CURRENT_SOURCE_DIR}" "${f}")
    if(bd OR sd)
      continue()
    endif()
    is_header(hdr "${f}")
    if(NOT hdr)
      continue()
    endif()
    get_filename_component(fname ${f} NAME)
    get_filename_component(dname ${f} DIRECTORY)
    if(dname)
      make_directory(${incl_dir}/${dname})
    endif()
    set(fpath "${incl_dir}/${dname}/${fname}")
    add_custom_command(OUTPUT "${fpath}"
      DEPENDS "${f}"
      COMMAND "${CMAKE_COMMAND}" -E copy "${f}" "${fpath}"
      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
    list(APPEND out_files "${fpath}")
  endforeach()
  add_custom_target("${CP_NAME}_incl" DEPENDS ${out_files})
  set("${CP_OUT_DIR}" "${incl_dir}" PARENT_SCOPE)
  set("${CP_INC_DIR}" ${include_dir} PARENT_SCOPE)
endfunction()

function(add_flow_target)
  set(options EXECUTABLE STATIC_LIBRARY
    DYNAMIC_LIBRARY LINK_TEST)
  set(oneValueArgs NAME)
  set(multiValueArgs SRCS COVERAGE_FILTER_OUT DISABLE_ACTOR_DIAGNOSTICS ADDL_SRCS)
  cmake_parse_arguments(AFT "${options}" "${oneValueArgs}" "${multiValueArgs}" "${ARGN}")
  if(NOT AFT_NAME)
    message(FATAL_ERROR "add_flow_target requires option NAME")
  endif()
  if(NOT AFT_SRCS)
    message(FATAL_ERROR "No sources provided")
  endif()
  #foreach(src IN LISTS AFT_SRCS)
  #  is_header(h "${src}")
  #  if(NOT h)
  #    list(SRCS "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
  #  endif()
  #endforeach()
  if(OPEN_FOR_IDE)
    # Intentionally omit ${AFT_DISABLE_ACTOR_DIAGNOSTICS} since we don't want diagnostics
    set(sources ${AFT_SRCS} ${AFT_ADDL_SRCS})
    add_library(${AFT_NAME} OBJECT ${sources})
  else()
    create_build_dirs(${AFT_SRCS} ${AFT_DISABLE_ACTOR_DIAGNOSTICS})
    foreach(src IN LISTS AFT_SRCS AFT_DISABLE_ACTOR_DIAGNOSTICS)
      is_header(hdr ${src})
      set(in_filename "${src}")
      if(${src} MATCHES ".*\\.actor\\.(h|cpp)")
        set(is_actor_file YES)
        if(${src} MATCHES ".*\\.h")
          string(REPLACE ".actor.h" ".actor.g.h" out_filename ${in_filename})
        else()
          string(REPLACE ".actor.cpp" ".actor.g.cpp" out_filename ${in_filename})
        endif()
      else()
        set(is_actor_file NO)
        set(out_filename "${src}")
      endif()

      set(in_file "${CMAKE_CURRENT_SOURCE_DIR}/${in_filename}")
      if(is_actor_file)
        if(hdr)
          list(APPEND HEADER_LIST ${in_file})
        endif()
        set(out_file "${CMAKE_CURRENT_BINARY_DIR}/${out_filename}")
      else()
        set(out_file "${in_file}")
      endif()

      if(hdr)
        list(APPEND HEADER_LIST ${out_file})
      endif()

      list(APPEND sources ${out_file})
      set(actor_compiler_flags "")
      if(is_actor_file)
        list(APPEND actors ${in_file})
        list(APPEND actor_compiler_flags "--generate-probes")
        foreach(s IN LISTS AFT_DISABLE_ACTOR_DIAGNOSTICS)
          if("${s}" STREQUAL "${src}")
            list(APPEND actor_compiler_flags "--disable-diagnostics")
            break()
          endif()
        endforeach()

        list(APPEND generated_files ${out_file})
        if(WIN32)
          add_custom_command(OUTPUT "${out_file}"
            COMMAND $<TARGET_FILE:actorcompiler> "${in_file}" "${out_file}" ${actor_compiler_flags}
            DEPENDS "${in_file}" ${actor_exe}
            COMMENT "Compile actor: ${src}")
        else()
          add_custom_command(OUTPUT "${out_file}"
            COMMAND ${MONO_EXECUTABLE} ${actor_exe} "${in_file}" "${out_file}" ${actor_compiler_flags} > /dev/null
            DEPENDS "${in_file}" ${actor_exe}
            COMMENT "Compile actor: ${src}")
        endif()
      endif()
    endforeach()
    if(PASS_COMPILATION_UNIT)
      foreach(s IN LISTS sources)
        set_source_files_properties("${s}" PROPERTIES COMPILE_DEFINITIONS "COMPILATION_UNIT=${s}")
      endforeach()
    endif()
    if(AFT_EXECUTABLE)
      set(strip_target ON)
      set(target_type exec)
      add_executable(${AFT_NAME} ${sources} ${AFT_ADDL_SRCS})
    endif()
    if(AFT_STATIC_LIBRARY)
      if(target_type)
        message(FATAL_ERROR "add_flow_target can only be of one type")
      endif()
      add_library(${AFT_NAME} STATIC ${sources} ${AFT_ADDL_SRCS})
    endif()
    if(AFT_DYNAMIC_LIBRARY)
      if(target_type)
        message(FATAL_ERROR "add_flow_target can only be of one type")
      endif()
      set(strip_target ON)
      add_library(${AFT_NAME} DYNAMIC ${sources} ${AFT_ADDL_SRCS})
    endif()
    if(AFT_LINK_TEST)
      set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/linktest)
      set(strip_target ON)
      set(target_type exec)
      add_executable(${AFT_NAME} ${sources} ${AFT_ADDL_SRCS})
    endif()

    foreach(src IN LISTS sources AFT_ADDL_SRCS)
      get_filename_component(dname ${CMAKE_CURRENT_SOURCE_DIR} NAME)
      string(REGEX REPLACE "\\..*" "" fname ${src})
      string(REPLACE / _ fname ${fname})
      #set_source_files_properties(${src} PROPERTIES COMPILE_DEFINITIONS FNAME=${dname}_${fname})
    endforeach()

    set_property(TARGET ${AFT_NAME} PROPERTY SOURCE_FILES ${AFT_SRCS})
    set_property(TARGET ${AFT_NAME} PROPERTY HEADER_FILES ${HEADER_LIST})
    set_property(TARGET ${AFT_NAME} PROPERTY COVERAGE_FILTERS ${AFT_SRCS})

    add_custom_target(${AFT_NAME}_actors DEPENDS ${generated_files})
    add_dependencies(${AFT_NAME} ${AFT_NAME}_actors)
    generate_coverage_xml(${AFT_NAME})
    if(strip_target)
      strip_debug_symbols(${AFT_NAME})
    endif()
  endif()
endfunction()

repository: apple/foundationdb

repo_name: apple/foundationdb


text:
DESCRIPTION = "Multi-tap input method for GTK"
LICENSE = "GPL"
DEPENDS = "libfakekey gtk+ matchbox-panel-2"
RCONFLICTS_${PN} = matchbox-keyboard-inputmethod
SECTION = "x11"
SRCREV = "373"
PV = "0.0+svnr${SRCPV}"
PR = "r1"

SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=${PN};proto=http \
	file://80multitappad"

inherit autotools pkgconfig

S = "${WORKDIR}/${PN}"

FILES_${PN} = "${bindir}/* \
               ${libdir} \
	       ${sysconfdir} \
	       ${datadir}"

FILES_${PN}-dbg += " ${libdir}/gtk-2.0/2.10.0/immodules/.debug \
                     ${libdir}/matchbox-panel/.debug"

FILES_${PN}-dev += " ${libdir}/gtk-2.0/2.10.0/immodules/*.a \
                     ${libdir}/gtk-2.0/2.10.0/immodules/*.la \
		     ${libdir}/matchbox-panel/*.a \
		     ${libdir}/matchbox-panel/*.la"

do_install_append () {
	install -d ${D}/${sysconfdir}/X11/Xsession.d/
	install -m 755 ${WORKDIR}/80multitappad ${D}/${sysconfdir}/X11/Xsession.d/
}

pkg_postinst_multitap-pad () {
if [ "x$D" != "x" ]; then
  exit 1
fi

gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
}

pkg_postrm_multitap-pad () {
if [ "x$D" != "x" ]; then
  exit 1
fi

gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
}

license: MIT

repository: overo/overo-oe-natty

license_type: permissive

repo_name: overo/overo-oe-natty

branch_name: HEAD

extension: bb


text:
# This recipe is originally from meta-openstack:
# https://git.yoctoproject.org/cgit/cgit.cgi/meta-cloud-services/tree/meta-openstack/recipes-devtools/python/python3-uritemplate_3.0.0.bb?h=master

SUMMARY = "Simple python library to deal with URI Templates."
AUTHOR = "Ian Cordasco"
LICENSE = "Apache-2.0 | BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0f6d769bdcfacac3c1a1ffa568937fe0"

SRC_URI[sha256sum] = "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0"

inherit pypi setuptools3 ptest

SRC_URI += " \
        file://run-ptest \
"

RDEPENDS:${PN}-ptest += " \
       ${PYTHON_PN}-pytest \
"

do_install_ptest() {
      install -d ${D}${PTEST_PATH}/tests
        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}

BBCLASSEXTEND = "native nativesdk"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

branch_name: refs/heads/master

gha_license_id: MIT

gha_language: BitBake


text:
package controller

import (
	"k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/util/sets"
)

type ParentFilter interface {
	Parent(obj v1.Object) (namespace, name string)
	Filter
}

type Filter interface {
	Add(obj v1.Object) bool
	Update(oldObj, newObj v1.Object) bool
	Delete(obj v1.Object) bool
}

type ParentFunc func(obj v1.Object) (namespace, name string)

type FilterFuncs struct {
	ParentFunc ParentFunc
	AddFunc    func(obj v1.Object) bool
	UpdateFunc func(oldObj, newObj v1.Object) bool
	DeleteFunc func(obj v1.Object) bool
}

func (f FilterFuncs) Parent(obj v1.Object) (namespace, name string) {
	if f.ParentFunc == nil {
		return obj.GetNamespace(), obj.GetName()
	}
	return f.ParentFunc(obj)
}

func (f FilterFuncs) Add(obj v1.Object) bool {
	if f.AddFunc == nil {
		return false
	}
	return f.AddFunc(obj)
}

func (f FilterFuncs) Update(oldObj, newObj v1.Object) bool {
	if f.UpdateFunc == nil {
		return false
	}
	return f.UpdateFunc(oldObj, newObj)
}

func (f FilterFuncs) Delete(obj v1.Object) bool {
	if f.DeleteFunc == nil {
		return false
	}
	return f.DeleteFunc(obj)
}

func FilterByNames(parentFunc ParentFunc, names ...string) ParentFilter {
	set := sets.NewString(names...)
	has := func(obj v1.Object) bool {
		return set.Has(obj.GetName())
	}
	return FilterFuncs{
		ParentFunc: parentFunc,
		AddFunc:    has,
		UpdateFunc: func(oldObj, newObj v1.Object) bool {
			return has(newObj)
		},
		DeleteFunc: has,
	}
}

repository: openshift/service-serving-cert-signer

repo_name: openshift/service-serving-cert-signer

gha_language: Go

extension: go


text:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

LINUX_VERSION ?= "5.0.5"
SRCREV ?= "1f6f316a537d4310747b08f89fb32565317b288b"
SRCREV_meta ?= "172634f02e7e293bb53c6c7b1473306b9b30058d"

require linux-stable.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

repository: Minipada/meta-odroid

repo_name: Minipada/meta-odroid


text:
package draft07

import (
	"bytes"
	"encoding/json"

	"github.com/pkg/errors"
)

type Property struct {
	name       string
	definition *Schema
}

func (p *Property) Name() string {
	return p.name
}
func (p *Property) Definition() *Schema {
	return p.definition
}

type schemaProperties struct {
	Comment              *string           `json:"$comment,omitempty"`
	ID                   *string           `json:"$id,omitempty"`
	Reference            *string           `json:"$ref,omitempty"`
	SchemaRef            *string           `json:"$schema,omitempty"`
	AdditionalItems      *Schema           `json:"additionalItems,omitempty"`
	AdditionalProperties *Schema           `json:"additionalProperties,omitempty"`
	AllOf                *SchemaList       `json:"allOf,omitempty"`
	AnyOf                *SchemaList       `json:"anyOf,omitempty"`
	Const                interface{}       `json:"const,omitempty"`
	Contains             *SchemaList       `json:"contains,omitempty"`
	Default              interface{}       `json:"default,omitempty"`
	Definitions          *SchemaSet        `json:"definitions,omitempty"`
	Dependencies         *SchemaSet        `json:"dependencies,omitempty"`
	Description          *string           `json:"description,omitempty"`
	Else                 *Schema           `json:"else,omitempty"`
	Enum                 EnumList          `json:"enum,omitempty"`
	ExclusiveMaximum     *float64          `json:"exclusiveMaximum,omitempty"`
	ExclusiveMinimum     *float64          `json:"exclusiveMinimum,omitempty"`
	Format               *Format           `json:"format,omitempty"`
	If                   *Schema           `json:"if,omitempty"`
	Items                *SchemaList       `json:"items,omitempty"`
	MaxItems             *int64            `json:"maxItems,omitempty"`
	MaxLength            *int64            `json:"maxLength,omitempty"`
	MaxProperties        *int64            `json:"maxProperties,omitempty"`
	Maximum              *float64          `json:"maximum,omitempty"`
	MinItems             *int64            `json:"minItems,omitempty"`
	MinLength            *int64            `json:"minLength,omitempty"`
	MinProperties        *int64            `json:"minProperties,omitempty"`
	Minimum              *float64          `json:"minimum,omitempty"`
	MultipleOf           *float64          `json:"multipleOf,omitempty"`
	Not                  *Schema           `json:"not,omitempty"`
	OneOf                *SchemaList       `json:"oneOf,omitempty"`
	Pattern              *string           `json:"pattern,omitempty"`
	PatternProperties    *SchemaSet        `json:"patternProperties,omitempty"`
	Properties           *SchemaSet        `json:"properties,omitempty"`
	PropertyNames        *Schema           `json:"propertyNames,omitempty"`
	Required             []string          `json:"required,omitempty"`
	Then                 *Schema           `json:"then,omitempty"`
	Title                *string           `json:"title,omitempty"`
	Type                 PrimitiveTypeList `json:"type,omitempty"`
	UniqueItems          *bool             `json:"uniqueItems,omitempty"`
}

func (s *Schema) Comment() string {
	if !s.HasComment() {
		return ""
	}
	return *(s.properties.Comment)
}

func (s *Schema) HasComment() bool {
	return s.properties.Comment != nil
}

func (s *Schema) ID() string {
	if !s.HasID() {
		return ""
	}
	return *(s.properties.ID)
}

func (s *Schema) HasID() bool {
	return s.properties.ID != nil
}

func (s *Schema) Reference() string {
	if !s.HasReference() {
		return ""
	}
	return *(s.properties.Reference)
}

func (s *Schema) HasReference() bool {
	return s.properties.Reference != nil
}

func (s *Schema) SchemaRef() string {
	if !s.HasSchemaRef() {
		return SchemaID
	}
	return *(s.properties.SchemaRef)
}

func (s *Schema) HasSchemaRef() bool {
	return s.properties.SchemaRef != nil
}

func (s *Schema) AdditionalItems() *Schema {
	return s.properties.AdditionalItems
}

func (s *Schema) HasAdditionalItems() bool {
	return s.properties.AdditionalItems != nil
}

func (s *Schema) AdditionalProperties() *Schema {
	return s.properties.AdditionalProperties
}

func (s *Schema) HasAdditionalProperties() bool {
	return s.properties.AdditionalProperties != nil
}

func (s *Schema) AllOf() *SchemaList {
	return s.properties.AllOf
}

func (s *Schema) HasAllOf() bool {
	return s.properties.AllOf != nil
}

func (s *Schema) AnyOf() *SchemaList {
	return s.properties.AnyOf
}

func (s *Schema) HasAnyOf() bool {
	return s.properties.AnyOf != nil
}

func (s *Schema) Const() interface{} {
	return s.properties.Const
}

func (s *Schema) HasConst() bool {
	return s.properties.Const != nil
}

func (s *Schema) Contains() *SchemaList {
	return s.properties.Contains
}

func (s *Schema) HasContains() bool {
	return s.properties.Contains != nil
}

func (s *Schema) Default() interface{} {
	return s.properties.Default
}

func (s *Schema) HasDefault() bool {
	return s.properties.Default != nil
}

func (s *Schema) Definitions() *SchemaSet {
	return s.properties.Definitions
}

func (s *Schema) HasDefinitions() bool {
	return s.properties.Definitions != nil
}

func (s *Schema) Dependencies() *SchemaSet {
	return s.properties.Dependencies
}

func (s *Schema) HasDependencies() bool {
	return s.properties.Dependencies != nil
}

func (s *Schema) Description() string {
	if !s.HasDescription() {
		return ""
	}
	return *(s.properties.Description)
}

func (s *Schema) HasDescription() bool {
	return s.properties.Description != nil
}

func (s *Schema) Else() *Schema {
	return s.properties.Else
}

func (s *Schema) HasElse() bool {
	return s.properties.Else != nil
}

func (s *Schema) Enum() EnumList {
	return s.properties.Enum
}

func (s *Schema) HasEnum() bool {
	return s.properties.Enum != nil
}

func (s *Schema) ExclusiveMaximum() float64 {
	if !s.HasExclusiveMaximum() {
		return float64(0)
	}
	return *(s.properties.ExclusiveMaximum)
}

func (s *Schema) HasExclusiveMaximum() bool {
	return s.properties.ExclusiveMaximum != nil
}

func (s *Schema) ExclusiveMinimum() float64 {
	if !s.HasExclusiveMinimum() {
		return float64(0)
	}
	return *(s.properties.ExclusiveMinimum)
}

func (s *Schema) HasExclusiveMinimum() bool {
	return s.properties.ExclusiveMinimum != nil
}

func (s *Schema) Format() Format {
	if !s.HasFormat() {
		return Format("")
	}
	return *(s.properties.Format)
}

func (s *Schema) HasFormat() bool {
	return s.properties.Format != nil
}

func (s *Schema) If() *Schema {
	return s.properties.If
}

func (s *Schema) HasIf() bool {
	return s.properties.If != nil
}

func (s *Schema) Items() *SchemaList {
	return s.properties.Items
}

func (s *Schema) HasItems() bool {
	return s.properties.Items != nil
}

func (s *Schema) MaxItems() int64 {
	if !s.HasMaxItems() {
		return int64(0)
	}
	return *(s.properties.MaxItems)
}

func (s *Schema) HasMaxItems() bool {
	return s.properties.MaxItems != nil
}

func (s *Schema) MaxLength() int64 {
	if !s.HasMaxLength() {
		return int64(0)
	}
	return *(s.properties.MaxLength)
}

func (s *Schema) HasMaxLength() bool {
	return s.properties.MaxLength != nil
}

func (s *Schema) MaxProperties() int64 {
	if !s.HasMaxProperties() {
		return int64(0)
	}
	return *(s.properties.MaxProperties)
}

func (s *Schema) HasMaxProperties() bool {
	return s.properties.MaxProperties != nil
}

func (s *Schema) Maximum() float64 {
	if !s.HasMaximum() {
		return float64(0)
	}
	return *(s.properties.Maximum)
}

func (s *Schema) HasMaximum() bool {
	return s.properties.Maximum != nil
}

func (s *Schema) MinItems() int64 {
	if !s.HasMinItems() {
		return int64(0)
	}
	return *(s.properties.MinItems)
}

func (s *Schema) HasMinItems() bool {
	return s.properties.MinItems != nil
}

func (s *Schema) MinLength() int64 {
	if !s.HasMinLength() {
		return int64(0)
	}
	return *(s.properties.MinLength)
}

func (s *Schema) HasMinLength() bool {
	return s.properties.MinLength != nil
}

func (s *Schema) MinProperties() int64 {
	if !s.HasMinProperties() {
		return int64(0)
	}
	return *(s.properties.MinProperties)
}

func (s *Schema) HasMinProperties() bool {
	return s.properties.MinProperties != nil
}

func (s *Schema) Minimum() float64 {
	if !s.HasMinimum() {
		return float64(0)
	}
	return *(s.properties.Minimum)
}

func (s *Schema) HasMinimum() bool {
	return s.properties.Minimum != nil
}

func (s *Schema) MultipleOf() float64 {
	if !s.HasMultipleOf() {
		return float64(0)
	}
	return *(s.properties.MultipleOf)
}

func (s *Schema) HasMultipleOf() bool {
	return s.properties.MultipleOf != nil
}

func (s *Schema) Not() *Schema {
	return s.properties.Not
}

func (s *Schema) HasNot() bool {
	return s.properties.Not != nil
}

func (s *Schema) OneOf() *SchemaList {
	return s.properties.OneOf
}

func (s *Schema) HasOneOf() bool {
	return s.properties.OneOf != nil
}

func (s *Schema) Pattern() string {
	if !s.HasPattern() {
		return ""
	}
	return *(s.properties.Pattern)
}

func (s *Schema) HasPattern() bool {
	return s.properties.Pattern != nil
}

func (s *Schema) PatternProperties() *SchemaSet {
	return s.properties.PatternProperties
}

func (s *Schema) HasPatternProperties() bool {
	return s.properties.PatternProperties != nil
}

func (s *Schema) Properties() *SchemaSet {
	return s.properties.Properties
}

func (s *Schema) HasProperties() bool {
	return s.properties.Properties != nil
}

func (s *Schema) PropertyNames() *Schema {
	return s.properties.PropertyNames
}

func (s *Schema) HasPropertyNames() bool {
	return s.properties.PropertyNames != nil
}

func (s *Schema) Required() []string {
	return s.properties.Required
}

func (s *Schema) HasRequired() bool {
	return s.properties.Required != nil
}

func (s *Schema) Then() *Schema {
	return s.properties.Then
}

func (s *Schema) HasThen() bool {
	return s.properties.Then != nil
}

func (s *Schema) Title() string {
	if !s.HasTitle() {
		return ""
	}
	return *(s.properties.Title)
}

func (s *Schema) HasTitle() bool {
	return s.properties.Title != nil
}

func (s *Schema) Type() PrimitiveTypeList {
	return s.properties.Type
}

func (s *Schema) HasType() bool {
	return s.properties.Type != nil
}

func (s *Schema) UniqueItems() bool {
	if !s.HasUniqueItems() {
		return false
	}
	return *(s.properties.UniqueItems)
}

func (s *Schema) HasUniqueItems() bool {
	return s.properties.UniqueItems != nil
}

func (s *Schema) SetComment(v *string) *Schema {
	s.properties.Comment = v
	return s
}

func (s *Schema) SetID(v *string) *Schema {
	s.properties.ID = v
	return s
}

func (s *Schema) SetReference(v *string) *Schema {
	s.properties.Reference = v
	return s
}

func (s *Schema) SetSchemaRef(v *string) *Schema {
	s.properties.SchemaRef = v
	return s
}

func (s *Schema) SetAdditionalItems(v *Schema) *Schema {
	s.properties.AdditionalItems = v
	return s
}

func (s *Schema) SetAdditionalProperties(v *Schema) *Schema {
	s.properties.AdditionalProperties = v
	return s
}

func (s *Schema) AddAllOf(list ...*Schema) *Schema {
	s.properties.AllOf.Append(list...)
	return s
}

func (s *Schema) AddAnyOf(list ...*Schema) *Schema {
	s.properties.AnyOf.Append(list...)
	return s
}

func (s *Schema) SetConst(v interface{}) *Schema {
	s.properties.Const = v
	return s
}

func (s *Schema) AddContains(list ...*Schema) *Schema {
	s.properties.Contains.Append(list...)
	return s
}

func (s *Schema) SetDefault(v interface{}) *Schema {
	s.properties.Default = v
	return s
}

func (s *Schema) SetDefinitions(v *SchemaSet) *Schema {
	s.properties.Definitions = v
	return s
}

func (s *Schema) SetDependencies(v *SchemaSet) *Schema {
	s.properties.Dependencies = v
	return s
}

func (s *Schema) SetDescription(v *string) *Schema {
	s.properties.Description = v
	return s
}

func (s *Schema) SetElse(v *Schema) *Schema {
	s.properties.Else = v
	return s
}

func (s *Schema) AddEnum(list ...Enum) *Schema {
	s.properties.Enum.Append(list...)
	return s
}

func (s *Schema) SetExclusiveMaximum(v float64) *Schema {
	s.properties.ExclusiveMaximum = &v
	return s
}

func (s *Schema) SetExclusiveMinimum(v float64) *Schema {
	s.properties.ExclusiveMinimum = &v
	return s
}

func (s *Schema) SetFormat(v *Format) *Schema {
	s.properties.Format = v
	return s
}

func (s *Schema) SetIf(v *Schema) *Schema {
	s.properties.If = v
	return s
}

func (s *Schema) AddItems(list ...*Schema) *Schema {
	s.properties.Items.Append(list...)
	return s
}

func (s *Schema) SetMaxItems(v int64) *Schema {
	s.properties.MaxItems = &v
	return s
}

func (s *Schema) SetMaxLength(v int64) *Schema {
	s.properties.MaxLength = &v
	return s
}

func (s *Schema) SetMaxProperties(v int64) *Schema {
	s.properties.MaxProperties = &v
	return s
}

func (s *Schema) SetMaximum(v float64) *Schema {
	s.properties.Maximum = &v
	return s
}

func (s *Schema) SetMinItems(v int64) *Schema {
	s.properties.MinItems = &v
	return s
}

func (s *Schema) SetMinLength(v int64) *Schema {
	s.properties.MinLength = &v
	return s
}

func (s *Schema) SetMinProperties(v int64) *Schema {
	s.properties.MinProperties = &v
	return s
}

func (s *Schema) SetMinimum(v float64) *Schema {
	s.properties.Minimum = &v
	return s
}

func (s *Schema) SetMultipleOf(v float64) *Schema {
	s.properties.MultipleOf = &v
	return s
}

func (s *Schema) SetNot(v *Schema) *Schema {
	s.properties.Not = v
	return s
}

func (s *Schema) AddOneOf(list ...*Schema) *Schema {
	s.properties.OneOf.Append(list...)
	return s
}

func (s *Schema) SetPattern(v *string) *Schema {
	s.properties.Pattern = v
	return s
}

func (s *Schema) SetPatternProperties(v *SchemaSet) *Schema {
	s.properties.PatternProperties = v
	return s
}

func (s *Schema) SetProperties(v *SchemaSet) *Schema {
	s.properties.Properties = v
	return s
}

func (s *Schema) SetPropertyNames(v *Schema) *Schema {
	s.properties.PropertyNames = v
	return s
}

func (s *Schema) AddRequired(list ...string) *Schema {
	s.properties.Required = append(s.properties.Required, list...)
	return s
}

func (s *Schema) SetThen(v *Schema) *Schema {
	s.properties.Then = v
	return s
}

func (s *Schema) SetTitle(v *string) *Schema {
	s.properties.Title = v
	return s
}

func (s *Schema) AddType(list ...PrimitiveType) *Schema {
	s.properties.Type.Append(list...)
	return s
}

func (s *Schema) SetUniqueItems(v bool) *Schema {
	s.properties.UniqueItems = &v
	return s
}

var trueBytes = []byte("true")
var falseBytes = []byte("false")

func (s *Schema) MarshalJSON() ([]byte, error) {
	if s.isNegated {
		return falseBytes, nil
	}

	if s.isEmpty {
		return trueBytes, nil
	}

	return json.Marshal(s.properties)
}

func (s *Schema) UnmarshalJSON(buf []byte) error {
	if bytes.HasPrefix(buf, trueBytes) {
		*s = Schema{isEmpty: true}
		return nil
	} else if bytes.HasPrefix(buf, falseBytes) {
		*s = Schema{isNegated: true}
		return nil
	}

	var fs Schema
	if err := json.Unmarshal(buf, &fs.properties); err != nil {
		return errors.Wrap(err, "failed to unmarshal schema")
	}
	*s = fs
	return nil
}
func (s *SchemaSet) Iterator() <-chan *Property {
	s.mu.RLock()
	ch := make(chan *Property, len(s.store))
	go func() {
		defer s.mu.RUnlock()
		defer close(ch)
		for k, v := range s.store {
			ch <- &Property{name: k, definition: v}
		}
	}()
	return ch
}

func (s *SchemaSet) MarshalJSON() ([]byte, error) {
	s.mu.RLock()
	defer s.mu.RUnlock()
	return json.Marshal(s.store)
}

func (s *SchemaSet) UnmarshalJSON(buf []byte) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	return json.Unmarshal(buf, &s.store)
}

func (s *SchemaList) Iterator() <-chan *Schema {
	s.mu.RLock()
	defer s.mu.RUnlock()
	ch := make(chan *Schema, len(s.store))
	go func() {
		defer close(ch)
		s.mu.RLock()
		defer s.mu.RUnlock()
		for _, e := range s.store {
			ch <- e
		}
	}()
	return ch
}

func (s *SchemaList) Append(list ...*Schema) {
	s.mu.Lock()
	defer s.mu.Unlock()
	s.store = append(s.store, list...)
}

func (s *SchemaList) MarshalJSON() ([]byte, error) {
	s.mu.RLock()
	defer s.mu.RUnlock()
	if len(s.store) == 1 {
		return json.Marshal(s.store[0])
	}
	return json.Marshal(s.store)
}

func (s *SchemaList) UnmarshalJSON(buf []byte) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	if len(buf) > 0 && buf[0] == '[' {
		return json.Unmarshal(buf, &s.store)
	}
	var v Schema
	if err := json.Unmarshal(buf, &v); err != nil {
		return errors.Wrap(err, "failed to unmarshal json schema list")
	}
	s.store = []*Schema{&v}
	return nil
}


text:
@article{braunTearFilmBreakup2017,
 author = {Braun, Richard J and Driscoll, Tobin A and Begley, Carolyn G and King-Smith, P Ewen and Siddique, Javed I},
 doi = {10.1093/imammb/dqw023},
 journal = {Mathematical Medicine and Biology},
 number = {2},
 pages = {145--180},
 title = {On Tear Film Breakup (TBU): Dynamics and Imaging},
 volume = {35},
 year = {2017}
}

repository: tobydriscoll/academic-kickstart

repo_name: tobydriscoll/academic-kickstart

extension: bib


text:
@article{wang2016deep,
  title={Deep learning for identifying metastatic breast cancer},
  author={Wang, Dayong and Khosla, Aditya and Gargeya, Rishab and Irshad, Humayun and Beck, Andrew H},
  journal={arXiv preprint arXiv:1606.05718},
  year={2016}
}

@misc{Dua:2019 ,
author = "Dua, Dheeru and Graff, Casey",
year = "2017",
title = "{UCI} Machine Learning Repository",
url = "http://archive.ics.uci.edu/ml",
institution = "University of California, Irvine, School of Information and Computer Sciences"
}

@article{litjens20181399,
  title={1399 H\&E-stained sentinel lymph node sections of breast cancer patients: the CAMELYON dataset},
  author={Litjens, Geert and Bandi, Peter and Ehteshami Bejnordi, Babak and Geessink, Oscar and Balkenhol, Maschenka and Bult, Peter and Halilovic, Altuna and Hermsen, Meyke and van de Loo, Rob and Vogels, Rob and others},
  journal={GigaScience},
  volume={7},
  number={6},
  pages={giy065},
  year={2018},
  publisher={Oxford University Press}
}

@article{lee2017curated,
  title={A curated mammography data set for use in computer-aided detection and diagnosis research},
  author={Lee, Rebecca Sawyer and Gimenez, Francisco and Hoogi, Assaf and Miyake, Kanae Kawai and Gorovoy, Mia and Rubin, Daniel L},
  journal={Scientific data},
  volume={4},
  pages={170177},
  year={2017},
  publisher={Nature Publishing Group}
}

@article{de2018clinically,
  title={Clinically applicable deep learning for diagnosis and referral in retinal disease},
  author={De Fauw, Jeffrey and Ledsam, Joseph R and Romera-Paredes, Bernardino and Nikolov, Stanislav and Tomasev, Nenad and Blackwell, Sam and Askham, Harry and Glorot, Xavier and O’Donoghue, Brendan and Visentin, Daniel and others},
  journal={Nature medicine},
  volume={24},
  number={9},
  pages={1342},
  year={2018},
  publisher={Nature Publishing Group}
}

@article{goldenberg2019new,
  title={A new era: artificial intelligence and machine learning in prostate cancer},
  author={Goldenberg, S Larry and Nir, Guy and Salcudean, Septimiu E},
  journal={Nature Reviews Urology},
  pages={1},
  year={2019},
  publisher={Nature Publishing Group}
}

@inproceedings{street1993nuclear,
  title={Nuclear feature extraction for breast tumor diagnosis},
  author={Street, W Nick and Wolberg, William H and Mangasarian, Olvi L},
  booktitle={Biomedical image processing and biomedical visualization},
  volume={1905},
  pages={861--870},
  year={1993},
  organization={International Society for Optics and Photonics}
}

@article{mangasarian1993mathematical,
  title={Mathematical programming in neural networks},
  author={Mangasarian, Olvi L},
  journal={ORSA Journal on Computing},
  volume={5},
  number={4},
  pages={349--360},
  year={1993},
  publisher={INFORMS}
}

path: /Project/Progress Report/MIT.bib


text:
@article{clarke2000major,
 author = {Clarke, Harold D and Ho, Karl and Stewart, Marianne C},
 journal = {Electoral Studies},
 number = {2-3},
 pages = {255--273},
 publisher = {Pergamon},
 title = {Major's lesser (not minor) effects: prime ministerial approval and governing party support in Britain since 1979},
 volume = {19},
 year = {2000}
}


text:
package main

// https://space.bilibili.com/206214
func maximizeGreatness(nums []int) int {
	maxCnt := 0
	cnt := map[int]int{}
	for _, v := range nums {
		cnt[v]++
		maxCnt = max(maxCnt, cnt[v])
	}
	return len(nums) - maxCnt
}

func max(a, b int) int { if a < b { return b }; return a }

repository: EndlessCheng/codeforces-go

repo_name: EndlessCheng/codeforces-go