text:
@article{TormentasBarajas2019ATMOS,
 abstract = {In this paper we tackle a problem of convective situations analysis at Adolfo-Suarez Madrid-Barajas International Airport (Spain), based on Ordinal Regression algorithms. The diagnosis of convective clouds is key in a large airport like Barajas, since these meteorological events are associated with strong winds and local precipitation, which may affect air and land operations at the airport. In this work, we deal with a 12-h time horizon in the analysis of convective clouds, using as input variables data from a radiosonde station and also from numerical weather models. The information about the objective variable (convective clouds presence at the airport) has been obtained from the Madrid-Barajas METAR and SPECI aeronautical reports. We treat the problem as an ordinal regression task, where there exist a natural order among the classes. Moreover, the classification problem is highly imbalanced, since there are very few convective clouds events compared to clear days. Thus, a process of oversampling is applied to the database in order to obtain a better balance of the samples for this specific problem. An important number of ordinal regression methods are then tested in the experimental part of the work, showing that the best approach for this problem is the SVORIM algorithm, based on the Support Vector Machine strategy, but adapted for ordinal regression problems. The SVORIM algorithm shows a good accuracy in the case of thunderstorms and Cumulonimbus clouds, which represent a real hazard for the airport operations.},
 author = {David Guijo-Rubio and Carlos Casanova-Mateo and Juilia Sanz-Justo and Pedro Antonio Gutiérrez and Sara Cornejo-Bueno and César Hervás-Martínez and Sancho Salcedo-Sanz},
 awards = {JCR(2019): 4.676 Position: 13/93 (Q1) Category: METEOROLOGY & ATMOSPHERIC SCIENCES},
 comments = {JCR(2019): 4.676 Position: 13/93 (Q1) Category: METEOROLOGY & ATMOSPHERIC SCIENCES},
 doi = {10.1016/j.atmosres.2019.104798},
 issn = {0169-8095},
 journal = {Atmospheric Research},
 keywords = {Convective clouds, Convective analysis, Airports, Machine learning techniques, Ordinal regression},
 month = {May},
 note = {JCR(2019): 4.676 Position: 13/93 (Q1) Category: METEOROLOGY & ATMOSPHERIC SCIENCES},
 pages = {104798},
 title = {Ordinal regression algorithms for the analysis of convective situations over Madrid-Barajas airport},
 url = {doi.org/10.1016/j.atmosres.2019.104798},
 volume = {236},
 year = {2020}
}

repository: dguijo/academic-kickstart

repo_name: dguijo/academic-kickstart


text:
package main

import (
	dl "de.knallisworld/aoc/aoc2019/dayless"
	"fmt"
	"strings"
	"sync"
	"time"
)

const AocDay = 16
const AocDayName = "day16"
const AocDayTitle = "Day 16"

func main() {
	dl.PrintDayHeader(AocDay, AocDayTitle)
	defer dl.TimeTrack(time.Now(), AocDayName)

	{
		dl.PrintStepHeader(1)
		puzzle, _ := dl.ReadFileToString(AocDayName + "/puzzle1.txt")
		result := fft(*puzzle, "0, 1, 0, -1", 100)
		dl.PrintSolution(fmt.Sprintf("The final result's first eight digits are '%s'", result[0:8]))
	}

	{
		dl.PrintStepHeader(2)
		puzzle, _ := dl.ReadFileToString(AocDayName + "/puzzle1.txt")
		var offset int
		{
			p := *puzzle
			offset = dl.ParseInt(p[0:7])
		}
		puzzle2 := strings.Repeat(*puzzle, 10000)
		dl.PrintSolution(fmt.Sprintf("The message offset is '%d'", offset))
		result := fftComplex(puzzle2[offset:], "0, 1, 0, -1", 100, fft0Summing, func(ints []int) string {
			return intArrayAsString(ints[0:8])
		})
		dl.PrintSolution(fmt.Sprintf("The final result's eight digits at offset '%d' are '%s'", offset, result))
	}

}

func fft(input string, basePattern string, phases int) string {
	inputInt := make([]int, len(input))
	for i, c := range input {
		inputInt[i] = int(c - '0')
	}
	basePatternInt := make([]int, 0)
	for _, part := range strings.Split(basePattern, ",") {
		basePatternInt = append(basePatternInt, dl.ParseInt(strings.TrimSpace(part)))
	}
	numbers := fft0Single(inputInt, basePatternInt, phases)

	result := ""
	for _, n := range numbers {
		result += fmt.Sprintf("%d", n)
	}
	return result
}

func fftComplex(input string, basePattern string, phases int, f func(input []int, basePattern []int, phases int) []int, r func([]int) string) string {
	inputInt := make([]int, len(input))
	for i, c := range input {
		inputInt[i] = int(c - '0')
	}
	basePatternInt := make([]int, 0)
	for _, part := range strings.Split(basePattern, ",") {
		basePatternInt = append(basePatternInt, dl.ParseInt(strings.TrimSpace(part)))
	}
	numbers := f(inputInt, basePatternInt, phases)

	return r(numbers)
}

func fft0Multi(input []int, basePattern []int, phases int) []int {

	n := len(input)
	result := make([]int, n)
	copy(result, input)

	workersMax := 256
	workerWorkload := n / workersMax

	worker := func(wg *sync.WaitGroup, offset int, limit int, output []int) {
		//fmt.Printf("Worker %09d-%09d [%d]\n", offset, offset+limit, limit)
		for o := offset; o < offset+limit; o++ {
			t := 0
			// fmt.Printf("Output %04d...\n", o)
			for i := 0; i < n; i++ {
				b := basePattern[((i+1)/(o+1))%4]
				t += result[i] * b
			}
			output[o] = dl.AbsInt(t) % 10
		}
		wg.Done()
	}

	for phase := 1; phase <= phases; phase++ {
		fmt.Printf("Phase %03d...\n", phase)
		output := make([]int, n)

		var wg sync.WaitGroup
		wg.Add(workersMax + 1)
		for core := 0; core < workersMax; core++ {
			go worker(&wg, core*workerWorkload, workerWorkload, output)
		}
		go worker(&wg, workersMax*workerWorkload, n-(workersMax*workerWorkload), output) // rest
		wg.Wait()

		copy(result, output)
	}
	return result
}

func intArrayAsString(arr []int) string {
	result := ""
	for _, n := range arr {
		result += fmt.Sprintf("%d", n)
	}
	return result
}

func fft0Single(input []int, basePattern []int, phases int) []int {

	n := len(input)
	result := make([]int, n)
	copy(result, input)

	for phase := 1; phase <= phases; phase++ {
		//fmt.Printf("Phase %03d...\n", phase)
		output := make([]int, n)

		for o := 0; o < n; o++ {
			t := 0
			for i := 0; i < n; i++ {
				b := basePattern[((i+1)/(o+1))%4]
				t += result[i] * b
			}
			output[o] = dl.AbsInt(t) % 10
		}
		copy(result, output)
	}
	return result
}

// summing up (does only work if offset is in the last 50% part of the input)
func fft0Summing(input []int, basePattern []int, phases int) []int {

	n := len(input)
	result := make([]int, n)
	copy(result, input)

	for phase := 1; phase <= phases; phase++ {
		//fmt.Printf("Phase %03d...\n", phase)

		for i := len(result) - 1; i > 0; i-- {
			result[i-1] += result[i]
			result[i-1] %= 10
		}
	}
	return result
}

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: go


text:
package middlewares

import (
	awssdk "github.com/aws/aws-sdk-go/aws"
	"github.com/cloudskiff/driftctl/pkg/resource"
	"github.com/cloudskiff/driftctl/pkg/resource/aws"
	"github.com/sirupsen/logrus"
)

// Remove root_block_device from aws_instance resources and create dedicated aws_ebs_volume resources
type AwsInstanceBlockDeviceResourceMapper struct{}

func NewAwsInstanceBlockDeviceResourceMapper() AwsInstanceBlockDeviceResourceMapper {
	return AwsInstanceBlockDeviceResourceMapper{}
}

func (a AwsInstanceBlockDeviceResourceMapper) Execute(remoteResources, resourcesFromState *[]resource.Resource) error {

	newStateResources := make([]resource.Resource, 0)
	for _, stateRes := range *resourcesFromState {

		// Ignore all resources other than aws_instance
		if stateRes.TerraformType() != aws.AwsInstanceResourceType {
			newStateResources = append(newStateResources, stateRes)
			continue
		}

		instance, _ := stateRes.(*aws.AwsInstance)
		if instance.RootBlockDevice != nil && len(*instance.RootBlockDevice) > 0 {
			for _, rootBlock := range *instance.RootBlockDevice {
				logrus.WithFields(logrus.Fields{
					"volume":   *rootBlock.VolumeId,
					"instance": instance.TerraformId(),
				}).Debug("Creating aws_ebs_volume from aws_instance.root_block_device")
				ebsVolume := aws.AwsEbsVolume{
					AvailabilityZone:   instance.AvailabilityZone,
					Encrypted:          rootBlock.Encrypted,
					Id:                 *rootBlock.VolumeId,
					Iops:               rootBlock.Iops,
					KmsKeyId:           rootBlock.KmsKeyId,
					Size:               rootBlock.VolumeSize,
					Type:               rootBlock.VolumeType,
					MultiAttachEnabled: awssdk.Bool(false),
					Tags:               instance.VolumeTags,
				}
				newStateResources = append(newStateResources, &ebsVolume)
			}
			instance.RootBlockDevice = nil
		}
		if instance.EbsBlockDevice != nil && len(*instance.EbsBlockDevice) > 0 {
			for _, blockDevice := range *instance.EbsBlockDevice {
				logrus.WithFields(logrus.Fields{
					"volume":   *blockDevice.VolumeId,
					"instance": instance.TerraformId(),
				}).Debug("Creating aws_ebs_volume from aws_instance.ebs_block_device")
				ebsVolume := aws.AwsEbsVolume{
					AvailabilityZone:   instance.AvailabilityZone,
					Encrypted:          blockDevice.Encrypted,
					Id:                 *blockDevice.VolumeId,
					Iops:               blockDevice.Iops,
					KmsKeyId:           blockDevice.KmsKeyId,
					Size:               blockDevice.VolumeSize,
					Type:               blockDevice.VolumeType,
					MultiAttachEnabled: awssdk.Bool(false),
					Tags:               instance.VolumeTags,
				}
				newStateResources = append(newStateResources, &ebsVolume)
			}
			instance.EbsBlockDevice = nil
		}
		newStateResources = append(newStateResources, instance)
	}

	*resourcesFromState = newStateResources

	return nil
}

repository: psedge/driftctl

repo_name: psedge/driftctl

branch_name: refs/heads/main


text:
# Copyright (c) 2013 LG Electronics, Inc.

DESCRIPTION = "Event driven system init"
SECTION = "base"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"

inherit autotools pkgconfig update-alternatives
inherit gettext

DEPENDS = "cjson dbus libnih udev"

# initctl-set-env.patch extends the initctl set-env command => mark its package version
# to indicate that it's a webOS edition
PKGV .= "-0webos1"

SRC_URI[md5sum] = "1401e7fe811bb76ebbbde8a117026b80"
SRC_URI[sha256sum] = "a217d3cc31ff0708e568b1cb5d53144ad8bf00b3885dcd37c00ad5a17dbf1c46"

SRC_URI = "http://upstart.ubuntu.com/download/${PV}/upstart-${PV}.tar.gz"

SRC_URI += "file://fix-initctl-set-env.patch"
SRC_URI += "file://initctl-set-env.patch"
SRC_URI += "file://init-no-log.patch"
SRC_URI += "file://no-icons.patch"
SRC_URI += "file://remove-legacy-jobs.patch"
SRC_URI += "file://use-our-cjson.patch"

inherit autotools pkgconfig update-alternatives
inherit gettext

# libupstart can be used for upstart event generation from other programs.
# However it is not used by upstart itself, so package it separately.
PACKAGES =+ "libupstart libupstart-dev libupstart-staticdev ${PN}-systemd ${PN}-udev-bridge"

# dynamic libupstart libs for the target device
FILES_libupstart += "${libdir}/libupstart.so.*"

# add these two to libupstart above to build for libupstart
FILES_libupstart-dev += "${libdir}/libupstart.la ${libdir}/libupstart.so ${includedir}/upstart/ ${libdir}/pkgconfig/*"
FILES_libupstart-staticdev += "${libdir}/libupstart.a"

# this moves upstart-*-bridge.conf and binaries from /init, /sbin and /usr/share/upstart/* to -udev-bridge, and system.d files to -systemd ipks
FILES_${PN}-systemd = "${sysconfdir}/dbus-1/*"
FILES_${PN}-udev-bridge = "${sysconfdir}/init/* ${base_sbindir}/*bridge ${datadir}/upstart/*"

# this moves these files to the -dev ipk since they may be of use to developers
FILES_${PN}-dev += "${base_bindir}/init-checkconf ${base_bindir}/initctl2dot ${base_bindir}/upstart-monitor"
FILES_${PN}-dev += "${webos_install_datadir}/applications/upstart-monitor"

EXTRA_OEMAKE += "'bindir=${base_bindir}' \
                 'sbindir=${base_sbindir}' \
                 'usrbindir=${bindir}' \
                 'usrsbindir=${sbindir}' \
                 'includedir=${includedir}' \
                 'mandir=${mandir}'"

do_install () {
    oe_runmake 'DESTDIR=${D}' install
}
ALTERNATIVE_${PN}  = "init reboot halt poweroff shutdown telinit"

ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
ALTERNATIVE_LINK_NAME[telinit] = "${base_sbindir}/telinit"

ALTERNATIVE_PRIORITY[init] = "60"
ALTERNATIVE_PRIORITY[reboot] = "210"
ALTERNATIVE_PRIORITY[halt] = "210"
ALTERNATIVE_PRIORITY[poweroff] = "210"
ALTERNATIVE_PRIORITY[shutdown] = "210"
ALTERNATIVE_PRIORITY[telinit] = "210"

repository: skrishnakar/meta-webos-ports

repo_name: skrishnakar/meta-webos-ports

extension: bb


text:
LICENSE = "GPL"
inherit gpe

DESCRIPTION = "GPE user login screen"
SECTION     = "gpe"
PRIORITY    = "optional"
DEPENDS     = "gtk+ libgpewidget gpe-ownerinfo xkbd"
RDEPENDS    = "xkbd"
RPROVIDES   = "gpe-session-starter"
PR = "r0"

SRC_URI += "file://removeblue-fontsize8.patch;patch=1"

repository: Terentyev/familiar-linux

repo_name: Terentyev/familiar-linux


text:
@Article{ferreira,
  author={Pedro C. Ferreira and Daiane M. de Mattos and Vagner L. Ardeo},
  title={{Núcleo Triplo Filtro: uma medida de trajetória da inflação}},
  journal={Economia Aplicada},
  year=2016
}

@Manual{BETS,
title  = {BETS: Brazilian Economic Time Series},
author = {Pedro C. Ferreira and Talitha F. Speranza and Jonatha C. Azevedo and Fernando O. Teixeira and Daiane M. de Mattos },
year   = {2017},
url    = "http://cran.r-project.org/package=BETS"}

@Manual{Inflation,
title  = {Inflation: Core Inflation},
author = {Pedro C. Ferreira and Talitha F. Speranza and Fernando O. Teixeira and Daiane M. de Mattos },
year   = {2017},
url    = "http://cran.r-project.org/package=Inflation"}

@TechReport{census,
  author={{U.S. Census Bureau}},
  title={{The X-13 ARIMA-SEATS Seasonal Adjustment Program}},
  year=2013,
  url = {https://www.census.gov/srd/www/x13as}
}

@Article{castelar,
  author={Cristiano Santos and Ivan Castelar},
  title={{Avaliando as medidas de núcleo da inflação no Brasil}},
  journal={Economia Aplicada},
  year=2016,
  volume=20,
  number=1
}

@Article{mehra,
  author={Yash P. Mehra and Devin Reilly},
  title={{Short-term headline-core inflation dynamics}},
  journal={Economic Quarterly},
  year=2009,
  volume={},
  number={Sum},
  pages={289-313}
}

@TechReport{bcb,
  author={{Banco Central do Brasil}},
  title={{Metodologia do novo conjunto de medidas de núcleo de inflação}},
  year=2009,
  volume=11,
  number=4
}

@article{marques,
title = "Evaluating core inflation indicators",
journal = "Economic Modelling",
volume = "20",
number = "4",
pages = "765 - 775",
year = "2003",
issn = "0264-9993",
author = "Carlos Robalo Marques and Pedro Duarte Neves and Luı́s Morais Sarmento",
}

@article{ribba,
title = "Permanent-transitory decompositions and traditional measures of core inflation",
journal = "Economics Letters",
volume = "81",
number = "1",
pages = "109 - 116",
year = "2003",
issn = "0165-1765",
author = "Antonio Ribba"
}

@TechReport{figueiredo,
  author={Tito Nícias Teixeira da Silva Filho and Francisco Marcos Rodrigues Figueiredo},
  title={{Revisitando as Medidas de Núcleo de Inflação do Banco Central do Brasil}},
  year=2014,
  month=May,
  institution={Central Bank of Brazil, Research Department},
  type={Working Papers Series},
  url={https://ideas.repec.org/p/bcb/wpaper/356.html},
  number={356}
}

@article{johanssen,
 ISSN = {00129682, 14680262},
 author = {Søren Johansen},
 journal = {Econometrica},
 number = {6},
 pages = {1551-1580},
 publisher = {[Wiley, Econometric Society]},
 title = {Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models},
 volume = {59},
 year = {1991}
}

@article{diebold,
author = {Francis X. Diebold and Roberto S. Mariano },
title = {Comparing Predictive Accuracy},
journal = {Journal of Business \& Economic Statistics},
volume = {13},
number = {3},
pages = {253-263},
year  = {1995},
publisher = {Taylor & Francis}
}

repository: nmecsys/Inflation

repo_name: nmecsys/Inflation

extension: bib


text:
@article{schaefer2010,
  title={Assessing the effectiveness of a large database of emotion-eliciting films: A new tool for emotion researchers},
  author={Schaefer, Alexandre and Nils, Fr{\'e}d{\'e}ric and Sanchez, Xavier and Philippot, Pierre},
  journal={Cognition and Emotion},
  volume={24},
  number={7},
  pages={1153--1172},
  year={2010},
  publisher={Taylor \& Francis}
}
@article{watson1988,
  title={Development and validation of brief measures of positive and negative affect: the PANAS scales.},
  author={Watson, David and Clark, Lee Anna and Tellegen, Auke},
  journal={Journal of personality and social psychology},
  volume={54},
  number={6},
  pages={1063},
  year={1988},
  publisher={American Psychological Association}
}
@article{everett2013,
  title={The 12 item social and economic conservatism scale (SECS)},
  author={Everett, Jim AC},
  journal={PloS one},
  volume={8},
  number={12},
  pages={e82131},
  year={2013},
  publisher={Public Library of Science}
}
@article{gosling2003,
  title={A very brief measure of the Big-Five personality domains},
  author={Gosling, Samuel D and Rentfrow, Peter J and Swann Jr, William B},
  journal={Journal of Research in personality},
  volume={37},
  number={6},
  pages={504--528},
  year={2003},
  publisher={Elsevier}
}
@article{cacioppo1984,
  title={The efficient assessment of need for cognition},
  author={Cacioppo, John T and Petty, Richard E and Feng Kao, Chuan},
  journal={Journal of personality assessment},
  volume={48},
  number={3},
  pages={306--307},
  year={1984},
  publisher={Taylor \& Francis}
}
@article{gross2003,
  title={Individual differences in two emotion regulation processes: implications for affect, relationships, and well-being.},
  author={Gross, James J and John, Oliver P},
  journal={Journal of personality and social psychology},
  volume={85},
  number={2},
  pages={348},
  year={2003},
  publisher={American Psychological Association}
}


text:
message("")
message("project.mk")

target_link_libraries(${PROJECT_NAME}
        -Wl,--start-group
        gcc m c
        -Wl,--whole-archive
        ${SDK_ROOT}/src/${PROJ}/face_lib/lib_face.a
        -Wl,--no-whole-archive
        -Wl,--end-group
        )

message("")

extension: cmake


text:
package main

import (
  "io/ioutil"
  "net/http"
  "os"
  "fmt"
  "bufio"
)

func buildFilePath(r *http.Request) (path string) {
  return "/tmp/go/" + r.URL.Path[3:]
}

func readHandler(w http.ResponseWriter, r *http.Request) {
  content, err := ioutil.ReadFile(buildFilePath(r))
  if err != nil {
    http.Error(w, err.Error(), http.StatusNotFound)
    return
  }
  w.Write(content)
}

func check(e error) {
  if e != nil {
    panic(e)
  }
}

func writeBodyToFile(completeFilePath string, body string) {
  file, err := os.Create(completeFilePath)
  check(err)
  defer file.Close()

  writer := bufio.NewWriter(file)
  defer writer.Flush()

  fmt.Fprintln(writer, body)
}

func writeHandler(w http.ResponseWriter, r *http.Request) {
  body, err := ioutil.ReadAll(r.Body)
  defer r.Body.Close()
  if err != nil {
    http.Error(w, http.StatusText(http.StatusNotFound), 404)
    return
  }
  writeBodyToFile(buildFilePath(r), string(body))
}

func main() {
  http.HandleFunc("/r/", readHandler)
  http.HandleFunc("/w/", writeHandler)
  http.ListenAndServe(":8080", nil)
}

repository: itanor/basic-go

repo_name: itanor/basic-go


text:
SUMMARY = "Python-apt is a wrapper to use features of apt from python."
LICENSE = "GPL-2.0-only & FSFAP"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                    file://debian/copyright;md5=4ed7b6862ca422678b17e7d4ed592285"

SRC_URI = "git://salsa.debian.org/apt-team/python-apt.git;protocol=https;branch=main"

SRCREV = "3252935b6224b3bd2e2250894b9559b47c61b2e1"

S = "${WORKDIR}/git"

inherit setuptools3

DEPENDS += "apt"
RDEPENDS:${PN} += "apt python3-core"

FILES:${PN} = "${libdir} ${datadir}/python-apt"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_license_id: MIT

gha_language: BitBake


text:
package models

import (
	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/sqlite"
	"log"
)

var (
	ErrRecordNotFound = gorm.ErrRecordNotFound
)

func init() {
	db, err := gorm.Open("sqlite3", "./data/data.db")
	if err != nil {
		log.Fatalf("Fatal error: %v", err.Error())
	}
	defer db.Close()

	// 在此注册模型
	db.AutoMigrate(&Image{})
}

func connDB() (*gorm.DB, error) {
	db, err := gorm.Open("sqlite3", "./data/data.db")
	if err != nil {
		return nil, err
	}
	return db, nil
}

gha_language: Go


text:
@InProceedings{gonzalez09a,
  title = {Residual Splash for Optimally Parallelizing Belief Propagation},
  author = {Joseph Gonzalez and Yucheng Low and Carlos Guestrin},
  pages = {177--184},
  abstract = {As computer architectures move towards parallelism we must build a    new theoretical understanding of parallelism in machine learning.    In this paper we focus on parallelizing message passing inference    algorithms in graphical models. We develop a theoretical    understanding of the limitations of parallelism in belief    propagation and bound the optimal achievable running parallel    performance on a certain class of graphical models.  We demonstrate    that the fully synchronous parallelization of belief propagation is    highly inefficient.  We provide a new parallel belief propagation    which achieves optimal performance on a certain class of graphical    models.  Using two challenging real-world problems, we empirically    evaluate the performance of our algorithm. On the real-world    problems, we find that our new algorithm achieves near linear    performance improvements and out performs alternative parallel    belief propagation algorithms.},
  pdf = {http://jmlr.org/proceedings/papers/v5/gonzalez09a/gonzalez09a.pdf},
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_language: TeX


text:
@article{andricovich2018loss,
 author = {Andricovich, Jaclyn and Perkail, Stephanie and Kai, Yan and Casasanta, Nicole and Peng, Weiqun and Tzatsos, Alexandros},
 journal = {Cancer cell},
 number = {3},
 pages = {512--526},
 publisher = {Elsevier},
 title = {Loss of KDM6A Activates Super-Enhancers to Induce Gender-Specific Squamous-like Pancreatic Cancer and Confers Sensitivity to BET Inhibitors},
 volume = {33},
 year = {2018}
}


text:
SUMMARY = "Cert_create & Fiptool for fip generation for Trusted Firmware-A"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"

SRC_URI = "git://github.com/ARM-software/arm-trusted-firmware.git;protocol=https;branch=master \
           file://0001-tools-allow-to-use-a-root-key-password-from-command-.patch \
           "

SRCREV = "35f4c7295bafeb32c8bcbdfb6a3f2e74a57e732b"

DEPENDS = "openssl"

COMPATIBLE_HOST:class-target = "null"

S = "${WORKDIR}/git"

EXTRA_OEMAKE += "V=1 HOSTCC='${BUILD_CC}' OPENSSL_DIR='${STAGING_EXECPREFIXDIR}'"
EXTRA_OEMAKE += "certtool fiptool"

do_configure[noexec] = "1"

do_compile:prepend () {
    # This is still needed to have the native fiptool executing properly by
    # setting the RPATH
    sed -e '/^LDLIBS/ s,$, \$\{BUILD_LDFLAGS},' \
        -e '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' \
        -i ${S}/tools/fiptool/Makefile
    sed -i '/^LIB/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/cert_create/Makefile
}

do_install() {
    install -d ${D}${bindir}
    install -m 0755 \
        ${B}/tools/fiptool/fiptool \
        ${B}/tools/cert_create/cert_create \
        ${D}${bindir}
}

BBCLASSEXTEND += "native nativesdk"

repository: foundriesio/meta-lmp

repo_name: foundriesio/meta-lmp


text:
SUMMARY = "Low level configuration database backend for GSettings"
HOMEPAGE = "https://wiki.gnome.org/Projects/dconf"

LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"

SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/dconf/0.27/dconf-${PV}.tar.xz"
SRC_URI[archive.md5sum] = "30bb3010ecd36d6e53ddbc40ef4b80ec"
SRC_URI[archive.sha256sum] = "37daf52e68d03ca0b6d0c2e0df7acac64e091074457ae306683b78b5cfa7e9ce"

DEPENDS = "glib-2.0 xmlto-native glib-2.0-native"

GNOMEBASEBUILDCLASS = "meson"
inherit gnomebase gobject-introspection gettext vala

FILES_${PN} += "\
    ${libdir}/gio/modules/libdconfsettings.so \
    ${datadir}/bash-completion/completions/dconf \
    ${datadir}/vala/vapi \
    ${datadir}/dbus-1/services \
"

BBCLASSEXTEND= "native"

repository: nicepixels/citadel

repo_name: nicepixels/citadel


text:
PR = "r1"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

inherit systemd

RDEPENDS:${PN} += "iperf3"

SRC_URI += "file://iperf3.service"

SYSTEMD_SERVICE:${PN} += "iperf3.service"

do_install() {
  # Install service definitions
  install -d -m 0755 ${D}${systemd_system_unitdir}
  install -m 0644 ${WORKDIR}/iperf3.service ${D}${systemd_system_unitdir}
}

# Allow IPERF3 to run on the gbmcbr node on DEV builds
do_install:append:dev() {
  nftables_dir=${D}${sysconfdir}/nftables
  rules=$nftables_dir/50-gbmc-iperf3-dev.rules
  install -d -m0755 $nftables_dir
  echo 'table inet filter {' >"$rules"
  echo '    chain gbmc_br_pub_input {' >>"$rules"
  echo '        tcp dport 5201 accept' >>"$rules"
  echo '    }' >>"$rules"
  echo '}' >>"$rules"
}

repository: openbmc/openbmc

repo_name: openbmc/openbmc

gha_license_id: NOASSERTION

gha_language: Python


text:
package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"regexp"

	"github.com/pkg/errors"
	log "github.com/sirupsen/logrus"

	"github.com/Luzifer/rconfig/v2"
)

type metric string

const (
	metricQuery metric = "dns_query"
	metricBlock metric = "dns_block"
)

var (
	cfg = struct {
		InfluxDBName   string `flag:"influx-db-name" description:"Database name of the InfluxDB" validate:"nonzero"`
		InfluxHost     string `flag:"influx-host" description:"Hostname of the InfluxDB" validate:"nonzero"`
		InfluxPass     string `flag:"influx-pass" description:"Password of the InfluxDB" validate:"nonzero"`
		InfluxUser     string `flag:"influx-user" description:"Username of the InfluxDB" validate:"nonzero"`
		LogLevel       string `flag:"log-level" default:"info" description:"Log level (debug, info, warn, error, fatal)"`
		VersionAndExit bool   `flag:"version" default:"false" description:"Prints current version and exits"`
	}{}

	metrics *metricsSender

	regBlock = regexp.MustCompile(`([0-9:.]+)#.*: rpz QNAME NXDOMAIN rewrite ([^/]+)/([^/]+)/IN`)
	regQuery = regexp.MustCompile(`([0-9:.]+)#.*: query: ([^ ]+) IN ([^ ]+) \+`)

	version = "dev"
)

func init() {
	rconfig.AutoEnv(true)
	if err := rconfig.ParseAndValidate(&cfg); err != nil {
		log.Fatalf("Unable to parse commandline options: %s", err)
	}

	if cfg.VersionAndExit {
		fmt.Printf("bind-log-metrics %s\n", version)
		os.Exit(0)
	}

	if l, err := log.ParseLevel(cfg.LogLevel); err != nil {
		log.WithError(err).Fatal("Unable to parse log level")
	} else {
		log.SetLevel(l)
	}
}

func main() {
	var err error

	if metrics, err = newMetricsSender(cfg.InfluxHost, cfg.InfluxUser, cfg.InfluxPass, cfg.InfluxDBName); err != nil {
		log.WithError(err).Fatal("Unable to create metrics client")
	}

	go func() {
		for err := range metrics.Errors() {
			log.WithError(err).Error("Metrics processing caused an error")
		}
	}()

	var input io.Reader = os.Stdin
	if len(rconfig.Args()) > 1 {
		f, err := os.Open(rconfig.Args()[1])
		if err != nil {
			log.WithError(err).Fatal("Unable to open input file")
		}
		defer f.Close()

		input = f
	}

	scanner := bufio.NewScanner(input)
	for scanner.Scan() {
		var line = scanner.Text()

		// Re-yield the line scanned from stdin
		fmt.Fprintln(os.Stdout, line)

		switch {

		case regBlock.MatchString(line):
			err = handleRecord(metricBlock, regBlock.FindStringSubmatch(line))

		case regQuery.MatchString(line):
			err = handleRecord(metricQuery, regQuery.FindStringSubmatch(line))

		default:
			continue

		}

		if err != nil {
			log.WithError(err).Error("Unable to process line")
		}
	}

	if err := scanner.Err(); err != nil {
		log.WithError(err).Fatal("Scanner caused an error")
	}
}

func handleRecord(m metric, groups []string) error {
	return errors.Wrap(
		metrics.RecordPoint(string(m), map[string]string{
			"client": groups[1],
			"domain": groups[2],
			"type":   groups[3],
		}, map[string]interface{}{
			"count": 1,
		}),
		"Unable to add metrics point",
	)
}

repository: Luzifer/bind-log-metrics

repo_name: Luzifer/bind-log-metrics


text:
package configsrc

import (
	"errors"
	"fmt"
	"io/ioutil"
	"log"
	"reflect"

	"github.com/kelseyhightower/envconfig"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/s3"

	"gopkg.in/yaml.v2"
)

// ErrInvalidAppConfig indicates that an app config is of the wrong type.
var ErrInvalidAppConfig = errors.New("app config must be a struct pointer")

type ConfigSource struct {
	S3Bucket string `envconfig:"s3_bucket"`
	S3Key    string `envconfig:"s3_key"`
}

func Load(prefix string, appConfig interface{}) error {
	t := reflect.ValueOf(appConfig)

	if t.Kind() != reflect.Ptr {
		return ErrInvalidAppConfig
	}
	t = t.Elem()
	if t.Kind() != reflect.Struct {
		return ErrInvalidAppConfig
	}

	cfgSource := ConfigSource{}

	envconfigPrefix := fmt.Sprintf("%s_%s", prefix, "configsrc")
	err := envconfig.Process(envconfigPrefix, &cfgSource)

	if err != nil {
		return fmt.Errorf("error reading config source from environment: %v", err)
	}

	log.Printf("[CONFIGSRC-debug] Config source: %v\n", cfgSource)

	svc := s3.New(session.New())

	resp, err := svc.GetObject(&s3.GetObjectInput{
		Bucket: aws.String(cfgSource.S3Bucket),
		Key:    aws.String(cfgSource.S3Key),
	})

	if err != nil {
		return fmt.Errorf("error getting app config from S3: %v", err)
	}

	data, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return fmt.Errorf("error reading S3 GetObject response body: %v", err)
	}

	err = yaml.Unmarshal([]byte(data), appConfig)
	if err != nil {
		return fmt.Errorf("error unmarshalling yaml: %v", err)
	}

	return nil
}

repository: ekyoung/configsrc

repo_name: ekyoung/configsrc


text:
@article{wu2019arginine,
  title={Arginine vasotocin (AVT)/mesotocin (MT) receptors in chickens: evidence for the possible involvement of AVT-AVPR1 signaling in the regulation of oviposition and pituitary prolactin expression},
  author={Wu, Chao and Lv, Can and Wan, Yiping and Li, Xiaoxiao and Zhang, Jiannan and Li, Juan and Wang, Yajun},
  journal={General and comparative endocrinology},
  volume={281},
  pages={91--104},
  year={2019},
  publisher={Elsevier}
}

repository: biozhangjn/Blog

repo_name: biozhangjn/Blog


text:
@inproceedings{li2018CSTIC,
 author = {Li,Jing},
 booktitle = {2018 China Semiconductor Technology International Conference (CSTIC)},
 date = {2018-03-12},
 issn = {},
 keywords = {conference},
 month = {March},
 number = {},
 pages = {1--4},
 title = {Nonvolatile Memory Outlook: Technology Driven or Application Driven? (INVITED)},
 volume = {},
 year = {2018}
}


text:
@Article{Cohen:Daubechies:Vial:1993,
	Title = {Wavelets on the Interval and Fast Wavelet Transforms},
	Author = {Albert Cohen and Ingrid Daubechies and Pierre Vial},
	Journal = {Applied and Computational Harmonic Analysis},
	Year = {1993},
	Month = {12},
	Number = {1},
	Pages = {54--81},
	Volume = {1},
	Doi = {10.1006/acha.1993.1005},
}

@Article{Strang:1989,
	Title = {Wavelets and Dilation Equations: A Brief Introduction},
	Author = {Gilbert Strang},
	Journal = {SIAM Review},
	Year = {1989},
	Volume = {31},
	Number = {4},
	Pages = {614--627},
	Doi = {10.1137/1031128}
}

@Book{Mallat:2009,
	Title = {A Wavelet Tour of Signal Processing},
	Subtitle = {The Sparse Way},
	Author = {St{\' e}phane Mallat},
	Year = {2009},
	Edition = {3},
	Publisher = {Academic Press}
}

gha_language: Julia


text:
package freexl

/*
#cgo linux pkg-config: freexl
#cgo darwin LDFLAGS: -lfreexl
#cgo windows LDFLAGS: -lfreexl
#include <stdlib.h>
#include <stdio.h>
#include <freexl.h>
// End Import

static int freexl_cell_get_type(FreeXL_CellValue cell) {
	return cell.type;
}

static int freexl_cell_get_int_value(FreeXL_CellValue cell) {
  return cell.value.int_value;
}

static double freexl_cell_get_double_value(FreeXL_CellValue cell) {
  return cell.value.double_value;
}

static const char * freexl_cell_get_text_value(FreeXL_CellValue cell) {
  return cell.value.text_value;
}
*/
import "C"

import (
	"bytes"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"unsafe"
)

// Freexl handle
type Freexl struct {
	handle   unsafe.Pointer
	MaxSheet int
	Sheets   []Sheet
}

// Sheet handle
type Sheet struct {
	MaxRow int
	MaxCol int
	Name   string
	Values [][]string
}

// Open filepath
func Open(path string) (f *Freexl, err error) {
	f = &Freexl{}
	err = f.Open(path)
	if err != nil {
		return nil, err
	}

	return f, nil
}

// OpenReader with temporary file
func OpenReader(r io.Reader) (f *Freexl, err error) {
	f = &Freexl{}
	tmp, err := ioutil.TempFile(os.TempDir(), "freexls")
	if err != nil {
		return nil, err
	}
	defer os.Remove(tmp.Name())

	_, err = io.Copy(tmp, r)
	if err != nil {
		return nil, err
	}

	err = f.Open(tmp.Name())
	if err != nil {
		return nil, err
	}

	return f, nil
}

// OpenBinary with temporary file
func OpenBinary(b []byte) (f *Freexl, err error) {
	return OpenReader(bytes.NewReader(b))
}

// Open file with defined handle
func (f *Freexl) Open(path string) error {
	pName := C.CString(path)
	defer C.free(unsafe.Pointer(pName))
	defer C.freexl_close(f.handle)

	ret := C.freexl_open(pName, &f.handle)
	if ret != OK {
		return fmt.Errorf("Freexl: error opening %s : %d", path, ret)
	}

	info, err := f.getInfo(BIFF_SHEET_COUNT)
	if err != nil {
		return err
	}

	f.MaxSheet = info
	f.Sheets = make([]Sheet, f.MaxSheet)

	for i, sheet := range f.Sheets {
		if err = sheet.getInfo(i, f.handle); err != nil {
			return err
		}
		f.Sheets[i] = sheet
	}

	return nil
}

func (f *Freexl) getInfo(t int) (int, error) {
	var info C.uint
	ret := C.freexl_get_info(f.handle, C.ushort(t), &info)
	if ret != OK {
		return 0, fmt.Errorf("Freexl: error get info %d: %d", t, ret)
	}

	return int(info), nil
}

func (s *Sheet) getInfo(i int, handle unsafe.Pointer) error {
	var name *C.char
	var numRow C.uint
	var numCol C.ushort

	ret := C.freexl_get_worksheet_name(handle, C.ushort(i), &name)
	if ret != OK {
		return fmt.Errorf("Freexl: error get sheet name :%d", ret)
	}

	s.Name = C.GoString(name)

	ret = C.freexl_select_active_worksheet(handle, C.ushort(i))
	if ret != OK {
		return fmt.Errorf("Freexl: failed to selct worksheet: %s", ret)
	}

	ret = C.freexl_worksheet_dimensions(handle, &numRow, &numCol)
	if ret != OK {
		return fmt.Errorf("Freexl: failed to get dimensions: %s", ret)
	}

	s.MaxRow = int(numRow)
	s.MaxCol = int(numCol)

	s.Values = make([][]string, s.MaxRow)

	for i, row := range s.Values {
		row = make([]string, s.MaxCol)
		var cell C.FreeXL_CellValue
		for j := range row {
			ret = C.freexl_get_cell_value(handle, C.uint(i), C.ushort(j), &cell)
			if ret != OK {
				continue
			}

			switch C.freexl_cell_get_type(cell) {
			case CELL_DOUBLE:
				row[j] = fmt.Sprintf("%1.12f", float64(C.freexl_cell_get_double_value(cell)))
			case CELL_INT:
				row[j] = fmt.Sprintf("%d", int(C.freexl_cell_get_int_value(cell)))
			case CELL_TEXT, CELL_SST_TEXT, CELL_DATE, CELL_DATETIME, CELL_TIME:
				row[j] = C.GoString(C.freexl_cell_get_text_value(cell))
			default:
				fallthrough
			case CELL_NULL:
				row[j] = ""
			}
		}

		s.Values[i] = row
	}

	return nil
}

repository: thedumptruck/go-freexl

repo_name: thedumptruck/go-freexl


text:
@inproceedings{Detter2015,
 author = {Detter, A. and Rust, S.},
 booktitle = {Gehölz-Symposium Hannover},
 keywords = {Vortrag},
 owner = {Steffen Rust},
 pages = {209--210},
 title = {Zugversuche},
 year = {2015}
}

repository: Baumtomographie/academic-kickstart

repo_name: Baumtomographie/academic-kickstart


text:
@article{mocapfileformats,
author = {Meredith, Michael and Maddock, Steve},
year = {2001},
month = {01},
pages = {1-36},
title = {Motion Capture File Formats Explained},
journal = {Production}
}

@article{buss,
  title={Introduction to inverse kinematics with jacobian transpose, pseudoinverse and damped least squares methods},
  author={Buss, Samuel R},
  journal={IEEE Journal of Robotics and Automation},
  volume={17},
  number={1-19},
  pages={16},
  year={2004}
}

@inproceedings{hsieh,
  title={Motion retargeting and transition in different articulated figures},
  author={Hsieh, Ming-Kai and Chen, Bing-Yu and Ouhyoung, Ming},
  booktitle={Ninth International Conference on Computer Aided Design and Computer Graphics (CAD-CG'05)},
  pages={6--pp},
  year={2005},
  organization={IEEE}
}

@inproceedings{monzani,
  title={Using an intermediate skeleton and inverse kinematics for motion retargeting},
  author={Monzani, Jean-S{\'e}bastien and Baerlocher, Paolo and Boulic, Ronan and Thalmann, Daniel},
  booktitle={Computer Graphics Forum},
  volume={19},
  number={3},
  pages={11--19},
  year={2000},
  organization={Wiley Online Library}
}

@article{molla,
  title={Egocentric mapping of body surface constraints},
  author={Molla, Eray and Debarba, Henrique Galvan and Boulic, Ronan},
  journal={IEEE transactions on visualization and computer graphics},
  volume={24},
  number={7},
  pages={2089--2102},
  year={2018},
  doi={10.1109/TVCG.2017.2708083},
  ISSN={1077-2626},
  publisher={IEEE}
}

@book{kitagawa,
  title={MoCap for artists: workflow and techniques for motion capture},
  author={Kitagawa, Midori and Windsor, Brian},
  year={2012},
  publisher={Focal Press}
}

@inproceedings{henne,
  title={The making of toy story [computer animation]},
  author={Henne, Mark and Hickel, Hal and Johnson, Ewan and Konishi, Sonoko},
  booktitle={COMPCON'96. Technologies for the Information Superhighway Digest of Papers},
  pages={463--468},
  year={1996},
  organization={IEEE}
}

@article{demartino,
    author={De Martino, Jos{\'e} Mario
    and Silva, Ivani Rodrigues
    and Bolognini, Carmen Zink
    and Costa, Paula Dornhofer Paro
    and Kumada, Kate Mamhy Oliveira
    and Coradine, Luis Cl{\'a}udius
    and Brito, Patrick Henrique da Silva
    and do Amaral, Wanessa Machado
    and Benetti, {\^A}ngelo Brand{\~a}o
    and Poeta, Enzo Telles
    and Angare, Leandro Martin Guertzenstein
    and Ferreira, Carolina Monteiro
    and De Conti, Davi Faria},
    title={Signing avatars: making education more inclusive},
    journal={Universal Access in the Information Society},
    year={2017},
    day={01},
    volume={16},
    number={3},
    pages={793--808},
    issn={1615-5297},
    doi={10.1007/s10209-016-0504-x},
    url={https://doi.org/10.1007/s10209-016-0504-x}
}

repository: rltonoli/MotionRetargeting

repo_name: rltonoli/MotionRetargeting

gha_language: Jupyter Notebook


text:
package router

import (
	"fmt"
	"io"
	"net/http"

	"github.com/cuigh/auxo/errors"
)

// Tree represents a route tree based on Trie data structure.
type Tree struct {
	opts     Options
	root     *node
	maxParam int
}

// Options represents route tree options.
type Options struct {
	// todo:
	//IgnoreCase bool
	//DecodeParam bool
}

type Route interface {
	//Method() string
	Path() string
	Handler() interface{}
	Params() []string
	URL(params ...interface{}) string
}

// New creates a route tree.
func New(opts Options) *Tree {
	return &Tree{
		root: newNode(kindStatic, "", nil),
		opts: opts,
	}
}

// MaxParam returns max parameters of all routes.
func (t *Tree) MaxParam() int {
	return t.maxParam
}

// Add register a route with specific methods to the tree.
func (t *Tree) Add(method, path string, handler interface{}) (Route, error) {
	if path[0] != '/' {
		return nil, errors.New("path must start with '/'")
	}

	n, err := t.root.add(path)
	if err != nil {
		return nil, err
	}

	r, err := n.setHandler(method, handler)
	if err == nil {
		if l := len(n.params); l > t.maxParam {
			t.maxParam = l
		}
	}
	return r, err
}

// Find tries to find a matched route in the tree.
func (t *Tree) Find(method, path string, paramValues []string) (r Route, tsr bool) {
	var route *route
	route, tsr = t.root.find(method, path, paramValues, 0)
	if route != nil {
		r = route
	}
	return
}

// Walk traverses all route nodes of tree.
func (t *Tree) Walk(fn func(r Route, method string)) {
	methods := [...]string{
		http.MethodConnect,
		http.MethodDelete,
		http.MethodGet,
		http.MethodHead,
		http.MethodOptions,
		http.MethodPatch,
		http.MethodPost,
		http.MethodPut,
		http.MethodTrace,
	}
	t.root.walk(false, func(n *node) {
		for _, m := range methods {
			if r := n.getRoute(m); r != nil && r.handler != nil {
				fn(r, m)
			}
		}
	})
}

// Print prints all routes.
func (t *Tree) Print(w io.Writer) {
	allMethods := [...]string{
		http.MethodConnect,
		http.MethodDelete,
		http.MethodGet,
		http.MethodHead,
		http.MethodOptions,
		http.MethodPatch,
		http.MethodPost,
		http.MethodPut,
		http.MethodTrace,
	}
	t.root.walk(false, func(n *node) {
		var methods []string
		for _, m := range allMethods {
			if r := n.getRoute(m); r != nil && r.handler != nil {
				methods = append(methods, m)
			}
		}

		if len(methods) > 0 {
			fmt.Fprintln(w, n.path, methods)
		} else {
			fmt.Fprintln(w, n.path)
		}
	})
}

repository: cuigh/auxo

repo_name: cuigh/auxo


text:
SUMMARY = "websocket-client module is WebSocket client for python."
LICENSE = "LGPL"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4999ff812affd4e43e9848e8bfc732cb"

RDEPENDS_${PN} = " \
  python-six \
"

PYPI_PACKAGE = "websocket_client"

SRC_URI[md5sum] = "a93c5992ce7ecee8fa97a318ef604923"
SRC_URI[sha256sum] = "18f1170e6a1b5463986739d9fd45c4308b0d025c1b2f9b88788d8f69e8a5eb4a"

PR = "r0"

inherit pypi setuptools

repository: TUhybridlab/meta-vj

repo_name: TUhybridlab/meta-vj


text:
@inproceedings{henderikx2018intention,
 author = {Henderikx, Maartje and Kreijns, Karel and Kalz, Marco},
 booktitle = {2018 Learning With MOOCS (LWMOOCS)},
 organization = {IEEE},
 pages = {110--112},
 title = {Intention-Behavior Dynamics in MOOC Learning; What Happens to Good Intentions Along the Way?},
 year = {2018}
}

repository: mkalz/mkalz-academic

repo_name: mkalz/mkalz-academic


text:
package query_test

import (
	"testing"

	"github.com/stretchr/testify/assert"

	"github.com/tendermint/tendermint/libs/pubsub/query"
)

func TestEmptyQueryMatchesAnything(t *testing.T) {
	q := query.Empty{}
	assert.True(t, q.Matches(map[string][]string{}))
	assert.True(t, q.Matches(map[string][]string{"Asher": {"Roth"}}))
	assert.True(t, q.Matches(map[string][]string{"Route": {"66"}}))
	assert.True(t, q.Matches(map[string][]string{"Route": {"66"}, "Billy": {"Blue"}}))
}

repository: FirmaChain/tendermint

repo_name: FirmaChain/tendermint


text:
package gotwtr

import (
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
)

// This endpoint is only available to those users who have been approved for the Academic Research product track.
func searchFullArchiveTweets(ctx context.Context, c *client, query string, opt ...*TweetSearchOption) (*TweetSearchResponse, error) {
	return nil, nil
}

func searchRecentTweets(ctx context.Context, c *client, query string, opt ...*TweetSearchOption) (*TweetSearchResponse, error) {
	switch {
	case len(query) == 0:
		return nil, errors.New("tweets search recent: query is required")
	case len(query) > tweetSearchMaxQueryLength:
		return nil, errors.New("tweets search recent: query is too long")
	default:
	}

	tweetRecent := tweetRecentSearch + "?query=" + query

	req, err := http.NewRequestWithContext(ctx, http.MethodGet, tweetRecent, nil)
	if err != nil {
		return nil, fmt.Errorf("tweets search recent: %w", err)
	}
	req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", c.bearerToken))

	var topt TweetSearchOption
	switch len(opt) {
	case 0:
		// do nothing
	case 1:
		topt = *opt[0]
	default:
		return nil, errors.New("tweets search recent: only one option is allowed")
	}
	topt.addQuery(req)

	resp, err := c.client.Do(req)
	if err != nil {
		return nil, fmt.Errorf("tweets search recent: %w", err)
	}
	defer resp.Body.Close()

	var tsr TweetSearchResponse
	if err := json.NewDecoder(resp.Body).Decode(&tsr); err != nil {
		return nil, fmt.Errorf("tweets search recent: %w", err)
	}
	if resp.StatusCode != http.StatusOK {
		return nil, &HTTPError{
			APIName: "tweets search recent",
			Status:  resp.Status,
			URL:     req.URL.String(),
		}
	}

	return &tsr, nil
}

repository: peaceiris/gotwtr

repo_name: peaceiris/gotwtr


text:
@inproceedings{rhodes_role_2021,
 abstract = {With increasing levels of distributed energy resources (DERs) connected to the grid, it is important to understand the role that DERs can play in post-disaster restoration. In this paper, we propose a two-step optimization method to identify and implement an optimal restoration schedule under different DER operating scenarios. We investigate how the presence and geographical distribution of DERs change the optimal restoration order, and assess the impacts on customers with and without DERs. In our case study using the IEEE 123 single phase distribution system, we find that optimal restoration order changes significantly when DERs are concentrated in one part of the grid. We also observe that the presence of DERs generally reduces the energy not served across all customers and can help prioritize grid reconnection of customers without DERs.},
 author = {Rhodes, Noah and Roald, Line},
 keywords = {Electrical Engineering and Systems Science - Systems and Control},
 month = {December},
 note = {arXiv: 2112.06317},
 publisher = {Hawaii International Conference on Systems Sciences},
 title = {The Role of Distributed Energy Resources in Distribution System Restoration},
 year = {2022}
}


text:
SECTION = "libs"
require libmodule-build-perl_${PV}.bb
inherit native
EXTRA_CPANFLAGS += " EXPATINCPATH='${STAGING_INCDIR}' EXPATLIBPATH='${STAGING_LIBDIR}'"


text:
// mpg123.go contains all bindings to the C library

package mpg123

/*
#include <mpg123.h>
#cgo LDFLAGS: -lmpg123

int do_mpg123_read(mpg123_handle *mh, void *outmemory, size_t outmemsize, size_t *done) {
	return mpg123_read(mh, outmemory, outmemsize, done);
}
*/
import "C"

import (
	"errors"
	"fmt"
	"os"
	"unsafe"
)

var EOF = errors.New("EOF")

// All output encoding formats supported by mpg123
const (
	ENC_8           = C.MPG123_ENC_8
	ENC_16          = C.MPG123_ENC_16
	ENC_24          = C.MPG123_ENC_24
	ENC_32          = C.MPG123_ENC_32
	ENC_SIGNED      = C.MPG123_ENC_SIGNED
	ENC_FLOAT       = C.MPG123_ENC_FLOAT
	ENC_SIGNED_8    = C.MPG123_ENC_SIGNED_8
	ENC_UNSIGNED_8  = C.MPG123_ENC_UNSIGNED_8
	ENC_ULAW_8      = C.MPG123_ENC_ULAW_8
	ENC_ALAW_8      = C.MPG123_ENC_ALAW_8
	ENC_SIGNED_16   = C.MPG123_ENC_SIGNED_16
	ENC_UNSIGNED_16 = C.MPG123_ENC_UNSIGNED_16
	ENC_SIGNED_24   = C.MPG123_ENC_SIGNED_24
	ENC_UNSIGNED_24 = C.MPG123_ENC_UNSIGNED_24
	ENC_SIGNED_32   = C.MPG123_ENC_SIGNED_32
	ENC_UNSIGNED_32 = C.MPG123_ENC_UNSIGNED_32
	ENC_FLOAT_32    = C.MPG123_ENC_FLOAT_32
	ENC_FLOAT_64    = C.MPG123_ENC_FLOAT_64
	ENC_ANY         = C.MPG123_ENC_ANY
)

// Contains a handle for and mpg123 decoder instance
type Decoder struct {
	handle *C.mpg123_handle
}

// init initializes the mpg123 library when package is loaded
func init() {
	err := C.mpg123_init()
	if err != C.MPG123_OK {
		//return fmt.Errorf("error initializing mpg123")
		panic("failed to initialize mpg123")
	}
	//return nil
}

///////////////////////////
// DECODER INSTANCE CODE //
///////////////////////////

// NewDecoder creates a new mpg123 decoder instance
func NewDecoder(decoder string) (*Decoder, error) {
	var err C.int
	var mh *C.mpg123_handle
	if decoder != "" {
		mh = C.mpg123_new(nil, &err)
	} else {
		cdecoder := C.CString(decoder)
		defer C.free(unsafe.Pointer(cdecoder))
		mh = C.mpg123_new(cdecoder, &err)
	}
	if mh == nil {
		errstring := C.mpg123_plain_strerror(err)
		err := C.GoString(errstring)
		C.free(unsafe.Pointer(errstring))
		return nil, fmt.Errorf("error initializing mpg123 decoder: %s", err)
	}
	dec := new(Decoder)
	dec.handle = mh
	return dec, nil
}

// Delete frees an mpg123 decoder instance
func (d *Decoder) Delete() {
	C.mpg123_delete(d.handle)
}

// returns a string containing the most recent error message corresponding to
// an mpg123 decoder instance
func (d *Decoder) strerror() string {
	return C.GoString(C.mpg123_strerror(d.handle))
}

////////////////////////
// OUTPUT FORMAT CODE //
////////////////////////

// FormatNone disables all decoder output formats (used to specifying supported formats)
func (d *Decoder) FormatNone() {
	C.mpg123_format_none(d.handle)
}

// FromatAll enables all decoder output formats (this is the default setting)
func (d *Decoder) FormatAll() {
	C.mpg123_format_all(d.handle)
}

// GetFormat returns current output format
func (d *Decoder) GetFormat() (rate int64, channels int, encoding int) {
	var cRate C.long
	var cChans, cEnc C.int
	C.mpg123_getformat(d.handle, &cRate, &cChans, &cEnc)
	return int64(cRate), int(cChans), int(cEnc)
}

// Format sets the audio output format for decoder
func (d *Decoder) Format(rate int64, channels int, encodings int) {
	C.mpg123_format(d.handle, C.long(rate), C.int(channels), C.int(encodings))
}

/////////////////////////////
// INPUT AND DECODING CODE //
/////////////////////////////

// Open initializes a decoder for an mp3 file using a filename
func (d *Decoder) Open(file string) error {
	cfile := C.CString(file)
	defer C.free(unsafe.Pointer(cfile))
	err := C.mpg123_open(d.handle, cfile)
	if err != C.MPG123_OK {
		return fmt.Errorf("error opening %s: %s", file, d.strerror())
	}
	return nil
}

// OpenFile binds to an fd from an open *os.File for decoding
func (d *Decoder) OpenFile(f *os.File) error {
	err := C.mpg123_open_fd(d.handle, C.int(f.Fd()))
	if err != C.MPG123_OK {
		return fmt.Errorf("error attaching file: %s", d.strerror())
	}
	return nil
}

// OpenFeed prepares a decoder for direct feeding via Feed(..)
func (d *Decoder) OpenFeed() error {
	err := C.mpg123_open_feed(d.handle)
	if err != C.MPG123_OK {
		return fmt.Errorf("mpg123 error: %s", d.strerror())
	}
	return nil
}

// Close closes an input file if one was opened by mpg123
func (d *Decoder) Close() error {
	err := C.mpg123_close(d.handle)
	if err != C.MPG123_OK {
		return fmt.Errorf("mpg123 error: %s", d.strerror())
	}
	return nil
}

// Read decodes data and into buf and returns number of bytes decoded.
func (d *Decoder) Read(buf []byte) (int, error) {
	var done C.size_t
	err := C.do_mpg123_read(d.handle, (unsafe.Pointer)(&buf[0]), C.size_t(len(buf)), &done)
	if err == C.MPG123_DONE {
		return int(done), EOF
	}
	if err != C.MPG123_OK {
		return int(done), fmt.Errorf("mpg123 error: %s", d.strerror())
	}
	return int(done), nil
}

// Feed provides data bytes into the decoder
func (d *Decoder) Feed(buf []byte) error {
	err := C.mpg123_feed(d.handle, (*C.uchar)(unsafe.Pointer(&buf[0])), C.size_t(len(buf)))
	if err != C.MPG123_OK {
		return fmt.Errorf("mpg123 error: %s", d.strerror())
	}
	return nil
}


text:
package file

import (
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"strings"
)

//Data -- Container to keep the url and tags of a feed
type Data struct {
	URL  string
	Tags []string
}

/*
ExtractFileContent is responsible for extracting the
content from the rss url file. It does not validate this data.
*/
func ExtractFileContent(f string) (results []Data) {
	b, err := ioutil.ReadFile(f)
	if err != nil {
		log.Fatalf("Error when reading file: %s", err.Error())
	}

	lines := strings.Split(string(b), "\n")
	for _, line := range lines {
		l := strings.TrimSpace(line)

		//Check to see if the line is empty
		if strings.EqualFold(l, "") {
			continue
		}

		//Collect urls and tags
		items := strings.Split(l, " ")
		if len(items) == 1 {
			results = append(results, Data{items[0], []string{}})
		} else if len(items) > 1 {
			results = append(results, Data{items[0], items[1:]})
		}
	}
	return results
}

/*
CheckFile is responsible for making sure that
the file exist, which includes

- making sure that the file path exists
- making sure that the file path is not a directory
*/
func CheckFile(file string) (err error) {
	if strings.EqualFold(file, "") {
		return fmt.Errorf("file cannot be an empty string")
	}

	fileInfo, err := os.Stat(file)

	//File does not exist
	if os.IsNotExist(err) {
		return fmt.Errorf("file %s does not exist", file)
	}

	//Path exists, but it is a directory and not a file
	if fileInfo.IsDir() {
		return fmt.Errorf("%s is not a file", file)
	}

	return nil
}

repository: crazcalm/go-rss-reader

repo_name: crazcalm/go-rss-reader


text:
SUMMARY = "Hawaii desktop environment shell"
LICENSE = "GPLv2 & LGPLv2"
LIC_FILES_CHKSUM = " \
	file://LICENSE.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
	file://LICENSE.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
"

inherit hawaii systemd pythonnative distro_features_check

REQUIRED_DISTRO_FEATURES = "wayland"

SRC_URI += " \
    file://0001-find-host-s-git.patch \
"
SRCREV = "2c4fc11957193263c02dead910a2ca1b3a383d7a"
PV = "0.6.90+git${SRCPV}"

S = "${WORKDIR}/git"

DEPENDS += " \
    qtwayland-native \
    wayland \
    libqtxdg \
    solid \
    libhawaii \
    greenisland \
"

# REVISIT optionals
DEPENDS += " \
    alsa-lib \
    pulseaudio \
"

EXTRA_OECMAKE += " \
    -DSYSTEMD_USER_UNIT_DIR=${systemd_system_unitdir} \
"

PACKAGECONFIG[nm_qt] = "-DENABLE_NETWORK_MANAGER=ON,-DENABLE_NETWORK_MANAGER=OFF,networkmanager-qt modemmanager-qt"
PACKAGECONFIG ??= "nm_qt"

SYSTEMD_SERVICE_${PN} = "hawaii.service"

# for starter scripts
RDEPENDS_${PN} = "qttools-tools qtwayland-plugins"

# REVISIT optionals
RRECOMMENDS_${PN} += " \
    hawaii-wallpapers \
    hawaii-icon-theme \
"

FILES_${PN} += " \
    ${datadir} \
    ${systemd_unitdir} \
    ${OE_QMAKE_PATH_QML} \
"


text:
@inproceedings{masoero2018posterior,
 author = {Masoero, Lorenzo and Camerlenghi, Federico and Favaro, Stefano and Broderick, Tamara},
 booktitle = {NeurIPS Workshop on All of Bayesian Nonparametrics},
 title = {Posterior representations of hierarchical completely random measures in trait allocation models},
 year = {2018}
}

repository: lorenzomasoero/academic-kickstart

repo_name: lorenzomasoero/academic-kickstart


text:
# Copyright (c) 2012-2014 LG Electronics, Inc.

SUMMARY = "Enyo 1.0 JavaScript application framework"
SECTION = "webos/frameworks"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

PV = "1.0-128.2+git${SRCPV}"
SRCREV = "02502917b3ea60add7f6a08aa706dd00bc232c5b"

inherit webos_ports_fork_repo
inherit webos_filesystem_paths
#inherit webos_cmake
inherit allarch

SRC_URI = "${WEBOS_PORTS_GIT_REPO_COMPLETE}"
S = "${WORKDIR}/git"

WEBOS_GIT_PARAM_BRANCH = "webOS-ports/wam-sam"

do_install() {
    install -d ${D}${webos_frameworksdir}/enyo/0.10/framework
    cp -vrf ${S}/framework/* ${D}${webos_frameworksdir}/enyo/0.10/framework

    # Create symlink for enyo/1.0 (points to enyo/0.10)
    ln -vs 0.10 ${D}${webos_frameworksdir}/enyo/1.0
    # Create symlink for tellurium (so the inspector doesn't give errors)
    ln -vs enyo/0.10/framework/build/palm/tellurium ${D}${webos_frameworksdir}/tellurium
}

FILES:${PN} += "${webos_frameworksdir}"

repository: webOS-ports/meta-webos-ports

repo_name: webOS-ports/meta-webos-ports

branch_name: refs/heads/kirkstone


text:
%--------- Current Mode Logic over Temperature -------
@INPROCEEDINGS{Liu2015,
author={S. Liu and K. Li and P. Wilson},
booktitle={2015 IEEE International Symposium on Circuits and Systems (ISCAS)},
title={A temperature independent driver for Mach-Zehnder modulators},
year={2015},
volume={},
number={},
pages={1474-1477},
keywords={CMOS integrated circuits;amplifiers;driver circuits;optical modulation;Mach-Zehnder modulators;adaptive feedback topology;fully differential inductor-less temperature independent laser driver;push pull structure;size 130 nm;temperature 27 degC to 135 degC;temperature independent driver;Bandwidth;Computer architecture;Gain;Limiting;Optical buffering;Optical transmitters;Topology;Laser driver;adaptive active feedback;low cost;low power;optical modulator;push pull;temperature variation},
doi={10.1109/ISCAS.2015.7168923},
ISSN={0271-4302},
month={May},}
@ARTICLE{Andricciola2009,
author={P. Andricciola and H. P. Tuinhout},
journal={IEEE Electron Device Letters},
title={The Temperature Dependence of Mismatch in Deep-Submicrometer Bulk MOSFETs},
year={2009},
volume={30},
number={6},
pages={690-692},
keywords={CMOS integrated circuits;MOSFET;temperature measurement;CMOS platform;deep-submicrometer bulk MOSFET;relative-drain-current-mismatch fluctuation;size 65 nm;temperature 0 degC to 125 degC;temperature dependence;transistor mismatch;CMOS;fluctuation sweep;mismatch;subthreshold region;temperature effect},
doi={10.1109/LED.2009.2020524},
ISSN={0741-3106},
month={June},}
@ARTICLE{Shoucair1989,
author={F. S. Shoucair},
journal={IEEE Transactions on Components, Hybrids, and Manufacturing Technology},
title={Scaling, subthreshold, and leakage current matching characteristics in high-temperature (25 deg;C-250 deg;C) VLSI CMOS devices},
year={1989},
volume={12},
number={4},
pages={780-788},
keywords={CMOS integrated circuits;VLSI;analogue-digital conversion;digital integrated circuits;elemental semiconductors;environmental testing;gold;integrated circuit technology;leakage currents;linear integrated circuits;metallisation;reliability;silicon;2 micron;25 to 250 degC;4 micron;6 micron;Au based metallizations;CMOS technology scaling;CMOS transmission gate;Si devices;VLSI CMOS devices;analog circuit applications;channel mobility;data circuit design;diffusion-leakage currents;digital circuit applications;drain leakage currents;elevated temperatures;feature length;high temperature electronics;leakage-current matching;low-resistance epitaxial layers;resolution-speed tradeoffs;sampled data circuits;severe-environment behavior;simple capacitor;source-to-body leakage currents;standard CMOS process;subthreshold characteristics;subthreshold parameter;temperature-induced trends;threshold voltage;Analog circuits;CMOS process;CMOS technology;Capacitors;Digital circuits;Leakage current;Sampled data circuits;Silicon;Temperature;Threshold voltage},
doi={10.1109/33.49047},
ISSN={0148-6411},
month={Dec},}

% physics for Si indirect bandgap over temperature
@article{Klenner1992,
author = {Klenner M. and Falter C. and Ludwig W.},
title = {Temperature dependence of band gaps in Si and Ge in the quasi‐ion model},
journal = {Annalen der Physik},
volume = {504},
number = {1},
pages = {34-38},
keywords = {Electron‐phonon interaction, Density response, Phonons‐lattice dynamics},
doi = {10.1002/andp.19925040107},
url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/andp.19925040107},
eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/andp.19925040107},
abstract = {Abstract We have calculated the temperature dependence of the direct and indirect band gaps in silicon and germanium. The electron‐phonon potential as well as the phonon frequencies and eigenvectors are calculated consistently within the rigid quasi‐ion model. Comparison is made with experiment and with the theoretical results of Allen and Cardona and Lautenschlager et al.}
}

@article{Lautenschlager1985,
  title = {Temperature dependence of band gaps in Si and Ge},
  author = {Lautenschlager, P. and Allen, P. B. and Cardona, M.},
  journal = {Phys. Rev. B},
  volume = {31},
  issue = {4},
  pages = {2163--2171},
  numpages = {0},
  year = {1985},
  month = {Feb},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevB.31.2163},
  url = {https://link.aps.org/doi/10.1103/PhysRevB.31.2163}
}

repository: LudwigCRON/thesis

repo_name: LudwigCRON/thesis


text:
SUMMARY = "A collection of ASN.1-based protocols modules."
DESCRIPTION = "A collection of ASN.1 modules expressed in form of pyasn1\
 classes. Includes protocols PDUs definition (SNMP, LDAP etc.) and various\
 data structures (X.509, PKCS etc.)."
HOMEPAGE = "https://github.com/etingof/pyasn1-modules"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a14482d15c2249de3b6f0e8a47e021fd"

SRC_URI[md5sum] = "107e1ece7d0a41d782f69f8a95a4d9bc"
SRC_URI[sha256sum] = "905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e"

inherit pypi ptest setuptools3

RDEPENDS:${PN} = "${PYTHON_PN}-pyasn1"

BBCLASSEXTEND = "native nativesdk"

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

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

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

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded


text:
#
# This file was derived from the 'Hello World!' example recipe in the
# Yocto Project Development Manual.
#

DESCRIPTION = "Main control application for Novaled VOST or ldms"
SECTION = "examples"
# RDEPENDS_${PN} = "ldms-gpio czmq zeromq lua jansson mariadb"
RDEPENDS_${PN} = "czmq zeromq lua jansson mariadb"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=96af5705d6f64a88e035781ef00e98a8"

PR = "r7"

# This tells bitbake where to find the files we're providing on the local filesystem
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

# Use local tarball
# SRC_URI = "git://git@gitserver/opt/git/ldms.git;protocol=ssh;branch=code_reorganization"
SRC_URI = "git://git@localhost/home/git/repos/ldms.git;protocol=ssh;branch=feat/lua53"

# SRCBRANCH = "feat/lua53"
# SRCREV = "34967ebade2fab61087463218cd86c6d9af141ed"
# SRCREV = "17a5cff827a974c484c49f0b9213269d413bb8cf"
SRCREV = "17a5cff827a974c484c49f0b9213269d413bb8cf"

# SRCREV = "${AUTOREV}"

# Make sure our source directory (for the build) matches the directory structure in the tarball
# S = "${WORKDIR}/ldms-${PV}"
S = "${WORKDIR}/git"

inherit autotools
inherit systemd

do_install_append() {
    # Copy service file
    install -d ${D}/${systemd_unitdir}/system
    install -c -m 644 ${S}/ldms.service ${D}/${systemd_unitdir}/system
}

# The autotools configuration I am basing this on seems to have a problem with a race condition when parallel make is enabled
PARALLEL_MAKE = ""

NATIVE_SYSTEMD_SUPPORT = "1"
# SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "ldms.service"
FILES_${PN} = "${bindir}/${PN} ${datadir} ${datadir}/${PN}"
FILES_${PN} += " ${datadir}/${PN}/init.lua"
FILES_${PN} += " ${datadir}/${PN}/exit.lua"


text:
DESCRIPTION = "A TADS interpreter."
HOMEPAGE = "http://www.tads.org
SECTION = "console/network"

SRC_URI = "http://www.tads.org/frobtads/${PN}-${PV}.tar.gz"

inherit autotools


text:
DESCRIPTION = "Microchip QT home automation demo"
LICENSE = "ATMEL_LLA"
LIC_FILES_CHKSUM = "file://main.cpp;endline=146;md5=fa39b3d717088cee47df5eeb61b548b3"

PR = "r2"

PACKAGES = "${PN}-dbg ${PN}"

DEPENDS = "qtbase qtwebkit libv4l"
inherit qmake5

SRC_URI = "https://github.com/linux4sam/home-automation/archive/v${PV}.tar.gz;downloadfilename=home-automation-${PV}.tar.gz"

SRC_URI[md5sum] = "4f2ea34a05e74557697eb9d3e49679fe"
SRC_URI[sha256sum] = "ac7ea4ab4ee474c453d1339199fa71a8a3c20c007dfaac3fef68285384d994e0"

S = "${WORKDIR}/home-automation-${PV}"

inherit pkgconfig

FILES_${PN}-dbg = " \
	/opt/HomeAutomation/HomeAutomation/.debug \
	/opt/HomeAutomation/.debug/HomeAutomation \
	/usr/* \
	"

FILES_${PN} = " \
	/opt/HomeAutomation/HomeAutomation \
	/opt/HomeAutomation/HomeAutomation.sh \
	/opt/HomeAutomation/microchip-stylesheet.qss \
	/opt/HomeAutomation/resources/* \
	/opt/HomeAutomation/stations/* \
	/opt/HomeAutomation/CustomWidgets/* \
	/opt/HomeAutomation/media/* \
	/opt/HomeAutomation/images/* \
        /opt/ApplicationL* \
	"

do_install() {
	make INSTALL_ROOT=${D} install
	install -m 0755 ${B}/HomeAutomation ${D}/opt/HomeAutomation/
}

repository: kamel-bouhara/meta-atmel

repo_name: kamel-bouhara/meta-atmel


text:
package main

import (
	"bufio"
	"bytes"
	"crypto/tls"
	"fmt"
	"net/http"
	"os"
	"strings"
	"sync"
	"time"
)

var wg sync.WaitGroup

func RunIt(domain string) {
	target := "http://" + domain + "/.git/HEAD"
	targetClient := http.Client{Timeout: 2 * time.Second}
	targetResp, err := targetClient.Get(target)
	if err != nil {
		return
	}
	if targetResp.StatusCode != 200 {
		return
	}
	buf := new(bytes.Buffer)
	buf.ReadFrom(targetResp.Body)
	newStr := buf.String()
	// fmt.Println(strings.Contains(newStr, "refs/heads"))
	if strings.Contains(newStr, "refs/heads") {
		fmt.Println(domain)
	}
	defer wg.Done()
}

func SecureRunIt(domain string) {
	target := "https://" + domain + "/.git/HEAD"
	http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
	targetClient := http.Client{Timeout: 2 * time.Second}
	targetResp, err := targetClient.Get(target)
	if err != nil {
		return
	}
	if targetResp.StatusCode != 200 {
		return
	}
	buf := new(bytes.Buffer)
	buf.ReadFrom(targetResp.Body)
	newStr := buf.String()
	// fmt.Println(strings.Contains(newStr, "refs/heads"))
	if strings.Contains(newStr, "refs/heads") {
		fmt.Println(domain)
	}
	defer wg.Done()
}

func EnvRunIt(domain string) {
	target := "http://" + domain + "/.env"
	targetClient := http.Client{Timeout: 2 * time.Second}
	targetResp, err := targetClient.Get(target)
	if err != nil {
		return
	}
	if targetResp.StatusCode != 200 {
		return
	}
	fmt.Println(domain)
	defer wg.Done()
}

func SecureEnvRunIt(domain string) {
	target := "https://" + domain + "/.env"
	http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
	targetClient := http.Client{Timeout: 2 * time.Second}
	targetResp, err := targetClient.Get(target)
	if err != nil {
		return
	}
	if targetResp.StatusCode != 200 {
		return
	}
	fmt.Println(domain)
	defer wg.Done()
}

func main() {
	banner :=
		`
	 _____        _____      _    _____ _ _
	/ ____|      / ____|    | |  / ____(_) |
       | |  __  ___ | |  __  ___| |_| |  __ _| |_
       | | |_ |/ _ \| | |_ |/ _ \ __| | |_ | | __|
       | |__| | (_) | |__| |  __/ |_| |__| | | |_
	\_____|\___/ \_____|\___|\__|\_____|_|\__|

	Get Git and other juicy low hanging fruits...
	Support/Contribute: https://github.com/ahboon/GoFindGit
	`
	fmt.Println(banner)
	helpertext :=
		`
Usage:
	./gofindgit <mode> <domains_text_file_name>

	Modes:
	- git
		Scans for git repo exposed in web root. http://example.com/.git/ OR https://example.com/.git/
	- env
		Scans for .env exposed in web root. http://example.com/.env/ OR https://example.com/.env/
	`
	argsWithoutProg := os.Args[1:]
	if len(argsWithoutProg) < 1 {
		fmt.Println(helpertext)
		return
	} else if os.Args[1] == "help" {
		fmt.Println(helpertext)
		return
	}
	file, err := os.Open(os.Args[2])
	if err != nil {
		fmt.Println("File does not exist")
	}
	defer file.Close()

	scanner := bufio.NewScanner(file)
	if os.Args[1] == "git" {
		for scanner.Scan() {
			wg.Add(1)
			go RunIt(scanner.Text())
			wg.Add(1)
			go SecureRunIt(scanner.Text())

		}
	} else if os.Args[1] == "env" {
		for scanner.Scan() {
			wg.Add(1)
			go EnvRunIt(scanner.Text())
			wg.Add(1)
			go SecureEnvRunIt(scanner.Text())

		}
	} else {
		fmt.Println("To get help, run './gofindgit help'")
	}

	wg.Wait()
}

repository: ahboon/GoFindGit

repo_name: ahboon/GoFindGit


text:
package config

import "github.com/jinzhu/configor"

// SyncGroup between Nextcloud and Trello.
type SyncGroup struct {
	Name      string
	Type      string
	Nextcloud struct {
		Board int
		Stack int
	}
	Trello struct {
		Board string
		List  string
	}
}

// Config data.
type Config struct {
	Interval  uint64
	Debug     bool
	Log       string
	Nextcloud struct {
		API      string
		Username string
		Password string
	}
	Trello struct {
		Key   string
		Token string
	}
	Sync []SyncGroup
}

// Load config.
func Load() Config {
	var conf Config
	err := configor.New(&configor.Config{ErrorOnUnmatchedKeys: true}).Load(&conf, "config.yml")
	if err != nil {
		panic(err)
	}
	return conf
}

license: Unlicense

repository: voicon/Nextcloud-TrelloSync

repo_name: voicon/Nextcloud-TrelloSync


text:
@STRING{ foo = "foo" }

@string ( bar = { bar } )

@StRiNg{baz="baz"}

@string{ foobarbaz = "foo" #
    { bar } # "baz" }

@string{ aaa = "AAA" }@string{bbb={BBB}} @string(ccc = "CCC")@article{no_spaces_test,title=aaa#bbb#ccc,}

@book{test_concat_whitespace,
    title = {foo}
    # " "#
    {bar}    # " "

    #baz,
}

@article{parses_defined_strings,
    title = foo # bar # baz,
    note = foobarbaz,
}

@book{skips_over_unknown_string,
    title = mystring # "Title starts here",
}

@string{mystring = "Now this string is available to use"}

@article{parses_string_above_now_that_its_available,
    title = mystring # {!},
}

repository: dsifford/astrocite

repo_name: dsifford/astrocite

gha_language: TypeScript


text:
package web

import (
	"net"
	"net/http"
	"os"
	"strings"
)

func contains(ip string, cidrs ...*net.IPNet) bool {
	addr := net.ParseIP(ip)
	for _, cidr := range cidrs {
		if cidr.Contains(addr) {
			return true
		}
	}
	return false
}

// If s starts with one of suffixs; return ture
func hasSuffixs(s string, suffixs ...string) bool {
	for _, suffix := range suffixs {
		if ok := strings.HasSuffix(s, suffix); ok {
			return true
		}
	}
	return false
}

func hasPrefixs(s string, prefixs ...string) bool {
	for _, prefix := range prefixs {
		if ok := strings.HasPrefix(s, prefix); ok {
			return true
		}
	}
	return false
}

func toHTTPError(err error) int {
	if os.IsNotExist(err) {
		return http.StatusNotFound
	}
	if os.IsPermission(err) {
		return http.StatusForbidden
	}
	return http.StatusInternalServerError
}

repository: corex-io/web

repo_name: corex-io/web


text:
DESCRIPTION = "Packages for IBM Bluemix & Watson platforms."
LICENSE = "MIT"

inherit packagegroup

PR = "r0"

RDEPENDS_${PN} = "\
	ibm-iotf-embeddedc \
	ibm-iotf-embeddedc-dev \
	ibm-iotf-embeddedc-samples \
	node-red-contrib-ibm-watson-iot \
	python-ibmiotf \
"

PACKAGES = "${PN}"

PACKAGECONFIG ??= "java"
PACKAGECONFIG[java] = "\
	, \
	, \
	, \
	ibm-iotf-java \
"

repository: aelmadho/meta-iot-cloud

repo_name: aelmadho/meta-iot-cloud


text:
package project

// ProjectEnvironmentVariable is a Environment Variable of a Project
type ProjectEnvironmentVariable struct {
	Name  string
	Value string
}

// ProjectInfo is the info of a Project
type ProjectInfo struct {
	Id string
}

// ProjectClient is the interface to interact with project and it's
// components.
type ProjectClient interface {
	ProjectInfo(vcs, org, project string) (*ProjectInfo, error)
	ListAllEnvironmentVariables(vcs, org, project string) ([]*ProjectEnvironmentVariable, error)
	GetEnvironmentVariable(vcs, org, project, envName string) (*ProjectEnvironmentVariable, error)
	CreateEnvironmentVariable(vcs, org, project string, v ProjectEnvironmentVariable) (*ProjectEnvironmentVariable, error)
}

repository: CircleCI-Public/circleci-cli

repo_name: CircleCI-Public/circleci-cli

branch_name: refs/heads/develop


text:
package main

import (
	"io"
	"log"
	"net/http"
	"strings"
)

func proxyToCnote(w http.ResponseWriter, r *http.Request) {
	// don't cache any API responses
	forceRevalidate(w)
	path := r.URL.Path[len("/api/"):]
	path = strings.Replace(path, "#", "%23", -1)
	path = strings.Replace(path, "?", "%3F", -1)
	uri := "http://127.0.0.1:1969/" + path
	resp, err := http.Get(uri)
	if err != nil {
		log.Printf("err proxying %s: %r\n", uri, err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}
	defer resp.Body.Close()
	if proxiedType := resp.Header.Get("Content-Type"); proxiedType != "" {
		w.Header().Add("Content-Type", proxiedType)
	}
	w.WriteHeader(resp.StatusCode)
	io.Copy(w, resp.Body)
}

func proxyToGodoc(w http.ResponseWriter, r *http.Request) {
	// don't cache any API responses
	forceRevalidate(w)
	path := r.URL.Path
	uri := "http://127.0.0.1:6060/" + path
	resp, err := http.Get(uri)
	if err != nil {
		log.Printf("err proxying %s: %r\n", uri, err)
		w.WriteHeader(http.StatusInternalServerError)
		return
	}
	defer resp.Body.Close()
	if proxiedType := resp.Header.Get("Content-Type"); proxiedType != "" {
		w.Header().Add("Content-Type", proxiedType)
	}
	w.WriteHeader(resp.StatusCode)
	io.Copy(w, resp.Body)
}

repository: bpowers/lightswitchrave

repo_name: bpowers/lightswitchrave


text:
package gcal

import (
	"context"
	"io/ioutil"
	"reflect"
	"testing"
	"time"

	"cloud.google.com/go/httpreplay"
	"github.com/ghodss/yaml"
	"github.com/spinnaker/rotation-scheduler/schedule"
	"google.golang.org/api/calendar/v3"
)

const (
	testCalendarID = "spinbot@spinnaker.io"
)

// schedule.replay file generated with:
// JSON_KEY=$(cat rotation-scheduler.json | base64 -w 0)
// go run rotation.go calendar sync --record ./gcal/testing/schedule.replay --jsonKey $JSON_KEY ./gcal/testing/test_schedule.yaml
func TestSchedule(t *testing.T) {
	replayer, err := httpreplay.NewReplayer("testing/schedule.replay")
	if err != nil {
		t.Fatalf("cannot initializer HTTP replayer: %v", err)
	}

	client, err := replayer.Client(context.Background())
	if err != nil {
		t.Fatalf("cannot initialize client from replayer: %v", err)
	}

	gcalUnderTest, err := NewGCal(testCalendarID, client)
	if err != nil {
		t.Fatalf("cannot create new gcal: %v", err)
	}

	testSchedBytes, err := ioutil.ReadFile("testing/test_schedule.yaml")
	if err != nil {
		t.Fatalf("cannot read test schedule: %v", err)
	}

	testSched := &schedule.Schedule{}
	err = yaml.Unmarshal(testSchedBytes, testSched)
	if err != nil {
		t.Fatalf("cannot read schedule from yaml file: %v", err)
	}

	err = gcalUnderTest.Schedule(testSched)
	if err != nil {
		t.Errorf("error during scheduling: %v", err)
	}
}

func TestInternalEvent(t *testing.T) {
	for _, tc := range []struct {
		desc     string
		schedule *schedule.Schedule
		want     []*internalEvent
	}{
		{
			desc: "single day separation",
			schedule: &schedule.Schedule{
				Shifts: []*schedule.Shift{
					{
						StartDate: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
						User:      "first",
					},
					{
						StartDate:    time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC),
						StopDate:     time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC),
						User:         "second",
						UserOverride: "third",
					},
				},
			},
			want: []*internalEvent{
				{
					GcalEvent: &calendar.Event{
						Summary: eventSummary("first"),
						Start: &calendar.EventDateTime{
							Date: "2020-01-01",
						},
						End: &calendar.EventDateTime{
							Date: "2020-01-02",
						},
					},
					User:         "first",
					StopDateIncl: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
				},
				{
					GcalEvent: &calendar.Event{
						Summary: eventSummary("third"),
						Start: &calendar.EventDateTime{
							Date: "2020-01-02",
						},
						End: &calendar.EventDateTime{
							Date: "2020-01-03",
						},
					},
					User:         "third",
					StopDateIncl: time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC),
				},
			},
		},
		{
			desc: "multi day separation",
			schedule: &schedule.Schedule{
				Shifts: []*schedule.Shift{
					{
						StartDate: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
						User:      "first",
					},
					{
						StartDate: time.Date(2020, 1, 10, 0, 0, 0, 0, time.UTC),
						StopDate:  time.Date(2020, 1, 19, 0, 0, 0, 0, time.UTC),
						User:      "second",
					},
				},
			},
			want: []*internalEvent{
				{
					GcalEvent: &calendar.Event{
						Summary: eventSummary("first"),
						Start: &calendar.EventDateTime{
							Date: "2020-01-01",
						},
						End: &calendar.EventDateTime{
							Date: "2020-01-10",
						},
					},
					User:         "first",
					StopDateIncl: time.Date(2020, 1, 9, 0, 0, 0, 0, time.UTC),
				},
				{
					GcalEvent: &calendar.Event{
						Summary: eventSummary("second"),
						Start: &calendar.EventDateTime{
							Date: "2020-01-10",
						},
						End: &calendar.EventDateTime{
							Date: "2020-01-20",
						},
					},
					User:         "second",
					StopDateIncl: time.Date(2020, 1, 19, 0, 0, 0, 0, time.UTC),
				},
			},
		},
	} {
		t.Run(tc.desc, func(t *testing.T) {
			got := internalEvents(tc.schedule)

			if !reflect.DeepEqual(got, tc.want) {
				toStr := func(intEvents []*internalEvent) string {
					b, _ := yaml.Marshal(intEvents)
					return string(b)
				}
				t.Errorf("internal events do not match: want\n%v\n\ngot\n%v", toStr(tc.want), toStr(got))
			}
		})
	}
}

repository: ttomsu/rotation-scheduler

repo_name: ttomsu/rotation-scheduler


text:
@inproceedings{5747e29844ac42abb516c8d0d84977fc,
 abstract = {During the recent years several new tools have been introduced in the field of Operational Modal Analysis (OMA) such as the transmissibility-based approach and the OMAX concept. Most OMA estimators assume that the ambient forces are random noise sources with a flat amplitude spectrum. The transmissibility-based approach does not require this assumption: it works for almost any kind of ambient forces. The main advantage of the OMAX concept is the fact that it combines the advantages of Operational and Experimental Modal Analysis: ambient (unknown) forces as well as artificial (known) forces are processed simultaneously resulting in improved modal parameters. The main drawback of the existing OMAX estimators is related to the assumption that the ambient forces are white noise. In this paper, the transmissibility-based output-only approach will be combined with the input/output OMAX concept. This should result in a new methodology in the field of operational modal analysis allowing the estimation of (scaled) modal parameters in presence of arbitrary ambient (unknown) forces and artificial (known) forces. One important application is aeroelastic flutter. Flight flutter tests are necessary to assure that newly developed aircraft are free from flutter throughout the entire flight envelope. The airplane is excited by externally applied forces, but also due to turbulence. This turbulence excitation is not white at all, and can vary a lot between two flight phases. The transmissibility OMA approach benefits from changing operational loading conditions, and this enhances the accuracy of the estimated modal parameters. Our approach is tested on simulations and real-life measurements.},
 author = {De Troyer, Tim and Patrick Guillaume and Christof Devriendt and Mark Runacres},
 booktitle = {Proceedings of the International Noise and Vibration Engineering Conference ISMA},
 keywords = {modal analysis, omax, transmissibility},
 language = {English},
 month = {9},
 pages = {3263--3273},
 title = {Combined use of FRFs and transmissibility functions in an OMAX framework},
 year = {2010}
}

repository: mrunacre/academic-kickstart

repo_name: mrunacre/academic-kickstart