text:
package handler

import (
	"context"
	"fmt"
	"math"
	"net/http"
	"regexp"
	"sort"

	"github.com/imos/icfpc2019/go/util/db"
	"github.com/imos/icfpc2019/go/util/metadata"
	"google.golang.org/appengine/log"
)

func init() {
	registerHandler("/ranking/", rankingHandler)
}

func rankingHandler(ctx context.Context, r *http.Request) (HTML, error) {
	booster := r.FormValue("booster")

	log.Debugf(ctx, "starting ranking handler...")
	// problem_id, program_id => index of scores
	scoreTable := map[int64]map[int64]int{}

	log.Debugf(ctx, "fetching problems...")
	problems := []struct {
		ProblemID       int64  `db:"problem_id"`
		ProblemName     string `db:"problem_name"`
		ProblemDataBlob string `db:"problem_data_blob"`
	}{}
	if err := db.Select(ctx, &problems, `
		SELECT problem_id, problem_name, problem_data_blob FROM problems NATURAL JOIN problem_data
		ORDER BY problem_name`); err != nil {
		return "", err
	}
	problemNameByID := map[int64]string{}
	problemSizeByID := map[int64]int64{}
	for _, problem := range problems {
		problemNameByID[problem.ProblemID] = problem.ProblemName
		md, err := metadata.GetTaskMetadata(problem.ProblemDataBlob)
		if err != nil {
			return "", err
		}
		problemSizeByID[problem.ProblemID] = md.MaxX * md.MaxY
		scoreTable[problem.ProblemID] = map[int64]int{}
	}

	log.Debugf(ctx, "fetching programs...")
	programs := []struct {
		ProgramID   int64  `db:"program_id"`
		ProgramName string `db:"program_name"`
	}{}
	if err := db.Select(ctx, &programs, `
		SELECT program_id, program_name FROM programs`); err != nil {
		return "", err
	}
	programNameByID := map[int64]string{}
	for _, program := range programs {
		programNameByID[program.ProgramID] = program.ProgramName
	}

	log.Debugf(ctx, "fetching solutions...")
	type Score struct {
		ProblemID     int64 `db:"problem_id"`
		ProgramID     int64 `db:"program_id"`
		SolutionID    int64 `db:"solution_id"`
		SolutionScore int64 `db:"solution_score"`
		ComputedScore int64
	}
	scores := []Score{}
	if err := db.Select(ctx, &scores, `
		SELECT
			program_id,
			problem_id,
			MAX(solution_id) AS solution_id,
			MIN(solution_score) AS solution_score
		FROM solutions NATURAL JOIN problem_data
		WHERE
			solution_score IS NOT NULL AND
			solution_booster = ?
		GROUP BY program_id, problem_id`,
		booster); err != nil {
		return "", err
	}

	log.Debugf(ctx, "calculating best scores...")
	// problem_id => index of scores for best score
	bestScores := map[int64]int{}
	for idx, score := range scores {
		scoreTable[score.ProblemID][score.ProgramID] = idx
		if bestIdx, ok := bestScores[score.ProblemID]; !ok {
			bestScores[score.ProblemID] = idx
		} else if scores[bestIdx].SolutionScore > score.SolutionScore {
			bestScores[score.ProblemID] = idx
		}
	}

	log.Debugf(ctx, "calculating total scores...")
	// program_id => sum(ComputedScore)
	totalScores := map[int64]int64{}
	for idx, score := range scores {
		bestScore := scores[bestScores[score.ProblemID]].SolutionScore
		myScore := score.SolutionScore
		size := problemSizeByID[score.ProblemID]
		computedScore := int64(
			math.Ceil(1000 * math.Log2(float64(size)) * float64(bestScore) / float64(myScore)))
		if myScore >= 100000000 {
			computedScore = 0
		}
		scores[idx].ComputedScore = computedScore
		totalScores[score.ProgramID] += computedScore
	}

	log.Debugf(ctx, "listing program IDs...")
	programIDs := []int64{}
	for programID := range totalScores {
		programIDs = append(programIDs, programID)
	}
	sort.SliceStable(programIDs, func(i, j int) bool {
		return totalScores[programIDs[i]] > totalScores[programIDs[j]]
	})
	seenProgramName := map[string]bool{}
	oldProgramIDs := programIDs
	programIDs = []int64{}
	for _, programID := range oldProgramIDs {
		programName := programNameByID[programID]
		programName =
			regexp.MustCompile("@.*$").ReplaceAllString(programName, "")
		if seenProgramName[programName] {
			continue
		}
		seenProgramName[programName] = true
		programIDs = append(programIDs, programID)
	}

	boosters := []struct {
		SolutionBooster string `db:"solution_booster"`
	}{}
	if err := db.Select(ctx, &boosters, `
		SELECT DISTINCT solution_booster FROM solutions`); err != nil {
		return "", err
	}

	log.Debugf(ctx, "rendering rankings...")
	var output HTMLBuffer
	output.WriteHTML("Select booster: ")
	for _, b := range boosters {
		sb := Escape(b.SolutionBooster)
		sbn := sb
		if sbn == "" {
			sbn = "None"
		}
		output.WriteHTML(
			`<span style="display:inline-block;margin:0 1ex;">`,
			`[<a href="/ranking/?booster=`, sb, `">`,
			sbn, `</a>]</span>`)
	}
	output.WriteHTML("
")
	if booster == "" {
		output.WriteHTML("Ranking without boosters")
	} else {
		output.WriteString(fmt.Sprintf("Ranking with booster: %s", booster))
	}
	output.WriteHTML("
")
	// var output HTML
	output.WriteHTML(
		`<table class="table table-clickable">`,
		`<thead><tr><td>Problem</td><td colspan="2" align="center">Best</td>`)
	for i, programID := range programIDs {
		if i > 20 {
			break
		}
		output.WriteHTML(`<td colspan="2" align="center">`)
		output.WriteString(fmt.Sprintf("%d-th", i))
		output.WriteHTML(`<br><a href="/program?program_id=`)
		output.WriteString(fmt.Sprintf("%d", programID))
		output.WriteHTML(`">`)
		output.WriteString(programNameByID[programID])
		output.WriteHTML("	")
	}
	output.WriteHTML(`</thead><tbody>`)
	appendScore := func(s *Score, best bool) {
		if s == nil {
			output.WriteHTML(`<td align="right">-</td><td></td>`)
			return
		}
		note := Escape(fmt.Sprintf("%d", s.ComputedScore))
		if best {
			note = `<a href="/program?program_id=` +
				Escape(fmt.Sprintf("%d", s.ProgramID)) + `">` +
				Escape(programNameByID[s.ProgramID]) + `</a>`
		}
		output.WriteHTML(
			`<td align="right"><a href="/solution?solution_id=`)
		output.WriteString(fmt.Sprintf("%d", s.SolutionID))
		output.WriteHTML(`">`)
		if s.SolutionScore >= 100000000 {
			output.WriteHTML(
				`invalid</a></td><td>(`, note, ")	")
			return
		}
		output.WriteString(fmt.Sprintf("%d", s.SolutionScore))
		output.WriteHTML("	(", note, ")	")
	}
	for _, problem := range problems {
		output.WriteHTML("
")
		output.WriteString(problem.ProblemName)
		output.WriteHTML("	")

		appendScore(&scores[bestScores[problem.ProblemID]], true)

		programIDToScore := scoreTable[problem.ProblemID]
		for i, programID := range programIDs {
			if i > 20 {
				break
			}
			if idx, ok := programIDToScore[programID]; ok {
				appendScore(&scores[idx], false)
			} else {
				appendScore(nil, false)
			}
		}
		output.WriteHTML("
")
	}
	output.WriteHTML(`</tbody></table>`)
	log.Debugf(ctx, "finished rendering")
	return output.HTML(), nil
}

gha_language: Rust


text:
@article{Garat_2008,
  doi = {10.1016/j.bcp.2008.05.009},
  url = {https://doi.org/10.1016\%2Fj.bcp.2008.05.009},
  year = 2008,
  month = {aug},
  publisher = {Elsevier {BV}},
  volume = {76},
  number = {3},
  pages = {404--415},
  author = {A. Garat and C. Cauffiez and N. Renault and J.M. Lo-Guidice and D. Allorge and D. Chevalier and N. Houdret and P. Chavatte and M.A. Loriot and J.L. Gala and F. Broly},
  title = {Characterisation of novel defective thiopurine S-methyltransferase allelic variants},
  journal = {Biochemical Pharmacology}
}

license: MIT

repository: larmcr/px

license_type: permissive

repo_name: larmcr/px

branch_name: refs/heads/master

extension: bib


text:
@article{hitchhiker-paper,
    author = {Philipp H. W. Hoffmann},
    title = {A Hitchhiker's Guide to Automatic Differentiation},
    year = {2014},
    url = {http://arxiv.org/abs/1411.0583v4}
}

@article{baydin,
    author    = {Atilim Gunes Baydin and
                 Barak A. Pearlmutter and
                 Alexey Andreyevich Radul},
    title     = {Automatic differentiation in machine learning: a survey},
    journal   = {CoRR},
    volume    = {abs/1502.05767},
    year      = {2015},
    url       = {http://arxiv.org/abs/1502.05767},
    timestamp = {Mon, 02 Mar 2015 14:17:34 +0100},
    biburl    = {http://dblp.uni-trier.de/rec/bib/journals/corr/BaydinPR15},
    bibsource = {dblp computer science bibliography, http://dblp.org}
}

@article{10.2307/2370619,
    ISSN      = {00029327, 10806377},
    URL       = {http://www.jstor.org/stable/2370619},
    author    = {H. B. Curry},
    journal   = {American Journal of Mathematics},
    number    = {3},
    pages     = {509-536},
    publisher = {Johns Hopkins University Press},
    title     = {Grundlagen der Kombinatorischen Logik},
    volume    = {52},
    year      = {1930}
}

@article{parsec,
    author    = {Daan Leijen},
    title     = {Parsec, a fast combinator parser},
    year      = {2015},
    url       = {https://web.archive.org/web/20120401040711/http://legacy.cs.uu.nl/daan/download/parsec/parsec.pdf}
}

@misc{write-you-a-haskell,
    author = {Stephen Diehl},
    title  = {Write You a Haskell},
    url    = {http://dev.stephendiehl.com/fun/index.html},
    year   = {2015}
}

@book{real-world-haskell,
    author    = {O'Sullivan, Bryan and Goerzen, John and Stewart, Don},
    title     = {Real World Haskell},
    year      = {2008},
    isbn      = {0596514980, 9780596514983},
    edition   = {1st},
    publisher = {O'Reilly Media, Inc.},
}

@misc{ad-underused,
    author = {Justin Domke},
    title  = {Automatic Differentiation: The most criminally underused tool in the potential machine learning toolbox?},
    year   = {2009}
}

@misc{combinator-pattern,
    title = {Combinator pattern - Haskell Wiki},
    url   = {https://wiki.haskell.org/Combinator_pattern}
}

repository: Jiggins/Final-Year-Project

repo_name: Jiggins/Final-Year-Project


text:
@InProceedings{wong:humanoids:2018,
  author    = {Wong, Christopher, Yee and Ayusawa, Ko and Yoshida, Eiichi},
  title     = {Gravity compensation for impedance control of legged robots using optimizationless proportional contact force estimation},
  booktitle = {IEEE-RAS International Conference on Humanoid Robots},
  year      = {2018},
  pages     = {516--551},
  address   = {Beijing,China},
  month     = {November 6-November 9},
  url       = {https://staff.aist.go.jp/k.ayusawa/pdf/Wong\_2018\_Humanoids.pdf},
  doi       = {https://doi.org/10.1109/HUMANOIDS.2018.8625034},
  abstract  = {Impedance control of humanoid robots, a form of compliant control, allows them to move in a fashion similar to humans and increase the safety of interactions with humans or the environment. In low stiffness impedance control, gravitational forces will cause the robot to deviate significantly from the desired position. Thus, a gravity compensation term in the joint motor torque command is required to counteract gravitational forces. Ground reaction forces are sometimes used to estimate the gravity compensation torque required for each joint. In this paper, a novel method to estimate contact forces by using model mass properties and relative force and torque sensor data of each contact point with respect to all loaded limbs is proposed. This simple and straightforward method, called the proportional method, is able to resolve internal forces arising from closed-loop kinematic chains in multi-contact situations, for example the double support phase of bipedal robots, without optimization. The proposed method is also more robust to sensor error and is able to implicitly distinguish between gravitational and external forces for impedance control. Simulations and experiments using the humanoid robot HRP-4 are performed to validate the proposed method.}
}

gha_language: TeX


text:
@conference{DubeyHCSS2018,
 author = {Aron Laszka and Anastasia Mavridou and Abhishek Dubey},
 booktitle = {High Confidence Software and Systems Conference},
 keywords = {},
 oldkeywords = {blockchain},
 project = {cps-reliability},
 tag = {platform,decentralization},
 timestamp = {Wed, 16 Oct 2019 14:14:54 +0200},
 title = {Resilient and Trustworthy Transactive Platform for Smart and Connected Communities},
 year = {2018}
}


text:
package client_test

import (
	"testing"

	"github.com/stretchr/testify/require"

	"github.com/cosmos/cosmos-sdk/client"
)

func TestValidatePromptNotEmpty(t *testing.T) {
	require := require.New(t)

	require.NoError(client.ValidatePromptNotEmpty("foo"))
	require.ErrorContains(client.ValidatePromptNotEmpty(""), "input cannot be empty")
}

func TestValidatePromptURL(t *testing.T) {
	require := require.New(t)

	require.NoError(client.ValidatePromptURL("https://example.com"))
	require.ErrorContains(client.ValidatePromptURL("foo"), "invalid URL")
}

func TestValidatePromptAddress(t *testing.T) {
	require := require.New(t)

	require.NoError(client.ValidatePromptAddress("cosmos1huydeevpz37sd9snkgul6070mstupukw00xkw9"))
	require.NoError(client.ValidatePromptAddress("cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0"))
	require.NoError(client.ValidatePromptAddress("cosmosvalcons1ntk8eualewuprz0gamh8hnvcem2nrcdsgz563h"))
	require.ErrorContains(client.ValidatePromptAddress("foo"), "invalid address")
}

func TestValidatePromptCoins(t *testing.T) {
	require := require.New(t)

	require.NoError(client.ValidatePromptCoins("100stake"))
	require.ErrorContains(client.ValidatePromptCoins("foo"), "invalid coins")
}

repository: cosmos/cosmos-sdk

repo_name: cosmos/cosmos-sdk

branch_name: refs/heads/main

gha_language: Go

extension: go


text:
@proceedings{ws-2013-building,
    title = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    editor = "Sharoff, Serge  and
      Zweigenbaum, Pierre  and
      Rapp, Reinhard",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2500",
}
@inproceedings{apidianaki-etal-2013-cross,
    title = "Cross-lingual {WSD} for Translation Extraction from Comparable Corpora",
    author = "Apidianaki, Marianna  and
      Ljube{\v{s}}i{\'c}, Nikola  and
      Fi{\v{s}}er, Darja",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2501",
    pages = "1--10",
}
@inproceedings{kwon-etal-2013-bilingual,
    title = "Bilingual Lexicon Extraction via Pivot Language and Word Alignment Tool",
    author = "Kwon, Hong-Seok  and
      Seo, Hyeong-Won  and
      Kim, Jae-Hoon",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2502",
    pages = "11--15",
}
@inproceedings{bouamor-etal-2013-using,
    title = "Using {W}ord{N}et and Semantic Similarity for Bilingual Terminology Mining from Comparable Corpora",
    author = "Bouamor, Dhouha  and
      Semmar, Nasredine  and
      Zweigenbaum, Pierre",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2503",
    pages = "16--23",
}
@inproceedings{hazem-morin-2013-comparison,
    title = "A Comparison of Smoothing Techniques for Bilingual Lexicon Extraction from Comparable Corpora",
    author = "Hazem, Amir  and
      Morin, Emmanuel",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2504",
    pages = "24--33",
}
@inproceedings{chu-etal-2013-chinese,
    title = "{C}hinese{--}{J}apanese Parallel Sentence Extraction from Quasi{--}Comparable Corpora",
    author = "Chu, Chenhui  and
      Nakazawa, Toshiaki  and
      Kurohashi, Sadao",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2505",
    pages = "34--42",
}
@inproceedings{papavassiliou-etal-2013-modular,
    title = "A modular open-source focused crawler for mining monolingual and bilingual corpora from the web",
    author = "Papavassiliou, Vassilis  and
      Prokopidis, Prokopis  and
      Thurmair, Gregor",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2506",
    pages = "43--51",
}
@inproceedings{acs-etal-2013-building,
    title = "Building basic vocabulary across 40 languages",
    author = "{\'A}cs, Judit  and
      Pajkossy, Katalin  and
      Kornai, Andr{\'a}s",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2507",
    pages = "52--58",
}
@inproceedings{teich-etal-2013-scientific,
    title = "Scientific registers and disciplinary diversification: a comparable corpus approach",
    author = "Teich, Elke  and
      Degaetano-Ortlieb, Stefania  and
      Kermes, Hannah  and
      Lapshinova-Koltunski, Ekaterina",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2508",
    pages = "59--68",
}
@inproceedings{gupta-etal-2013-improving,
    title = "Improving {MT} System Using Extracted Parallel Fragments of Text from Comparable Corpora",
    author = "Gupta, Rajdeep  and
      Pal, Santanu  and
      Bandyopadhyay, Sivaji",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2509",
    pages = "69--76",
}
@inproceedings{lapshinova-koltunski-2013-vartra,
    title = "{VARTRA}: A Comparable Corpus for Analysis of Translation Variation",
    author = "Lapshinova-Koltunski, Ekaterina",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2510",
    pages = "77--86",
}
@inproceedings{genc-etal-2013-building,
    title = "Building Ontologies from Collaborative Knowledge Bases to Search and Interpret Multilingual Corpora",
    author = "Genc, Yegin  and
      Lennon, Elizabeth  and
      Mason, Winter  and
      Nickerson, Jeffrey",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2511",
    pages = "87--94",
}
@inproceedings{kontonatsios-etal-2013-using,
    title = "Using a Random Forest Classifier to recognise translations of biomedical terms across languages",
    author = "Kontonatsios, Georgios  and
      Korkontzelos, Ioannis  and
      Ananiadou, Sophia  and
      Tsujii, Jun{'}ichi",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2512",
    pages = "95--104",
}
@inproceedings{saad-etal-2013-comparing,
    title = "Comparing Multilingual Comparable Articles Based On Opinions",
    author = {Saad, Motaz  and
      Langlois, David  and
      Sma{\"\i}li, Kamel},
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2513",
    pages = "105--111",
}
@inproceedings{plamada-volk-2013-mining,
    title = "Mining for Domain-specific Parallel Text from {W}ikipedia",
    author = "Plamad{\u{a}}, Magdalena  and
      Volk, Martin",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2514",
    pages = "112--120",
}
@inproceedings{xu-etal-2013-gathering,
    title = "Gathering and Generating Paraphrases from Twitter with Application to Normalization",
    author = "Xu, Wei  and
      Ritter, Alan  and
      Grishman, Ralph",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2515",
    pages = "121--128",
}
@inproceedings{stambolieva-2013-learning,
    title = "Learning Comparable Corpora from Latent Semantic Analysis Simplified Document Space",
    author = "Stambolieva, Ekaterina",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2516",
    pages = "129--137",
}
@inproceedings{zhang-etal-2013-finding,
    title = "Finding More Bilingual Webpages with High Credibility via Link Analysis",
    author = "Zhang, Chengzhi  and
      Yao, Xuchen  and
      Kit, Chunyu",
    booktitle = "Proceedings of the Sixth Workshop on Building and Using Comparable Corpora",
    month = aug,
    year = "2013",
    address = "Sofia, Bulgaria",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W13-2517",
    pages = "138--143",
}

repository: emorynlp/nlprankings

repo_name: emorynlp/nlprankings

gha_license_id: NOASSERTION


text:
package main

import (
	"encoding/xml"
	"os"
	"fmt"
	"bufio"
	"io"
	"io/ioutil"
	"strings"
	l4g "github.com/ccpaging/nxlog4go"
	"github.com/ccpaging/nxlog4go/color"
	"github.com/ccpaging/nxlog4go/file"
	"github.com/ccpaging/nxlog4go/socket"
)

var filename string = "config.xml"

var log = l4g.GetLogger()
var filters = l4g.NewFilters()

// Appender's properties
type Prop struct {
	Name  string `xml:"name,attr"`
	Value string `xml:",chardata"`
}

type FilterConfig struct {
	Tag	  string `xml:"tag"`
	Level string `xml:"level"`
	Props []Prop `xml:"property"`
}

type LoggerConfig struct {
	Filters  []FilterConfig `xml:"filter"`
}

func loadFilter(fc *FilterConfig) {
	if len(fc.Tag) == 0 {
		log.Error("Required child tag")
		return
	}
	tag := strings.ToLower(fc.Tag)
	if len(fc.Level) == 0 {
		log.Error("Required child level")
		return
	}
	lvl := l4g.GetLevel(fc.Level)
	if lvl >= l4g.SILENT {
		log.Warn("Disable \"%s\" for level \"%s\"", tag, fc.Level)
		return
	}

	var appender l4g.Appender
	switch tag {
	case "color":
		appender = colorlog.NewAppender()
	case "file":
		appender = filelog.NewAppender("_test.log", 0)
	case "socket":
		appender = socketlog.NewAppender("udp", "127.0.0.1:12124")
	case "xml":
		appender = filelog.NewAppender("_test.log", 0)
		appender.SetOption("head","<log created=\"%D %T\">%R")

		appender.SetOption("pattern",
`	<record level="%L">
		<timestamp>%D %T</timestamp>
		<source>%S</source>
		<message>%M</message>
	</record>%R`)

		appender.SetOption("foot", "</log>%R")
	default:
		log.Error("Unknown appender <%s>", tag)
		return
	}

	ok := true
	for _, prop := range fc.Props {
		err := appender.SetOption(prop.Name, strings.Trim(prop.Value, " \r\n"))
		if err != nil {
			log.Error(err)
			ok = false
		}
	}
	if !ok {
		return
	}

	filters.Add(tag, lvl, appender)
}

// Print what was logged to the file (yes, I know I'm skipping error checking)
func PrintFile(fn string) {
	fd, _ := os.Open(fn)
	in := bufio.NewReader(fd)
	fmt.Print("Messages logged to file were: (line numbers not included)\n")
	for lineno := 1; ; lineno++ {
		line, err := in.ReadString('\n')
		if err == io.EOF {
			break
		}
		fmt.Printf("%3d:\t%s", lineno, line)
	}
	fd.Close()
}

func main() {
	// Open config file
	fd, err := os.Open(filename)
	if err != nil {
		panic(fmt.Sprintf("Can't load xml config file: %s %v", filename, err))
	}
	buf, err := ioutil.ReadAll(fd)
	if err != nil {
		fmt.Fprintf(os.Stderr, "Could not read %q: %s\n", filename, err)
		os.Exit(1)
	}

	fd.Close()

	xc := new(LoggerConfig)
	if err := xml.Unmarshal(buf, xc); err != nil {
		fmt.Fprintf(os.Stderr, "Could not parse XML configuration. %s\n", err)
		os.Exit(1)
	}
	log.Debug("Total configuration: %d", len(xc.Filters))
	// fmt.Println(lc)

	for _, fc := range xc.Filters {
		loadFilter(&fc)
	}
	log.Debug("Total appenders installed: %d", len(*filters))
	if filt := filters.Get("color"); filt != nil {
		// disable default console writer
		log.SetOutput(nil)
	}
	log.SetFilters(filters)

	// And now we're ready!
	log.Finest("This will only go to those of you really cool UDP kids!  If you change enabled=true.")
	log.Debug("Oh no!  %d + %d = %d!", 2, 2, 2+2)
	log.Trace("Oh no!  %d + %d = %d!", 2, 2, 2+2)
	log.Info("About that time, eh chaps?")

	log.SetFilters(nil)
	filters.Close()

	PrintFile("_test.log")
	os.Remove("_test.log")
	PrintFile("_trace.xml")
	os.Remove("_trace.xml")
}


text:
@article{li2017modular,
 author = {Li, Ying and Liu, Zeliang and Jia, Zheng and Liu, Wing Kam and Aldousari, Saad M and Hedia, Hassan S and Asiri, Saeed A},
 journal = {Computational Mechanics},
 number = {2},
 pages = {187--201},
 publisher = {Springer},
 title = {Modular-based multiscale modeling on viscoelasticity of polymer nanocomposites},
 volume = {59},
 year = {2017}
}


text:
package main

import (
	"fmt"
	"time"
)

func main() {
	sum := 0
	sum1 := 0
	//sum2 := 0

	start := time.Now()
	for i := 0; i < 100000000; i++ {
		sum += i
	}
	fmt.Println(sum)

	for i := 0; i < 10000000000; i++ {
		sum1 += i
	}
	fmt.Println(sum1)

	//for i := 0; i < 10000000000000; i++ {
	//	sum2 += i
	//}
	//fmt.Println(sum2)
	fmt.Println(time.Since(start))
}

repository: Sambrlon/Go

repo_name: Sambrlon/Go


text:
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/

%% Created for Chi Zhang at 2019-05-05 13:01:17 -0700

%% Saved with string encoding Unicode (UTF-8)

@book{nltk,
	Author = {Bird, Steven, Edward Loper and Ewan Klein},
	Date-Added = {2019-05-05 13:00:43 -0700},
	Date-Modified = {2019-05-05 13:01:16 -0700},
	Publisher = {O'Reilly Media Inc.},
	Title = {Natural Language Processing with Python},
	Year = {2009}}

@article{lstm,
	Acmid = {1246450},
	Address = {Cambridge, MA, USA},
	Author = {Hochreiter, Sepp and Schmidhuber, J\"{u}rgen},
	Date-Added = {2019-05-04 14:13:00 -0700},
	Date-Modified = {2019-05-04 14:13:04 -0700},
	Doi = {10.1162/neco.1997.9.8.1735},
	Issn = {0899-7667},
	Issue_Date = {November 15, 1997},
	Journal = {Neural Comput.},
	Month = nov,
	Number = {8},
	Numpages = {46},
	Pages = {1735--1780},
	Publisher = {MIT Press},
	Title = {Long Short-Term Memory},
	Url = {http://dx.doi.org/10.1162/neco.1997.9.8.1735},
	Volume = {9},
	Year = {1997},
	Bdsk-Url-1 = {http://dx.doi.org/10.1162/neco.1997.9.8.1735}}

@inproceedings{glove,
	Author = {Jeffrey Pennington and Richard Socher and Christopher D. Manning},
	Booktitle = {In EMNLP},
	Date-Added = {2019-05-02 14:46:03 -0700},
	Date-Modified = {2019-05-02 14:46:07 -0700},
	Title = {Glove: Global vectors for word representation},
	Year = {2014}}

@article{dual_attention,
	Archiveprefix = {arXiv},
	Author = {Yao Qin and Dongjin Song and Haifeng Cheng and Wei Cheng and Guofei Jiang and Garrison W. Cottrell},
	Bibsource = {dblp computer science bibliography, https://dblp.org},
	Biburl = {https://dblp.org/rec/bib/journals/corr/QinSCCJC17},
	Date-Added = {2019-05-01 16:02:49 -0700},
	Date-Modified = {2019-05-01 16:02:54 -0700},
	Eprint = {1704.02971},
	Journal = {CoRR},
	Timestamp = {Mon, 13 Aug 2018 16:46:50 +0200},
	Title = {A Dual-Stage Attention-Based Recurrent Neural Network for Time Series Prediction},
	Url = {http://arxiv.org/abs/1704.02971},
	Volume = {abs/1704.02971},
	Year = {2017},
	Bdsk-Url-1 = {http://arxiv.org/abs/1704.02971}}

@article{ppo,
	Archiveprefix = {arXiv},
	Author = {John Schulman and Filip Wolski and Prafulla Dhariwal and Alec Radford and Oleg Klimov},
	Bibsource = {dblp computer science bibliography, https://dblp.org},
	Biburl = {https://dblp.org/rec/bib/journals/corr/SchulmanWDRK17},
	Date-Added = {2019-03-10 21:50:55 -0700},
	Date-Modified = {2019-03-10 21:50:57 -0700},
	Eprint = {1707.06347},
	Journal = {CoRR},
	Timestamp = {Mon, 13 Aug 2018 16:47:34 +0200},
	Title = {Proximal Policy Optimization Algorithms},
	Url = {http://arxiv.org/abs/1707.06347},
	Volume = {abs/1707.06347},
	Year = {2017},
	Bdsk-Url-1 = {http://arxiv.org/abs/1707.06347}}

@article{bert,
	Archiveprefix = {arXiv},
	Author = {Jacob Devlin and Ming{-}Wei Chang and Kenton Lee and Kristina Toutanova},
	Bibsource = {dblp computer science bibliography, https://dblp.org},
	Biburl = {https://dblp.org/rec/bib/journals/corr/abs-1810-04805},
	Date-Added = {2019-03-10 21:27:56 -0700},
	Date-Modified = {2019-03-10 21:28:00 -0700},
	Eprint = {1810.04805},
	Journal = {CoRR},
	Timestamp = {Tue, 30 Oct 2018 20:39:56 +0100},
	Title = {{BERT:} Pre-training of Deep Bidirectional Transformers for Language Understanding},
	Url = {http://arxiv.org/abs/1810.04805},
	Volume = {abs/1810.04805},
	Year = {2018},
	Bdsk-Url-1 = {http://arxiv.org/abs/1810.04805}}

@article{kim_cnn_sentiment,
	Archiveprefix = {arXiv},
	Author = {Yoon Kim},
	Bibsource = {dblp computer science bibliography, https://dblp.org},
	Biburl = {https://dblp.org/rec/bib/journals/corr/Kim14f},
	Date-Added = {2019-03-10 21:26:42 -0700},
	Date-Modified = {2019-03-10 21:26:50 -0700},
	Eprint = {1408.5882},
	Journal = {CoRR},
	Timestamp = {Mon, 13 Aug 2018 16:46:21 +0200},
	Title = {Convolutional Neural Networks for Sentence Classification},
	Url = {http://arxiv.org/abs/1408.5882},
	Volume = {abs/1408.5882},
	Year = {2014},
	Bdsk-Url-1 = {http://arxiv.org/abs/1408.5882}}

@misc{drl_portfolio_management,
	Author = {Zhengyao Jiang and Dixing Xu and Jinjun Liang},
	Date-Added = {2019-03-10 20:54:31 -0700},
	Date-Modified = {2019-03-10 20:54:46 -0700},
	Eprint = {arXiv:1706.10059},
	Title = {A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem},
	Year = {2017}}

@article{unsupervised_attention_model_aspect,
	Author = {He, Ruidan and Lee, Wee Sun and Ng, Hwee Tou and Dahlmeier, Daniel},
	Date-Added = {2019-02-16 15:13:00 -0800},
	Date-Modified = {2019-02-16 15:13:20 -0800},
	Doi = {10.18653/v1/p17-1036},
	Journal = {Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
	Publisher = {Association for Computational Linguistics},
	Title = {An Unsupervised Neural Attention Model for Aspect Extraction},
	Url = {http://dx.doi.org/10.18653/v1/P17-1036},
	Year = {2017},
	Bdsk-Url-1 = {http://dx.doi.org/10.18653/v1/P17-1036},
	Bdsk-Url-2 = {http://dx.doi.org/10.18653/v1/p17-1036}}

@article{multi-task_aspect_term,
	Author = {Li, Xin and Lam, Wai},
	Date-Added = {2019-02-16 15:03:33 -0800},
	Date-Modified = {2019-02-16 15:03:51 -0800},
	Doi = {10.18653/v1/d17-1310},
	Journal = {Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing},
	Publisher = {Association for Computational Linguistics},
	Title = {Deep Multi-Task Learning for Aspect Term Extraction with Memory Interaction},
	Url = {http://dx.doi.org/10.18653/v1/D17-1310},
	Year = {2017},
	Bdsk-Url-1 = {http://dx.doi.org/10.18653/v1/D17-1310},
	Bdsk-Url-2 = {http://dx.doi.org/10.18653/v1/d17-1310}}

@inproceedings{Wang2017CoupledMA,
	Author = {Wenya Wang and Sinno Jialin Pan and Daniel Dahlmeier and Xiaokui Xiao},
	Booktitle = {AAAI},
	Date-Added = {2019-02-16 14:58:56 -0800},
	Date-Modified = {2019-02-16 14:58:56 -0800},
	Title = {Coupled Multi-Layer Attentions for Co-Extraction of Aspect and Opinion Terms},
	Year = {2017}}

@article{cnn_model_sentence,
	Abstract = {The ability to accurately represent sentences is central to language understanding. We describe a convolutional architecture dubbed the Dynamic Convolutional Neural Network (DCNN) that we adopt for the semantic modelling of sentences. The network uses Dynamic k-Max Pooling, a global pooling operation over linear sequences. The network handles input sentences of varying length and induces a feature graph over the sentence that is capable of explicitly capturing short and long-range relations. The network does not rely on a parse tree and is easily applicable to any language. We test the DCNN in four experiments: small scale binary and multi-class sentiment prediction, six-way question classification and Twitter sentiment prediction by distant supervision. The network achieves excellent performance in the first three tasks and a greater than 25% error reduction in the last task with respect to the strongest baseline.},
	Author = {Nal Kalchbrenner and Edward Grefenstette and Phil Blunsom},
	Date-Added = {2019-02-16 14:49:16 -0800},
	Date-Modified = {2019-02-16 14:50:00 -0800},
	Eprint = {1404.2188},
	Month = {04},
	Title = {A Convolutional Neural Network for Modelling Sentences},
	Url = {https://arxiv.org/pdf/1404.2188},
	Year = {2014},
	Bdsk-Url-1 = {https://arxiv.org/pdf/1404.2188},
	Bdsk-Url-2 = {https://arxiv.org/abs/1404.2188}}

@inproceedings{aspect_sentiment_embedding,
	Acmid = {2832437},
	Author = {Vo, Duy-Tin and Zhang, Yue},
	Booktitle = {Proceedings of the 24th International Conference on Artificial Intelligence},
	Date-Added = {2019-02-16 14:23:40 -0800},
	Date-Modified = {2019-02-16 14:23:56 -0800},
	Isbn = {978-1-57735-738-4},
	Location = {Buenos Aires, Argentina},
	Numpages = {7},
	Pages = {1347--1353},
	Publisher = {AAAI Press},
	Series = {IJCAI'15},
	Title = {Target-dependent Twitter Sentiment Classification with Rich Automatic Features},
	Url = {http://dl.acm.org/citation.cfm?id=2832415.2832437},
	Year = {2015},
	Bdsk-Url-1 = {http://dl.acm.org/citation.cfm?id=2832415.2832437}}

@article{sentiment_n_gram,
	Author = {Bespalov, Dmitriy and Bai, Bing and Qi, Yanjun and Shokoufandeh, Ali},
	Date-Added = {2019-02-16 14:02:43 -0800},
	Date-Modified = {2019-02-16 14:03:02 -0800},
	Doi = {10.1145/2063576.2063635},
	Isbn = {9781450307178},
	Journal = {Proceedings of the 20th ACM international conference on Information and knowledge management - CIKM '11},
	Publisher = {ACM Press},
	Title = {Sentiment classification based on supervised latent n-gram analysis},
	Url = {http://dx.doi.org/10.1145/2063576.2063635},
	Year = {2011},
	Bdsk-Url-1 = {http://dx.doi.org/10.1145/2063576.2063635}}

@inproceedings{sentiment_specific_embedding,
	Author = {Tang, Duyu and Wei, Furu and Yang, Nan and Zhou, Ming and Liu, Ting and Qin, Bing},
	Date-Added = {2019-02-16 13:48:13 -0800},
	Date-Modified = {2019-02-16 13:48:22 -0800},
	Doi = {10.3115/v1/P14-1146},
	Journal = {52nd Annual Meeting of the Association for Computational Linguistics, ACL 2014 - Proceedings of the Conference},
	Month = {06},
	Pages = {1555-1565},
	Title = {Learning Sentiment-Specific Word Embedding for Twitter Sentiment Classification},
	Volume = {1},
	Year = {2014},
	Bdsk-Url-1 = {https://doi.org/10.3115/v1/P14-1146}}

@misc{kaggle_dataset_2,
	Author = {Kaggle},
	Date-Added = {2019-02-16 13:43:22 -0800},
	Date-Modified = {2019-02-16 13:44:01 -0800},
	Howpublished = {https://www.kaggle.com/c/twitter-sentiment-analysis2/data},
	Title = {Twitter sentiment analysis}}

@misc{kaggle_dataset_1,
	Author = {KazAnova},
	Date-Added = {2019-02-16 13:42:33 -0800},
	Date-Modified = {2019-02-16 13:45:38 -0800},
	Howpublished = {https://www.kaggle.com/kazanova/sentiment140},
	Title = {Sentiment140 dataset with 1.6 million tweets}}

@inproceedings{SemEval_dataset,
	Author = {Rosenthal, Sara and Ritter, Alan and Nakov, Preslav and Stoyanov, Veselin},
	Date-Added = {2019-02-16 13:15:51 -0800},
	Date-Modified = {2019-02-16 13:16:00 -0800},
	Doi = {10.3115/v1/S14-2009},
	Month = {01},
	Pages = {73-80},
	Title = {SemEval-2014 Task 9: Sentiment Analysis in Twitter},
	Year = {2014},
	Bdsk-Url-1 = {https://doi.org/10.3115/v1/S14-2009}}

@inproceedings{twitter_sentiment_dataset,
	Author = {Saif, Hassan and Fernandez, Miriam and He, Yulan and Alani, Harith},
	Date-Added = {2019-02-16 13:14:44 -0800},
	Date-Modified = {2019-02-16 13:14:53 -0800},
	Journal = {CEUR Workshop Proceedings},
	Month = {12},
	Title = {Evaluation Datasets for Twitter Sentiment Analysis. A survey and a new dataset, the STS-Gold},
	Volume = {1096},
	Year = {2013}}

@misc{word2vec,
	Author = {Tomas Mikolov and Ilya Sutskever and Kai Chen and Greg Corrado and Jeffrey Dean},
	Date-Added = {2019-02-16 13:07:20 -0800},
	Date-Modified = {2019-02-16 13:07:25 -0800},
	Eprint = {arXiv:1310.4546},
	Title = {Distributed Representations of Words and Phrases and their Compositionality},
	Year = {2013}}

@article{deep_learning_sentiment_survey,
	Archiveprefix = {arXiv},
	Author = {Lei Zhang and Shuai Wang and Bing Liu},
	Bibsource = {dblp computer science bibliography, https://dblp.org},
	Biburl = {https://dblp.org/rec/bib/journals/corr/abs-1801-07883},
	Date-Added = {2019-02-15 23:44:13 -0800},
	Date-Modified = {2019-02-15 23:44:22 -0800},
	Eprint = {1801.07883},
	Journal = {CoRR},
	Timestamp = {Mon, 13 Aug 2018 16:48:14 +0200},
	Title = {Deep Learning for Sentiment Analysis : {A} Survey},
	Url = {http://arxiv.org/abs/1801.07883},
	Volume = {abs/1801.07883},
	Year = {2018},
	Bdsk-Url-1 = {http://arxiv.org/abs/1801.07883}}

@article{stock_trend_news_sentiment,
	Archiveprefix = {arXiv},
	Author = {Joshi Kalyani and H. N. Bharathi and Rao Jyothi},
	Bibsource = {dblp computer science bibliography, https://dblp.org},
	Biburl = {https://dblp.org/rec/bib/journals/corr/KalyaniBJ16},
	Date-Added = {2019-02-15 23:41:10 -0800},
	Date-Modified = {2019-02-15 23:41:19 -0800},
	Eprint = {1607.01958},
	Journal = {CoRR},
	Timestamp = {Mon, 13 Aug 2018 16:46:04 +0200},
	Title = {Stock trend prediction using news sentiment analysis},
	Url = {http://arxiv.org/abs/1607.01958},
	Volume = {abs/1607.01958},
	Year = {2016},
	Bdsk-Url-1 = {http://arxiv.org/abs/1607.01958}}

@inproceedings{sentiment_airline,
	Acmid = {3163029},
	Address = {New York, NY, USA},
	Author = {Samonte, Mary Jane C. and Garcia, John Michael R. and Lucero, Valerie Jade L. and Santos, Shayann Celine B.},
	Booktitle = {Proceedings of the 3rd International Conference on Communication and Information Processing},
	Date-Added = {2019-02-15 23:31:38 -0800},
	Date-Modified = {2019-02-15 23:31:44 -0800},
	Doi = {10.1145/3162957.3163029},
	Isbn = {978-1-4503-5365-6},
	Keywords = {airline, opinion analysis, qualitative analysis, quantitative analysis, sentiment analysis},
	Location = {Tokyo, Japan},
	Numpages = {8},
	Pages = {415--422},
	Publisher = {ACM},
	Series = {ICCIP '17},
	Title = {Sentiment and Opinion Analysis on Twitter About Local Airlines},
	Url = {http://doi.acm.org/10.1145/3162957.3163029},
	Year = {2017},
	Bdsk-Url-1 = {http://doi.acm.org/10.1145/3162957.3163029},
	Bdsk-Url-2 = {https://doi.org/10.1145/3162957.3163029}}

@misc{sentiment_predict_stock_move,
	Author = {Venkata Sasank Pagolu and Kamal Nayan Reddy Challa and Ganapati Panda and Babita Majhi},
	Date-Added = {2019-02-15 23:16:46 -0800},
	Date-Modified = {2019-02-15 23:16:55 -0800},
	Eprint = {arXiv:1610.09225},
	Title = {Sentiment Analysis of Twitter Data for Predicting Stock Market Movements},
	Year = {2016}}

@article{twitter_classification_distant_super,
	Author = {Go, Alec and Bhayani, Richa and Huang, Lei},
	Date-Added = {2019-02-15 23:04:14 -0800},
	Date-Modified = {2019-02-15 23:04:30 -0800},
	Journal = {Processing},
	Month = {01},
	Title = {Twitter sentiment classification using distant supervision},
	Volume = {150},
	Year = {2009}}

@article{twitter_mode_stock_market,
	Author = {Johan Bollen and Huina Mao and Xiao-Jun Zeng},
	Date-Added = {2019-02-15 22:26:36 -0800},
	Date-Modified = {2019-02-15 22:26:45 -0800},
	Doi = {10.1016/j.jocs.2010.12.007},
	Eprint = {arXiv:1010.3003},
	Howpublished = {Journal of Computational Science, 2(1), March 2011, Pages 1-8},
	Title = {Twitter mood predicts the stock market},
	Year = {2010},
	Bdsk-Url-1 = {https://doi.org/10.1016/j.jocs.2010.12.007}}

@misc{stock_price_cause,
	Author = {Desjardins},
	Date-Added = {2019-02-15 21:56:28 -0800},
	Date-Modified = {2019-02-15 22:09:53 -0800},
	Howpublished = {https://www.disnat.com/en/learning/trading-basics/stock-basics/what-causes-stock-prices-to-change},
	Title = {What Causes Stock Prices to Change?}}

@article{high_frequency_drl,
	Archiveprefix = {arXiv},
	Author = {Prakhar Ganesh and Puneet Rakheja},
	Bibsource = {dblp computer science bibliography, https://dblp.org},
	Biburl = {https://dblp.org/rec/bib/journals/corr/abs-1809-01506},
	Date-Added = {2019-02-15 21:35:30 -0800},
	Date-Modified = {2019-02-15 21:35:42 -0800},
	Eprint = {1809.01506},
	Journal = {CoRR},
	Timestamp = {Fri, 05 Oct 2018 11:34:52 +0200},
	Title = {Deep Reinforcement Learning in High Frequency Trading},
	Url = {http://arxiv.org/abs/1809.01506},
	Volume = {abs/1809.01506},
	Year = {2018},
	Bdsk-Url-1 = {http://arxiv.org/abs/1809.01506}}

@article{algorithmic_trading,
	Author = {G. {Nuti} and M. {Mirghaemi} and P. {Treleaven} and C. {Yingsaeree}},
	Date-Added = {2019-02-15 21:29:10 -0800},
	Date-Modified = {2019-02-15 21:29:19 -0800},
	Doi = {10.1109/MC.2011.31},
	Issn = {0018-9162},
	Journal = {Computer},
	Keywords = {data analysis;electronic commerce;financial data processing;electronic financial market;algorithmic trading process;computer program;pretrade analysis;data analysis;trading signal generation;trade execution;agency-broker execution;principal-proprietary trading;Investments;Algorithm design and analysis;Stock markets;Security;Protocols;Algorithmic trading;Black-box trading;Electronic trading;Smart order routing},
	Month = {Nov},
	Number = {11},
	Pages = {61-69},
	Title = {Algorithmic Trading},
	Volume = {44},
	Year = {2011},
	Bdsk-Url-1 = {https://doi.org/10.1109/MC.2011.31}}


text:
package entity

import (
	"database/sql"
	"github.com/jypelle/mifasol/restApiV1"
)

// Song

type SongEntity struct {
	SongId          restApiV1.SongId       `db:"song_id"`
	CreationTs      int64                  `db:"creation_ts"`
	UpdateTs        int64                  `db:"update_ts"`
	Name            string                 `db:"name"`
	Format          restApiV1.SongFormat   `db:"format"`
	Size            int64                  `db:"size"`
	BitDepth        restApiV1.SongBitDepth `db:"bit_depth"`
	PublicationYear sql.NullInt64          `db:"publication_year"`
	AlbumId         restApiV1.AlbumId      `db:"album_id"`
	TrackNumber     sql.NullInt64          `db:"track_number"`
	ExplicitFg      bool                   `db:"explicit_fg"`
}

func (e *SongEntity) Fill(s *restApiV1.Song) {
	s.Id = e.SongId
	s.CreationTs = e.CreationTs
	s.UpdateTs = e.UpdateTs
	s.Name = e.Name
	s.Format = e.Format
	s.Size = e.Size
	s.BitDepth = e.BitDepth
	if e.PublicationYear.Valid {
		s.PublicationYear = &e.PublicationYear.Int64
	} else {
		s.PublicationYear = nil
	}
	s.AlbumId = e.AlbumId
	if e.TrackNumber.Valid {
		s.TrackNumber = &e.TrackNumber.Int64
	} else {
		s.TrackNumber = nil
	}
	s.ExplicitFg = e.ExplicitFg
}

func (e *SongEntity) LoadMeta(s *restApiV1.SongMeta) {
	if s != nil {
		e.Name = s.Name
		e.Format = s.Format
		e.Size = s.Size
		e.BitDepth = s.BitDepth
		if s.PublicationYear != nil {
			e.PublicationYear.Int64 = *s.PublicationYear
			e.PublicationYear.Valid = true
		} else {
			e.PublicationYear.Valid = false
		}
		e.AlbumId = s.AlbumId
		if s.TrackNumber != nil {
			e.TrackNumber.Int64 = *s.TrackNumber
			e.TrackNumber.Valid = true
		} else {
			e.TrackNumber.Valid = false
		}
		e.ExplicitFg = s.ExplicitFg
	}
}

type DeletedSongEntity struct {
	SongId   restApiV1.SongId `db:"song_id"`
	DeleteTs int64            `db:"delete_ts"`
}

repository: jypelle/mifasol

repo_name: jypelle/mifasol


text:
file(REMOVE_RECURSE
  "CMakeFiles/mbedtls_download"
  "CMakeFiles/mbedtls_download-complete"
  "external/mbedtls/src/mbedtls_download-stamp/mbedtls_download-build"
  "external/mbedtls/src/mbedtls_download-stamp/mbedtls_download-configure"
  "external/mbedtls/src/mbedtls_download-stamp/mbedtls_download-download"
  "external/mbedtls/src/mbedtls_download-stamp/mbedtls_download-install"
  "external/mbedtls/src/mbedtls_download-stamp/mbedtls_download-mkdir"
  "external/mbedtls/src/mbedtls_download-stamp/mbedtls_download-patch"
  "external/mbedtls/src/mbedtls_download-stamp/mbedtls_download-update"
)

# Per-language clean rules from dependency scanning.
foreach(lang )
  include(CMakeFiles/mbedtls_download.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

repository: demichele/cmake-mam

repo_name: demichele/cmake-mam

extension: cmake


text:
@InProceedings{elhalabi15,
  supplementary = {Supplementary:elhalabi15-supp.pdf},
  title = {{A totally unimodular view of structured sparsity}},
  author = {El Halabi, Marwa and Cevher, Volkan},
  pages = {223-231},
  abstract = {This paper describes a simple framework for structured sparse recovery based on convex optimization. We show that many structured sparsity models can be naturally represented by linear matrix inequalities on the support of the unknown parameters, where the constraint matrix has a totally unimodular (TU) structure.  For such structured models, tight convex relaxations can be obtained in polynomial time via linear programming. Our modeling framework unifies the prevalent structured sparsity norms in the literature, introduces new interesting ones, and renders their tightness and tractability arguments transparent.},
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_license_id: MIT


text:
@incollection{DufloGlennersterKremer2007,
    author={Esther Duflo and Rachel Glennerster and Michael Kremer},
    title={{C}hapter 61 -- {U}sing {R}andomization in {D}evelopment {E}conomics {R}esearch: {A} {T}oolkit},
    booktitle={Handbook of Development Economics},
    volume={4},
    year={2007},
    pages={3895--3962}
    title={{U}rban {C}rime},
    editor={T. Paul Schultz and John A. Strauss},
    publisher={Elsevier},
}

@article{manatunga_sample_2001,
	title = {Sample {Size} {Estimation} in {Cluster} {Randomized} {Studies} with {Varying} {Cluster} {Size}},
	volume = {43},
	copyright = {© 2001 WILEY-VCH Verlag Berlin GmbH, Fed. Rep. of Germany},
	issn = {1521-4036},
	url = {http://onlinelibrary.wiley.com/doi/10.1002/1521-4036(200102)43:1<75::AID-BIMJ75>3.0.CO;2-N/abstract},
	doi = {10.1002/1521-4036(200102)43:1<75::AID-BIMJ75>3.0.CO;2-N},
	abstract = {Cluster randomized studies are common in community trials. The standard method for estimating sample size for cluster randomized studies assumes a common cluster size. However often in cluster randomized studies, size of the clusters vary. In this paper, we derive sample size estimation for continuous outcomes for cluster randomized studies while accounting for the variability due to cluster size. It is shown that the proposed formula for estimating total cluster size can be obtained by adding a correction term to the traditional formula which uses the average cluster size. Application of these results to the design of a health promotion educational intervention study is discussed.},
	language = {en},
	number = {1},
	urldate = {2016-06-24},
	journal = {Biometrical Journal},
	author = {Manatunga, Amita K. and Hudgens, Michael G. and Chen, Shande},
	month = feb,
	year = {2001},
	keywords = {Cluster randomized, Longitudinal data, Sample Size, Varying cluster size},
	pages = {75--86},
	file = {Full Text PDF:/home/mauricio/.zotero/zotero/1di3t569.default/zotero/storage/VH7DR6NI/Manatunga et al. - 2001 - Sample Size Estimation in Cluster Randomized Studi.pdf:application/pdf;Snapshot:/home/mauricio/.zotero/zotero/1di3t569.default/zotero/storage/ID8VDS6A/abstract.html:text/html}
}

@article{kong_sample_2003,
	title = {Sample {Size} {Calculation} for {Dichotomous} {Outcomes} in {Cluster} {Randomization} {Trials} with {Varying} {Cluster} {Size}},
	volume = {37},
	issn = {2168-4790, 2168-4804},
	url = {http://dij.sagepub.com/content/37/1/109},
	doi = {10.1177/009286150303700113},
	abstract = {It is common to assume a constant cluster size in the estimation of sample size for cluster randomized trials. Manatunga et al. (1) derived sample size estimation for continuous response variables in cases of varying cluster size. This paper discusses a parallel study for binary response variables. We compare the maximum cluster size method, the average cluster size method, and the proposed method.},
	language = {en},
	number = {1},
	urldate = {2016-06-24},
	journal = {Drug Information Journal},
	author = {Kong, Seung-Ho and Ahn, Chul W. and Jung, Sin-Ho},
	month = jan,
	year = {2003},
	keywords = {Binary, Cluster randomization, Sample Size, Varying cluster size},
	pages = {109--114},
	file = {Drug Information Journal-2003-Kong-109-14.pdf:/home/mauricio/.zotero/zotero/1di3t569.default/zotero/storage/HWGQ7N6C/Drug Information Journal-2003-Kong-109-14.pdf:application/pdf;Snapshot:/home/mauricio/.zotero/zotero/1di3t569.default/zotero/storage/2UM72QEZ/109.html:text/html}
}

@article{stanish_estimation_1983,
	title = {Estimation of the {Intraclass} {Correlation} {Coefficient} for the {Analysis} of {Covariance} {Model}},
	volume = {37},
	issn = {0003-1305},
	url = {http://www.jstor.org/stable/2683375},
	doi = {10.2307/2683375},
	abstract = {For the unbalanced analysis of covariance model with one covariate, a simple formula is given for the intraclass correlation coefficient estimator that results from Henderson's Method 3 estimation of variance components. Example calculations and the corresponding interpretations are given for a study of the correlation of iron content among brothers. The example illustrates the manner in which the estimator depends on the pattern of correlation between the covariate and the variable under investigation.},
	number = {3},
	urldate = {2016-09-13},
	journal = {The American Statistician},
	author = {Stanish, William M. and Taylor, Noel},
	year = {1983},
	pages = {221--224},
	file = {JSTOR Full Text PDF:/home/mauricio/.zotero/zotero/1di3t569.default/zotero/storage/SSQ9ETTB/Stanish and Taylor - 1983 - Estimation of the Intraclass Correlation Coefficie.pdf:application/pdf}
}

repository: kylebarron/stata-power

repo_name: kylebarron/stata-power


text:
@article{Bamisile_2018,
 author = {Bamisile, Bamisope S. and Dash, Chandra K. and Akutse, Komivi S. and Keppanan, Ravindran and Wang, Liande},
 title = {Fungal Endophytes: Beyond Herbivore Management},
 journal = {Frontiers in Microbiology},
 publisher = {Frontiers Media {SA}},
 year = {2018},
 month = {mar},
 volume = {9},
 url = {https://doi.org/10.3389%2Ffmicb.2018.00544},
 doi = {10.3389/fmicb.2018.00544}
}


text:
package main

import (
	"fmt"
	"os"

	"github.com/killa-beez/gopkgs/tools/addgeneratedheader/internal/generatedfile"
)

func main() {
	if len(os.Args) < 2 || len(os.Args) > 3 {
		fmt.Printf(`usage: %s file [attribution statement]

prefixes file with a line like
// Code generated <attribution statement> DO NOT EDIT.

Does nothing if file already has a line that starts with "// Code generated" and ends with "DO NOT EDIT."

`, os.Args[0])
		os.Exit(2)
	}

	file := os.Args[1]
	statement := ""
	if len(os.Args) == 3 {
		statement = os.Args[2]
	}
	err := generatedfile.AddGeneratedComment(file, statement)
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

repository: killa-beez/gopkgs

repo_name: killa-beez/gopkgs


text:
@article{nobis_netzstabilitat_2015,
	title = {Netzstabilität mit {Elektromobilität}},
	language = {de},
	author = {Nobis, Philipp and Samweber, Florian and Fischhaber, Sebastian},
	year = {2015},
	pages = {17},
}

@book{knorr_abschatzung_2012,
	title = {Abschätzung der {Netzstabilität} einer rein regenerativen {Stromver}-sorgung},
	author = {Knorr, Kaspar},
	month = oct,
	year = {2012},
}

@misc{noauthor_ladeinfrastruktur_nodate,
	title = {Ladeinfrastruktur an {Gebäuden} ausbauen},
	url = {https://www.bundesregierung.de/breg-de/themen/energiewende/ausbau-ladeinfrastruktur-1722304},
	abstract = {Zur Stärkung der Elektromobilität gehört der Ausbau der Ladeinfrastruktur. Damit dies gelingt, hat das Kabinett neue Regeln beschlossen.},
	language = {de},
	urldate = {2021-06-21},
	journal = {Bundesregierung},
}

@misc{noauthor_anzahl_nodate,
	title = {Anzahl {Elektroautos} in {Deutschland}},
	url = {https://de.statista.com/statistik/daten/studie/265995/umfrage/anzahl-der-elektroautos-in-deutschland/},
	abstract = {Die Zahl der Elektroautos in Deutschland stieg in den letzten Jahren stark an und übertraf 2020 erstmals die 100.000er Marke.},
	language = {de},
	urldate = {2021-06-21},
	journal = {Statista},
}

@article{kerber_aufnahmefahigkeit_2011,
	title = {Aufnahmefähigkeit von {Niederspannungsverteilnetzen} für die {Einspeisung} aus {Photovoltaikkleinanlagen}},
	language = {de},
    year = {2011},
	author = {Kerber, Georg},
	pages = {150},
    journal = {Technische Universität München},
}

@book{garcia-valle_electric_2013,
	address = {New York},
	series = {Power electronics and power systems},
	title = {Electric vehicle integration into modern power networks},
	isbn = {978-1-4614-0133-9},
	language = {en},
	publisher = {Springer},
	editor = {Garcia-Valle, Rodrigo and Peças Lopes, João A.},
	year = {2013},
	note = {OCLC: ocn758395247},
	keywords = {Batteries, Electric power systems, Electric vehicles},
}

@article{schuster_batterie-_2008,
	type = {Thesis},
	title = {Batterie- bzw. {Wasserstoffspeicher} bei elektrischen {Fahrzeugen}},
	url = {https://repositum.tuwien.at/handle/20.500.12708/12337},
	language = {de},
    journal = {Technische Universität Wien},
	urldate = {2021-08-20},
	author = {Schuster, Andreas},
	year = {2008},
}

@article{Doum_Notw_2015,
    type = {Thesis},
    title = {Notwendigkeit und {Rahmenbedingungen} eines {Lastmanagements} in {Niederspannungsnetzen}},
    url = {http://www.100pro-erneuerbare.com/netze/publikationen/2015-06-Doum/Doum-Lastmanagement_Elektromobilitaet.htm},
    language = {de},
    journal = {Technische Hochschule Köln},
    urldate = {2021-07-17},
    author = {Doum, Thorben},
    year = {2015},
}

@misc{statista_jahrliche_2021,
	title = {Jährliche {Fahrleistung} des {PKW} in {Deutschland} 2020},
	url = {https://de.statista.com/statistik/daten/studie/183003/umfrage/pkw---gefahrene-kilometer-pro-jahr/},
	abstract = {Im Jahr 2020 gab es in der deutschsprachigen Bevölkerung ab 14 Jahren rund 4,02 Millionen Personen, die pro Jahr mehr als 20.000 Kilometer mit ihrem PKW fuhren.},
	language = {de},
	urldate = {2021-07-01},
	journal = {Statista},
}

@misc{ADAC_elektroautos_2021,
	title = {Elektroautos: {Besser} spät als nie},
	shorttitle = {Elektroautos},
	url = {https://www.adac.de/rund-ums-fahrzeug/elektromobilitaet/info/elektroauto-bilanz/},
	abstract = {Warum der Verkauf lange schwächelte. Welche E-Modelle jetzt durchstarten. Welche Marken am innovativsten sind.},
	language = {de-DE},
	urldate = {2021-06-19},
}

@misc{Renault_renault_2021,
	title = {{RENAULT} {ZOE} {E}-{TECH} 100\% elektrisch},
	url = {https://www.renault.de/elektromodelle/zoe.html},
	abstract = {Elektromobilität: Der Renault ZOE E-Tech überzeugt mit enormer Reichweite. Mehr erfahren über Ausstattung, Motorisierung und Preise.},
	language = {de},
	urldate = {2021-06-17},
}

@misc{goel_stromtankstellen_nodate,
	title = {Stromtankstellen {Statistik} {Deutschland}},
	url = {https://www.goingelectric.de/stromtankstellen/statistik/Deutschland},
    author = {goingElectric},
	urldate = {2021-06-23},
}

repository: AndreGismo/SNEE-Projekt

repo_name: AndreGismo/SNEE-Projekt

gha_language: Jupyter Notebook


text:
@InProceedings{johnson07a,
  title = {Learning Markov Structure by Maximum Entropy Relaxation},
  author = {Jason K. Johnson and Venkat Chandrasekaran and Alan S. Willsky},
  pages = {203--210},
  abstract = {We propose a new approach for learning a sparse graphical model approximation to a specified multivariate probability distribution (such as the empirical distribution of sample data). The selection of sparse graph structure arises naturally in our approach through solution of a convex optimization problem, which differentiates our method from standard combinatorial approaches. We seek the maximum entropy relaxation (MER) within an exponential family, which maximizes entropy subject to constraints that marginal distributions on small subsets of variables are close to the prescribed marginals in relative entropy. To solve MER, we present a modified primal-dual interior point method that exploits sparsity of the Fisher information matrix in models defined on chordal graphs. This leads to a tractable, scalable approach provided the level of relaxation in MER is sufficient to obtain a thin graph. The merits of our approach are investigated by recovering the structure of some simple graphical models from sample data.},
  pdf = {http://jmlr.org/proceedings/papers/v2/johnson07a/johnson07a.pdf},
}


text:
DESCRIPTION = "OpenDreambox: Modem task for the OpenDreambox distribution"
SECTION = "opendreambox/base"
LICENSE = "MIT"
PR = "r0"

inherit task

#
# task-opendreambox-modem
#
DESCRIPTION_${PN} = "OpenDreambox: Modem support"
DEPENDS_${PN} = "enigma2-plugins"
RDEPENDS_${PN} = "\
  dreambox-modem-ppp-scripts \
  enigma2-plugin-extensions-modem \
  kernel-module-ppp-async \
  kernel-module-ppp-deflate \
  kernel-module-ppp-generic \
  ppp \
"

PACKAGE_ARCH = "${MACHINE_ARCH}"

repository: demsey/openembedded

repo_name: demsey/openembedded

branch_name: HEAD

extension: bb


text:
DESCRIPTION = "Utilities for twin. Currently contains 'twkalc', a calculator derived from kcalc."
DEPENDS = "twin"

SECTION = "console/utils"
LICENSE = "GPL LGPL"
SRC_URI = "http://linuz.sns.it/~max/twin/twutils-0.2.tar.gz"

inherit autotools

CXXFLAGS_append = " -DHAVE_FUNC_ISINF"
LDFLAGS_append = " -L${STAGING_LIBDIR}"

do_compile() {
	for i in admin twkalc
	do
		cd ${S}/$i && oe_runmake LDFLAGS="${LDFLAGS}"
	done
}

SRC_URI[md5sum] = "313d47ae27c3c4d51317626421c78284"
SRC_URI[sha256sum] = "e4ac5c2a59e1c9f80b19c5703240e125592018f40972c2628171d0eeddd15e7b"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty


text:
@article{Thorne-2020-Response,
    title = "Response of Soil CO2 Efflux to Shelterwood Harvesting in a Mature Temperate Pine Forest",
    author = "Thorne, Robin  and
      Khomik, Myroslava  and
      Hayman, Emily  and
      Arain, Altaf",
    journal = "Forests, Volume 11, Issue 3",
    volume = "11",
    number = "3",
    year = "2020",
    publisher = "MDPI AG",
    url = "https://aclanthology.org/G20-82001",
    doi = "10.3390/f11030304",
    pages = "304",
    abstract = "In forest ecosystems, soil CO2 efflux is an important component of ecosystem respiration (RE), which is generally driven by variability in soil temperature and soil moisture. Tree harvesting in forests can alter the soil variables and, consequently, impact soil CO2 efflux. This study investigated the response of total soil CO2 efflux, and its components, to a shelterwood harvesting event of a mature temperate white pine (Pinus strobus L.) forest located in Southern Ontario, Canada. The objective was to explore the response of soil CO2 effluxes to changes in the forest microclimate, such as soil temperature and soil moisture, after shelterwood harvesting removed approximately one-third of the overstory canopy. No significant differences were found in both soil temperature and soil moisture between the pre-harvesting (2008{--}2011) and post-harvesting (2012{--}2014) periods. Despite similar soil microclimates, total soil CO2 effluxes were significantly reduced by up to 37{\%}. Soil CO2 effluxes from heterotrophic sources were significantly reduced post-harvesting by approximately 27{\%}, while no significant difference in the mineral-soil horizon sources were measured. An analysis of RE, measured with an eddy covariance tower over the study area, showed an increase post-harvesting. However, the overall net ecosystem carbon exchange showed no significant difference between pre- and post-harvesting. This was due to an increase in the gross ecosystem productivity post-harvesting, compensating for the increased losses (i.e., increased RE). This study highlights the complexities of soil CO2 efflux after a disturbance, such as a harvest. The knowledge gained from this study adds to our understanding of how shelterwood harvesting may influence ecosystem carbon exchange and will be useful for forest managers focused on carbon sequestration and forest conservation.",
}

repository: gwf-uwaterloo/gwf-publications

repo_name: gwf-uwaterloo/gwf-publications

gha_language: Python


text:
@Article{hansen2016loop,
  title = {Loop-mediated isothermal amplification for detection of the tomato and potato late blight pathogen, P hytophthora infestans},
  author = {ZR Hansen and BJ Knaus and JF Tabima and CM Press and HS Judelson and NJ Gr{\"u}nwald and Christine D Smart},
  journal = {Journal of Applied Microbiology},
  volume = {120},
  number = {4},
  pages = {1010--1020},
  year = {2016},
  date = {2016-01-01},
}


text:
package geoip

import (
	"net"
	"sort"
)

var (
	geoIPLen = len(geoIP)
)

func QueryCountry(ip uint32) string {
	i := sort.Search(geoIPLen, func(i int) bool {
		n := geoIP[i]
		return n.End >= ip
	})

	var country string
	if i < geoIPLen {
		n := geoIP[i]
		if n.Start <= ip {
			country = n.Name
		}
	}
	return country
}

func QueryCountryByIP(ip net.IP) string {
	ip = ip.To4()
	if ip == nil {
		return ""
	}

	v := uint32(ip[0]) << 24
	v += uint32(ip[1]) << 16
	v += uint32(ip[2]) << 8
	v += uint32(ip[3])
	return QueryCountry(v)
}

func QueryCountryByString(v string) string {
	ip := net.ParseIP(v)
	if ip == nil {
		return ""
	}
	return QueryCountryByIP(ip)
}

repository: FlowerWrong/kone

repo_name: FlowerWrong/kone


text:
/*
 * DCS
 *
 * DCS V2版本API
 *
 */

package model

import (
	"encoding/json"

	"strings"
)

type PriorityBody struct {
	// 副本优先级，取值范围是0到100，0为默认禁止倒换。
	SlavePriorityWeight int32 `json:"slave_priority_weight"`
}

func (o PriorityBody) String() string {
	data, _ := json.Marshal(o)
	return strings.Join([]string{"PriorityBody", string(data)}, " ")
}


text:
SUMMARY = "MODGUIs as regular, embeddable LV2 UIs"
HOMEPAGE = "http://distrho.sourceforge.net/ports"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = " \
    file://modgui-x11ui.lv2/modgui-x11;beginline=4;endline=17;md5=641a06ff4188f4a77fa2d4927a5ec9eb \
"

# Important notice:
# This recipe builds but won't work: I RDEPENDS on pyqt4 build with webkit

SRC_URI = " \
    git://github.com/moddevices/modgui-embed.git \
    file://0001-Remove-x86-specific-build-flags.patch \
"

SRCREV = "469ec4916c4b75615bfed69ea63a7d1f26296ba0"
S = "${WORKDIR}/git"
PV = "0.0.0+git${SRCPV}"

REQUIRED_DISTRO_FEATURES = "x11"

inherit qemu-ext distro_features_check

DEPENDS += " \
    lv2 \
"

do_install() {
    install -d ${D}${libdir}/lv2
	cp -r ${S}/modgui-x11ui.lv2 ${D}${libdir}/lv2/
}

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


text:
@online{CSE512DataVisualization,
  title = {{{CSE512}}: {{Data Visualization}}},
  url = {https://courses.cs.washington.edu/courses/cse512/19sp/},
  urldate = {2019-06-02},
  file = {C\:\\Users\\Yohan_Min\\Zotero\\storage\\CWZRLIPS\\19sp.html}
}

@book{magallanesreyesIntroducingDataScience2017,
  langid = {english},
  location = {{Cambridge, United Kingdom New York, USA Port Melbourne, Australia Delhi, India Singapore}},
  title = {Introducing to Data Science for Social and Policy Research: Collecting to Organizing Data with {{R}} and {{Python}}},
  isbn = {978-1-107-54025-5 978-1-107-11741-9},
  shorttitle = {Introducing to Data Science for Social and Policy Research},
  pagetotal = {303},
  publisher = {{Cambridge University Press}},
  date = {2017},
  author = {Magallanes Reyes, Jos\'e Manuel},
  note = {OCLC: 998518603}
}

@book{ruppertStatisticsDataAnalysis2015a,
  langid = {english},
  location = {{New York}},
  title = {Statistics and Data Analysis for Financial Engineering: With {{R}} Examples},
  edition = {2. ed},
  isbn = {978-1-4939-2613-8},
  shorttitle = {Statistics and Data Analysis for Financial Engineering},
  pagetotal = {719},
  series = {Springer Texts in Statistics},
  publisher = {{Springer}},
  date = {2015},
  author = {Ruppert, David and Matteson, David S.},
  note = {OCLC: 915369090}
}

repository: reconjohn/visualExampleGit

repo_name: reconjohn/visualExampleGit


text: @inproceedings{MacedoEPG,	author = {Macedo, P. and Cardoso, J. and Pinto, A. M.},	booktitle = {Procs. of the Intl. Workshop on Linked Media (LiME 2014)},	date-added = {2018-04-25 20:02:07 +0000},	date-modified = {2018-04-25 20:02:07 +0000},	month = {May},	title = {Enriching Electronic Programming Guides with Web Data},	webpdf = {/Papers/WP-2014-077-LiME-EPG.pdf},	year = {2014}}


text:
file(REMOVE_RECURSE
  "CMakeFiles/pointer_practice.dir/main.cpp.o"
  "pointer_practice.pdb"
  "pointer_practice"
)

# Per-language clean rules from dependency scanning.
foreach(lang CXX)
  include(CMakeFiles/pointer_practice.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

repository: InsignificantSpeck/snippets

repo_name: InsignificantSpeck/snippets


text:
package cmd

import (
	"fmt"
	"os"

	"github.com/nickwu241/simply-do/server/store"
	"github.com/spf13/cobra"
)

// adminCmd represents the admin command
var adminCmd = &cobra.Command{
	Use:   "admin",
	Short: "Execute admin tasks. e.g. backing up, copying data",
}

// cpCmd represents the cp command
var cpCmd = &cobra.Command{
	Use:   "cp",
	Short: "Copies a source list to destionation list",
	Run: func(cmd *cobra.Command, args []string) {
		if len(args) != 2 {
			fmt.Println("expecting exactly 2 arguemnts <src> <dst>")
			os.Exit(2)
		}
		src := args[0]
		dst := args[1]
		if err := store.AdminCopyData(src, dst); err != nil {
			fmt.Printf("error copying %q to %q: %v\n", src, dst, err)
			os.Exit(2)
		}
		fmt.Printf("Successfully copied %q to %q\n", src, dst)
	},
}

// dbBackupCmd represents the db-backup command
var dbBackupCmd = &cobra.Command{
	Use:   "db-backup",
	Short: "Back up the Firebase database onto Firebase storage",
	Run: func(cmd *cobra.Command, args []string) {
		if err := store.AdminSnapshot(); err != nil {
			fmt.Printf("error backing up database: %v\n", err)
			os.Exit(2)
		}
		fmt.Println("Successfully backed up Firebase database")
	},
}

func init() {
	rootCmd.AddCommand(adminCmd)
	adminCmd.AddCommand(cpCmd)
	adminCmd.AddCommand(dbBackupCmd)
}


text:
DESCRIPTION = "Generic Blob [Bootloader] for the Motorola EZX platform"
SECTION = "bootloaders"
AUTHOR = "OpenEZX Team"
HOMEPAGE = "http://people.openezx.org/wyrm/gen-blob"
LICENSE = "GPL"
PROVIDES = "virtual/bootloader"
DEPENDS = "virtual/kernel"
SRCREV = "33d6abb6ae51cda8c8298ba63033cd11ea4b045c"
PV = "1.0.0+gitr${SRCPV}"
PR = "r0"
PE = "1"

SRC_URI = "\
  git://git.openezx.org/gen-blob.git;protocol=git;branch=master \
  file://remove-bogus-sed.patch \
"
S = "${WORKDIR}/git"

inherit autotools

EXTRA_OECONF = "\
  --with-board=lubbock \
  --with-cpu=pxa262 \
  --with-linux-prefix=${STAGING_KERNEL_DIR} \
  --enable-usb \
"

do_configure() {
	gnu-configize
	oe_runconf
}

do_deploy() {
	install -d ${DEPLOY_DIR_IMAGE}
	install -m 0644 src/blob/blob-a780  ${DEPLOY_DIR_IMAGE}/gen-blob-for-1stgen.${SRCDATE}
	install -m 0644 src/blob/blob-a1200 ${DEPLOY_DIR_IMAGE}/gen-blob-for-2ndgen.${SRCDATE}
}

addtask deploy before do_build after do_compile

PACKAGE_ARCH = "${MACHINE_ARCH}"

repository: balister/openembedded

repo_name: balister/openembedded


text:
package openrtb_ext

// ExtPublisher defines the contract for ...publisher.ext (found in both bidrequest.site and bidrequest.app)
type ExtPublisher struct {
	Prebid *ExtPublisherPrebid `json:"prebid"`
}

// ExtPublisherPrebid defines the contract for publisher.ext.prebid
type ExtPublisherPrebid struct {
	// parentAccount would define the legal entity (publisher owner or network) that has the direct relationship with the PBS
	// host. As such, the definition depends on the PBS hosting entity.
	ParentAccount *string `json:"parentAccount,omitempty"`
}

repository: prebid/prebid-server

repo_name: prebid/prebid-server


text:
@Article{dojer2011bi,
  title = {Bi-billboard: symmetrization and careful choice of informant species results in higher accuracy of regulatory element prediction},
  author = {Norbert Dojer and Przemyslaw Biecek and Jerzy Tiuryn},
  journal = {Journal of Computational Biology},
  volume = {18},
  number = {6},
  pages = {809--819},
  year = {2011},
  publisher = {Mary Ann Liebert, Inc. 140 Huguenot Street, 3rd Floor New Rochelle, NY 10801 USA},
}


text:
package request

const AlipayOpenAuthTokenAppQueryMethod = "alipay.open.auth.token.app.query"

type AlipayOpenAuthTokenAppQueryRequest struct {
	AppAuthToken string `json:"app_auth_token"`
}

repository: gobiny/alipay-sdk-go

repo_name: gobiny/alipay-sdk-go


text:
/*
Copyright 2021 Vesoft Inc.

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.
*/

package v1alpha1

import (
	"fmt"

	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
	"k8s.io/apimachinery/pkg/runtime/schema"

	"github.com/vesoft-inc/nebula-operator/pkg/label"
)

const (
	MetadComponentType     = ComponentType("metad")
	MetadPortNameThrift    = "thrift"
	defaultMetadPortThrift = 9559
	MetadPortNameHTTP      = "http"
	defaultMetadPortHTTP   = 19559
	MetadPortNameHTTP2     = "http2"
	defaultMetadPortHTTP2  = 19560
	defaultMetadImage      = "vesoft/nebula-metad"
)

var _ NebulaClusterComponentter = &metadComponent{}

// +k8s:deepcopy-gen=false
func newMetadComponent(nc *NebulaCluster) *metadComponent {
	return &metadComponent{
		baseComponent: baseComponent{
			nc:  nc,
			typ: MetadComponentType,
		},
	}
}

type metadComponent struct {
	baseComponent
}

func (c *metadComponent) GetUpdateRevision() string {
	return c.nc.Status.Metad.Workload.UpdateRevision
}

func (c *metadComponent) GetReplicas() int32 {
	return *c.nc.Spec.Metad.Replicas
}

func (c *metadComponent) GetImage() string {
	return getImage(c.nc.Spec.Metad.Image, c.nc.Spec.Metad.Version, defaultMetadImage)
}

func (c *metadComponent) GetConfig() map[string]string {
	return c.nc.Spec.Metad.Config
}

func (c *metadComponent) GetConfigMapKey() string {
	return getConfigKey(c.Type().String())
}

func (c *metadComponent) GetResources() *corev1.ResourceRequirements {
	return getResources(c.nc.Spec.Metad.Resources)
}

func (c *metadComponent) GetLogStorageClass() *string {
	scName := c.nc.Spec.Metad.LogVolumeClaim.StorageClassName
	if scName == nil || *scName == "" {
		return nil
	}
	return scName
}

func (c *metadComponent) GetDataStorageClass() *string {
	scName := c.nc.Spec.Metad.DataVolumeClaim.StorageClassName
	if scName == nil || *scName == "" {
		return nil
	}
	return scName
}

func (c *metadComponent) GetLogStorageResources() *corev1.ResourceRequirements {
	return c.nc.Spec.Metad.LogVolumeClaim.Resources.DeepCopy()
}

func (c *metadComponent) GetDataStorageResources() *corev1.ResourceRequirements {
	return c.nc.Spec.Metad.DataVolumeClaim.Resources.DeepCopy()
}

func (c *metadComponent) GetPodEnvVars() []corev1.EnvVar {
	return c.nc.Spec.Metad.PodSpec.EnvVars
}

func (c *metadComponent) GetPodAnnotations() map[string]string {
	return c.nc.Spec.Metad.PodSpec.Annotations
}

func (c *metadComponent) GetPodLabels() map[string]string {
	return c.nc.Spec.Metad.PodSpec.Labels
}

func (c *metadComponent) NodeSelector() map[string]string {
	selector := map[string]string{}
	for k, v := range c.nc.Spec.NodeSelector {
		selector[k] = v
	}
	for k, v := range c.nc.Spec.Metad.PodSpec.NodeSelector {
		selector[k] = v
	}
	return selector
}

func (c *metadComponent) IsHeadlessService() bool {
	return true
}

func (c *metadComponent) GetServiceSpec() *ServiceSpec {
	if c.nc.Spec.Metad.Service == nil {
		return nil
	}
	return c.nc.Spec.Metad.Service.DeepCopy()
}

func (c *metadComponent) GetServiceName() string {
	return getServiceName(c.GetName(), c.IsHeadlessService())
}

func (c *metadComponent) GetServiceFQDN() string {
	return getServiceFQDN(c.GetServiceName(), c.GetNamespace())
}

func (c *metadComponent) GetPodFQDN(ordinal int32) string {
	return getPodFQDN(c.GetPodName(ordinal), c.GetServiceFQDN(), c.IsHeadlessService())
}

func (c *metadComponent) GetPort(portName string) int32 {
	return getPort(c.GenerateContainerPorts(), portName)
}

func (c *metadComponent) GetConnAddress(portName string) string {
	return getConnAddress(c.GetServiceFQDN(), c.GetPort(portName))
}

func (c *metadComponent) GetPodConnAddresses(portName string, ordinal int32) string {
	return getPodConnAddress(c.GetPodFQDN(ordinal), c.GetPort(portName))
}

func (c *metadComponent) GetHeadlessConnAddresses(portName string) []string {
	return getHeadlessConnAddresses(
		c.GetConnAddress(portName),
		c.GetName(),
		c.GetReplicas(),
		c.IsHeadlessService())
}

func (c *metadComponent) IsReady() bool {
	return *c.nc.Spec.Metad.Replicas == c.nc.Status.Metad.Workload.ReadyReplicas
}

func (c *metadComponent) GenerateLabels() map[string]string {
	return label.New().Cluster(c.GetClusterName()).Metad()
}

func (c *metadComponent) GenerateContainerPorts() []corev1.ContainerPort {
	return []corev1.ContainerPort{
		{
			Name:          MetadPortNameThrift,
			ContainerPort: defaultMetadPortThrift,
		},
		{
			Name:          MetadPortNameHTTP,
			ContainerPort: defaultMetadPortHTTP,
		},
		{
			Name:          MetadPortNameHTTP2,
			ContainerPort: defaultMetadPortHTTP2,
		},
	}
}

func (c *metadComponent) GenerateVolumeMounts() []corev1.VolumeMount {
	componentType := c.Type().String()
	return []corev1.VolumeMount{
		{
			Name:      logVolume(componentType),
			MountPath: "/usr/local/nebula/logs",
			SubPath:   "logs",
		}, {
			Name:      dataVolume(componentType),
			MountPath: "/usr/local/nebula/data",
			SubPath:   "data",
		},
	}
}

func (c *metadComponent) GenerateVolumes() []corev1.Volume {
	componentType := c.Type().String()
	return []corev1.Volume{
		{
			Name: logVolume(componentType),
			VolumeSource: corev1.VolumeSource{
				PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
					ClaimName: logVolume(componentType),
				},
			},
		},
		{
			Name: dataVolume(componentType),
			VolumeSource: corev1.VolumeSource{
				PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
					ClaimName: dataVolume(componentType),
				},
			},
		},
	}
}

func (c *metadComponent) GenerateVolumeClaim() ([]corev1.PersistentVolumeClaim, error) {
	componentType := c.Type().String()
	logSC, logRes := c.GetLogStorageClass(), c.GetLogStorageResources()
	logReq, err := parseStorageRequest(logRes.Requests)
	if err != nil {
		return nil, fmt.Errorf("cannot parse storage request for %s log volume, error: %v", componentType, err)
	}

	datSC, dataRes := c.GetDataStorageClass(), c.GetDataStorageResources()
	dataReq, err := parseStorageRequest(dataRes.Requests)
	if err != nil {
		return nil, fmt.Errorf("cannot parse storage request for %s data volume, error: %v", componentType, err)
	}

	claims := []corev1.PersistentVolumeClaim{
		{
			ObjectMeta: metav1.ObjectMeta{
				Name: logVolume(componentType),
			},
			Spec: corev1.PersistentVolumeClaimSpec{
				AccessModes:      []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce},
				Resources:        logReq,
				StorageClassName: logSC,
			},
		},
		{
			ObjectMeta: metav1.ObjectMeta{
				Name: dataVolume(componentType),
			},
			Spec: corev1.PersistentVolumeClaimSpec{
				AccessModes:      []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce},
				Resources:        dataReq,
				StorageClassName: datSC,
			},
		},
	}
	return claims, nil
}

func (c *metadComponent) GenerateWorkload(
	gvk schema.GroupVersionKind,
	cm *corev1.ConfigMap,
	enableEvenPodsSpread bool) (*unstructured.Unstructured, error) {
	return generateWorkload(c, gvk, cm, enableEvenPodsSpread)
}

func (c *metadComponent) GenerateService() *corev1.Service {
	return generateService(c)
}

func (c *metadComponent) GenerateConfigMap() *corev1.ConfigMap {
	cm := generateConfigMap(c)
	configKey := getConfigKey(c.Type().String())
	cm.Data[configKey] = MetadhConfigTemplate
	return cm
}

func (c *metadComponent) UpdateComponentStatus(status *ComponentStatus) {
	c.nc.Status.Metad = *status
}

repository: wahello/nebula-operator

repo_name: wahello/nebula-operator


text:
require cuda-shared-binaries-${PV}.inc

MAINSUM = "e2024cd43668e3102c6afd0767cfcbc107e49b5198fbb437591758b0c2c4f6f1"
MAINSUM:x86-64 = "9db8977edb2d5099bb12b5b695f1a119394f165444d4fc6bc079d217eaa229b4"
DEVSUM = "731abaaf4c5ce24c4a4ecce6b1921b88662b70e57bffee0b20bbee9b17fc4353"
DEVSUM:x86-64 = "7e07c4c570892795583e5999b5daae848aa0afdcb9963cd5f9cd62c707b48141"

FILES:${PN}-dev += "${prefix}/local/cuda-${CUDA_VERSION}/extras/CUPTI/Readme.txt \
                    ${prefix}/local/cuda-${CUDA_VERSION}/extras/CUPTI/include ${prefix}/local/cuda-${CUDA_VERSION}/extras/CUPTI/sample"

BBCLASSEXTEND = "native nativesdk"

repository: danielwangksu/meta-tegra

repo_name: danielwangksu/meta-tegra


text:
@article{Besnard-2019-Memory,
    title = "Memory effects of climate and vegetation affecting net ecosystem CO2 fluxes in global forests",
    author = {Besnard, Simon  and
      Carvalhais, Nuno  and
      Arain, M. Altaf  and
      Black, Andrew  and
      Brede, Benjamin  and
      Buchmann, Nina  and
      Chen, Jiquan  and
      Clevers, Jan G. P. W  and
      Dutrieux, Lo{\"\i}c P.  and
      Gans, Fabian  and
      Herold, Martin  and
      Jung, Martin  and
      Kosugi, Yoshiko  and
      Knohl, Alexander  and
      Law, Beverly E.  and
      Paul-Limoges, Eug{\'e}nie  and
      Lohila, Annalea  and
      Merbold, Lutz  and
      Roupsard, Olivier  and
      Valentini, Riccardo  and
      Wolf, Sebastian  and
      Zhang, Xudong  and
      Reichstein, Markus},
    journal = "PLOS ONE, Volume 14, Issue 2",
    volume = "14",
    number = "2",
    year = "2019",
    publisher = "Public Library of Science (PLoS)",
    url = "https://aclanthology.org/G19-32001",
    doi = "10.1371/journal.pone.0211510",
    pages = "e0211510",
    abstract = "Forests play a crucial role in the global carbon (C) cycle by storing and sequestering a substantial amount of C in the terrestrial biosphere. Due to temporal dynamics in climate and vegetation activity, there are significant regional variations in carbon dioxide (CO2) fluxes between the biosphere and atmosphere in forests that are affecting the global C cycle. Current forest CO2 flux dynamics are controlled by instantaneous climate, soil, and vegetation conditions, which carry legacy effects from disturbances and extreme climate events. Our level of understanding from the legacies of these processes on net CO2 fluxes is still limited due to their complexities and their long-term effects. Here, we combined remote sensing, climate, and eddy-covariance flux data to study net ecosystem CO2 exchange (NEE) at 185 forest sites globally. Instead of commonly used non-dynamic statistical methods, we employed a type of recurrent neural network (RNN), called Long Short-Term Memory network (LSTM) that captures information from the vegetation and climate's temporal dynamics. The resulting data-driven model integrates interannual and seasonal variations of climate and vegetation by using Landsat and climate data at each site. The presented LSTM algorithm was able to effectively describe the overall seasonal variability (Nash-Sutcliffe efficiency, NSE = 0.66) and across-site (NSE = 0.42) variations in NEE, while it had less success in predicting specific seasonal and interannual anomalies (NSE = 0.07). This analysis demonstrated that an LSTM approach with embedded climate and vegetation memory effects outperformed a non-dynamic statistical model (i.e. Random Forest) for estimating NEE. Additionally, it is shown that the vegetation mean seasonal cycle embeds most of the information content to realistically explain the spatial and seasonal variations in NEE. These findings show the relevance of capturing memory effects from both climate and vegetation in quantifying spatio-temporal variations in forest NEE.",
}


text:
package minichain

import (
	"bytes"
	"crypto/sha256"
	"encoding/binary"
	"encoding/json"
	"testing"
)

// Test index get with padding
func TestInvertedIndexGet(t *testing.T) {
	genesis := sha256.Sum256([]byte(GENESIS_BLOCK))
	hash := sha256.Sum256([]byte("hash seed"))
	key := "key-1"

	block := Block{
		Timestamp:     1,
		PrevBlockHash: genesis[:],
		BlockHash:     hash[:],
		Transactions: []Transaction{
			{
				Id:        []byte("dummy-txs-2"),
				Timestamp: 1,
				Key:       key,
				Value:     "value1",
			},
			{
				Id:        []byte("dummy-txs-2"),
				Timestamp: 1,
				Key:       "key2",
				Value:     "value2",
			},
		},
	}

	blockBytes, err := json.Marshal(block)

	if err != nil {
		t.Error(err)
	}

	blockSize := uint32(len(blockBytes))
	header := make([]byte, HEADER_SIZE)
	binary.LittleEndian.PutUint32(header, blockSize)

	padding := make([]byte, 256)
	data := bytes.Join([][]byte{padding, header, blockBytes, block.BlockHash}, []byte{})
	file := bytes.NewReader(data)

	index := &InvertedIndex{
		file: file,
		data: map[string][]int64{
			key: {
				256,
			},
		},
	}

	txs, err := index.Get(key)

	if err != nil {
		t.Error(err)
	}

	if len(txs) != 1 {
		t.Errorf("Wrong tranasction count expected %d actual %d", 1, len(txs))
	}
}

func TestInvertedIndexUpdate(t *testing.T) {
	genesis := sha256.Sum256([]byte(GENESIS_BLOCK))
	hash := sha256.Sum256([]byte("hash seed"))
	key := "key1"

	block := Block{
		Timestamp:     1,
		PrevBlockHash: genesis[:],
		BlockHash:     hash[:],
		Transactions: []Transaction{
			{
				Id:        []byte("dummy-txs-2"),
				Timestamp: 1,
				Key:       key,
				Value:     "value1",
			},
			{
				Id:        []byte("dummy-txs-2"),
				Timestamp: 1,
				Key:       "key2",
				Value:     "value2",
			},
		},
	}

	index := &InvertedIndex{
		data: map[string][]int64{},
	}

	index.Update(200, &block)

	if len(index.data[key]) != 1 {
		t.Errorf("tx with key %s was not added to index", key)
	}
}

repository: stgleb/minichain

repo_name: stgleb/minichain


text:
package models

import "github.com/go-swagger/go-swagger/strfmt"

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

/*表示STS临时token响应

swagger:model StsResponse
*/
type StsResponse struct {

	/* access key ID
	 */
	AccessKeyID string `json:"accessKeyId,omitempty"`

	/* access key secret
	 */
	AccessKeySecret string `json:"accessKeySecret,omitempty"`

	/* token失效时间
	 */
	ExpiresIn int64 `json:"expiresIn,omitempty"`

	/* 服务器当前时间
	 */
	ServerTime int64 `json:"serverTime,omitempty"`

	/* token
	 */
	Token string `json:"token,omitempty"`
}

// Validate validates this sts response
func (m *StsResponse) Validate(formats strfmt.Registry) error {
	return nil
}


text:
@article{2011ApJ...726..109L,
 adsnote = {Provided by the SAO/NASA Astrophysics Data System},
 adsurl = {https://ui.adsabs.harvard.edu/abs/2011ApJ...726..109L},
 archiveprefix = {arXiv},
 author = {Ly, C. and Lee, J.~C. and Dale, D.~A. and Momcheva, I. and
Salim, S. and Staudaher, S. and Moore, C.~A. and Finn, R.
},
 doi = {10.1088/0004-637X/726/2/109},
 eid = {109},
 eprint = {1011.2759},
 journal = {Astrophysical Journal},
 keywords = {galaxies: distances and redshifts, galaxies: evolution, galaxies: luminosity function, mass function, galaxies: photometry, galaxies: star formation},
 month = {January},
 pages = {109},
 primaryclass = {astro-ph.CO},
 title = {The H$α$ Luminosity Function and Star Formation Rate Volume Density at z = 0.8 from the NEWFIRM H$α$ Survey},
 volume = {726},
 year = {2011}
}

repository: astrochun/academic-kickstart

repo_name: astrochun/academic-kickstart


text:
require recipes-graphics/xorg-app/xorg-app-common.inc

SUMMARY = "X.Org X11 X client utilities"
HOMEPAGE = "http://cgit.freedesktop.org/xorg/app/xwud/"
DESCRIPTION = "xwud allows X users to display in a window an image saved \
in a specially formatted dump file, such as produced by xwd."
SECTION = "x11/app"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=31e8892c80b7a0c1c5f37c8e8ae6d794"

SRC_URI_EXT = "xz"
SRC_URI[sha256sum] = "64048cd15eba3cd9a3d2e3280650391259ebf6b529f2101d1a20f441038c1afe"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_language: BitBake


text:
SUMMARY = "A graphical front-end for gcov"
HOMEPAGE = "http://ltp.sourceforge.net/coverage/lcov.php"
DESCRIPTION = "LCOV is a graphical front-end for GCC's coverage testing \
tool gcov. It collects gcov data for multiple source files and creates \
HTML pages containing the source code annotated with coverage information. \
It also adds overview pages for easy navigation within the file structure. \
LCOV supports statement, function and branch coverage measurement."
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"

RDEPENDS_${PN} += " \
    gcov \
    perl \
    perl-module-filehandle \
    perl-module-getopt-std \
    perl-module-digest-sha \
"

SRC_URI = "http://downloads.sourceforge.net/ltp/${BP}.tar.gz"

SRC_URI[md5sum] = "e79b799ae3ce149aa924c7520e993024"
SRC_URI[sha256sum] = "c282de8d678ecbfda32ce4b5c85fc02f77c2a39a062f068bd8e774d29ddc9bf8"

do_install() {
    oe_runmake install PREFIX=${D}
    sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/*
}


text:
package main

import (
	"context"
	"flag"
	"fmt"
	"io/ioutil"
	"os"
	"strings"

	"github.com/golang/protobuf/proto"
	"go.chromium.org/luci/cv/api/config/v2"
	"go.skia.org/infra/go/common"
	"go.skia.org/infra/go/cq"
	"go.skia.org/infra/go/git"
	"go.skia.org/infra/go/gitiles"
	"go.skia.org/infra/go/sklog"
	"go.skia.org/infra/task_scheduler/go/specs"
)

var (
	configFile = flag.String("cfg-file", "", "commit-queue.cfg file to validate.")
	remote     = flag.String("remote", git.DefaultRemote, "Name of upstream remote to use.")
	repoUrl    = flag.String("repo", "", "Repo URL. Required if not currently inside a git checkout.")
)

func main() {
	common.Init()

	if *configFile == "" {
		sklog.Fatal("--cfg-file is required.")
	}

	ctx := context.TODO()

	// Find the branch heads.
	cwd, err := os.Getwd()
	if err != nil {
		sklog.Fatalf("Failed to get current working directory: %s", err)
	}
	gd := git.GitDir(cwd)
	if *repoUrl == "" {
		*repoUrl, err = gd.Git(ctx, "remote", "get-url", *remote)
		if err != nil {
			sklog.Fatalf("--repo not provided and failed to obtain repo url for cwd: %s", err)
		}
		*repoUrl = strings.TrimSpace(*repoUrl)
	}
	repo := gitiles.NewRepo(*repoUrl, nil)
	branches, err := repo.Branches(ctx)
	if err != nil {
		sklog.Fatal(err)
	}

	// For each branch head, read the tasks.json file.
	taskCfgs := make(map[string]*specs.TasksCfg, len(branches))
	for _, branch := range branches {
		contents, err := repo.ReadFileAtRef(ctx, specs.TASKS_CFG_FILE, branch.Head)
		if err != nil {
			if strings.Contains(err.Error(), "404 Not Found") {
				sklog.Warningf("Could not find %s on %s", specs.TASKS_CFG_FILE, branch.Name)
				// This is valid; there are no trybots on this branch.
				taskCfgs[branch.Name] = &specs.TasksCfg{
					Jobs: map[string]*specs.JobSpec{},
				}
				continue
			}
			sklog.Fatalf("Failed to read tasks.json for %s; %s", branch.Name, err)
		}
		cfg, err := specs.ParseTasksCfg(string(contents))
		if err != nil {
			sklog.Fatalf("Failed to parse tasks.json: %s", err)
		}
		taskCfgs[branch.Name] = cfg
	}

	// Read the commit queue config.
	cfgBytes, err := ioutil.ReadFile(*configFile)
	if err != nil {
		sklog.Fatalf("Failed to read %s: %s", *configFile, err)
	}
	var cfg config.Config
	if err := proto.UnmarshalText(string(cfgBytes), &cfg); err != nil {
		sklog.Fatalf("Failed to parse config proto: %s", err)
	}

	// For each branch, find the matching CQ config group. Ensure that the
	// tryjobs exist in the TasksCfg for that branch.
	badTryjobs := map[string][]string{}
	for _, branch := range branches {
		cg, _, _, err := cq.MatchConfigGroup(&cfg, fmt.Sprintf("refs/heads/%s", branch.Name))
		if err != nil {
			sklog.Fatalf("Failed to find matching CQ config for %q: %s", branch.Name, err)
		}
		taskCfg := taskCfgs[branch.Name]
		if cg != nil && cg.Verifiers != nil && cg.Verifiers.Tryjob != nil {
			for _, tj := range cg.Verifiers.Tryjob.Builders {
				split := strings.Split(tj.Name, "/")
				shortName := split[len(split)-1]
				if strings.HasPrefix(tj.Name, "chromium") {
					if branch.Name != git.MasterBranch {
						// Chromium tryjobs only work on the main branch.
						badTryjobs[branch.Name] = append(badTryjobs[branch.Name], shortName)
					}
				} else if _, ok := taskCfg.Jobs[shortName]; !ok {
					badTryjobs[branch.Name] = append(badTryjobs[branch.Name], shortName)
				}
			}
		} else if cg == nil {
			sklog.Warningf("No matching CQ config for %s", branch.Name)
		}
	}

	// Report the results.
	if len(badTryjobs) > 0 {
		fmt.Println("Found try jobs which don't exist on their respective branches:")
		for branch, tryjobs := range badTryjobs {
			fmt.Println(fmt.Sprintf("%s:", branch))
			for _, tj := range tryjobs {
				fmt.Println(fmt.Sprintf("\t%s", tj))
			}
		}
		os.Exit(1)
	}
}

repository: CliveUnger/skia-buildbot

repo_name: CliveUnger/skia-buildbot


text:
SUMMARY = "Packagegroup for CodeChecker CCM enabled packages"

inherit packagegroup

RDEPENDS_${PN} += "babeltrace"
RDEPENDS_${PN} += "babeltrace2"
RDEPENDS_${PN} += "hostapd"
RDEPENDS_${PN} += "jemalloc"
RDEPENDS_${PN} += "kea"
RDEPENDS_${PN} += "liburcu"
RDEPENDS_${PN} += "libyang"
RDEPENDS_${PN} += "lttng-tools"
RDEPENDS_${PN} += "lttng-ust"
RDEPENDS_${PN} += "minicoredumper"
RDEPENDS_${PN} += "net-snmp"
RDEPENDS_${PN} += "rcs-tests"
RDEPENDS_${PN} += "simplepingpong"
RDEPENDS_${PN} += "strongswan"
RDEPENDS_${PN} += "unionmount-testsuite"
RDEPENDS_${PN} += "wpa-supplicant"
RDEPENDS_${PN} += "wratbench"

do_cleanall[depends] = "\
babeltrace2:do_cleanall \
babeltrace:do_cleanall \
hostapd:do_cleanall \
jemalloc:do_cleanall \
kea:do_cleanall \
liburcu:do_cleanall \
libyang:do_cleanall \
lttng-tools:do_cleanall \
lttng-ust:do_cleanall \
minicoredumper:do_cleanall \
net-snmp:do_cleanall \
rcs-tests:do_cleanall \
simplepingpong:do_cleanall \
strongswan:do_cleanall \
unionmount-testsuite:do_cleanall \
wpa-supplicant:do_cleanall \
wratbench:do_cleanall \
"

repository: wallinux/meta-codechecker-wr

repo_name: wallinux/meta-codechecker-wr


text:
@book{bookKey,
	author = {Tiger Scotch},
    title = {The search for a pyramid},
    publisher = {Newyork times},
    year = {2018}
}

repository: hygull/bibtex

repo_name: hygull/bibtex

gha_language: JavaScript


text:
% To cite this package in general

@inproceedings{galy-fajou20a,
  title = {Automated Augmented Conjugate Inference for Non-conjugate Gaussian Process Models},
  author = {Galy-Fajou, Theo and Wenzel, Florian and Opper, Manfred},
  booktitle = {Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics},
  pages = {3025--3035},
  year = {2020},
  editor = {Silvia Chiappa and Roberto Calandra},
  volume = {108}, series = {Proceedings of Machine Learning Research},
  month = {26--28 Aug},
  publisher = {PMLR},
  pdf = {http://proceedings.mlr.press/v108/galy-fajou20a/galy-fajou20a.pdf},
  url = { http://proceedings.mlr.press/v108/galy-fajou20a.html },
}
% To cite work on heterogeneous multi-ouptput :

@inproceedings{moreno2018heterogeneous,
  title={Heterogeneous multi-output gaussian process prediction},
  author={Moreno-Mu{\~n}oz, Pablo and Art{\'e}s, Antonio and {\'A}lvarez, Mauricio},
  booktitle={Advances in neural information processing systems},
  pages={6711--6720},
  year={2018}
}

% To cite work on classification

@inproceedings{wenzel2019efficient,
  title={Efficient Gaussian process classification using P{\`o}lya-Gamma data augmentation},
  author={Wenzel, Florian and Galy-Fajou, Th{\'e}o and Donner, Christan and Kloft, Marius and Opper, Manfred},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={33},
  pages={5417--5424},
  year={2019}
}

@inproceedings{wenzel2017bayesian,
  title={Bayesian nonlinear support vector machines for big data},
  author={Wenzel, Florian and Galy-Fajou, Th{\'e}o and Deutsch, Matth{\"a}us and Kloft, Marius},
  booktitle={Joint European Conference on Machine Learning and Knowledge Discovery in Databases},
  pages={307--322},
  year={2017},
  organization={Springer}
}

% To cite work on multi-class classification

@inproceedings{galy-fajou19a,
  title = {Multi-Class Gaussian Process Classification Made Conjugate: Efficient Inference via Data Augmentation},
  author = {Galy-Fajou, Th{\'{e}}o and Wenzel, Florian and Donner, Christian and Opper, Manfred},
  booktitle = {Proceedings of The 35th Uncertainty in Artificial Intelligence Conference},
  pages = {755--765},
  year = {2020},
  editor = {Ryan P. Adams and Vibhav Gogate},
  volume = {115}, series = {Proceedings of Machine Learning Research},
  address = {Tel Aviv, Israel},
  month = {22--25 Jul},
  publisher = {PMLR},
  pdf = {http://proceedings.mlr.press/v115/galy-fajou20a/galy-fajou20a.pdf},
  url = {http://proceedings.mlr.press/v115/galy-fajou20a.html}
}

gha_language: Julia


text:
@article{luque2022,
author = {Luque, Niceto R and Naveros, Francisco and Sheynikhovich, Denis and Ros, Eduardo and Arleo, Angelo},
doi = {10.1016/j.neunet.2021.11.024},
journal = {Neural Networks},
pages = {316--333},
publisher = {Elsevier},
title = {{Computational epidemiology study of homeostatic compensation during sensorimotor aging}},
url = {https://doi.org/10.1016/j.neunet.2021.11.024},
volume = {146},
year = {2022}
}

repository: EduardoRosLab/neurorobotics-website

repo_name: EduardoRosLab/neurorobotics-website


text:
// You need to import the following:
import (
	"crypto/hmac"
	"crypto/sha1"
	"encoding/base64"
	)

// this example is using Martini
m.Get("/sign_auth", func(w http.ResponseWriter, r *http.Request) {
    // Todo: Authenticate the request
		log.Println("signing")
		qs := r.URL.Query()
		mac := hmac.New(sha1.New, []byte("AWS_SECRET"))
		mac.Write([]byte(qs.Get("to_sign")))
		encoded := base64.StdEncoding.EncodeToString(mac.Sum(nil))
		w.Write([]byte(encoded))
	})

repository: belopot/IFCViewer

repo_name: belopot/IFCViewer


text:
package protocol

import (
	"fmt"
	"strings"

	cfg "gitlab.dusk.network/dusk-core/dusk-go/pkg/config"
)

// ServiceFlag indicates the services provided by the Node.
type ServiceFlag uint64

const (
	// FullNode indicates that a user is running the full node implementation of Dusk
	FullNode ServiceFlag = 1

	// LightNode indicates that a user is running a Dusk light node
	// LightNode ServiceFlag = 2 // Not implemented
)

// NodeVer is the current node version.
var NodeVer = &Version{
	Major: 0,
	Minor: 1,
	Patch: 0,
}

// Magic is the network that Dusk is running on
type Magic uint32

const (
	// MainNet identifies the production network of the Dusk blockchain
	MainNet Magic = 0x7630401f
	// TestNet identifies the test network of the Dusk blockchain
	TestNet Magic = 0x74746e41
	// DevNet identifies the development network of the Dusk blockchain
	DevNet Magic = 0x74736e40
)

// MagicFromConfig reads the loaded magic config and tries to map it to magic
// identifier. Panic, if no match found.
func MagicFromConfig() Magic {

	magic := cfg.Get().General.Network
	switch strings.ToLower(magic) {
	case "devnet":
		return DevNet
	case "testnet":
		return TestNet
	case "mainnet":
		return MainNet
	}

	// An invalid network identifier might cause node unexpected  behaviour
	panic(fmt.Sprintf("not a valid network: %s", magic))
}

repository: Rigorously/dusk-blockchain

repo_name: Rigorously/dusk-blockchain


text:
@article{stegen2011variation,
 author = {Stegen, James C and Swenson, Nathan G and Enquist, Brian J and White, Ethan P and Phillips, Oliver L and Jørgensen, Peter M and Weiser, Michael D and Monteagudo Mendoza, Abel and Núñez Vargas, Percy},
 journal = {Global Ecology and Biogeography},
 number = {5},
 pages = {744--754},
 publisher = {Blackwell Publishing Ltd Oxford, UK},
 title = {Variation in above-ground forest biomass across broad climatic gradients},
 volume = {20},
 year = {2011}
}

repository: weecology/website

repo_name: weecology/website


text:
@inproceedings{Grossman:2007:ERE:1240624.1240702,
 acmid = {1240702},
 address = {New York, NY, USA},
 author = {Grossman, Tovi and Wigdor, Daniel and Balakrishnan, Ravin},
 booktitle = {Proceedings of the SIGCHI Conference on Human Factors in Computing Systems},
 doi = {10.1145/1240624.1240702},
 isbn = {978-1-59593-593-9},
 keywords = {reading speed, text orientation, volumetric displays},
 location = {San Jose, California, USA},
 numpages = {10},
 pages = {483--492},
 publisher = {ACM},
 series = {CHI '07},
 title = {Exploring and Reducing the Effects of Orientation on Text Readability in Volumetric Displays},
 url = {http://doi.acm.org/10.1145/1240624.1240702},
 year = {2007}
}

repository: jmatejka/group-website

repo_name: jmatejka/group-website