text:
using MongoDB.Bson;
using MongoDB.Bson.Serialization;
using MongoDB.Driver;
using MongoDB.Labs.Search;

namespace Mongo.LuceneQuery
{
    public sealed class LuceneSearchDefinition<TDocument> : SearchDefinition<TDocument>
    {
        private readonly FieldDefinition<TDocument> defaultPath;
        private readonly LuceneQueryVisitor visitor;
        private readonly string query;

        public LuceneSearchDefinition(FieldDefinition<TDocument> defaultPath, string query, Func<string, string>? fieldConverter = null)
        {
            this.defaultPath = defaultPath;

            if (fieldConverter != null)
            {
                visitor = LuceneQueryVisitor.Default;
            }
            else
            {
                visitor = new LuceneQueryVisitor(fieldConverter);
            }

            this.query = query;
        }

        public override BsonDocument Render(IBsonSerializer<TDocument> documentSerializer, IBsonSerializerRegistry serializerRegistry)
        {
            var renderedField = defaultPath.Render(documentSerializer, serializerRegistry);
            var renderedQuery = LuceneQueryParser.Parse(query, renderedField.FieldName);

            var rendered = visitor.Visit(renderedQuery);

            return rendered;
        }
    }
}

repository: eramax/MongoSearchTest

repo_name: eramax/MongoSearchTest

branch_name: refs/heads/main


text:
DESCRIPTION = "NETCP SA firmware for Keystone"

LICENSE = "TI-TFL"
LIC_FILES_CHKSUM = "file://LICENCE.ti-keystone;md5=3a86335d32864b0bef996bee26cc0f2c"

PV = "1.0.0"
PR = "r0"

CLEANBROKEN = "1"

COMPATIBLE_MACHINE = "keystone"

PACKAGE_ARCH = "${MACHINE_ARCH}"

SRCREV = "588f602a21c62f90b1f4318b881c80a1e711317a"
BRANCH ?= "ti-linux-firmware-4.1.y"

SRC_URI = "git://git.ti.com/processor-firmware/ti-linux-firmware.git;protocol=git;branch=${BRANCH}"

S = "${WORKDIR}/git"

TARGET = "sa_mci.fw"

do_install() {
	install -d ${D}${base_libdir}/firmware
	install -m 0644 ${S}/ti-keystone/${TARGET} ${D}${base_libdir}/firmware/${TARGET}
}

FILES_${PN} = "${base_libdir}/firmware"

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: bb


text:
require nodejs5.inc

INC_PR = "r1"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ee90ba97d933fc8d56e97812b7dd62e9"

SRC_URI[src.md5sum] = "3017cff531a8fe9b5e18b03a4b644346"
SRC_URI[src.sha256sum] = "698d9662067ae6a20a2586e5c09659735fc0050769a0d8f76f979189ceaccdf4"

repository: siemens/meta-nodejs

repo_name: siemens/meta-nodejs


text:
package services

import (
	"Asgard/models"

	"github.com/dalonghahaha/avenger/components/logger"
)

type OperationService struct {
}

func NewOperationService() *OperationService {
	return &OperationService{}
}

func (s *OperationService) GetOperationPageList(where map[string]interface{}, page int, pageSize int) (list []models.Operation, count int) {
	err := models.PageList(&models.Operation{}, where, page, pageSize, "created_at desc", &list, &count)
	if err != nil {
		logger.Error("GetOperationLogPageList Error:", err)
		return nil, 0
	}
	return
}

func (s *OperationService) CreateOperation(operationLog *models.Operation) bool {
	err := models.Create(operationLog)
	if err != nil {
		logger.Error("CreateOperationLog Error:", err)
		return false
	}
	return true
}

gha_license_id: MIT

extension: go


text:
package social

import (
	"bytes"

	"github.com/golang/protobuf/proto"
	"github.com/pkg/errors"
	"github.com/furdarius/steamprotocol"
	"github.com/furdarius/steamprotocol/auth"
	"github.com/furdarius/steamprotocol/messages"
	"github.com/furdarius/steamprotocol/protobuf"
)

type Module struct {
	eventManager *steamprotocol.EventManager
	cl           *steamprotocol.Client
	steamID      uint64
	sessionID    int32
}

func NewModule(cl *steamprotocol.Client, eventManager *steamprotocol.EventManager) *Module {
	return &Module{
		cl:           cl,
		eventManager: eventManager,
	}
}

func (m *Module) Subscribe() {
	m.eventManager.OnEvent(m.handleEvent)
}

func (m *Module) handleEvent(e interface{}) error {
	switch event := e.(type) {
	case auth.SuccessfullyAuthenticatedEvent:
		m.handleSuccessfullyAuthenticatedEvent(event)
	}

	return nil
}

func (m *Module) handleSuccessfullyAuthenticatedEvent(e auth.SuccessfullyAuthenticatedEvent) {
	m.sessionID = e.SessionID
	m.steamID = e.SteamID

	m.SetUserOnline()
}

func (m *Module) SetUserOnline() error {
	responseHeader := messages.NewHeaderProto(steamprotocol.EMsg_ClientChangeStatus)
	responseHeader.Data.Steamid = proto.Uint64(m.steamID)
	responseHeader.Data.ClientSessionid = proto.Int32(m.sessionID)

	responseMsg := &protobuf.CMsgClientChangeStatus{
		PersonaState: proto.Uint32(uint32(steamprotocol.EPersonaState_Online)),
	}

	buf := new(bytes.Buffer)

	err := responseHeader.Serialize(buf)
	if err != nil {
		return errors.Wrap(err, "failed to serialize header")
	}

	body, err := proto.Marshal(responseMsg)
	if err != nil {
		return errors.Wrap(err, "failed to marshal response msg")
	}

	_, err = buf.Write(body)
	if err != nil {
		return errors.Wrap(err, "failed to append msg to buffer")
	}

	err = m.cl.Write(buf.Bytes())
	if err != nil {
		return errors.Wrap(err, "failed to write data")
	}

	return nil
}

repository: furdarius/steamprotocol

repo_name: furdarius/steamprotocol


text:
LICENSE = "GPL"
include module-init-tools_${PV}.bb
inherit cross
DEFAULT_PREFERENCE = "0"
PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.6"

PR="r3"

# When cross compiling depmod as shipped cannot handle endian
# differences between host and target, this fixes the problem.
# It also solves any possible issues with alignment (only likely
# if cross compiling for a low alignment target - e.g. x86, on
# a high alignment host - e.g. SPARC).
SRC_URI += " file://depmod-byteswap.patch;patch=1 "

EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"

do_stage () {
        oe_runmake install
}

do_install () {
        :
}

repository: BackupTheBerlios/openslug-svn

repo_name: BackupTheBerlios/openslug-svn


text:
// This file is part of Core WF which is licensed under the MIT license.
// See LICENSE file in the project root for full license information.

namespace CoreWf.Statements
{
    using System;
    using CoreWf;
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using CoreWf.Runtime.Collections;
    using Portable.Xaml.Markup;
    using CoreWf.Internals;

#if NET45
    using CoreWf.DynamicUpdate;
#endif

    [ContentProperty("Body")]
    public sealed class CancellationScope : NativeActivity
    {
        private Collection<Variable> variables;
        private readonly Variable<bool> suppressCancel;

        public CancellationScope()
            : base()
        {
            this.suppressCancel = new Variable<bool>();
        }

        public Collection<Variable> Variables
        {
            get
            {
                if (this.variables == null)
                {
                    this.variables = new ValidatingCollection<Variable>
                    {
                        // disallow null values
                        OnAddValidationCallback = item =>
                        {
                            if (item == null)
                            {
                                throw FxTrace.Exception.ArgumentNull(nameof(item));
                            }
                        }
                    };
                }
                return this.variables;
            }
        }

        [DefaultValue(null)]
        [DependsOn("Variables")]
        public Activity Body
        {
            get;
            set;
        }

        [DefaultValue(null)]
        [DependsOn("Body")]
        public Activity CancellationHandler
        {
            get;
            set;
        }

#if NET45
        protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity)
        {
            metadata.AllowUpdateInsideThisActivity();
        }
#endif

        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            metadata.AddChild(this.Body);
            metadata.AddChild(this.CancellationHandler);
            metadata.SetVariablesCollection(this.Variables);
            metadata.AddImplementationVariable(this.suppressCancel);
        }

        protected override void Execute(NativeActivityContext context)
        {
            if (this.Body != null)
            {
                context.ScheduleActivity(this.Body, new CompletionCallback(OnBodyComplete));
            }
        }

        private void OnBodyComplete(NativeActivityContext context, ActivityInstance completedInstance)
        {
            // Determine whether to run the Cancel based on whether the body
            // canceled rather than whether cancel had been requested.
            if (completedInstance.State == ActivityInstanceState.Canceled ||
                (context.IsCancellationRequested && completedInstance.State == ActivityInstanceState.Faulted))
            {
                // We don't cancel the cancel handler
                this.suppressCancel.Set(context, true);

                context.MarkCanceled();

                if (this.CancellationHandler != null)
                {
                    context.ScheduleActivity(this.CancellationHandler, onFaulted: new FaultCallback(OnExceptionFromCancelHandler));
                }
            }
        }

        protected override void Cancel(NativeActivityContext context)
        {
            bool suppressCancel = this.suppressCancel.Get(context);
            if (!suppressCancel)
            {
                context.CancelChildren();
            }
        }

        private void OnExceptionFromCancelHandler(NativeActivityFaultContext context, Exception propagatedException, ActivityInstance propagatedFrom)
        {
            this.suppressCancel.Set(context, false);
        }
    }
}

repository: ewinnington/corewf

repo_name: ewinnington/corewf

extension: cs


text:
package parser

import (
	"fmt"

	"github.com/young-steveo/thrash/ast"
	"github.com/young-steveo/thrash/token"
)

// Is infix parser
func Is(left ast.Expression, t *token.Token, l *token.List) ast.Expression {
	right, err := parseExpression(l, ASSIGNMENT)
	if err != nil {
		fmt.Println(`Failed parsing right hand assignment expression.`)
		return nil
	}
	return &ast.Assignment{Left: left, Op: t, Right: right}
}

repository: young-steveo/thrash

repo_name: young-steveo/thrash


text:
#include <fcntl.h>

#include "../shared/ipc.cpp"
#include "../shared/swtfb.cpp"

#include <linux/input.h>
#include <sys/poll.h>
#include <sys/prctl.h>
#include <unistd.h>

#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif

#include <cstdio>
#include <dlfcn.h>
#include <mutex>
#include <stdint.h>
#include <semaphore.h>
#include <thread>

#include <QCoreApplication>
#include <QTouchEvent>

using namespace swtfb;

int msg_q_id = 0x2257c;
ipc::Queue MSGQ(msg_q_id);

const int BYTES_PER_PIXEL = sizeof(uint16_t);

uint16_t *shared_mem;

void doUpdate(SwtFB &fb, const swtfb_update &s) {
  auto mxcfb_update = s.update;
  auto rect = mxcfb_update.update_region;

#ifdef DEBUG_DIRTY
  std::cerr << "Dirty Region: " << rect.left << " " << rect.top << " "
            << rect.width << " " << rect.height << endl;
#endif

  // There are three update modes on the rm2. But they are mapped to the five
  // rm1 modes as follows:
  //
  // 0: init (same as GL16)
  // 1: DU - direct update, fast
  // 2: GC16 - high fidelity (slow)
  // 3: GL16 - what the rm is using
  // 8: highlight (same as high fidelity)

  int waveform = mxcfb_update.waveform_mode;
  if (waveform > 3 && waveform != 8) {
    waveform = 3;
    fb.ClearGhosting();
  }

  if (waveform < 0) {
    waveform = 3;
    fb.ClearGhosting();
  }

  // full = 1, partial = 0
  auto update_mode = mxcfb_update.update_mode;

  auto flags = update_mode & 0x1;

  // TODO: Get sync from client (wait for second ioctl? or look at stack?)
  // There are only two occasions when the original rm1 library sets sync to
  // true. Currently we detect them by the other data. Ideally we should
  // correctly handle the corresponding ioctl (empty rect and flags == 2?).
  if (waveform == /*init*/ 0 && update_mode == /* full */ 1) {
    flags |= 2;
    std::cerr << "SERVER: sync" << std::endl;
  } else if (rect.left == 0 && rect.top > 1800 &&
             waveform == /* grayscale */ 3 && update_mode == /* full */ 1) {
    std::cerr << "server sync, x2: " << rect.width << " y2: " << rect.height
              << std::endl;
    flags |= 2;
  }

  if (waveform == /* fast */ 1 && update_mode == /* partial */ 0) {
    // fast draw
    flags = 4;
  }

#ifdef DEBUG
  std::cerr << "doUpdate " << endl;
  cerr << "mxc: waveform_mode " << mxcfb_update.waveform_mode << endl;
  cerr << "mxc: update mode " << mxcfb_update.update_mode << endl;
  cerr << "mxc: update marker " << mxcfb_update.update_marker << endl;
  cerr << "final: waveform " << waveform;
  cerr << " flags " << flags << endl << endl;
#endif

  fb.DrawRaw(rect.left, rect.top, rect.width, rect.height, waveform, flags);
}

extern "C" {
// QImage(width, height, format)
static void (*qImageCtor)(void *that, int x, int y, int f) = 0;
// QImage(uchar*, width, height, bytesperline, format)
static void (*qImageCtorWithBuffer)(void *that, uint8_t *, int32_t x, int32_t y,
                                    int32_t bytes, int format, void (*)(void *),
                                    void *) = 0;

static void _libhook_init() __attribute__((constructor));
static void _libhook_init() {
  shared_mem = ipc::get_shared_buffer();

  qImageCtor = (void (*)(void *, int, int, int))dlsym(
      RTLD_NEXT, "_ZN6QImageC1EiiNS_6FormatE");
  qImageCtorWithBuffer = (void (*)(
      void *, uint8_t *, int32_t, int32_t, int32_t, int, void (*)(void *),
      void *))dlsym(RTLD_NEXT, "_ZN6QImageC1EPhiiiNS_6FormatEPFvPvES2_");
}

bool FIRST_ALLOC = true;
void _ZN6QImageC1EiiNS_6FormatE(void *that, int x, int y, int f) {
  if (x == WIDTH && y == HEIGHT && FIRST_ALLOC) {
    fprintf(stderr, "REPLACING THE IMAGE with shared memory\n");

    FIRST_ALLOC = false;
    qImageCtorWithBuffer(that, (uint8_t *)shared_mem, WIDTH, HEIGHT,
                         WIDTH * BYTES_PER_PIXEL, f, nullptr, nullptr);
    return;
  }
  qImageCtor(that, x, y, f);
}

int server_main(int, char **, char **) {
  SwtFB fb;

  printf("WAITING FOR SEND UPDATE ON MSG Q\n");
  while (true) {
    auto buf = MSGQ.recv();
    switch (buf.mtype) {
    case ipc::UPDATE_t:
      doUpdate(fb, buf);
      break;
    case ipc::XO_t: {
      int width = buf.xochitl_update.x2 - buf.xochitl_update.x1 + 1;
      int height = buf.xochitl_update.y2 - buf.xochitl_update.y1 + 1;
      QRect rect(buf.xochitl_update.x1, buf.xochitl_update.y1, width, height);
      fb.SendUpdate(rect, buf.xochitl_update.waveform,
                    buf.xochitl_update.flags);
    } break;
    case ipc::WAIT_t: {
      fb.WaitForLastUpdate();
      sem_t* sem = sem_open(buf.wait_update.sem_name, O_CREAT, 0644, 0);
      if (sem != NULL) {
        sem_post(sem);
        sem_close(sem);
      }
    } break;

    default:
      std::cerr << "Error, unknown message type" << std::endl;
    }
  }
}

int __libc_start_main(int (*)(int, char **, char **), int argc,
                      char **argv, int (*init)(int, char **, char **),
                      void (*fini)(void), void (*rtld_fini)(void),
                      void *stack_end) {

  printf("STARTING RM2FB\n");

  auto func_main =
      (decltype(&__libc_start_main))dlsym(RTLD_NEXT, "__libc_start_main");

  // Since we preload the library in the Xochitl binary, the process will
  // be called 'xochitl' by default. Change this to avoid confusing launchers
  const char* proc_name = "rm2fb-server";
  size_t argv0_len = strlen(argv[0]);
  strncpy(argv[0], proc_name, argv0_len);
  argv[0][argv0_len] = 0;
  prctl(PR_SET_NAME, proc_name);

  return func_main(server_main, argc, argv, init, fini, rtld_fini, stack_end);
};
};

extension: cpp


text:
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
  "CXX"
  )
# The set of files for implicit dependencies of each language:
set(CMAKE_DEPENDS_CHECK_CXX
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CommonCxxTests.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/CommonCxxTests.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestAmoebaMinimizer.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestAmoebaMinimizer.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestArrayLookup.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestArrayLookup.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestConditionVariable.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestConditionVariable.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestDataArray.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestDataArray.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestDataArrayComponentNames.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestDataArrayComponentNames.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestDirectory.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestDirectory.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestFastNumericConversion.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestFastNumericConversion.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestGarbageCollector.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestGarbageCollector.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestMath.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestMath.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestMatrix3x3.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestMatrix3x3.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestMinimalStandardRandomSequence.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestMinimalStandardRandomSequence.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestNew.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestNew.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestObjectFactory.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestObjectFactory.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestObservers.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestObservers.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestPolynomialSolversUnivariate.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestPolynomialSolversUnivariate.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestSmartPointer.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestSmartPointer.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestSortDataArray.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestSortDataArray.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestSystemInformation.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestSystemInformation.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestUnicodeStringAPI.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestUnicodeStringAPI.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestUnicodeStringArrayAPI.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestUnicodeStringArrayAPI.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestVariantComparison.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestVariantComparison.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/TestWeakPointer.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/TestWeakPointer.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/otherArrays.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/otherArrays.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/otherByteSwap.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/otherByteSwap.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/otherLookupTable.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/otherLookupTable.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/otherLookupTableWithEnabling.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/otherLookupTableWithEnabling.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/otherStringArray.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/otherStringArray.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/otherTimerLog.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/otherTimerLog.cxx.o"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/vtkTestNewVar.cxx" "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/Testing/Cxx/CMakeFiles/CommonCxxTests.dir/vtkTestNewVar.cxx.o"
  )
set(CMAKE_CXX_COMPILER_ID "GNU")

# Preprocessor definitions for this target.
set(CMAKE_TARGET_DEFINITIONS_CXX
  "VTK_IN_VTK"
  )

# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
  "."
  "Common"
  "Utilities"
  "Utilities/vtkalglib"
  "Infovis"
  "IO"
  "Imaging"
  "Graphics"
  "GenericFiltering"
  "Filtering"
  "Common/Testing/Cxx"
  "Utilities/vtklibproj4"
  "Utilities/DICOMParser"
  "Utilities/vtkfreetype/include"
  "Utilities/MaterialLibrary"
  "Utilities/verdict"
  "Utilities/vtkhdf5"
  "Utilities/vtkhdf5/src"
  "Utilities/utf8/source"
  "Utilities/ftgl/src"
  "Utilities/ftgl"
  )

# Targets to which this target links.
set(CMAKE_TARGET_LINKED_INFO_FILES
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Common/CMakeFiles/vtkCommon.dir/DependInfo.cmake"
  "/home/chris/crimson/petsc/vtk/vtk-v5.8.0/Utilities/kwsys/CMakeFiles/vtksys.dir/DependInfo.cmake"
  )

# Fortran module output directory.
set(CMAKE_Fortran_TARGET_MODULE_DIR "")

extension: cmake


text:
package storages

import (
	"github.com/ksensehq/eventnative/adapters"
	"github.com/ksensehq/eventnative/schema"
)

//Store files to aws s3 in batch mode
type S3 struct {
	name            string
	s3Adapter       *adapters.S3
	schemaProcessor *schema.Processor
	breakOnError    bool
}

func NewS3(name string, s3Config *adapters.S3Config, processor *schema.Processor, breakOnError bool) (*S3, error) {
	s3Adapter, err := adapters.NewS3(s3Config)
	if err != nil {
		return nil, err
	}

	s3 := &S3{
		name:            name,
		s3Adapter:       s3Adapter,
		schemaProcessor: processor,
		breakOnError:    breakOnError,
	}

	return s3, nil
}

//Store file from byte payload to s3 with processing
func (s3 *S3) Store(fileName string, payload []byte) error {
	flatData, err := s3.schemaProcessor.ProcessFilePayload(fileName, payload, s3.breakOnError)
	if err != nil {
		return err
	}

	for _, fdata := range flatData {
		err := s3.s3Adapter.UploadBytes(fdata.FileName+tableFileKeyDelimiter+fdata.DataSchema.Name, fdata.GetPayloadBytes())
		if err != nil {
			return err
		}
	}

	return nil
}

func (s3 *S3) Name() string {
	return s3.name
}

func (s3 *S3) Type() string {
	return "S3"
}

func (s3 *S3) Close() error {
	return nil
}

repository: nabdtran/eventnative

repo_name: nabdtran/eventnative


text:
# Robin Sebastian (https://github.com/robseb) (git@robseb.de) 2019-2021

SUMMARY = "Tool to load a new FPGA Configuration for Intel SoC-FPGAs"
DESCRIPTION = "Tool to change via the Intel FPGA Manger the FPGA configuration of a Intel SoC-FPGA"
SECTION = "rstools"
LICENSE = "GPL-2"
PR = "r0"
LIC_FILES_CHKSUM = "file://CHECKSUMFILE;md5=bff2b7959c4b3958a8ae19f6a39a59ac"
SRC_URI = "gitsm://github.com/robseb/rstoolsCY5.git;protocol=https"
SRCREV = "${AUTOREV}"

# This Version is for the Intel Cyclone V SoC-FPGA
COMPATIBLE_MACHINE = 'cyclone5'

inherit cmake

S = "${WORKDIR}/git/FPGA-writeConfig"
FILES_${PN} += "${bindir}"

do_install() {
    install -d ${D}${bindir}
    install -m 0755 FPGA-writeConfig ${D}${bindir}
}

repository: BobAfwata/meta-intelfpga

repo_name: BobAfwata/meta-intelfpga


text:
IF(NOT STM32Cube_DIR)
    SET(STM32Cube_DIR "/opt/STM32Cube_FW_F1_V1.2.0")
    MESSAGE(STATUS "No STM32Cube_DIR specified, using default: " ${STM32Cube_DIR})
ENDIF()

SET(USBDevice_SRC
    Core/Src/usbd_ctlreq.c
    Core/Src/usbd_core.c
    Core/Src/usbd_ioreq.c
#    Core/Src/usbd_conf_template.c
)

SET(USBDevice_INC
    Core/Inc/usbd_ctlreq.h
    Core/Inc/usbd_ioreq.h
    Core/Inc/usbd_core.h
#    Core/Inc/usbd_conf_template.h
    Core/Inc/usbd_def.h
)

SET(USBDevice_COMPONENTS CDC DFU AUDIO Template MSC HID CustomHID)

SET(USBDevice_COMPONENTS_CDC_HEADERS
    Class/CDC/Inc/usbd_cdc.h
#    Class/CDC/Inc/usbd_cdc_if_template.h
)
SET(USBDevice_COMPONENTS_CDC_SOURCES
    Class/CDC/Src/usbd_cdc.c
#    Class/CDC/Src/usbd_cdc_if_template.c
)

SET(USBDevice_COMPONENTS_DFU_HEADERS
#    Class/DFU/Inc/usbd_dfu_media_template.h
    Class/DFU/Inc/usbd_dfu.h
)
SET(USBDevice_COMPONENTS_DFU_SOURCES
    Class/DFU/Src/usbd_dfu.c
#    Class/DFU/Src/usbd_dfu_media_template.c
)

SET(USBDevice_COMPONENTS_AUDIO_HEADERS
    Class/AUDIO/Inc/usbd_audio.h
#    Class/AUDIO/Inc/usbd_audio_if_template.h
)
SET(USBDevice_COMPONENTS_AUDIO_SOURCES
#    Class/AUDIO/Src/usbd_audio_if_template.c
    Class/AUDIO/Src/usbd_audio.c
)

SET(USBDevice_COMPONENTS_Template_HEADERS
    Class/Template/Inc/usbd_template.h
)
SET(USBDevice_COMPONENTS_Template_SOURCES
    Class/Template/Src/usbd_template.c
)

SET(USBDevice_COMPONENTS_MSC_HEADERS
    Class/MSC/Inc/usbd_msc_scsi.h
#    Class/MSC/Inc/usbd_msc_storage_template.h
    Class/MSC/Inc/usbd_msc_data.h
    Class/MSC/Inc/usbd_msc.h
    Class/MSC/Inc/usbd_msc_bot.h
)
SET(USBDevice_COMPONENTS_MSC_SOURCES
    Class/MSC/Src/usbd_msc.c
    Class/MSC/Src/usbd_msc_data.c
    Class/MSC/Src/usbd_msc_bot.c
    Class/MSC/Src/usbd_msc_scsi.c
#    Class/MSC/Src/usbd_msc_storage_template.c
)

SET(USBDevice_COMPONENTS_HID_HEADERS
    Class/HID/Inc/usbd_hid.h
)
SET(USBDevice_COMPONENTS_HID_SOURCES
    Class/HID/Src/usbd_hid.c
)

SET(USBDevice_COMPONENTS_CustomHID_HEADERS
#    Class/CustomHID/Inc/usbd_customhid_if_template.h
    Class/CustomHID/Inc/usbd_customhid.h
)
SET(USBDevice_COMPONENTS_CustomHID_SOURCES
    Class/CustomHID/Src/usbd_customhid.c
#    Class/CustomHID/Src/usbd_customhid_if_template.c
)

IF(NOT USBDevice_FIND_COMPONENTS)
    SET(USBDevice_FIND_COMPONENTS ${USBDevice_COMPONENTS})
    MESSAGE(STATUS "No USBDevice components selected, using all: ${USBDevice_FIND_COMPONENTS}")
ENDIF()

FOREACH(cmp ${USBDevice_FIND_COMPONENTS})
    LIST(FIND USBDevice_COMPONENTS ${cmp} USBDevice_FOUND_INDEX)
    IF(${USBDevice_FOUND_INDEX} LESS 0)
        MESSAGE(FATAL_ERROR "Unknown USBDevice component: ${cmp}. Available components: ${USBDevice_COMPONENTS}")
    ENDIF()
    LIST(FIND USBDevice_COMPONENTS ${cmp} USBDevice_FOUND_INDEX)
    IF(NOT (${USBDevice_FOUND_INDEX} LESS 0))
        LIST(APPEND USBDevice_INC ${USBDevice_COMPONENTS_${cmp}_HEADERS})
        LIST(APPEND USBDevice_SRC ${USBDevice_COMPONENTS_${cmp}_SOURCES})
    ENDIF()
ENDFOREACH()

LIST(REMOVE_DUPLICATES USBDevice_INC)
LIST(REMOVE_DUPLICATES USBDevice_SRC)

FOREACH(INC ${USBDevice_INC})
    SET(INC_FILE INC_FILE-NOTFOUND)
    GET_FILENAME_COMPONENT(INC_FILE ${STM32Cube_DIR}/Middlewares/ST/STM32_USB_Device_Library/${INC} DIRECTORY)
    MESSAGE(STATUS "Found ${INC}: ${INC_FILE}")
    LIST(APPEND USBDevice_INCLUDE_DIR ${INC_FILE})
ENDFOREACH()
LIST(REMOVE_DUPLICATES USBDevice_INCLUDE_DIR)

FOREACH(SRC ${USBDevice_SRC})
    SET(SRC_FILE SRC_FILE-NOTFOUND)
    FIND_FILE(SRC_FILE ${SRC}
        HINTS ${STM32Cube_DIR}/Middlewares/ST/STM32_USB_Device_Library
        CMAKE_FIND_ROOT_PATH_BOTH
    )
    MESSAGE(STATUS "Found ${SRC}: ${SRC_FILE}")
    LIST(APPEND USBDevice_SOURCES ${SRC_FILE})
ENDFOREACH()

INCLUDE(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(USBDevice DEFAULT_MSG USBDevice_INCLUDE_DIR USBDevice_SOURCES)

gha_language: C


text:
#
# base recipe: meta-qt5/recipes-qt/qt5/qtbase-native_5.3.2.bb
# base commit: c9a1041cb956d94c04cbf635b00ca19725ffc129
#

require qtbase-opensource-src.inc

DEPENDS = "zlib-native dbus-native"
QT_MODULE = "qtbase"

inherit native

SRC_URI += " \
    file://0011-Always-build-uic.patch \
    file://0012-Add-external-hostbindir-option-for-native-sdk.patch \
"

QT_CONF_PATH = "${B}/qt.conf"

do_generate_qt_config_file() {
	:
}

PACKAGECONFIG_CONFARGS = " \
    -prefix ${prefix} \
    -sysroot ${STAGING_DIR_NATIVE} \
    -no-gcc-sysroot \
    -system-zlib \
    -no-libjpeg \
    -no-libpng \
    -no-gif \
    -no-accessibility \
    -no-cups \
    -no-gui \
    -no-qml-debug \
    -no-sql-mysql \
    -no-sql-sqlite \
    -no-opengl \
    -no-openssl \
    -no-xcb \
    -no-xcb-xlib \
    -no-icu \
    -verbose \
    -release \
    -prefix ${OE_QMAKE_PATH_PREFIX} \
    -bindir ${OE_QMAKE_PATH_BINS} \
    -libdir ${OE_QMAKE_PATH_LIBS} \
    -headerdir ${OE_QMAKE_PATH_HEADERS} \
    -archdatadir ${OE_QMAKE_PATH_ARCHDATA} \
    -datadir ${OE_QMAKE_PATH_DATA} \
    -docdir ${OE_QMAKE_PATH_DOCS} \
    -sysconfdir ${OE_QMAKE_PATH_SETTINGS} \
    -no-glib \
    -no-iconv \
    -silent \
    -nomake examples \
    -nomake tests \
    -no-rpath \
    -platform linux-oe-g++ \
"

do_configure_prepend() {
	MAKEFLAGS="${PARALLEL_MAKE}" ${S}/configure -opensource -confirm-license ${PACKAGECONFIG_CONFARGS} || die "Configuring qt failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
	bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. EXTRA_OECONF was ${EXTRA_OECONF}"
}

do_install() {
	# Fix install paths for all
	find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"

	oe_runmake install INSTALL_ROOT=${D}

	if [ -d ${D}${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE} ] ; then
		echo "Some files are installed in wrong directory ${D}${STAGING_DIR_NATIVE}"
		cp -ra ${D}${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE}/* ${D}${STAGING_DIR_NATIVE}
		rm -rf ${D}${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE}
		# remove empty dirs
		TMP=`dirname ${D}/${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE}`
		while test ${TMP} != ${D}${STAGING_DIR_NATIVE}; do
			rmdir ${TMP}
			TMP=`dirname ${TMP}`;
		done
	fi

	# for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
	# e.g. qt3d, qtwayland
	ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
}

PROVIDES += "qtbase-native"

repository: meta-debian/meta-debian-extra

repo_name: meta-debian/meta-debian-extra

branch_name: refs/heads/morty

gha_language: BitBake


text:
package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
	"strconv"
)

func main() {
	file, err := os.Open("../myInput.txt")
	if err != nil {
		log.Fatal(err)
	}
	defer file.Close()

	scanner := bufio.NewScanner(file)

	sum := 0

	for scanner.Scan() {
		line := scanner.Text()
		i, err := strconv.Atoi(line)
		if err != nil {
			log.Fatal(err)
		}
		sum = sum + i
		/* thanks jassler for pointing out atom takes sign into account :)
		if line[0] == '+' {
			sum = sum + i
		} else if line[0] == '-' {
			sum = sum - i
		} else {
			fmt.Println("error")
		}
		*/
	}
	fmt.Println(sum)

	if err := scanner.Err(); err != nil {
		log.Fatal(err)
	}
}

url: https://raw.githubusercontent.com/IdrisTheDragon/AdventOfCode2018/3a81063e127c782966db60b64d756d11afcd093b/Day 01 Chronal Calibration/Part 1/main.go

gha_language: Go


text:
DESCRIPTION = "CMU PocketSphinx - speech recognition engine for handhelds"
HOMEPAGE = "http://www.speech.cs.cmu.edu/pocketsphinx/"
LICENSE = "BSD"
DEPENDS = "sphinxbase"

SRC_URI = "${SOURCEFORGE_MIRROR}/cmusphinx/${PN}-${PV}.tar.bz2 \
           file://cross-compile.patch"

inherit autotools

do_configure () {
    CPPFLAGS="-I${STAGING_INCDIR}/sphinxbase" oe_runconf
}

SRC_URI[md5sum] = "8c1bc9d5bdd6f6298222125669d16e1e"
SRC_URI[sha256sum] = "5a31aa10668b93e8283c58592b46368c26aa92e097cea0bda9b0554042bd6643"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
require recipes/uhd/uhd.inc

PR = "${INC_PR}.2"

SRC_URI = "git://ettus.sourcerepo.com/ettus/uhd.git;protocol=git"
S = "${WORKDIR}/git/host"

SRCREV = "cc639e876f326e958dace8438ae41b8cd9563780"


text:
@inproceedings{Henderson2018,
    abstract = {In recent years, significant progress has been made in solving challenging problems across various domains using deep reinforcement learning (RL). Reproducing existing work and accurately judging the improvements offered by novel methods is vital to sustaining this progress. Unfortunately, reproducing results for state-of-the-art deep RL methods is seldom straightforward. In particular, non-determinism in standard benchmark environments, combined with variance intrinsic to the methods, can make reported results tough to interpret. Without significance metrics and tighter standardization of experimental reporting, it is difficult to determine whether improvements over the prior state-of-the-art are meaningful. In this paper, we investigate challenges posed by reproducibility, proper experimental techniques, and reporting procedures. We illustrate the variability in reported metrics and results when comparing against common baselines and suggest guidelines to make future results in deep RL more reproducible. We aim to spur discussion about how to ensure continued progress in the field by minimizing wasted effort stemming from results that are non-reproducible and easily misinterpreted.},
    archivePrefix = {arXiv},
    arxivId = {1709.06560},
    author = {Henderson, Peter and Islam, Riashat and Bachman, Philip and Pineau, Joelle and Precup, Doina and Meger, David},
    booktitle = {32nd AAAI Conference on Artificial Intelligence, AAAI 2018},
    eprint = {1709.06560},
    file = {:Users/redleader/Desktop/Projet de lecture dirig {\' {e}} 2019 - Luc Coupal/Travail Pratique/Applied DRL/Method, Technic {\&} know how/★ ★ ★ | Deep Reinforcement Learning that Matters.pdf:pdf},
    isbn = {9781577358008},
    pages = {3207--3214},
    url = {https://arxiv.org/abs/1709.06560},
    title = {Deep reinforcement learning that matters},
    year = {2018}
}
@article{Plappert2017,
    abstract = {Deep reinforcement learning (RL) methods generally engage in exploratory behavior through noise injection in the action space. An alternative is to add noise directly to the agent's parameters, which can lead to more consistent exploration and a richer set of behaviors. Methods such as evolutionary strategies use parameter perturbations, but discard all temporal structure in the process and require significantly more samples. Combining parameter noise with traditional RL methods allows to combine the best of both worlds. We demonstrate that both off- and on-policy methods benefit from this approach through experimental comparison of DQN, DDPG, and TRPO on high-dimensional discrete action environments as well as continuous control tasks. Our results show that RL with parameter noise learns more efficiently than traditional RL with action space noise and evolutionary strategies individually.},
    archivePrefix = {arXiv},
    arxivId = {1706.01905},
    author = {Plappert, Matthias and Houthooft, Rein and Dhariwal, Prafulla and Sidor, Szymon and Chen, Richard Y. and Chen, Xi and Asfour, Tamim and Abbeel, Pieter and Andrychowicz, Marcin},
    eprint = {1706.01905},
    file = {:Users/redleader/Desktop/Projet de lecture dirig {\' {e}} 2019 - Luc Coupal/Lecture dirig {\' {e}} - lit {\' {e}} rature/depth knowledge/Fondation/Model-Free (Dynamique inconnue)/Policy optimization/⚠ | Non-referenced in project proposal/Parameter space noise for exploration.pdf:pdf},
    pages = {1--18},
    title = {Parameter Space Noise for Exploration},
    url = {http://arxiv.org/abs/1706.01905},
    year = {2017}
}

@article{Duan2016,
    abstract = {Recently, researchers have made significant progress combining the advances in deep learning for learning feature representations with reinforcement learning. Some notable examples include training agents to play Atari games based on raw pixel data and to acquire advanced manipulation skills using raw sensory inputs. However, it has been difficult to quantify progress in the domain of continuous control due to the lack of a commonly adopted benchmark. In this work, we present a benchmark suite of continuous control tasks, including classic tasks like cart-pole swing-up, tasks with very high state and action dimensionality such as 3D humanoid locomotion, tasks with partial observations, and tasks with hierarchical structure. We report novel findings based on the systematic evaluation of a range of implemented reinforcement learning algorithms. Both the benchmark and reference implementations are released at https://github.com/rllab/rllab in order to facilitate experimental reproducibility and to encourage adoption by other researchers.},
    archivePrefix = {arXiv},
    arxivId = {arXiv:1604.06778v3},
    author = {Duan, Yan and Chen, Xi and Houthooft, Rein and Schulman, John and Abbeel, Pieter},
    eprint = {arXiv:1604.06778v3},
    file = {:Users/redleader/Desktop/Projet de lecture dirig {\' {e}} 2019 - Luc Coupal/Lecture dirig {\' {e}} - lit {\' {e}} rature/depth knowledge/Fondation/Model-Free (Dynamique inconnue)/Policy optimization/⚠ | Non-referenced in project proposal/Benchmarking Deep Reinforcement Learning for Continuous Control.pdf:pdf},
    isbn = {9781510829008},
    journal = {33rd International Conference on Machine Learning, ICML 2016},
    pages = {2001--2014},
    title = {Benchmarking deep reinforcement learning for continuous control},
    url = {https://arxiv.org/abs/1604.06778},
    volume = {3},
    year = {2016}
}

@article{Schulman2015a,
    abstract = {We describe an iterative procedure for optimizing policies, with guaranteed monotonic improvement. By making several approximations to the theoretically-justified procedure, we develop a practical algorithm, called Trust Region Policy Optimization (TRPO). This algorithm is similar to natural policy gradient methods and is effective for optimizing large nonlinear policies such as neural networks. Our experiments demonstrate its robust performance on a wide variety of tasks: learning simulated robotic swimming, hopping, and walking gaits; and playing Atari games using images of the screen as input. Despite its approximations that deviate from the theory, TRPO tends to give monotonic improvement, with little tuning of hyperparameters.},
    archivePrefix = {arXiv},
    arxivId = {1502.05477},
    author = {Schulman, John and Levine, Sergey and Moritz, Philipp and Jordan, Michael I. and Abbeel, Pieter},
    eprint = {1502.05477},
    file = {:Users/redleader/Desktop/Projet de lecture dirig {\' {e}} 2019 - Luc Coupal/Lecture dirig {\' {e}} - lit {\' {e}} rature/depth knowledge/Fondation/Model-Free (Dynamique inconnue)/Policy optimization/TRPO - Trust Region Policy Optimization.pdf:pdf},
    title = {Trust Region Policy Optimization},
    url = {http://arxiv.org/abs/1502.05477},
    year = {2015}
}

@article{Amiranashvili2018,
    abstract = {Our understanding of reinforcement learning (RL) has been shaped by theoretical and empirical results that were obtained decades ago using tabular representations and linear function approximators. These results suggest that RL methods that use temporal differencing (TD) are superior to direct Monte Carlo estimation (MC). How do these results hold up in deep RL, which deals with perceptually complex environments and deep nonlinear models? In this paper, we re-examine the role of TD in modern deep RL, using specially designed environments that control for specific factors that affect performance, such as reward sparsity, reward delay, and the perceptual complexity of the task. When comparing TD with infinite-horizon MC, we are able to reproduce classic results in modern settings. Yet we also find that finite-horizon MC is not inferior to TD, even when rewards are sparse or delayed. This makes MC a viable alternative to TD in deep RL.},
    archivePrefix = {arXiv},
    arxivId = {1806.01175},
    author = {Amiranashvili, Artemij and Dosovitskiy, Alexey and Koltun, Vladlen and Brox, Thomas},
    eprint = {1806.01175},
    file = {:Users/redleader/Desktop/Projet de lecture dirig {\' {e}} 2019 - Luc Coupal/Lecture dirig {\' {e}} - lit {\' {e}} rature/depth knowledge/Fondation/RL vs DRL (Optional)/TD OR NOT TD - in DRL.pdf:pdf},
    number = {2016},
    pages = {1--14},
    title = {TD or not TD: Analyzing the Role of Temporal Differencing in Deep Reinforcement Learning},
    url = {http://arxiv.org/abs/1806.01175},
    year = {2018}
}

gha_language: JavaScript

extension: bib


text:
#
# base-recipe: meta-debian/recipes-debian/systemd/systemd_debian.bb
# base-branch: jethro
#
SUMMARY = "A System and service manager"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"

# Override value of DEBIAN_GIT_BRANCH variable in debian-package class
DEBIAN_GIT_BRANCH = "jessie-backports-master"

LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = " \
file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
"
PROVIDES = "udev"

inherit debian-package
PV = "230"

inherit pkgconfig autotools useradd python3native

SRC_URI += "file://0001-Add-include-macro.h-to-mtd_probe.h.patch \
            file://0002-Dont-build-manpages-to-reduce-dependency.patch"

DEPENDS = "intltool-native \
           gperf-native \
           libcap \
           dbus \
           glib-2.0 \
           acl \
           xz-utils \
           libgcrypt \
           kmod \
           util-linux \
           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \
           python3-lxml-native \
          "

# These options are almost same as CONFFLAGS in debian/rules.
# Other target specific CONFFLAGS in debian/rules are ignored.
DEBIAN_CONFOPTS = "\
         --with-rootprefix=${base_prefix} \
                   --with-rootlibdir=${base_libdir} \
                   --with-ntp-servers="" \
                   --with-dns-servers="" \
                   --with-system-uid-max=999 \
                   --with-system-gid-max=999 \
                   --enable-coredump \
                   --with-kbd-loadkeys=${base_bindir}/loadkeys \
                   --with-kbd-setfont=${base_bindir}/setfont \
                   --without-kill-user-processes \
                   --enable-split-usr \
                   --disable-qrencode \
                   --disable-vconsole \
                   --disable-firstboot \
                   --disable-xkbcommon \
                   --disable-libiptc \
                   PYTHON="${PYTHON}" \
                  "

# --enable-dependency-tracking:
#   avoid compile error "Cannot open src/*/org.freedesktop.*.policy"
# --disable-selinux: Disable selinux support
EXTRA_OECONF = "${DEBIAN_CONFOPTS} \
                ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
                --disable-manpages \
                --disable-selinux \
                --enable-dependency-tracking \
                --disable-libcryptsetup \
                --enable-efi \
                --enable-hwdb \
                --enable-sysusers \
               "
CACHED_CONFIGUREVARS += "ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
                         ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
                         ac_cv_path_KEXEC=${sbindir}/kexec \
                         ac_cv_path_KILL=${base_bindir}/kill \
                         ac_cv_path_KMOD=${base_bindir}/kmod \
                         ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
                         ac_cv_path_QUOTAON=${sbindir}/quotaon \
                         ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
                         "
do_configure_prepend() {
	export NM="${HOST_PREFIX}gcc-nm"
	export AR="${HOST_PREFIX}gcc-ar"
	export RANLIB="${HOST_PREFIX}gcc-ranlib"
}

# append debian extra files and remove unneeded files
do_install_append() {
	# systemd package: setup base_bindir
	ln -s ${base_libdir}/systemd/systemd ${D}${base_bindir}
	# systemd package: setup sysconfdir
	ln -s ../modules ${D}${sysconfdir}/modules-load.d/modules.conf
	ln -s ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
	for dir in binfmt.d kernel tmpfiles.d; do
		rm -r ${D}${sysconfdir}/${dir}
	done
	rm ${D}${sysconfdir}/init.d/README

	for name in system-shutdown system-sleep systemd-update-done; do
		rm -r ${D}${base_libdir}/systemd/${name}
	done
	# systemd package: setup bindir
	rm ${D}${bindir}/kernel-install
	# systemd package: setup libdir
	for dir in binfmt.d kernel modules-load.d rpm \
	           systemd/network systemd/user-generators \
	           tmpfiles.d/etc.conf; do
		rm -r ${D}${libdir}/${dir}
	done

	mv ${D}${datadir}/zsh/site-functions \
		${D}${datadir}/zsh/vendor-completions
	rm ${D}${datadir}/zsh/vendor-completions/_kernel-install
	# systemd package: remove localstatedir
	rm -r ${D}${localstatedir}
	for service in x11-common hostname rmnologin bootmisc fuse bootlogd \
	               stop-bootlogd-single stop-bootlogd hwclock mountkernfs \
	               mountdevsubfs mountall mountall-bootclean mountnfs mountnfs-bootclean \
	               umountfs umountnfs umountroot checkfs checkroot checkroot-bootclean \
	               cryptdisks cryptdisks-early single killprocs sendsigs halt reboot \
	               rc rcS motd bootlogs; do
		ln -s /dev/null ${D}${systemd_system_unitdir}/${service}.service
	done

	install -d ${D}${systemd_system_unitdir}/getty.target.wants \
	           ${D}${libdir}/systemd/user-generators
	ln -s ../getty-static.service ${D}${systemd_system_unitdir}/getty.target.wants
	ln -s systemd-modules-load.service ${D}${systemd_system_unitdir}/kmod.service
	ln -s systemd-modules-load.service \
		${D}${systemd_system_unitdir}/module-init-tools.service
	install -d ${D}${systemd_system_unitdir}/networking.service.d
	ln -s systemd-sysctl.service ${D}${systemd_system_unitdir}/procps.service
	ln -s rc-local.service ${D}${systemd_system_unitdir}/rc.local.service
	ln -s systemd-random-seed.service ${D}${systemd_system_unitdir}/urandom.service
	ln -s ${D}${systemd_system_unitdir}/user-generators/systemd-dbus1-generator \
	      ${D}${libdir}/systemd/user-generators/systemd-dbus1-generator
	# fix location of NSS modules follow debian/rules
	for f in ${D}${libdir}/libnss_*; do mv $f ${D}${base_libdir}; done

	# udev package
	install -d ${D}${sysconfdir}/init.d
	install -m 0755 ${S}/debian/udev.init ${D}${sysconfdir}/init.d/udev
	install -d ${D}${base_libdir}/modprobe.d
	install -m 0644 ${S}/debian/extra/fbdev-blacklist.conf \
		${D}${base_libdir}/modprobe.d/fbdev-blacklist.conf
	install -d ${D}${systemd_system_unitdir}/sysinit.target.wants
	ln -s systemd-udevd.service \
		${D}${systemd_system_unitdir}/udev.service
	install -d ${D}${base_sbindir}
	ln -s ${base_bindir}/udevadm ${D}${base_sbindir}
	ln -s ${base_libdir}/systemd/systemd-udevd ${D}${base_sbindir}/udevd

	# ship test-udev, so that we have it for autopkgtests
	if [ -e ${B}/.libs/test-udev ]; then
		install -D -m 0755 ${B}/.libs/test-udev ${D}${libdir}/udev/test-udev
	else
		install -D -m 0755 ${B}/test-udev ${D}${libdir}/udev/test-udev
	fi

	# follow debian/udev.install
	cp -r ${S}/debian/extra/initramfs-tools ${D}${datadir}
	cp -r ${S}/debian/extra/rules/*.rules ${D}${base_libdir}/udev/rules.d/

	install -D -m 0644 ${S}/debian/udev.upstart \
	                   ${D}${sysconfdir}/init/udev.conf
	install -m 0644 ${S}/debian/udev.udevmonitor.upstart \
	                ${D}${sysconfdir}/init/udevmonitor.conf
	install -m 0644 ${S}/debian/udev.udevtrigger.upstart \
	                ${D}${sysconfdir}/init/udevtrigger.conf

	# follow debian/udev-udev.dirs
	install -d ${D}${sysconfdir}/udev/rules.d

	#follow debian/systemd.install
	install -d ${D}${base_libdir}/lsb \
	           ${D}${sysconfdir}/dhcp
	cp -r ${S}/debian/extra/init-functions.d ${D}${base_libdir}/lsb/
	cp -r ${S}/debian/extra/tmpfiles.d/*.conf ${D}${libdir}/tmpfiles.d/
	cp -r ${S}/debian/extra/systemd-sysv-install ${D}${base_libdir}/systemd/
	cp -r ${S}/debian/extra/units/* ${D}${systemd_system_unitdir}/
	cp -r ${S}/debian/extra/dhclient-exit-hooks.d \
	      ${D}${sysconfdir}/dhcp/

	# systemd-sysv
	ln -s ../${base_libdir}/systemd/systemd  ${D}${base_sbindir}/init
	ln -s ../${base_bindir}/systemctl ${D}${base_sbindir}/halt
	ln -s ../${base_bindir}/systemctl ${D}${base_sbindir}/poweroff
	ln -s ../${base_bindir}/systemctl ${D}${base_sbindir}/reboot
	ln -s ../${base_bindir}/systemctl ${D}${base_sbindir}/runlevel
	ln -s ../${base_bindir}/systemctl ${D}${base_sbindir}/shutdown
	ln -s ../${base_bindir}/systemctl ${D}${base_sbindir}/telinit

	# Make sure the runlevel services are known by systemd so their targets
	# get launched. See https://bugzilla.redhat.com/show_bug.cgi?id=1002806
	for t in poweroff rescue multi-user graphical reboot; do
		mkdir -p ${D}${systemd_system_unitdir}/${t}.target.wants
		ln -sf ../systemd-update-utmp-runlevel.service \
			${D}${systemd_system_unitdir}/${t}.target.wants
	done

	# we don't want /tmp to be a tmpfs by default
	mv ${D}${systemd_system_unitdir}/tmp.mount ${D}${datadir}/systemd/
	printf '\n[Install]\nWantedBy=local-fs.target\n' >> ${D}${datadir}/systemd/tmp.mount
	rm ${D}${systemd_system_unitdir}/local-fs.target.wants/tmp.mount

	# base on debian/libpam-systemd.install
	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
		cp -r ${S}/debian/extra/pam-configs ${D}${datadir}
	fi

	# remove unwanted files
	rm -rf ${D}${base_sbindir}/udevd \
	       ${D}${sysconfdir}/X11 \
	       ${D}${libdir}/sysctl.d/50-default.conf \
	       ${D}${base_libdir}/systemd/libsystemd-shared.so \
	       ${D}${datadir}/factory/ \
	       ${D}${datadir}/bash-completion/completions/kernel-install \
	       ${D}${systemd_system_unitdir}/halt-local.service
	find ${D}/ -name '*.busname' -delete
	# remove files related to factory-reset feature
	find ${D}/ \( -name 'systemd-update-done*' -o \
		-name systemd-journal-catalog-update.service -o \
		-name systemd-udev-hwdb-update.service -o \
		-name ldconfig.service -o \
		-name etc.conf \) -delete
        # remove symlinks enabling default-on services
        rm -rf ${D}${sysconfdir}/systemd/system/*.target.wants/
        # FIXME: generate proper sysusers.d/basic.conf for Debian, and add autopkgtest
        rm -rf ${D}${libdir}/sysusers.d/*
        rm -f ${D}${systemd_system_unitdir}/*sysusers*.service \
	      ${D}${systemd_system_unitdir}/*/*sysusers*.service
}

PACKAGES =+ "libnss-myhostname \
             libnss-mymachines \
             libnss-resolve \
             libsystemd-dev \
             libsystemd \
             ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam-systemd', '', d)} \
             udev \
             libudev-dev \
             libudev \
             systemd-coredump \
             systemd-journal-remote \
             systemd-container \
             systemd-sysv \
            "
FILES_libnss-myhostname = "${base_libdir}/libnss_myhostname${SOLIBS}"
FILES_libnss-mymachines = "${base_libdir}/libnss_mymachines${SOLIBS}"
FILES_libnss-resolve = "${base_libdir}/libnss_resolve${SOLIBS}"
FILES_systemd-container = "${base_bindir}/machinectl \
                           ${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
                           ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
                           ${systemd_system_unitdir}/dbus-org.freedesktop.import1.service \
                           ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
                           ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
                           ${systemd_system_unitdir}/machines.target \
                           ${systemd_system_unitdir}/systemd-importd.service \
                           ${systemd_system_unitdir}/systemd-machined.service \
                           ${systemd_system_unitdir}/systemd-nspawn@.service \
                           ${systemd_system_unitdir}/var-lib-machines.mount \
                           ${base_libdir}/systemd/import-pubring.gpg \
                           ${base_libdir}/systemd/systemd-export \
                           ${base_libdir}/systemd/systemd-import \
                           ${base_libdir}/systemd/systemd-importd \
                           ${base_libdir}/systemd/systemd-machined \
                           ${base_libdir}/systemd/systemd-pull \
                           ${bindir}/systemd-nspawn \
                           ${libdir}/tmpfiles.d/systemd-nspawn.conf \
                           ${datadir}/bash-completion/completions/machinectl \
                           ${datadir}/bash-completion/completions/systemd-nspawn \
                           ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
                           ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
                           ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
                           ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
                           ${datadir}/zsh/vendor-completions/_machinectl \
                           ${datadir}/zsh/vendor-completions/_sd_machines \
                           ${datadir}/zsh/vendor-completions/_systemd-nspawn \
                          "
FILES_systemd-coredump = "${sysconfdir}/systemd/coredump.conf \
                          ${systemd_system_unitdir}/sockets.target.wants/systemd-coredump.socket \
                          ${systemd_system_unitdir}/systemd-coredump* \
                          ${base_libdir}/systemd/systemd-coredump \
                          ${bindir}/coredumpctl \
                          ${libdir}/sysctl.d/50-coredump.conf \
                          ${datadir}/bash-completion/completions/coredumpctl \
                          ${datadir}/zsh/vendor-completions/_coredumpctl \
                         "
FILES_systemd-journal-remote = "${sysconfdir}/systemd/journal-*.conf \
                                ${systemd_system_unitdir}/systemd-journal-gatewayd.* \
                                ${systemd_system_unitdir}/systemd-journal-remote.* \
                                ${systemd_system_unitdir}/systemd-journal-upload.service \
                                ${base_libdir}/systemd/systemd-journal-* \
                                ${libdir}/tmpfiles.d/systemd-remote.conf \
                               "
FILES_${PN} = "${base_bindir} \
               ${bindir} \
               ${base_libdir} \
               ${libdir} \
               ${datadir} \
               ${sysconfdir}/dbus-1 \
               ${sysconfdir}/modules-load.d/modules.conf \
               ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/systemd-user', '', d)} \
               ${sysconfdir}/sysctl.d/99-sysctl.conf \
               ${sysconfdir}/systemd \
               ${sysconfdir}/xdg \
               ${sysconfdir}/dhcp \
              "
FILES_${PN}-dbg += "${base_libdir}/systemd/.debug \
                    ${base_libdir}/systemd/system-generators/.debug \
                    ${base_libdir}/udev/.debug \
                    ${libdir}/udev/.debug \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${base_libdir}/security/.debug/pam_systemd.so', '', d)} \
                    ${PYTHON_SITEPACKAGES_DIR}/systemd/.debug \
                   "
FILES_${PN}-dev = ""
ALLOW_EMPTY_${PN}-dev = "1"

FILES_libsystemd = "${base_libdir}/libsystemd${SOLIBS}"
FILES_libsystemd-dev = "${libdir}/libsystemd.so \
                        ${libdir}/libsystemd.la \
                        ${libdir}/pkgconfig/libsystemd.pc \
                        ${includedir}/systemd \
                       "

FILES_libpam-systemd = "${base_libdir}/security/pam_systemd.so \
                        ${datadir}/pam-configs/systemd \
                       "

FILES_udev = "${base_bindir}/udevadm \
              ${base_bindir}/systemd-hwdb \
              ${base_sbindir}/udevadm \
              ${systemd_system_unitdir}/sockets.target.wants/systemd-udevd-*.socket \
              ${systemd_system_unitdir}/sysinit.target.wants/systemd-udev-trigger.service \
              ${systemd_system_unitdir}/sysinit.target.wants/systemd-udevd.service \
              ${systemd_system_unitdir}/sysinit.target.wants/udev-finish.service \
              ${systemd_system_unitdir}/sysinit.target.wants/systemd-hwdb-update.service \
              ${systemd_system_unitdir}/systemd-hwdb-update.service \
              ${systemd_system_unitdir}/systemd-udev-settle.service \
              ${systemd_system_unitdir}/systemd-udev-trigger.service \
              ${systemd_system_unitdir}/systemd-udevd-control.socket \
              ${systemd_system_unitdir}/systemd-udevd-kernel.socket \
              ${systemd_system_unitdir}/systemd-udevd.service \
              ${systemd_system_unitdir}/udev.service \
              ${base_libdir}/systemd/network/99-default.link \
              ${base_libdir}/systemd/systemd-udevd \
              ${base_libdir}/udev/ata_id \
              ${base_libdir}/udev/cdrom_id \
              ${base_libdir}/udev/collect \
              ${base_libdir}/udev/hwdb.d \
              ${base_libdir}/udev/mtd_probe \
              ${base_libdir}/udev/rules.d/50-* \
              ${base_libdir}/udev/rules.d/60-* \
              ${base_libdir}/udev/rules.d/64-btrfs.rules \
              ${base_libdir}/udev/rules.d/70-debian-uaccess.rules \
              ${base_libdir}/udev/rules.d/70-mouse.rules \
              ${base_libdir}/udev/rules.d/70-power-switch.rules \
              ${base_libdir}/udev/rules.d/73-special-net-names.rules \
              ${base_libdir}/udev/rules.d/73-usb-net-by-mac.rules \
              ${base_libdir}/udev/rules.d/75-* \
              ${base_libdir}/udev/rules.d/78-sound-card.rules \
              ${base_libdir}/udev/rules.d/80-* \
              ${base_libdir}/udev/scsi_id \
              ${base_libdir}/udev/v4l_id \
              ${sysconfdir}/init.d \
              ${sysconfdir}/init/udev* \
              ${sysconfdir}/udev/udev.conf \
              ${sysconfdir}/udev/rules.d \
              ${sysconfdir}/udev/hwdb.d \
              ${base_libdir}/modprobe.d/fbdev-blacklist.conf \
              ${datadir}/pkgconfig/udev.pc \
              ${datadir}/bash-completion/completions/udevadm \
              ${datadir}/initramfs-tools \
              ${datadir}/zsh/vendor-completions/_udevadm \
             "

FILES_libudev = "${base_libdir}/libudev${SOLIBS}"
FILES_libudev-dev = "${includedir}/libudev.h \
                     ${libdir}/libudev.so \
                     ${libdir}/libudev.la \
                     ${libdir}/pkgconfig/libudev.pc \
                     ${libdir}/udev/test-udev \
                    "
FILES_systemd-sysv = " ${base_sbindir}/init \
                       ${base_sbindir}/halt \
                       ${base_sbindir}/poweroff \
                       ${base_sbindir}/reboot \
                       ${base_sbindir}/runlevel \
                       ${base_sbindir}/shutdown \
                       ${base_sbindir}/telinit \
                     "
RDEPENDS_${PN} += "systemd-sysv"
RDEPENDS_libnss-resolve += "${PN}"
RDEPENDS_libpam-systemd += "${PN} libpam-runtime dbus systemd-sysv"
RDEPENDS_systemd-journal-remote += "adduser"
RDEPENDS_systemd-coredump += "adduser"
RPROVIDES_systemd-coredump += "core-dump-handler"
RPROVIDES_libsystemd += "libsystemd0"

# init script requires init-functions, procps's ps, and mountpoint
RDEPENDS_udev += "lsb-base procps sysvinit-mountpoint"

inherit update-alternatives

ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"

ALTERNATIVE_TARGET[init] = "${base_bindir}/systemd"
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
ALTERNATIVE_PRIORITY[init] ?= "300"

ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
ALTERNATIVE_PRIORITY[halt] ?= "300"

ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
ALTERNATIVE_PRIORITY[reboot] ?= "300"

ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
ALTERNATIVE_PRIORITY[shutdown] ?= "300"

ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
ALTERNATIVE_PRIORITY[poweroff] ?= "300"

ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
ALTERNATIVE_PRIORITY[runlevel] ?= "300"

DEBIAN_NOAUTONAME_libnss-myhostname = "1"
DEBIAN_NOAUTONAME_libnss-mymachines = "1"
DEBIAN_NOAUTONAME_libnss-resolve = "1"

USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} +=  "--system --no-create-home --home /run/systemd --shell /bin/false --user-group systemd-timesync; --system --no-create-home --home /run/systemd/netif --shell /bin/false --user-group systemd-network; --system --no-create-home --home /run/systemd/resolve --shell /bin/false --user-group systemd-resolve; --system --no-create-home --home /run/systemd --shell /bin/false --user-group systemd-bus-proxy"
GROUPADD_PARAM_${PN} += "--system systemd-journal"

# Follow debian/systemd-coredump.postinst
pkg_postinst_systemd-coredump() {
	# enable systemd-coredump right after package installation
	if [ -d $D/run/systemd/system ]; then
		systemctl daemon-reload && systemctl start systemd-coredump.socket || true
	fi
	$D${base_libdir}/systemd/systemd-sysctl $D${libdir}/sysctl.d/50-coredump.conf || true
}
USERADD_PARAM_systemd-coredump += "--system --no-create-home --home /run/systemd systemd-coredump"

# Avoid a parallel build problem
PARALLEL_MAKE = ""


text:
package main

import (
	"bytes"
	"testing"
)

func TestMainOutput(t *testing.T) {
	var buf bytes.Buffer
	mainout = &buf

	main()

	expected := `Fibonacci series starting...
Fibonacci series completed...
`
	actual := buf.String()
	if expected != actual {
		t.Errorf("Unexpected output in main()")
	}
}

func TestFibOutputFibZero(t *testing.T) {
	var buf bytes.Buffer
	fibout = &buf

	fib(0)

	expected := ``
	actual := buf.String()
	if expected != actual {
		t.Errorf("Unexpected output in fib(0)")
	}
}

func TestFibOutputFibSeven(t *testing.T) {
	var buf bytes.Buffer
	fibout = &buf

	fib(7)

	expected := `1
1
2
3
5
8
13
`
	actual := buf.String()
	if expected != actual {
		t.Errorf("Unexpected output in fib(7)")
	}
}

func TestFibOutputFibNine(t *testing.T) {
	var buf bytes.Buffer
	fibout = &buf

	fib(9)

	expected := `1
1
2
3
5
8
13
21
34
`
	actual := buf.String()
	if expected != actual {
		t.Errorf("Unexpected output in fib(9)")
	}
}

func TestFibOutputNegaFibNine(t *testing.T) {
	var buf bytes.Buffer
	fibout = &buf

	fib(-9)

	expected := `1
-1
2
-3
5
-8
13
-21
34
`
	actual := buf.String()
	if expected != actual {
		t.Errorf("Unexpected output in fib(-9)")
	}
}

func TestFibOutputOutsideRange(t *testing.T) {
	var buf bytes.Buffer
	fibout = &buf

	fib(93)

	expected := `Value outside allowable range (-92 to 92)
`
	actual := buf.String()
	if expected != actual {
		t.Errorf(expected, actual, "Unexpected output in fib(-93)")
	}
}

repository: denigeorge/go-course

repo_name: denigeorge/go-course


text:
package main

import (
	"fmt"
)

func scanSample() {
	var y float32
	fmt.Scan(&y)
	fmt.Println(y)
}

license: Unlicense


text:
// MIT License
// Copyright (c) 2020 KrylovBoris
// License information: https://github.com/KrylovBoris/OFFICE-HACKER/blob/main/LICENSE

using TMPro;
using UnityEngine;

namespace GlobalMechanics.UI
{
    public class NoteUi : MonoBehaviour
    {
        [SerializeField] private TextMeshProUGUI noteText;

        public void Display(string text)
        {
            noteText.text = text;
        }

    }
}

repository: KrylovBoris/OFFICE-HACKER

repo_name: KrylovBoris/OFFICE-HACKER


text:
import { Component, OnInit } from '@angular/core';
import { DashboardService } from '@app/member-portal/modules/dashboard/services/dashboard.service';
import { RoutesConstants } from '@core/constants/route-constants';
import { SelectItem, ConfirmationService } from 'primeng/api';
import { ClamesFilter } from '../../Modals/ClamesFilter';
import { HttpErrorResponse } from '@angular/common/http';

@Component({
  selector: 'app-member-all-claims',
  templateUrl: './member-all-claims.component.html',
  styleUrls: ['./member-all-claims.component.scss']
})
export class MemberAllClaimsComponent implements OnInit {
  routerConstants = RoutesConstants;
  display: boolean;
  noOfDays: string;
  userId: string;
  claimDetails: any;
  medicalClaims: any[];
  dentalClaims: any[];
  visionClaims: any[];
  cliams: any[];
  plansCovered: any;
  defaultPaginator = false;
  eobIdentifier = 0;
  columns: any[] = [
    // { field: 'claimsTypeDescription', header: 'Claim Type', width: '6em' },
    { field: 'claimsNumber', header: 'Request Number', width: '12%', sortIdentifier: 'claimsNumber' },
    { field: 'serviceDate', header: 'Service Start Date', width: '8%', sortIdentifier: 'serviceStartDate' }, //
    { field: 'serviceEndDate', header: 'Service End Date', width: '8%', sortIdentifier: 'serviceEndDate' },
    { field: 'serviceDescription', header: 'Service Description', width: '18%' },
    { field: 'billedAmount', header: 'Billed Amount', width: '7%' },
    { field: 'planDiscountedRate', header: 'Plan Discounted Rate', width: '8%' },
    { field: 'planPaidAmount', header: 'Plan Paid Amount', width: '7%' },
    { field: 'dueAmount', header: 'Member Owes', width: '7%' },
    { field: 'msraAmount', header: 'Amount Applied to MSRA', width: '11%' },
    { field: 'facilityName', header: 'Facility Name', width: '9%', sortIdentifier: 'facilityName' },
    { field: 'facilityName', header: 'EOB', width: '5%' }
  ];
  filesPerPage = 10;
  totalFilesCount: any;
  dependentMembers: SelectItem[] = [];
  onMedicalselected: boolean;
  onDentalselected: boolean;
  onVisionselected: boolean;
  selectedDependent: SelectItem;
  withinValue: SelectItem;
  sortByValue: SelectItem;
  externalId: any;
  userClaimsReq: ClamesFilter;
  sortOrder = 'desc';
  sortField = 'serviceStartDate';
  pageNumber = 1;
  totalNumberOfRecords: number;
  filterAttribute = 'yeartodate';
  within: SelectItem[] = [
    { label: 'Year to Date', value: 'yeartodate' },
    { label: 'Last 3 months', value: 'lastthreemonths' },
    { label: 'Last 6 months', value: 'lastsixmonths' },
    { label: 'Last 12 months', value: 'lasttwelevemonths' }
  ];
  testData: string;
  claimTypeId = 1;
  initialLoad = false;
  constructor(private dashboardService: DashboardService, private confirmationService: ConfirmationService) { }
  ngOnInit() {
    this.initialLoad = true;
    this.userId = sessionStorage.getItem('userId');
    this.FetchPlansCoveredDetails();
    this.LoadClaimData();
    const filterFlag = sessionStorage.getItem('filterFlag');
    if (filterFlag) {
      this.onFilterSelect(parseInt(filterFlag, 10));
    } else {
      this.onFilterSelect(0);
    }
  }
  FetchPlansCoveredDetails() {
    this.dashboardService.getMemberDetailsForDashBoard(this.userId).subscribe((res: any) => {
      this.plansCovered = res.PlansCovered;
    },
      (err: HttpErrorResponse) => {
        if (err.error instanceof Error) {
        } else if (err.status === 500) {
        }
      });
  }
  LoadClaimData() {
    this.dashboardService.getUserDependentClaimData(this.userId).subscribe((res: any[]) => {
      if (res) {
        /* const dependentddlvalues = [];
        res.forEach(re => {
          dependentddlvalues.push({ label: re.fullName, value: re.externalId });
        }); */
        // this.dependentMembers = dependentddlvalues;
        // this.dependentMembers = res.map(function (elm) {
        this.dependentMembers = res.map(function (elm) {
          return {
            label: elm['FullName'],
            value: elm['ExternalId']
          };
        });
        const dropDownFilter = JSON.parse(sessionStorage.getItem('dropDownFilter'));
        this.userClaimsReq = {
          externalMemberId: null,
          userId: this.userId,
          pageSize: 10,
          pageNumber: this.pageNumber,
          filterAttribute: 'yeartodate',
          sortAttribute: 'ServiceStartDate',
          sortOrder: 'desc',
          claimsType: this.claimTypeId
        };
        if (dropDownFilter) {
          this.selectedDependent = this.dependentMembers.find(dm => dm.value === dropDownFilter.value);
          this.userClaimsReq.externalMemberId = dropDownFilter.value;
          this.dependeentMemberData(this.userClaimsReq);
        } else {
          this.selectedDependent = this.dependentMembers[0].value;
          this.dependeentMemberData(this.userClaimsReq);
        }
      }
    },
      (err: HttpErrorResponse) => {
        if (err.error instanceof Error) {
        } else if (err.status === 500) {
        }
      });
  }
  dependeentMemberData(clamesFilter: ClamesFilter) {
    this.dashboardService.getClaimDetails(clamesFilter).subscribe((res: any[]) => {
      if (res) {
        switch (this.claimTypeId) {
          case 1:
            this.medicalClaims = res.filter(cl => cl.ClaimTypeID === 1);
            this.cliams = this.medicalClaims;
            break;
          case 2:
            this.dentalClaims = res.filter(cl => cl.ClaimTypeID === 2);
            this.cliams = this.dentalClaims;
            break;
          case 3:
            this.visionClaims = res.filter(cl => cl.ClaimTypeID === 3);
            this.cliams = this.visionClaims;
            break;
          default:
            this.medicalClaims = res.filter(cl => cl.ClaimTypeID === 1);
            this.cliams = this.medicalClaims;
            break;
        }
        if (this.cliams && this.cliams.length > 0) {
          this.totalNumberOfRecords = this.cliams[0].TotalNoOfItems;
          if (this.totalNumberOfRecords > 10) {
            this.defaultPaginator = true;
          } else {
            this.defaultPaginator = false;
          }
        } else {
          this.totalNumberOfRecords = 0;
          this.defaultPaginator = false;
        }
      }
    },
      (err: HttpErrorResponse) => {
        if (err.error instanceof Error) {
        } else if (err.status === 500) {
        }
      });
  }

  OpenEOB() {
    if (this.eobIdentifier !== 0) {
      this.dashboardService.downloadEOBpdf(this.eobIdentifier).subscribe((fileData: any) => {
        if (fileData) {
          const fileURL = URL.createObjectURL(
            new Blob([fileData], { type: 'application/pdf' }));
          window.open(fileURL, '_blank');
        }
      });
    }
  }
  downloadEOB(eobIdentifier) {
    this.confirmationService.confirm({
      message: 'You will be directed to new browser window for EOB document',
      header: 'Confirmation',
      key: 'eobConfirmation',
      icon: 'pi pi-exclamation-triangle',
      accept: () => {
        this.eobIdentifier = eobIdentifier;
        this.OpenEOB();
      },
      reject: () => {
        this.eobIdentifier = 0;
      }
    });
  }
  onDependentSelected() {
    this.userClaimsReq = {
      externalMemberId: this.selectedDependent ? this.selectedDependent.value : this.dependentMembers[0].value,
      userId: this.userId,
      pageSize: this.filesPerPage,
      pageNumber: this.pageNumber,
      filterAttribute: this.withinValue ? this.withinValue.value : this.filterAttribute,
      sortAttribute: this.sortByValue ? this.sortByValue.value : this.sortField,
      sortOrder: 'desc',
      claimsType: this.claimTypeId
    };
    this.dependeentMemberData(this.userClaimsReq);

  }
  onWithinSelected() {
    this.userClaimsReq = {
      externalMemberId: this.selectedDependent ? this.selectedDependent.value : this.dependentMembers[0].value,
      userId: this.userId,
      pageSize: this.filesPerPage,
      pageNumber: this.pageNumber,
      filterAttribute: this.withinValue ? this.withinValue.value : this.filterAttribute,
      sortAttribute: this.sortByValue ? this.sortByValue.value : this.sortField,
      sortOrder: 'desc',
      claimsType: this.claimTypeId
    };
    this.dependeentMemberData(this.userClaimsReq);

  }

  onFilterSelect(claimType: number) {
    this.claimTypeId = claimType;
    this.onMedicalselected = false;
    this.onDentalselected = false;
    this.onVisionselected = false;
    switch (claimType) {
      case 1:
        this.onMedicalselected = true;
        this.FilterBasedonClainType();
        break;
      case 2:
        this.onDentalselected = true;
        this.FilterBasedonClainType();
        break;
      case 3:
        this.onVisionselected = true;
        this.FilterBasedonClainType();
        break;
      default:
        this.claimTypeId = 1;
        this.onMedicalselected = true;
        this.DefaultFilterData();
        break;
    }
  }
  DefaultFilterData() {
    this.userClaimsReq = {
      externalMemberId: '',
      userId: this.userId,
      pageSize: 10,
      pageNumber: this.pageNumber,
      filterAttribute: 'yeartodate',
      sortAttribute: 'ServiceStartDate',
      sortOrder: 'desc',
      claimsType: this.claimTypeId
    };
    this.dependeentMemberData(this.userClaimsReq);
  }
  FilterBasedonClainType() {
    this.userClaimsReq = {
      externalMemberId:
       this.selectedDependent ? this.selectedDependent.value : this.dependentMembers[0] ? this.dependentMembers[0].value : null,
      userId: this.userId,
      pageSize: this.filesPerPage,
      pageNumber: this.pageNumber,
      filterAttribute: this.withinValue ? this.withinValue.value : this.filterAttribute,
      sortAttribute: this.sortByValue ? this.sortByValue.value : this.sortField,
      sortOrder: 'desc',
      claimsType: this.claimTypeId
    };
    this.dependeentMemberData(this.userClaimsReq);
  }
  sortData(sortBy: any) {
    this.sortOrder = this.sortOrder === 'asc' ? 'desc' : 'asc';
    this.sortField = sortBy;
    this.userClaimsReq = {
      externalMemberId: this.selectedDependent ? this.selectedDependent.value : this.dependentMembers[0].value,
      userId: this.userId,
      pageSize: this.filesPerPage,
      pageNumber: this.pageNumber,
      filterAttribute: this.withinValue ? this.withinValue.value : this.filterAttribute,
      sortAttribute: this.sortByValue ? this.sortByValue.value : this.sortField,
      sortOrder: this.sortOrder,
      claimsType: this.claimTypeId
    };
    this.dependeentMemberData(this.userClaimsReq);
  }
  getPaginatedClaims(event) {
    if (event.first !== undefined) {
      this.pageNumber = event.first;
      this.filesPerPage = event.rows;
    }
    if (this.initialLoad) {
      this.initialLoad = false;
      return;
    }
    let pageNumber = 1;
    if (this.pageNumber > 1) {
      pageNumber = (this.pageNumber + this.filesPerPage) / this.filesPerPage;
    }
    this.userClaimsReq = {
      externalMemberId: this.selectedDependent ? this.selectedDependent.value : this.dependentMembers[0].value,
      userId: this.userId,
      pageSize: this.filesPerPage,
      pageNumber: pageNumber,
      filterAttribute: this.withinValue ? this.withinValue.value : this.filterAttribute,
      sortAttribute: this.sortByValue ? this.sortByValue.value : this.sortField,
      sortOrder: 'desc',
      claimsType: this.claimTypeId
    };
    this.dependeentMemberData(this.userClaimsReq);
  }
}

gha_language: TypeScript

extension: ts