text:
/******************************************************************************
  This source file is part of the Avogadro project.
  This source code is released under the 3-Clause BSD License, (see "LICENSE").
******************************************************************************/

#ifndef AVOGADRO_QTPLUGINS_BONDCENTRICTOOL_H
#define AVOGADRO_QTPLUGINS_BONDCENTRICTOOL_H

#include <avogadro/qtgui/toolplugin.h>

#include <avogadro/rendering/primitive.h>

#include <avogadro/qtgui/persistentatom.h>
#include <avogadro/qtgui/persistentbond.h>
#include <avogadro/qtgui/rwmolecule.h>

#include <avogadro/core/avogadrocore.h>

#include <QtCore/QPoint>

#include <Eigen/Geometry>

#include <set>

namespace Avogadro {
namespace Rendering {
class GeometryNode;
}

namespace QtPlugins {

/**
 * @brief BondCentricTool manipulates molecular geometry by adjusting bond
 * angles/lengths.
 *
 * @note This class is adapted from the class of the same name in Avogadro 1.x,
 * written by Shahzad Ali, Ross Braithwaite, James Bunt, Marcus D. Hanwell, and
 * Benoit Jacob.
 */
class BondCentricTool : public QtGui::ToolPlugin
{
  Q_OBJECT
public:
  explicit BondCentricTool(QObject* parent_ = nullptr);
  ~BondCentricTool() override;

  QString name() const override;
  QString description() const override;
  unsigned char priority() const override { return 40; }
  QAction* activateAction() const override { return m_activateAction; }
  QWidget* toolWidget() const override;

  void setMolecule(QtGui::Molecule*) override;
  void setEditMolecule(QtGui::RWMolecule*) override;
  void setGLWidget(QtOpenGL::GLWidget* widget) override;
  void setGLRenderer(Rendering::GLRenderer* ren) override;

  QUndoCommand* mousePressEvent(QMouseEvent* e) override;
  QUndoCommand* mouseDoubleClickEvent(QMouseEvent* e) override;
  QUndoCommand* mouseMoveEvent(QMouseEvent* e) override;
  QUndoCommand* mouseReleaseEvent(QMouseEvent* e) override;

  void draw(Rendering::GroupNode& node) override;

private:
  enum MoveState
  {
    IgnoreMove = 0,
    RotatePlane,
    RotateBondedAtom,
    AdjustBondLength,
    RotateNeighborAtom
  };

  enum ResetBondBehavior
  {
    KeepBond = 0,
    ResetBond
  };
  void reset(ResetBondBehavior bond = ResetBond);

  void initializeBondVectors();
  void updateBondVector();

  // Mouse press event handlers:
  QUndoCommand* initRotatePlane(QMouseEvent* e,
                                const Rendering::Identifier& ident);
  QUndoCommand* initRotateBondedAtom(QMouseEvent* e,
                                     const QtGui::RWAtom& clickedAtom);
  QUndoCommand* initAdjustBondLength(QMouseEvent* e,
                                     const QtGui::RWAtom& clickedAtom);
  QUndoCommand* initRotateNeighborAtom(QMouseEvent* e,
                                       const QtGui::RWAtom& clickedAtom,
                                       const QtGui::RWAtom& anchorAtom);

  // Mouse move event handlers:
  QUndoCommand* rotatePlane(QMouseEvent* e);
  QUndoCommand* rotateBondedAtom(QMouseEvent* e);
  QUndoCommand* adjustBondLength(QMouseEvent* e);
  QUndoCommand* rotateNeighborAtom(QMouseEvent* e);

  // Drawing helpers:
  void drawBondQuad(Rendering::GeometryNode& node,
                    const QtGui::RWBond& bond) const;
  void drawBondAngle(Rendering::GeometryNode& node,
                     const QtGui::RWBond& selectedBond,
                     const QtGui::RWBond& movingBond) const;
  void drawBondLengthLabel(Rendering::GeometryNode& node,
                           const QtGui::RWBond& bond);
  void drawAtomBondAngles(Rendering::GeometryNode& node,
                          const QtGui::RWAtom& atom,
                          const QtGui::RWBond& anchorBond);
  void drawAtomBondAngle(Rendering::GeometryNode& node,
                         const QtGui::RWAtom& atom,
                         const QtGui::RWBond& anchorBond,
                         const QtGui::RWBond& otherBond,
                         const Vector3ub& color);

  // Bond utilities
  bool bondContainsAtom(const QtGui::RWBond& bond,
                        const QtGui::RWAtom& atom) const;

  // The 'fragment' is the SkeletonTree of the 1.x implementation. It is a list
  // of atoms created by buildFragment(bond, startAtom), which walks the bonds
  // connected to startAtom (not including the passed-in bond), adding each
  // atom it encounters to the list, and then walking that atom's bonds. If a
  // cycle is detected, only startAtom is added to m_fragment.
  void resetFragment() { m_fragment.clear(); }
  bool fragmentHasAtom(int uid) const;
  void buildFragment(const QtGui::RWBond& bond, const QtGui::RWAtom& startAtom);
  bool buildFragmentRecurse(const QtGui::RWBond& bond,
                            const QtGui::RWAtom& startAtom,
                            const QtGui::RWAtom& currentAtom);
  // Use transformFragment to transform the position of each atom in the
  // fragment by m_transform.
  void transformFragment() const;

  QAction* m_activateAction;
  QtGui::RWMolecule* m_molecule;
  Rendering::GLRenderer* m_renderer;
  MoveState m_moveState;
  QPoint m_clickedPoint;
  QPoint m_lastDragPoint;
  Vector3f m_bondVector;
  Vector3f m_planeNormalMouse;
  Vector3f m_planeNormal;

  // unique ids of atoms that will need to be moved:
  std::vector<int> m_fragment;
  Eigen::Affine3f m_transform;

  // Snap angles for RotatePlane. Angles are relative to m_planeSnapRef and
  // follow a right-hand rule around m_bondVector. Range is [-180, 180).
  std::set<float> m_planeSnapAngles;
  float m_planeSnapIncr;
  Vector3f m_planeSnapRef;
  bool m_snapPlaneToBonds;
  void updatePlaneSnapAngles();
  void updateSnappedPlaneNormal();

  QtGui::RWMolecule::PersistentBondType m_selectedBond;
  QtGui::RWMolecule::PersistentAtomType m_anchorAtom;
  QtGui::RWMolecule::PersistentAtomType m_clickedAtom;
};

inline QString BondCentricTool::name() const
{
  return tr("Bond centric manipulation tool.");
}

inline QString BondCentricTool::description() const
{
  return tr("Tool used to edit molecular geometry by changing bond lengths and "
            "angles.");
}

} // namespace QtPlugins
} // namespace Avogadro

#endif // AVOGADRO_QTPLUGINS_BONDCENTRICTOOL_H

repository: OpenChemistry/avogadrolibs

repo_name: OpenChemistry/avogadrolibs

extension: h


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Musegician.Database;

namespace Musegician.AlbumArtPicker
{
    public interface IAlbumArtPickerRequestHandler
    {
        IEnumerable<AlbumArtAlbumDTO> GetAlbumArtMatches(bool includeAll);

        void PushChanges();
    }
}

license: MIT

repository: tstavropoulos/Musegician

license_type: permissive

repo_name: tstavropoulos/Musegician

branch_name: refs/heads/master

extension: cs


text:
import { type Session } from '@supabase/supabase-js'
import { nanoid } from 'nanoid'
import { type NextRequest, NextResponse } from 'next/server'
import { sessionSchema } from '@/lib/schemas'
import { assignSessionID, createErrorResponse } from '@/lib/session'
import { createSupabaseClient } from '@/lib/supabase'

export const runtime = 'edge'
export const revalidate = 0

export async function POST(request: NextRequest): Promise<NextResponse> {
  let maybeSession: unknown
  try {
    maybeSession = await request.json()
  } catch {
    return createErrorResponse(400, 'Failed to parse requested JSON')
  }

  let partialSession: Pick<Session, 'access_token' | 'refresh_token'>
  try {
    partialSession = await sessionSchema.validate(maybeSession)
  } catch {
    return createErrorResponse(
      422,
      'Requires an access token and a refresh token.'
    )
  }

  const sessionID = nanoid()
  const supabaseClient = createSupabaseClient({ sessionID })
  const {
    data: { session },
    error
  } = await supabaseClient.auth.setSession(partialSession)

  if (error) {
    return createErrorResponse(error.status ?? 500, error.message)
  }

  if (!session) {
    return createErrorResponse(404, 'Session does not exist.')
  }

  const response = NextResponse.json(session, {
    headers: {
      Location: new URL('/api/sessions/me', request.url).toString()
    },
    status: 201
  })

  assignSessionID({ request, response, sessionID })

  return response
}

repository: inabagumi/shinju-date

repo_name: inabagumi/shinju-date

branch_name: refs/heads/main

gha_license_id: MIT

gha_language: TypeScript

extension: ts


text:
# base recipe: meta/recipes-graphics/mesa/mesa_19.0.1.bb
# base branch: warrior
# base commit: 271c0c2dc1e65f6b32bbc9d0521c627c82cd47b7

require ${COREBASE}/meta/recipes-graphics/mesa/mesa.inc

inherit debian-package
require recipes-debian/sources/${BPN}.inc

DEBIAN_PATCH_TYPE = "quilt"

FILESPATH_append = ":${COREBASE}/meta/recipes-graphics/mesa/files"
SRC_URI += " \
           file://0001-Simplify-wayland-scanner-lookup.patch \
           file://0002-winsys-svga-drm-Include-sys-types.h.patch \
           file://0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch \
           file://0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch \
           file://Fix-mising-NULL-compile-failure.patch \
"

EXTRA_OECONF = "--enable-shared-glapi \
                --disable-opencl \
                --enable-glx-read-only-text \
                PYTHON2=python2 \
                --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
                --with-platforms='${PLATFORMS}' \
"

#because we cannot rely on the fact that all apps will use pkgconfig,
#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
do_install_append() {
    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
    fi
}

repository: miraclelinux/meta-debian-extended

repo_name: miraclelinux/meta-debian-extended

branch_name: refs/heads/warrior

gha_language: BitBake

extension: bb


text:
import * as core from '@actions/core'
import * as github from '@actions/github'

export function getInputs(): {
  appId: number
  privateKey: string
  installationId: number
  startHour: number
  endHour: number
} {
  return {
    appId: +core.getInput('appId'),
    privateKey: core.getInput('privateKey'),
    installationId: +core.getInput('installationId'),
    startHour: +core.getInput('startHour'),
    endHour: +core.getInput('endHour')
  }
}

export function getContext(): {
  repository_owner: string
  repository_name: string
  branch_name: string
} {
  return {
    repository_owner: github.context.repo.owner,
    repository_name: github.context.repo.repo,
    branch_name: github.context.ref
  }
}

repository: hamuyuuki/merging-hours-restriction

repo_name: hamuyuuki/merging-hours-restriction


text:
SUMMARY = "Client-side decoration for all Qt-based Wayland clients"
LICENSE = "LGPLv3"
LIC_FILES_CHKSUM = "file://LICENSE.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"

inherit liri

PV = "1.1.0+git${SRCPV}"

SRC_URI += "file://0001-Fix-build-with-Qt-5.15.patch"
SRCREV = "6eb7686bb0538d815f52d6bb96a415d41e15b636"
S = "${WORKDIR}/git"

FILES_${PN} += " \
    ${libdir}/plugins \
"


text:
add_test( TestGpuSelect.test /home/lvtingxun/Project/tools/faiss/faiss/gpu/test/TestGpuSelect [==[--gtest_filter=TestGpuSelect.test]==] --gtest_also_run_disabled_tests)
set_tests_properties( TestGpuSelect.test PROPERTIES WORKING_DIRECTORY /home/lvtingxun/Project/tools/faiss/faiss/gpu/test SKIP_REGULAR_EXPRESSION [==[\[  SKIPPED \]]==])
add_test( TestGpuSelect.test1 /home/lvtingxun/Project/tools/faiss/faiss/gpu/test/TestGpuSelect [==[--gtest_filter=TestGpuSelect.test1]==] --gtest_also_run_disabled_tests)
set_tests_properties( TestGpuSelect.test1 PROPERTIES WORKING_DIRECTORY /home/lvtingxun/Project/tools/faiss/faiss/gpu/test SKIP_REGULAR_EXPRESSION [==[\[  SKIPPED \]]==])
add_test( TestGpuSelect.testExact /home/lvtingxun/Project/tools/faiss/faiss/gpu/test/TestGpuSelect [==[--gtest_filter=TestGpuSelect.testExact]==] --gtest_also_run_disabled_tests)
set_tests_properties( TestGpuSelect.testExact PROPERTIES WORKING_DIRECTORY /home/lvtingxun/Project/tools/faiss/faiss/gpu/test SKIP_REGULAR_EXPRESSION [==[\[  SKIPPED \]]==])
add_test( TestGpuSelect.testWarp /home/lvtingxun/Project/tools/faiss/faiss/gpu/test/TestGpuSelect [==[--gtest_filter=TestGpuSelect.testWarp]==] --gtest_also_run_disabled_tests)
set_tests_properties( TestGpuSelect.testWarp PROPERTIES WORKING_DIRECTORY /home/lvtingxun/Project/tools/faiss/faiss/gpu/test SKIP_REGULAR_EXPRESSION [==[\[  SKIPPED \]]==])
add_test( TestGpuSelect.test1Warp /home/lvtingxun/Project/tools/faiss/faiss/gpu/test/TestGpuSelect [==[--gtest_filter=TestGpuSelect.test1Warp]==] --gtest_also_run_disabled_tests)
set_tests_properties( TestGpuSelect.test1Warp PROPERTIES WORKING_DIRECTORY /home/lvtingxun/Project/tools/faiss/faiss/gpu/test SKIP_REGULAR_EXPRESSION [==[\[  SKIPPED \]]==])
add_test( TestGpuSelect.testExactWarp /home/lvtingxun/Project/tools/faiss/faiss/gpu/test/TestGpuSelect [==[--gtest_filter=TestGpuSelect.testExactWarp]==] --gtest_also_run_disabled_tests)
set_tests_properties( TestGpuSelect.testExactWarp PROPERTIES WORKING_DIRECTORY /home/lvtingxun/Project/tools/faiss/faiss/gpu/test SKIP_REGULAR_EXPRESSION [==[\[  SKIPPED \]]==])
set( TestGpuSelect_TESTS TestGpuSelect.test TestGpuSelect.test1 TestGpuSelect.testExact TestGpuSelect.testWarp TestGpuSelect.test1Warp TestGpuSelect.testExactWarp)

repository: hahaxun/faiss

repo_name: hahaxun/faiss

extension: cmake


text:
require edk2_git.bb

COMPATIBLE_MACHINE = "hikey"

DEPENDS_append = " dosfstools-native mtools-native grub optee-os"

SRCREV_edk2 = "06e4def583a56aebb67d11ab8f782220bbc5f621"
SRCREV_atf = "fb1158a365e2bf5bba638cde950678fddf67fe60"
SRCREV_openplatformpkg = "f70886cd45a12a0ce961752de55dc70a878f8a15"
SRCREV_uefitools = "abbe1c0a2dbeadde0e3c5f3a183f6c595b70158e"

SRC_URI = "git://github.com/96boards-hikey/edk2.git;name=edk2;branch=hikey-aosp \
           git://github.com/96boards-hikey/arm-trusted-firmware.git;name=atf;branch=hikey;destsuffix=git/atf \
           git://github.com/96boards-hikey/OpenPlatformPkg.git;name=openplatformpkg;branch=hikey-aosp;destsuffix=git/OpenPlatformPkg \
           git://git.linaro.org/uefi/uefi-tools.git;name=uefitools;destsuffix=git/uefi-tools \
           file://0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch \
           file://grub.cfg.in \
          "

# /usr/lib/edk2/bl1.bin not shipped files. [installed-vs-shipped]
INSANE_SKIP_${PN} += "installed-vs-shipped"

OPTEE_OS_ARG = "-s ${EDK2_DIR}/optee_os"

# We need the secure payload (Trusted OS) built from OP-TEE Trusted OS (tee.bin)
# but we have already built tee.bin from optee-os recipe and
# uefi-build.sh script has a few assumptions...
# Copy tee.bin and create dummy files to make uefi-build.sh script happy
do_compile_prepend() {
    install -D -p -m0644 \
      ${STAGING_DIR_HOST}/lib/firmware/tee.bin \
      ${EDK2_DIR}/optee_os/out/arm-plat-hikey/core/tee.bin

    mkdir -p ${EDK2_DIR}/optee_os/documentation
    touch ${EDK2_DIR}/optee_os/documentation/optee_design.md

    printf "all:\n"  > ${EDK2_DIR}/optee_os/Makefile
    printf "\ttrue" >> ${EDK2_DIR}/optee_os/Makefile
}

do_install() {
    install -D -p -m0644 ${EDK2_DIR}/Build/HiKey/RELEASE_${AARCH64_TOOLCHAIN}/AARCH64/AndroidFastbootApp.efi ${D}/boot/EFI/BOOT/fastboot.efi
    install -D -p -m0644 ${EDK2_DIR}/atf/build/${UEFIMACHINE}/release/bl1.bin ${D}${libdir}/edk2/bl1.bin

    # Install grub configuration
    sed -e "s|@DISTRO_NAME|${DISTRO_NAME}|" \
        -e "s|@KERNEL_IMAGETYPE|${KERNEL_IMAGETYPE}|" \
        -e "s|@CMDLINE|${CMDLINE}|" \
        < ${WORKDIR}/grub.cfg.in \
        > ${WORKDIR}/grub.cfg
    install -D -p -m0644 ${WORKDIR}/grub.cfg ${D}/boot/grub/grub.cfg
}

# Create a 64M boot image. block size is 1024. (64*1024=65536)
BOOT_IMAGE_SIZE = "65536"
BOOT_IMAGE_BASE_NAME = "boot-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
BOOT_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"

# HiKey boot image requires fastboot and grub EFI
# ensure we deploy grubaa64.efi before we try to create the boot image.
do_deploy[depends] += "grub:do_deploy"
do_deploy_append() {
    # Ship nvme.img with UEFI binaries for convenience
    dd if=/dev/zero of=${DEPLOYDIR}/nvme.img bs=128 count=1024

    # Create boot image
    mkfs.vfat -F32 -n "boot" -C ${DEPLOYDIR}/${BOOT_IMAGE_BASE_NAME}.uefi.img ${BOOT_IMAGE_SIZE}
    mmd -i ${DEPLOYDIR}/${BOOT_IMAGE_BASE_NAME}.uefi.img ::EFI
    mmd -i ${DEPLOYDIR}/${BOOT_IMAGE_BASE_NAME}.uefi.img ::EFI/BOOT
    mcopy -i ${DEPLOYDIR}/${BOOT_IMAGE_BASE_NAME}.uefi.img ${EDK2_DIR}/Build/HiKey/RELEASE_${AARCH64_TOOLCHAIN}/AARCH64/AndroidFastbootApp.efi ::EFI/BOOT/fastboot.efi
    mcopy -i ${DEPLOYDIR}/${BOOT_IMAGE_BASE_NAME}.uefi.img ${DEPLOY_DIR_IMAGE}/grubaa64.efi ::EFI/BOOT/grubaa64.efi
    chmod 644 ${DEPLOYDIR}/${BOOT_IMAGE_BASE_NAME}.uefi.img

    (cd ${DEPLOYDIR} && ln -sf ${BOOT_IMAGE_BASE_NAME}.uefi.img boot-${MACHINE}.uefi.img)
}


text:
## Obtained from:
#
# http://tracker.icir.org/bro/browser/branches/matthias/vast/cmake/FindPerftools.cmake?order=date
#
#

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

# - Try to find Google perftools include dirs and libraries
#
# Usage of this module as follows:
#
#     find_package(Perftools)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
#  PERFTOOLS_ROOT            Preferred installation prefix for searching for
#                            Perftools, set this if the module has problems
#                            finding the proper installation path.
#  PERFTOOLS_INCLUDEDIR      Set this to the include directory of the Google
#                            perftools, if the module has problems finding the
#                            installation path.
#  PERFTOOLS_LIBRARYDIR      Set this to the library directory of the Google
#                            perftools if the module has problems finding the
#                            proper installation path.
#
# Variables defined by this module:
#
#  Perftools_FOUND           System has Google perftools, this means the
#                            include dir and all the libraries were found.
#  Perftools_INCLUDE_DIRS    Google perftools include directories.
#  Perftools_LIBRARIES       Link these to use the Google perftools libraries.
#
#  Perftools_TCMALLOC_LIBRARY        Path to the tcmalloc library.
#  Perftools_STACKTRACE_LIBRARY      Path to the stacktrace library.
#  Perftools_PROFILER_LIBRARY        Path to the profiler library.

if (PERFTOOLS_ROOT)
    set(Perftools_ADDITIONAL_INCLUDE_SEARCH_DIRS ${PERFTOOLS_ROOT}/include)
    set(Perftools_ADDITIONAL_LIBRARY_SEARCH_DIRS ${PERFTOOLS_ROOT}/lib)
endif ()

if (PERFTOOLS_INCLUDEDIR)
    set(Perftools_ADDITIONAL_INCLUDE_SEARCH_DIRS ${PERFTOOLS_ROOT}/include)
endif ()

if (PERFTOOLS_LIBRARYDIR)
    set(Perftools_ADDITIONAL_LIBRARY_SEARCH_DIRS ${PERFTOOLS_ROOT}/lib)
endif ()

if (Perftools_LIBRARIES AND Perftools_INCLUDE_DIRS)
    # In cache already.
    set(Perftools_FOUND true)
else ()
    find_path(Perftools_INCLUDE_DIRS
        NAMES
            google/heap-profiler.h
        PATHS
            ${Perftools_ADDITIONAL_INCLUDE_SEARCH_DIRS}
            /usr/local/include
            /opt/local/include
            /sw/include
            /usr/include
        )

    # tcmalloc
    set(tcmalloc_names ${tcmalloc_names} tcmalloc)
    find_library(perftools_tcmalloc_library
        NAMES
            ${tcmalloc_names}
        PATHS
            ${Perftools_ADDITIONAL_LIBRARY_SEARCH_DIRS}
            /usr/local/lib
            /opt/local/lib
            /sw/lib
            /usr/lib
      )

    if (perftools_tcmalloc_library AND Perftools_INCLUDE_DIRS)
        set(Perftools_TCMALLOC_LIBRARY ${perftools_tcmalloc_library})
        set(Perftools_LIBRARIES
            ${Perftools_LIBRARIES} ${perftools_tcmalloc_library})
        set(Perftools_FOUND true)
    else ()
        set(Perftools_FOUND false)
    endif ()

    # stacktrace
    set(stacktrace_names ${stacktrace_names} stacktrace)
    find_library(perftools_stacktrace_library
        NAMES
            ${stacktrace_names}
        PATHS
            ${Perftools_ADDITIONAL_LIBRARY_SEARCH_DIRS}
            /usr/local/lib
            /opt/local/lib
            /sw/lib
            /usr/lib
      )

    if (perftools_stacktrace_library AND Perftools_INCLUDE_DIRS)
        set(Perftools_STACKTRACE_LIBRARY ${perftools_stacktrace_library})
        set(Perftools_LIBRARIES
            ${Perftools_LIBRARIES} ${perftools_stacktrace_library})
    endif ()

    # profiler
    set(profiler_names ${profiler_names} profiler)
    find_library(perftools_profiler_library
        NAMES
            ${profiler_names}
        PATHS
            ${Perftools_ADDITIONAL_LIBRARY_SEARCH_DIRS}
            /usr/local/lib
            /opt/local/lib
            /sw/lib
            /usr/lib
      )

    if (perftools_profiler_library AND Perftools_INCLUDE_DIRS)
        set(Perftools_PROFILER_LIBRARY ${perftools_profiler_library})
        set(Perftools_LIBRARIES
            ${Perftools_LIBRARIES} ${perftools_profiler_library})
    endif ()

    if (Perftools_FOUND)
        if (NOT Perftools_FIND_QUIETLY)
            message(STATUS "Found Google perftools")
        endif ()
    else ()
        if (Perftools_FIND_REQUIRED)
            message(FATAL_ERROR "Could not find Google perftools")
        endif ()
    endif ()

    mark_as_advanced(
      Perftools_INCLUDE_DIRS
      Perftools_LIBRARIES
      Perftools_TCMALLOC_LIBRARY
      Perftools_STACKTRACE_LIBRARY
      Perftools_PROFILER_LIBRARY
    )
endif()


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="9.6.2">
<drawing>
<settings>
<setting alwaysvectorfont="yes"/>
<setting verticaltext="up"/>
</settings>
<grid distance="25" unitdist="mil" unit="mil" style="lines" multiple="1" display="no" altdistance="5" altunitdist="mil" altunit="mil"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
<layer number="2" name="Route2" color="16" fill="1" visible="no" active="no"/>
<layer number="3" name="Route3" color="17" fill="1" visible="no" active="no"/>
<layer number="4" name="Route4" color="18" fill="1" visible="no" active="no"/>
<layer number="5" name="Route5" color="19" fill="1" visible="no" active="no"/>
<layer number="6" name="Route6" color="25" fill="1" visible="no" active="no"/>
<layer number="7" name="Route7" color="26" fill="1" visible="no" active="no"/>
<layer number="8" name="Route8" color="27" fill="1" visible="no" active="no"/>
<layer number="9" name="Route9" color="28" fill="1" visible="no" active="no"/>
<layer number="10" name="Route10" color="29" fill="1" visible="no" active="no"/>
<layer number="11" name="Route11" color="30" fill="1" visible="no" active="no"/>
<layer number="12" name="Route12" color="20" fill="1" visible="no" active="no"/>
<layer number="13" name="Route13" color="21" fill="1" visible="no" active="no"/>
<layer number="14" name="Route14" color="22" fill="1" visible="no" active="no"/>
<layer number="15" name="Route15" color="23" fill="1" visible="no" active="no"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="24" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="no" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" active="yes"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="yes" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="yes" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="no" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="no" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="no" active="yes"/>
<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="no" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="no" active="no"/>
<layer number="92" name="Busses" color="1" fill="1" visible="no" active="no"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="no"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="no" active="no"/>
<layer number="95" name="Names" color="7" fill="1" visible="no" active="no"/>
<layer number="96" name="Values" color="7" fill="1" visible="no" active="no"/>
<layer number="97" name="Info" color="7" fill="1" visible="no" active="no"/>
<layer number="98" name="Guide" color="6" fill="1" visible="no" active="no"/>
</layers>
<board>
<plain>
<hole x="3.175" y="23.495" drill="3.302" grouprefs="MOUNT"/>
<hole x="3.175" y="3.175" drill="3.302" grouprefs="MOUNT"/>
<hole x="34.925" y="3.175" drill="3.302" grouprefs="MOUNT"/>
<hole x="34.925" y="23.495" drill="3.302" grouprefs="MOUNT"/>
<wire x1="0" y1="0" x2="0" y2="26.67" width="0.0254" layer="20"/>
<wire x1="0" y1="26.67" x2="38.1" y2="26.67" width="0.0254" layer="20"/>
<wire x1="38.1" y1="26.67" x2="38.1" y2="0" width="0.0254" layer="20"/>
<wire x1="38.1" y1="0" x2="0" y2="0" width="0.0254" layer="20"/>
<text x="22.225" y="3.175" size="1.778" layer="25">Program</text>
<text x="11.43" y="8.89" size="1.27" layer="25">LED</text>
<text x="3.81" y="17.145" size="1.27" layer="25">5V</text>
<text x="2.54" y="10.795" size="1.27" layer="25">GND</text>
<text x="29.21" y="13.97" size="1.27" layer="25">SIG</text>
<text x="29.21" y="16.51" size="1.27" layer="25">3V3</text>
<text x="18.415" y="8.89" size="1.27" layer="25">MOTION</text>
<text x="29.21" y="11.43" size="1.27" layer="25">GND</text>
<wire x1="29.083" y1="17.145" x2="18.415" y2="17.145" width="0.127" layer="25"/>
<wire x1="29.083" y1="12.065" x2="13.97" y2="12.065" width="0.127" layer="25"/>
<wire x1="3.81" y1="16.891" x2="5.715" y2="16.891" width="0.127" layer="25"/>
<wire x1="5.715" y1="16.891" x2="6.985" y2="15.875" width="0.127" layer="25"/>
<wire x1="6.985" y1="15.875" x2="8.636" y2="15.875" width="0.127" layer="25"/>
<wire x1="8.636" y1="15.875" x2="9.779" y2="17.018" width="0.127" layer="25"/>
<wire x1="9.779" y1="17.018" x2="14.351" y2="17.018" width="0.127" layer="25"/>
<wire x1="3.81" y1="12.319" x2="5.715" y2="12.319" width="0.127" layer="25"/>
<wire x1="5.715" y1="12.319" x2="6.985" y2="13.335" width="0.127" layer="25"/>
<wire x1="6.985" y1="13.335" x2="8.89" y2="13.335" width="0.127" layer="25"/>
<wire x1="8.89" y1="13.335" x2="9.906" y2="12.065" width="0.127" layer="25"/>
<wire x1="9.906" y1="12.065" x2="14.605" y2="12.065" width="0.127" layer="25"/>
<wire x1="29.083" y1="14.605" x2="10.795" y2="14.605" width="0.127" layer="25"/>
<wire x1="17.653" y1="11.43" x2="17.653" y2="8.509" width="0.127" layer="25"/>
<wire x1="17.018" y1="9.779" x2="17.018" y2="6.35" width="0.127" layer="25"/>
<wire x1="17.018" y1="6.35" x2="32.004" y2="6.35" width="0.127" layer="25"/>
<wire x1="17.653" y1="8.509" x2="25.4" y2="8.509" width="0.127" layer="25"/>
<wire x1="25.4" y1="8.509" x2="25.4" y2="18.288" width="0.127" layer="25"/>
<text x="26.035" y="8.89" size="1.27" layer="25">LIGHT</text>
<wire x1="25.4" y1="8.509" x2="31.369" y2="8.509" width="0.127" layer="25"/>
<wire x1="31.369" y1="8.509" x2="31.369" y2="10.795" width="0.127" layer="25"/>
<wire x1="31.369" y1="10.795" x2="28.067" y2="10.795" width="0.127" layer="25"/>
<wire x1="28.067" y1="10.795" x2="28.067" y2="11.303" width="0.127" layer="25"/>
<wire x1="32.004" y1="9.779" x2="32.004" y2="6.35" width="0.127" layer="25"/>
<text x="11.176" y="19.05" size="1.27" layer="25">U  L</text>
<text x="18.796" y="19.05" size="1.27" layer="25">U  L  M</text>
<wire x1="16.51" y1="0.635" x2="16.51" y2="3.175" width="0.127" layer="25"/>
<text x="8.255" y="17.145" size="1.27" layer="26" rot="MR0">5V</text>
<text x="8.89" y="10.795" size="1.27" layer="26" rot="MR0">GND</text>
</plain>
<libraries>
<library name="con-samtec" urn="urn:adsk.eagle:library:184">
<description>Samtec Connectors

<author>Created by librarian@cadsoft.de</author></description>
<packages>
<package name="TSW-103-XX-G-D" library_version="2">
<description>THROUGH-HOLE .025" SQ POST HEADER

Source: Samtec TSW.pdf</description>
<wire x1="-3.939" y1="2.425" x2="3.939" y2="2.425" width="0.2032" layer="21"/>
<wire x1="3.939" y1="2.425" x2="3.939" y2="-2.425" width="0.2032" layer="21"/>
<wire x1="3.939" y1="-2.425" x2="-3.939" y2="-2.425" width="0.2032" layer="21"/>
<wire x1="-3.939" y1="-2.425" x2="-3.939" y2="2.425" width="0.2032" layer="21"/>
<pad name="1" x="2.54" y="-1.27" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="2" x="2.54" y="1.27" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="3" x="0" y="-1.27" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="4" x="0" y="1.27" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="5" x="-2.54" y="-1.27" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="6" x="-2.54" y="1.27" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<text x="2.332" y="-3.818" size="1.1" layer="21" font="vector" rot="SR0">1</text>
<text x="2.157" y="2.744" size="1.1" layer="21" font="vector" rot="SR0">2</text>
<text x="-4.445" y="-2.54" size="1.27" layer="25" rot="R90">>NAME</text>
<text x="5.715" y="-2.54" size="1.27" layer="27" rot="R90">>VALUE</text>
<rectangle x1="-2.89" y1="-1.62" x2="-2.19" y2="-0.92" layer="51"/>
<rectangle x1="-2.89" y1="0.92" x2="-2.19" y2="1.62" layer="51"/>
<rectangle x1="-0.35" y1="-1.62" x2="0.35" y2="-0.92" layer="51"/>
<rectangle x1="-0.35" y1="0.92" x2="0.35" y2="1.62" layer="51"/>
<rectangle x1="2.19" y1="-1.62" x2="2.89" y2="-0.92" layer="51"/>
<rectangle x1="2.19" y1="0.92" x2="2.89" y2="1.62" layer="51"/>
</package>
<package name="TSW-110-08-G-S" library_version="2">
<description>THROUGH-HOLE .025" SQ POST HEADER

Source: Samtec TSW.pdf</description>
<wire x1="-12.829" y1="1.155" x2="12.829" y2="1.155" width="0.2032" layer="21"/>
<wire x1="12.829" y1="1.155" x2="12.829" y2="-1.155" width="0.2032" layer="21"/>
<wire x1="12.829" y1="-1.155" x2="-12.829" y2="-1.155" width="0.2032" layer="21"/>
<wire x1="-12.829" y1="-1.155" x2="-12.829" y2="1.155" width="0.2032" layer="21"/>
<pad name="1" x="11.43" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="2" x="8.89" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="3" x="6.35" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="4" x="3.81" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="5" x="1.27" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="6" x="-1.27" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="7" x="-3.81" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="8" x="-6.35" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="9" x="-8.89" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="10" x="-11.43" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<text x="11.172" y="-2.498" size="1.1" layer="21" font="vector" rot="SR0">1</text>
<text x="-13.335" y="-1.27" size="1.27" layer="25" rot="R90">>NAME</text>
<text x="14.605" y="-1.27" size="1.27" layer="27" rot="R90">>VALUE</text>
<rectangle x1="-11.78" y1="-0.35" x2="-11.08" y2="0.35" layer="51"/>
<rectangle x1="-9.24" y1="-0.35" x2="-8.54" y2="0.35" layer="51"/>
<rectangle x1="-6.7" y1="-0.35" x2="-6" y2="0.35" layer="51"/>
<rectangle x1="-4.16" y1="-0.35" x2="-3.46" y2="0.35" layer="51"/>
<rectangle x1="-1.62" y1="-0.35" x2="-0.92" y2="0.35" layer="51"/>
<rectangle x1="0.92" y1="-0.35" x2="1.62" y2="0.35" layer="51"/>
<rectangle x1="3.46" y1="-0.35" x2="4.16" y2="0.35" layer="51"/>
<rectangle x1="6" y1="-0.35" x2="6.7" y2="0.35" layer="51"/>
<rectangle x1="8.54" y1="-0.35" x2="9.24" y2="0.35" layer="51"/>
<rectangle x1="11.08" y1="-0.35" x2="11.78" y2="0.35" layer="51"/>
</package>
<package name="TSW-104-07-G-T" library_version="2">
<description>THROUGH-HOLE .025" SQ POST HEADER

Source: Samtec TSW.pdf</description>
<wire x1="-5.209" y1="3.695" x2="5.209" y2="3.695" width="0.2032" layer="21"/>
<wire x1="5.209" y1="3.695" x2="5.209" y2="-3.695" width="0.2032" layer="21"/>
<wire x1="5.209" y1="-3.695" x2="-5.209" y2="-3.695" width="0.2032" layer="21"/>
<wire x1="-5.209" y1="-3.695" x2="-5.209" y2="3.695" width="0.2032" layer="21"/>
<pad name="1" x="3.81" y="-2.54" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="2" x="3.81" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="3" x="3.81" y="2.54" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="4" x="1.27" y="-2.54" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="5" x="1.27" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="6" x="1.27" y="2.54" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="7" x="-1.27" y="-2.54" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="8" x="-1.27" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="9" x="-1.27" y="2.54" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="10" x="-3.81" y="-2.54" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="11" x="-3.81" y="0" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="12" x="-3.81" y="2.54" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<text x="3.502" y="-5.188" size="1.1" layer="21" font="vector" rot="SR0">1</text>
<text x="3.498" y="3.989" size="1.1" layer="21" font="vector" rot="SR0">3</text>
<text x="-5.715" y="-3.81" size="1.27" layer="25" rot="R90">>NAME</text>
<text x="6.985" y="-3.81" size="1.27" layer="27" rot="R90">>VALUE</text>
<rectangle x1="-4.16" y1="-2.89" x2="-3.46" y2="-2.19" layer="51"/>
<rectangle x1="-4.16" y1="-0.35" x2="-3.46" y2="0.35" layer="51"/>
<rectangle x1="-4.16" y1="2.19" x2="-3.46" y2="2.89" layer="51"/>
<rectangle x1="-1.62" y1="-2.89" x2="-0.92" y2="-2.19" layer="51"/>
<rectangle x1="-1.62" y1="-0.35" x2="-0.92" y2="0.35" layer="51"/>
<rectangle x1="-1.62" y1="2.19" x2="-0.92" y2="2.89" layer="51"/>
<rectangle x1="0.92" y1="-2.89" x2="1.62" y2="-2.19" layer="51"/>
<rectangle x1="0.92" y1="-0.35" x2="1.62" y2="0.35" layer="51"/>
<rectangle x1="0.92" y1="2.19" x2="1.62" y2="2.89" layer="51"/>
<rectangle x1="3.46" y1="-2.89" x2="4.16" y2="-2.19" layer="51"/>
<rectangle x1="3.46" y1="-0.35" x2="4.16" y2="0.35" layer="51"/>
<rectangle x1="3.46" y1="2.19" x2="4.16" y2="2.89" layer="51"/>
</package>
<package name="TSW-101-XX-G-D" library_version="2">
<description>THROUGH-HOLE .025" SQ POST HEADER

Source: Samtec TSW.pdf</description>
<wire x1="-1.319" y1="2.425" x2="1.419" y2="2.425" width="0.2032" layer="21"/>
<wire x1="1.419" y1="2.425" x2="1.419" y2="-2.425" width="0.2032" layer="21"/>
<wire x1="1.419" y1="-2.425" x2="-1.319" y2="-2.425" width="0.2032" layer="21"/>
<wire x1="-1.319" y1="-2.425" x2="-1.319" y2="2.425" width="0.2032" layer="21"/>
<pad name="1" x="0.02" y="-1.27" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<pad name="2" x="0.02" y="1.27" drill="1" diameter="1.5" shape="octagon" rot="R180"/>
<text x="-0.188" y="-3.818" size="1.1" layer="21" font="vector" rot="SR0">1</text>
<text x="-0.363" y="2.744" size="1.1" layer="21" font="vector" rot="SR0">2</text>
<text x="-1.825" y="-2.54" size="1.27" layer="25" rot="R90">>NAME</text>
<text x="3.195" y="-2.54" size="1.27" layer="27" rot="R90">>VALUE</text>
<rectangle x1="-0.33" y1="-1.62" x2="0.37" y2="-0.92" layer="51"/>
<rectangle x1="-0.33" y1="0.92" x2="0.37" y2="1.62" layer="51"/>
</package>
</packages>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="2.54" drill="0">
</class>
<class number="1" name="power" width="1.27" drill="0">
</class>
<class number="2" name="signal" width="0.381" drill="0">
</class>
<class number="3" name="lowpower" width="1.27" drill="0">
</class>
</classes>
<designrules name="default">
<description language="de">EAGLE Design Rules

Die Standard-Design-Rules sind so gewählt, dass sie für
die meisten Anwendungen passen. Sollte ihre Platine
besondere Anforderungen haben, treffen Sie die erforderlichen
Einstellungen hier und speichern die Design Rules unter
einem neuen Namen ab.</description>
<description language="en">EAGLE Design Rules

The default Design Rules have been set to cover
a wide range of applications. Your particular design
may have different requirements, so please make the
necessary adjustments and save your customized
design rules under a new name.</description>
<param name="layerSetup" value="(1*16)"/>
<param name="mtCopper" value="0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm"/>
<param name="mtIsolate" value="1.5mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm"/>
<param name="mdWireWire" value="6mil"/>
<param name="mdWirePad" value="6mil"/>
<param name="mdWireVia" value="6mil"/>
<param name="mdPadPad" value="6mil"/>
<param name="mdPadVia" value="6mil"/>
<param name="mdViaVia" value="6mil"/>
<param name="mdSmdPad" value="6mil"/>
<param name="mdSmdVia" value="6mil"/>
<param name="mdSmdSmd" value="6mil"/>
<param name="mdViaViaSameLayer" value="6mil"/>
<param name="mnLayersViaInSmd" value="2"/>
<param name="mdCopperDimension" value="40mil"/>
<param name="mdDrill" value="6mil"/>
<param name="mdSmdStop" value="0mil"/>
<param name="msWidth" value="6mil"/>
<param name="msDrill" value="0.35mm"/>
<param name="msMicroVia" value="9.99mm"/>
<param name="msBlindViaRatio" value="0.5"/>
<param name="rvPadTop" value="0.25"/>
<param name="rvPadInner" value="0.25"/>
<param name="rvPadBottom" value="0.25"/>
<param name="rvViaOuter" value="0.25"/>
<param name="rvViaInner" value="0.25"/>
<param name="rvMicroViaOuter" value="0.25"/>
<param name="rvMicroViaInner" value="0.25"/>
<param name="rlMinPadTop" value="10mil"/>
<param name="rlMaxPadTop" value="20mil"/>
<param name="rlMinPadInner" value="10mil"/>
<param name="rlMaxPadInner" value="20mil"/>
<param name="rlMinPadBottom" value="10mil"/>
<param name="rlMaxPadBottom" value="20mil"/>
<param name="rlMinViaOuter" value="8mil"/>
<param name="rlMaxViaOuter" value="20mil"/>
<param name="rlMinViaInner" value="8mil"/>
<param name="rlMaxViaInner" value="20mil"/>
<param name="rlMinMicroViaOuter" value="4mil"/>
<param name="rlMaxMicroViaOuter" value="20mil"/>
<param name="rlMinMicroViaInner" value="4mil"/>
<param name="rlMaxMicroViaInner" value="20mil"/>
<param name="psTop" value="-1"/>
<param name="psBottom" value="-1"/>
<param name="psFirst" value="-1"/>
<param name="psElongationLong" value="100"/>
<param name="psElongationOffset" value="100"/>
<param name="mvStopFrame" value="1"/>
<param name="mvCreamFrame" value="0"/>
<param name="mlMinStopFrame" value="4mil"/>
<param name="mlMaxStopFrame" value="4mil"/>
<param name="mlMinCreamFrame" value="0mil"/>
<param name="mlMaxCreamFrame" value="0mil"/>
<param name="mlViaStopLimit" value="0mil"/>
<param name="srRoundness" value="0"/>
<param name="srMinRoundness" value="0mil"/>
<param name="srMaxRoundness" value="0mil"/>
<param name="slThermalIsolate" value="10mil"/>
<param name="slThermalsForVias" value="0"/>
<param name="dpMaxLengthDifference" value="10mm"/>
<param name="dpGapFactor" value="2.5"/>
<param name="checkAngle" value="0"/>
<param name="checkFont" value="1"/>
<param name="checkRestrict" value="1"/>
<param name="checkStop" value="0"/>
<param name="checkValues" value="0"/>
<param name="checkNames" value="1"/>
<param name="checkWireStubs" value="1"/>
<param name="checkPolygonWidth" value="0"/>
<param name="useDiameter" value="13"/>
<param name="maxErrors" value="50"/>
</designrules>
<autorouter>
<pass name="Default">
<param name="RoutingGrid" value="6.25mil"/>
<param name="AutoGrid" value="0"/>
<param name="Efforts" value="2"/>
<param name="TopRouterVariant" value="0"/>
<param name="tpViaShape" value="round"/>
<param name="PrefDir.1" value="a"/>
<param name="PrefDir.2" value="0"/>
<param name="PrefDir.3" value="0"/>
<param name="PrefDir.4" value="0"/>
<param name="PrefDir.5" value="0"/>
<param name="PrefDir.6" value="0"/>
<param name="PrefDir.7" value="0"/>
<param name="PrefDir.8" value="0"/>
<param name="PrefDir.9" value="0"/>
<param name="PrefDir.10" value="0"/>
<param name="PrefDir.11" value="0"/>
<param name="PrefDir.12" value="0"/>
<param name="PrefDir.13" value="0"/>
<param name="PrefDir.14" value="0"/>
<param name="PrefDir.15" value="0"/>
<param name="PrefDir.16" value="a"/>
<param name="cfVia" value="8"/>
<param name="cfNonPref" value="5"/>
<param name="cfChangeDir" value="2"/>
<param name="cfOrthStep" value="2"/>
<param name="cfDiagStep" value="3"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="1"/>
<param name="cfMalusStep" value="1"/>
<param name="cfPadImpact" value="4"/>
<param name="cfSmdImpact" value="4"/>
<param name="cfBusImpact" value="0"/>
<param name="cfHugging" value="3"/>
<param name="cfAvoid" value="4"/>
<param name="cfPolygon" value="10"/>
<param name="cfBase.1" value="0"/>
<param name="cfBase.2" value="1"/>
<param name="cfBase.3" value="1"/>
<param name="cfBase.4" value="1"/>
<param name="cfBase.5" value="1"/>
<param name="cfBase.6" value="1"/>
<param name="cfBase.7" value="1"/>
<param name="cfBase.8" value="1"/>
<param name="cfBase.9" value="1"/>
<param name="cfBase.10" value="1"/>
<param name="cfBase.11" value="1"/>
<param name="cfBase.12" value="1"/>
<param name="cfBase.13" value="1"/>
<param name="cfBase.14" value="1"/>
<param name="cfBase.15" value="1"/>
<param name="cfBase.16" value="0"/>
<param name="mnVias" value="20"/>
<param name="mnSegments" value="9999"/>
<param name="mnExtdSteps" value="9999"/>
<param name="mnRipupLevel" value="10"/>
<param name="mnRipupSteps" value="100"/>
<param name="mnRipupTotal" value="100"/>
</pass>
<pass name="Follow-me" refer="Default" active="yes">
</pass>
<pass name="Busses" refer="Default" active="yes">
<param name="cfNonPref" value="4"/>
<param name="cfBusImpact" value="4"/>
<param name="cfHugging" value="0"/>
<param name="mnVias" value="0"/>
</pass>
<pass name="Route" refer="Default" active="yes">
</pass>
<pass name="Optimize1" refer="Default" active="yes">
<param name="cfVia" value="99"/>
<param name="cfExtdStep" value="10"/>
<param name="cfHugging" value="1"/>
<param name="mnExtdSteps" value="1"/>
<param name="mnRipupLevel" value="0"/>
</pass>
<pass name="Optimize2" refer="Optimize1" active="yes">
<param name="cfNonPref" value="0"/>
<param name="cfChangeDir" value="6"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="2"/>
<param name="cfMalusStep" value="2"/>
<param name="cfPadImpact" value="2"/>
<param name="cfSmdImpact" value="2"/>
<param name="cfHugging" value="0"/>
</pass>
<pass name="Optimize3" refer="Optimize2" active="yes">
<param name="cfChangeDir" value="8"/>
<param name="cfPadImpact" value="0"/>
<param name="cfSmdImpact" value="0"/>
</pass>
<pass name="Optimize4" refer="Optimize3" active="yes">
<param name="cfChangeDir" value="25"/>
</pass>
</autorouter>
<groups>
<board_group name="3V3"/>
<board_group name="MOUNT"/>
</groups>
<elements>
<element name="LEDS" library="con-samtec" library_urn="urn:adsk.eagle:library:184" package="TSW-103-XX-G-D" value="" x="12.7" y="14.605" smashed="yes" rot="R90">
<attribute name="VALUE" x="15.24" y="20.32" size="1.27" layer="27" rot="R180"/>
</element>
<element name="LEFT" library="con-samtec" library_urn="urn:adsk.eagle:library:184" package="TSW-110-08-G-S" value="" x="19.05" y="24.765" smashed="yes">
<attribute name="VALUE" x="33.655" y="23.495" size="1.27" layer="27" rot="R90"/>
</element>
<element name="RIGHT" library="con-samtec" library_urn="urn:adsk.eagle:library:184" package="TSW-110-08-G-S" value="" x="19.05" y="1.905" smashed="yes" rot="R180">
<attribute name="VALUE" x="4.445" y="3.175" size="1.27" layer="27" rot="R270"/>
</element>
<element name="SENSORS" library="con-samtec" library_urn="urn:adsk.eagle:library:184" package="TSW-104-07-G-T" value="" x="22.86" y="14.605" smashed="yes">
<attribute name="NAME" x="26.67" y="8.255" size="1.27" layer="25" rot="R180"/>
<attribute name="VALUE" x="29.845" y="10.795" size="1.27" layer="27" rot="R90"/>
</element>
<element name="PWR" library="con-samtec" library_urn="urn:adsk.eagle:library:184" package="TSW-101-XX-G-D" value="" x="7.62" y="14.605" smashed="yes">
<attribute name="NAME" x="5.795" y="13.335" size="1.016" layer="25" rot="R90"/>
<attribute name="VALUE" x="10.815" y="12.065" size="1.27" layer="27" rot="R90"/>
</element>
</elements>
<signals>
<signal name="S$6">
</signal>
<signal name="LOWERMOTION" class="2">
<contactref element="LEFT" pad="5"/>
<contactref element="SENSORS" pad="11"/>
<wire x1="20.32" y1="15.875" x2="19.05" y2="14.605" width="0.381" layer="1"/>
<wire x1="20.32" y1="24.765" x2="20.32" y2="15.875" width="0.381" layer="1"/>
</signal>
<signal name="LOWERLED" class="2">
<contactref element="LEFT" pad="7"/>
<wire x1="12.73175" y1="15.90675" x2="11.43" y2="14.605" width="0.381" layer="1"/>
<wire x1="12.73175" y1="22.25675" x2="12.73175" y2="15.90675" width="0.381" layer="1"/>
<wire x1="15.24" y1="24.765" x2="12.73175" y2="22.25675" width="0.381" layer="1"/>
<contactref element="LEDS" pad="4"/>
</signal>
<signal name="UPPERLED" class="2">
<contactref element="LEFT" pad="6"/>
<wire x1="15.24" y1="15.875" x2="13.97" y2="14.605" width="0.381" layer="1"/>
<wire x1="17.78" y1="24.765" x2="15.24" y2="22.225" width="0.381" layer="1"/>
<wire x1="15.24" y1="22.225" x2="15.24" y2="15.875" width="0.381" layer="1"/>
<contactref element="LEDS" pad="3"/>
</signal>
<signal name="UPPERMOTION" class="2">
<contactref element="LEFT" pad="4"/>
<contactref element="SENSORS" pad="8"/>
<wire x1="22.86" y1="15.875" x2="21.59" y2="14.605" width="0.381" layer="1"/>
<wire x1="22.86" y1="24.765" x2="22.86" y2="15.875" width="0.381" layer="1"/>
</signal>
<signal name="MIDMOTION" class="2">
<contactref element="LEFT" pad="3"/>
<contactref element="SENSORS" pad="5"/>
<wire x1="25.4" y1="15.875" x2="24.13" y2="14.605" width="0.381" layer="1"/>
<wire x1="25.4" y1="24.765" x2="25.4" y2="15.875" width="0.381" layer="1"/>
</signal>
<signal name="LIGHT" class="2">
<contactref element="LEFT" pad="2"/>
<contactref element="SENSORS" pad="2"/>
<wire x1="27.94" y1="15.875" x2="26.67" y2="14.605" width="0.381" layer="1"/>
<wire x1="27.94" y1="24.765" x2="27.94" y2="15.875" width="0.381" layer="1"/>
</signal>
<signal name="3V3" class="3">
<contactref element="RIGHT" pad="2"/>
<contactref element="SENSORS" pad="12"/>
<contactref element="SENSORS" pad="9"/>
<contactref element="SENSORS" pad="6"/>
<contactref element="SENSORS" pad="3"/>
<wire x1="31.75" y1="15.24" x2="29.845" y2="17.145" width="2.54" layer="16" grouprefs="3V3"/>
<wire x1="19.05" y1="17.145" x2="29.845" y2="17.145" width="2.54" layer="16" grouprefs="3V3"/>
<wire x1="31.75" y1="15.24" x2="31.75" y2="7.62" width="2.54" layer="16" grouprefs="3V3"/>
<wire x1="31.75" y1="7.62" x2="30.48" y2="6.35" width="2.54" layer="16" grouprefs="3V3"/>
<wire x1="12.065" y1="6.35" x2="10.16" y2="4.445" width="2.54" layer="16"/>
<wire x1="10.16" y1="4.445" x2="10.16" y2="1.905" width="1.524" layer="16" grouprefs="3V3"/>
<wire x1="30.48" y1="6.35" x2="12.065" y2="6.35" width="2.54" layer="16" grouprefs="3V3"/>
<wire x1="19.05" y1="17.145" x2="21.59" y2="17.145" width="2.54" layer="16" grouprefs="3V3"/>
<wire x1="21.59" y1="17.145" x2="24.13" y2="17.145" width="2.54" layer="16" grouprefs="3V3"/>
<wire x1="24.13" y1="17.145" x2="26.67" y2="17.145" width="2.54" layer="16" grouprefs="3V3"/>
<polygon width="0.0254" layer="16" thermals="no">
<vertex x="8.89" y="4.445"/>
<vertex x="8.89" y="0.635"/>
<vertex x="11.43" y="0.635"/>
<vertex x="11.43" y="4.445"/>
</polygon>
</signal>
<signal name="GND" class="3">
<contactref element="SENSORS" pad="10"/>
<contactref element="SENSORS" pad="7"/>
<contactref element="SENSORS" pad="4"/>
<contactref element="SENSORS" pad="1"/>
<contactref element="RIGHT" pad="1"/>
<contactref element="LEFT" pad="10"/>
<contactref element="RIGHT" pad="10"/>
<contactref element="PWR" pad="1"/>
<wire x1="21.59" y1="12.065" x2="19.05" y2="12.065" width="2.54" layer="1"/>
<wire x1="21.59" y1="12.065" x2="24.13" y2="12.065" width="2.54" layer="1"/>
<wire x1="24.13" y1="12.065" x2="26.67" y2="12.065" width="2.54" layer="1"/>
<wire x1="30.48" y1="8.255" x2="30.48" y2="1.905" width="1.27" layer="1"/>
<wire x1="30.48" y1="8.255" x2="26.9875" y2="11.7475" width="2.54" layer="1"/>
<wire x1="26.9875" y1="11.58875" x2="26.9875" y2="11.7475" width="2.032" layer="1"/>
<wire x1="26.9875" y1="11.58875" x2="26.67" y2="12.065" width="1.27" layer="1"/>
<wire x1="13.97" y1="12.065" x2="11.43" y2="12.065" width="2.54" layer="1"/>
<wire x1="7.62" y1="13.335" x2="7.62" y2="12.065" width="1.27" layer="1"/>
<wire x1="7.62" y1="12.065" x2="7.62" y2="1.905" width="1.27" layer="1"/>
<wire x1="7.62" y1="13.335" x2="7.64" y2="13.335" width="1.27" layer="1"/>
<wire x1="7.62" y1="24.765" x2="7.62" y2="18.415" width="1.27" layer="1"/>
<wire x1="7.62" y1="18.415" x2="5.3975" y2="18.415" width="1.27" layer="1"/>
<wire x1="5.3975" y1="14.44625" x2="5.3975" y2="18.415" width="1.27" layer="1"/>
<wire x1="7.64" y1="13.335" x2="6.50875" y2="13.335" width="2.54" layer="1"/>
<wire x1="6.50875" y1="13.335" x2="5.3975" y2="14.44625" width="1.27" layer="1"/>
<wire x1="7.62" y1="12.065" x2="11.43" y2="12.065" width="2.54" layer="1"/>
<wire x1="13.97" y1="12.065" x2="19.05" y2="12.065" width="2.54" layer="1"/>
<polygon width="0.0254" layer="1" isolate="0.4064" thermals="no">
<vertex x="7.62" y="15.24"/>
<vertex x="9.525" y="13.335"/>
<vertex x="27.94" y="13.335"/>
<vertex x="32.385" y="8.89"/>
<vertex x="32.385" y="0.635"/>
<vertex x="29.21" y="0.635"/>
<vertex x="29.21" y="3.175"/>
<vertex x="27.94" y="4.445"/>
<vertex x="10.16" y="4.445"/>
<vertex x="8.89" y="3.175"/>
<vertex x="8.89" y="0.635"/>
<vertex x="6.35" y="0.635"/>
<vertex x="3.175" y="3.81"/>
<vertex x="3.175" y="22.86"/>
<vertex x="6.35" y="26.035"/>
<vertex x="8.89" y="26.035"/>
<vertex x="8.89" y="17.78"/>
<vertex x="7.62" y="16.51"/>
<vertex x="6.985" y="16.51"/>
<vertex x="6.985" y="15.24"/>
</polygon>
<contactref element="LEDS" pad="5"/>
<contactref element="LEDS" pad="6"/>
</signal>
<signal name="5V" class="1">
<contactref element="PWR" pad="2"/>
<contactref element="LEFT" pad="9"/>
<polygon width="0.0254" layer="16" isolate="0.4064" thermals="no">
<vertex x="8.89" y="26.035"/>
<vertex x="11.43" y="26.035"/>
<vertex x="11.43" y="22.86"/>
<vertex x="14.605" y="22.86"/>
<vertex x="15.24" y="22.225"/>
<vertex x="15.24" y="15.875"/>
<vertex x="10.795" y="15.875"/>
<vertex x="9.525" y="14.605"/>
<vertex x="6.985" y="14.605"/>
<vertex x="6.35" y="15.24"/>
<vertex x="6.35" y="20.955"/>
<vertex x="8.89" y="23.495"/>
</polygon>
<contactref element="LEDS" pad="1"/>
<contactref element="LEDS" pad="2"/>
<wire x1="7.64" y1="15.875" x2="8.91" y2="17.145" width="1.27" layer="16"/>
<wire x1="8.91" y1="17.145" x2="10.16" y2="17.145" width="1.27" layer="16"/>
<wire x1="10.16" y1="17.145" x2="13.97" y2="17.145" width="1.27" layer="16"/>
<wire x1="10.16" y1="24.765" x2="10.16" y2="17.145" width="1.27" layer="16"/>
</signal>
</signals>
<mfgpreviewcolors>
<mfgpreviewcolor name="soldermaskcolor" color="0xC8008000"/>
<mfgpreviewcolor name="silkscreencolor" color="0xFFFEFEFE"/>
<mfgpreviewcolor name="backgroundcolor" color="0xFF282828"/>
<mfgpreviewcolor name="coppercolor" color="0xFFFFBF00"/>
<mfgpreviewcolor name="substratecolor" color="0xFF786E46"/>
</mfgpreviewcolors>
</board>
</drawing>
<compatibility>
<note version="8.2" severity="warning">
Since Version 8.2, EAGLE supports online libraries. The ids
of those online libraries will not be understood (or retained)
with this version.
</note>
<note version="9.5" severity="warning">
Since Version 9.5, EAGLE supports persistent groups with
schematics, and board files. Those persistent groups
will not be understood (or retained) with this version.
</note>
</compatibility>
</eagle>

repository: augustoroman/stairwell-lights

repo_name: augustoroman/stairwell-lights

extension: brd


text:
@article{Beel-2020-Differential,
    title = "Differential impact of thermal and physical permafrost disturbances on High Arctic dissolved and particulate fluvial fluxes",
    author = "Beel, C. R.  and
      Lamoureux, S. F.  and
      Orwin, J. F.  and
      Pope, M. A.  and
      Lafreni{\`e}re, M. J.  and
      Scott, N. A.",
    journal = "Scientific Reports, Volume 10, Issue 1",
    volume = "10",
    number = "1",
    year = "2020",
    publisher = "Springer Science and Business Media LLC",
    url = "https://aclanthology.org/G20-48001",
    doi = "10.1038/s41598-020-68824-3",
}

repository: gwf-uwaterloo/gwf-publications

repo_name: gwf-uwaterloo/gwf-publications

gha_language: Python

extension: bib


text:
package parser

import (
	"fmt"
	"io"
	"io/ioutil"

	"github.com/instrumenta/conftest/parser/cue"
	"github.com/instrumenta/conftest/parser/docker"
	"github.com/instrumenta/conftest/parser/edn"
	"github.com/instrumenta/conftest/parser/hcl2"
	"github.com/instrumenta/conftest/parser/hocon"
	"github.com/instrumenta/conftest/parser/ini"
	"github.com/instrumenta/conftest/parser/terraform"
	"github.com/instrumenta/conftest/parser/toml"
	"github.com/instrumenta/conftest/parser/xml"
	"github.com/instrumenta/conftest/parser/yaml"
)

// ValidInputs returns string array in order to passing valid input types to viper
func ValidInputs() []string {
	return []string{
		"toml",
		"tf|hcl",
		"hcl2",
		"cue",
		"ini",
		"yml|yaml|json",
		"Dockerfile",
		"edn",
		"xml",
	}
}

// Parser is the interface implemented by objects that can unmarshal
// bytes into a golang interface
type Parser interface {
	Unmarshal(p []byte, v interface{}) error
}

// ConfigDoc stores file contents and it's original filename
type ConfigDoc struct {
	ReadCloser io.ReadCloser
	Filepath   string
}

// ConfigManager the implementation of ReadUnmarshaller and io.Reader
// byte storage.
type ConfigManager struct {
	parser         Parser
	configContents map[string][]byte
}

// BulkUnmarshal iterates through the given cached io.Readers and
// runs the requested parser on the data.
func (s *ConfigManager) BulkUnmarshal(configList []ConfigDoc) (map[string]interface{}, error) {
	if err := s.setConfigs(configList); err != nil {
		return nil, fmt.Errorf("set configuration: %w", err)
	}

	var allContents = make(map[string]interface{})
	for filepath, config := range s.configContents {
		var singleContent interface{}
		if err := s.parser.Unmarshal(config, &singleContent); err != nil {
			return nil, fmt.Errorf("parser unmarshal: %w", err)
		}

		allContents[filepath] = singleContent
	}

	return allContents, nil
}

func (s *ConfigManager) setConfigs(configList []ConfigDoc) error {
	s.configContents = make(map[string][]byte)
	for _, config := range configList {
		contents, err := ioutil.ReadAll(config.ReadCloser)
		defer config.ReadCloser.Close()
		if err != nil {
			return fmt.Errorf("read config: %w", err)
		}

		s.configContents[config.Filepath] = contents
	}

	return nil
}

// NewConfigManager is the instatiation function for ConfigManager
func NewConfigManager(fileType string) (*ConfigManager, error) {
	parser, err := GetParser(fileType)
	if err != nil {
		return nil, fmt.Errorf("get parser: %w", err)
	}

	config := ConfigManager{
		parser: parser,
	}

	return &config, nil
}

// GetParser gets a parser that works on a given fileType
func GetParser(fileType string) (Parser, error) {
	switch fileType {
	case "toml":
		return &toml.Parser{}, nil
	case "tf", "hcl":
		return &terraform.Parser{}, nil
	case "cue":
		return &cue.Parser{}, nil
	case "ini":
		return &ini.Parser{}, nil
	case "hocon":
		return &hocon.Parser{}, nil
	case "hcl2":
		return &hcl2.Parser{}, nil
	case "Dockerfile", "dockerfile":
		return &docker.Parser{}, nil
	case "yml", "yaml", "json":
		return &yaml.Parser{}, nil
	case "edn":
		return &edn.Parser{}, nil
	case "xml":
		return &xml.Parser{}, nil
	default:
		return nil, fmt.Errorf("unknown filetype given: %v", fileType)
	}
}

repository: praveensastry/conftest

repo_name: praveensastry/conftest

gha_license_id: NOASSERTION

extension: go


text:
package sys

const UsageError = 64            // incorrect usage of "shush"
const KmsError = 69              // KMS encrypt/decrypt issues
const ExecError = 126            // cannot execute the specified command
const CommandNotFoundError = 127 // cannot find the specified command

repository: realestate-com-au/shush

repo_name: realestate-com-au/shush

gha_language: Go


text:
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

import { environment } from '../../environments/environment';

import { Barcode } from '../shared/barcode.model';
import { map } from 'rxjs/operators';

@Injectable()
export class BarcodeService {

  constructor(private http: HttpClient) { }

  //retreiving BarcodeService

  getBarcode(partCode) {
    return this.http.get(environment.apiBaseUrl+'/barcode/'+partCode)
      .toPromise()
      .then(res => res as Barcode);
  }
/* premestiti u servis za Nonconformity
  addNonconformity(newNonconformity) {
    var headers = new Headers();
    headers.append('Content-Type', 'application/json');
    return this.http.post('http://localhost:3000/api/nonconformity', newNonconformity, {headers: headers})
      .pipe(map(res => res.json()));
  }

  deleteNonconformity(id) {
    return this.http.delete('http://localhost:3000/api/nonconformity/'+id)
      .pipe(map(res => res.json()));
  }*/

}

repository: cqm-quality-center/nonconformity

repo_name: cqm-quality-center/nonconformity


text:
package helper

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestCleanJoinPath(t *testing.T) {
	tests := []struct {
		name string
		in   []string
		out  string
	}{
		{
			name: "current",
			in:   []string{"."},
			out:  ".",
		},
		{
			name: "only filename",
			in:   []string{"jmerge.yaml"},
			out:  "jmerge.yaml",
		},
		{
			name: "ref path",
			in:   []string{"./example", "conf", "jmerge.yaml"},
			out:  "example/conf/jmerge.yaml",
		},
		{
			name: "abs path",
			in:   []string{"/home", "example", "conf", "jmerge.yaml"},
			out:  "/home/example/conf/jmerge.yaml",
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			out := CleanJoinPath(tt.in...)
			assert.Equal(t, tt.out, out)
		})
	}
}


text:
@article{2021QJRMS.147..691R,
 adsnote = {Provided by the SAO/NASA Astrophysics Data System},
 adsurl = {https://ui.adsabs.harvard.edu/abs/2021QJRMS.147..691R},
 author = {Renfrew, I.~A. and Barrell, C. and Elvidge, A.~D. and Brooke, J.~K. and Duscha, C. and King, J.~C. and Kristiansen, J. and Cope, T. Lachlan and Moore, G.~W.~K. and Pickart, R.~S. and Reuder, J. and Sandu, I. and Sergeev, D. and Terpstra, A. and V̊age, K. and Weiss, A.},
 doi = {10.1002/qj.3941},
 journal = {Quarterly Journal of the Royal Meteorological Society},
 month = {January},
 number = {734},
 pages = {691-712},
 title = {An evaluation of surface meteorology and fluxes over the Iceland and Greenland Seas in ERA5 reanalysis: The impact of sea ice distribution},
 volume = {147},
 year = {2021}
}

gha_language: Jupyter Notebook


text:
package main

import (
	"fmt"
	"strings"

	"github.com/golang-fork-k/utils"

	"github.com/spf13/cobra"
)

func main() {

	var cmdGenerate = &cobra.Command{
		Use:   "generate [dir name]",
		Short: "Generate all folders",
		Long:  "Generate all sub folders",
		Args:  cobra.MinimumNArgs(1),
		Run: func(cmd *cobra.Command, args []string) {
			utils.Create(strings.Join(args, " "))
			if utils.IsCommandAvailable("kubectl") == false && utils.IsCommandAvailable("docker") == false {
				fmt.Println("please install kubectl first")
			}
		},
	}

	var cmdBuild = &cobra.Command{
		Use:   "build [tag]",
		Short: "build the docker image",
		Long:  "docker build from dockerfile",
		Args:  cobra.MinimumNArgs(2),
		Run: func(cmd *cobra.Command, args []string) {
			var path string
			var tag string
			path = args[0]
			tag = args[1]
			utils.DockerBuild(path, tag, "Dockerfile")
			if utils.IsCommandAvailable("docker") == false {
				fmt.Println("please docker first")
			}
		},
	}

	var cmdDeploy = &cobra.Command{
		Use:   "deploy [tag]",
		Short: "deploy environment",
		Long:  "deploy kubernets ",
		// TODO: flag with environment
		Args: cobra.MinimumNArgs(2),
		Run: func(cmd *cobra.Command, args []string) {
			var path string
			var name string
			path = args[0]
			name = args[1]
			utils.KubeDeploy(path, name)
			if utils.IsCommandAvailable("kubectl") == false {
				fmt.Println("please kubectl first")
			}
		},
	}

	var rootCmd = &cobra.Command{Use: "k"}
	rootCmd.AddCommand(cmdGenerate, cmdBuild, cmdDeploy)
	rootCmd.Execute()

}

repository: leitu/golang-fork-k

repo_name: leitu/golang-fork-k


text:
PR = "r1"

require radvd.inc

SRC_URI[md5sum] = "e807ad7e9a76d46b6133df391385cd31"
SRC_URI[sha256sum] = "54eb5704a2b710ba946fa30d2bca811fa23b1b3bfab322c38cb0c2a9619aa933"

SRC_URI += "\
    file://change-scanner-dependency.patch"

repository: ExorEmbedded/exor-workspace

repo_name: ExorEmbedded/exor-workspace


text:
package firehose

import (
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/firehose"
	"github.com/elastic/beats/libbeat/beat"
	"github.com/elastic/beats/libbeat/logp"
	"github.com/elastic/beats/libbeat/outputs"
	"github.com/elastic/beats/libbeat/outputs/codec"
	"github.com/elastic/beats/libbeat/outputs/codec/json"
	"github.com/elastic/beats/libbeat/publisher"
)

type client struct {
	firehose           *firehose.Firehose
	deliveryStreamName string
	beatName           string
	encoder            codec.Codec
	timeout            time.Duration
	observer           outputs.Observer
}

func newClient(sess *session.Session, config *FirehoseConfig, observer outputs.Observer, beat beat.Info) (*client, error) {
	client := &client{
		firehose:           firehose.New(sess),
		deliveryStreamName: config.DeliveryStreamName,
		beatName:           beat.Beat,
		encoder:            json.New(beat.Version, json.Config{Pretty: false, EscapeHTML: true}),
		timeout:            config.Timeout,
		observer:           observer,
	}

	return client, nil
}

func (client *client) String() string {
	return "firehose"
}

func (client *client) Close() error {
	return nil
}

func (client *client) Connect() error {
	return nil
}

func (client *client) Publish(batch publisher.Batch) error {
	events := batch.Events()
	rest, _ := client.publishEvents(events)
	if len(rest) == 0 {
		// We have to ACK only when all the submission succeeded
		// Ref: https://github.com/elastic/beats/blob/c4af03c51373c1de7daaca660f5d21b3f602771c/libbeat/outputs/elasticsearch/client.go#L232
		batch.ACK()
	} else {
		// Mark the failed events to retry
		// Ref: https://github.com/elastic/beats/blob/c4af03c51373c1de7daaca660f5d21b3f602771c/libbeat/outputs/elasticsearch/client.go#L234
		batch.RetryEvents(rest)
	}
	// This shouldn't be an error object according to other official beats' implementations
	// Ref: https://github.com/elastic/beats/blob/c4af03c51373c1de7daaca660f5d21b3f602771c/libbeat/outputs/kafka/client.go#L119
	return nil
}

func (client *client) publishEvents(events []publisher.Event) ([]publisher.Event, error) {
	observer := client.observer
	observer.NewBatch(len(events))

	logp.NewLogger("firehose").Debug("received events: %v", events)
	okEvents, records, dropped := client.mapEvents(events)

	logp.NewLogger("firehose").Debug("sent %d records: %v", len(records), records)
	observer.Dropped(dropped)
	observer.Acked(len(okEvents))

	logp.NewLogger("firehose").Debug("mapped to records: %v", records)
	res, err := client.sendRecords(records)
	failed := collectFailedEvents(res, events)
	if err != nil && len(failed) == 0 {
		failed = events
	}
	if len(failed) > 0 {
		logp.NewLogger("firehose").Info("retrying %d events on error: %v", len(failed), err)
	}
	return failed, err
}

func (client *client) mapEvents(events []publisher.Event) ([]publisher.Event, []*firehose.Record, int) {
	dropped := 0
	records := make([]*firehose.Record, 0, len(events))
	okEvents := make([]publisher.Event, 0, len(events))
	for _, event := range events {
		record, err := client.mapEvent(&event)
		if err != nil {
			logp.NewLogger("firehose").Warn("failed to map event(%v): %v", event, err)
			dropped++
		} else {
			okEvents = append(okEvents, event)
			records = append(records, record)
		}
	}

	return okEvents, records, dropped
}

func (client *client) mapEvent(event *publisher.Event) (*firehose.Record, error) {
	var buf []byte
	{
		serializedEvent, err := client.encoder.Encode(client.beatName, &event.Content)
		if err != nil {
			if !event.Guaranteed() {
				return nil, err
			}

			logp.NewLogger("firehose").Error("Unable to encode event: %v", err)
			return nil, err
		}
		// See https://github.com/elastic/beats/blob/5a6630a8bc9b9caf312978f57d1d9193bdab1ac7/libbeat/outputs/kafka/client.go#L163-L164
		// You need to copy the byte data like this. Otherwise you see strange issues like all the records sent in a same batch has the same Data.
		buf = make([]byte, len(serializedEvent)+1)
		copy(buf, serializedEvent)
		// Firehose doesn't automatically add trailing new-line on after each record.
		// This ends up a stream->firehose->s3 pipeline to produce useless s3 objects.
		// No ndjson, but a sequence of json objects without separators...
		// Fix it just adding a new-line.
		//
		// See https://stackoverflow.com/questions/43010117/writing-properly-formatted-json-to-s3-to-load-in-athena-redshift
		buf[len(buf)-1] = byte('\n')
	}

	return &firehose.Record{Data: buf}, nil
}

func (client *client) sendRecords(records []*firehose.Record) (*firehose.PutRecordBatchOutput, error) {
	request := firehose.PutRecordBatchInput{
		DeliveryStreamName: &client.deliveryStreamName,
		Records:            records,
	}
	return client.firehose.PutRecordBatch(&request)
}

func collectFailedEvents(res *firehose.PutRecordBatchOutput, events []publisher.Event) []publisher.Event {
	if aws.Int64Value(res.FailedPutCount) > 0 {
		failedEvents := make([]publisher.Event, 0)
		responses := res.RequestResponses
		for i, r := range responses {
			if aws.StringValue(r.ErrorCode) != "" {
				failedEvents = append(failedEvents, events[i])
			}
		}
		return failedEvents
	}
	return []publisher.Event{}
}

repository: lumigo-io/awsbeats

repo_name: lumigo-io/awsbeats


text:
require at91bootstrap.inc

DEFAULT_PREFERENCE = "-1"

SRCREV = "${AUTOREV}"

PV = "3.8+git${SRCPV}"

UBRANCH = "emerson"
SRC_URI = "git://github.com/zaigor2/at91bootstrap.git;protocol=git;branch=${UBRANCH}"

S = "${WORKDIR}/git"

LIC_FILES_CHKSUM = "file://main.c;endline=27;md5=a2a70db58191379e2550cbed95449fbd"