text:
# MIT License
#
# Copyright (c) 2020 MadStrawberry
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

include_guard(GLOBAL)

function(concrete_package_opencv)
    set(options
        WITHOUT_TEST
        WITHOUT_PERF_TESTS
        WITHOUT_APP
        WITHOUT_JAVA
        WITHOUT_PYTHON
        WITHOUT_FFMPEG
        WITHOUT_IPPICV
        WITHOUT_VTK
        DISABLE_CXX11
        BUILD_STATIC
        BUILD_WORLD
        )

    set(singleValueKey
        VERSION BLAS_ROOT
        )

    set(mulitValueKey OPENCV_FIND_PACKAGE_ARGUMENTS CONFIGURE_TYPE )

    CMAKE_PARSE_ARGUMENTS(
        _CONCRETE_CV
        "${options}"
        "${singleValueKey}"
        "${mulitValueKey}"
        ${ARGN}
    )

    if (_CONCRETE_CV_CONFIGURE_TYPE)
        set(buildOptions CMAKE_STANDARD_BUILD_OPTIONS)
        set(configureType CMAKE_CONFIGURE_TYPES ${_CONCRETE_CV_CONFIGURE_TYPE})
    endif()

    if(_CONCRETE_CV_VERSION)
        set(targetPackageVersion ${_CONCRETE_CV_VERSION})
    else()
        set(targetPackageVersion "3.4.9")
    endif()

    if (${_CONCRETE_CV_WITHOUT_TEST})
        list(APPEND cmakeArgs "-DBUILD_TESTS=OFF")
    endif()

    if (${_CONCRETE_CV_WITHOUT_PERF_TESTS})
        list(APPEND cmakeArgs "-DBUILD_PERF_TESTS=OFF")
    endif()

    if (${_CONCRETE_CV_WITHOUT_APP})
        list(APPEND cmakeArgs "-DBUILD_opencv_apps=OFF")
    endif()

    if (${_CONCRETE_CV_WITHOUT_JAVA})
        list(APPEND cmakeArgs "-DBUILD_opencv_java_bindings_generator=OFF")
        list(APPEND cmakeArgs "-DBUILD_JAVA=OFF")
    endif()

    if (${_CONCRETE_CV_WITHOUT_PYTHON})
        list(APPEND cmakeArgs "-DBUILD_opencv_python2=OFF")
        list(APPEND cmakeArgs "-DBUILD_opencv_python3=OFF")
        list(APPEND cmakeArgs "-DBUILD_opencv_python_bindings_generator=OFF")
        list(APPEND cmakeArgs "-DBUILD_opencv_python_tests=OFF")
    endif()

    if (${_CONCRETE_CV_WITHOUT_FFMPEG})
        list(APPEND cmakeArgs "-DWITH_FFMPEG=OFF")
    endif()

    if (${_CONCRETE_CV_WITHOUT_IPPICV})
        list(APPEND cmakeArgs "-DWITH_IPP=OFF")
    endif()

    if (${_CONCRETE_CV_DISABLE_CXX11})
        list(APPEND cmakeArgs "-DENABLE_CXX11=OFF")
    else()
        list(APPEND cmakeArgs "-DENABLE_CXX11=ON")
    endif()

    if(${_CONCRETE_CV_WITHOUT_VTK})
        list(APPEND cmakeArgs "-DWITH_VTK=OFF")
    endif()

    if (${_CONCRETE_CV_BUILD_STATIC})
        set(OpenCV_STATIC ON)
        list(APPEND cmakeArgs "-DBUILD_SHARED_LIBS=OFF")
    else()
        set(OpenCV_STATIC OFF)
        list(APPEND cmakeArgs "-DBUILD_SHARED_LIBS=ON")
    endif()

    if (${_CONCRETE_CV_BUILD_WORLD})
        list(APPEND cmakeArgs "-DBUILD_opencv_world=ON")
    else()
        list(APPEND cmakeArgs "-DBUILD_opencv_world=OFF")
    endif()

    concrete_debug("opencv cmake args : ${cmakeArgs}")

    concrete_package(
        opencv

        VERSION "${targetPackageVersion}"

        PACKAGES OpenCV

        FETCH_PACKAGE_ARGUMENTS
            DOWNLOAD_BUILD_STEP_OPTIONS
                BUILD_TOOLSET "CMake"

                CMAKE_STANDARD_BUILD_OPTIONS
                    CMAKE_ARGS
                        ${cmakeArgs}

                DOWNLOAD_OPTIONS
                    PACKAGE_TYPE git
                    REPOSITORY  "https://github.com/opencv/opencv.git"
                                "https://gitee.com/mirrors/opencv.git"

                    COMMIT_TAG "${targetPackageVersion}"

        CONFIG_HINTS
            "/"

        DEPEND_PACKAGES_PATH
            ${_CONCRETE_CV_BLAS_ROOT}
    )

    set(OpenCV_FOUND ${OpenCV_FOUND} PARENT_SCOPE)

    concrete_export_package_manager_path(opencv)
endfunction(concrete_package_opencv)

repository: FrankPIE/Concrete

repo_name: FrankPIE/Concrete


text:
inherit qt4x11

SRC_URI[arora.md5sum] = "ccef0f214e0f03828cde8c521f7a5225"
SRC_URI[arora.sha256sum] = "7b5bdbb01dccc27776c65f7aa7e4557c5ac23b07494d935523ffce7d7cece9da"

require arora.inc

license: MIT

repository: overo/overo-oe-natty

license_type: permissive

repo_name: overo/overo-oe-natty

branch_name: HEAD

extension: bb


text:
package rules

import (
	"context"

	"github.com/meowpub/meow/ld"
	"github.com/meowpub/meow/ld/ns/as"
	"github.com/meowpub/meow/models"
)

var Rules = []Rule{
	// Client to Server rules are ran first, and only for C2S sources.
	C2SAutoCreateActivity,         // Handle as:Objects posted w/o an as:Create activity.
	C2SRequiredActivityProperties, // Check required properties.
	C2SGenerateIDs,                // Generate activity/object IDs, discarding old ones.

	RequireActivity, // Require input to be a proper Activity.
}

// A rule can process or reject an activity before it's ingested.
type Rule func(ctx context.Context, src ld.Source, actor, stream *models.Entity, activity *as.Activity) error

// Runs a series of rules on the input.
func Run(ctx context.Context, rules []Rule, src ld.Source, actor, stream *models.Entity, activity *as.Activity) error {
	for _, rule := range rules {
		if err := rule(ctx, src, actor, stream, activity); err != nil {
			return err
		}
	}
	return nil
}

repository: meowpub/meow

repo_name: meowpub/meow

branch_name: refs/heads/master

gha_license_id: MIT

gha_language: Go

extension: go


text:
package corredor

import (
	"context"
	"encoding/json"
	"fmt"
	"github.com/cortezaproject/corteza-server/pkg/eventbus"
	"github.com/cortezaproject/corteza-server/pkg/slice"
	"github.com/pkg/errors"
	"net/http"
)

type (
	automationListSetPayload struct {
		Filter Filter    `json:"filter"`
		Set    []*Script `json:"set"`
	}
)

// mapExplicitTriggers scans for explicit event types from the list of script's triggers
// and returns a hash map with resources from these explicit triggers
func mapExplicitTriggers(script *ServerScript) map[string]bool {
	var (
		hash = make(map[string]bool)
	)

	for i := range script.Triggers {
		// We're modifying trigger in the loop,
		// so let's make a copy we can play with
		trigger := script.Triggers[i]

		if len(slice.IntersectStrings(trigger.EventTypes, explicitEventTypes)) > 0 {
			for _, res := range trigger.ResourceTypes {
				hash[res] = true
			}
		}
	}

	return hash
}

// converts trigger's constraint to eventbus' constraint options
func triggerToHandlerOps(t *Trigger) (oo []eventbus.HandlerRegOp, err error) {
	if len(t.ResourceTypes) == 0 {
		return nil, fmt.Errorf("can not generate event handler without at least one resource")
	}

	if len(t.EventTypes) == 0 {
		return nil, fmt.Errorf("can not generate event handler without at least one events")
	}

	// Make a copy of event types slice so that we do not modify it
	types := slice.PluckString(t.EventTypes, onManualEventType)

	// If no other event types are left on the trigger,
	// no need for procede
	if len(types) == 0 && len(t.EventTypes) > 0 {
		return
	}

	oo = append(oo, eventbus.For(t.ResourceTypes...))
	oo = append(oo, eventbus.On(types...))

	if cc, err := constraintsToHandlerOps(t.Constraints); err != nil {
		return nil, err
	} else {
		oo = append(oo, cc...)
	}

	return
}

func constraintsToHandlerOps(cc []*TConstraint) (oo []eventbus.HandlerRegOp, err error) {
	for _, raw := range cc {
		if c, err := eventbus.ConstraintMaker(raw.Name, raw.Op, raw.Value...); err != nil {
			return nil, errors.Wrap(err, "can not generate constraints")
		} else {
			oo = append(oo, eventbus.Constraint(c))
		}
	}

	return
}

// encode adds entry (with json encoded value) to hash map
// used to prepare data for transmission
func encodeArguments(args map[string]string, key string, val interface{}) (err error) {
	var tmp []byte

	if tmp, err = json.Marshal(val); err != nil {
		return
	}

	args[key] = string(tmp)
	return
}

// GenericListHandler returns filtered list of scripts
func GenericListHandler(ctx context.Context, svc *service, f Filter, resourcePrefix string) (p *automationListSetPayload, err error) {
	f.procRTPrefixes(resourcePrefix)

	p = &automationListSetPayload{}
	p.Set, p.Filter, err = svc.Find(ctx, f)
	return p, err
}

func GenericBundleHandler(ctx context.Context, svc *service, bundleName, bundleType, ext string) (interface{}, error) {
	return func(w http.ResponseWriter, req *http.Request) {
		// Serve bundle directly for now
		bundle := svc.GetBundle(ctx, bundleName, bundleType)
		if bundle == nil {
			w.WriteHeader(http.StatusNotFound)
			return
		}

		w.WriteHeader(http.StatusOK)
		w.Write([]byte(bundle.Code))
	}, nil
}


text:
package actions_test

import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"io"
	"io/ioutil"
	"net/http"
	"net/http/httptest"
	"testing"
	"time"

	"github.com/go-test/deep"
	"github.com/golang/mock/gomock"
	"github.com/stretchr/testify/require"
	"github.com/treeverse/lakefs/pkg/actions"
	"github.com/treeverse/lakefs/pkg/actions/mock"
	"github.com/treeverse/lakefs/pkg/graveler"
	"github.com/treeverse/lakefs/pkg/testutil"
)

func TestServiceRun(t *testing.T) {
	conn, _ := testutil.GetDB(t, databaseURI)

	record := graveler.HookRecord{
		RunID:            graveler.NewRunID(),
		EventType:        graveler.EventTypePreCommit,
		StorageNamespace: "storageNamespace",
		RepositoryID:     "repoID",
		BranchID:         "branchID",
		SourceRef:        "sourceRef",
		Commit: graveler.Commit{
			Message:   "commitMessage",
			Committer: "committer",
			Metadata:  map[string]string{"key": "value"},
		},
	}
	const actionName = "test action"
	const hookID = "hook_id"
	hookResponse := "OK"

	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		defer func() { _ = r.Body.Close() }()
		data, err := ioutil.ReadAll(r.Body)
		if err != nil {
			t.Error("Failed to read webhook post data", err)
			return
		}

		queryParams := map[string][]string(r.URL.Query())
		require.Len(t, queryParams["prefix"], 1)
		require.Equal(t, "public/", queryParams["prefix"][0])
		require.Len(t, queryParams["disallow"], 2)
		require.Equal(t, "user_", queryParams["disallow"][0])
		require.Equal(t, "private_", queryParams["disallow"][1])

		var eventInfo actions.WebhookEventInfo
		err = json.Unmarshal(data, &eventInfo)
		if err != nil {
			t.Error("Failed to unmarshal webhook data", err)
			return
		}
		if eventInfo.EventType != string(record.EventType) {
			t.Errorf("Webhook post EventType=%s, expected=%s", eventInfo.EventType, record.EventType)
		}
		if eventInfo.ActionName != actionName {
			t.Errorf("Webhook post ActionName=%s, expected=%s", eventInfo.ActionName, actionName)
		}
		if eventInfo.HookID != hookID {
			t.Errorf("Webhook post HookID=%s, expected=%s", eventInfo.HookID, hookID)
		}
		if eventInfo.RepositoryID != record.RepositoryID.String() {
			t.Errorf("Webhook post RepositoryID=%s, expected=%s", eventInfo.RepositoryID, record.RepositoryID)
		}
		if eventInfo.BranchID != record.BranchID.String() {
			t.Errorf("Webhook post BranchID=%s, expected=%s", eventInfo.BranchID, record.BranchID)
		}
		if eventInfo.SourceRef != record.SourceRef.String() {
			t.Errorf("Webhook post SourceRef=%s, expected=%s", eventInfo.SourceRef, record.SourceRef)
		}
		if eventInfo.CommitMessage != record.Commit.Message {
			t.Errorf("Webhook post CommitMessage=%s, expected=%s", eventInfo.CommitMessage, record.Commit.Message)
		}
		if eventInfo.Committer != record.Commit.Committer {
			t.Errorf("Webhook post Committer=%s, expected=%s", eventInfo.Committer, record.Commit.Committer)
		}
		if diff := deep.Equal(eventInfo.CommitMetadata, map[string]string(record.Commit.Metadata)); diff != nil {
			t.Errorf("Webhook post Metadata diff=%s", diff)
		}
		_, _ = io.WriteString(w, hookResponse)
	}))
	defer ts.Close()

	ctrl := gomock.NewController(t)
	defer ctrl.Finish()

	actionContent := `name: ` + actionName + `
on:
  pre-commit: {}
hooks:
  - id: ` + hookID + `
    type: webhook
    properties:
      url: "` + ts.URL + `/hook"
      timeout: 2m30s
      query_params:
        prefix: public/
        disallow: ["user_", "private_"]
`

	ctx := context.Background()
	testOutputWriter := mock.NewMockOutputWriter(ctrl)
	expectedHookRunID := actions.NewHookRunID(0, 0)
	var lastManifest *actions.RunManifest
	var writerBytes []byte
	testOutputWriter.EXPECT().
		OutputWrite(ctx, record.StorageNamespace.String(), actions.FormatHookOutputPath(record.RunID, expectedHookRunID), gomock.Any(), gomock.Any()).
		Return(nil).
		DoAndReturn(func(ctx context.Context, storageNamespace, name string, reader io.Reader, size int64) error {
			var err error
			writerBytes, err = ioutil.ReadAll(reader)
			return err
		})
	testOutputWriter.EXPECT().
		OutputWrite(ctx, record.StorageNamespace.String(), actions.FormatRunManifestOutputPath(record.RunID), gomock.Any(), gomock.Any()).
		DoAndReturn(func(ctx context.Context, storageNamespace, name string, reader io.Reader, size int64) error {
			data, err := ioutil.ReadAll(reader)
			if err != nil {
				return err
			}
			var manifest actions.RunManifest
			err = json.Unmarshal(data, &manifest)
			if err != nil {
				return err
			}
			lastManifest = &manifest
			return nil
		}).
		Times(2)

	testSource := mock.NewMockSource(ctrl)
	testSource.EXPECT().
		List(ctx, record).
		Return([]string{"act.yaml"}, nil)
	testSource.EXPECT().
		Load(ctx, record, "act.yaml").
		Return([]byte(actionContent), nil)

	// run actions
	now := time.Now()
	actionsService := actions.NewService(conn, testSource, testOutputWriter)

	err := actionsService.Run(ctx, record)
	if err != nil {
		t.Fatalf("Run() failed with err=%s", err)
	}
	if lastManifest == nil {
		t.Fatalf("Run() should store manifest")
	}
	if lastManifest.Run.RunID != record.RunID {
		t.Errorf("Run() manifest RunID %s, expected %s", lastManifest.Run.RunID, record.RunID)
	}
	if lastManifest.Run.CommitID != "" {
		t.Errorf("Run() manifest CommitID %s, expected empty", lastManifest.Run.CommitID)
	}
	lastManifest = nil

	// update commit using post event record
	err = actionsService.UpdateCommitID(ctx, record.RepositoryID.String(), record.StorageNamespace.String(), record.RunID, "commit1")
	if err != nil {
		t.Fatalf("UpdateCommitID() failed with err=%s", err)
	}
	if lastManifest == nil {
		t.Fatalf("UpdateCommitID() should store updated manifest")
	}
	if lastManifest.Run.RunID != record.RunID {
		t.Errorf("UpdateCommitID() manifest RunID %s, expected %s", lastManifest.Run.RunID, record.RunID)
	}
	if lastManifest.Run.CommitID != "commit1" {
		t.Errorf("UpdateCommitID() manifest CommitID %s, expected 'commit1'", lastManifest.Run.CommitID)
	}

	// get run result
	runResult, err := actionsService.GetRunResult(ctx, record.RepositoryID.String(), record.RunID)
	if err != nil {
		t.Fatal("GetRunResult() get run result", err)
	}
	if runResult.RunID != record.RunID {
		t.Errorf("GetRunResult() result RunID=%s, expect=%s", runResult.RunID, record.RunID)
	}
	if runResult.BranchID != record.BranchID.String() {
		t.Errorf("GetRunResult() result BranchID=%s, expect=%s", runResult.BranchID, record.BranchID)
	}
	if runResult.EventType != string(record.EventType) {
		t.Errorf("GetRunResult() result Type=%s, expect=%s", runResult.EventType, record.EventType)
	}
	startTime := runResult.StartTime
	if startTime.Before(now) {
		t.Errorf("GetRunResult() result StartTime should be after we run the actions, %v > %v", startTime, now)
	}
	endTime := runResult.EndTime
	if endTime.Before(startTime) {
		t.Errorf("GetRunResult() result EndTime should be same or after StartTime %v >= %v", endTime, startTime)
	}

	const expectedPassed = true
	if runResult.Passed != expectedPassed {
		t.Errorf("GetRunResult() result Passed=%t, expect=%t", runResult.Passed, expectedPassed)
	}
	const expectedCommitID = "commit1"
	if runResult.CommitID != expectedCommitID {
		t.Errorf("GetRunResult() result CommitID=%s, expect=%s", runResult.CommitID, expectedCommitID)
	}

	// get run - not found
	runResult, err = actionsService.GetRunResult(ctx, record.RepositoryID.String(), "not-run-id")
	expectedErr := actions.ErrNotFound
	if !errors.Is(err, expectedErr) {
		t.Errorf("GetRunResult() err=%v, expected=%v", err, expectedErr)
	}
	if runResult != nil {
		t.Errorf("GetRunResult() result=%v, expected nil", runResult)
	}

	require.Greater(t, bytes.Count(writerBytes, []byte("\n")), 10)
}

repository: nopcoder/lakeFS

repo_name: nopcoder/lakeFS


text:
/*
Copyright 2019 The Kubernetes Authors.

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

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

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

package util

import (
	"fmt"
	"sync"

	"k8s.io/klog/v2"
)

// Stoppable implements the standard stop / shutdown logic
type Stoppable struct {
	// mutex is used to enforce only a single call to Stop is active.
	// Needed because we allow stopping through an http endpoint and
	// allowing concurrent stoppers leads to stack traces.
	// We also use it for lazy-init
	mutex       sync.Mutex
	shutdown    bool
	stopChannel chan struct{}
}

// StopChannel gets the stopChannel, initializing it if needed
func (s *Stoppable) StopChannel() <-chan struct{} {
	s.mutex.Lock()
	defer s.mutex.Unlock()

	if s.stopChannel == nil {
		s.stopChannel = make(chan struct{})
	}
	return s.stopChannel
}

// Stop stops the controller.
func (s *Stoppable) Stop() error {
	s.mutex.Lock()
	defer s.mutex.Unlock()

	if s.shutdown {
		return fmt.Errorf("shutdown already in progress")
	}

	// We initialize the channel to avoid a race if we Stop before anyone is watching
	if s.stopChannel == nil {
		s.stopChannel = make(chan struct{})
	}
	close(s.stopChannel)
	klog.Infof("shutting down controller")
	s.shutdown = true

	return nil
}

func (s *Stoppable) StopRequested() bool {
	return s.shutdown
}

repository: kubernetes/kops

repo_name: kubernetes/kops


text:
package zcli

import (
	"flag"
	"os"
	"testing"

	"github.com/sohaha/zlsgo"
)

func TestCli(T *testing.T) {
	oldOsExit := osExit
	defer func() { osExit = oldOsExit }()
	myExit := func(code int) {
	}
	osExit = myExit
	t := zlsgo.NewTest(T)
	// resetForTesting("-debug")
	Logo = `
________  ____  .__   .__
\___   /_/ ___\ |  |  |__|
 /    / \  \___ |  |  |  |
/_____ \ \___  >|  |__|  |
      \/     \/ |____/|__|`
	Version = "1.0.1"
	Add("run", "run", &testCmd{})
	Run(func() {
		t.Log("Run", *globalDebug)
	})
}

func TestCli2(T *testing.T) {
	oldOsExit := osExit
	defer func() { osExit = oldOsExit }()
	myExit := func(code int) {
	}
	osExit = myExit
	resetForTesting("-debug")
	Run()
}

func TestVersion(T *testing.T) {
	oldOsExit := osExit
	defer func() { osExit = oldOsExit }()
	myExit := func(code int) {
	}
	osExit = myExit
	t := zlsgo.NewTest(T)
	resetForTesting("-version")
	Version = "1.0.1"
	Run(func() {
		current, b := Current()
		t.Equal(nil, current)
		t.EqualTrue(!b)
		t.Log("Run", *globalDebug)
	})
}

func TestCliOther(t *testing.T) {
	testOther(t)
}

func TestCliCommand(t *testing.T) {
	oldOsExit := osExit
	defer func() { osExit = oldOsExit }()
	myExit := func(code int) {
		t.Log("myExit:", code)
	}
	osExit = myExit
	requiredFlags = []string{}
	resetForTesting("test", "-flag1")
	Add("test", "test", &testCmd{})
	Run()
	showFlags(flag.CommandLine)
}

func TestCliCommandErr(_ *testing.T) {
	oldOsExit := osExit
	defer func() { osExit = oldOsExit }()
	myExit := func(code int) {
	}
	osExit = myExit
	requiredFlags = []string{}
	resetForTesting("test")
	Add("test", "test", &testCmd{})
	Run()
}

func TestCliCommandHelp(t *testing.T) {
	expectedName := "gopher"
	requiredFlags = []string{}
	resetForTesting("testHelp", "-help")
	matchingCmd := Add("testHelp", "test", &testCmd{})
	expectedErrorHandling := flag.ExitOnError
	expectedOutput := os.Stdout
	parseSubcommand(flag.Args())
	flag.CommandLine.Init(expectedName, expectedErrorHandling)
	flag.CommandLine.SetOutput(expectedOutput)
	showSubcommandUsage(flag.CommandLine, matchingCmd)
	showFlags(flag.CommandLine)
}

func TestCliCommandHelp2(t *testing.T) {
	oldOsExit := osExit
	defer func() { osExit = oldOsExit }()
	myExit := func(code int) {
		t.Log("myExit:", code)
	}
	osExit = myExit
	requiredFlags = []string{}
	resetForTesting("test", "ddd", "-h")
	Add("test", "test", &testCmd{})
	Run()
}

func TestUnknown(_ *testing.T) {
	oldOsExit := osExit
	defer func() { osExit = oldOsExit }()
	myExit := func(code int) {
	}
	osExit = myExit
	resetForTesting("unknown")
	Run()
}

func TestUnknown2(T *testing.T) {
	t := zlsgo.NewTest(T)
	oldOsExit := osExit
	defer func() { osExit = oldOsExit }()

	myExit := func(code int) {
		t.Log(code)
	}
	osExit = myExit
	SetUnknownCommand(func(name string) {
		t.Log(name)
	})
	resetForTesting("unknown")
	Run()
}

func TestInput(t *testing.T) {
	Inputln("test:", false)
}

repository: sohaha/zlsgo

repo_name: sohaha/zlsgo


text:
@article{ ISI:000330493700033,
Author = {Chai, Gin Boay and Manikandan, Periyasamy},
Title = {{Low velocity impact response of fibre-metal laminates - A review}},
Journal = {{COMPOSITE STRUCTURES}},
Year = {{2014}},
Volume = {{107}},
Pages = {{363-381}},
Month = {{JAN}},
Abstract = {{This contribution hopes to give a comprehensive review of past and
   current research work published on the dynamic response of fibre-metal
   laminates subjected to low velocity impact. The historical development
   of fibre-metal laminates is first reviewed in details, and notable
   researchers and their contributions are chronologically tabulated and
   reviewed. Included are also reviews on published experimental, numerical
   and analytical work on the low velocity impact of fibre-metal laminates.
   Detailed discussions on the two main groups of parameters namely
   geometry and material based parameters that influenced the structural
   response of fibre metal laminates to low-velocity impact. The review
   concludes with detailed discussions on the future works needed for
   fibre-metal laminates subjected to low velocity impact loads. (C) 2013
   Elsevier Ltd. All rights reserved.}},
Publisher = {{ELSEVIER SCI LTD}},
Address = {{THE BOULEVARD, LANGFORD LANE, KIDLINGTON, OXFORD OX5 1GB, OXON, ENGLAND}},
Type = {{Review}},
Language = {{English}},
Affiliation = {{Chai, GB (Reprint Author), Nanyang Technol Univ, Div Aerosp Engn, Sch Mech \& Aerosp Engn, Singapore 639798, Singapore.
   Chai, Gin Boay; Manikandan, Periyasamy, Nanyang Technol Univ, Div Aerosp Engn, Sch Mech \& Aerosp Engn, Singapore 639798, Singapore.}},
DOI = {{10.1016/j.compstruct.2013.08.003}},
ISSN = {{0263-8223}},
EISSN = {{1879-1085}},
Keywords = {{Low velocity impact; Quasi-static; Fibre-metal laminates; Dynamic
   response}},
Keywords-Plus = {{PROGRESSIVE FAILURE MODEL; FINITE-ELEMENT-ANALYSIS; FACESHEET
   CRACK-GROWTH; COMPOSITE PLATES; SANDWICH PANELS; STACKING-SEQUENCE;
   HYBRID COMPOSITE; FATIGUE DAMAGE; PERMANENT INDENTATION;
   NUMERICAL-SIMULATION}},
Research-Areas = {{Materials Science}},
Web-of-Science-Categories  = {{Materials Science, Composites}},
Author-Email = {{mgbchai@ntu.edu.sg}},
ResearcherID-Numbers = {{Chai, Gin Boay/A-3890-2011
   }},
ORCID-Numbers = {{Chai, Gin Boay/0000-0003-1093-984X
   Manikandan, Periyasamy/0000-0002-7329-3196}},
Funding-Acknowledgement = {{Nanyang Technological University; NTU-DLR collaboration}},
Funding-Text = {{The financial support in the form of a research student scholarship
   provided by Nanyang Technological University, and the permission to use
   the laboratory and computing facilities at the School of Mechanical and
   Aerospace Engineering are truly acknowledged. The funding of the NTU-DLR
   collaboration must also be acknowledged here. It must also be mentioned
   that the fabrication of test specimens by final year students are
   acknowledged.}},
Number-of-Cited-References = {{143}},
Times-Cited = {{41}},
Usage-Count-Last-180-days = {{2}},
Usage-Count-Since-2013 = {{58}},
Journal-ISO = {{Compos. Struct.}},
Doc-Delivery-Number = {{300WC}},
Unique-ID = {{ISI:000330493700033}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Gin Boay Chai},
Data={N/A}
}

@article{ ISI:000331416300001,
Author = {Cao, Maosen and Xu, Wei and Ostachowicz, Wieslaw and Su, Zhongqing},
Title = {{Damage identification for beams in noisy conditions based on Teager
   energy operator-wavelet transform modal curvature}},
Journal = {{JOURNAL OF SOUND AND VIBRATION}},
Year = {{2014}},
Volume = {{333}},
Number = {{6}},
Pages = {{1543-1553}},
Month = {{MAR 17}},
Abstract = {{Modal curvatures have been widely used in the detection of structural
   damage. Attractive features of modal curvature include great sensitivity
   to damage and instant determination of damage location. However, an
   intrinsic deficiency in a modal curvature is its susceptibility to the
   measurement noise present in the displacement mode shape that produces
   the modal curvature, likely obscuring the features of damage. To address
   this deficiency, the Teager energy operator together with wavelet
   transform is tactically utilized to treat modal curvature, producing a
   new modal curvature, termed the Teager energy operator-wavelet transform
   modal curvature. This new modal curvature features distinct capabilities
   of suppressing noise, canceling global trends, and intensifying the
   singular feature caused by damage for a measured mode shape involving
   noise. These features maximize the sensitivity to damage and accuracy of
   damage localization. The proposed modal curvature is demonstrated in
   several analytical cases of cracked pinned-pinned, clamped-free and
   clamped-clamped beams, with emphasis on characterizing damage in noisy
   conditions, and it is further validated by an experimental program using
   a scanning laser vibrometer to acquire mode shapes of a cracked aluminum
   beam. The Teager energy operator-wavelet transform modal curvature
   essentially overcomes the deficiency of conventional modal curvature,
   providing a new dynamic feature well suited for damage characterization
   in noisy environments. (The Matlab code for implementing Teager energy
   operator-wavelet transform modal curvature can be provided by the
   corresponding author on request. (C) 2013 Elsevier Ltd. All rights
   reserved.}},
Publisher = {{ACADEMIC PRESS LTD- ELSEVIER SCIENCE LTD}},
Address = {{24-28 OVAL RD, LONDON NW1 7DX, ENGLAND}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Ostachowicz, W (Reprint Author), Polish Acad Sci, Inst Fluid Flow Machinery, PL-80952 Gdansk, Poland.
   Cao, Maosen; Xu, Wei, Hohai Univ, Dept Engn Mech, Nanjing 210098, Jiangsu, Peoples R China.
   Cao, Maosen; Ostachowicz, Wieslaw, Polish Acad Sci, Inst Fluid Flow Machinery, PL-80952 Gdansk, Poland.
   Ostachowicz, Wieslaw, Warsaw Univ Technol, Fac Automot \& Construct Machinery, PL-02524 Warsaw, Poland.
   Su, Zhongqing, Hong Kong Polytech Univ, Dept Mech Engn, Kowloon, Hong Kong, Peoples R China.}},
DOI = {{10.1016/j.jsv.2013.11.003}},
ISSN = {{0022-460X}},
EISSN = {{1095-8568}},
Keywords-Plus = {{NATURAL FREQUENCIES; VIBRATION; SHAPES; DERIVATIVES}},
Research-Areas = {{Acoustics; Engineering; Mechanics}},
Web-of-Science-Categories  = {{Acoustics; Engineering, Mechanical; Mechanics}},
Author-Email = {{wieslaw@imp.gda.pl}},
ResearcherID-Numbers = {{SU, Zhongqing/G-9560-2015}},
Funding-Acknowledgement = {{Marie Curie Industry Academia Partnership and Pathways Grant within the
   7th European Community Framework Programme {[}251309 STA-DY-WI-CO];
   Foundation for the Author of National Excellent Doctoral Dissertation of
   PR China {[}201050]; National Natural Science Foundation of China
   {[}11172091]}},
Funding-Text = {{M. Cao and W. Ostachowicz are grateful for a Marie Curie Industry
   Academia Partnership and Pathways Grant (Grant no. 251309 STA-DY-WI-CO)
   within the 7th European Community Framework Programme). W. Xu
   acknowledges the partial support provided by a Foundation for the Author
   of National Excellent Doctoral Dissertation of PR China (Grant no.
   201050) and a National Natural Science Foundation of China (Grant no.
   11172091).}},
Number-of-Cited-References = {{37}},
Times-Cited = {{39}},
Usage-Count-Last-180-days = {{3}},
Usage-Count-Since-2013 = {{37}},
Journal-ISO = {{J. Sound Vibr.}},
Doc-Delivery-Number = {{AA9LZ}},
Unique-ID = {{ISI:000331416300001}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Wieslaw Ostachowicz},
Data={N/A}
}

@article{ ISI:000339459500023,
Author = {Yang, Wen and Sherman, Vincent R. and Gludovatz, Bernd and Mackey, Mason
   and Zimmermann, Elizabeth A. and Chang, Edwin H. and Schaible, Eric and
   Qin, Zhao and Buehler, Markus J. and Ritchie, Robert O. and Meyers, Marc
   A.},
Title = {{Protective role of Arapaima gigas fish scales: Structure and mechanical
   behavior}},
Journal = {{ACTA BIOMATERIALIA}},
Year = {{2014}},
Volume = {{10}},
Number = {{8}},
Pages = {{3599-3614}},
Month = {{AUG}},
Abstract = {{The scales of the arapaima (Arapaima gigas), one of the largest
   freshwater fish in the world, can serve as inspiration for the design of
   flexible dermal armor. Each scale is composed of two layers: a laminate
   composite of parallel collagen fibrils and a hard, highly mineralized
   surface layer. We review the structure of the arapaima scales and
   examine the functions of the different layers, focusing on the
   mechanical behavior, including tension and penetration of the scales,
   with and without the highly mineralized outer layer. We show that the
   fracture of the mineral and the stretching, rotation and delamination of
   collagen fibrils dissipate a significant amount of energy prior to
   catastrophic failure, providing high toughness and resistance to
   penetration by predator teeth. We show that the arapaima's scale has
   evolved to minimize damage from penetration by predator teeth through a
   Bouligand-like arrangement of successive layers, each consisting of
   parallel collagen fibrils with different orientations. This inhibits
   crack propagation and restricts damage to an area adjoining the
   penetration. The flexibility of the lamellae is instrumental to the
   redistribution of the compressive stresses in the underlying tissue,
   decreasing the severity of the concentrated load produced by the action
   of a tooth. The experimental results, combined with small-angle Xray
   scattering characterization and molecular dynamics simulations, provide
   a complete picture of the mechanisms of deformation, delamination and
   rotation of the lamellae during tensile extension of the scale. (C) 2014
   Acta Materialia Inc. Published by Elsevier Ltd. All rights reserved.}},
Publisher = {{ELSEVIER SCI LTD}},
Address = {{THE BOULEVARD, LANGFORD LANE, KIDLINGTON, OXFORD OX5 1GB, OXON, ENGLAND}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Ritchie, RO (Reprint Author), Univ Calif Berkeley, Lawrence Berkeley Natl Lab, Div Mat Sci, Berkeley, CA 94720 USA.
   Yang, Wen; Sherman, Vincent R.; Meyers, Marc A., Univ Calif San Diego, Mat Sci \& Engn Program, La Jolla, CA 92093 USA.
   Gludovatz, Bernd; Zimmermann, Elizabeth A.; Chang, Edwin H.; Schaible, Eric; Ritchie, Robert O., Univ Calif Berkeley, Lawrence Berkeley Natl Lab, Div Mat Sci, Berkeley, CA 94720 USA.
   Mackey, Mason, Univ Calif San Diego, Natl Ctr Microscopy, La Jolla, CA 92093 USA.
   Mackey, Mason, Univ Calif San Diego, Imaging Res Facil, La Jolla, CA 92093 USA.
   Qin, Zhao; Buehler, Markus J., MIT, Dept Civil \& Environm Engn, Cambridge, MA 02139 USA.
   Ritchie, Robert O., Univ Calif Berkeley, Dept Mat Sci \& Engn, Berkeley, CA 94720 USA.
   Meyers, Marc A., Univ Calif San Diego, Dept Mech \& Aerosp Engn, La Jolla, CA 92093 USA.
   Meyers, Marc A., Univ Calif San Diego, Dept NanoEngn, La Jolla, CA 92093 USA.}},
DOI = {{10.1016/j.actbio.2014.04.009}},
ISSN = {{1742-7061}},
EISSN = {{1878-7568}},
Keywords = {{Arapaima; Fish scales; Armor; Collagen; Delamination}},
Keywords-Plus = {{LAMINATE STRUCTURE; DERMAL ARMOR; RESISTANCE; BONE}},
Research-Areas = {{Engineering; Materials Science}},
Web-of-Science-Categories  = {{Engineering, Biomedical; Materials Science, Biomaterials}},
Author-Email = {{roritchie@lbl.gov}},
ResearcherID-Numbers = {{Ritchie, Robert/A-8066-2008
   Zimmermann, Elizabeth/A-4010-2015
   Buehler, Markus/C-4580-2008
   Yang, Wen/H-8628-2013
   YANG, Wen/E-1449-2015
   Meyers, Marc/A-2970-2016}},
ORCID-Numbers = {{Zimmermann, Elizabeth/0000-0001-9927-3372
   Gludovatz, Bernd/0000-0002-2420-3879
   Ritchie, Robert/0000-0002-0501-6998
   Buehler, Markus/0000-0002-4173-9659
   Yang, Wen/0000-0002-1817-4194
   YANG, Wen/0000-0002-1817-4194
   Meyers, Marc/0000-0003-1698-5396}},
Funding-Acknowledgement = {{National Science Foundation, Division of Materials Research, Ceramics
   Program {[}1006931]; Office of Science, Office of Basic Energy Sciences,
   Division of Materials Sciences and Engineering of the US Department of
   Energy {[}DE-AC02-05CH11231]; Office of Science of the US Department of
   Energy; ARO/ISN {[}W911NF-07-D-004]; UC Research Laboratories Grant
   {[}09-LR-06-118456-MEYM]}},
Funding-Text = {{This work was supported by the National Science Foundation, Division of
   Materials Research, Ceramics Program Grant, 1006931. The mechanical
   testing, in situ SEM and SAXS experiments were supported by the
   Mechanical Behavior of Materials Program at the Lawrence Berkeley
   National Laboratory (LBNL) funded by the Office of Science, Office of
   Basic Energy Sciences, Division of Materials Sciences and Engineering of
   the US Department of Energy under contract no. DE-AC02-05CH11231. The
   SAXS experiments were performed at beam line 7.3.3 at the Advanced Light
   Source at LBNL, also supported by the Office of Science of the US
   Department of Energy under the same contract. The computational work at
   MIT was funded by ARO/ISN under contract no. W911NF-07-D-004. W.Y. also
   acknowledges support from UC Research Laboratories Grant
   (09-LR-06-118456-MEYM). We thank Mr. Gaspar Ritter, Kuryiala Lodge,
   Araguaia River, for providing us with the arapaima scales. We thank Qian
   Huang and Maribel Montero for the help with the AFM images.}},
Number-of-Cited-References = {{44}},
Times-Cited = {{31}},
Usage-Count-Last-180-days = {{6}},
Usage-Count-Since-2013 = {{63}},
Journal-ISO = {{Acta Biomater.}},
Doc-Delivery-Number = {{AL9KH}},
Unique-ID = {{ISI:000339459500023}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Robert O. Ritchie},
Data={N/A}
}

@article{ ISI:000331664900011,
Author = {Malcher, L. and Andrade Pires, F. M. and Cesar de Sa, J. M. A.},
Title = {{An extended GTN model for ductile fracture under high and low stress
   triaxiality}},
Journal = {{INTERNATIONAL JOURNAL OF PLASTICITY}},
Year = {{2014}},
Volume = {{54}},
Pages = {{193-228}},
Month = {{MAR}},
Abstract = {{This contribution provides an improvement on GTN model upon the
   prediction of fracture location within low level of stress triaxiality.
   In the proposition, two distinct damage parameters are introduced as
   internal variables of the degradation process and an effective damage is
   calculated as a sum of both contributions in the post-processed step. In
   the beginning, the volume void fraction, based on conservation mass law,
   is assumed as the first damage parameter, similar to Gurson's original
   model. This volumetric damage contribution is able to capture spherical
   void growth, which plays the main role in tensile loading condition. The
   second damage parameter is proposed as a new shear mechanism, based on
   geometrical and phenomenological aspects and is also a function of the
   equivalent plastic strain, Lode angle and stress triaxiality. The shear
   damage parameter is formulated independent of the volume void fraction
   and requires a new nucleation of micro-defects mechanism to trigger the
   shear growth contribution, and hence is able to capture elongated (and
   rotation) void growth which is present in simple shear and combined
   shear/tensile or shear/compression loading conditions. Furthermore, the
   first and the second damage parameters are coupled in the yield function
   in order to affect the hydrostatic stress and deviatoric stress
   contributions, separately. In the first part of this paper, a review of
   Gurson's model and its most famous version as GTN's model is done. After
   that, the new contribution is presented and an implicit numerical
   integration algorithm is determined, based on the operator split
   methodology. The calibration strategy is discussed for determination of
   material parameters. Numerical tests are performed for a butterfly
   specimen using two types of materials (aluminum alloy 2024-T351 and
   steel 1045) under ranges of stress triaxiality between-1/3 < eta < 1/3
   (shear/compression or shear/tensile). At the end, the behavior of
   internal variables is analyzed, such as: evolution of both damage
   parameters, evolution of the equivalent plastic strain, the reaction
   curve and the contour of the effective damage parameter. The results
   obtained are compared with experimental data and have shown that the
   present formulation performs well in the prediction of the fracture
   location and determination of the correct level of equivalent plastic
   strain at fracture under predominant shear loading condition. (C) 2013
   Elsevier Ltd. All rights reserved.}},
Publisher = {{PERGAMON-ELSEVIER SCIENCE LTD}},
Address = {{THE BOULEVARD, LANGFORD LANE, KIDLINGTON, OXFORD OX5 1GB, ENGLAND}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Malcher, L (Reprint Author), Univ Brasilia, Fac Technol, Dept Mech Engn, Brasilia, DF, Brazil.
   Malcher, L., Univ Brasilia, Fac Technol, Dept Mech Engn, Brasilia, DF, Brazil.
   Andrade Pires, F. M.; Cesar de Sa, J. M. A., Univ Porto, Fac Engn, IDMEC Inst Mech Engn, P-4200465 Oporto, Portugal.}},
DOI = {{10.1016/j.ijplas.2013.08.015}},
ISSN = {{0749-6419}},
EISSN = {{1879-2154}},
Keywords = {{Ductile fracture; Volume void growth; Shear mechanism; Lode angle;
   Stress triaxiality}},
Keywords-Plus = {{CONTINUUM DAMAGE MECHANICS; HIGH-STRENGTH STEELS; CRACK-GROWTH; VOID
   GROWTH; RUPTURE MECHANISMS; COMBINED TENSION; LODE PARAMETER; GURSON
   MODEL; STRAIN; SHEAR}},
Research-Areas = {{Engineering; Materials Science; Mechanics}},
Web-of-Science-Categories  = {{Engineering, Mechanical; Materials Science, Multidisciplinary; Mechanics}},
Author-Email = {{malcher@unb.br}},
ResearcherID-Numbers = {{Malcher, Lucival/F-8445-2013
   Andrade Pires, Francisco/J-8105-2015
   Cesar de Sa, Jose/A-3826-2013}},
ORCID-Numbers = {{Andrade Pires, Francisco/0000-0002-4802-6360
   Cesar de Sa, Jose/0000-0002-1257-1754}},
Funding-Acknowledgement = {{Portuguese Science and Technology Foundation (FCT)
   {[}SFRH/BD/45456/2008, PTDC/EME-TME/71325/2006]}},
Funding-Text = {{Supported by Portuguese Science and Technology Foundation (FCT), under
   scholarship no. SFRH/BD/45456/2008 and under Grant no.
   PTDC/EME-TME/71325/2006.}},
Number-of-Cited-References = {{63}},
Times-Cited = {{31}},
Usage-Count-Last-180-days = {{5}},
Usage-Count-Since-2013 = {{38}},
Journal-ISO = {{Int. J. Plast.}},
Doc-Delivery-Number = {{AB3AY}},
Unique-ID = {{ISI:000331664900011}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Lucival Malcher},
Data={N/A}
}

@article{ ISI:000337999400011,
Author = {Shojaei, Amir and Taleghani, Arash Dahi and Li, Guoqiang},
Title = {{A continuum damage failure model for hydraulic fracturing of porous
   rocks}},
Journal = {{INTERNATIONAL JOURNAL OF PLASTICITY}},
Year = {{2014}},
Volume = {{59}},
Pages = {{199-212}},
Month = {{AUG}},
Abstract = {{A continuum damage mechanics (CDM) based constitutive model has been
   developed to describe elastic, plastic and damage behavior of porous
   rocks. The pressure sensitive inelastic deformation of porous rocks
   together with their damage mechanisms are studied for drained and
   undrained conditions. Fracture mechanics of microcrack and micro-void
   nucleation and their coalescence are incorporated into the formulation
   of the CDM models to accurately capture different failure modes of
   rocks. A fracture mechanics based failure criterion is also incorporated
   to accurately capture the post fracture crack advances in the case of
   progressive failures. The performance of the developed elastoplastic and
   CDM models are compared with the available experimental data and then
   the models are introduced into a commercial software package through
   user-defined subroutines. The hydraulic fractures growth in a reservoir
   rock is then investigated; in which the effect of injection pressure is
   studied and the simulations are compared with the available solutions in
   the literature. The developed CDM model outperforms the traditional
   fracture mechanics approaches by removing stress singularities at the
   fracture tips and simulation of progressive fractures without any
   essential need for remeshing. This model would provide a robust tool for
   modeling hydraulic fracture growth using conventional elements of FEA
   with a computational cost less than similar computational techniques
   like cohesive element methods. (C) 2014 Elsevier Ltd. All rights
   reserved.}},
Publisher = {{PERGAMON-ELSEVIER SCIENCE LTD}},
Address = {{THE BOULEVARD, LANGFORD LANE, KIDLINGTON, OXFORD OX5 1GB, ENGLAND}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Shojaei, A (Reprint Author), Louisiana State Univ, Dept Mech Engn, Baton Rouge, LA 70803 USA.
   Shojaei, Amir; Li, Guoqiang, Louisiana State Univ, Dept Mech Engn, Baton Rouge, LA 70803 USA.
   Shojaei, Amir; Taleghani, Arash Dahi, Louisiana State Univ, Craft \& Hawkins Dept Petr Engn, Baton Rouge, LA 70803 USA.
   Li, Guoqiang, Southern Univ, Dept Mech Engn, Baton Rouge, LA 70813 USA.}},
DOI = {{10.1016/j.ijplas.2014.03.003}},
ISSN = {{0749-6419}},
EISSN = {{1879-2154}},
Keywords = {{Poroelasticity; Rock Mechanics; Hydraulic fracturing; Rock continuum
   damage mechanics}},
Keywords-Plus = {{ANISOTROPIC POROELASTICITY; CONFINING PRESSURE; STRESS TRIAXIALITY;
   GRANULAR-MATERIALS; BRITTLE MATERIALS; BEREA SANDSTONE; DUCTILE DAMAGE;
   BEHAVIOR; DEFORMATION; MEDIA}},
Research-Areas = {{Engineering; Materials Science; Mechanics}},
Web-of-Science-Categories  = {{Engineering, Mechanical; Materials Science, Multidisciplinary; Mechanics}},
Author-Email = {{ashoja1@lsu.edu}},
Funding-Acknowledgement = {{NASA {[}NNX11AM17A]; Louisiana Board of Regents {[}NNX11AM17A]; NSF
   {[}CMMI0900064]; Army Research Office {[}W911NF-13-1-0145]}},
Funding-Text = {{This investigation was partially supported by Cooperative Agreement
   NNX11AM17A between NASA and the Louisiana Board of Regents under
   contract NASA/LEQSF (2011-14)-Phase3-05. This study was also partially
   supported by the NSF under Grant number CMMI0900064 and Army Research
   Office under Grant number W911NF-13-1-0145. ADT also acknowledges the
   financial supports from Shell Co. during conducting this research.}},
Number-of-Cited-References = {{75}},
Times-Cited = {{30}},
Usage-Count-Last-180-days = {{6}},
Usage-Count-Since-2013 = {{63}},
Journal-ISO = {{Int. J. Plast.}},
Doc-Delivery-Number = {{AJ9AO}},
Unique-ID = {{ISI:000337999400011}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Amir Shojae},
Data={N/A}
}

@article{ ISI:000341620300037,
Author = {Capar, Ismail Davut and Arslan, Hakan and Akcay, Merve and Uysal, Banu},
Title = {{Effects of ProTaper Universal, ProTaper Next, and HyFlex Instruments on
   Crack Formation in Dentin}},
Journal = {{JOURNAL OF ENDODONTICS}},
Year = {{2014}},
Volume = {{40}},
Number = {{9}},
Pages = {{1482-1484}},
Month = {{SEP}},
Abstract = {{Introduction: The aim of the present study was to investigate the
   incidence of cracks in root dentin after root canal preparation with
   ProTaper Next (Dentsply Maillefer, Ballaigues, Switzerland), HyFlex
   (Coltene-Whaledent, Allstetten, Switzerland), and ProTaper Universal
   (Dentsply Maillefer) rotary instruments. Methods: One-hundred mandibular
   premolars were selected. Twenty-five teeth were left unprepared and
   served as a negative control; another 25 teeth were in-strumented with
   the ProTaper Universal system up to size F4 as a positive control, and
   the remaining 50 teeth were shaped with the following experimental
   groups with an apical size 40 file: ProTaper Next X4 and HyFlex 40/0.4.
   After root canal preparation, all of the roots were sectioned
   perpendicular to the long axis at 2, 4, 6, and 8 mm from the apex, and
   the sections were then observed under a stereomicroscope. The
   absence/presence of cracks was recorded, and the data were analyzed with
   a chi-square test. The significance level was set at P = .05. Results:
   No cracks were observed in the negative control group. Vertical root
   fractures were not observed in any of the groups. The ProTaper Next and
   HyFlex instruments caused fewer cracks (28\%) than the ProTaper
   Universal instrument (56\%) (P < .05). However, there were no
   significant differences in crack formation between the ProTaper Next and
   HyFlex groups (P > .05). Conclusions: Within the limitations of this in
   vitro study, all of the instrumentation systems used in this study
   created cracks in the root dentin. The ProTaper Next and HyFlex
   instruments tended to cause fewer dentinal cracks compared with the
   ProTaper Universal instrument.}},
Publisher = {{ELSEVIER SCIENCE INC}},
Address = {{360 PARK AVE SOUTH, NEW YORK, NY 10010-1710 USA}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Capar, ID (Reprint Author), Izmir Katip Celebi Univ, Fac Dent, Dept Endodont, TR-35620 Izmir, Turkey.
   Capar, Ismail Davut; Uysal, Banu, Izmir Katip Celebi Univ, Fac Dent, Dept Endodont, TR-35620 Izmir, Turkey.
   Akcay, Merve, Izmir Katip Celebi Univ, Fac Dent, Dept Pedodont, TR-35620 Izmir, Turkey.
   Arslan, Hakan, Ataturk Univ, Fac Dent, Dept Endodont, Erzurum, Turkey.}},
DOI = {{10.1016/j.joen.2014.02.026}},
ISSN = {{0099-2399}},
EISSN = {{1878-3554}},
Keywords = {{Cracks; controlled memory; dentinal damage; ProTaper Next; ProTaper
   Universal; root canal instrumentation; root fracture; rotary
   nickel-titanium instruments}},
Keywords-Plus = {{NITI ROTARY INSTRUMENTS; SELF-ADJUSTING FILE; CANAL PREPARATION;
   DEFECTS; HAND}},
Research-Areas = {{Dentistry, Oral Surgery \& Medicine}},
Web-of-Science-Categories  = {{Dentistry, Oral Surgery \& Medicine}},
Author-Email = {{capardt@hotmail.com}},
ORCID-Numbers = {{capar, ismail davut/0000-0002-8729-8983}},
Number-of-Cited-References = {{19}},
Times-Cited = {{28}},
Usage-Count-Last-180-days = {{1}},
Usage-Count-Since-2013 = {{12}},
Journal-ISO = {{J. Endod.}},
Doc-Delivery-Number = {{AO8QW}},
Unique-ID = {{ISI:000341620300037}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Ismail Davut Capar},
Data={N/A}
}

@article{ ISI:000337010800011,
Author = {Martins, P. A. F. and Bay, N. and Tekkaya, A. E. and Atkins, A. G.},
Title = {{Characterization of fracture loci in metal forming}},
Journal = {{INTERNATIONAL JOURNAL OF MECHANICAL SCIENCES}},
Year = {{2014}},
Volume = {{83}},
Pages = {{112-123}},
Month = {{JUN}},
Abstract = {{Fracture in metal forming can occur in three different modes: (i)
   tensile; (ii) in-plane shear; and (iii) out-of-plane shear (respectively
   the same as modes 1, II and III of fracture mechanics). The
   circumstances under which each mode will occur are identified in terms
   of plastic flow and microstructural ductile damage by means of an
   analytical framework to characterize fracture loci under plane stress
   conditions that also takes anisotropy into consideration.
   Experimental results retrieved from the literature give support to the
   presentation and show that plastic flow and failure in sheet forming
   results from competition between modes I and II whereas in bulk forming
   fracture results from competition between modes I and III. (C) 2014
   Elsevier Ltd. All rights reserved.}},
Publisher = {{PERGAMON-ELSEVIER SCIENCE LTD}},
Address = {{THE BOULEVARD, LANGFORD LANE, KIDLINGTON, OXFORD OX5 1GB, ENGLAND}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Martins, PAF (Reprint Author), Univ Lisbon, Inst Super Tecn, P-1049001 Lisbon, Portugal.
   Martins, P. A. F., Univ Lisbon, Inst Super Tecn, P-1049001 Lisbon, Portugal.
   Bay, N., Tech Univ Denmark, Dept Mech Engn, DK-2800 Lyngby, Denmark.
   Tekkaya, A. E., Tech Univ Dortmund, Inst Forming Technol \& Lightweight Construct, D-44227 Dortmund, Germany.
   Atkins, A. G., Univ Reading, Dept Engn, Reading RG6 6AY, Berks, England.}},
DOI = {{10.1016/j.ijmecsci.2014.04.003}},
ISSN = {{0020-7403}},
EISSN = {{1879-2162}},
Keywords = {{Fracture forming limit diagram; Fracture loci; Crack separation modes;
   Sheet metal forming; Bulk metal forming}},
Keywords-Plus = {{CRITERION; WORKABILITY; PREDICTION; FAILURE; GROWTH; MODEL}},
Research-Areas = {{Engineering; Mechanics}},
Web-of-Science-Categories  = {{Engineering, Mechanical; Mechanics}},
Author-Email = {{pmartins@ist.utl.pt}},
ResearcherID-Numbers = {{Martins, Paulo/D-9914-2012
   Tekkaya, A. Erman/K-8512-2012}},
ORCID-Numbers = {{Martins, Paulo/0000-0002-2630-4593
   Tekkaya, A. Erman/0000-0002-5197-2948}},
Funding-Acknowledgement = {{Velux Foundation; German Research Foundation (DFG) {[}SFB/TR 73]}},
Funding-Text = {{Paulo Martins would like to acknowledge the financial support provided
   by the Velux Foundation during his sabbatical license at the Danish
   Technical University and by the German Research Foundation (DFG) under
   research project SFB/TR 73 during his sabbatical license at the
   Institute of Forming Technology and Lightweight Construction of the
   Technical University of Dortmund.}},
Number-of-Cited-References = {{36}},
Times-Cited = {{27}},
Usage-Count-Last-180-days = {{0}},
Usage-Count-Since-2013 = {{16}},
Journal-ISO = {{Int. J. Mech. Sci.}},
Doc-Delivery-Number = {{AI6TV}},
Unique-ID = {{ISI:000337010800011}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Paulo A. F. Martins},
Data={N/A}
}

@article{ ISI:000331939600006,
Author = {Bourdin, Blaise and Marigo, Jean-Jacques and Maurini, Corrado and
   Sicsic, Paul},
Title = {{Morphogenesis and Propagation of Complex Cracks Induced by Thermal
   Shocks}},
Journal = {{PHYSICAL REVIEW LETTERS}},
Year = {{2014}},
Volume = {{112}},
Number = {{1}},
Month = {{JAN 10}},
Abstract = {{We study the genesis and the selective propagation of complex crack
   networks induced by thermal shock or drying of brittle materials. We use
   a quasistatic gradient damage model to perform large-scale numerical
   simulations showing that the propagation of fully developed cracks
   follows Griffith criterion and depends only on the fracture toughness,
   while crack morphogenesis is driven by the material's internal length.
   Our numerical simulations feature networks of parallel cracks and
   selective arrest in two dimensions and hexagonal columnar joints in
   three dimensions, without any hypotheses on cracks geometry, and are in
   good agreement with available experimental results.}},
Publisher = {{AMER PHYSICAL SOC}},
Address = {{ONE PHYSICS ELLIPSE, COLLEGE PK, MD 20740-3844 USA}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Bourdin, B (Reprint Author), Louisiana State Univ, Dept Math, Baton Rouge, LA 70803 USA.
   Bourdin, Blaise, Louisiana State Univ, Dept Math, Baton Rouge, LA 70803 USA.
   Bourdin, Blaise, Louisiana State Univ, Ctr Computat \& Technol, Baton Rouge, LA 70803 USA.
   Marigo, Jean-Jacques; Sicsic, Paul, Ecole Polytech, Lab Mecan Solides, CNRS, UMR 7649, F-91128 Palaiseau, France.
   Maurini, Corrado, Univ Paris 06, Inst Jean Le Rond dAlembert, CNRS, UMR 7190, F-75252 Paris, France.
   Maurini, Corrado, CNRS, Inst Jean Le Rond dAlembert, UMR 7190, F-75252 Paris, France.
   Sicsic, Paul, Lafarge Ctr Rech, F-38290 St Quentin Fallavier, France.}},
DOI = {{10.1103/PhysRevLett.112.014301}},
Article-Number = {{014301}},
ISSN = {{0031-9007}},
EISSN = {{1079-7114}},
Keywords-Plus = {{BRITTLE-FRACTURE; MECHANISM; PATTERNS; MODELS; DAMAGE; LAWS}},
Research-Areas = {{Physics}},
Web-of-Science-Categories  = {{Physics, Multidisciplinary}},
ResearcherID-Numbers = {{Maurini, Corrado/G-6110-2015
   }},
ORCID-Numbers = {{Maurini, Corrado/0000-0003-1092-4461
   Marigo, Jean-Jacques/0000-0001-7949-5031
   Bourdin, Blaise/0000-0002-1312-9175}},
Funding-Acknowledgement = {{National Science Foundation {[}DMS-0909267, OCI-1053575, TG-DMS060014];
   ANR program T-Shock OTP {[}J11R087]}},
Funding-Text = {{The authors wish to thank Yingfeng Shao for providing the experimental
   data used in Fig. 1. The work of B. B. was supported in part by the
   National Science Foundation Grant No. DMS-0909267. Some numerical
   experiments were performed using resources of the Extreme Science and
   Engineering Discovery Environment (XSEDE), which is supported by
   National Science Foundation Grant No. OCI-1053575 under the Resource
   Allocation TG-DMS060014. J.-J. M. and C. M. gratefully acknowledge the
   funding of the ANR program T-Shock OTP J11R087.}},
Number-of-Cited-References = {{29}},
Times-Cited = {{27}},
Usage-Count-Last-180-days = {{4}},
Usage-Count-Since-2013 = {{35}},
Journal-ISO = {{Phys. Rev. Lett.}},
Doc-Delivery-Number = {{AB6ZR}},
Unique-ID = {{ISI:000331939600006}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Blaise Bourdin},
Author-Email={N/A},
Data={N/A}
}

@article{ ISI:000341550700014,
Author = {Amacher, R. and Cugnoni, J. and Botsis, J. and Sorensen, L. and Smith,
   W. and Dransfeld, C.},
Title = {{Thin ply composites: Experimental characterization and modeling of
   size-effects}},
Journal = {{COMPOSITES SCIENCE AND TECHNOLOGY}},
Year = {{2014}},
Volume = {{101}},
Pages = {{121-132}},
Month = {{SEP 12}},
Abstract = {{Thin-ply composites are rapidly gaining interest in the composite
   industry, not only because of the larger design possibilities that they
   offer, but also because of positive size effects that have been shown to
   improve performance in various loading conditions {[}1]. In this work,
   carbon fiber-epoxy composites of different ply thicknesses (30-300
   g/m(2) fiber areal weight) were produced from the same batch of Toray
   M40JB fiber and NorthTPT TP80ep matrix to study the influence of ply
   thickness on the ultimate strength and on the onset of damage in lamina,
   laminates and components. Uniaxial tension, open-hole compression and
   open-hole tensile fatigue tests on quasi isotropic {[}45 degrees/90
   degrees/-45 degrees/0 degrees](ns) laminates showed very significant
   improvements regarding the on-set of damage, and in some cases ultimate
   strength, when decreasing the ply thickness. These performance
   improvements are the result of major changes in the damage progression
   and failure modes of the laminates caused by a systematic delay or near
   suppression of transverse cracking and delamination growth in thin-ply
   composites. On the component level, thin-ply laminates enabled a marked
   improvement for bolted-joint bearing, especially in hot-wet conditions.
   Under impact, the 30 mu m thin ply laminate exhibited a quasi-brittle
   failure with extensive translaminar cracking while a ply thickness of
   100 mu m was found as optimum to minimize the projected damage area. Ply
   thickness scaling of transverse and in-plane shear strength was
   identified based on classical laminate theory and unnotched tensile
   tests on quasi-isotropic specimens. The empirical scaling was found to
   follow a linear trend over a range of ply thicknesses from 30 to 250 mu
   m. Due to the near suppression of delamination, the strength of thin-ply
   composites could then be modeled more effectively than thick ply
   composites using classical laminate theory or standard multilayer shell
   modeling. (C) 2014 Elsevier Ltd. All rights reserved.}},
Publisher = {{ELSEVIER SCI LTD}},
Address = {{THE BOULEVARD, LANGFORD LANE, KIDLINGTON, OXFORD OX5 1GB, OXON, ENGLAND}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Cugnoni, J (Reprint Author), Ecole Polytech Fed Lausanne, Lab Appl Mech \& Reliabil Anal, CH-1015 Lausanne, Switzerland.
   Amacher, R.; Cugnoni, J.; Botsis, J., Ecole Polytech Fed Lausanne, Lab Appl Mech \& Reliabil Anal, CH-1015 Lausanne, Switzerland.
   Sorensen, L., Ruag Aerostruct, Emmenbrucke, Switzerland.
   Smith, W., North TPT, Penthalaz, Switzerland.
   Dransfeld, C., Univ Appl Sci \& Arts Northwestern Switzerland, Inst Polymer Engn, Windisch, Switzerland.}},
DOI = {{10.1016/j.compscitech.2014.06.027}},
ISSN = {{0266-3538}},
EISSN = {{1879-1050}},
Keywords = {{Size-effects; Laminate; Strength; Fatigue; Impact behavior}},
Keywords-Plus = {{COMPRESSIVE STRENGTH; NOTCHED COMPOSITES; TENSILE-STRENGTH; PREDICTION}},
Research-Areas = {{Materials Science}},
Web-of-Science-Categories  = {{Materials Science, Composites}},
Author-Email = {{joel.cugnoni@epfl.ch}},
ResearcherID-Numbers = {{Cugnoni, Joel/E-7838-2011
   Dransfeld, Clemens/G-6560-2017}},
ORCID-Numbers = {{Cugnoni, Joel/0000-0003-3656-9146
   Dransfeld, Clemens/0000-0003-2912-7534}},
Funding-Acknowledgement = {{Swiss Commission for Technology and Innovation CTI project {[}127795.1]}},
Funding-Text = {{This work is sponsored by Swiss Commission for Technology and Innovation
   CTI project 127795.1 PFIW-IW in partnership with North-TPT, RUAG AG,
   Connova AG and IKT-FHNW. The authors wish to thank Professor J.P.
   Reymondin of HEIG-VD for his technical assistance with the C-scan
   analysis, and M. Thomas Crevoisier for his contribution on impact tests.}},
Number-of-Cited-References = {{18}},
Times-Cited = {{26}},
Usage-Count-Last-180-days = {{4}},
Usage-Count-Since-2013 = {{52}},
Journal-ISO = {{Compos. Sci. Technol.}},
Doc-Delivery-Number = {{AO7RQ}},
Unique-ID = {{ISI:000341550700014}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={Joel Cugnoni},
Data={N/A}
}

@article{ ISI:000340689000010,
Author = {Esmaeilzare, A. and Rahimi, A. and Rezaei, S. M.},
Title = {{Investigation of subsurface damages and surface roughness in grinding
   process of Zerodur (R) glass-ceramic}},
Journal = {{APPLIED SURFACE SCIENCE}},
Year = {{2014}},
Volume = {{313}},
Pages = {{67-75}},
Month = {{SEP 15}},
Abstract = {{Subsurface damages and surface roughness are the two significant
   parameters which determine the efficiency of optical components. In this
   study, a cup diamond wheel is used in grinding process of the specimens
   made of Zerodur (R) glass-ceramic, to investigate the influences of
   grinding parameters on the SSD and SR. The grinding parameters used in
   this study are depth of cut, cutting speed and feed rate; and effects of
   these parameters are studied. The experimental results are compared with
   the modified model of Lambropoulos, proposed by Li, and a good
   accordance is observed between them. Two measuring techniques were used
   to study the SSD. Cross-sectional polishing method and angle polishing
   method; the first one, suitable for studying the material removal
   mechanism and the other one convenient for examining the depth of
   subsurface damages and distribution of micro-cracks in the ground
   surface, respectively. A novel technique is introduced to measure the
   cracks length in which the sum of all cracks in a specific area of a SEM
   micrograph is calculated by image processing method and regarded as a
   factor to study the cracks length. Also, a statistical model is
   developed in order to predict the surface roughness and a good agreement
   is observed between the experimental results and the predicted values.
   (C) 2014 Published by Elsevier B.V.}},
Publisher = {{ELSEVIER SCIENCE BV}},
Address = {{PO BOX 211, 1000 AE AMSTERDAM, NETHERLANDS}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Rahimi, A (Reprint Author), Amirkabir Univ Technol, Dept Mech Engn, 424 Hafez Ave, Tehran 158754413, Iran.
   Esmaeilzare, A.; Rahimi, A.; Rezaei, S. M., Amirkabir Univ Technol, Dept Mech Engn, Tehran 158754413, Iran.}},
DOI = {{10.1016/j.apsusc.2014.05.137}},
ISSN = {{0169-4332}},
EISSN = {{1873-5584}},
Keywords = {{Grinding; Subsurface damages; Surface roughness; Zerodur (R)
   glass-ceramic; Cup diamond wheel}},
Keywords-Plus = {{MATERIAL REMOVAL MECHANISMS; SILICON-WAFERS; FUSED-SILICA}},
Research-Areas = {{Chemistry; Materials Science; Physics}},
Web-of-Science-Categories  = {{Chemistry, Physical; Materials Science, Coatings \& Films; Physics,
   Applied; Physics, Condensed Matter}},
Author-Email = {{rahimi@aut.ac.ir}},
Number-of-Cited-References = {{31}},
Times-Cited = {{25}},
Usage-Count-Last-180-days = {{4}},
Usage-Count-Since-2013 = {{55}},
Journal-ISO = {{Appl. Surf. Sci.}},
Doc-Delivery-Number = {{AN6EZ}},
Unique-ID = {{ISI:000340689000010}},
OA = {{No}},
DA = {{2017-08-29}},
Author-Name={A. Rahimi},
Data={N/A}
}

@article{ ISI:000340594600001,
Author = {Hall, James S. and Fromme, Paul and Michaels, Jennifer E.},
Title = {{Guided Wave Damage Characterization via Minimum Variance Imaging with a
   Distributed Array of Ultrasonic Sensors}},
Journal = {{JOURNAL OF NONDESTRUCTIVE EVALUATION}},
Year = {{2014}},
Volume = {{33}},
Number = {{3}},
Pages = {{299-308}},
Month = {{SEP}},
Abstract = {{Guided wave imaging with a distributed array of inexpensive transducers
   offers a fast and cost-efficient means for damage detection and
   localization in plate-like structures such as aircraft and spacecraft
   skins. As such, this technology is a natural choice for inclusion in
   condition-based maintenance and integrated structural health management
   programs. One of the implementation challenges results from the complex
   interaction of propagating ultrasonic waves with both the interrogation
   structure and potential defects or damage. For example, a guided
   ultrasonic wave interacts with a surface or sub-surface defect
   differently depending on the angle of incidence, defect size and
   orientation, excitation frequency, and guided wave mode. However, this
   complex interaction also provides a mechanism for guided wave imaging
   algorithms to perform damage characterization in addition to damage
   detection and localization. Damage characterization provides a mechanism
   to help discriminate actual damage (e.g. fatigue cracks) from benign
   changes, and can be used with crack propagation models to estimate
   remaining life. This work proposes the use of minimum variance imaging
   to perform damage detection, localization, and characterization.
   Scattering assumptions used to perform damage characterization are
   obtained through both analytical and finite element models. Experimental
   data from an in situ distributed array are used to demonstrate
   feasibility of this approach using a through-hole and two
   through-thickness notches of different orientations to simulate damage
   in an aluminum plate.}},
Publisher = {{SPRINGER/PLENUM PUBLISHERS}},
Address = {{233 SPRING ST, NEW YORK, NY 10013 USA}},
Type = {{Article}},
Language = {{English}},
Affiliation = {{Michaels, JE (Reprint Author), Georgia Inst Technol, Sch Elect \& Comp Engn, Atlanta, GA 30332 USA.
   Hall, James S., Hidden Solut LLC, Kissimmee, FL USA.
   Fromme, Paul, UCL, Dept Mech Engn, London, England.
   Michaels, Jennifer E., Georgia Inst Technol, Sch Elect \& Comp Engn, Atlanta, GA 30332 USA.}},
DOI = {{10.1007/s10921-013-0212-x}},
ISSN = {{0195-9298}},
EISSN = {{1573-4862}},
Keywords = {{Lamb waves; Structural health monitoring; Nondestructive evaluation;
   Minimum variance; MVDR; Scattering}},
Keywords-Plus = {{LOW-FREQUENCY REFLECTION; THROUGH-THICKNESS HOLE; LAMB WAVE; SCATTERING;
   PLATE; CRACKS; LOCALIZATION}},
Research-Areas = {{Materials Science}},
Web-of-Science-Categories  = {{Materials Science, Characterization \& Testing}},
Author-Email = {{jemichaels@gatech.edu}},
Author-Name={{Jennifer E. Michaels}},
Funding-Acknowledgement = {{NASA Graduate Student Research Program {[}NNX08AY93H]; Air Force Office
   of Scientific Research {[}FA9550-08-1-0241]}},
Funding-Text = {{This work was supported by the NASA Graduate Student Research Program,
   Grant No. NNX08AY93H (first author), and the Air Force Office of
   Scientific Research, Grant No. FA9550-08-1-0241 (third author).}},
Number-of-Cited-References = {{26}},
Times-Cited = {{25}},
Usage-Count-Last-180-days = {{3}},
Usage-Count-Since-2013 = {{43}},
Journal-ISO = {{J. Nondestruct. Eval.}},
Doc-Delivery-Number = {{AN4YA}},
Unique-ID = {{ISI:000340594600001}},
OA = {{No}},
DA = {{2017-08-29}},
Data={{N/A}}
}

repository: OpenDataExpMechanics/Survey

repo_name: OpenDataExpMechanics/Survey

extension: bib


text:
@InProceedings{kuzborskij13,
  pdf = {http://jmlr.org/proceedings/papers/v28/kuzborskij13.pdf},
  number = {3},
  section = {cycle-3},
  title = {Stability and Hypothesis Transfer Learning},
  author = {Kuzborskij, Ilja and Orabona, Francesco},
  pages = {942-950},
  abstract = {We consider the transfer learning scenario, where the learner does not have access to the source domain directly, but rather operates on the basis of hypotheses induced from it -- the Hypothesis Transfer Learning (HTL) problem. Particularly, we conduct a theoretical analysis of HTL by considering the algorithmic stability of a class of HTL algorithms based on Regularized Least Squares with biased regularization. We show that the relatedness of source and target domains accelerates the convergence of the Leave-One-Out error to the generalization error, thus enabling the use of the Leave-One-Out error to find the optimal transfer parameters, even in the presence of a small training set. In case of unrelated domains we also suggest a theoretically principled way to prevent negative transfer, so that in the limit we recover the performance of the algorithm not using any knowledge from the source domain.},
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_language: TeX


text:
DESCRIPTION = "Configuration files for online package repositories aka feeds"
LICENSE = "MIT"
RRECOMMENDS_${PN} += "opkg"

#PV = "${DISTRO_VERSION}"
PR = "r10"

# Here is the deal - since we build a common filesystem for several platforms,
# we need to add all their respective feeds manually, hence next line is out
#PACKAGE_ARCH = "${MACHINE_ARCH}"

MACHS_ARMV5 = "dm6446-evm dm6467-evm dm6467t-evm dm355-evm dm365-evm dm357-evm da830-omapl137-evm da850-omapl138-evm"
MACHS_ARMV7 = "omap3evm beagleboard"

# This gets set in the distro/local configuration
ARAGO_FEED_BASEPATH ?= "feeds"

do_compile() {
        mkdir -p ${S}/${sysconfdir}/opkg/angstrom

# Populate the list of supported architectures
	rm ${S}/${sysconfdir}/opkg/arch.conf || true
#	ipkgarchs="${PACKAGE_ARCHS}"
	ipkgarchs="all any noarch arm armv4 armv4t armv5te #armv6 #armv7 #armv7a arago #omap3evm #beagleboard #dm6446-evm #dm6467-evm #dm6467t-evm #dm355-evm #dm365-evm #dm357-evm #da830-omapl137-evm #da850-omapl138-evm"
	priority=1
	for arch in $ipkgarchs; do
		disable=`echo $arch|cut -c1`
		if [ ${disable} == "#" ]; then
			newarch=`echo $arch|cut -c2-`
			echo "#arch $newarch $priority" >> ${S}/${sysconfdir}/opkg/arch.conf
		else
			echo "arch $arch $priority" >> ${S}/${sysconfdir}/opkg/arch.conf
		fi
		priority=$(expr $priority + 5)
	done

# Add all Arago supported feeds
	echo "src/gz no-arch ${DISTRO_FEED_URI}/all" > ${S}/${sysconfdir}/opkg/arago-noarch-feed.conf
	echo "src/gz arago ${DISTRO_FEED_URI}/arago" > ${S}/${sysconfdir}/opkg/arago-mach-feed.conf
	echo "src/gz armv5te ${DISTRO_FEED_URI}/armv5te" >  ${S}/${sysconfdir}/opkg/arago-armv5te-feed.conf

	echo "src/gz armv6 ${DISTRO_FEED_URI}/armv6" >  ${S}/${sysconfdir}/opkg/arago-armv6-feed.conf.sample
	echo "src/gz armv7a ${DISTRO_FEED_URI}/armv7a" >  ${S}/${sysconfdir}/opkg/arago-armv7a-feed.conf.sample

	for mach in ${MACHS_ARMV7} ${MACHS_ARMV5}; do
		echo "src/gz $mach ${DISTRO_FEED_URI}/$mach" >  ${S}/${sysconfdir}/opkg/arago-$mach-feed.conf.sample
	done

# Add Angstrom feeds as backup
	for arch in armv5te armv6 armv7a; do
		for feed in base debug perl python gstreamer ; do
			echo "src/gz ${feed} ${ANGSTROM_URI}/${FEED_BASEPATH}${arch}/${feed}" > ${S}/${sysconfdir}/opkg/angstrom/angstrom-${arch}-${feed}-feed.conf.sample
		done
	done

	# armv7a
	for mach in ${MACHS_ARMV7}; do
		echo "src/gz $mach ${ANGSTROM_URI}/${FEED_BASEPATH}armv7a/machine/$mach" >  ${S}/${sysconfdir}/opkg/angstrom/angstrom-$mach-feed.conf.sample
	done

	# armv5te
	for mach in ${MACHS_ARMV5}; do
		echo "src/gz $mach ${ANGSTROM_URI}/${FEED_BASEPATH}armv5te/machine/$mach" >  ${S}/${sysconfdir}/opkg/angstrom/angstrom-$mach-feed.conf.sample
	done

	echo "src/gz no-arch ${ANGSTROM_URI}/${FEED_BASEPATH}all" > ${S}/${sysconfdir}/opkg/angstrom/angstrom-noarch-feed.conf.sample
}

do_install () {
	install -d ${D}${sysconfdir}/opkg
	install -d ${D}${sysconfdir}/opkg/angstrom
	install -m 0644 ${S}/${sysconfdir}/opkg/*.conf* ${D}${sysconfdir}/opkg/
	install -m 0644 ${S}/${sysconfdir}/opkg/angstrom/*.conf* ${D}${sysconfdir}/opkg/angstrom/
}

FILES_${PN} = " \
	${sysconfdir}/opkg/* \
	${sysconfdir}/opkg/angstrom/* \
"

CONFFILES_${PN} += " \
	${sysconfdir}/opkg/* \
	${sysconfdir}/opkg/angstrom/* \
"


text:
package bundlestore

import (
	"fmt"
	"io"
	"net/http"
	"regexp"
	"strings"
	"time"

	log "github.com/sirupsen/logrus"

	"github.com/twitter/scoot/common/stats"
	"github.com/twitter/scoot/snapshot/store"
)

type httpServer struct {
	storeConfig *store.StoreConfig
}

func MakeHTTPServer(cfg *store.StoreConfig) *httpServer {
	return &httpServer{cfg}
}

func (s *httpServer) HandleUpload(w http.ResponseWriter, req *http.Request) {
	log.Infof("Uploading %v, %v, %v (from %v)", req.Host, req.URL, req.Header, req.RemoteAddr)
	defer s.storeConfig.Stat.Latency(stats.BundlestoreUploadLatency_ms).Time().Stop()
	s.storeConfig.Stat.Counter(stats.BundlestoreUploadCounter).Inc(1)
	bundleName := strings.TrimPrefix(req.URL.Path, "/bundle/")
	if err := checkBundleName(bundleName); err != nil {
		log.Infof("Bundlename err: %v --> StatusBadRequest (from %v)", err, req.RemoteAddr)
		http.Error(w, err.Error(), http.StatusBadRequest)
		s.storeConfig.Stat.Counter(stats.BundlestoreUploadErrCounter).Inc(1)
		return
	}
	bundleData := req.Body

	ok, err := s.storeConfig.Store.Exists(bundleName)
	if err != nil {
		log.Infof("Exists err: %v --> StatusInternalServerError (from %v)", err, req.RemoteAddr)
		http.Error(w, fmt.Sprintf("Error checking if bundle exists: %s", err), http.StatusInternalServerError)
		s.storeConfig.Stat.Counter(stats.BundlestoreUploadErrCounter).Inc(1)
		return
	}
	if ok {
		s.storeConfig.Stat.Counter(stats.BundlestoreUploadExistingCounter).Inc(1)
		fmt.Fprintf(w, "Bundle %s already exists, no-op and return\n", bundleName)
		return
	}

	// Get ttl if defaults were provided during Server construction or if it comes in this request header.
	var ttl *store.TTLValue
	if s.storeConfig.TTLCfg != nil {
		ttl = &store.TTLValue{TTL: time.Now().Add(s.storeConfig.TTLCfg.TTL), TTLKey: s.storeConfig.TTLCfg.TTLKey}
	}
	for k := range req.Header {
		if !strings.EqualFold(k, store.DefaultTTLKey) {
			continue
		}
		if ttlTime, err := time.Parse(time.RFC1123, req.Header.Get(k)); err != nil {
			log.Infof("TTL err: %v --> StatusInternalServerError (from %v)", err, req.RemoteAddr)
			http.Error(w, fmt.Sprintf("Error parsing TTL: %s", err), http.StatusInternalServerError)
			s.storeConfig.Stat.Counter(stats.BundlestoreUploadErrCounter).Inc(1)
			return
		} else if ttl != nil {
			ttl.TTL = ttlTime
		} else {
			ttl = &store.TTLValue{TTL: ttlTime, TTLKey: store.DefaultTTLKey}
		}
		break
	}
	if err := s.storeConfig.Store.Write(bundleName, store.NewResource(bundleData, req.ContentLength, ttl)); err != nil {
		log.Infof("Write err: %v --> StatusInternalServerError (from %v)", err, req.RemoteAddr)
		http.Error(w, fmt.Sprintf("Error writing Bundle: %s", err), http.StatusInternalServerError)
		s.storeConfig.Stat.Counter(stats.BundlestoreUploadErrCounter).Inc(1)
		return
	}
	fmt.Fprintf(w, "Successfully wrote bundle %s\n", bundleName)
	s.storeConfig.Stat.Counter(stats.BundlestoreUploadOkCounter).Inc(1)
}

func (s *httpServer) CheckExistence(w http.ResponseWriter, req *http.Request) {
	log.Infof("Checking Existence %v %v (from %v)", req.Host, req.URL, req.RemoteAddr)
	defer s.storeConfig.Stat.Latency(stats.BundlestoreCheckLatency_ms).Time().Stop()
	s.storeConfig.Stat.Counter(stats.BundlestoreCheckCounter).Inc(1)
	bundleName := strings.TrimPrefix(req.URL.Path, "/bundle/")
	if err := checkBundleName(bundleName); err != nil {
		log.Infof("Bundlename err: %v --> StatusBadRequest (from %v)", err, req.RemoteAddr)
		http.Error(w, err.Error(), http.StatusBadRequest)
		s.storeConfig.Stat.Counter(stats.BundlestoreCheckErrCounter).Inc(1)
		return
	}
	ok, err := s.storeConfig.Store.Exists(bundleName)
	if err != nil || !ok {
		log.Infof("Check err: %v --> StatusNotFound (from %v)", err, req.RemoteAddr)
		http.NotFound(w, req)
		s.storeConfig.Stat.Counter(stats.BundlestoreCheckErrCounter).Inc(1)
		return
	}
	w.Header().Set("Content-Type", "text/plain; charset=utf-8")
	s.storeConfig.Stat.Counter(stats.BundlestoreCheckOkCounter).Inc(1)
}

func (s *httpServer) HandleDownload(w http.ResponseWriter, req *http.Request) {
	log.Infof("Downloading %v %v (from %v)", req.Host, req.URL, req.RemoteAddr)
	defer s.storeConfig.Stat.Latency(stats.BundlestoreDownloadLatency_ms).Time().Stop()
	s.storeConfig.Stat.Counter(stats.BundlestoreDownloadCounter).Inc(1)
	bundleName := strings.TrimPrefix(req.URL.Path, "/bundle/")
	if err := checkBundleName(bundleName); err != nil {
		log.Infof("Bundlename err: %v --> StatusBadRequest (from %v)", err, req.RemoteAddr)
		http.Error(w, err.Error(), http.StatusBadRequest)
		//s.stat.Counter(stats.BundlestoreDownloadErrCounter).Inc(1)
		s.storeConfig.Stat.Counter(stats.BundlestoreDownloadErrCounter).Inc(1)
		return
	}

	r, err := s.storeConfig.Store.OpenForRead(bundleName)
	if err != nil {
		log.Infof("Read err: %v --> StatusNotFound (from %v)", err, req.RemoteAddr)
		http.NotFound(w, req)
		s.storeConfig.Stat.Counter(stats.BundlestoreDownloadErrCounter).Inc(1)
		return
	}
	if _, err := io.Copy(w, r); err != nil {
		log.Infof("Copy err: %v --> StatusInternalServerError (from %v)", err, req.RemoteAddr)
		s.storeConfig.Stat.Counter(stats.BundlestoreDownloadErrCounter).Inc(1)
		r.Close()
		return
	}
	if err := r.Close(); err != nil {
		log.Infof("Close err: %v --> StatusInternalServerError (from %v)", err, req.RemoteAddr)
		s.storeConfig.Stat.Counter(stats.BundlestoreDownloadErrCounter).Inc(1)
		return
	}
	s.storeConfig.Stat.Counter(stats.BundlestoreDownloadOkCounter).Inc(1)
}

var bundleRE *regexp.Regexp = regexp.MustCompile("^bs-[a-z0-9]{40}.bundle")

// Check for name enforcement for HTTP API
func checkBundleName(name string) error {
	if ok := bundleRE.MatchString(name); ok {
		return nil
	}
	return fmt.Errorf("Error with bundleName, expected %q, got: %s", bundleRE, name)
}

repository: twitter/scoot

repo_name: twitter/scoot


text:
DESCRIPTION = "Pibert."

require recipes-core/images/core-image-minimal.bb

GPU_MEM = "16"
DISABLE_SPLASH = "1"
BOOT_DELAY = "0"
BOOT_DELAY_MS = "0"
DISABLE_RPI_BOOT_LOGO = "1"

inherit extrausers

EXTRA_USERS_PARAMS = "usermod -P root root;"

# PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi-rt"

## INHERIT += "update-rc.d"

# Include modules in rootfs
IMAGE_INSTALL += " \
	kernel-modules \
    alsa-plugins \
    alsa-tools \
    alsa-utils \
    dropbear \
    python \
    systemd-analyze \
    pibertservice \
    python3-pip \
	"

#PACKAGES =+ "pibert"

#SPLASH = "psplash-raspberrypi"
#IMAGE_FEATURES += "ssh-server-dropbear"

#do_image_prepend() {
#    bb.warn("xxxxx")
#}

inherit systemd
DISTRO_FEATURES_append = "systemd"

DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
#VIRTUAL-RUNTIME_dev_manager = "systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""
VIRTUAL-RUNTIME_syslog = ""

SYSTEMD_SERVICE_${PN} = "pibert.service"

repository: thepartisan/meta-pibert

repo_name: thepartisan/meta-pibert


text:
package peering_request_admission

import (
	"crypto/tls"
	"fmt"
	discoveryv1 "github.com/liqoTech/liqo/api/discovery/v1"
	"github.com/liqoTech/liqo/pkg/crdClient"
	"k8s.io/klog"
	"net/http"
	"os"
)

func StartWebhook(certPath string, keyPath string, namespace string, kubeconfigPath string) *WebhookServer {
	port := 8443
	return startTls(certPath, keyPath, port, namespace, kubeconfigPath)
}

func startTls(certPath string, keyPath string, port int, namespace string, kubeconfigPath string) *WebhookServer {
	pair, err := tls.LoadX509KeyPair(certPath, keyPath)
	if err != nil {
		klog.Error(err, err.Error())
		os.Exit(1)
	}

	config, err := crdClient.NewKubeconfig(kubeconfigPath, &discoveryv1.GroupVersion)
	if err != nil {
		klog.Error(err, "unable to get kube config")
		os.Exit(1)
	}
	client, err := crdClient.NewFromConfig(config)
	if err != nil {
		klog.Error(err, "unable to create crd client")
		os.Exit(1)
	}

	whsvr := &WebhookServer{
		Server: &http.Server{
			Addr:      fmt.Sprintf(":%v", port),
			TLSConfig: &tls.Config{Certificates: []tls.Certificate{pair}},
		},

		client:    client,
		Namespace: namespace,
	}

	// define http Server and Server handler
	mux := http.NewServeMux()
	mux.HandleFunc("/validate", whsvr.serve)
	whsvr.Server.Handler = mux

	// start webhook Server in new routine
	go func() {
		if err := whsvr.Server.ListenAndServeTLS(certPath, keyPath); err != nil {
			klog.Error(err, "Failed to listen and serve webhook Server: "+err.Error())
		}
	}()

	klog.Info("Server started")

	return whsvr
}

repository: riccardoroccaro/liqo

repo_name: riccardoroccaro/liqo


text:
package pokemon

import (
	"fmt"
	"github.com/disiqueira/MySlackBotTwo/pkg/bot"
	"github.com/disiqueira/MySlackBotTwo/pkg/provider"
	"math/rand"
	"regexp"
	"strconv"
)

var (
	re  = regexp.MustCompile(pattern)
	api provider.Pokemon
)

const (
	pattern          = "(?i)\\b(pokemon|poke|pikachu)[s|z]{0,1}\\b"
	maxPokemon       = 500
	pokeAnswerFormat = "%s (%d) %s"
)

func pokemon(command *bot.PassiveCmd) (string, error) {
	if !re.MatchString(command.Raw) {
		return "", nil
	}
	poke, err := api.Search(strconv.Itoa(rand.Intn(maxPokemon)))
	if err != nil {
		return "", err
	}

	return fmt.Sprintf(pokeAnswerFormat, poke.Name, poke.ID, poke.Sprites.FrontDefault), nil
}

func init() {
	api = provider.NewPokemon()
	bot.RegisterPassiveCommand(
		"pokemon",
		pokemon)
}


text:
require u-boot-digilent.inc

SRCREV ?= "4a3462002712c18b9b2c7f8732967aa66f3adb51"
PV = "${UBRANCH}-git${SRCPV}"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;beginline=1;endline=6;md5=157ab8408beab40cd8ce1dc69f702a6c"

PROVIDES += "virtual/bootloader \
             virtual/boot-bin \
             "


text:
%% -*- coding:utf-8 -*-
@book{bib:kolmogorov74basic,
    author = {{А. Н. Колмогоров}},
    title = {{Основные понятия теории вероятностей}},
    publisher = {{Наука}},
    address   = {{Москва}},
    year = {1974},
    language = {russian}
}

@misc{github:mathexperiments_ivanmurashko,
  author = {Ivan Murashko},
  title = {Math experiments in haskell},
  publisher = {GitHub},
  journal = {GitHub repository},
  url = {https://github.com/ivanmurashko/hsprojects/tree/master/mathexperiments}
}

repository: ivanmurashko/articles

repo_name: ivanmurashko/articles


text:
@book{rao2011mechanical,
  title={Mechanical Vibrations},
  author={Rao, S.S.},
  isbn={9789810687120},
  lccn={2010028534},
  series={Always learning},
  url={https://books.google.it/books?id=7Pd3SQAACAAJ},
  year={2011},
  publisher={Prentice Hall}
}

@book{meirovitch2001fundamentals,
  title={Fundamentals of Vibrations},
  author={Meirovitch, L.},
  isbn={9780070413450},
  lccn={00030494},
  series={McGraw-Hill higher education},
  url={https://books.google.it/books?id=u358QgAACAAJ},
  year={2001},
  publisher={McGraw-Hill}
}

gha_language: Matlab


text:
@incollection{MR1922045,
 author = {Ferrer, Leonor and Martín, Francisco},
 booktitle = {Differential geometry, Valencia, 2001},
 mrclass = {53A10},
 mrnumber = {1922045},
 mrreviewer = {Pablo Mira},
 pages = {157--166},
 publisher = {World Sci. Publ., River Edge, NJ},
 title = {Minimal discs bounded by straight lines},
 year = {2002}
}

repository: torralbofco/geometric-analysis-fork

repo_name: torralbofco/geometric-analysis-fork


text:
package main

import (
	"appengine"
	"appengine/datastore"
	"github.com/gorilla/mux"
	"github.com/russross/blackfriday"
	"html/template"
	"net/http"
)

func index(w http.ResponseWriter, r *http.Request) error {
	data := map[string]interface{}{
		"title":       "top",
		"description": "this is a starter app for GAE/Go",
		"body":        "hello world",
	}
	return executeTemplate(w, "index", 200, data)
}

func generalPage(w http.ResponseWriter, r *http.Request) error {
	vars := mux.Vars(r)
	keyName := vars["keyName"]
	c := appengine.NewContext(r)
	adminpage := &AdminPage{}
	key := datastore.NewKey(c, "AdminPage", keyName, 0, nil)
	err := datastore.Get(c, key, adminpage)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
	}
	bodyHTML := string(blackfriday.MarkdownBasic([]byte(adminpage.Content)))
	data := map[string]interface{}{
		"title":       adminpage.Title,
		"description": "this is a starter app for GAE/Go",
		"update":      adminpage.Update,
		"body":        bodyHTML,
	}
	return executeTemplate(w, "page", 200, data)
}

func articlePage(w http.ResponseWriter, r *http.Request) error {
	vars := mux.Vars(r)
	keyName := vars["keyName"]
	data := map[string]interface{}{
		"title":       keyName,
		"description": "this is a starter app for GAE/Go",
		"body":        keyName,
	}
	return executeTemplate(w, "page", 200, data)
}

func searchPage(w http.ResponseWriter, r *http.Request) error {
	keyword := template.HTMLEscapeString(r.FormValue("keyword"))
	data := map[string]interface{}{
		"title":       "Search Results of " + keyword,
		"description": "Search Results of " + keyword,
		"keyword":     keyword,
	}
	return executeTemplate(w, "searchIndex", 200, data)
}

repository: yosukesuzuki/go-malt

repo_name: yosukesuzuki/go-malt


text:
inherit obmc-phosphor-systemd

SUMMARY = "At Scale Debug Service"
DESCRIPTION = "At Scale Debug Service exposes remote JTAG target debug capabilities"

LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8929d33c051277ca2294fe0f5b062f38"

inherit cmake
DEPENDS = "sdbusplus openssl libpam libgpiod safec"

do_configure[depends] += "virtual/kernel:do_shared_workdir"

SRC_URI = "git://github.com/Intel-BMC/asd;protocol=https"
SRCREV = "1.4.7"

SRC_URI += "file://0001-ASD-Fix-sprintf_s-compilation-issue-for-safec-3.5.1.patch"

inherit useradd

USERADD_PACKAGES = "${PN}"

# add a special user asdbg
USERADD_PARAM:${PN} = "-u 999 asdbg"

S = "${WORKDIR}/git"

SYSTEMD_SERVICE:${PN} += "com.intel.AtScaleDebug.service"

# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
EXTRA_OECMAKE = "-DBUILD_UT=OFF"

CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi"
CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include"

# Copying the depricated header from kernel as a temporary fix to resolve build breaks.
# It should be removed later after fixing the header dependency in this repository.
SRC_URI += "file://asm/rwonce.h"
do_configure:prepend() {
    cp -r ${WORKDIR}/asm ${S}/asm
}
CFLAGS:append = " -I ${S}"

repository: Intel-BMC/openbmc

repo_name: Intel-BMC/openbmc

gha_license_id: NOASSERTION

gha_language: Python


text:
require ${BPN}.inc

inherit native

DEPENDS += " \
    glib-2.0-native \
    dbus-native \
    iso-codes \
"

PACKAGECONFIG = ""

# for allarch iso-codes
EXTRA_NATIVE_PKGCONFIG_PATH = ":${RECIPE_SYSROOT}${datadir_native}/pkgconfig"
# for allarch unicode-ucd - just to make configure happy
EXTRA_OECONF += "--with-ucd-dir=${RECIPE_SYSROOT}${datadir_native}/unicode/ucd"

do_compile() {
    cd src
    # seems by moving to src we break dependency tracking so build what's
    # necessary step by step
    oe_runmake ibusenumtypes.h
    oe_runmake ibusmarshalers.h
    oe_runmake ibusenumtypes.c
    oe_runmake unicode-parser
}

do_install() {
    install -d ${D}/${libdir}
    install -m 755 ${S}/src/.libs/libibus-*.so* ${D}/${libdir}

    install -d ${D}/${bindir}
    install -m 755 ${S}/src/.libs/unicode-parser ${D}/${bindir}
}

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_language: BitBake


text:
@Article{jaidka2019,
  author = {Kokil Jaidka and Alvin Zhou and Yphtach Lelkes},
  title = {{Brevity is the Soul of Twitter: The Constraint Affordance and Political Discussion}},
  year = {2019},
  doi = {10.1093/joc/jqz023},
  url_pdf = {https://www.dropbox.com/s/c9s4mpxk6thfhtp/brevityjoc.pdf?dl=1},
  abstract = {Many hoped that social networking sites would allow for the open exchange of information and a revival of the public sphere. Unfortunately, conversations on social media are often toxic and not conducive to healthy political discussions. Twitter, the most widely used social network for political discussions, doubled the limit of characters in a tweet in November 2017, which provided an opportunity to study the effect of technological affordances on political discussions using a discontinuous time series design. Using supervised and unsupervised natural language processing methods, we analyzed 358,242 tweet replies to U.S. politicians from January 2017 to March 2018. We show that doubling the permissible length of a tweet led to less uncivil, more polite, and more constructive discussions online. However, the declining trend in the empathy and respectfulness of these tweets raises concerns about the implications of the changing norms for the quality of political deliberation.},
  issn = {0021-9916},
  journal = {Journal of Communication},
  url = {https://doi.org/10.1093/joc/jqz023},
  date = {2019-01-01},
}

repository: ylelkes/academic-kickstart

repo_name: ylelkes/academic-kickstart


text:
@article{chapman_40-year_2021,
 abstract = {Tropical forests are repositories of much of the world’s biodiversity and are critical for mitigation of climate change. Yet, the drivers of forest dynamics are poorly understood. This is in large part due to the lack of long-term data on forest change and changes in drivers.},
 author = {Chapman, Colin A. and Galán-Acedo, Carmen and Gogarten, Jan F. and Hou, Rong and Lawes, Michael J. and Omeja, Patrick A. and Sarkar, Dipto and Sugiyama, Anna and Kalbitzer, Urs},
 doi = {10.1186/s40663-021-00343-7},
 file = {Chapman et al. - 2021 - A 40-year evaluation of drivers of African rainfor.pdf:/Users/Urs/Zotero/storage/MBIB2K49/Chapman et al. - 2021 - A 40-year evaluation of drivers of African rainfor.pdf:application/pdf;Snapshot:/Users/Urs/Zotero/storage/CN3L7MQF/s40663-021-00343-7.html:text/html},
 issn = {2197-5620},
 journal = {Forest Ecosystems},
 keywords = {Climate change, Primates, Succession, Elephants, Disturbance, Forest regeneration},
 month = {October},
 number = {1},
 pages = {66},
 title = {A 40-year evaluation of drivers of African rainforest change},
 url = {https://doi.org/10.1186/s40663-021-00343-7},
 urldate = {2021-10-16},
 volume = {8},
 year = {2021}
}

branch_name: refs/heads/main


text:
package lexer

import (
	"strings"
	"testing"

	"github.com/geovanisouza92/geo/token"
)

func TestNextToken(t *testing.T) {
	input := `
fn let return true false
123 1.23 1.4e5
foo _foo f12 io! option? 1f
=+-*/==!!=>>=<<=|&&||
;,:(){}[]
"foobar" "foo bar" "foo \"bar"
[1] [1, 2]
{} {"foo": "bar"} {"foo": "bar", "baz": "goo"}
世界
`

	tt := []struct {
		Type    token.TokenType
		Literal string
		Line    int
		Col     int
	}{
		{token.Fn, "fn", 2, 3},
		{token.Let, "let", 2, 7},
		{token.Return, "return", 2, 14},
		{token.True, "true", 2, 19},
		{token.False, "false", 2, 25},
		{token.Number, "123", 3, 4},
		{token.Number, "1.23", 3, 9},
		{token.Number, "1.4e5", 3, 15},
		{token.Id, "foo", 4, 4},
		{token.Id, "_foo", 4, 9},
		{token.Id, "f12", 4, 13},
		{token.Id, "io!", 4, 17},
		{token.Id, "option?", 4, 25},
		{token.Number, "1", 4, 27},
		{token.Id, "f", 4, 28},
		{token.Assign, "=", 5, 2},
		{token.Plus, "+", 5, 3},
		{token.Minus, "-", 5, 4},
		{token.Mul, "*", 5, 5},
		{token.Div, "/", 5, 6},
		{token.Eq, "==", 5, 8},
		{token.Not, "!", 5, 9},
		{token.Neq, "!=", 5, 11},
		{token.Gt, ">", 5, 12},
		{token.Ge, ">=", 5, 14},
		{token.Lt, "<", 5, 15},
		{token.Le, "<=", 5, 17},
		{token.Pipe, "|", 5, 18},
		{token.And, "&&", 5, 20},
		{token.Or, "||", 5, 22},
		{token.EOL, ";", 6, 2},
		{token.Comma, ",", 6, 3},
		{token.Colon, ":", 6, 4},
		{token.LParen, "(", 6, 5},
		{token.RParen, ")", 6, 6},
		{token.LBrace, "{", 6, 7},
		{token.RBrace, "}", 6, 8},
		{token.LBracket, "[", 6, 9},
		{token.RBracket, "]", 6, 10},
		{token.String, "foobar", 7, 7},
		{token.String, "foo bar", 7, 17},
		{token.String, `foo \"bar`, 7, 29},
		{token.LBracket, "[", 8, 2},
		{token.Number, "1", 8, 3},
		{token.RBracket, "]", 8, 4},
		{token.LBracket, "[", 8, 6},
		{token.Number, "1", 8, 7},
		{token.Comma, ",", 8, 8},
		{token.Number, "2", 8, 10},
		{token.RBracket, "]", 8, 11},
		{token.LBrace, "{", 9, 2},
		{token.RBrace, "}", 9, 3},
		{token.LBrace, "{", 9, 5},
		{token.String, "foo", 9, 8},
		{token.Colon, ":", 9, 11},
		{token.String, "bar", 9, 15},
		{token.RBrace, "}", 9, 18},
		{token.LBrace, "{", 9, 20},
		{token.String, "foo", 9, 23},
		{token.Colon, ":", 9, 26},
		{token.String, "bar", 9, 30},
		{token.Comma, ",", 9, 33},
		{token.String, "baz", 9, 37},
		{token.Colon, ":", 9, 40},
		{token.String, "goo", 9, 44},
		{token.RBrace, "}", 9, 47},
		{token.Id, "世界", 10, 3},
		{token.EOF, "", 11, 1},
	}

	l := New(strings.NewReader(input))

	for _, tc := range tt {
		t.Run("Token_"+tc.Type.String(), func(t *testing.T) {
			tok := l.NextToken()
			if tok.Type != tc.Type {
				t.Errorf("token should be of type %q; got %q", tc.Type, tok.Type)
			}
			if tok.Literal != tc.Literal {
				t.Errorf("token should have the literal %q; got %q", tc.Literal, tok.Literal)
			}
			if tok.Line != tc.Line {
				t.Errorf("token should be at the line %d; got %d", tc.Line, tok.Line)
			}
			if tok.Col != tc.Col {
				t.Errorf("token should be at column %d; got %d", tc.Col, tok.Col)
			}
		})
	}
}


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{Methods1998,
author = {Methods, Monte Carlo},
file = {:Users/sepmein/Qsync/Papers/Methods{\_}1998{\_}Monte Carlo Methods Monte Carlo Policy Evaluation !.pdf:pdf},
journal = {Methods},
title = {{Monte Carlo Methods Monte Carlo Policy Evaluation !}},
year = {1998}
}

license: Unlicense

repository: sepmein/references

repo_name: sepmein/references


text:
DESCRIPTION = "NumberX is a mathematical puzzle game that will challenge your mental math abilities! "
HOMEPAGE = "http://code.google.com/p/numberx/"
LICENSE = "GPLv3"
AUTHOR = "Valéry Febvre <vfebvre@easter-eggs.com>"
SECTION = "x11/applications"
PRIORITY = "optional"
DEPENDS = "python-native"

SRCREV = "4"
PV = "1.0.0+svnr${SRCPV}"
PR = "r1"

S = "${WORKDIR}/trunk"

PACKAGE_ARCH = "all"

SRC_URI = "svn://numberx.googlecode.com/svn;module=trunk;proto=http"

inherit distutils

RDEPENDS_${PN} += "python-math python-elementary"

FILES_${PN} += "${datadir}"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty


text:
DESCRIPTION = "Task to build and install multimedia source (or development header) packages on host"
PR = "r16"
LICENSE = "MIT"

inherit task
PACKAGE_ARCH = "${MACHINE_ARCH}"

MULTIMEDIA_SOURCETREE = ""

MULTIMEDIA_SOURCETREE_dm37x-evm = " \
    ti-framework-components-src \
    ti-codec-engine-src \
    ti-codecs-omap3530-src \
    ti-linuxutils-src \
    ti-xdctools-src \
    ti-dmai-src \
    ti-xdais-src \
    ti-local-power-manager-src \
    "

MULTIMEDIA_SOURCETREE_dm355 = " \
    ti-framework-components-src \
    ti-codec-engine-src \
    ti-codecs-dm355-src \
    ti-linuxutils-src \
    ti-xdctools-src \
    ti-dmai-src \
    ti-xdais-src \
    ti-dvsdk-demos-src \
#    ti-dvtb-src \
    "

MULTIMEDIA_SOURCETREE_dm365 = " \
    ti-framework-components-src \
    ti-codec-engine-src \
    ti-codecs-dm365-src \
    ti-linuxutils-src \
    ti-xdctools-src \
    ti-dmai-src \
    ti-dm365mm-module-src \
    ti-xdais-src \
    ti-dvsdk-demos-src \
    ti-dvtb-src \
    "

MULTIMEDIA_SOURCETREE_dm6446 = " \
    ti-framework-components-src \
    ti-codec-engine-src \
    ti-codecs-dm6446-src \
    ti-linuxutils-src \
    ti-xdctools-src \
    ti-dmai-src \
    ti-xdais-src \
    ti-local-power-manager-src \
    "

MULTIMEDIA_SOURCETREE_dm6467 = " \
    ti-framework-components-src \
    ti-codec-engine-src \
    ti-codecs-dm6467-src \
    ti-linuxutils-src \
    ti-xdctools-src \
    ti-dmai-src \
    ti-xdais-src \
    ti-dvsdk-demos-src \
#    ti-dvtb-src \
    "

MULTIMEDIA_SOURCETREE_da830-omapl137-evm = " \
    ti-framework-components-src \
    ti-codec-engine-src \
    ti-codecs-omapl137-src \
    ti-linuxutils-src \
    ti-xdctools-src \
    ti-dmai-src \
    ti-xdais-src \
    "

MULTIMEDIA_SOURCETREE_da850-omapl138-evm = " \
    ti-framework-components-src \
    ti-codec-engine-src \
    ti-codecs-omapl138-src \
    ti-linuxutils-src \
    ti-xdctools-src \
    ti-dmai-src \
    ti-xdais-src \
    "

RRECOMMENDS_${PN} = "\
    ${MULTIMEDIA_SOURCETREE} \
    "


text:
// Code generated by msgraph-generate.go DO NOT EDIT.

package msgraph

// InternetExplorerMessageSetting undocumented
type InternetExplorerMessageSetting string

const (
	// InternetExplorerMessageSettingVNotConfigured undocumented
	InternetExplorerMessageSettingVNotConfigured InternetExplorerMessageSetting = "NotConfigured"
	// InternetExplorerMessageSettingVDisabled undocumented
	InternetExplorerMessageSettingVDisabled InternetExplorerMessageSetting = "Disabled"
	// InternetExplorerMessageSettingVEnabled undocumented
	InternetExplorerMessageSettingVEnabled InternetExplorerMessageSetting = "Enabled"
	// InternetExplorerMessageSettingVKeepGoing undocumented
	InternetExplorerMessageSettingVKeepGoing InternetExplorerMessageSetting = "KeepGoing"
)

// InternetExplorerMessageSettingPNotConfigured returns a pointer to InternetExplorerMessageSettingVNotConfigured
func InternetExplorerMessageSettingPNotConfigured() *InternetExplorerMessageSetting {
	v := InternetExplorerMessageSettingVNotConfigured
	return &v
}

// InternetExplorerMessageSettingPDisabled returns a pointer to InternetExplorerMessageSettingVDisabled
func InternetExplorerMessageSettingPDisabled() *InternetExplorerMessageSetting {
	v := InternetExplorerMessageSettingVDisabled
	return &v
}

// InternetExplorerMessageSettingPEnabled returns a pointer to InternetExplorerMessageSettingVEnabled
func InternetExplorerMessageSettingPEnabled() *InternetExplorerMessageSetting {
	v := InternetExplorerMessageSettingVEnabled
	return &v
}

// InternetExplorerMessageSettingPKeepGoing returns a pointer to InternetExplorerMessageSettingVKeepGoing
func InternetExplorerMessageSettingPKeepGoing() *InternetExplorerMessageSetting {
	v := InternetExplorerMessageSettingVKeepGoing
	return &v
}