text:
---
---
@article{gao2018optimization,
  title={Optimization of gelatin--alginate composite bioink printability using rheological parameters: a systematic approach},
  author={Gao, Teng and Gillispie, Gregory J and Copus, Joshua S and Pr, Anil Kumar and Seol, Young-Joon and Atala, Anthony and Yoo, James J and Lee, Sang Jin},
  journal={Biofabrication},
  volume={10},
  number={3},
  pages={034106},
  year={2018},
  publisher={IOP Publishing},
  html={https://iopscience.iop.org/article/10.1088/1758-5090/aacdc7}
}

@article{zhang2017integrate,
  title={INTEGRATE-Vis: a tool for comprehensive gene fusion visualization},
  author={Zhang, Jin and Gao, Teng and Maher, Christopher A},
  journal={Scientific reports},
  volume={7},
  number={1},
  pages={1--4},
  year={2017},
  publisher={Nature Publishing Group},
  html={https://www.nature.com/articles/s41598-017-18257-2}
}

@article{bolton2020cancer,
  title={Cancer therapy shapes the fitness landscape of clonal hematopoiesis},
  author={Bolton, Kelly L and Ptashkin, Ryan N and Gao, Teng and Braunstein, Lior and Devlin, Sean M and Kelly, Daniel and Patel, Minal and Berthon, Antonin and Syed, Aijazuddin and Yabe, Mariko and others},
  journal={Nature genetics},
  volume={52},
  number={11},
  pages={1219--1226},
  year={2020},
  publisher={Nature Publishing Group},
  html={https://www.nature.com/articles/s41588-020-00710-0}
}

@article{gao2021interplay,
  title={Interplay between chromosomal alterations and gene mutations shapes the evolutionary trajectory of clonal hematopoiesis},
  author={Gao, Teng and Ptashkin, Ryan and Bolton, Kelly L and Sirenko, Maria and Fong, Christopher and Spitzer, Barbara and Menghrajani, Kamal and Ossa, Juan E Arango and Zhou, Yangyu and Bernard, Elsa and others},
  journal={Nature communications},
  volume={12},
  number={1},
  pages={1--11},
  year={2021},
  publisher={Nature Publishing Group},
  html={https://www.nature.com/articles/s41467-020-20565-7}
}

@article{bolton2021clonal,
  title={Clonal hematopoiesis is associated with risk of severe Covid-19},
  author={Bolton, Kelly L and Koh, Youngil and Foote, Michael B and Im, Hogune and Jee, Justin and Sun, Choong Hyun and Safonov, Anton and Ptashkin, Ryan and Moon, Joon Ho and Lee, Ji Yeon and others},
  journal={Nature communications},
  volume={12},
  number={1},
  pages={1--8},
  year={2021},
  publisher={Nature Publishing Group},
  html={https://www.nature.com/articles/s41467-021-26138-6}
}

@article{gao2022haplotype,
  title={Haplotype-aware analysis of somatic copy number variations from single-cell transcriptomes},
  author={Gao, Teng and Soldatov, Ruslan and Sarkar, Hirak and Kurkiewicz, Adam and Biederstedt, Evan and Loh, Po-Ru and Kharchenko, Peter V},
  journal={Nature Biotechnology},
  pages={1--10},
  year={2022},
  publisher={Nature Publishing Group},
  html={https://www.nature.com/articles/s41587-022-01468-y}
}

@article{spitzer2022bone,
  title={Bone marrow surveillance of pediatric cancer survivors identifies clones that predict therapy-related leukemia},
  author={Spitzer, Barbara and Rutherford, Kayleigh D and Gundem, Gunes and McGovern, Erin M and Millard, Nathan E and Arango Ossa, Juan E and Cheung, Irene Y and Gao, Teng and Levine, Max F and Zhang, Yanming and others},
  journal={Clinical Cancer Research},
  volume={28},
  number={8},
  pages={1614--1627},
  year={2022},
  publisher={American Association for Cancer Research},
  html={https://aacrjournals.org/clincancerres/article-abstract/28/8/1614/694144/Bone-Marrow-Surveillance-of-Pediatric-Cancer}
}

gha_license_id: MIT

gha_language: SCSS


text:
# Create a xenguest base image
#
# This recipe creates a base image that is then extended by other recipes
# through xenguest-image class.
# xenguest image type is using this as base to add a kernel and a disk image
# to create a guest
#
# The recipe is also adding files in those directories to the xenguest image:
# - ${WORKDIR}/extend/disk-files: all files in this directory will be added to
#   the guest disk files (using --disk-add-file)
# - ${WORKDIR}/extend/files: all files in this directory will be added to the
#   guest xen files (using --xen-add-file)
# - ${WORKDIR}/extend/guest.d: all files in this directory will be added to
#   the xen append configuration files (using --xen-append)
# - ${WORKDIR}/extend/init.[pre|post|d]: all files in those directories will
#   be added to the corresponding init scripts (using --init-[pre|post|script])
# You can bbappend this recipe and put files in ${WORKDIR}/extend to add
# elements to the image.
#

DESCRIPTION = "Xenguest Base Image"
LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

#
# The following variables can contain SRC_URI compatible entries to add
# files to the xenguest image.
# You can set those variable in local.conf to add one or several files
# For example to add a boot.tar.gz file that has to be downloaded to the file
# useable for disk partition initialisation:
# XENGUEST_IMAGE_SRC_URI_DISK_FILES += "https://www.test.com/files/boot.tar.gz"

# Add disk files
XENGUEST_IMAGE_SRC_URI_DISK_FILES ??= ""

# Add xen files
XENGUEST_IMAGE_SRC_URI_XEN_FILES ??= ""

# Add xen configuration elements
XENGUEST_IMAGE_SRC_URI_XEN_CONFIG ??= ""

# Add pre init script
XENGUEST_IMAGE_SRC_URI_INIT_PRE ??= ""

# Add init script
XENGUEST_IMAGE_SRC_URI_INIT ??= ""

# Add post init script
XENGUEST_IMAGE_SRC_URI_INIT_POST ??= ""

S = "${WORKDIR}"

inherit deploy xenguest-image

# parse XENGUEST_IMAGE_SRC_URI_ variables and add them to SRC_URI
python __anonymous() {
    def parse_extend_variable(d, varname, destdir):
        list = d.getVar(varname)
        if list:
            for entry in list.split():
                #Check the URL
                try:
                    decode = bb.fetch.decodeurl(entry)
                    d.appendVar('SRC_URI', ' ' + entry + ';unpack=0;subdir=extend/' + destdir)
                except:
                    bb.fatal("%s: %s contains an invalid URL:  %s" \
                    % (d.getVar('PF'), varname, entry))

    parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_DISK_FILES', 'disk-files')
    parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_XEN_FILES', 'files')
    parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_XEN_CONFIG', 'guest.d')
    parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_INIT_PRE', 'init.pre')
    parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_INIT', 'init.d')
    parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_INIT_POST', 'init.post')
}

# Make sure we are removing old files before redoing a fetch
do_fetch[cleandirs] += "${WORKDIR}/extend"

do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install[noexec] = "1"

add_extend_files() {
    local subdir="$1"
    local cmd="$2"
    local stripdest="${3:-n}"

    if [ -d ${WORKDIR}/extend/$subdir ]; then
        filelist=$(find ${WORKDIR}/extend/$subdir -type f)

        if [ -n "$filelist" ]; then
            for f in $filelist; do
                if [ "$stripdest" = "y" ]; then
                    call_xenguest_mkimage update --$cmd=$f:$(basename $f)
                else
                    call_xenguest_mkimage update --$cmd=$f
                fi
            done
        fi
    fi
}

do_deploy() {
    # Create a new image
    xenguest_image_create

    # Add our extra files if any
    add_extend_files "disk-files" "disk-add-file" "y"
    add_extend_files "files" "xen-add-file" "y"
    add_extend_files "guest.d" "xen-append"
    add_extend_files "init.pre" "init-pre"
    add_extend_files "init.d" "init-script"
    add_extend_files "init.post" "init-post"
}

addtask deploy after do_install before do_build

license: MIT

repository: acrlinux/acrlinux-yocto

license_type: permissive

repo_name: acrlinux/acrlinux-yocto

branch_name: refs/heads/master

extension: bb


text:
@manual{skripta,
author = {Božidar Križan},
title = {Interna skripta iz kolegija Elementi strojeva 2 za konstrukcijske vježbe},
year = {2018},
organization = {Politehnika Pula},
}
@book{krivzan1998osnove,
  title={Osnove prora{\v{c}}una i oblikovanja konstrukcijskih elemenata},
  author={Kri{\v{z}}an, Bo{\v{z}}idar},
  publisher = {{\v{S}}kolska knjiga, Zagreb},
  year={2008}
}
@manual{potrebniMaterijali,
author = {Milenko Jokić},
title = {Zbirka potrebnih materijala i tablica za izradu timskog projektnog zadatka},
year = {2018},
organization = {Politehnika Pula},
}
@online{skf,
author = {SKF},
title = {Product catalogue},
year = {2018},
howpublished={\url{http://www.skf.com/group/products/index.html} (27.10.2018)}
}

extension: bib


text:
package main

import "testing"

func TestIsBalanced(t *testing.T) {
	for k, v := range map[string]bool{
		":))": false, "(:)": true, "j": true, "": true, ":):": true,
		"( :) ))": false, "asdf(asdf:)ghjk:ghjk(ghjk)": true,
		"(((::))()": false} {
		if r := isBalanced(trimRight(k), 0); r != v {
			t.Errorf("failed: isBalanced2 %s is %t, got %t",
				k, v, r)
		}
	}
}

func BenchmarkIsBalanced(b *testing.B) {
	ch := []string{"(", ")", ":", "j", " "}
	for i := 0; i < b.N; i++ {
		var (
			s string
			j int
		)
		for j = i; j > 0; j /= 5 {
			s += ch[j%5]
		}
		isBalanced(trimRight(s), 0)
	}
}

func isBalanced(s string, c int) bool {
	for ; s != "" && c >= 0; s = s[1:] {
		switch s[0] {
		case '(':
			c++
		case ')':
			c--
		case ':':
			if s[1] == '(' {
				return isBalanced(s[2:], c) || isBalanced(s[2:], c+1)
			} else if s[1] == ')' {
				return isBalanced(s[2:], c) || isBalanced(s[2:], c-1)
			}
		}
	}
	return c == 0
}

func trimRight(s string) string {
	r := len(s)
	for ; r > 0 && s[r-1] != '(' && s[r-1] != ')'; r-- {
	}
	return s[:r]
}

repository: shortthirdman/code-eval-challenges

repo_name: shortthirdman/code-eval-challenges

gha_language: Go

extension: go


text:
/*
Copyright 2019 Cisco Systems

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

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

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

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: amt_summary_bag.proto

package cisco_ios_xr_ipv4_igmp_oper_igmp_active_process_amt_summary

import (
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	math "math"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

type AmtSummaryBag_KEYS struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *AmtSummaryBag_KEYS) Reset()         { *m = AmtSummaryBag_KEYS{} }
func (m *AmtSummaryBag_KEYS) String() string { return proto.CompactTextString(m) }
func (*AmtSummaryBag_KEYS) ProtoMessage()    {}
func (*AmtSummaryBag_KEYS) Descriptor() ([]byte, []int) {
	return fileDescriptor_692236ad8513a9eb, []int{0}
}

func (m *AmtSummaryBag_KEYS) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AmtSummaryBag_KEYS.Unmarshal(m, b)
}
func (m *AmtSummaryBag_KEYS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AmtSummaryBag_KEYS.Marshal(b, m, deterministic)
}
func (m *AmtSummaryBag_KEYS) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AmtSummaryBag_KEYS.Merge(m, src)
}
func (m *AmtSummaryBag_KEYS) XXX_Size() int {
	return xxx_messageInfo_AmtSummaryBag_KEYS.Size(m)
}
func (m *AmtSummaryBag_KEYS) XXX_DiscardUnknown() {
	xxx_messageInfo_AmtSummaryBag_KEYS.DiscardUnknown(m)
}

var xxx_messageInfo_AmtSummaryBag_KEYS proto.InternalMessageInfo

type AmtSummaryBag struct {
	AnycastPrefix           string   `protobuf:"bytes,50,opt,name=anycast_prefix,json=anycastPrefix,proto3" json:"anycast_prefix,omitempty"`
	PrefixLength            uint32   `protobuf:"varint,51,opt,name=prefix_length,json=prefixLength,proto3" json:"prefix_length,omitempty"`
	RelayAddress            string   `protobuf:"bytes,52,opt,name=relay_address,json=relayAddress,proto3" json:"relay_address,omitempty"`
	Mtu                     uint32   `protobuf:"varint,53,opt,name=mtu,proto3" json:"mtu,omitempty"`
	Tos                     uint32   `protobuf:"varint,54,opt,name=tos,proto3" json:"tos,omitempty"`
	Ttl                     uint32   `protobuf:"varint,55,opt,name=ttl,proto3" json:"ttl,omitempty"`
	QueryInterval           uint32   `protobuf:"varint,56,opt,name=query_interval,json=queryInterval,proto3" json:"query_interval,omitempty"`
	GatewayCount            uint32   `protobuf:"varint,57,opt,name=gateway_count,json=gatewayCount,proto3" json:"gateway_count,omitempty"`
	MaxGateway              uint32   `protobuf:"varint,58,opt,name=max_gateway,json=maxGateway,proto3" json:"max_gateway,omitempty"`
	TunnelCount             uint32   `protobuf:"varint,59,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"`
	TunnelConfiguredMaximum uint32   `protobuf:"varint,60,opt,name=tunnel_configured_maximum,json=tunnelConfiguredMaximum,proto3" json:"tunnel_configured_maximum,omitempty"`
	IsAclConfigured         bool     `protobuf:"varint,61,opt,name=is_acl_configured,json=isAclConfigured,proto3" json:"is_acl_configured,omitempty"`
	IsGatewaySimulation     bool     `protobuf:"varint,62,opt,name=is_gateway_simulation,json=isGatewaySimulation,proto3" json:"is_gateway_simulation,omitempty"`
	IsOuOfResource          bool     `protobuf:"varint,63,opt,name=is_ou_of_resource,json=isOuOfResource,proto3" json:"is_ou_of_resource,omitempty"`
	XXX_NoUnkeyedLiteral    struct{} `json:"-"`
	XXX_unrecognized        []byte   `json:"-"`
	XXX_sizecache           int32    `json:"-"`
}

func (m *AmtSummaryBag) Reset()         { *m = AmtSummaryBag{} }
func (m *AmtSummaryBag) String() string { return proto.CompactTextString(m) }
func (*AmtSummaryBag) ProtoMessage()    {}
func (*AmtSummaryBag) Descriptor() ([]byte, []int) {
	return fileDescriptor_692236ad8513a9eb, []int{1}
}

func (m *AmtSummaryBag) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AmtSummaryBag.Unmarshal(m, b)
}
func (m *AmtSummaryBag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AmtSummaryBag.Marshal(b, m, deterministic)
}
func (m *AmtSummaryBag) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AmtSummaryBag.Merge(m, src)
}
func (m *AmtSummaryBag) XXX_Size() int {
	return xxx_messageInfo_AmtSummaryBag.Size(m)
}
func (m *AmtSummaryBag) XXX_DiscardUnknown() {
	xxx_messageInfo_AmtSummaryBag.DiscardUnknown(m)
}

var xxx_messageInfo_AmtSummaryBag proto.InternalMessageInfo

func (m *AmtSummaryBag) GetAnycastPrefix() string {
	if m != nil {
		return m.AnycastPrefix
	}
	return ""
}

func (m *AmtSummaryBag) GetPrefixLength() uint32 {
	if m != nil {
		return m.PrefixLength
	}
	return 0
}

func (m *AmtSummaryBag) GetRelayAddress() string {
	if m != nil {
		return m.RelayAddress
	}
	return ""
}

func (m *AmtSummaryBag) GetMtu() uint32 {
	if m != nil {
		return m.Mtu
	}
	return 0
}

func (m *AmtSummaryBag) GetTos() uint32 {
	if m != nil {
		return m.Tos
	}
	return 0
}

func (m *AmtSummaryBag) GetTtl() uint32 {
	if m != nil {
		return m.Ttl
	}
	return 0
}

func (m *AmtSummaryBag) GetQueryInterval() uint32 {
	if m != nil {
		return m.QueryInterval
	}
	return 0
}

func (m *AmtSummaryBag) GetGatewayCount() uint32 {
	if m != nil {
		return m.GatewayCount
	}
	return 0
}

func (m *AmtSummaryBag) GetMaxGateway() uint32 {
	if m != nil {
		return m.MaxGateway
	}
	return 0
}

func (m *AmtSummaryBag) GetTunnelCount() uint32 {
	if m != nil {
		return m.TunnelCount
	}
	return 0
}

func (m *AmtSummaryBag) GetTunnelConfiguredMaximum() uint32 {
	if m != nil {
		return m.TunnelConfiguredMaximum
	}
	return 0
}

func (m *AmtSummaryBag) GetIsAclConfigured() bool {
	if m != nil {
		return m.IsAclConfigured
	}
	return false
}

func (m *AmtSummaryBag) GetIsGatewaySimulation() bool {
	if m != nil {
		return m.IsGatewaySimulation
	}
	return false
}

func (m *AmtSummaryBag) GetIsOuOfResource() bool {
	if m != nil {
		return m.IsOuOfResource
	}
	return false
}

func init() {
	proto.RegisterType((*AmtSummaryBag_KEYS)(nil), "cisco_ios_xr_ipv4_igmp_oper.igmp.active.process.amt_summary.amt_summary_bag_KEYS")
	proto.RegisterType((*AmtSummaryBag)(nil), "cisco_ios_xr_ipv4_igmp_oper.igmp.active.process.amt_summary.amt_summary_bag")
}

func init() { proto.RegisterFile("amt_summary_bag.proto", fileDescriptor_692236ad8513a9eb) }

var fileDescriptor_692236ad8513a9eb = []byte{
	// 400 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x4d, 0x6f, 0x13, 0x31,
	0x10, 0x86, 0x15, 0x81, 0x10, 0xb8, 0x49, 0x0b, 0x86, 0x82, 0x39, 0x11, 0x8a, 0x90, 0x02, 0x87,
	0x1c, 0xda, 0xf2, 0xd5, 0xf2, 0xa1, 0x0a, 0x21, 0x84, 0x00, 0x15, 0xa5, 0x27, 0x4e, 0x23, 0xd7,
	0xf1, 0x2e, 0x23, 0xad, 0xd7, 0x8b, 0x67, 0x1c, 0x76, 0x7f, 0x05, 0x7f, 0xb9, 0x5a, 0x7b, 0x53,
	0x45, 0xb9, 0x59, 0xcf, 0xfb, 0xcc, 0xab, 0xf7, 0x60, 0xb1, 0xaf, 0x1d, 0x03, 0x45, 0xe7, 0x74,
	0xe8, 0xe0, 0x52, 0x97, 0xf3, 0x26, 0x78, 0xf6, 0xf2, 0xd4, 0x20, 0x19, 0x0f, 0xe8, 0x09, 0xda,
	0x00, 0xd8, 0xac, 0x8e, 0x01, 0x4b, 0xd7, 0x80, 0x6f, 0x6c, 0x98, 0xf7, 0xaf, 0xb9, 0x36, 0x8c,
	0x2b, 0xdb, 0xeb, 0xc6, 0x12, 0xcd, 0x37, 0x6a, 0x0e, 0x1e, 0x8a, 0x07, 0x5b, 0xad, 0xf0, 0xfd,
	0xcb, 0xef, 0x8b, 0x83, 0xff, 0x37, 0xc5, 0xde, 0x56, 0x20, 0x9f, 0x8b, 0x5d, 0x5d, 0x77, 0x46,
	0x13, 0x43, 0x13, 0x6c, 0x81, 0xad, 0x3a, 0x9c, 0x8e, 0x66, 0x77, 0x16, 0x93, 0x81, 0xfe, 0x4a,
	0x50, 0x3e, 0x13, 0x93, 0x1c, 0x43, 0x65, 0xeb, 0x92, 0xff, 0xa8, 0xa3, 0xe9, 0x68, 0x36, 0x59,
	0x8c, 0x33, 0xfc, 0x91, 0x58, 0x2f, 0x05, 0x5b, 0xe9, 0x0e, 0xf4, 0x72, 0x19, 0x2c, 0x91, 0x3a,
	0x4e, 0x55, 0xe3, 0x04, 0xcf, 0x32, 0x93, 0x77, 0xc5, 0x0d, 0xc7, 0x51, 0xbd, 0x4a, 0xf7, 0xfd,
	0xb3, 0x27, 0xec, 0x49, 0xbd, 0xce, 0x84, 0x7d, 0x72, 0x98, 0x2b, 0xf5, 0x66, 0x20, 0x5c, 0xf5,
	0x33, 0xff, 0x46, 0x1b, 0x3a, 0xc0, 0x9a, 0x6d, 0x58, 0xe9, 0x4a, 0xbd, 0x4d, 0xe1, 0x24, 0xd1,
	0x6f, 0x03, 0xec, 0x17, 0x94, 0x9a, 0xed, 0x3f, 0xdd, 0x81, 0xf1, 0xb1, 0x66, 0xf5, 0x2e, 0xcf,
	0x1c, 0xe0, 0xe7, 0x9e, 0xc9, 0x27, 0x62, 0xc7, 0xe9, 0x16, 0x06, 0xa6, 0x4e, 0x92, 0x22, 0x9c,
	0x6e, 0xbf, 0x66, 0x22, 0x9f, 0x8a, 0x31, 0xc7, 0xba, 0xb6, 0xd5, 0x50, 0x72, 0x9a, 0x8c, 0x9d,
	0xcc, 0x72, 0xc7, 0x89, 0x78, 0x7c, 0xad, 0xd4, 0x05, 0x96, 0x31, 0xd8, 0x25, 0x38, 0xdd, 0xa2,
	0x8b, 0x4e, 0xbd, 0x4f, 0xfe, 0xa3, 0xb5, 0xbf, 0xce, 0x7f, 0xe6, 0x58, 0xbe, 0x14, 0xf7, 0x90,
	0x40, 0x9b, 0xcd, 0x5b, 0xf5, 0x61, 0x3a, 0x9a, 0xdd, 0x5e, 0xec, 0x21, 0x9d, 0x99, 0x8d, 0x13,
	0x79, 0x28, 0xf6, 0x91, 0xd6, 0x53, 0x81, 0xd0, 0xc5, 0x4a, 0x33, 0xfa, 0x5a, 0x7d, 0x4c, 0xfe,
	0x7d, 0xa4, 0x61, 0xf4, 0xc5, 0x75, 0x24, 0x5f, 0xa4, 0x7e, 0x1f, 0xc1, 0x17, 0x10, 0x2c, 0xf9,
	0x18, 0x8c, 0x55, 0x9f, 0x92, 0xbf, 0x8b, 0x74, 0x1e, 0xcf, 0x8b, 0xc5, 0x40, 0x2f, 0x6f, 0xa5,
	0xdf, 0x76, 0x74, 0x15, 0x00, 0x00, 0xff, 0xff, 0x69, 0xbb, 0xf9, 0x38, 0x86, 0x02, 0x00, 0x00,
}

repository: cisco-ie/cisco-proto

repo_name: cisco-ie/cisco-proto


text:
SUMMARY = "Python bindings for the Apache Thrift RPC system"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=26a2009ddcb7c4162f8bafd5ef73c670"

SRC_URI[md5sum] = "76bb768a210257dd203923110042e560"
SRC_URI[sha256sum] = "b7f6c09155321169af03f9fb20dc15a4a0c7481e7c334a5ba8f7f0d864633209"

PYPI_PACKAGE_EXT = "zip"

inherit pypi setuptools

RDEPENDS_${PN} += "\
    ${PYTHON_PN}-logging \
    ${PYTHON_PN}-six \
    ${PYTHON_PN}-stringold \
    ${PYTHON_PN}-threading \
"

repository: nedap/meta-openembedded

repo_name: nedap/meta-openembedded

gha_language: BitBake


text:
package utils

import (
	"fmt"
	"io"
	"os"
	"regexp"
	"strings"
)

// ParseLogline extract talon fields fomr logline
func ParseLogline(logLine string) []string {

	const regex = "(^.*[PM|AM])[[:space:]]*Alt=[[:space:]]*(.*)[[:space:]].*Stat=[[:space:]]*([[:digit:]])[[:space:]].*L.act=[[:space:]]*([[:digit:]])[[:space:]]*.*SW=[[:space:]]([[:xdigit:]]*)[[:space:]].*Cond=[[:space:]]*([[:digit:]])"
	re := regexp.MustCompilePOSIX(regex)
	splitline := re.FindAllStringSubmatch(logLine, -1)
	/*
		fmt.Printf("date: %s\n", splitline[0][1])
		fmt.Printf("alt: %s\n", splitline[0][2])
		fmt.Printf("status: %s\n", splitline[0][3])
		fmt.Printf("Last action: %s\n", splitline[0][4])
		fmt.Printf("Switch: %s\n", splitline[0][5])
		fmt.Printf("condition: %s\n", splitline[0][6])
	*/
	return splitline[0]
}

// GetLastLineWithSeek get the loast line of the log
func GetLastLineWithSeek(filepath string) string {

	fileHandle, err := os.Open(filepath)
	if err != nil {
		panic("Cannot open talon log file")
	}
	defer fileHandle.Close()

	line := ""
	var cursor int64
	stat, _ := fileHandle.Stat()
	filesize := stat.Size()

	for {
		cursor--
		fileHandle.Seek(cursor, io.SeekEnd)

		char := make([]byte, 2)
		fileHandle.Read(char)

		// detect windows newline but not the first one
		if cursor != -2 && (char[1] == 10 && char[0] == 13) { // stop on newline
			break
		}

		line = fmt.Sprintf("%s%s", string(char[0]), line) // there is more efficient way

		if cursor == -filesize { // stop if we are at the begining of the file
			break
		}
	}

	return strings.TrimSpace(line)
}

repository: hoxca/achille

repo_name: hoxca/achille

branch_name: refs/heads/main


text:
require popt_${PV}.bb
DEPENDS = "gettext-native"
inherit native

S = "${WORKDIR}/popt-${PV}"

FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/popt-${PV}"