text:
package decimal

var DecByteToString = [256]string{
	0:   `000`,
	1:   `001`,
	2:   `002`,
	3:   `003`,
	4:   `004`,
	5:   `005`,
	6:   `006`,
	7:   `007`,
	8:   `008`,
	9:   `009`,
	10:  `010`,
	11:  `011`,
	12:  `012`,
	13:  `013`,
	14:  `014`,
	15:  `015`,
	16:  `016`,
	17:  `017`,
	18:  `018`,
	19:  `019`,
	20:  `020`,
	21:  `021`,
	22:  `022`,
	23:  `023`,
	24:  `024`,
	25:  `025`,
	26:  `026`,
	27:  `027`,
	28:  `028`,
	29:  `029`,
	30:  `030`,
	31:  `031`,
	32:  `032`,
	33:  `033`,
	34:  `034`,
	35:  `035`,
	36:  `036`,
	37:  `037`,
	38:  `038`,
	39:  `039`,
	40:  `040`,
	41:  `041`,
	42:  `042`,
	43:  `043`,
	44:  `044`,
	45:  `045`,
	46:  `046`,
	47:  `047`,
	48:  `048`,
	49:  `049`,
	50:  `050`,
	51:  `051`,
	52:  `052`,
	53:  `053`,
	54:  `054`,
	55:  `055`,
	56:  `056`,
	57:  `057`,
	58:  `058`,
	59:  `059`,
	60:  `060`,
	61:  `061`,
	62:  `062`,
	63:  `063`,
	64:  `064`,
	65:  `065`,
	66:  `066`,
	67:  `067`,
	68:  `068`,
	69:  `069`,
	70:  `070`,
	71:  `071`,
	72:  `072`,
	73:  `073`,
	74:  `074`,
	75:  `075`,
	76:  `076`,
	77:  `077`,
	78:  `078`,
	79:  `079`,
	80:  `080`,
	81:  `081`,
	82:  `082`,
	83:  `083`,
	84:  `084`,
	85:  `085`,
	86:  `086`,
	87:  `087`,
	88:  `088`,
	89:  `089`,
	90:  `090`,
	91:  `091`,
	92:  `092`,
	93:  `093`,
	94:  `094`,
	95:  `095`,
	96:  `096`,
	97:  `097`,
	98:  `098`,
	99:  `099`,
	100: `100`,
	101: `101`,
	102: `102`,
	103: `103`,
	104: `104`,
	105: `105`,
	106: `106`,
	107: `107`,
	108: `108`,
	109: `109`,
	110: `110`,
	111: `111`,
	112: `112`,
	113: `113`,
	114: `114`,
	115: `115`,
	116: `116`,
	117: `117`,
	118: `118`,
	119: `119`,
	120: `120`,
	121: `121`,
	122: `122`,
	123: `123`,
	124: `124`,
	125: `125`,
	126: `126`,
	127: `127`,
	128: `128`,
	129: `129`,
	130: `130`,
	131: `131`,
	132: `132`,
	133: `133`,
	134: `134`,
	135: `135`,
	136: `136`,
	137: `137`,
	138: `138`,
	139: `139`,
	140: `140`,
	141: `141`,
	142: `142`,
	143: `143`,
	144: `144`,
	145: `145`,
	146: `146`,
	147: `147`,
	148: `148`,
	149: `149`,
	150: `150`,
	151: `151`,
	152: `152`,
	153: `153`,
	154: `154`,
	155: `155`,
	156: `156`,
	157: `157`,
	158: `158`,
	159: `159`,
	160: `160`,
	161: `161`,
	162: `162`,
	163: `163`,
	164: `164`,
	165: `165`,
	166: `166`,
	167: `167`,
	168: `168`,
	169: `169`,
	170: `170`,
	171: `171`,
	172: `172`,
	173: `173`,
	174: `174`,
	175: `175`,
	176: `176`,
	177: `177`,
	178: `178`,
	179: `179`,
	180: `180`,
	181: `181`,
	182: `182`,
	183: `183`,
	184: `184`,
	185: `185`,
	186: `186`,
	187: `187`,
	188: `188`,
	189: `189`,
	190: `190`,
	191: `191`,
	192: `192`,
	193: `193`,
	194: `194`,
	195: `195`,
	196: `196`,
	197: `197`,
	198: `198`,
	199: `199`,
	200: `200`,
	201: `201`,
	202: `202`,
	203: `203`,
	204: `204`,
	205: `205`,
	206: `206`,
	207: `207`,
	208: `208`,
	209: `209`,
	210: `210`,
	211: `211`,
	212: `212`,
	213: `213`,
	214: `214`,
	215: `215`,
	216: `216`,
	217: `217`,
	218: `218`,
	219: `219`,
	220: `220`,
	221: `221`,
	222: `222`,
	223: `223`,
	224: `224`,
	225: `225`,
	226: `226`,
	227: `227`,
	228: `228`,
	229: `229`,
	230: `230`,
	231: `231`,
	232: `232`,
	233: `233`,
	234: `234`,
	235: `235`,
	236: `236`,
	237: `237`,
	238: `238`,
	239: `239`,
	240: `240`,
	241: `241`,
	242: `242`,
	243: `243`,
	244: `244`,
	245: `245`,
	246: `246`,
	247: `247`,
	248: `248`,
	249: `249`,
	250: `250`,
	251: `251`,
	252: `252`,
	253: `253`,
	254: `254`,
	255: `255`,
}

repository: raspi/heksa

repo_name: raspi/heksa


text:
@article{Whitfield-2020-Spatial,
    title = "Spatial patterns of temporal changes in Canadian Prairie streamflow using an alternative trend assessment approach",
    author = "Whitfield, Paul H.  and
      Shook, K.R.  and
      Pomeroy, J.W.",
    journal = "Journal of Hydrology, Volume 582",
    volume = "582",
    year = "2020",
    publisher = "Elsevier BV",
    url = "https://aclanthology.org/G20-142001",
    doi = "10.1016/j.jhydrol.2020.124541",
    pages = "124541",
}

repository: gwf-uwaterloo/gwf-publications

license_type: permissive

repo_name: gwf-uwaterloo/gwf-publications

branch_name: refs/heads/main

gha_language: Python

extension: bib


text:
// Copyright 2018-present the CoreDHCP Authors. All rights reserved
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

package staticroute

import (
	"testing"

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

func TestSetup4(t *testing.T) {
	assert.Empty(t, routes)

	var err error
	// no args
	_, err = setup4()
	if assert.Error(t, err) {
		assert.Equal(t, "need at least one static route", err.Error())
	}

	// invalid arg
	_, err = setup4("foo")
	if assert.Error(t, err) {
		assert.Equal(t, "expected a destination/gateway pair, got: foo", err.Error())
	}

	// invalid destination
	_, err = setup4("foo,")
	if assert.Error(t, err) {
		assert.Equal(t, "expected a destination subnet, got: foo", err.Error())
	}

	// invalid gateway
	_, err = setup4("10.0.0.0/8,foo")
	if assert.Error(t, err) {
		assert.Equal(t, "expected a gateway address, got: foo", err.Error())
	}

	// valid route
	_, err = setup4("10.0.0.0/8,192.168.1.1")
	if assert.NoError(t, err) {
		if assert.Equal(t, 1, len(routes)) {
			assert.Equal(t, "10.0.0.0/8", routes[0].Dest.String())
			assert.Equal(t, "192.168.1.1", routes[0].Router.String())
		}
	}

	// multiple valid routes
	_, err = setup4("10.0.0.0/8,192.168.1.1", "192.168.2.0/24,192.168.1.100")
	if assert.NoError(t, err) {
		if assert.Equal(t, 2, len(routes)) {
			assert.Equal(t, "10.0.0.0/8", routes[0].Dest.String())
			assert.Equal(t, "192.168.1.1", routes[0].Router.String())
			assert.Equal(t, "192.168.2.0/24", routes[1].Dest.String())
			assert.Equal(t, "192.168.1.100", routes[1].Router.String())
		}
	}
}

license: MIT

repository: coredhcp/coredhcp

repo_name: coredhcp/coredhcp

branch_name: refs/heads/master

gha_license_id: MIT

gha_language: Go

extension: go


text:
include_directories(${MK_DEPS_PKGS}/zstd/include)
seek_deps_library(${LIBS_PATH} ${MK_DEPS_PKGS}/zstd/lib64 zstd)
SET(LINK_CUSTOM_LIBS ${LINK_CUSTOM_LIBS} zstd)

repository: unihykes/mark

repo_name: unihykes/mark

extension: cmake


text:
package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
	"sort"
	"strings"
)

func contains(a []int, b int) bool {
	ix := sort.SearchInts(a, b)
	return ix < len(a) && a[ix] == b
}

type host struct {
	id   int
	sub  []int
	conn []int
}

type ascend []host

func (s ascend) Len() int { return len(s) }
func (s ascend) Less(i, j int) bool {
	return s[i].id < s[j].id
}
func (s ascend) Swap(i, j int) {
	s[i], s[j] = s[j], s[i]
}

type natural [][]int

func (s natural) Len() int { return len(s) }
func (s natural) Less(i, j int) bool {
	for k := 0; ; k++ {
		if s[i][k] != s[j][k] {
			return s[i][k] < s[j][k]
		}
	}
	return false
}
func (s natural) Swap(i, j int) {
	s[i], s[j] = s[j], s[i]
}

func a2ip(a1, a2, a3, a4, a5 int) int {
	t := uint(32 - a5)
	return ((a1<<24 + a2<<16 + a3<<8 + a4) >> t) << t
}

func nice(a [][]int) string {
	ret := make([]string, len(a))
	for ix, i := range a {
		r := make([]string, len(i))
		for jx, j := range i {
			r[jx] = fmt.Sprint(j)
		}
		ret[ix] = "[" + strings.Join(r, ", ") + "]"
	}
	return strings.Join(ret, ", ")
}

func main() {
	data, err := os.Open(os.Args[1])
	if err != nil {
		log.Fatal(err)
	}
	defer data.Close()

	var (
		n, a1, a2, a3, a4, a5, src, dst int
		hosts                           []host
	)
	scanner := bufio.NewScanner(data)
	scanner.Split(bufio.ScanWords)
	for l := ""; l != "]}"; {
		var h host
		l = ""
		scanner.Scan()
		fmt.Sscanf(strings.TrimLeft(scanner.Text(), "{"), "%d:", &h.id)
		for l != "]," && l != "]}" {
			scanner.Scan()
			s := strings.TrimLeft(scanner.Text(), "[")
			fmt.Sscanf(s, "'%d.%d.%d.%d/%d'", &a1, &a2, &a3, &a4, &a5)
			h.sub = append(h.sub, a2ip(a1, a2, a3, a4, a5))
			l = s[len(s)-2:]
		}
		sort.Ints(h.sub)
		hosts = append(hosts, h)
		n++
	}
	sort.Sort(ascend(hosts))
	for i := 0; i < n-1; i++ {
		for j := i + 1; j < n; j++ {
			for k := 0; k < len(hosts[i].sub); k++ {
				ix := sort.SearchInts(hosts[j].sub, hosts[i].sub[k])
				if ix < len(hosts[j].sub) && hosts[j].sub[ix] == hosts[i].sub[k] {
					hosts[i].conn = append(hosts[i].conn, hosts[j].id)
					hosts[j].conn = append(hosts[j].conn, hosts[i].id)
				}
			}
		}
		hosts[i].sub = nil
	}
	hosts[n-1].sub = nil
	id2h := make(map[int]int, n)
	for i := 0; i < n; i++ {
		id2h[hosts[i].id] = i
	}

	scanner.Split(bufio.ScanLines)
	for scanner.Scan() {
		for i := 0; i < n; i++ {
			hosts[i].sub = hosts[i].sub[0:0]
		}
		var fin bool
		fmt.Sscanf(scanner.Text(), "%d %d", &src, &dst)
		q := []int{src}
		for len(q) > 0 {
			var r []int
			for _, i := range q {
				for _, j := range hosts[id2h[i]].conn {
					if j == dst {
						fin = true
					}
					if !contains(hosts[id2h[i]].sub, j) && !contains(q, j) {
						hosts[id2h[j]].sub = append(hosts[id2h[j]].sub, i)
						sort.Ints(hosts[id2h[j]].sub)
						if !contains(r, j) {
							r = append(r, j)
							sort.Ints(r)
						}
					}
				}
			}
			if fin {
				break
			}
			q = r
		}
		if !fin {
			fmt.Println("No connection")
			continue
		}
		paths := [][]int{[]int{dst}}
		for i := 0; i < len(paths); i++ {
			for paths[i][0] != src {
				cur := id2h[paths[i][0]]
				for j := 1; j < len(hosts[cur].sub); j++ {
					newpath := make([]int, len(paths[i])+1)
					copy(newpath[1:], paths[i])
					newpath[0] = hosts[cur].sub[j]
					paths = append(paths, newpath)
				}
				paths[i] = append([]int{hosts[cur].sub[0]}, paths[i]...)
			}
		}
		sort.Sort(natural(paths))
		fmt.Println(nice(paths))
	}
}

repository: shortthirdman/code-eval-challenges

repo_name: shortthirdman/code-eval-challenges


text:
/*
 Author: jim teeuwen <jimteeuwen@gmail.com>
 Dependencies: go-pkg-xmlx (http://github.com/jteeuwen/go-pkg-xmlx)

 This package allows us to fetch Rss and Atom feeds from the internet.
 They are parsed into an object tree which is a hyvrid of both the RSS and Atom
 standards.

 Supported feeds are:
 	- Rss v0.91, 0.91 and 2.0
 	- Atom 1.0

 The package allows us to maintain cache timeout management. This prevents us
 from querying the servers for feed updates too often and risk ip bams. Appart
 from setting a cache timeout manually, the package also optionally adheres to
 the TTL, SkipDays and SkipHours values specied in the feeds themselves.

 Note that the TTL, SkipDays and SkipHour fields are only part of the RSS spec.
 For Atom feeds, we use the CacheTimeout in the Feed struct.

 Because the object structure is a hybrid between both RSS and Atom specs, not
 all fields will be filled when requesting either an RSS or Atom feed. I have
 tried to create as many shared fields as possiblem but some of them simply do
 not occur in either the RSS or Atom spec.
*/
package feeder

import (
	"fmt"
	xmlx "github.com/jteeuwen/go-pkg-xmlx"
	"net/http"
	"strconv"
	"strings"
	"time"
)

type UnsupportedFeedError struct {
	Type    string
	Version [2]int
}

func (err *UnsupportedFeedError) Error() string {
	return fmt.Sprintf("Unsupported feed: %s, version: %+v", err.Type, err.Version)
}

type ChannelHandlerFunc func(f *Feed, newchannels []*Channel)

func (h ChannelHandlerFunc) ProcessChannels(f *Feed, newchannels []*Channel) {
	if h != nil {
		h(f, newchannels)
	}
}

type ItemHandlerFunc func(f *Feed, ch *Channel, newitems []*Item)

func (h ItemHandlerFunc) ProcessItems(f *Feed, ch *Channel, newitems []*Item) {
	if h != nil {
		h(f, ch, newitems)
	}
}

type ChannelHandler interface {
	ProcessChannels(f *Feed, newchannels []*Channel)
}

type ItemHandler interface {
	ProcessItems(f *Feed, ch *Channel, newitems []*Item)
}

type Feed struct {
	// Custom cache timeout in minutes.
	CacheTimeout int

	// Make sure we adhere to the cache timeout specified in the feed. If
	// our CacheTimeout is higher than that, we will use that instead.
	EnforceCacheLimit bool

	// Type of feed. Rss, Atom, etc
	Type string

	// Version of the feed. Major and Minor.
	Version [2]int

	// Channels with content.
	Channels []*Channel

	// Url from which this feed was created.
	Url string

	// Database
	database *database

	// The channel handler
	channelHandler ChannelHandler

	// The item handler
	itemHandler ItemHandler

	// Last time content was fetched. Used in conjunction with CacheTimeout
	// to ensure we don't get content too often.
	lastupdate time.Time
}

// New is a helper function to stay semi-compatible with
// the old code. Includes the database handler to ensure
// that this approach is functionally identical to the
// old database/handlers version.
func New(cachetimeout int, enforcecachelimit bool, ch ChannelHandlerFunc, ih ItemHandlerFunc) *Feed {
	db := NewDatabase()
	f := NewWithHandlers(cachetimeout, enforcecachelimit, NewDatabaseChannelHandler(db, ch), NewDatabaseItemHandler(db, ih))
	f.database = db
	return f
}

// NewWithHandler creates a new feed with handlers.
// People should use this approach from now on.
func NewWithHandlers(cachetimeout int, enforcecachelimit bool, ch ChannelHandler, ih ItemHandler) *Feed {
	v := new(Feed)
	v.CacheTimeout = cachetimeout
	v.EnforceCacheLimit = enforcecachelimit
	v.Type = "none"
	v.channelHandler = ch
	v.itemHandler = ih
	return v
}

// This returns a timestamp of the last time the feed was updated.
func (this *Feed) LastUpdate() time.Time {
	return this.lastupdate
}

// Fetch retrieves the feed's latest content if necessary.
//
// The charset parameter overrides the xml decoder's CharsetReader.
// This allows us to specify a custom character encoding conversion
// routine when dealing with non-utf8 input. Supply 'nil' to use the
// default from Go's xml package.
//
// This is equivalent to calling FetchClient with http.DefaultClient
func (this *Feed) Fetch(uri string, charset xmlx.CharsetFunc) (err error) {
	return this.FetchClient(uri, http.DefaultClient, charset)
}

// Fetch retrieves the feed's latest content if necessary.
//
// The charset parameter overrides the xml decoder's CharsetReader.
// This allows us to specify a custom character encoding conversion
// routine when dealing with non-utf8 input. Supply 'nil' to use the
// default from Go's xml package.
//
// The client parameter allows the use of arbitrary network connections, for
// example the Google App Engine "URL Fetch" service.
func (this *Feed) FetchClient(uri string, client *http.Client, charset xmlx.CharsetFunc) (err error) {
	if !this.CanUpdate() {
		return
	}

	this.lastupdate = time.Now().UTC()
	this.Url = uri
	doc := xmlx.New()

	if err = doc.LoadUriClient(uri, client, charset); err != nil {
		return
	}

	return this.makeFeed(doc)
}

// Fetch retrieves the feed's content from the []byte
//
// The charset parameter overrides the xml decoder's CharsetReader.
// This allows us to specify a custom character encoding conversion
// routine when dealing with non-utf8 input. Supply 'nil' to use the
// default from Go's xml package.
func (this *Feed) FetchBytes(uri string, content []byte, charset xmlx.CharsetFunc) (err error) {
	this.Url = uri

	doc := xmlx.New()

	if err = doc.LoadBytes(content, charset); err != nil {
		return
	}

	return this.makeFeed(doc)
}

func (this *Feed) makeFeed(doc *xmlx.Document) (err error) {
	// Extract type and version of the feed so we can have the appropriate
	// function parse it (rss 0.91, rss 0.92, rss 2, atom etc).
	this.Type, this.Version = this.GetVersionInfo(doc)

	if ok := this.testVersions(); !ok {
		return &UnsupportedFeedError{Type: this.Type, Version: this.Version}
	}

	if err = this.buildFeed(doc); err != nil || len(this.Channels) == 0 {
		return
	}

	// reset cache timeout values according to feed specified values (TTL)
	if this.EnforceCacheLimit && this.CacheTimeout < this.Channels[0].TTL {
		this.CacheTimeout = this.Channels[0].TTL
	}

	this.notifyListeners()

	return
}

func (this *Feed) notifyListeners() {
	for _, channel := range this.Channels {
		if len(channel.Items) > 0 && this.itemHandler != nil {
			this.itemHandler.ProcessItems(this, channel, channel.Items)
		}
	}

	if len(this.Channels) > 0 && this.channelHandler != nil {
		this.channelHandler.ProcessChannels(this, this.Channels)
	}
}

// This function returns true or false, depending on whether the CacheTimeout
// value has expired or not. Additionally, it will ensure that we adhere to the
// RSS spec's SkipDays and SkipHours values (if Feed.EnforceCacheLimit is set to
// true). If this function returns true, you can be sure that a fresh feed
// update will be performed.
func (this *Feed) CanUpdate() bool {
	// Make sure we are not within the specified cache-limit.
	// This ensures we don't request data too often.
	if this.SecondsTillUpdate() > 0 {
		return false
	}

	utc := time.Now().UTC()

	// If skipDays or skipHours are set in the RSS feed, use these to see if
	// we can update.
	if len(this.Channels) == 1 && this.Type == "rss" {
		if this.EnforceCacheLimit && len(this.Channels[0].SkipDays) > 0 {
			for _, v := range this.Channels[0].SkipDays {
				if time.Weekday(v) == utc.Weekday() {
					return false
				}
			}
		}

		if this.EnforceCacheLimit && len(this.Channels[0].SkipHours) > 0 {
			for _, v := range this.Channels[0].SkipHours {
				if v == utc.Hour() {
					return false
				}
			}
		}
	}

	return true
}

// Returns the number of seconds needed to elapse
// before the feed should update.
func (this *Feed) SecondsTillUpdate() int64 {
	utc := time.Now().UTC()
	elapsed := utc.Sub(this.lastupdate)
	return int64(this.CacheTimeout*60) - int64(elapsed.Seconds())
}

// Returns the duration needed to elapse before the feed should update.
func (this *Feed) TillUpdate() (time.Duration, error) {
	return time.ParseDuration(fmt.Sprintf("%ds", this.SecondsTillUpdate()))
}

func (this *Feed) buildFeed(doc *xmlx.Document) (err error) {
	switch this.Type {
	case "rss":
		err = this.readRss2(doc)
	case "atom":
		err = this.readAtom(doc)
	}
	return
}

func (this *Feed) testVersions() bool {
	switch this.Type {
	case "rss":
		if this.Version[0] > 2 || (this.Version[0] == 2 && this.Version[1] > 0) {
			return false
		}

	case "atom":
		if this.Version[0] > 1 || (this.Version[0] == 1 && this.Version[1] > 0) {
			return false
		}

	default:
		return false
	}

	return true
}

// Returns the type of the feed, ie. "atom" or "rss", and the version number as an array.
// The first item in the array is the major and the second the minor version number.
func (this *Feed) GetVersionInfo(doc *xmlx.Document) (ftype string, fversion [2]int) {
	var node *xmlx.Node

	if node = doc.SelectNode("http://www.w3.org/2005/Atom", "feed"); node != nil {
		ftype = "atom"
		fversion = [2]int{1, 0}
		return
	}

	if node = doc.SelectNode("", "rss"); node != nil {
		ftype = "rss"
		major := 0
		minor := 0
		version := node.As("", "version")
		p := strings.Index(version, ".")
		if p != -1 {
			major, _ = strconv.Atoi(version[0:p])
			minor, _ = strconv.Atoi(version[p+1 : len(version)])
		}
		fversion = [2]int{major, minor}
		return
	}

	// issue#5: Some documents have an RDF root node instead of rss.
	if node = doc.SelectNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "RDF"); node != nil {
		ftype = "rss"
		fversion = [2]int{1, 1}
		return
	}

	ftype = "unknown"
	fversion = [2]int{0, 0}
	return
}

repository: oranie/slack-bot-golang

repo_name: oranie/slack-bot-golang


text:
require libx11.inc
inherit gettext

BBCLASSEXTEND = "native nativesdk"

SRC_URI += "file://disable_tests.patch \
            file://nls-always-use-XCOMM-instead-of-for-comments-in-Comp.patch \
           "

SRC_URI[md5sum] = "c35d6ad95b06635a524579e88622fdb5"
SRC_URI[sha256sum] = "2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16"

#
# debian
#
inherit debian-package
DEBIAN_SECTION = "x11"
DPR = "0"

# applying debian patch by quilt
DEBIAN_PATCH_TYPE = "quilt"

repository: takuya-t/meta-debian

repo_name: takuya-t/meta-debian

branch_name: refs/heads/daisy

extension: bb


text:
package main

import (
	"fmt"
	"os"
	"spf13/cobra"
)

type inodeOptions struct {
	file          string
	unused        bool
	fragmentArray bool
}

func newInodeCommand() *cobra.Command {
	var options inodeOptions
	c := &cobra.Command{
		Use:   "inode",
		Short: "show file segment inode information",
		Long:  "show file segment inode information",
		Run: func(cmd *cobra.Command, args []string) {
			doInode(cmd, &options)
		},
	}

	c.Flags().StringVarP(&options.file, "file", "f", "", "innodb table space file path")
	c.Flags().BoolVarP(&options.unused, "unused", "u", false, "show unused inode")
	c.Flags().BoolVarP(&options.fragmentArray, "fragment", "r", false, "show fragment array")

	return c
}

func doInode(cmd *cobra.Command, options *inodeOptions) {
	if "" == options.file {
		fmt.Println("No input file specified")
		return
	}

	f, err := os.Open(options.file)
	if nil != err {
		fmt.Println("Open file error ", err)
		return
	}
	defer f.Close()

	pages, err := parseInnodbDataFile(f, &parsePageOptions{
		parsePageTypeFlag: parsePageInode,
	})
	if nil != err {
		fmt.Println("Parse innodb data file error ", err)
	}

	for _, page := range pages {
		fmt.Printf("\t\t\t==========PAGE %d OFFSET 0x%04X==========\r\n",
			page.no, page.offset)

		// Print table headers
		fmt.Printf("%-51s", "page list")
		fmt.Printf("\r\n")
		// Print table columns
		fmt.Printf("%-51s", page.inode.inodePageList.toString(38))
		fmt.Printf("\r\n\r\n")

		// Print table headers
		fmt.Printf("%-20s", "file segment id")
		fmt.Printf("%-10s", "used(nf)")
		fmt.Printf("%-51s", "free list")
		fmt.Printf("%-51s", "not_full list")
		fmt.Printf("%-51s", "full list")
		if options.fragmentArray {
			fmt.Printf("fragment array")
		}
		fmt.Printf("\r\n")

		// Print inode
		for ni, node := range page.inode.inodes {
			if nil == node {
				panic(fmt.Sprintf("nil inode, index = %d", ni))
			}
			// Print table columns
			if 0 == node.fileSegmentID {
				// Unused
				if !options.unused {
					continue
				}
				fmt.Printf("0x%08X:%-9s", 38+12+ni*192, "<unused>")
			} else {
				fmt.Printf("0x%08X:%-9d", 38+12+ni*192, node.fileSegmentID)
			}

			fmt.Printf("%-10d", node.usedPagesInNotFullList)
			fmt.Printf("%-51s", node.freeList.toString(8))
			fmt.Printf("%-51s", node.notFullList.toString(8))
			fmt.Printf("%-51s", node.fullList.toString(8))

			if options.fragmentArray {
				cnt := 0
				for _, v := range node.fragmentArrayEntry {
					if v == 0xffffffff {
						continue
					}
					fmt.Printf("%d ", v)
					cnt++
				}
				if cnt == len(node.fragmentArrayEntry) {
					fmt.Printf("(extend allocate)")
				} else {
					fmt.Printf("(page allocate)")
				}
			}

			fmt.Printf("\r\n")
		}
	}
}

repository: songyandong/innoisp

repo_name: songyandong/innoisp


text:
package main

import (
	"ethclient/logger"
	"ethclient/test"
	"gopkg.in/ini.v1"
	"log"
	"sync"
)

const (
	EthClientConfFilePath = "conf/my.ini"
)

func initLogger() error {
	//fileHandler := logger.NewFileHandler("test.log")
	//logger.SetHandlers(logger.Console, fileHandler)
	logger.SetHandlers(logger.Console)
	//defer logger.Close()
	logger.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
	logger.SetLevel(logger.INFO)

	return nil
}

func main() {
	err := initLogger()
	if err != nil {
		log.Fatalln(err)
	}

	cfg, err := ini.Load(EthClientConfFilePath)
	if err != nil {
		logger.Error(err)
		return
	}

	ipport := cfg.Section("").Key("EthServerIpPort").String()
	coinbase := cfg.Section("").Key("Coinbase").String()
	pw := cfg.Section("").Key("Password").String()
	ks := cfg.Section("").Key("KeyStore").String()

	var wg sync.WaitGroup
	wg.Add(1)

	_, err = test.NewEthClientTest(ipport, coinbase, pw, ks, &wg)
	if err != nil {
		logger.Error(err)
		return
	}

	wg.Wait()
	logger.Debug("ethereum client exit")
}

repository: harveywangdao/ethclient

repo_name: harveywangdao/ethclient


text:
@article {Schuster98,
author = {Schuster, Arthur},
title = {On the investigation of hidden periodicities with application to a supposed 26 day period of meteorological phenomena},
journal = {Terrestrial Magnetism},
volume = {3},
number = {1},
issn = {0272-7528},
url = {http://dx.doi.org/10.1029/TM003i001p00013},
doi = {10.1029/TM003i001p00013},
pages = {13--41},
year = {1898},
}

@BOOK{Brandt1970,
   author = {{Brandt}, S.},
    title = "{Statistical and computational methods in data analysis}",
booktitle = {Amsterdam: North-Holland, and New York: American Elsevier Publication Co., 1970},
     year = 1970,
   adsurl = {http://adsabs.harvard.edu/abs/1970scmd.book.....B},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Cumming99,
   author = {{Cumming}, A. and {Marcy}, G.~W. and {Butler}, R.~P.},
    title = "{The Lick Planet Search: Detectability and Mass Thresholds}",
  journal = {\apj},
   eprint = {astro-ph/9906466},
 keywords = {STARS: BINARIES: SPECTROSCOPIC, METHODS: STATISTICAL, STARS: PLANETARY SYSTEMS, Stars: Binaries: Spectroscopic, Methods: Statistical, Stars: Planetary Systems},
     year = 1999,
    month = dec,
   volume = 526,
    pages = {890-915},
      doi = {10.1086/308020},
   adsurl = {http://adsabs.harvard.edu/abs/1999ApJ...526..890C},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Ferraz-Mello81,
   author = {{Ferraz-Mello}, S.},
    title = "{Estimation of Periods from Unequally Spaced Observations}",
  journal = {\aj},
     year = 1981,
    month = apr,
   volume = 86,
    pages = {619},
      doi = {10.1086/112924},
   adsurl = {http://adsabs.harvard.edu/abs/1981AJ.....86..619F},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{WelchStetson1993,
   author = {{Welch}, D.~L. and {Stetson}, P.~B.},
    title = "{Robust variable star detection techniques suitable for automated searches - New results for NGC 1866}",
  journal = {\aj},
 keywords = {Astronomical Photometry, Globular Clusters, Robustness (Mathematics), Variable Stars, Cepheid Variables, Light Curve, Main Sequence Stars},
     year = 1993,
    month = may,
   volume = 105,
    pages = {1813-1821},
      doi = {10.1086/116556},
   adsurl = {http://adsabs.harvard.edu/abs/1993AJ....105.1813W},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@INPROCEEDINGS{opsim3,
   author = {{Jones}, R.~L. and {Yoachim}, P. and {Chandrasekharan}, S. and
	{Connolly}, A.~J. and {Cook}, K.~H. and {Ivezic}, {\v Z}. and
	{Krughoff}, K.~S. and {Petry}, C. and {Ridgway}, S.~T.},
    title = "{The LSST metrics analysis framework (MAF)}",
booktitle = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
     year = 2014,
   series = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
   volume = 9149,
    month = jul,
      eid = {91490B},
    pages = {0},
      doi = {10.1117/12.2056835},
   adsurl = {http://adsabs.harvard.edu/abs/2014SPIE.9149E..0BJ},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@INPROCEEDINGS{opsim2,
   author = {{Ridgway}, S.~T. and {Chandrasekharan}, S. and {Cook}, K.~H. and
	{Jones}, R.~L. and {Krughoff}, K.~S. and {Petry}, C. and {Ivezi{\'c}}, {\v Z}.
	},
    title = "{Measuring the effectiveness of simulated LSST observing programs}",
booktitle = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
     year = 2012,
   series = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
   volume = 8448,
    month = sep,
      eid = {844810},
    pages = {10},
      doi = {10.1117/12.926306},
   adsurl = {http://adsabs.harvard.edu/abs/2012SPIE.8448E..10R},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@INPROCEEDINGS{opsim1,
   author = {{Delgado}, F. and {Cook}, K. and {Miller}, M. and {Allsman}, R. and
	{Pierfederici}, F.},
    title = "{LSST operation simulator implementation}",
booktitle = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
     year = 2006,
   series = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
   volume = 6270,
    month = jun,
      eid = {62701D},
    pages = {1},
      doi = {10.1117/12.671992},
   adsurl = {http://adsabs.harvard.edu/abs/2006SPIE.6270E..1DD},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Szabo2014,
   author = {{Szab{\'o}}, R. and {Ivezi{\'c}}, {\v Z}. and {Kiss}, L.~L. and
	{Koll{\'a}th}, Z. and {Jones}, L. and {Sesar}, B. and {Becker}, A.~C. and
	{Davenport}, J.~R.~A. and {Cutri}, R.~M.},
    title = "{High-precision 2MASS JHK$_{s}$ Light Curves and Other Data for RR Lyrae Star SDSS J015450 + 001501: Strong Constraints for Nonlinear Pulsation Models}",
  journal = {\apj},
archivePrefix = "arXiv",
   eprint = {1311.1385},
 primaryClass = "astro-ph.SR",
 keywords = {infrared: stars, stars: atmospheres, stars: individual: SDSS J015450+001501, stars: oscillations, stars: variables: RR Lyrae, techniques: photometric },
     year = 2014,
    month = jan,
   volume = 780,
      eid = {92},
    pages = {92},
      doi = {10.1088/0004-637X/780/1/92},
   adsurl = {http://adsabs.harvard.edu/abs/2014ApJ...780...92S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@misc{Vanderplas2015,
      author        = "Jake Vanderplas",
      title         = "{supersmoother: Efficient Python Implementation of
                       Friedman's SuperSmoother}",
      month         = "Jan",
      year          = "2015",
      publisher     = "Zenodo",
      doi           = "{10.5281/zenodo.14475}",
      url           = "{http://dx.doi.org/10.5281/zenodo.14475}",
}

@misc{gatspy,
  author       = {Jake Vanderplas},
  title        = {gatspy: General Tools for Astronomical Time Series in Python},
  month        = feb,
  year         = 2015,
  publisher    = Zenodo,
  doi          = {10.5281/zenodo.14833},
  url          = {http://dx.doi.org/10.5281/zenodo.14833}
}

@inproceedings{Tikhonov1963,
  title={Solution of incorrectly formulated problems and the regularization method},
  author={Tikhonov, Andrey},
  booktitle={Soviet Math. Dokl.},
  volume={5},
  pages={1035--1038},
  year={1963}
}

@article{Hoerl1970,
  added-at = {2009-01-29T03:39:09.000+0100},
  author = {Hoerl, A. E. and Kennard, R. W.},
  biburl = {http://www.bibsonomy.org/bibtex/2257711fd5e6222fce40b8fbcb66a906a/swpark81},
  interhash = {6468748d5b4b1f5d02107b4c131e9ea6},
  intrahash = {257711fd5e6222fce40b8fbcb66a906a},
  journal = {Technometrics},
  keywords = {ridge-regg},
  pages = {55--67},
  timestamp = {2009-01-29T03:39:09.000+0100},
  title = {Ridge Regression: Biased
        Estimation for Nonorthogonal Problems},
  volume = 12,
  year = 1970
}

@article{scikit-learn,
 title={Scikit-learn: Machine Learning in {P}ython},
 author={Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V.
         and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P.
         and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and
         Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.},
 journal={Journal of Machine Learning Research},
 volume={12},
 pages={2825--2830},
 year={2011}
}

@article{sklearn_API,
  added-at = {2013-10-16T00:00:00.000+0200},
  author = {Buitinck, Lars and Louppe, Gilles and Blondel, Mathieu and Pedregosa, Fabian and Mueller, Andreas and Grisel, Olivier and Niculae, Vlad and Prettenhofer, Peter and Gramfort, Alexandre and Grobler, Jaques and Layton, Robert and VanderPlas, Jake and Joly, Arnaud and Holt, Brian and Varoquaux, Gaël},
  biburl = {http://www.bibsonomy.org/bibtex/29964868fab29eabe27e1a59299bd8639/dblp},
  ee = {http://arxiv.org/abs/1309.0238},
  interhash = {b2e2cb9ba81977490b759cdf6c42d0b0},
  intrahash = {9964868fab29eabe27e1a59299bd8639},
  journal = {CoRR},
  keywords = {dblp},
  timestamp = {2013-10-17T11:34:54.000+0200},
  title = {API design for machine learning software: experiences from the scikit-learn project.},
  url = {http://dblp.uni-trier.de/db/journals/corr/corr1309.html#BuitinckLBPMGNPGGLVJHV13},
  volume = {abs/1309.0238},
  year = 2013
}

@ARTICLE{PDM1978,
   author = {{Stellingwerf}, R.~F.},
    title = "{Period determination using phase dispersion minimization}",
  journal = {\apj},
 keywords = {Curve Fitting, Light Curve, Periodic Variations, Statistical Analysis, Variable Stars, Cepheid Variables, Computer Techniques, Data Smoothing, Least Squares Method, Run Time (Computers), Significance},
     year = 1978,
    month = sep,
   volume = 224,
    pages = {953-960},
      doi = {10.1086/156444},
   adsurl = {http://adsabs.harvard.edu/abs/1978ApJ...224..953S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{LINEAR1,
   author = {{Sesar}, B. and {Stuart}, J.~S. and {Ivezi{\'c}}, {\v Z}. and
	{Morgan}, D.~P. and {Becker}, A.~C. and {Wo{\'z}niak}, P.},
    title = "{Exploring the Variable Sky with LINEAR. I. Photometric Recalibration with the Sloan Digital Sky Survey}",
  journal = {\aj},
archivePrefix = "arXiv",
   eprint = {1109.5227},
 primaryClass = "astro-ph.GA",
 keywords = {binaries: eclipsing, catalogs, stars: variables: general, stars: variables: RR Lyrae, surveys},
     year = 2011,
    month = dec,
   volume = 142,
      eid = {190},
    pages = {190},
      doi = {10.1088/0004-6256/142/6/190},
   adsurl = {http://adsabs.harvard.edu/abs/2011AJ....142..190S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{EM2008,
   author = {{Eyer}, L. and {Mowlavi}, N.},
    title = "{Variable stars across the observational HR diagram}",
  journal = {Journal of Physics Conference Series},
archivePrefix = "arXiv",
   eprint = {0712.3797},
     year = 2008,
    month = oct,
   volume = 118,
   number = 1,
      eid = {012010},
    pages = {012010},
      doi = {10.1088/1742-6596/118/1/012010},
   adsurl = {http://adsabs.harvard.edu/abs/2008JPhCS.118a2010E},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@inproceedings{Flaugher08,
   author = {{Flaugher}, B.},
    title = "{Overview of the Dark Energy Survey}",
 keywords = {Decade of Dark Energy, Space Telescope Science Institute, STScI, dark energy, dark energy survey },
booktitle = {A Decade of Dark Energy: Spring Symposium, Proceedings of the conferences held May 5-8, 2008 in Baltimore, Maryland. (USA). Edited by Norbert Pirzkal and Henry Ferguson.  http://www.stsci.edu/institute/conference/spring2008},
     year = 2008,
    month = may,
   adsurl = {http://adsabs.harvard.edu/abs/2008dde..confE..23F},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@INPROCEEDINGS{Kaiser2010,
   author = {{Kaiser}, N. and {Burgett}, W. and {Chambers}, K. and {Denneau}, L. and
	{Heasley}, J. and {Jedicke}, R. and {Magnier}, E. and {Morgan}, J. and
	{Onaka}, P. and {Tonry}, J.},
    title = "{The Pan-STARRS wide-field optical/NIR imaging survey}",
booktitle = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
     year = 2010,
   series = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
   volume = 7733,
    month = jul,
      doi = {10.1117/12.859188},
   adsurl = {http://adsabs.harvard.edu/abs/2010SPIE.7733E..12K},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@article{Ivezic08LSST,
   author = {{Ivezi{\'c}}, {\v{Z}}. and others},
    title = "{LSST: from Science Drivers to Reference Design and Anticipated Data Products}",
archivePrefix = "arXiv",
   eprint = {0805.2366},
 keywords = {Astrophysics},
     year = 2008,
    month = may,
   adsurl = {http://adsabs.harvard.edu/abs/2008arXiv0805.2366I},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Stetson1996,
   author = {{Stetson}, P.~B.},
    title = "{On the Automatic Determination of Light-Curve Parameters for Cepheid Variables}",
  journal = {\pasp},
 keywords = {CEPHEIDS, METHODS: NUMERICAL},
     year = 1996,
    month = oct,
   volume = 108,
    pages = {851},
      doi = {10.1086/133808},
   adsurl = {http://adsabs.harvard.edu/abs/1996PASP..108..851S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Oluseyi12,
   author = {{Oluseyi}, H.~M. and {Becker}, A.~C. and {Culliton}, C. and
	{Furqan}, M. and {Hoadley}, K.~L. and {Regencia}, P. and {Wells}, A.~J. and
	{Ivezic}, {\v Z}. and {Jones}, R.~L. and {Krughoff}, K.~S. and
	{Sesar}, B. and {Jacoby}, S. and {Allison}, I.~J.},
    title = "{Simulated LSST Survey of RR Lyrae Stars throughout the Local Group}",
  journal = {\aj},
 keywords = {Galaxy: halo, Galaxy: structure, methods: data analysis, stars: variables: RR Lyrae},
     year = 2012,
    month = jul,
   volume = 144,
      eid = {9},
    pages = {9},
      doi = {10.1088/0004-6256/144/1/9},
   adsurl = {http://adsabs.harvard.edu/abs/2012AJ....144....9O},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Suveges12,
   author = {{S{\"u}veges}, M. and {Sesar}, B. and {V{\'a}radi}, M. and {Mowlavi}, N. and
	{Becker}, A.~C. and {Ivezi{\'c}}, {\v Z}. and {Beck}, M. and
	{Nienartowicz}, K. and {Rimoldini}, L. and {Dubath}, P. and
	{Bartholdi}, P. and {Eyer}, L.},
    title = "{Search for high-amplitude {$\delta$} Scuti and RR Lyrae stars in Sloan Digital Sky Survey Stripe 82 using principal component analysis}",
  journal = {\mnras},
archivePrefix = "arXiv",
   eprint = {1203.6196},
 primaryClass = "astro-ph.IM",
 keywords = {methods: data analysis, methods: statistical, surveys, stars: variables: {$\delta$} Scuti, stars: variables: RR Lyrae },
     year = 2012,
    month = aug,
   volume = 424,
    pages = {2528-2550},
      doi = {10.1111/j.1365-2966.2012.21229.x},
   adsurl = {http://adsabs.harvard.edu/abs/2012MNRAS.424.2528S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Graham13,
   author = {{Graham}, M.~J. and {Drake}, A.~J. and {Djorgovski}, S.~G. and
	{Mahabal}, A.~A. and {Donalek}, C. and {Duan}, V. and {Maker}, A.
	},
    title = "{A comparison of period finding algorithms}",
  journal = {\mnras},
archivePrefix = "arXiv",
   eprint = {1307.2209},
 primaryClass = "astro-ph.IM",
 keywords = {methods: data analysis, techniques: photometric, astronomical data bases: miscellaneous, virtual observatory tools},
     year = 2013,
    month = oct,
   volume = 434,
    pages = {3423-3444},
      doi = {10.1093/mnras/stt1264},
   adsurl = {http://adsabs.harvard.edu/abs/2013MNRAS.434.3423G},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Kelly14,
   author = {{Kelly}, B.~C. and {Becker}, A.~C. and {Sobolewska}, M. and
	{Siemiginowska}, A. and {Uttley}, P.},
    title = "{Flexible and Scalable Methods for Quantifying Stochastic Variability in the Era of Massive Time-domain Astronomical Data Sets}",
  journal = {\apj},
archivePrefix = "arXiv",
   eprint = {1402.5978},
 primaryClass = "astro-ph.IM",
 keywords = {methods: statistical },
     year = 2014,
    month = jun,
   volume = 788,
      eid = {33},
    pages = {33},
      doi = {10.1088/0004-637X/788/1/33},
   adsurl = {http://adsabs.harvard.edu/abs/2014ApJ...788...33K},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Press89,
   author = {{Press}, W.~H. and {Rybicki}, G.~B.},
    title = "{Fast algorithm for spectral analysis of unevenly sampled data}",
  journal = {\apj},
 keywords = {Algorithms, Data Sampling, Fast Fourier Transformations, Spectrum Analysis, Computer Programs, Fortran},
     year = 1989,
    month = mar,
   volume = 338,
    pages = {277-280},
      doi = {10.1086/167197},
   adsurl = {http://adsabs.harvard.edu/abs/1989ApJ...338..277P},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Roberts87,
   author = {{Roberts}, D.~H. and {Lehar}, J. and {Dreher}, J.~W.},
    title = "{Time Series Analysis with Clean - Part One - Derivation of a Spectrum}",
  journal = {\aj},
     year = 1987,
    month = apr,
   volume = 93,
    pages = {968},
      doi = {10.1086/114383},
   adsurl = {http://adsabs.harvard.edu/abs/1987AJ.....93..968R},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@PHDTHESIS{Reimann94,
   author = {{Reimann}, J.~D.},
    title = "{Frequency Estimation Using Unequally-Spaced Astronomical Data.}",
   school = {University of California, Berkeley.},
     year = 1994,
    month = January,
   adsurl = {http://adsabs.harvard.edu/abs/1994PhDT........20R},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@book{ICVG2014,
  title={Statistics, Data Mining, and Machine Learning in Astronomy: A Practical Python Guide for the Analysis of Survey Data},
  author={{Ivezi{\'c}}, {\v{Z}}. and {Connolly}, A.J. and {VanderPlas}, J.T. and {Gray}, A.},
  isbn={9781400848911},
  series={Princeton Series in Modern Observational Astronomy},
  url={http://books.google.com/books?id=2fM8AQAAQBAJ},
  year={2014},
  publisher={Princeton University Press}
}

@ARTICLE{Lomb76,
   author = {{Lomb}, N.~R.},
    title = {Least-squares frequency analysis of unequally spaced data},
  journal = {\apss},
 keywords = {ASTRONOMY, DATA REDUCTION, LEAST SQUARES METHOD, BACKGROUND NOISE, POWER SPECTRA, SINE WAVES, SPECTRUM ANALYSIS, STATISTICAL ANALYSIS, VARIABLE STARS},
     year = 1976,
    monthX = feb,
   volume = 39,
    pages = {447-462},
      doi = {10.1007/BF00648343},
   adsurl = {http://adsabs.harvard.edu/abs/1976Ap%26SS..39..447L},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Scargle82,
   author = {{Scargle}, J.~D.},
    title = {Studies in astronomical time series analysis. {II} -- {S}tatistical aspects of spectral analysis of unevenly spaced data},
  journal = {\apj},
 keywords = {ASTRONOMY, SIGNAL DETECTION, SPECTRUM ANALYSIS, STATISTICAL DISTRIBUTIONS, TIME SERIES ANALYSIS, FOURIER TRANSFORMATION, FREQUENCY RESPONSE, POWER SPECTRA, SIGNAL TO NOISE RATIOS},
     year = 1982,
    monthX = dec,
   volume = 263,
    pages = {835-853},
      doi = {10.1086/160554},
   adsurl = {http://adsabs.harvard.edu/abs/1982ApJ...263..835S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@book{Bretthorst88,
  title={Bayesian Spectrum Analysis and Parameter Estimation},
  author={Bretthorst, G.L.},
  isbn={9783540968719},
  lccn={88212252},
  series={Lecture Notes in Statistics},
  url={http://books.google.com/books?id=fPm8OU6li00C},
  year={1988},
  publisher={Springer}
}

@ARTICLE{Zechmeister09,
   author = {{Zechmeister}, M. and {K{\"u}rster}, M.},
    title = {The generalised {L}omb-{S}cargle periodogram. {A} new formalism for the floating-mean and {K}eplerian periodograms},
  journal = {\aap},
archivePrefix = "arXiv",
   eprint = {0901.2573},
 primaryClass = "astro-ph.IM",
 keywords = {methods: data analysis, methods: analytical, methods: statistical, techniques: radial velocities},
     year = 2009,
    monthX = mar,
   volume = 496,
    pages = {577-584},
      doi = {10.1051/0004-6361:200811296},
   adsurl = {http://adsabs.harvard.edu/abs/2009A%26A...496..577Z},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@incollection{Jaynes87,
year={1987},
isbn={978-94-010-8257-0},
booktitle={Maximum-Entropy and Bayesian Spectral Analysis and Estimation Problems},
volume={21},
series={Fundamental Theories of Physics},
editor={Smith, C.Ray and Erickson, GaryJ.},
doi={10.1007/978-94-009-3961-5_1},
title={Bayesian Spectrum and Chirp Analysis},
url={http://dx.doi.org/10.1007/978-94-009-3961-5_1},
publisher={Springer Netherlands},
author={Jaynes, E.T.},
pages={1-37},
language={English}
}

@ARTICLE{Sesar2007,
   author = {{Sesar}, B. and {Ivezi{\'c}}, {\v Z}. and {Lupton}, R.~H. and
	{Juri{\'c}}, M. and {Gunn}, J.~E. and {Knapp}, G.~R. and {DeLee}, N. and
	{Smith}, J.~A. and {Miknaitis}, G. and {Lin}, H. and {Tucker}, D. and
	{Doi}, M. and {Tanaka}, M. and {Fukugita}, M. and {Holtzman}, J. and
	{Kent}, S. and {Yanny}, B. and {Schlegel}, D. and {Finkbeiner}, D. and
	{Padmanabhan}, N. and {Rockosi}, C.~M. and {Bond}, N. and {Lee}, B. and
	{Stoughton}, C. and {Jester}, S. and {Harris}, H. and {Harding}, P. and
	{Brinkmann}, J. and {Schneider}, D.~P. and {York}, D. and {Richmond}, M.~W. and
	{Vanden Berk}, D.},
    title = "{Exploring the Variable Sky with the Sloan Digital Sky Survey}",
  journal = {\aj},
archivePrefix = "arXiv",
   eprint = {0704.0655},
 keywords = {Galaxy: halo, Galaxy: stellar content, quasars: general, stars: Population II, stars: variables: other},
     year = 2007,
    month = dec,
   volume = 134,
    pages = {2236-2251},
      doi = {10.1086/521819},
   adsurl = {http://adsabs.harvard.edu/abs/2007AJ....134.2236S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Sesar2010,
   author = {{Sesar}, B. and {Ivezi{\'c}}, {\v Z}. and {Grammer}, S.~H. and
	{Morgan}, D.~P. and {Becker}, A.~C. and {Juri{\'c}}, M. and
	{De Lee}, N. and {Annis}, J. and {Beers}, T.~C. and {Fan}, X. and
	{Lupton}, R.~H. and {Gunn}, J.~E. and {Knapp}, G.~R. and {Jiang}, L. and
	{Jester}, S. and {Johnston}, D.~E. and {Lampeitl}, H.},
    title = "{Light Curve Templates and Galactic Distribution of RR Lyrae Stars from Sloan Digital Sky Survey Stripe 82}",
  journal = {\apj},
archivePrefix = "arXiv",
   eprint = {0910.4611},
 keywords = {Galaxy: halo, Galaxy: stellar content, Galaxy: structure, methods: data analysis, stars: horizontal-branch, stars: statistics, stars: variables: other},
     year = 2010,
    month = jan,
   volume = 708,
    pages = {717-741},
      doi = {10.1088/0004-637X/708/1/717},
   adsurl = {http://adsabs.harvard.edu/abs/2010ApJ...708..717S},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@book{NumRec,
 author = {Press, William H. and Teukolsky, Saul A. and Vetterling, William T. and Flannery, Brian P.},
 title = {Numerical Recipes 3rd Edition: The Art of Scientific Computing},
 year = {2007},
 isbn = {0521880688, 9780521880688},
 edition = {3},
 publisher = {Cambridge University Press},
 address = {New York, NY, USA},
}

@INPROCEEDINGS{astroML,
 author={{Vanderplas}, J.T. and {Connolly}, A.J.
         and {Ivezi{\'c}}, {\v Z}. and {Gray}, A.},
 booktitle={Conference on Intelligent Data Understanding (CIDU)},
 title={Introduction to astroML: Machine learning for astrophysics},
 month={oct.},
 pages={47 -54},
 doi={10.1109/CIDU.2012.6382200},
 year={2012}
}

@article{numpy,
 author = {van der Walt, Stefan and Colbert, S. Chris and Varoquaux, Gael},
 title = {The NumPy Array: A Structure for Efficient Numerical Computation},
 journal = {Computing in Science and Engg.},
 issue_date = {March 2011},
 volume = {13},
 number = {2},
 month = mar,
 year = {2011},
 issn = {1521-9615},
 pages = {22--30},
 numpages = {9},
 url = {http://dx.doi.org/10.1109/MCSE.2011.37},
 doi = {10.1109/MCSE.2011.37},
 acmid = {1957466},
 publisher = {IEEE Educational Activities Department},
 address = {Piscataway, NJ, USA},
 keywords = {NumPy, Python, Python, NumPy, scientific programming, numerical computations, programming libraries, numerical computations, programming libraries, scientific programming},
}

@ARTICLE{Long2014,
   author = {{Long}, J.~P. and {Chi}, E.~C. and {Baraniuk}, R.~G.},
    title = "{Estimating a Common Period for a Set of Irregularly Sampled Functions with Applications to Periodic Variable Star Data}",
archivePrefix = "arXiv",
   eprint = {1412.6520},
 primaryClass = "stat.AP",
 keywords = {Statistics - Applications, Astrophysics - Instrumentation and Methods for Astrophysics},
     year = 2014,
    month = dec,
   adsurl = {http://adsabs.harvard.edu/abs/2014arXiv1412.6520L},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}


text:
package main

import (
	"log"

	"github.com/gofiber/fiber/v2"
	"github.com/graphql-go/graphql"
)

type Input struct {
	Query         string                 `query:"query"`
	OperationName string                 `query:"operationName"`
	Variables     map[string]interface{} `query:"variables"`
}

func main() {
	fields := graphql.Fields{
		"hello": &graphql.Field{
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "world", nil
			},
		},
	}
	rootQuery := graphql.ObjectConfig{Name: "RootQuery", Fields: fields}
	schemaConfig := graphql.SchemaConfig{Query: graphql.NewObject(rootQuery)}
	schema, err := graphql.NewSchema(schemaConfig)
	if err != nil {
		log.Fatalf("failed to create new schema, error: %v", err)
	}

	app := fiber.New()

	// curl 'http://localhost:9090/?query=query%7Bhello%7D'
	app.Get("/", func(ctx *fiber.Ctx) error {
		var input Input
		if err := ctx.QueryParser(&input); err != nil {
			return ctx.
				Status(fiber.StatusInternalServerError).
				SendString("Cannot parse query parameters: " + err.Error())
		}

		result := graphql.Do(graphql.Params{
			Schema:         schema,
			RequestString:  input.Query,
			OperationName:  input.OperationName,
			VariableValues: input.Variables,
		})

		ctx.Set("Content-Type", "application/graphql-response+json")
		return ctx.JSON(result)
	})

	// curl 'http://localhost:9090/' --header 'content-type: application/json' --data-raw '{"query":"query{hello}"}'
	app.Post("/", func(ctx *fiber.Ctx) error {
		var input Input
		if err := ctx.BodyParser(&input); err != nil {
			return ctx.
				Status(fiber.StatusInternalServerError).
				SendString("Cannot parse body: " + err.Error())
		}

		result := graphql.Do(graphql.Params{
			Schema:         schema,
			RequestString:  input.Query,
			OperationName:  input.OperationName,
			VariableValues: input.Variables,
		})

		ctx.Set("Content-Type", "application/graphql-response+json")
		return ctx.JSON(result)
	})

	log.Fatal(app.Listen(":9090"))
}

repository: gofiber/recipes

repo_name: gofiber/recipes


text:
KBRANCH = "linux-5.10.y"
SRCREV_ni-titanium = "e97bd1e03e6ef58ec47ee7f085f8c14ed6329cf7"
LINUX_VERSION = "5.10.37"
KBUILD_DEFCONFIG = "x410_defconfig"

require linux-x4xx.inc
require kernel-include-nirio-header.inc

repository: EttusResearch/meta-ettus

repo_name: EttusResearch/meta-ettus

branch_name: refs/heads/zeus


text:
@Article{Jackson2018,
author="Jackson, Elizabeth",
title="Belief, credence, and evidence",
journal="Synthese",
year="2018",
month="Oct",
day="04",
abstract="I explore how rational belief and rational credence relate to evidence. I begin by looking at three cases where rational belief and credence seem to respond differently to evidence: cases of naked statistical evidence, lotteries, and hedged assertions. I consider an explanation for these cases, namely, that one ought not form beliefs on the basis of statistical evidence alone, and raise worries for this view. Then, I suggest another view that explains how belief and credence relate to evidence. My view focuses on the possibilities that the evidence makes salient. I argue that this makes better sense of the difference between rational credence and rational belief than other accounts.",
issn="1573-0964",
doi="10.1007/s11229-018-01965-1",
url="https://doi.org/10.1007/s11229-018-01965-1"
}

license: Unlicense


text:
package indexer

import (
	"context"
	"reflect"
	"time"

	mock "github.com/figment-networks/oasishub-indexer/mock/indexer"
	"github.com/figment-networks/oasishub-indexer/model"
	"github.com/figment-networks/oasishub-indexer/store"
	"github.com/figment-networks/oasishub-indexer/types"
	"github.com/golang/mock/gomock"
	"github.com/pkg/errors"

	"testing"
)

func TestSyncer_Run(t *testing.T) {
	const testReportID types.ID = 64
	dbErr := errors.New("dberr")

	t.Run("returns error when db errors", func(t *testing.T) {
		t.Parallel()
		ctrl := gomock.NewController(t)
		ctx := context.Background()
		pl := testSyncerPayload()

		dbMock := mock.NewMockSyncerTaskStore(ctrl)
		dbMock.EXPECT().FindByHeight(pl.CurrentHeight).Return(nil, dbErr).Times(1)

		task := NewMainSyncerTask(dbMock)

		if err := task.Run(ctx, pl); err != dbErr {
			t.Errorf("unexpected error, want: %v, got: %v", dbErr, err)
		}
	})

	t.Run("updates existing syncable", func(t *testing.T) {
		t.Parallel()
		ctrl := gomock.NewController(t)
		ctx := context.Background()
		pl := testSyncerPayload()

		expectSyncable := &model.Syncable{
			Height:       pl.CurrentHeight,
			Time:         pl.HeightMeta.Time,
			AppVersion:   pl.HeightMeta.AppVersion,
			BlockVersion: pl.HeightMeta.BlockVersion,
			Status:       model.SyncableStatusRunning,
			StartedAt:    *types.NewTimeFromTime(time.Now()),
		}

		dbMock := mock.NewMockSyncerTaskStore(ctrl)
		dbMock.EXPECT().FindByHeight(pl.CurrentHeight).Return(expectSyncable, nil).Times(1)
		task := NewMainSyncerTask(dbMock)

		if err := task.Run(ctx, pl); err != nil {
			t.Errorf("unexpected error, want %v; got %v", nil, err)
			return
		}

		if !reflect.DeepEqual(pl.Syncable, expectSyncable) {
			t.Errorf("unexpected payload.Syncable, want: %+v, got: %+v", expectSyncable, pl.Syncable)
			return
		}
	})

	t.Run("updates new syncable", func(t *testing.T) {
		t.Parallel()

		ctrl := gomock.NewController(t)
		ctx := context.Background()
		pl := testSyncerPayload()

		dbMock := mock.NewMockSyncerTaskStore(ctrl)
		dbMock.EXPECT().FindByHeight(pl.CurrentHeight).Return(nil, store.ErrNotFound).Times(1)
		task := NewMainSyncerTask(dbMock)

		if err := task.Run(ctx, pl); err != nil {
			t.Errorf("unexpected error, want %v; got %v", nil, err)
			return
		}

		if pl.Syncable.Height != pl.CurrentHeight ||
			pl.Syncable.Time != pl.HeightMeta.Time ||
			pl.Syncable.AppVersion != pl.HeightMeta.AppVersion ||
			pl.Syncable.BlockVersion != pl.HeightMeta.BlockVersion ||
			pl.Syncable.Status != model.SyncableStatusRunning ||
			pl.Syncable.StartedAt.IsZero() {
			t.Errorf("unexpected payload.Syncable %+v", pl.Syncable)
			return
		}
	})

	t.Run("Adds reportId to syncable if it exists in context", func(t *testing.T) {
		t.Parallel()

		ctrl := gomock.NewController(t)
		ctx := ctxWithReport(testReportID)
		pl := testSyncerPayload()

		dbMock := mock.NewMockSyncerTaskStore(ctrl)
		dbMock.EXPECT().FindByHeight(pl.CurrentHeight).Return(&model.Syncable{}, nil).Times(1)
		task := NewMainSyncerTask(dbMock)

		if err := task.Run(ctx, pl); err != nil {
			t.Errorf("unexpected error, want: %v, got: %v", nil, err)
		}

		if pl.Syncable.ReportID != testReportID {
			t.Errorf("unexpected reportID in syncable, want: %v, got: %v", testReportID, pl.Syncable.ReportID)
		}
	})
}

func ctxWithReport(modelID types.ID) context.Context {
	ctx := context.Background()
	report := &model.Report{
		Model: &model.Model{ID: modelID},
	}

	return context.WithValue(ctx, CtxReport, report)
}

func testSyncerPayload() *payload {
	return &payload{
		CurrentHeight: 10,
		HeightMeta: HeightMeta{
			Time:         *types.NewTimeFromTime(time.Now()),
			AppVersion:   4,
			BlockVersion: 6,
		},
	}
}

repository: Esya/oasishub-indexer

repo_name: Esya/oasishub-indexer


text:
DESCRIPTION = "Qt Catalog Embedded Widget Demo"
HOMEPAGE = "https://gforge01.dal.design.ti.com/gf/project/qtembwidget/"
LICENSE = "Embedded Widgets Demo License Agreement"
PRIORITY = "optional"

PR = "r0"

SRC_URI = "https://gforge.ti.com/gf/download/frsrelease/338/3627/qt-embedded-widget-demo-v${PV}.tar.gz"

SRC_URI[md5sum] = "9b67430fa9a2f5cbe7f26140a61ee784"
SRC_URI[sha256sum] = "8b077a0c337e77656173ddf70db7475785d51ccffa87c04a71be62fb68fba277"

S = "${WORKDIR}/qtembwidget"

inherit qt4e

do_install() {
	install -d ${D}/${bindir}
	install -m 0755 ${S}/examples/catalog_ti/catalog_ti ${D}/${bindir}/emb_widget
}

RRECOMMENDS_${PN} = "qt4-embedded-plugin-mousedriver-tslib"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
@article{Bradford_1976,
	doi = {10.1016/0003-2697(76)90527-3},
	url = {https://doi.org/10.1016%2F0003-2697%2876%2990527-3},
	year = 1976,
	month = {may},
	publisher = {Elsevier {BV}},
	volume = {72},
	number = {1-2},
	pages = {248--254},
	author = {Marion M. Bradford},
	title = {A rapid and sensitive method for the quantitation of microgram quantities of protein utilizing the principle of protein-dye binding},
	journal = {Analytical Biochemistry}
}

repository: zeshuaro/LinkedRW

repo_name: zeshuaro/LinkedRW


text:
package crgen

import (
	"os"

	"github.com/spf13/cobra"
	ctrl "sigs.k8s.io/controller-runtime"
)

var (
	logger = ctrl.Log.WithName("oambuilder.crgen")
	gen    = &Generator{}
)

func init() {
	CRGen.Flags().StringVarP(&gen.OAM, "oam", "a", "./OAM", "Work dir of an OAM Styled Operator Project.")
	CRGen.Flags().StringVarP(&gen.Path, "path", "p", "./...", "Work dir of an OAM Styled Operator Project.")
	CRGen.Flags().StringVarP(&gen.Output, "output", "o", "", "The output dir stores the cr yamls.")
	CRGen.ParseFlags(os.Args)
}

var CRGen = &cobra.Command{
	Use:   "crgen",
	Short: "Handler for generate CR yaml for oam.workloadtype or oam.trait for kubebuilder",
	Long:  "Handler for generate CR yaml for oam.workloadtype or oam.trait for kubebuilder",
	Run: func(cmd *cobra.Command, args []string) {
		if err := gen.Run(); err != nil {
			logger.Error(err, "gen.Run")
			os.Exit(1)
		}
	},
}

repository: oam-dev/oam-go-sdk

repo_name: oam-dev/oam-go-sdk


text:
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';

import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';

import ActorSettingCard from '../../../components/cards/ActorSetting';

import Admins from './admins/Browse';
import Apps from './apps/Browse';
import Delete from './Delete';
import Info from './Info';
import PermissionsBrowse from './permissions/Browse';
import PersonAccount from '../../people/settings/Account';
import PersonInfo from '../../people/settings/Info';
import Privacy from './Privacy';
import Progress from '../../../components/Progress';

import actions from '../../../actions';
import permissions from '../../../permissions/actor';
import ActorType from '../../../proptypes/Actor';
import i18n from '../../../languages';

const TABS = {
  ADMINS: 'admins',
  ACCOUNT: 'account',
  APPS: 'apps',
  INFO: 'info',
  PERMISSIONS: 'permissions',
  PRIVACY: 'privacy',
  DELETE: 'delete',
};

const ActorsSettings = (props) => {
  const {
    readActor,
    actor,
    resetActors,
    alertSuccess,
    alertError,
    namespace,
    selectedTab,
    computedMatch: {
      params,
    },
    isFetching,
    error,
    success,
  } = props;

  const [id] = params.id.split('-');
  const [tab, setTab] = useState(selectedTab);

  useEffect(() => {
    readActor(id, namespace);

    return () => {
      resetActors();
    };
  }, [id, namespace]);

  useEffect(() => {
    if (error) {
      alertError(i18n.t('prompts:updated.error'));
    }

    if (success) {
      alertSuccess(i18n.t('prompts:updated.sucess'));
    }
  }, [error, alertError, success, alertSuccess]);

  if (!actor.id && isFetching) {
    return (
      <Progress />
    );
  }

  const ActorAdmins = Admins(namespace);
  const ActorApps = Apps(namespace);
  const ActorInfo = Info(namespace);
  const ActorPermissionsBrowse = PermissionsBrowse(namespace);
  const ActorPrivacy = Privacy(namespace);
  const ActorDelete = Delete(namespace);

  const canDelete = permissions.canDelete(actor);

  return (
    <>
      <Tabs
        variant="scrollable"
        scrollButtons="on"
        value={tab}
        onChange={(e, newTab) => {
          setTab(newTab);
        }}
        aria-label={i18n.t('commons:settings')}
      >
        <Tab label={i18n.t(`${namespace}:settings.info`)} value={TABS.INFO} />
        {namespace === 'people' &&
          <Tab label={i18n.t(`${namespace}:settings.account`)} value={TABS.ACCOUNT} />}
        {namespace !== 'people' &&
          <Tab label={i18n.t(`${namespace}:settings.admins`)} value={TABS.ADMINS} />}
        <Tab label={i18n.t(`${namespace}:settings.privacy`)} value={TABS.PRIVACY} />
        <Tab label={i18n.t(`${namespace}:settings.apps`)} value={TABS.APPS} />
        <Tab label={i18n.t(`${namespace}:settings.permissions`)} value={TABS.PERMISSIONS} />
        {canDelete &&
          <Tab label={i18n.t(`${namespace}:settings.delete`)} value={TABS.DELETE} />}
      </Tabs>
      <ActorSettingCard
        namespace={namespace}
        actor={actor}
        subheader={i18n.t(`${namespace}:settings.${tab}`)}
      >
        {namespace === 'people' && tab === TABS.INFO &&
          <PersonInfo />}
        {namespace !== 'people' && tab === TABS.INFO &&
          <ActorInfo />}
        {namespace === 'people' && tab === TABS.ACCOUNT &&
          <PersonAccount />}
        {namespace !== 'people' && tab === TABS.ADMINS &&
          <ActorAdmins />}
        {tab === TABS.PRIVACY &&
          <ActorPrivacy />}
        {tab === TABS.APPS &&
          <ActorApps />}
        {tab === TABS.PERMISSIONS &&
          <ActorPermissionsBrowse />}
        {canDelete && tab === TABS.DELETE &&
          <ActorDelete />}
      </ActorSettingCard>
    </>
  );
};

ActorsSettings.propTypes = {
  readActor: PropTypes.func.isRequired,
  actor: ActorType.isRequired,
  resetActors: PropTypes.func.isRequired,
  alertSuccess: PropTypes.func.isRequired,
  alertError: PropTypes.func.isRequired,
  namespace: PropTypes.string.isRequired,
  computedMatch: PropTypes.object.isRequired,
  isFetching: PropTypes.bool.isRequired,
  error: PropTypes.string.isRequired,
  success: PropTypes.bool.isRequired,
  selectedTab: PropTypes.oneOf([
    TABS.ADMINS,
    TABS.ACCOUNT,
    TABS.APPS,
    TABS.INFO,
    TABS.PERMISSIONS,
    TABS.PRIVACY,
    TABS.DELETE,
  ]),
};

ActorsSettings.defaultProps = {
  selectedTab: TABS.INFO,
};

const mapStateToProps = (namespace) => {
  return (state) => {
    const {
      [namespace]: {
        current: actor,
      },
      isFetching,
      error,
      success,
    } = state[namespace];

    return {
      actor,
      namespace,
      isFetching,
      error,
      success,
    };
  };
};

const mapDispatchToProps = (namespace) => {
  return (dispatch) => {
    return {
      readActor: (id) => {
        return dispatch(actions[namespace].read(id, namespace));
      },
      resetActors: () => {
        return dispatch(actions[namespace].reset());
      },
      alertSuccess: (message) => {
        return dispatch(actions.app.alert.success(message));
      },
      alertError: (message) => {
        return dispatch(actions.app.alert.error(message));
      },
    };
  };
};

export default (namespace) => {
  return connect(
    mapStateToProps(namespace),
    mapDispatchToProps(namespace),
  )(ActorsSettings);
};

repository: anahitasocial/anahita-react

repo_name: anahitasocial/anahita-react

gha_language: JavaScript

extension: js


text:
package builds

import (
	"fmt"

	g "github.com/onsi/ginkgo"
	o "github.com/onsi/gomega"

	exutil "github.com/openshift/origin/test/extended/util"
	s2istatus "github.com/openshift/source-to-image/pkg/util/status"
)

var _ = g.Describe("[Feature:Builds][Conformance] s2i build with a root user image", func() {
	defer g.GinkgoRecover()

	var (
		buildFixture = exutil.FixturePath("testdata", "builds", "s2i-build-root.yaml")
		oc           = exutil.NewCLI("s2i-build-root", exutil.KubeConfigPath())
	)

	g.Context("", func() {
		g.JustBeforeEach(func() {
			g.By("waiting for builder service account")
			err := exutil.WaitForBuilderAccount(oc.AdminKubeClient().Core().ServiceAccounts(oc.Namespace()))
			o.Expect(err).NotTo(o.HaveOccurred())
		})

		g.AfterEach(func() {
			if g.CurrentGinkgoTestDescription().Failed {
				exutil.DumpPodStates(oc)
				exutil.DumpPodLogsStartingWith("", oc)
			}
		})

		g.Describe("Building using an image with a root default user", func() {
			g.It("should fail the build immediately", func() {
				oc.SetOutputDir(exutil.TestContext.OutputDir)

				g.By(fmt.Sprintf("calling oc create -f %q", buildFixture))
				err := oc.Run("create").Args("-f", buildFixture).Execute()
				o.Expect(err).NotTo(o.HaveOccurred())

				g.By("starting a test build")
				// this uses the build-quota dir as the binary input source on purpose - we don't really care what we upload
				// to the build since it will fail before we ever consume the inputs.
				br, _ := exutil.StartBuildAndWait(oc, "s2i-build-root", "--from-dir", exutil.FixturePath("testdata", "builds", "build-quota"))
				br.AssertFailure()
				o.Expect(string(br.Build.Status.Reason)).To(o.Equal(string(s2istatus.ReasonPullBuilderImageFailed)))
				o.Expect(string(br.Build.Status.Message)).To(o.Equal(string(s2istatus.ReasonMessagePullBuilderImageFailed)))

			})
		})
	})
})

repository: openshift-ci-robot/origin

repo_name: openshift-ci-robot/origin


text:
package search

// BinarySearch 模板一
// 给定一个n个元素有序的（升序）整型数组nums 和一个目标值target ，
// 写一个函数搜索nums中的 target，如果目标值存在返回下标，否则返回 -1。
// https://leetcode-cn.com/problems/binary-search
func BinarySearch(nums []int, target int) int {
	index := -1

	// 先把空数组排除掉
	if len(nums) == 0 {
		return index
	}

	// 定义min和max
	min, max := 0, len(nums)-1
	// 初始化mid，这样的做法是为了防止溢出
	mid := min + (max-min+1)>>1

	for mid >= min && mid <= max {
		// 如果mid上的数大于target，说明target在左半部分
		// 如果小于target，说明在右半部分
		// 如果相等，说明找到target，直接返回mid
		if nums[mid] > target {
			max = mid - 1
		} else if nums[mid] < target {
			min = mid + 1
		} else {
			return mid
		}

		// 重新计算mid的位置，并进行下一轮查找
		mid = min + (max-min+1)>>1
	}

	return index
}

// BinarySearchII 模板二
// 这个模板更常用一些，可以查找target出现的第一次，最后一次，或者出现的次数统计等。
// 如果没有以上要求，可以直接用模板一。
func BinarySearchII(nums []int, target int) int {
	min, max, mid := 0, len(nums)-1, 0

	// 查找范围至少有3个时才进入循环
	for min+1 < max {
		mid = min + (max-min)>>1

		num := nums[mid]
		switch {
		case num > target:
			max = mid - 1
		case num < target:
			min = mid + 1
		case num == target:
			// 这里没有直接跳出，而是吧mid赋给max
			max = mid
		}
	}

	// 跳出循环后，查找范围少于3个元素，可以直接检查min和max
	if nums[min] == target {
		return min
	}
	if nums[max] == target {
		return max
	}
	return -1
}

repository: EmbraceUU/caesar-go

repo_name: EmbraceUU/caesar-go


text:
// Code generated by go-swagger; DO NOT EDIT.

package transactions

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

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"

	strfmt "github.com/go-openapi/strfmt"

	models "github.com/propertechnologies/yodlee-go/models"
)

// GetTransactionCategorizationRulesReader is a Reader for the GetTransactionCategorizationRules structure.
type GetTransactionCategorizationRulesReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetTransactionCategorizationRulesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetTransactionCategorizationRulesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewGetTransactionCategorizationRulesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetTransactionCategorizationRulesNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result

	default:
		return nil, runtime.NewAPIError("unknown error", response, response.Code())
	}
}

// NewGetTransactionCategorizationRulesOK creates a GetTransactionCategorizationRulesOK with default headers values
func NewGetTransactionCategorizationRulesOK() *GetTransactionCategorizationRulesOK {
	return &GetTransactionCategorizationRulesOK{}
}

/*GetTransactionCategorizationRulesOK handles this case with default header values.

OK
*/
type GetTransactionCategorizationRulesOK struct {
	Payload *models.TransactionCategorizationRuleResponse
}

func (o *GetTransactionCategorizationRulesOK) Error() string {
	return fmt.Sprintf("[GET /transactions/categories/txnRules][%d] getTransactionCategorizationRulesOK  %+v", 200, o.Payload)
}

func (o *GetTransactionCategorizationRulesOK) GetPayload() *models.TransactionCategorizationRuleResponse {
	return o.Payload
}

func (o *GetTransactionCategorizationRulesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.TransactionCategorizationRuleResponse)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetTransactionCategorizationRulesUnauthorized creates a GetTransactionCategorizationRulesUnauthorized with default headers values
func NewGetTransactionCategorizationRulesUnauthorized() *GetTransactionCategorizationRulesUnauthorized {
	return &GetTransactionCategorizationRulesUnauthorized{}
}

/*GetTransactionCategorizationRulesUnauthorized handles this case with default header values.

Unauthorized
*/
type GetTransactionCategorizationRulesUnauthorized struct {
}

func (o *GetTransactionCategorizationRulesUnauthorized) Error() string {
	return fmt.Sprintf("[GET /transactions/categories/txnRules][%d] getTransactionCategorizationRulesUnauthorized ", 401)
}

func (o *GetTransactionCategorizationRulesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

// NewGetTransactionCategorizationRulesNotFound creates a GetTransactionCategorizationRulesNotFound with default headers values
func NewGetTransactionCategorizationRulesNotFound() *GetTransactionCategorizationRulesNotFound {
	return &GetTransactionCategorizationRulesNotFound{}
}

/*GetTransactionCategorizationRulesNotFound handles this case with default header values.

Not Found
*/
type GetTransactionCategorizationRulesNotFound struct {
}

func (o *GetTransactionCategorizationRulesNotFound) Error() string {
	return fmt.Sprintf("[GET /transactions/categories/txnRules][%d] getTransactionCategorizationRulesNotFound ", 404)
}

func (o *GetTransactionCategorizationRulesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	return nil
}

repository: propertechnologies/yodlee-go

repo_name: propertechnologies/yodlee-go


text:
require recipes-support/popt/popt_1.16.bb
FILESEXTRAPATHS_prepend = "${THISDIR}/files:${COREBASE}/meta/recipes-support/popt/popt:"

inherit debian-package

DEBIAN_SECTION = "devel"
DPR = "0"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"

# popt_fix_for_automake-1.12.patch: already applied in 1.16-10
SRC_URI += " \
file://pkgconfig_fix.patch \
file://disable_tests.patch \
"

# Preprocessing directive #elseif should be #elif
# so change it.
do_compile_prepend(){
	sed -i s@"#elseif"@"#elif"@g ${S}/system.h
}


text:
Automatically generated by Mendeley Desktop 1.19.4
Any changes to this file will be lost if it is regenerated by Mendeley.

BibTeX export options can be customized via Preferences -> BibTeX in Mendeley Desktop

@article{Xiong2016,
abstract = {Conversational speech recognition has served as a flagship speech recognition task since the release of the Switchboard corpus in the 1990s. In this paper, we measure the human error rate on the widely used NIST 2000 test set, and find that our latest automated system has reached human parity. The error rate of professional transcribers is 5.9{\%} for the Switchboard portion of the data, in which newly acquainted pairs of people discuss an assigned topic, and 11.3{\%} for the CallHome portion where friends and family members have open-ended conversations. In both cases, our automated system establishes a new state of the art, and edges past the human benchmark, achieving error rates of 5.8{\%} and 11.0{\%}, respectively. The key to our system's performance is the use of various convolutional and LSTM acoustic model architectures, combined with a novel spatial smoothing method and lattice-free MMI acoustic training, multiple recurrent neural network language modeling approaches, and a systematic use of system combination.},
archivePrefix = {arXiv},
arxivId = {1610.05256},
author = {Xiong, W. and Droppo, J. and Huang, X. and Seide, F. and Seltzer, M. and Stolcke, A. and Yu, D. and Zweig, G.},
eprint = {1610.05256},
file = {:Users/sepmein/Qsync/Papers/Xiong et al.{\_}2016{\_}Achieving Human Parity in Conversational Speech Recognition.pdf:pdf},
title = {{Achieving Human Parity in Conversational Speech Recognition}},
url = {http://arxiv.org/abs/1610.05256},
year = {2016}
}

repository: sepmein/references

repo_name: sepmein/references


text:
@article{chakraborty2016hierarchical,
  title={{Hierarchical Quickest Change Detection via Surrogates}},
  author={Chakraborty, Prithwish and Muthiah, Sathappan and Tandon, Ravi and Ramakrishnan, Naren},
  journal={arXiv preprint arXiv:1603.09739},
  year={2016}
}
@inproceedings{kdd:beating-the-news,
  author    = {Naren Ramakrishnan and
               Patrick Butler and
               Sathappan Muthiah and
               Nathan Self and
               others},
  title     = {{`Beating the news' with {EMBERS:} Forecasting Civil Unrest using Open
      Source Indicators}},
  booktitle = {International Conference on Knowledge Discovery
               and Data Mining, {KDD}, August 24 - 27,
               2014},
  pages     = {1799--1808},
  year      = {2014},
  url       = {http://doi.acm.org/10.1145/2623330.2623373},
  doi       = {10.1145/2623330.2623373},
  timestamp = {Fri, 22 Apr 2016 19:03:57 +0200},
  biburl    = {http://dblp.uni-trier.de/rec/bib/conf/kdd/RamakrishnanBMSKSWCVKKMZHCLHSTGKDAZFSFAGM14},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}
@inproceedings{pp-paper1,
  author    = {Sathappan Muthiah and
               Bert Huang and
               Jaime Arredondo and
               others},
  title     = {{Planned Protest Modeling in News and Social Media}},
  booktitle = {{AAAI} Conference on Artificial Intelligence,
               January 25-30, 2015},
  pages     = {3920--3927},
  year      = {2015},
  _crossref  = {DBLP:conf/aaai/2015},
  url       = {http://www.aaai.org/ocs/index.php/IAAI/IAAI15/paper/view/9652},
  timestamp = {Sun, 12 Apr 2015 15:18:08 +0200},
  biburl    = {http://dblp.uni-trier.de/rec/bib/conf/aaai/MuthiahHAMGKR15},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}

@inproceedings{huso,
  author    = {Dipak K Gupta and
               Sathappan Muthiah and
               David Mares and
               Naren Ramakrishnan},
  title     = {{Forecasting Civil Strife: An Emerging Methodology}},
  booktitle = {{HUSO} The Third International Conference on Human and Social Analytics},
  year      = {2017}
}

@article{muthiah2016capturing,
  title={Capturing Planned Protests from Open Source Indicators.},
  author={Muthiah, Sathappan and Huang, Bert and Arredondo, Jaime and Mares, David and Getoor, Lise and Katz, Graham and Ramakrishnan, Naren},
  journal={AI Magazine},
  volume={37},
  number={2},
  year={2016}
}

@inproceedings{Ning:2016:MPE:2939672.2939802,
 author = {Ning, Yue and Muthiah, Sathappan and Rangwala, Huzefa and Ramakrishnan, Naren},
 title = {Modeling Precursors for Event Forecasting via Nested Multi-Instance Learning},
 booktitle = {Proceedings of the 22Nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
 series = {KDD '16},
 year = {2016},
 isbn = {978-1-4503-4232-2},
 location = {San Francisco, California, USA},
 pages = {1095--1104},
 numpages = {10},
 url = {http://doi.acm.org/10.1145/2939672.2939802},
 doi = {10.1145/2939672.2939802},
 acmid = {2939802},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {event detection, multi-instance learning, text mining},
}
@article{doyle2014forecasting,
  title={Forecasting significant societal events using the Embers streaming predictive analytics system},
  author={Doyle, Andy and Katz, Graham and Summers, Kristen and Ackermann, Chris and Zavorin, Ilya and Lim, Zunsik and Muthiah, Sathappan and Butler, Patrick and Self, Nathan and Zhao, Liang and others},
  journal={Big Data},
  volume={2},
  number={4},
  pages={185--195},
  year={2014},
  publisher={Mary Ann Liebert, Inc. 140 Huguenot Street, 3rd Floor New Rochelle, NY 10801 USA}
}

@article{schlachter2015leveraging,
  title={Leveraging topic models to develop metrics for evaluating the quality of narrative threads extracted from news stories},
  author={Schlachter, Jason and Ruvinsky, Alicia and Reynoso, Luis Asencios and Muthiah, Sathappan and Ramakrishnan, Naren},
  journal={Procedia Manufacturing},
  volume={3},
  pages={4028--4035},
  year={2015},
  publisher={Elsevier}
}
@inproceedings{ning2015uncovering,
  title={Uncovering news-twitter reciprocity via interaction patterns},
  author={Ning, Yue and Muthiah, Sathappan and Tandon, Ravi and Ramakrishnan, Naren},
  booktitle={Advances in Social Networks Analysis and Mining (ASONAM), 2015 IEEE/ACM International Conference on},
  pages={1--8},
  year={2015},
  organization={IEEE}
}
@inproceedings{Muthiah:2016:EYE:2939672.2939709,
 author = {Muthiah, Sathappan and Butler, Patrick and Khandpur, Rupinder Paul and Saraf, Parang and Self, Nathan and Rozovskaya, Alla and Zhao, Liang and Cadena, Jose and Lu, Chang-Tien and Vullikanti, Anil and Marathe, Achla and Summers, Kristen and Katz, Graham and Doyle, Andy and Arredondo, Jaime and Gupta, Dipak K. and Mares, David and Ramakrishnan, Naren},
 title = {EMBERS at 4 Years: Experiences Operating an Open Source Indicators Forecasting System},
 booktitle = {Proceedings of the 22Nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
 series = {KDD '16},
 year = {2016},
 isbn = {978-1-4503-4232-2},
 location = {San Francisco, California, USA},
 pages = {205--214},
 numpages = {10},
 url = {http://doi.acm.org/10.1145/2939672.2939709},
 doi = {10.1145/2939672.2939709},
 acmid = {2939709},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {civil unrest, event forecasting, open source indicators},
}

repository: sathappanspm/resume

repo_name: sathappanspm/resume


text:
@article{FEYISA201423,
	abstract = {Classifying surface cover types and analyzing changes are among the most common applications of remote sensing. One of the most basic classification tasks is to distinguish water bodies from dry land surfaces. Landsat imagery is among the most widely used sources of data in remote sensing of water resources; and although several techniques of surface water extraction using Landsat data are described in the literature, their application is constrained by low accuracy in various situations. Besides, with the use of techniques such as single band thresholding and two-band indices, identifying an appropriate threshold yielding the highest possible accuracy is a challenging and time consuming task, as threshold values vary with location and time of image acquisition. The purpose of this study was therefore to devise an index that consistently improves water extraction accuracy in the presence of various sorts of environmental noise and at the same time offers a stable threshold value. Thus we introduced a new Automated Water Extraction Index (AWEI) improving classification accuracy in areas that include shadow and dark surfaces that other classification methods often fail to classify correctly. We tested the accuracy and robustness of the new method using Landsat 5 TM images of several water bodies in Denmark, Switzerland, Ethiopia, South Africa and New Zealand. Kappa coefficient, omission and commission errors were calculated to evaluate accuracies. The performance of the classifier was compared with that of the Modified Normalized Difference Water Index (MNDWI) and Maximum Likelihood (ML) classifiers. In four out of five test sites, classification accuracy of AWEI was significantly higher than that of MNDWI and ML (P-value{\textless}0.01). AWEI improved accuracy by lessening commission and omission errors by 50{\%} compared to those resulting from MNDWI and about 25{\%} compared to ML classifiers. Besides, the new method was shown to have a fairly stable optimal threshold value. Therefore, AWEI can be used for extracting water with high accuracy, especially in mountainous areas where deep shadow caused by the terrain is an important source of classification error.},
	author = {Feyisa, Gudina L and Meilby, Henrik and Fensholt, Rasmus and Proud, Simon R},
	doi = {https://doi.org/10.1016/j.rse.2013.08.029},
	file = {:C$\backslash$:/Users/cowusu42/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Feyisa et al. - 2014 - Automated Water Extraction Index A new technique for surface water mapping using Landsat imagery.pdf:pdf},
	issn = {0034-4257},
	journal = {Remote Sensing of Environment},
	keywords = {Classification accuracy,Mixed pixel,Subpixel,Threshold stability},
	mendeley-groups = {Remote Sensing},
	pages = {23--35},
	title = {{Automated Water Extraction Index: A new technique for surface water mapping using Landsat imagery}},
	url = {https://www.sciencedirect.com/science/article/pii/S0034425713002873},
	volume = {140},
	year = {2014}
}

@article{Xu2006,
	abstract = {The normalized difference water index (NDWI) of McFeeters (1996) was modified by substitution of a middle infrared band such as Landsat TM band 5 for the near infrared band used in the NDWI. The modified NDWI (MNDWI) can enhance open water features while efficiently suppressing and even removing built-up land noise as well as vegetation and soil noise. The enhanced water information using the NDWI is often mixed with built-up land noise and the area of extracted water is thus overestimated. Accordingly, the MNDWI is more suitable for enhancing and extracting water information for a water region with a background dominated by built-up land areas because of its advantage in reducing and even removing built-up land noise over the NDWI.},
	author = {Xu, Hanqiu},
	doi = {10.1080/01431160600589179},
	file = {:Z$\backslash$:/research-akalyanapu/Collins/DISSERTATION/Literature/Remote Sensing/xuh06.pdf:pdf},
	issn = {13665901},
	journal = {International Journal of Remote Sensing},
	mendeley-groups = {Remote Sensing},
	number = {14},
	pages = {3025--3033},
	title = {{Modification of normalised difference water index (NDWI) to enhance open water features in remotely sensed imagery}},
	volume = {27},
	year = {2006}
}

@article{Walker2020,
	abstract = {Accurate monitoring of surface water location and extent is critical for the management of diverse water resource phenomena. The multi-decadal archive of Landsat satellite imagery is punctuated by missing data due to cloud cover during acquisition times, hindering the assembly of a continuous time series of inundation dynamics. This study investigated whether streamflow volume measurements could be integrated with satellite data to fill gaps in monthly surface water chronologies for the Central Valley region of California, USA, from 1984 to 2015. We aggregated measurements of maximum monthly water extent within each of the study area's 50 8-digit hydrologic unit code (HUC) watersheds from two Landsat-derived datasets: the European Commission's Joint Research Centre (JRC) Monthly Water History and the U.S. Geological Survey Dynamic Surface Water Extent (DSWE). We calculated Spearman rank correlation coefficients between water extent values in each HUC and streamflow discharge data. Linear regression fits of the water extent/streamflow data pairs with the highest correlations served as the basis for interpolation of missing imagery surface water values on a HUC-wise basis. Results show strong ($\rho$ {\textgreater} 0.7) maximum correlations in 11 (22.4{\%}) and 25 (51.0{\%}) HUCs for the DSWE and JRC time series, respectively, when comparisons were restricted to imagery and gages co-located in each HUC. Strong maximum correlations occurred in 39 (79.6{\%}; DSWE) and 42 (85.7{\%}; JRC) HUCs when imagery was paired with discharge data from any study area gage, providing a solid basis for reconstruction of water extent values. We generated continuous time series of 30+ years in 35 HUCs, demonstrating that this technique can provide quantitative estimates of historical surface water extents and elucidate flooding or drought events over the period of data collection. Results of a non-parametric trend analysis of the long-term time series on an annual, seasonal, and monthly basis varied among HUCs, though most trends indicate an increase in surface water over the past 30 years.},
	author = {Walker, Jessica J. and Soulard, Christopher E. and Petrakis, Roy E.},
	doi = {10.1016/j.jag.2019.101973},
	file = {:C$\backslash$:/Users/cowusu42/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Walker, Soulard, Petrakis - 2020 - Integrating stream gage data and Landsat imagery to complete time-series of surface water extents in.pdf:pdf},
	issn = {03032434},
	journal = {International Journal of Applied Earth Observation and Geoinformation},
	month = {feb},
	pages = {101973},
	publisher = {Elsevier BV},
	title = {{Integrating stream gage data and Landsat imagery to complete time-series of surface water extents in Central Valley, California}},
	volume = {84},
	year = {2020}
}

@article{Wu2020,
  doi = {10.21105/joss.02305},
  url = {https://doi.org/10.21105/joss.02305},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {51},
  pages = {2305},
  author = {Qiusheng Wu},
  title = {geemap: A Python package for interactive mapping with Google Earth Engine},
  journal = {Journal of Open Source Software}
}

@article{Montero2021,
  doi = {10.21105/joss.03168},
  url = {https://doi.org/10.21105/joss.03168},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {62},
  pages = {3168},
  author = {David Montero},
  title = {eemont: A Python package that extends Google Earth Engine},
  journal = {Journal of Open Source Software}
}

@article{Wu2019,
	abstract = {The Prairie Pothole Region of North America is characterized by millions of depressional wetlands, which provide critical habitats for globally significant populations of migratory waterfowl and other wildlife species. Due to their relatively small size and shallow depth, these wetlands are highly sensitive to climate variability and anthropogenic changes, exhibiting inter- and intra-annual inundation dynamics. Moderate-resolution satellite imagery (e.g., Landsat, Sentinel) alone cannot be used to effectively delineate these small depressional wetlands. By integrating fine spatial resolution Light Detection and Ranging (LiDAR) data and multi-temporal (2009–2017) aerial images, we developed a fully automated approach to delineate wetland inundation extent at watershed scales using Google Earth Engine. Machine learning algorithms were used to classify aerial imagery with additional spectral indices to extract potential wetland inundation areas, which were further refined using LiDAR-derived landform depressions. The wetland delineation results were then compared to the U.S. Fish and Wildlife Service National Wetlands Inventory (NWI) geospatial dataset and existing global-scale surface water products to evaluate the performance of the proposed method. We tested the workflow on 26 watersheds with a total area of 16,576 km2 in the Prairie Pothole Region. The results showed that the proposed method can not only delineate current wetland inundation status but also demonstrate wetland hydrological dynamics, such as wetland coalescence through fill-spill hydrological processes. Our automated algorithm provides a practical, reproducible, and scalable framework, which can be easily adapted to delineate wetland inundation dynamics at broad geographic scales.},
	author = {Wu, Qiusheng and Lane, Charles R. and Li, Xuecao and Zhao, Kaiguang and Zhou, Yuyu and Clinton, Nicholas and DeVries, Ben and Golden, Heather E. and Lang, Megan W.},
	doi = {10.1016/j.rse.2019.04.015},
	file = {:C$\backslash$:/Users/cowusu42/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Wu et al. - 2019 - Integrating LiDAR data and multi-temporal aerial imagery to map wetland inundation dynamics using Google Earth Engine.pdf:pdf},
	issn = {00344257},
	journal = {Remote Sensing of Environment},
	keywords = {Google Earth Engine,Inundation,LiDAR,Surface water,Topographic depressions,Wetland hydrology},
	number = {April},
	pages = {1--13},
	title = {{Integrating LiDAR data and multi-temporal aerial imagery to map wetland inundation dynamics using Google Earth Engine}},
	volume = {228},
	year = {2019}
}

@article{DeVries2020,
	abstract = {Synthetic aperture radar (SAR) sensors represent an indispensable data source for flood disaster planners and responders, given their ability to image the Earth's surface nearly independently of weather conditions and time of day. The decision by the European Space Agency (ESA) Copernicus program to open data from its Sentinel-1 SAR satellites to the public marks the first time global, operational SAR data have been made freely available. Combined with the emergence of cloud computing platforms like the Google Earth Engine (GEE), this development presents a tremendous opportunity to the disaster response community, for whom rapid access to analysis-ready data is needed to inform effective flood disaster response interventions and management plans. Here, we present an algorithm that exploits all available Sentinel-1 SAR images in combination with historical Landsat and other auxiliary data sources hosted on the GEE to rapidly map surface inundation during flood events. Our algorithm relies on multi-temporal SAR statistics to identify unexpected floods in near real-time. Additionally, historical Landsat-based surface water class probabilities are used to distinguish unexpected floods from permanent or seasonally occurring surface water. We assessed our algorithm over three recent flood events using coincident very high- spatial resolution imagery and operational flood maps. Using very high resolution optical imagery, we estimated an area-normalized accuracy of 89.8 ± 2.8{\%} (95{\%} c.i.) over Houston, Texas following Hurricane Harvey in late August 2017, representing an improvement of between 1.6{\%} and 9.8{\%} over flood maps derived from a simple backscatter threshold. Additionally, comparison of our results with SAR-derived Copernicus Emergency Management Service (EMS) maps following devastating floods in Thessaly, Greece and Eastern Madagascar in January and March 2018, respectively, yielded overall agreement rates of 98.5{\%} in both cases. Importantly, our algorithm was able to ingest hundreds of SAR and optical images served on the GEE to produce flood maps over affected areas within minutes, circumventing the need for time-consuming data download and pre-processing steps. The flexibility of our algorithm will allow for the rapid processing of future open-access SAR data, including data from future Sentinel-1 missions.},
	author = {DeVries, Ben and Huang, Chengquan and Armston, John and Huang, Wenli and Jones, John W. and Lang, Megan W.},
	doi = {10.1016/j.rse.2020.111664},
	file = {:C$\backslash$:/Users/cowusu42/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/DeVries et al. - 2020 - Rapid and robust monitoring of flood events using Sentinel-1 and Landsat data on the Google Earth Engine.pdf:pdf},
	issn = {00344257},
	journal = {Remote Sensing of Environment},
	keywords = {Cloud computing,Flood disasters,SAR,Sentinel-1},
	number = {October 2018},
	pages = {111664},
	publisher = {Elsevier},
	title = {{Rapid and robust monitoring of flood events using Sentinel-1 and Landsat data on the Google Earth Engine}},
	url = {https://doi.org/10.1016/j.rse.2020.111664},
	volume = {240},
	year = {2020}
}

@article{gorelick2017google,
	author = {Gorelick, Noel and Hancher, Matt and Dixon, Mike and Ilyushchenko, Simon and Thau, David and Moore, Rebecca},
	doi = {10.1016/j.rse.2017.06.031},
	issn = {00344257},
	journal = {Remote Sensing of Environment},
	month = {dec},
	pages = {18--27},
	publisher = {Elsevier},
	title = {{Google Earth Engine: Planetary-scale geospatial analysis for everyone}},
	url = {https://doi.org/10.1016/j.rse.2017.06.031 https://linkinghub.elsevier.com/retrieve/pii/S0034425717302900},
	volume = {202},
	year = {2017}
}

@article{McFEETERS1996,
	abstract = {Abstract The Normalized Difference Water Index (NDWI) is a new method that has been developed to delineate open water features and enhance their presence in remotely-sensed digital imagery. The NDWI makes use of reflected near-infrared radiation and visible green light to enhance the presence of such features while eliminating the presence of soil and terrestrial vegetation features. It is suggested that the NDWI may also provide researchers with turbidity estimations of water bodies using remotely-sensed digital data.},
	annote = {doi: 10.1080/01431169608948714},
	author = {McFEETERS, S K},
	doi = {10.1080/01431169608948714},
	issn = {0143-1161},
	journal = {International Journal of Remote Sensing},
	mendeley-groups = {Remote Sensing},
	month = {may},
	number = {7},
	pages = {1425--1432},
	publisher = {Taylor {\&} Francis},
	title = {{The use of the Normalized Difference Water Index (NDWI) in the delineation of open water features}},
	url = {https://doi.org/10.1080/01431169608948714},
	volume = {17},
	year = {1996}
}

@article{Casal2020,
	abstract = {Optical satellite data is an efficient and complementary method to hydrographic surveys for deriving bathymetry in shallow coastal waters. Empirical approaches (in particular, the models of Stumpf and Lyzenga) provide a practical methodology to derive bathymetric information from remote sensing. Recent studies, however, have focused on enhancing the performance of such empirical approaches by extending them via spatial information. In this study, the relationship between multibeam depth and Sentinel-2 image bands was analyzed in an optically complex environment using the spatial predictor of kriging with an external drift (KED), where its external drift component was estimated: a) by a ratio of log-transformed bands based on Stumpf's model (KED{\_}S) and b) by a log-linear transform based on Lyzenga's model (KED{\_}L). Through the calibration of KED models, the study objectives were: 1) to better understand the empirical relationship between Sentinel-2 multispectral satellite reflectance and depth, 2) to test the robustness of KED to derive bathymetry in a multitemporal series of Sentinel-2 images and multibeam data, and 3) to compare the performance of KED against the existing non-spatial models described by Stumpf et al. and Lyzenga. Results showed that KED could improve prediction accuracy with a decrease in RMSE of 89{\%} and 88{\%}, and an increase in R2 of 27{\%} and 14{\%}, over the Stumpf and Lyzenga models, respectively. The decrease in RMSE provides a worthwhile improvement in accuracy, where results showed effective prediction of depth up to 6 m. However, the presence of higher concentrations of suspended materials, especially river plumes, can reduce this threshold to 4 m. As would be expected, prediction accuracy could be improved through the removal of outliers, which were mainly located in the channel of the river, areas influenced by the river plume, abrupt topography, but also very shallow areas close to the shoreline. These areas have been identified as conflictive zones where satellite-derived bathymetry can be compromised.},
	author = {Casal, Gema and Harris, Paul and Monteys, Xavier and Hedley, John and Cahalane, Conor and McCarthy, Tim},
	doi = {10.1080/15481603.2019.1685198},
	file = {:Z$\backslash$:/research-akalyanapu/Collins/DISSERTATION/Literature/Remote Sensing/91171.pdf:pdf},
	issn = {15481603},
	journal = {GIScience and Remote Sensing},
	keywords = {Bathymetry,geostatistical modelling,kriging,multispectral},
	mendeley-groups = {Remote Sensing},
	number = {3},
	pages = {271--286},
	title = {{Understanding satellite-derived bathymetry using Sentinel 2 imagery and spatial prediction models}},
	volume = {57},
	year = {2020}
}

repository: Mystikol/PyGEE-SWToolbox

repo_name: Mystikol/PyGEE-SWToolbox


text:
require pixman.inc

LICENSE = "MIT & MIT-style & Public Domain"
LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3\
                    file://pixman/pixman-matrix.c;endline=25;md5=ba6e8769bfaaee2c41698755af04c4be \
                    file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \
                   "

PR = "${INC_PR}.0"

SRC_URI = "http://xorg.freedesktop.org/archive/individual/lib/${BPN}-${PV}.tar.gz \
           file://0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch \
           file://0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch \
           file://0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch \
           file://0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch \
"

SRC_URI[md5sum] = "3dd0d9ed05dbf0e5e75d526ebae42e11"
SRC_URI[sha256sum] = "51f4f26be030e476a1b481a8f76e6695b45d1dce084beae5251236c3bb2a1f89"

NEON = " --disable-arm-neon "
NEON_armv7a = " "

EXTRA_OECONF = "${NEON} --disable-gtk"

repository: imehmood/meta-oe

repo_name: imehmood/meta-oe