text:
/*
go-angelscript
Copyright (c) 2017 Clipsey

   This software is provided 'as-is', without any express or implied
   warranty. In no event will the authors be held liable for any
   damages arising from the use of this software.

   Permission is granted to anyone to use this software for any
   purpose, including commercial applications, and to alter it and
   redistribute it freely, subject to the following restrictions:

   1. The origin of this software must not be misrepresented; you
      must not claim that you wrote the original software. If you use
      this software in a product, an acknowledgment in the product
      documentation would be appreciated but is not required.

   2. Altered source versions must be plainly marked as such, and
      must not be misrepresented as being the original software.

   3. This notice may not be removed or altered from any source
      distribution.

   The original version of this library can be located at:
   https://www.github.com/Member1221/go-angelscript

Clipsey
clipseypone@gmail.com
*/
package flags

//Return codes
type ASReturnCode = int32

const (
	ASReturnSuccess                          = ASReturnCode(0)
	ASReturnError                            = ASReturnCode(-1)
	ASReturnContextActive                    = ASReturnCode(-2)
	ASReturnContextNotFinished               = ASReturnCode(-3)
	ASReturnContextNotPrepare                = ASReturnCode(-4)
	ASReturnInvalidArg                       = ASReturnCode(-5)
	ASReturnNoFunction                       = ASReturnCode(-6)
	ASReturnNotSupported                     = ASReturnCode(-7)
	ASReturnInvalidName                      = ASReturnCode(-8)
	ASReturnNameTaken                        = ASReturnCode(-9)
	ASReturnInvalidDeclaration               = ASReturnCode(-10)
	ASReturnInvalidObject                    = ASReturnCode(-11)
	ASReturnInvalidType                      = ASReturnCode(-12)
	ASReturnAlreadyRegistered                = ASReturnCode(-13)
	ASReturnMultipleFunctions                = ASReturnCode(-14)
	ASReturnNoModule                         = ASReturnCode(-15)
	ASReturnNoGlobalVar                      = ASReturnCode(-16)
	ASReturnInvalidConfiguration             = ASReturnCode(-17)
	ASReturnInvalidInterface                 = ASReturnCode(-18)
	ASReturnCantBindAllFunctions             = ASReturnCode(-19)
	ASReturnLowerArrayDimensionNotRegistered = ASReturnCode(-20)
	ASReturnWrongConfigGroup                 = ASReturnCode(-21)
	ASReturnConfigGroupIsInUse               = ASReturnCode(-22)
	ASReturnIllegalBehaviourForType          = ASReturnCode(-23)
	ASReturnWrongCallingConvention           = ASReturnCode(-24)
	ASReturnBuildInProgress                  = ASReturnCode(-25)
	ASReturnInitGlobalVarsFailed             = ASReturnCode(-26)
	ASReturnOutOfMemory                      = ASReturnCode(-27)
	ASReturnModuleIsInUse                    = ASReturnCode(-28)
)

//Engine properties

type ASEngineProperties = uint32
const (
	ASPropertyAllowUnsafeReferences = ASEngineProperties(1)
	ASPropertyOptimizeBytecode = ASEngineProperties(2)
	ASPropertyCopyScriptSections = ASEngineProperties(3)
	ASPropertyMaxStackSize = ASEngineProperties(4)
	ASPropertyUseCharacterLiterals = ASEngineProperties(5)
	ASPropertyAllowMultilineStrings = ASEngineProperties(6)
	ASPropertyAllowImplicitHandleTypes = ASEngineProperties(7)
	ASPropertyBuildWithoutLineCues = ASEngineProperties(8)
	ASPropertyInitGlobalVarsAfterBuild = ASEngineProperties(9)
	ASPropertyRequireEnumScope = ASEngineProperties(10)
	ASPropertyScriptScanner = ASEngineProperties(11)
	ASPropertyIncludeJITInstructions = ASEngineProperties(12)
	ASPropertyStringEncoding = ASEngineProperties(13)
	ASPropertyPropertyAccessorMode = ASEngineProperties(14)
	ASPropertyExpandDefArrayToTemplate = ASEngineProperties(15)
	ASPropertyAutoGarbageCollect = ASEngineProperties(16)
	ASPropertyDissallowGlobalVars = ASEngineProperties(17)
	ASPropertyAlwaysImplDefaultConstruct = ASEngineProperties(18)
	ASPropertyCompilerWarnings = ASEngineProperties(19)
	ASPropertyDisallowValueAssingForRefType = ASEngineProperties(20)
	ASPropertyAlterSyntaxNamedArgs = ASEngineProperties(21)
	ASPropertyDisableIntegerDivision = ASEngineProperties(22)
	ASPropertyDisallowEmptyListElements = ASEngineProperties(23)
	ASPropertyPrivatePropAsProtected = ASEngineProperties(24)
	ASPropertyAllowUnicodeIdentifiers = ASEngineProperties(25)
	ASPropertyHeredocTrimMode = ASEngineProperties(26)
	ASPropertyLastProperty = ASEngineProperties(27)
)

//Calling conventions
type ASCallConvention = uint32

const (
	ASCallConventionCDeclare            = ASCallConvention(0)
	ASCallConventionSTDCall             = ASCallConvention(1)
	ASCallConventionThisCallAsGlobal    = ASCallConvention(2)
	ASCallConventionThisCall            = ASCallConvention(3)
	ASCallConventionCDeclareObjectLast  = ASCallConvention(4)
	ASCallConventionCDeclareObjectFirst = ASCallConvention(5)
	ASCallConventionCallGeneric         = ASCallConvention(6)
	ASCallConventionThisCallObjectLast  = ASCallConvention(7)
	ASCallConventionThisCallObjectFirst = ASCallConvention(8)
)

//Object type flags
type ASObjectType = uint32

const (
	ASTypeReference               = ASObjectType(1 << 0)
	ASTypeValue                   = ASObjectType(1 << 1)
	ASTypeGC                      = ASObjectType(1 << 2)
	ASTypePod                     = ASObjectType(1 << 3)
	ASTypeNoHandle                = ASObjectType(1 << 4)
	ASTypeScoped                  = ASObjectType(1 << 5)
	ASTypeTemplate                = ASObjectType(1 << 6)
	ASTypeASHandle                = ASObjectType(1 << 7)
	ASTypeAppClass                = ASObjectType(1 << 8)
	ASTypeAppClassConstructor     = ASObjectType(1 << 9)
	ASTypeAppClassDestructor      = ASObjectType(1 << 10)
	ASTypeAppClassAssignment      = ASObjectType(1 << 11)
	ASTypeAppClassCopyConstructor = ASObjectType(1 << 12)
	AsTypeAppClassC               = ASObjectType(ASTypeAppClass + ASTypeAppClassConstructor)
	AsTypeAppClassCD              = ASObjectType(ASTypeAppClass + ASTypeAppClassConstructor + ASTypeAppClassDestructor)
	AsTypeAppClassCA              = ASObjectType(ASTypeAppClass + ASTypeAppClassConstructor + ASTypeAppClassAssignment)
	AsTypeAppClassCK              = ASObjectType(ASTypeAppClass + ASTypeAppClassConstructor + ASTypeAppClassCopyConstructor)
	AsTypeAppClassCDA             = ASObjectType(ASTypeAppClass + ASTypeAppClassConstructor + ASTypeAppClassDestructor + ASTypeAppClassAssignment)
	AsTypeAppClassCDK             = ASObjectType(ASTypeAppClass + ASTypeAppClassConstructor + ASTypeAppClassDestructor + ASTypeAppClassCopyConstructor)
	AsTypeAppClassCAK             = ASObjectType(ASTypeAppClass + ASTypeAppClassConstructor + ASTypeAppClassAssignment + ASTypeAppClassCopyConstructor)
	AsTypeAppClassCDAK            = ASObjectType(ASTypeAppClass + ASTypeAppClassConstructor + ASTypeAppClassDestructor + ASTypeAppClassAssignment + ASTypeAppClassCopyConstructor)
	AsTypeAppClassD               = ASObjectType(ASTypeAppClass + ASTypeAppClassDestructor)
	AsTypeAppClassDA              = ASObjectType(ASTypeAppClass + ASTypeAppClassDestructor + ASTypeAppClassAssignment)
	AsTypeAppClassDAK             = ASObjectType(ASTypeAppClass + ASTypeAppClassDestructor + ASTypeAppClassAssignment + ASTypeAppClassCopyConstructor)
	AsTypeAppClassA               = ASObjectType(ASTypeAppClass + ASTypeAppClassAssignment)
	AsTypeAppClassAK              = ASObjectType(ASTypeAppClass + ASTypeAppClassAssignment + ASTypeAppClassCopyConstructor)
	AsTypeAppClassK               = ASObjectType(ASTypeAppClass + ASTypeAppClassCopyConstructor)
	AsTypeAppPrimitive            = ASObjectType(1 << 13)
	AsTypeAppFloat                = ASObjectType(1 << 14)
	AsTypeAppArray                = ASObjectType(1 << 15)
	AsTypeAppClassAllInts         = ASObjectType(1 << 16)
	AsTypeAppClassAllFloats       = ASObjectType(1 << 17)
	AsTypeNoCount                 = ASObjectType(1 << 18)
	AsTypeAppClassAlign8          = ASObjectType(1 << 19)
	AsTypeAppImplicitHandle       = ASObjectType(1 << 20)
	AsTypeAppMaskValidFlags       = ASObjectType(0x1FFFFF)

	//Internal Flags
	AsTypeScriptObject    = ASObjectType(1 << 21)
	AsTypeShared          = ASObjectType(1 << 22)
	AsTypeNoInherit       = ASObjectType(1 << 23)
	AsTypeFuncDev         = ASObjectType(1 << 24)
	AsTypeListPattern     = ASObjectType(1 << 25)
	AsTypeEnum            = ASObjectType(1 << 26)
	AsTypeTemplateSubType = ASObjectType(1 << 27)
	AsTypeTypeDef         = ASObjectType(1 << 28)
	AsTypeAbstract        = ASObjectType(1 << 29)
	AsTypeAppAlign16      = ASObjectType(1 << 30)
)

//Behaviours
type ASBehaviour = uint32

const (
	ASBehaviourConstruct = ASBehaviour(0)
	ASBehaviourListConstruct = ASBehaviour(1)
	ASBehaviourDestruct = ASBehaviour(2)
	ASBehaviourFactory = ASBehaviour(3)
	ASBehaviourAddReference = ASBehaviour(4)
	ASBehaviourRelease = ASBehaviour(5)
	ASBehaviourGetWeakReferenceFlag = ASBehaviour(6)
	ASBehaviourTemplateCallback = ASBehaviour(7)
	ASBehaviourFirstGC = ASBehaviour(8)
	ASBehaviourGetReferenceCount = ASBehaviourFirstGC
	ASBehaviourSetGCFlag = ASBehaviour(9)
	ASBehaviourGetGCFlag = ASBehaviour(10)
	ASBehaviourEnumReferences = ASBehaviour(11)
	ASBehaviourReleaseReferences = ASBehaviour(12)
	ASBehaviourLastGC = ASBehaviourReleaseReferences
	ASBehaviourMax = ASBehaviour(13)
)

//Context States
type ASContextState = uint32

const (
	ASExecutionFinished = ASContextState(0)
	ASExecutionSuspended = ASContextState(1)
	ASExecutionAborted = ASContextState(2)
	ASExecutionException = ASContextState(3)
	ASExecutionPrepared = ASContextState(4)
	ASExecutionUninitialized = ASContextState(5)
	ASExecutionActive = ASContextState(6)
	ASExecutionError = ASContextState(7)
)

//MessageTypes
type ASMessageType = uint32
const (
	ASMsgTypeError = ASMessageType(0)
	ASMsgTypeWarning = ASMessageType(1)
	ASMsgTypeInformation = ASMessageType(2)
)

//Garbage Collector Flags
const (
	ASGCFullCycle      = 1
	ASGCOneStep        = 2
	ASGCDestroyGarbage = 4
	ASGCDetectGarbage  = 0
)

//Token classes
const (
	ASTokenUnknown = iota
	ASTokenKeyword
	ASTokenValue
	ASTokenIdentifier
	ASTokenComment
	ASTokenWhitespace
)

//Type id flags
const (
	ASTypeIdVoid               = 0
	ASTypeIdBool               = 1
	ASTypeIdInt8               = 2
	ASTypeIdInt16              = 3
	ASTypeIdInt32              = 4
	ASTypeIdInt64              = 5
	ASTypeIdUInt8              = 6
	ASTypeIdUInt16             = 7
	ASTypeIdUInt32             = 8
	ASTypeIdUInt64             = 9
	ASTypeIdFloat              = 10
	ASTypeIdDouble             = 11
	ASTypeIdObjectHandle       = 0x40000000
	ASTypeIdHandleToConst      = 0x20000000
	ASTypeIdMaskObject         = 0x1C000000
	ASTypeIdAppObject          = 0x04000000
	ASTypeIdScriptObject       = 0x08000000
	ASTypeIdTemplate           = 0x10000000
	ASTypeIdMaskSequenceNumber = 0x03FFFFFF
)

// Type modifiers
const (
	ASTypeModifierNone = iota
	ASTypeModifierInRef
	ASTypeModifierOutRef
	ASTypeModifierInoutRef
	ASTypeModifierConst
)

// GetModule flags
const (
	ASGetModuleOnlyIfExists = iota
	ASGetModuleCreateIfNotExists
	ASGetModuleAlwaysCreate
)

// Compile flags
const ASCompileAddToModule = 1

//Function types
const (
	ASFunctionDummy     = -1
	ASFunctionSystem    = 0
	ASFunctionScript    = 1
	ASFunctionInterface = 2
	ASFunctionVirtual   = 3
	ASFunctionFuncDef   = 4
	ASFunctionImported  = 5
	ASFunctionDelegate  = 6
)

license: Zlib

repository: Happy-Ferret/go-angelscript

repo_name: Happy-Ferret/go-angelscript


text:
package sdk_test

import (
	"encoding/json"
	"io/ioutil"
	"testing"

	"github.com/grafana-tools/sdk"
)

func Test_Dashboard_CRUD(t *testing.T) {
	var (
		boardLinks []sdk.FoundBoard
		err        error
	)

	shouldSkip(t)

	client := getClient(t)

	var board sdk.Board
	raw, _ := ioutil.ReadFile("testdata/new-empty-dashboard-2.6.json")

	if err = json.Unmarshal(raw, &board); err != nil {
		t.Fatal(err)
	}

	client.DeleteDashboard(board.UpdateSlug())
	if _, err = client.SetDashboard(board, false); err != nil {
		t.Fatal(err)
	}

	if boardLinks, err = client.SearchDashboards("", false); err != nil {
		t.Fatal(err)
	}

	for _, link := range boardLinks {
		_, _, err = client.GetDashboardByUID(link.UID)
		if err != nil {
			t.Fatal(err)
		}

		_, _, err = client.GetDashboardBySlug(link.URI)
		if err != nil {
			t.Fatal(err)
		}
	}
}

repository: haseth/sdk

license_type: permissive

repo_name: haseth/sdk

branch_name: refs/heads/master

extension: go


text:
@article{Kim2020,
 abstract = {Coal burning power plants are a frequent target of regulatory programmes because of their emission of chemicals that are known precursors to the formation of ambient particulate air pollution. Health impact assessments of emissions from coal power plants typically rely on assumed causal relationships between emissions, ambient pollution and health, many of which have never been empirically verified. We offer a novel statistical evaluation of some of these presumed causal relationships, integrating the formality of causal inference methods with repurposed tools from atmospheric science to accommodate the central challenge of long-range pollution transport of emissions from power plants to exposed populations. The statistical approach follows recent work on Bayesian methods for deploying principal stratification and causal mediation analysis in tandem to characterize the extent to which decreased sulphur dioxide emissions from 410 power plants across the USA impact mortality and hospitalization outcomes across Medicare beneficiaries residing across 12370 locations in a manner that is mediated through reductions of ambient fine particulate pollution. The result is the first epidemiological investigation integrating causal inference methodology with direct measurements of coal emissions, pollution transport, ambient pollution and human health in a single analysis, indicating the potential for data science at the intersection of statistics, epidemiology and atmospheric science.},
 author = {Kim, Chanmin and Henneman, Lucas R.F. and Choirat, Christine and Zigler, Corwin M.},
 doi = {10.1111/rssa.12547},
 file = {:Users/lhenneman/Dropbox/Harvard/Papers/Kimetal2020.pdf:pdf},
 issn = {1467985X},
 journal = {Journal of the Royal Statistical Society. Series A: Statistics in Society},
 keywords = {Bayesian causal inference,Health effects,Sulphur dioxide emissions},
 title = {Health effects of power plant emissions through ambient air quality},
 year = {2020}
}

license: MIT

repository: lhenneman/WebsiteHugo

repo_name: lhenneman/WebsiteHugo

extension: bib


text:
list(INSERT WebKit_INCLUDE_DIRECTORIES 0
    "${BLACKBERRY_THIRD_PARTY_DIR}" # For <unicode.h>, which is included from <sys/keycodes.h>.
)

list(APPEND WebKit_INCLUDE_DIRECTORIES
    "${JAVASCRIPTCORE_DIR}/dfg"
    "${WEBCORE_DIR}/bindings/cpp"
    "${WEBCORE_DIR}/fileapi"
    "${WEBCORE_DIR}/history/blackberry"
    "${WEBCORE_DIR}/html/parser" # For HTMLParserIdioms.h
    "${WEBCORE_DIR}/loader/appcache"
    "${WEBCORE_DIR}/platform/blackberry"
    "${WEBCORE_DIR}/platform/graphics/gpu"
    "${WEBCORE_DIR}/platform/graphics/blackberry"
    "${WEBCORE_DIR}/platform/image-encoders"
    "${WEBCORE_DIR}/platform/network/blackberry"
    "${WEBCORE_DIR}/testing/js"
    "${WEBCORE_DIR}/Modules/geolocation"
    "${WEBCORE_DIR}/Modules/indexeddb"
    "${WEBCORE_DIR}/Modules/vibration"
    "${WEBCORE_DIR}/Modules/websockets"
    "${WEBKIT_DIR}/blackberry/Api"
    "${WEBKIT_DIR}/blackberry/WebCoreSupport"
    "${WEBKIT_DIR}/blackberry/WebKitSupport"
    "${CMAKE_SOURCE_DIR}"
)

if (ENABLE_NOTIFICATIONS)
    list(APPEND WebKit_INCLUDE_DIRECTORIES
        "${WEBCORE_DIR}/Modules/notifications"
    )
endif ()

if (NOT PUBLIC_BUILD)
    list(APPEND WebKit_INCLUDE_DIRECTORIES
        # needed for DRT for now
        "${WEBCORE_DIR}/platform/mock"
        "${WEBCORE_DIR}/svg/animation"
        "${WEBCORE_DIR}/workers"
        "${TOOLS_DIR}"
        "${TOOLS_DIR}/DumpRenderTree"
        "${TOOLS_DIR}/DumpRenderTree/blackberry"
    )
endif ()

if (ENABLE_BATTERY_STATUS)
    list(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
    list(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
endif ()

if (ENABLE_NAVIGATOR_CONTENT_UTILS)
  list(APPEND WebKit_INCLUDE_DIRECTORIES
    "${WEBCORE_DIR}/Modules/navigatorcontentutils"
  )
endif ()

if (ENABLE_MEDIA_STREAM)
    list(APPEND WebKit_INCLUDE_DIRECTORIES
        "${WEBCORE_DIR}/Modules/mediastream"
        "${WEBCORE_DIR}/platform/mediastream"
    )
    list(APPEND WebKit_SOURCES
        blackberry/WebCoreSupport/UserMediaClientImpl.cpp
    )
endif ()

add_definitions(-DUSER_PROCESSES)

list(APPEND WebKit_SOURCES
    blackberry/Api/BackingStore.cpp
    blackberry/Api/BlackBerryGlobal.cpp
    blackberry/Api/InRegionScroller.cpp
    blackberry/Api/JavaScriptVariant.cpp
    blackberry/Api/WebAnimation.cpp
    blackberry/Api/WebCookieJar.cpp
    blackberry/Api/WebKitMIMETypeConverter.cpp
    blackberry/Api/WebKitTextCodec.cpp
    blackberry/Api/WebOverlay.cpp
    blackberry/Api/WebOverlayOverride.cpp
    blackberry/Api/WebPage.cpp
    blackberry/Api/WebPageCompositor.cpp
    blackberry/Api/WebPageGroupLoadDeferrer.cpp
    blackberry/Api/WebSettings.cpp
    blackberry/Api/WebViewportArguments.cpp

    blackberry/WebCoreSupport/AutofillManager.cpp
    blackberry/WebCoreSupport/BackForwardListBlackBerry.cpp
    blackberry/WebCoreSupport/CacheClientBlackBerry.cpp
    blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
    blackberry/WebCoreSupport/CredentialManager.cpp
    blackberry/WebCoreSupport/CredentialTransformData.cpp
    blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp
    blackberry/WebCoreSupport/DeviceOrientationClientBlackBerry.cpp
    blackberry/WebCoreSupport/DragClientBlackBerry.cpp
    blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
    blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
    blackberry/WebCoreSupport/FrameNetworkingContextBlackBerry.cpp
    blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp
    blackberry/WebCoreSupport/IconDatabaseClientBlackBerry.cpp
    blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
    blackberry/WebCoreSupport/NavigatorContentUtilsClientBlackBerry.cpp
    blackberry/WebCoreSupport/NetworkInfoClientBlackBerry.cpp
    blackberry/WebCoreSupport/NotificationClientBlackBerry.cpp
    blackberry/WebCoreSupport/PlatformStrategiesBlackBerry.cpp
    blackberry/WebCoreSupport/SuggestionBoxElement.cpp
    blackberry/WebCoreSupport/SuggestionBoxHandler.cpp
    blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp

    blackberry/WebKitSupport/AboutData.cpp
    blackberry/WebKitSupport/BackingStoreClient.cpp
    blackberry/WebKitSupport/BackingStoreTile.cpp
    blackberry/WebKitSupport/BackingStoreVisualizationViewportAccessor.cpp
    blackberry/WebKitSupport/ColorPickerClient.cpp
    blackberry/WebKitSupport/DOMSupport.cpp
    blackberry/WebKitSupport/DatePickerClient.cpp
    blackberry/WebKitSupport/DefaultTapHighlight.cpp
    blackberry/WebKitSupport/FatFingers.cpp
    blackberry/WebKitSupport/FrameLayers.cpp
    blackberry/WebKitSupport/InPageSearchManager.cpp
    blackberry/WebKitSupport/InRegionScrollableArea.cpp
    blackberry/WebKitSupport/InputHandler.cpp
    blackberry/WebKitSupport/InspectorOverlayBlackBerry.cpp
    blackberry/WebKitSupport/NotificationManager.cpp
    blackberry/WebKitSupport/PagePopup.cpp
    blackberry/WebKitSupport/PagePopupClient.cpp
    blackberry/WebKitSupport/ProximityDetector.cpp
    blackberry/WebKitSupport/RenderQueue.cpp
    blackberry/WebKitSupport/SelectPopupClient.cpp
    blackberry/WebKitSupport/SelectionHandler.cpp
    blackberry/WebKitSupport/SelectionOverlay.cpp
    blackberry/WebKitSupport/SpellingHandler.cpp
    blackberry/WebKitSupport/SurfacePool.cpp
    blackberry/WebKitSupport/TouchEventHandler.cpp
    blackberry/WebKitSupport/WebKitThreadViewportAccessor.cpp
)

if (ENABLE_WEBGL)
    add_definitions(-DWTF_USE_OPENGL_ES_2=1)
    list(APPEND WebKit_INCLUDE_DIRECTORIES
        ${OPENGL_INCLUDE_DIR}
        ${THIRDPARTY_DIR}/ANGLE/src
        ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
    )
    list(APPEND WebKit_LIBRARIES
        ${OPENGL_gl_LIBRARY}
    )
endif (ENABLE_WEBGL)

if (NOT PUBLIC_BUILD)
    # DumpRenderTree sources
    list(APPEND WebKit_SOURCES
        ${TOOLS_DIR}/DumpRenderTree/AccessibilityController.cpp
        ${TOOLS_DIR}/DumpRenderTree/AccessibilityTextMarker.cpp
        ${TOOLS_DIR}/DumpRenderTree/AccessibilityUIElement.cpp
        ${TOOLS_DIR}/DumpRenderTree/CyclicRedundancyCheck.cpp
        ${TOOLS_DIR}/DumpRenderTree/GCController.cpp
        ${TOOLS_DIR}/DumpRenderTree/PixelDumpSupport.cpp
        ${TOOLS_DIR}/DumpRenderTree/TestRunner.cpp
        ${TOOLS_DIR}/DumpRenderTree/WorkQueue.cpp

        ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
        ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
        ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTree.cpp
        ${TOOLS_DIR}/DumpRenderTree/blackberry/EventSender.cpp
        ${TOOLS_DIR}/DumpRenderTree/blackberry/GCControllerBlackBerry.cpp
        ${TOOLS_DIR}/DumpRenderTree/blackberry/PNGImageEncoder.cpp
        ${TOOLS_DIR}/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp
        ${TOOLS_DIR}/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
        ${TOOLS_DIR}/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp

        ${WTF_DIR}/wtf/MD5.cpp

        blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
    )
endif ()

set(WebKit_LINK_FLAGS ${BLACKBERRY_LINK_FLAGS})

list(APPEND WebKit_LIBRARIES
    ${CURL_LIBRARY}
    ${FONTCONFIG_LIBRARY}
    ${ICUData_LIBRARY}
    ${ICUI18N_LIBRARY}
    ${ICUUC_LIBRARY}
    ${INTL_LIBRARY}
    ${ITYPE_LIBRARY}
    ${JPEG_LIBRARY}
    ${LEVELDB_LIBRARY}
    ${MMR_LIBRARY}
    ${M_LIBRARY}
    ${OTS_LIBRARY}
    ${PNG_LIBRARY}
    ${SQLITE3_LIBRARY}
    ${WTLE_LIBRARY}
    ${WebKitPlatform_LIBRARY}
    ${XML2_LIBRARY}
    ${XSLT_LIBRARY}
    ${Z_LIBRARY}
    JavaScriptCore
)

if (PROFILING)
    list(APPEND WebKit_LIBRARIES
        ${PROFILING_LIBRARY}
    )
endif ()

if (WTF_USE_ACCELERATED_COMPOSITING)
    list(APPEND WebKit_SOURCES
        blackberry/WebKitSupport/GLES2Context.cpp
    )
    list(APPEND WebKit_INCLUDE_DIRECTORIES
        "${WEBCORE_DIR}/platform/graphics/gles2"
    )
    list(APPEND WebKit_LIBRARIES
        ${EGL_LIBRARY}
        ${GLESv2_LIBRARY}
    )
endif ()

file(GLOB BBWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/blackberry/Api/*.h")

install(FILES ${BBWebKit_HEADERS}
        DESTINATION ../../usr/include/browser/webkit)

if (NOT PUBLIC_BUILD)
    install(FILES ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
            DESTINATION ../../usr/include/browser/webkit)
endif ()

if (ENABLE_VIDEO_TRACK)
    list(APPEND WebKit_INCLUDE_DIRECTORIES
        "${WEBCORE_DIR}/html/track"
    )
endif ()

if (NOT PUBLIC_BUILD)
    # Add the custom target to build the host-side ImageDiff binary.
    # Reuse the Qt version.
    add_custom_target(
        ImageDiff ALL
        WORKING_DIRECTORY ${TOOLS_DIR}/DumpRenderTree/blackberry/
        COMMAND ./build
        DEPENDS ${TOOLS_DIR}/DumpRenderTree/qt/ImageDiff.cpp
        COMMENT "ImageDiff building..."
    )
endif ()

# Generate contents for AboutData.cpp
add_custom_command(
    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
    MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in
    DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl HAVE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
)

add_custom_command(
    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
    MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in
    DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl ENABLE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
)

add_custom_command(
    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
    MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in
    DEPENDS ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl USE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
)

add_custom_target(
    aboutFeatures ALL
    DEPENDS ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
)

repository: burg/timelapse

repo_name: burg/timelapse

branch_name: refs/heads/timelapse

extension: cmake


text:
package main

// ----- ---- --- -- -
// Copyright 2019 Oneiro NA, Inc. All Rights Reserved.
//
// Licensed under the Apache License 2.0 (the "License").  You may not use
// this file except in compliance with the License.  You can obtain a copy
// in the file LICENSE in the source distribution or at
// https://www.apache.org/licenses/LICENSE-2.0.txt
// - -- --- ---- -----

// we expect this to be invoked on OpcodeData
const tmplConstDef = `
// Code generated automatically by "make generate"; DO NOT EDIT.

package main

// ----- ---- --- -- -
// Copyright 2019 Oneiro NA, Inc. All Rights Reserved.
//
// Licensed under the Apache License 2.0 (the "License").  You may not use
// this file except in compliance with the License.  You can obtain a copy
// in the file LICENSE in the source distribution or at
// https://www.apache.org/licenses/LICENSE-2.0.txt
// - -- --- ---- -----

// Predefined constants available to chasm programs.

func predefinedConstants() map[string]string {
	k := map[string]string{
{{range . -}}
		"{{.Name}}": "{{printf "%d" .Value}}",
{{end}}
	}
	return k
}
`

repository: ndau/commands

repo_name: ndau/commands

gha_language: Go


text:
---
---

@inproceedings{weiss2020navigation,
  title={Navigation agents for the visually impaired: A sidewalk simulator and experiments},
  author={Weiss, Martin and Chamorro, Simon and Girgis, Roger and Luck, Margaux and Kahou, Samira E and Cohen, Joseph P and Nowrouzezahrai, Derek and Precup, Doina and Golemo, Florian and Pal, Chris},
  booktitle={Conference on Robot Learning},
  pages={1314--1327},
  year={2020},
  organization={PMLR},
  selected={true},
  bibtex_show={true},
  abbr={CoRL 2019},
}

@inproceedings{rezaee2021motion,
  title={Motion Planning for Autonomous Vehicles in the Presence of Uncertainty Using Reinforcement Learning},
  author={Rezaee, Kasra and Yadmellat, Peyman and Chamorro, Simon},
  booktitle={2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  pages={3506--3511},
  year={2021},
  organization={IEEE},
  selected={true},
  bibtex_show={true},
  abbr={IROS 2021},
}

@inproceedings{chamorro2021neural,
  title={Neural Network Based Lidar Gesture Recognition for Realtime Robot Teleoperation},
  author={Chamorro, Simon and Collier, Jack and Grondin, Fran{\c{c}}ois},
  booktitle={2021 IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR)},
  pages={98--103},
  year={2021},
  organization={IEEE},
  selected={true},
  bibtex_show={true},
  abbr={SSRR 2021},
}

gha_license_id: MIT


text:
require libtinymail.inc

SRC_URI[md5sum] = "de3fd5f8c838ba9c876783d21ebf43bb"
SRC_URI[sha256sum] = "e234d314f0bdfcc54f52111519624fcd3d1ff37a267c39848b5de7a272367976"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD

extension: bb


text:
package handlers

import (
	log "github.com/sirupsen/logrus"

	"github.com/cloudnative-id/community-system/pkg/storage"
	"github.com/go-openapi/runtime/middleware"

	api_model "github.com/cloudnative-id/community-system/gen/models"
	api_meetup "github.com/cloudnative-id/community-system/gen/restapi/operations/meetup"
)

type GetMeetupHandler struct {
	storage storage.Storage
}

func (h *GetMeetupHandler) Handle(params api_meetup.GetMeetupParams) middleware.Responder {
	contextLogger := log.WithFields(log.Fields{
		"handler": "GetMeetupHandler",
	})

	meetup, exist, err := h.storage.GetMeetup(params.MeetupID)
	if !exist {
		contextLogger.Errorf("meetup is not exist")
		return api_meetup.NewGetMeetupNotFound()
	}

	if err != nil {
		contextLogger.Errorf("getting meetup: %s", err)
		return api_meetup.NewGetMeetupDefault(500)
	}

	return api_meetup.NewGetMeetupOK().WithPayload(&api_model.Meetup{
		UUID:            meetup.UUID.String(),
		Country:         meetup.Country,
		City:            meetup.City,
		Location:        meetup.Location,
		Tags:            meetup.Tags,
		Time:            meetup.Time,
		Duration:        meetup.Duration,
		RegistrationURL: meetup.RegistrationURL,
		Image:           meetup.Image,
		Speakers:        meetup.Speakers.ArrayString(),
		Sponsors:        meetup.Sponsors.ArrayString(),
		Status:          meetup.Status,
	})
}

func NewGetMeetupHandler(storage storage.Storage) api_meetup.GetMeetupHandler {
	return &GetMeetupHandler{
		storage: storage,
	}
}

repository: cloudnative-id/community-system

repo_name: cloudnative-id/community-system


text:
require ${PN}.inc

PR = "r1"

SRC_URI = "http://sources.openembedded.org/opie-1.2.4-split_noncore_net_opietooth_blue-pin.tar.bz2;name=split_noncore_net_opietooth_blue-pin"
SRC_URI[split_noncore_net_opietooth_blue-pin.md5sum] = "96857f16bde393f278500ff30e7b8a39"
SRC_URI[split_noncore_net_opietooth_blue-pin.sha256sum] = "f70ec67c6b5db11133376a94f8659b0c318112c84e04f57654d4cb6e36ebf79d"


text:
# Copyright (c) 2019-2020 LG Electronics, Inc.

DESCRIPTION = "Extensible Modelica-based platform for optimization, simulation and analysis of complex dynamic systems."
HOMEPAGE = "https://jmodelica.org/"
SECTION = "devel"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=feb42903281464837bc0c9a861b1e7a1"

SRC_URI = "https://jmodelica.org/fmil/FMILibrary-${PV}-src.zip"
SRC_URI[md5sum] = "53d8edd7442c31bcd3fb56477e574845"
SRC_URI[sha256sum] = "4cc21f9e2c4114a6f4e303f82ca897ec9aa1eb6f7f09fef85979ea5fca309d9a"

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

inherit cmake

# cannot run runtime tests on host while cross-compiling
# /bin/sh: 1: /jenkins/mjansa/build-ros-thud-mcf-herb/artifacts/BUILD-webos-dashing-thud.mcf/work/raspberrypi3-webos-linux-gnueabi/fmilibrary-vendor/0.1.1-1-r0/build/FMILibraryProject-prefix/src/FMILibraryProject-build/compress_test_fmu_zip: Exec format error
EXTRA_OECMAKE += "-DFMILIB_BUILD_TESTS=OFF"

# Don't want the doxygen-native dependency
EXTRA_OECMAKE += "-DFMILIB_GENERATE_DOXYGEN_DOC=OFF"

# The default is in WORKDIR ${FMILibrary_BINARY_DIR}/../install
EXTRA_OECMAKE += "-DFMILIB_INSTALL_PREFIX=${prefix}"

do_install_append() {
    install -d ${D}${datadir}/${PN}/doc
    mv ${D}${prefix}/doc ${D}${datadir}/${PN}/doc
}

# ERROR: fmilibrary-2.0.3-r0 do_package_qa: QA Issue: -dev package contains non-symlink .so: fmilibrary-dev path '/work/raspberrypi3-webos-linux-gnueabi/fmilibrary/2.0.3-r0/packages-split/fmilibrary-dev/usr/lib/libfmilib_shared.so' [dev-elf]
FILES_SOLIBSDEV = ""
FILES_${PN} += " \
    ${libdir}/lib*${SOLIBSDEV} \
"

# it generates duplicate rules for ExpatEx/libexpat.a and newer ninja-1.9.0 fails because of that
# NOTE: VERBOSE=1 cmake --build fmilibrary/2.0.3-r0/build --target all -- -j 20
# ninja: error: build.ninja:1652: multiple rules generate ExpatEx/libexpat.a [-w dupbuild=err]
EXTRA_OECMAKE_BUILD_append_task-compile = "-w dupbuild=warn"
EXTRA_OECMAKE_BUILD_append_task-install = "-w dupbuild=warn"

repository: herb-kuta-lge/meta-ros

repo_name: herb-kuta-lge/meta-ros

branch_name: refs/heads/master-draft

gha_language: BitBake


text:
package flow

import (
	"bytes"
	"fmt"
	"go/ast"
	"go/token"
	"go/types"
	"reflect"
	"sort"
	"strings"
	"text/template"

	"github.com/yssk22/go/generator"
	"github.com/yssk22/go/generator/enum"
	"github.com/yssk22/go/x/xerrors"
	"github.com/yssk22/go/x/xstrings"
)

const (
	signature = "flow"
)

var annotation = generator.NewAnnotationSymbol("flow")

// Generator is a generator for Flow types
type Generator struct {
	Options *Options
}

// GetAnnotationSymbol implements generator.Generator#AnnotationSymbol
func (*Generator) GetAnnotationSymbol() generator.AnnotationSymbol {
	return annotation
}

// GetFormatter implements generator.Generator#GetFormatter
func (*Generator) GetFormatter() generator.Formatter {
	return generator.JavaScriptFormatter
}

// NewGenerator returns a new instance of Generator
func NewGenerator(opts *Options) *Generator {
	return &Generator{
		Options: opts,
	}
}

// Run implementes generator.Generator#Run
func (g *Generator) Run(pkg *generator.PackageInfo, nodes []*generator.AnnotatedNode) ([]*generator.Result, error) {
	dep := generator.NewDependency()
	b := &bindings{
		Package:    pkg.Name,
		Dependency: dep,
	}
	enumValues := make(map[string]*enum.Spec)
	specs, err := enum.CollectSpecs(pkg, nodes)
	if err != nil {
		return nil, err
	}
	for _, s := range specs {
		enumValues[s.EnumName] = s
	}
	err = b.collectSpecs(pkg, nodes, enumValues)
	if err != nil {
		return nil, err
	}
	if len(b.Specs) == 0 {
		return nil, nil
	}
	var buff bytes.Buffer
	t := template.Must(template.New("template").Funcs(templateHelper).Parse(templateFile))
	if err = t.Execute(&buff, b); err != nil {
		return nil, xerrors.Wrap(err, "failed to run a template")
	}
	result := []*generator.Result{
		{
			Filename: "GoTypes.js",
			Source:   buff.String(),
		},
	}
	return result, nil
}

func (b *bindings) collectSpecs(pkg *generator.PackageInfo, nodes []*generator.AnnotatedNode, enumSpecs map[string]*enum.Spec) error {
	var specs []*Spec
	var errors []error
	for _, n := range nodes {
		spec, err := b.parseAnnotatedNode(pkg, n, enumSpecs)
		if err != nil {
			errors = append(errors, err)
		} else {
			specs = append(specs, spec)
		}
	}
	if len(errors) > 0 {
		return xerrors.MultiError(errors)
	}

	// sort
	sort.Slice(specs, func(i, j int) bool {
		a, b := specs[i], specs[j]
		return strings.Compare(string(a.TypeName), string(b.TypeName)) < 0
	})
	b.Specs = specs
	return nil
}

func (b *bindings) parseAnnotatedNode(pkg *generator.PackageInfo, n *generator.AnnotatedNode, enumSpecs map[string]*enum.Spec) (*Spec, error) {
	var spec Spec
	node, ok := n.Node.(*ast.GenDecl)
	if !ok {
		return nil, n.GenError(fmt.Errorf("@flow is used on non type declaration"), nil)
	}
	if node.Tok != token.TYPE {
		return nil, n.GenError(fmt.Errorf("@flow is used on non type declaration"), nil)
	}
	typeSpec := node.Specs[0].(*ast.TypeSpec)
	t := pkg.TypeInfo.Defs[typeSpec.Name]
	spec.TypeName = t.Name()
	if enumSpec, ok := enumSpecs[spec.TypeName]; ok {
		spec.FlowType = &FlowTypeEnum{
			spec: enumSpec,
		}
		return &spec, nil
	}
	switch ut := t.Type().Underlying().(type) {
	case *types.Struct:
		o := &FlowTypeObject{}
		l := ut.NumFields()
		for i := 0; i < l; i++ {
			f := ut.Field(i)
			if !f.Exported() {
				continue
			}
			ft, err := b.getFlowType(f.Type())
			if err != nil {
				return nil, n.GenError(
					xerrors.Wrap(err, "cannot resolve flowtype for the field %s - ", f.Name()),
					nil,
				)
			}
			fieldName := f.Name()
			omitEmpty := false
			tags := generator.ParseTag(ut.Tag(i))
			if jsonName, err := tags.Get("json"); err == nil {
				jsonTags := xstrings.SplitAndTrim(jsonName.(string), ",")
				l := len(jsonTags)
				fieldName = jsonTags[0]
				if l == 2 {
					omitEmpty = jsonTags[1] == "omitempty"
				}
				if fieldName == "-" {
					continue
				}
			}
			o.Fields = append(o.Fields, FlowTypeObjectField{
				Name:      fieldName,
				Type:      ft,
				OmitEmpty: omitEmpty,
			})
		}
		spec.FlowType = o
	case *types.Basic:
		o, err := b.getFlowTypeFromBasic(ut)
		if err != nil {
			return nil, n.GenError(
				xerrors.Wrap(err, "cannot resolve flowtype: %s", ut.Name()),
				nil,
			)
		}
		spec.FlowType = o
	default:
		return nil, fmt.Errorf("unsupported type: %s", reflect.TypeOf(ut))
	}
	return &spec, nil
}

func (b *bindings) getFlowType(t types.Type) (FlowType, error) {
	switch tt := t.(type) {
	case *types.Basic:
		return b.getFlowTypeFromBasic(tt)
	case *types.Pointer:
		elem, err := b.getFlowType(tt.Elem())
		if err != nil {
			return nil, err
		}
		return &FlowTypeMaybe{
			Elem: elem,
		}, nil
	case *types.Struct:
	case *types.Named:
		return b.getFlowTypeFromNamed(tt)
	}
	return nil, fmt.Errorf("unsupported")
}

func (b *bindings) getFlowTypeFromBasic(t *types.Basic) (FlowType, error) {
	switch t.Kind() {
	case types.Bool:
		return FlowTypeBool, nil
	case types.Int, types.Int8, types.Int16, types.Int32, types.Int64:
		return FlowTypeNumber, nil
	case types.Uint, types.Uint8, types.Uint16, types.Uint32, types.Uint64:
		return FlowTypeNumber, nil
	case types.Float32, types.Float64:
		return FlowTypeNumber, nil
	case types.String:
		return FlowTypeString, nil
	}
	return nil, fmt.Errorf("unsuppored basic type: %v", b)
}

func (b *bindings) getFlowTypeFromNamed(n *types.Named) (FlowType, error) {
	s := n.String()
	switch s {
	case "time.Time":
		return FlowTypeDate, nil
	}
	importPath := n.Obj().Pkg().Path()
	if importPath == "." {
		return &FlowTypeNamed{
			Name: n.Obj().Name(),
		}, nil
	}
	switch importPath {
	case "github.com/yssk22/go/types":
		importName := b.Dependency.Add("types")
		return &FlowTypeNamed{
			Name:       n.Obj().Name(),
			ImportPath: "types",
			ImportName: importName,
		}, nil
	}
	// TODO: we need to check import path and import name if named type n is defiend in the different package.
	return &FlowTypeNamed{
		Name: n.Obj().Name(),
	}, nil
}


text:
file(REMOVE_RECURSE
  "CMakeFiles/TelloPro.dir/takeoff.cpp.o"
  "CMakeFiles/TelloPro.dir/land.cpp.o"
  "CMakeFiles/TelloPro.dir/up.cpp.o"
  "CMakeFiles/TelloPro.dir/python_interface.cpp.o"
  "../bin/TelloPro.pdb"
  "../bin/TelloPro.so"
)

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


text:
//https://www.hackerrank.com/challenges/compare-the-triplets

package main

import "fmt"

func main() {
	a := make([]int, 3)
	b := make([]int, 3)
	var sa, sb int
	for i := 0; i < len(a); i++ {
		fmt.Scan(&a[i])
	}
	for i := 0; i < len(b); i++ {
		fmt.Scan(&b[i])
	}

	for i := range a {
		if a[i] > b[i] {
			sa++
		} else if b[i] > a[i] {
			sb++
		}
	}
	fmt.Println(sa, sb)

}


text:
// +build windows

package socket

import (
	"fmt"
	"log"
	"net"
	"os/user"

	"github.com/Microsoft/go-winio"
)

func makeSocket(transportAddress string, groupShared bool) (net.Listener, error) {
	// Gets current user's SID
	usr, err := user.Current()
	if err != nil {
		log.Printf("Error getting user SID: %s\n", err)
		return nil, err
	}

	// Configures pipe security descriptor to allow full control for system, administrators and current user.
	// Security Descriptor String Format
	// https://msdn.microsoft.com/en-us/library/windows/desktop/aa379570(v=vs.85).aspx
	c := winio.PipeConfig{
		SecurityDescriptor: fmt.Sprintf("O:%s", usr.Uid) +
			fmt.Sprintf("G:%s", usr.Uid) +
			fmt.Sprintf("D:P(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;%s)", usr.Uid),
	}

	return winio.ListenPipe(transportAddress, &c)
}

branch_name: refs/heads/Master


text:
package shell

import (
	"fmt"
	"time"

	"github.com/d3ce1t/areyouin-server/utils"
)

// list_sessions
type listSessionsCmd struct {
}

func (c *listSessionsCmd) Exec(shell *Shell, args []string) {

	activeSessions, err := shell.model.Accounts.GetActiveSessions(time.Now())
	manageShellError(err)

	for _, activeSession := range activeSessions {
		fmt.Fprintf(shell, "- %v %v\n", activeSession.UserID, utils.MillisToTimeUTC(activeSession.LastTime))
	}
}


text:
@article{10.1371/journal.pone.0217316,
    author = {Choi, Dongjin AND Jang, Jun-Gi AND Kang, U},
    journal = {PLOS ONE},
    publisher = {Public Library of Science},
    title = {S3CMTF: Fast, accurate, and scalable method for incomplete coupled matrix-tensor factorization},
    year = {2019},
    month = {06},
    volume = {14},
    pages = {1-20},
    number = {6},
}


text:
// Copyright 2015 Bret Jordan, All rights reserved.
//
// Use of this source code is governed by an Apache 2.0 license
// that can be found in the LICENSE file in the root of the source
// tree.

package lib

import (
	"encoding/json"
	"github.com/freetaxii/libtaxii/messages/collectionMessage"
	"github.com/freetaxii/libtaxii/messages/discoveryMessage"
	"github.com/freetaxii/libtaxii/messages/pollMessage"
	"github.com/freetaxii/libtaxii/messages/statusMessage"
	"log"
)

type ResponseMessageType struct {
	MessageType string `json:"message_type,omitempty"`
}

// --------------------------------------------------
// Process Response Data from Server
// --------------------------------------------------

func ProcessResponse(requestId, requestType string, rawResponseData []byte) {

	// --------------------------------------------------
	// Figure out which TAXII message
	// --------------------------------------------------
	// First thing we need to do is figure out what type of message we got back

	var err error

	//taxiiMessage := make(map[string]interface{})
	var taxiiMessage ResponseMessageType

	// Unmarshal the JSON to the map we just defined
	err = json.Unmarshal(rawResponseData, &taxiiMessage)
	if err != nil {
		log.Fatalln("Bad Response, unable to decode JSON message type")
	}

	if DebugLevel >= 1 {
		log.Println("DEBUG-1: Found a JSON message type of", taxiiMessage.MessageType)
	}

	// --------------------------------------------------
	// Process the TAXII message
	// --------------------------------------------------
	// Now that we know what type of message we got back, lets process it

	if taxiiMessage.MessageType == "discovery_response" {
		var responseObject discoveryMessage.DiscoveryResponseMessageType
		err = json.Unmarshal(rawResponseData, &responseObject)
		if err != nil {
			log.Fatalln("Bad Response, unable to decode JSON message contents")
		}
		printDiscoveryResponse(requestId, requestType, responseObject)

	} else if taxiiMessage.MessageType == "status_message" {
		var statusObject statusMessage.StatusMessageType
		err = json.Unmarshal(rawResponseData, &statusObject)
		if err != nil {
			log.Fatalln("Bad Response, unable to decode JSON message contents")
		}
		printStatusMessage(requestId, requestType, statusObject)

	} else if taxiiMessage.MessageType == "collection_information_response" {
		var responseObject collectionMessage.CollectionResponseMessageType
		err = json.Unmarshal(rawResponseData, &responseObject)
		if err != nil {
			log.Fatalln("Bad Response, unable to decode JSON message contents")
		}
		printCollectionResponse(requestId, requestType, responseObject)

	} else if taxiiMessage.MessageType == "poll_response" {
		var responseObject pollMessage.PollResponseMessageType
		err = json.Unmarshal(rawResponseData, &responseObject)
		if err != nil {
			log.Fatalln("Bad Response, unable to decode JSON message contents")
		}
		printPollResponse(requestId, requestType, responseObject)

	} else {
		log.Fatalln("Server did not respond with a valid TAXII Message, message type was", taxiiMessage.MessageType)
	}
}

repository: alakahakai/freetaxii-client

repo_name: alakahakai/freetaxii-client


text:
package stick

// Map represents a simple map. It provides methods to marshal and unmarshal
// concrete types to and from the map using JSON or BSON coding.
type Map map[string]interface{}

// MustMap will marshal the specified object to a map and panic on any error.
func MustMap(from interface{}, coding Coding) Map {
	var m Map
	m.MustMarshal(from, coding)
	return m
}

// Unmarshal will unmarshal the map to the specified value. If the value already
// contains data, only fields present in the map are overwritten.
func (m *Map) Unmarshal(to interface{}, coding Coding) error {
	return coding.Transfer(*m, to)
}

// MustUnmarshal will unmarshal and panic on error.
func (m *Map) MustUnmarshal(to interface{}, coding Coding) {
	err := m.Unmarshal(to, coding)
	if err != nil {
		panic(err)
	}
}

// Marshal will marshal the specified value to the map. If the map already
// contains data, only fields present in the value are overwritten.
func (m *Map) Marshal(from interface{}, coding Coding) error {
	return coding.Transfer(from, m)
}

// MustMarshal will marshal and panic on error.
func (m *Map) MustMarshal(from interface{}, coding Coding) {
	err := m.Marshal(from, coding)
	if err != nil {
		panic(err)
	}
}

// Flat will return a flattened map by separator.
func (m *Map) Flat(separator string) Map {
	// prepare
	ret := Map{}

	// flatten maps
	for key, value := range *m {
		switch value := value.(type) {
		case Map:
			f := value.Flat(separator)
			for k, v := range f {
				ret[key+separator+k] = v
			}
		case map[string]interface{}:
			mm := Map(value)
			f := mm.Flat(separator)
			for k, v := range f {
				ret[key+separator+k] = v
			}
		default:
			ret[key] = value
		}
	}

	return ret
}


text:
REPLACE_STUBS = "0"

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

ALLOW_EMPTY_${PN} = "1"
PRIVATE_LIBS = "libcuda.so.1"

BBCLASSEXTEND = "native nativesdk"

repository: pixellon/meta-tegra

repo_name: pixellon/meta-tegra


text:
package cmd

import (
	"fmt"

	"github.com/JayceChant/drivel/common/global"
	"github.com/spf13/cobra"
)

// versionCmd represents the version command
var versionCmd = &cobra.Command{
	Use:   "version",
	Short: "Print the version of drivel",
	Long:  `Print the version of drivel.`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Printf("%s v%s\n", cmd.Parent().Name(), global.CurrentVersion)
	},
}

func init() {
	rootCmd.AddCommand(versionCmd)
}

repository: JayceChant/drivel

repo_name: JayceChant/drivel


text:
package cacheutil

import (
	"balansir/internal/logutil"
	"errors"
	"sync"
	"time"
)

//Shard ...
type Shard struct {
	Hashmap     map[uint64]shardItem
	Items       map[int][]byte
	Tail        int
	mux         sync.RWMutex
	Size        int
	CurrentSize int
	Policy      *Meta
}

type shardItem struct {
	Index  int
	Length int
	TTL    int64
}

//CreateShard ...
func CreateShard(size int, CachePolicy string) *Shard {
	s := &Shard{
		Hashmap:     make(map[uint64]shardItem),
		Items:       make(map[int][]byte),
		Tail:        0,
		Size:        size,
		CurrentSize: 0,
		Policy:      NewMeta(CachePolicy),
	}

	return s
}

func (s *Shard) set(hashedKey uint64, value []byte, TTL string) {
	index := s.push(value)
	duration := getDuration(TTL)
	ttl := time.Now().Add(duration).Unix()

	s.Hashmap[hashedKey] = shardItem{Index: index, Length: len(value), TTL: ttl}
	s.Policy.push(index, hashedKey, TTL)
}

func (s *Shard) push(value []byte) int {
	dataLen := len(value)
	index := s.Tail
	s.save(value, dataLen, index)
	return index
}

func (s *Shard) save(value []byte, valueSize int, index int) {
	s.Items[index] = value

	s.Tail++
	s.CurrentSize += valueSize
}

func (s *Shard) get(hashedKey uint64) ([]byte, error) {
	s.mux.RLock()
	defer s.mux.RUnlock()

	item, ok := s.Hashmap[hashedKey]
	if !ok {
		return nil, errors.New("key not found")
	}

	value := s.Items[item.Index]
	return value, nil
}

func (s *Shard) delete(keyIndex uint64, itemIndex int, valueSize int) {
	delete(s.Hashmap, keyIndex)
	delete(s.Items, itemIndex)

	s.Policy.mux.Lock()
	delete(s.Policy.HashMap, keyIndex)
	s.Policy.mux.Unlock()

	s.CurrentSize -= valueSize
}

func (s *Shard) update(timestamp int64, updater *Updater) {
	s.mux.Lock()
	defer s.mux.Unlock()
	if len(s.Hashmap) <= 0 {
		return
	}

	for keyIndex := range s.Hashmap {
		ttl := s.Hashmap[keyIndex].TTL

		if s.Policy.TimeBased() {
			ttl = s.Policy.HashMap[keyIndex].Value
		}

		if timestamp <= ttl {
			return
		}

		s.delete(keyIndex, s.Hashmap[keyIndex].Index, s.Hashmap[keyIndex].Length)

		cluster := GetCluster()
		cluster.backupManager.Hit()

		if cluster.backgroundUpdate && updater != nil {
			urlString, err := updater.keyStorage.GetInitialKey(keyIndex)
			if err != nil {
				logutil.Warning(err)
				continue
			}

			err = updater.InvalidateCachedResponse(urlString, &s.mux)
			if err != nil {
				logutil.Error(err)
			}
		}
	}
}

func (s *Shard) retryEvict(pendingValueSize int) error {
	itemIndex, keyIndex, err := s.Policy.evict()
	if err != nil {
		return err
	}

	s.delete(keyIndex, itemIndex, s.Hashmap[keyIndex].Length)

	if s.Size-s.CurrentSize <= pendingValueSize {
		if err := s.retryEvict(pendingValueSize); err != nil {
			logutil.Warning(err)
		}
	}

	return nil
}

func (s *Shard) evict(pendingValueSize int) error {
	itemIndex, keyIndex, err := s.Policy.evict()
	if err != nil {
		return err
	}

	s.delete(keyIndex, itemIndex, s.Hashmap[keyIndex].Length)

	if s.Size-s.CurrentSize <= pendingValueSize {
		if err := s.retryEvict(pendingValueSize); err != nil {
			logutil.Warning(err)
		}
	}

	return nil
}

repository: pijng/balansir

repo_name: pijng/balansir


text:
// Copyright (c) 2016 Uber Technologies, Inc.
//
// 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.

package storage

import (
	"sync"
	"testing"
	"time"

	"github.com/m3db/m3db/context"

	"github.com/golang/mock/gomock"
	"github.com/stretchr/testify/require"
)

func TestTickManagerTickNormalFlow(t *testing.T) {
	ctrl := gomock.NewController(t)
	defer ctrl.Finish()

	d := time.Minute
	opts := testDatabaseOptions()
	c := context.NewCancellable()

	namespace := NewMockdatabaseNamespace(ctrl)
	namespace.EXPECT().NumSeries().Return(int64(10))
	namespace.EXPECT().Tick(c, d)
	db := newMockdatabase(ctrl, namespace)

	tm := newTickManager(db, opts).(*tickManager)
	tm.c = c
	tm.sleepFn = func(time.Duration) {}

	require.NoError(t, tm.Tick(d, noForce))
	require.Equal(t, 1, len(tm.tokenCh))
}

func TestTickManagerTickCancelled(t *testing.T) {
	ctrl := gomock.NewController(t)
	defer ctrl.Finish()

	var wg sync.WaitGroup
	ch1 := make(chan struct{})
	ch2 := make(chan struct{})
	d := time.Minute
	opts := testDatabaseOptions()
	c := context.NewCancellable()

	namespace := NewMockdatabaseNamespace(ctrl)
	namespace.EXPECT().NumSeries().Return(int64(10))
	namespace.EXPECT().Tick(c, d).Do(func(context.Cancellable, time.Duration) {
		ch1 <- struct{}{}
		<-ch2
	})
	db := newMockdatabase(ctrl, namespace)

	tm := newTickManager(db, opts).(*tickManager)
	tm.c = c
	tm.sleepFn = func(time.Duration) {}

	wg.Add(1)
	go func() {
		defer wg.Done()

		require.Equal(t, errTickCancelled, tm.Tick(d, noForce))
		require.Equal(t, 1, len(tm.tokenCh))
	}()

	// Wait for tick to start
	<-ch1
	c.Cancel()
	ch2 <- struct{}{}
	wg.Wait()
}

func TestTickManagerNonForcedTickDuringOngoingTick(t *testing.T) {
	ctrl := gomock.NewController(t)
	defer ctrl.Finish()

	var wg sync.WaitGroup
	ch1 := make(chan struct{})
	ch2 := make(chan struct{})
	d := time.Minute
	opts := testDatabaseOptions()
	c := context.NewCancellable()

	namespace := NewMockdatabaseNamespace(ctrl)
	namespace.EXPECT().NumSeries().Return(int64(10))
	namespace.EXPECT().Tick(c, d).Do(func(context.Cancellable, time.Duration) {
		ch1 <- struct{}{}
		<-ch2
	})
	db := newMockdatabase(ctrl, namespace)

	tm := newTickManager(db, opts).(*tickManager)
	tm.c = c
	tm.sleepFn = func(time.Duration) {}

	wg.Add(1)
	go func() {
		defer wg.Done()

		require.NoError(t, tm.Tick(d, noForce))
	}()

	// Wait for tick to start
	<-ch1
	require.Equal(t, errTickInProgress, tm.Tick(d, noForce))

	ch2 <- struct{}{}
	wg.Wait()

	require.Equal(t, 1, len(tm.tokenCh))
}

func TestTickManagerForcedTickDuringOngoingTick(t *testing.T) {
	ctrl := gomock.NewController(t)
	defer ctrl.Finish()

	var wg sync.WaitGroup
	ch1 := make(chan struct{})
	ch2 := make(chan struct{})
	d := time.Minute
	opts := testDatabaseOptions()
	c := context.NewCancellable()

	namespace := NewMockdatabaseNamespace(ctrl)
	gomock.InOrder(
		namespace.EXPECT().NumSeries().Return(int64(10)),
		namespace.EXPECT().Tick(c, d).Do(func(context.Cancellable, time.Duration) {
			ch1 <- struct{}{}
			<-ch2
		}),
		namespace.EXPECT().NumSeries().Return(int64(10)),
		namespace.EXPECT().Tick(c, d),
	)
	db := newMockdatabase(ctrl, namespace)

	tm := newTickManager(db, opts).(*tickManager)
	tm.c = c
	tm.sleepFn = func(time.Duration) {}

	wg.Add(3)
	go func() {
		defer wg.Done()

		require.Equal(t, errTickCancelled, tm.Tick(d, noForce))
	}()

	go func() {
		defer wg.Done()

		// Wait for tick to start
		<-ch1
		require.NoError(t, tm.Tick(d, force))
	}()

	go func() {
		defer wg.Done()

		for !c.IsCancelled() {
		}
		ch2 <- struct{}{}
	}()

	wg.Wait()
	require.Equal(t, 1, len(tm.tokenCh))
}


text:
function(clone_source src dst)
  add_custom_command(
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${dst}
    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${CMAKE_CURRENT_BINARY_DIR}/${dst}
    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${src}
    COMMENT "Clone ${src} to ${dst}"
    )
endfunction()

function(dummy_install target_name lib_name)
  install(CODE "MESSAGE(\"${target_name} can only be built with ${lib_name}.\")")
endfunction()

macro(get_sources_and_options _sources _option_list _option_name)
  set( ${_sources} )
  set( ${_option_list} )
  set( _found_options False)
  foreach(arg ${ARGN})
    if ("x${arg}" STREQUAL "x${_option_name}")
      set (_found_options True)
    else()
      if (_found_options)
        list(APPEND ${_option_list} ${arg})
      else()
        list(APPEND ${_sources} ${arg})
      endif()
    endif()
  endforeach()
endmacro()

# MACRO picks correct compiler flags. For example
# select_compiler_flags(cxx_flags
#    GNU "-std=c++11 -mnative -Wall -Werror"
#    Intel "-std=c++11 -axavx,core-avx2"
#    CLANG "-std=c++11 -Weverything"
#    PGI "-std=c++11"
# )
macro(select_compiler_flags _flags)
  set( ${_flags} )

  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    set(_compiler "GNU")
  elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    set(_compiler "CLANG")
  elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
    set(_compiler "CLANG")
  elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
    set(_compiler "Intel")
  elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    set(_compiler "MSCV")
  elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
    set(_compiler "PGI")
  endif()

  set (_found_compiler False)
  foreach(arg ${ARGN})
    if ("x${arg}" STREQUAL "x${_compiler}")
      set(_found_compiler True)
    else()
      if (_found_compiler)
        set(${_flags} ${arg})
        set(_found_compiler False)
      endif()
    endif()
  endforeach()
endmacro()

branch_name: refs/heads/main


text:
package opslevel

import (
	"fmt"

	"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
	"github.com/opslevel/opslevel-go"
)

func resourceServiceRepository() *schema.Resource {
	return &schema.Resource{
		Description: "Manages a service repository",
		Create:      wrap(resourceServiceRepositoryCreate),
		Read:        wrap(resourceServiceRepositoryRead),
		Update:      wrap(resourceServiceRepositoryUpdate),
		Delete:      wrap(resourceServiceRepositoryDelete),
		Importer: &schema.ResourceImporter{
			State: schema.ImportStatePassthrough,
		},
		Schema: map[string]*schema.Schema{
			"last_updated": {
				Type:     schema.TypeString,
				Optional: true,
				Computed: true,
			},
			"service": {
				Type:        schema.TypeString,
				Description: "The id of the service that this will be added to.",
				ForceNew:    true,
				Optional:    true,
			},
			"service_alias": {
				Type:        schema.TypeString,
				Description: "The alias of the service that this will be added to.",
				ForceNew:    true,
				Optional:    true,
			},
			"repository": {
				Type:        schema.TypeString,
				Description: "The id of the service that this will be added to.",
				ForceNew:    true,
				Optional:    true,
			},
			"repository_alias": {
				Type:        schema.TypeString,
				Description: "The alias of the service that this will be added to.",
				ForceNew:    true,
				Optional:    true,
			},
			"name": {
				Type:        schema.TypeString,
				Description: "The name displayed in the UI for the service repository.",
				ForceNew:    false,
				Optional:    true,
			},
			"base_directory": {
				Type:        schema.TypeString,
				Description: "The directory in the repository containing opslevel.yml.",
				ForceNew:    false,
				Optional:    true,
			},
		},
	}
}

func resourceServiceRepositoryCreate(d *schema.ResourceData, client *opslevel.Client) error {
	service, err := findService("service_alias", "service", d, client)
	if err != nil {
		return err
	}
	repository, err := findRepository("repository_alias", "repository", d, client)
	if err != nil {
		return err
	}

	input := opslevel.ServiceRepositoryCreateInput{
		Service:    opslevel.IdentifierInput{Id: service.Id},
		Repository: opslevel.IdentifierInput{Id: repository.Id},

		DisplayName:   d.Get("name").(string),
		BaseDirectory: d.Get("base_directory").(string),
	}
	resource, err := client.CreateServiceRepository(input)
	if err != nil {
		return err
	}
	d.SetId(resource.Id.(string))

	if err := d.Set("name", resource.DisplayName); err != nil {
		return err
	}
	if err := d.Set("base_directory", resource.BaseDirectory); err != nil {
		return err
	}

	return nil
}

func resourceServiceRepositoryRead(d *schema.ResourceData, client *opslevel.Client) error {
	service, err := findService("service_alias", "service", d, client)
	if err != nil {
		return err
	}

	id := d.Id()
	var resource *opslevel.ServiceRepository
	for _, edge := range service.Repositories.Edges {
		for _, repository := range edge.ServiceRepositories {
			if repository.Id == id {
				resource = &repository
				break
			}
		}
		if resource != nil {
			break
		}
	}
	if resource == nil {
		return fmt.Errorf("unable to find service repository with id '%s' on service '%s'", id, service.Aliases[0])
	}

	if err := d.Set("name", resource.DisplayName); err != nil {
		return err
	}
	if err := d.Set("base_directory", resource.BaseDirectory); err != nil {
		return err
	}

	return nil
}

func resourceServiceRepositoryUpdate(d *schema.ResourceData, client *opslevel.Client) error {
	input := opslevel.ServiceRepositoryUpdateInput{
		Id: d.Id(),
	}

	if d.HasChange("name") {
		input.DisplayName = d.Get("name").(string)
	}
	if d.HasChange("base_directory") {
		input.BaseDirectory = d.Get("base_directory").(string)
	}

	resource, err := client.UpdateServiceRepository(input)
	if err != nil {
		return err
	}
	d.Set("last_updated", timeLastUpdated())

	if err := d.Set("name", resource.DisplayName); err != nil {
		return err
	}
	if err := d.Set("base_directory", resource.BaseDirectory); err != nil {
		return err
	}
	return nil
}

func resourceServiceRepositoryDelete(d *schema.ResourceData, client *opslevel.Client) error {
	id := d.Id()
	err := client.DeleteServiceRepository(id)
	if err != nil {
		return err
	}
	d.SetId("")
	return nil
}

repository: lboynton/terraform-provider-opslevel

repo_name: lboynton/terraform-provider-opslevel


text:
// Copyright 2018 ETH Zurich
//
// 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 main

import (
	"bufio"
	"fmt"
	"net"
	"os"
	"strings"

	"github.com/scionproto/scion/go/lib/addr"
	"github.com/scionproto/scion/go/lib/common"
	"github.com/scionproto/scion/go/lib/integration"
	"github.com/scionproto/scion/go/lib/log"
	"github.com/scionproto/scion/go/lib/snet"
)

var (
	name    = "sig_ping_acceptance"
	cmd     = "ping"
	iaIPMap = make(map[addr.IA]addr.HostIPv4)
)

func main() {
	os.Exit(realMain())
}

var sigAddr integration.HostAddr = func(ia addr.IA) snet.Addr {
	return snet.Addr{Host: &addr.AppAddr{L3: iaIPMap[ia]}, IA: ia}
}

func realMain() int {
	if err := integration.Init(name); err != nil {
		fmt.Fprintf(os.Stderr, "Failed to init: %s\n", err)
		return 1
	}
	defer log.LogPanicAndExit()
	defer log.Flush()
	if !*integration.Docker {
		log.Crit(fmt.Sprintf("Can only run %s test with docker!", name))
		return 1
	}
	if err := readTestingConf(); err != nil {
		log.Crit(fmt.Sprintf("Error reading testing conf: %s", err))
		return 1
	}
	args := []string{cmd, "-c", "4", "-O", integration.DstHostReplace}
	in := integration.NewBinaryIntegration(name, "./integration/bin_wrapper.sh", args, nil)
	err := integration.RunUnaryTests(in, integration.IAPairs(sigAddr),
		integration.DefaultRunTimeout)
	if err != nil {
		fmt.Fprintf(os.Stderr, "Failed to run tests: %s\n", err)
		return 1
	}
	return 0
}

func readTestingConf() error {
	conf := "gen/sig-testing.conf"
	file, err := os.Open(conf)
	if err != nil {
		return err
	}
	defer file.Close()
	scanner := bufio.NewScanner(file)
	for scanner.Scan() {
		line := scanner.Text()
		parts := strings.Split(line, " ")
		if len(parts) == 2 {
			ia, err := addr.IAFromString(parts[0])
			if err != nil {
				return err
			}
			iaIPMap[ia] = addr.HostIPv4(net.ParseIP(parts[1]))
		} else {
			return common.NewBasicError("Bad line format", nil, "line", line)
		}
	}
	return nil
}


text:
/*
Copyright © 2021 Damien Coraboeuf <damien.coraboeuf@nemerosa.com>

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

import (
	"errors"
	"regexp"
	"strconv"
	"strings"

	"github.com/spf13/cobra"

	client "ontrack-cli/client"
	config "ontrack-cli/config"
)

// validateMetricsCmd represents the validateMetrics command
var validateMetricsCmd = &cobra.Command{
	Use:   "metrics",
	Short: "Validation with metrics data",
	Long: `Validation with metrics data.

For example:

    ontrack-cli validate -p PROJECT -b BRANCH -n BUILD -v VALIDATION metrics --metric name1=value1 --metric name2=value2

An alternative syntax is:

	ontrack-cli validate -p PROJECT -b BRANCH -n BUILD -v VALIDATION metrics --metrics name1=value1,name2=value2
`,
	RunE: func(cmd *cobra.Command, args []string) error {
		project, err := cmd.Flags().GetString("project")
		if err != nil {
			return err
		}

		branch, err := cmd.Flags().GetString("branch")
		if err != nil {
			return err
		}
		branch = NormalizeBranchName(branch)

		build, err := cmd.Flags().GetString("build")
		if err != nil {
			return err
		}

		validation, err := cmd.Flags().GetString("validation")
		if err != nil {
			return err
		}

		description, err := cmd.Flags().GetString("description")
		if err != nil {
			return err
		}

		runInfo, err := GetRunInfo(cmd)
		if err != nil {
			return err
		}

		// List of metrics
		var metricList = []metric{}

		// Adding from the `metric` flags
		metricArgs, err := cmd.Flags().GetStringSlice("metric")
		for _, value := range metricArgs {
			name, metricValue, err := parseMetric(value)
			if err != nil {
				return err
			}
			metricList = append(metricList, metric{
				Name:  name,
				Value: metricValue,
			})
		}

		// Adding from the `metrics` flag
		metricsArg, err := cmd.Flags().GetString("metrics")
		if err != nil {
			return err
		}
		if metricsArg != "" {
			metricsArgTokens := strings.Split(metricsArg, ",")
			for _, value := range metricsArgTokens {
				name, metricValue, err := parseMetric(value)
				if err != nil {
					return err
				}
				metricList = append(metricList, metric{
					Name:  name,
					Value: metricValue,
				})
			}
		}

		// Get the configuration
		cfg, err := config.GetSelectedConfiguration()
		if err != nil {
			return err
		}

		// Mutation payload
		var payload struct {
			ValidateBuildWithMetrics struct {
				Errors []struct {
					Message string
				}
			}
		}

		// Runs the mutation
		if err := client.GraphQLCall(cfg, `
			mutation ValidateBuildWithMetrics(
				$project: String!,
				$branch: String!,
				$build: String!,
				$validationStamp: String!,
				$description: String!,
				$runInfo: RunInfoInput,
				$metrics: [MetricsEntryInput!]!
			) {
				validateBuildWithMetrics(input: {
					project: $project,
					branch: $branch,
					build: $build,
					validation: $validationStamp,
					description: $description,
					runInfo: $runInfo,
					metrics: $metrics
				}) {
					errors {
						message
					}
				}
			}
		`, map[string]interface{}{
			"project":         project,
			"branch":          branch,
			"build":           build,
			"validationStamp": validation,
			"description":     description,
			"runInfo":         runInfo,
			"metrics":         metricList,
		}, &payload); err != nil {
			return err
		}

		// Checks for errors
		if err := client.CheckDataErrors(payload.ValidateBuildWithMetrics.Errors); err != nil {
			return err
		}

		// OK
		return nil
	},
}

func parseMetric(value string) (string, float64, error) {
	re := regexp.MustCompile(`^(.+)=(\d+(\.\d+)?)$`)
	match := re.FindStringSubmatch(value)
	if match == nil {
		return "", 0, errors.New("Metric " + value + " must match name=number[.number]")
	}

	name := match[1]
	metric, err := strconv.ParseFloat(match[2], 64)
	if err != nil {
		return "", 0, err
	}

	return name, metric, nil
}

func init() {
	validateCmd.AddCommand(validateMetricsCmd)

	// Here you will define your flags and configuration settings.

	// Cobra supports Persistent Flags which will work for this command
	// and all subcommands, e.g.:
	// validateMetricsCmd.PersistentFlags().String("foo", "", "A help for foo")

	// Cobra supports local flags which will only run when this command
	// is called directly, e.g.:
	// validateMetricsCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
	validateMetricsCmd.Flags().StringSliceP("metric", "m", []string{}, "List of metric, each value being provided like 'name=value'")
	validateMetricsCmd.Flags().String("metrics", "", "Comma-separated list of metric, each value being provided like 'name=value'")

	// Run info arguments
	InitRunInfoCommandFlags(validateMetricsCmd)
}

type metric struct {
	Name  string  `json:"name"`
	Value float64 `json:"value"`
}

repository: nemerosa/ontrack-cli

repo_name: nemerosa/ontrack-cli


text:
SUMMARY = "SWTPM2.0 - Software TPM2.0 Emulator"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8092c832b71ef20dfe4c6d3decb3a8"
SECTION = "apps"

DEPENDS = "libtasn1 fuse expect socat glib-2.0 libtpms2"

# configure checks for the tools already during compilation and
# then swtpm_setup needs them at runtime
DEPENDS += "tpm-tools-native expect-native socat-native"
RDEPENDS_${PN} += "tpm-tools"

SRCREV = "adf9b3fe5d4df6708e9f801b8c9dcfdf7274d457"
SRC_URI = " \
	git://github.com/stefanberger/swtpm.git;nobranch=1 \
	file://fix_lib_search_path.patch \
        file://ioctl_h.patch \
	"
PV = "0.1.0-dev2"

S = "${WORKDIR}/git"

inherit autotools-brokensep pkgconfig
PARALLEL_MAKE = ""

TSS_USER="tss"
TSS_GROUP="tss"

PACKAGECONFIG ?= "openssl"
PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls"
PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
PACKAGECONFIG[cuse] = "--with-cuse, --without-cuse"
PACKAGECONFIG[debug] = "--enable-debug, --disable-debug"

EXTRA_OECONF += "--with-tss-user=${TSS_USER} --with-tss-group=${TSS_GROUP}"

export SEARCH_DIR = "${STAGING_LIBDIR_NATIVE}"

# dup bootstrap
do_configure_prepend () {
	libtoolize --force --copy
	autoheader
	aclocal
	automake --add-missing -c
	autoconf
}

USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system ${TSS_USER}"
USERADD_PARAM_${PN} = "--system -g ${TSS_GROUP} --home-dir  \
    --no-create-home  --shell /bin/false ${BPN}"

RDEPENDS_${PN} = "libtpm expect socat bash"

BBCLASSEXTEND = "native nativesdk"

repository: intel/intel-iot-refkit

repo_name: intel/intel-iot-refkit

gha_language: Python


text:
/*
Copyright © 2020 srz_zumix <https://github.com/srz-zumix>

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

import (
	"fmt"
	"log"
	"os"

	"github.com/spf13/cobra"
	git "github.com/srz-zumix/git-use-commit-times/xgit"

	homedir "github.com/mitchellh/go-homedir"
	"github.com/spf13/viper"
)

var cfgFile string

func use_commit_times(path string, verbose bool, progress bool) error {
	repo, err := git.OpenRepository(path)
	if err != nil {
		return err
	}
	defer repo.Free()

	// fmt.Println(repo)
	filemap, err := ls_files(repo)
	if err != nil {
		return err
	}
	// fmt.Println(strings.Join(files, "\n"))
	err = use_commit_times_rev_walk(repo, filemap, verbose, progress)
	// err = use_commit_times_log_walk(repo, filemap, progress)
	if err != nil {
		return err
	}
	return nil
}

func use_commit_times_bylog(path string, since string, verbose bool, progress bool) error {
	repo, err := git.OpenRepository(path)
	if err != nil {
		return err
	}
	defer repo.Free()

	// fmt.Println(repo)
	filemap, err := ls_files(repo)
	if err != nil {
		return err
	}
	// fmt.Println(strings.Join(files, "\n"))
	// err = use_commit_times_rev_walk(repo, filemap, progress)
	err = use_commit_times_log_walk(repo, filemap, since, verbose, progress)
	if err != nil {
		return err
	}
	return nil
}

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
	Use:   "git-use-commit-times",
	Short: "set commit time timestamp",
	Long: `git-use-commit-times
	Set the file timestamp to the commit datetime.
	`,
	// Uncomment the following line if your bare application
	// has an action associated with it:
	Run: func(cmd *cobra.Command, args []string) {
		progress, err := cmd.Flags().GetBool("progress")
		if err != nil {
			log.Fatal(err)
		}
		verbose, err := cmd.Flags().GetBool("verbose")
		if err != nil {
			log.Fatal(err)
		}
		use_libgit2, err := cmd.Flags().GetBool("libgit-walk")
		if err != nil {
			log.Fatal(err)
		}
		since, err := cmd.Flags().GetString("since")
		if err != nil {
			log.Fatal(err)
		}
		if since == "" {
			since, err = cmd.Flags().GetString("after")
			if err != nil {
				log.Fatal(err)
			}
		}

		if use_libgit2 {
			err = use_commit_times(".", verbose, progress)
		} else {
			err = use_commit_times_bylog(".", since, verbose, progress)
		}
		if err != nil {
			log.Fatal(err)
		}
	},
}

// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
	if err := rootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

func init() {
	cobra.OnInitialize(initConfig)

	// Here you will define your flags and configuration settings.
	// Cobra supports persistent flags, which, if defined here,
	// will be global for your application.

	rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.git-use-commit-times.yaml)")

	// Cobra also supports local flags, which will only run
	// when this action is called directly.
	rootCmd.Flags().BoolP("progress", "p", false, "Show progressbar.")
	rootCmd.Flags().BoolP("libgit-walk", "l", false, "Get commit timestamp by libgit2 rev walk.")
	rootCmd.Flags().BoolP("verbose", "v", false, "Verbose.")
	rootCmd.Flags().String("since", "", "Commits more recent than a specific date.")
	rootCmd.Flags().String("after", "", "Commits more recent than a specific date.")
}

// initConfig reads in config file and ENV variables if set.
func initConfig() {
	if cfgFile != "" {
		// Use config file from the flag.
		viper.SetConfigFile(cfgFile)
	} else {
		// Find home directory.
		home, err := homedir.Dir()
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}

		// Search config in home directory with name ".git-use-commit-times" (without extension).
		viper.AddConfigPath(home)
		viper.SetConfigName(".git-use-commit-times")
	}

	viper.AutomaticEnv() // read in environment variables that match

	// If a config file is found, read it in.
	if err := viper.ReadInConfig(); err == nil {
		fmt.Println("Using config file:", viper.ConfigFileUsed())
	}
}

repository: srz-zumix/go-git-use-commit-times

repo_name: srz-zumix/go-git-use-commit-times


text:
IF(NOT GENGETOPT_EXECUTABLE)
	MESSAGE(STATUS "Looking for gengetopt")
	FIND_PROGRAM(GENGETOPT_EXECUTABLE gengetopt)
	IF(GENGETOPT_EXECUTABLE)
		EXECUTE_PROCESS(COMMAND "${GENGETOPT_EXECUTABLE}" --version OUTPUT_VARIABLE _version)
		STRING(REGEX MATCH "[0-9.]+" GENGETOPT_VERSION ${_version})
		SET(GENGETOPT_FOUND TRUE)
	ENDIF(GENGETOPT_EXECUTABLE)
ELSE(NOT GENGETOPT_EXECUTABLE)
	EXECUTE_PROCESS(COMMAND "${GENGETOPT_EXECUTABLE}" --version OUTPUT_VARIABLE _version)
	STRING(REGEX MATCH "[0-9.]+" GENGETOPT_VERSION ${_version})
	SET(GENGETOPT_FOUND TRUE)
ENDIF(NOT GENGETOPT_EXECUTABLE)

IF(GENGETOPT_FOUND)
	MESSAGE(STATUS "Found gengetopt: ${GENGETOPT_EXECUTABLE} (${GENGETOPT_VERSION})")
ELSE(GENGETOPT_FOUND)
	MESSAGE(FATAL_ERROR "Could not find gengetopt")
ENDIF(GENGETOPT_FOUND)

STRING(REPLACE "." ";" GENGETOPT_VERSION_LIST ${GENGETOPT_VERSION})
LIST(GET GENGETOPT_VERSION_LIST 0 GENGETOPT_VERSION_MAJOR)
LIST(GET GENGETOPT_VERSION_LIST 1 GENGETOPT_VERSION_MINOR)
LIST(GET GENGETOPT_VERSION_LIST 2 GENGETOPT_VERSION_PATCH)

MACRO(WRAP_GGO GGO_SRCS GGO_SUFFIX)
	FOREACH(GGO_FILE ${ARGN})
		GET_FILENAME_COMPONENT(GGO_BASEFILENAME ${GGO_FILE} NAME_WE)
		GET_FILENAME_COMPONENT(GGO_FILE_ABS ${GGO_FILE} ABSOLUTE)
		SET(GGO_H ${GGO_BASEFILENAME}_ggo.h)
		SET(GGO_C ${GGO_BASEFILENAME}_ggo.c)
		SET(GGO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GGO_H} ${CMAKE_CURRENT_BINARY_DIR}/${GGO_C})
		IF(NOT "${GGO_SUFFIX}" STREQUAL "")
			SET(GGO_SUFFIX_EXT "_${GGO_SUFFIX}")
		ELSE(NOT "${GGO_SUFFIX}" STREQUAL "")
			SET(GGO_SUFFIX_EXT "")
		ENDIF(NOT "${GGO_SUFFIX}" STREQUAL "")
		ADD_CUSTOM_COMMAND(OUTPUT ${GGO_OUTPUT}
			COMMAND ${GENGETOPT_EXECUTABLE}
			ARGS < ${GGO_FILE_ABS}
			--output-dir=${CMAKE_CURRENT_BINARY_DIR}
			--arg-struct-name=ggo_args_info${GGO_SUFFIX_EXT}
			--func-name=ggo_cmdline_parser${GGO_SUFFIX_EXT}
			--file-name=${GGO_BASEFILENAME}_ggo
			--unamed-opts
			--conf-parser
			--include-getopt
			DEPENDS ${GGO_FILE_ABS}
			)
		SET(${GGO_SRCS} ${${GGO_SRCS}} ${GGO_OUTPUT})
		INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
	ENDFOREACH(GGO_FILE)
	SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}}
		PROPERTIES
		GENERATED TRUE
		COMPILE_FLAGS "-Wno-unused"
		COMPILE_FLAGS "-Wno-unused-but-set-variable"
	)
ENDMACRO(WRAP_GGO)

repository: miihael/fbpinger

repo_name: miihael/fbpinger


text:
require u-boot-fio-common.inc

SRCREV = "2bc91bf4120ff04c53968fcee1d52b70ebf91776"
SRCBRANCH = "2020.10+fio"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025"

repository: ricardosalveti/meta-lmp

repo_name: ricardosalveti/meta-lmp


text:
require recipes-bsp/u-boot/u-boot.inc

DESCRIPTION = "U-Boot provided by NVideo for Jetson TX1."
PROVIDES = "u-boot"

PR = "r23.2.0"

SRC_URI = "http://developer.download.nvidia.com/embedded/L4T/r23_Release_v2.0/source/u-boot_src.tbz2"


text:
require bug-app.inc

DESCRIPTION = "This bundle is an adapter that listens for button events and uses the whiteboard pattern to notify any interested services. More information about the whiteboard pattern can be found on the OSGi website."
HOMEPAGE = "http://buglabs.net/applications/buttoneventadapter"

DEPENDS += "com.buglabs.osgi service-tracker com.buglabs.common "

PV = "1"

SRC_LINK = "http://buglabs.net/program_version/download/135"

APIVERSION = ""


text:
@article{FRoweEtAl2018,
  title = {Policy {{Brief}}: {{Neighbourhood Change}} and {{Trajectories}} of {{Inequality}} in {{Britain}}, 1971-2011},
  shorttitle = {Policy {{Brief}}},
  author = {Rowe, Francisco and Patias, Nikos and {Arribas-Bel}, Dani},
  year = {2018},
  file = {C\:\\Users\\presc\\Zotero\\storage\\FLZBX2UY\\Rowe et al. - Policy Brief Neighbourhood Change and Trajectorie.pdf}
}

@article{HSmith2019b,
  title = {The Locative Imaginary: {{Classification}}, Context and Relevance in Location Analytics},
  shorttitle = {The Locative Imaginary},
  journal = {The Sociological Review},
  author = {Smith, Harrison},
  year = {2019},
  pages = {0038026119878939},
  file = {C\:\\Users\\presc\\Zotero\\storage\\HRSQ5CIR\\0038026119878939.html}
}

@article{HSmith2019,
  title = {People-Based Marketing and the Cultural Economies of Attribution Metrics},
  volume = {12},
  number = {3},
  journal = {Journal of Cultural Economy},
  author = {Smith, Harrison},
  year = {2019},
  pages = {201--214},
  file = {C\:\\Users\\presc\\Zotero\\storage\\GVISR48X\\17530350.2019.html;C\:\\Users\\presc\\Zotero\\storage\\PCF9MABX\\17530350.2019.html}
}

@article{ASingletonLongley2019,
  title = {Data Infrastructure Requirements for New Geodemographic Classifications: {{The}} Example of {{London}}'s Workplace Zones},
  volume = {109},
  shorttitle = {Data Infrastructure Requirements for New Geodemographic Classifications},
  journal = {Applied Geography},
  author = {Singleton, Alex D. and Longley, Paul A.},
  year = {2019},
  pages = {102038},
  file = {C\:\\Users\\presc\\Zotero\\storage\\H3QGLVF2\\S0143622818310713.html}
}

@article{RBurrowsKnowles2019,
  title = {The ``{{HAVES}}'' and the ``{{HAVE YACHTS}}'' {{Socio}}-{{Spatial Struggles}} in {{London}} between the ``{{Merely Wealthy}}'' and the ``{{Super}}-{{Rich}}''},
  volume = {15},
  number = {1},
  journal = {Public Culture},
  author = {Burrows, Roger and Knowles, Caroline},
  year = {2019},
  pages = {72--87},
  file = {C\:\\Users\\presc\\Zotero\\storage\\DRS5R24N\\Burrows and Knowles - 2019 - The “HAVES” and the “HAVE YACHTS” Socio-Spatial St.pdf;C\:\\Users\\presc\\Zotero\\storage\\ITBMFVER\\The-HAVES-and-the-HAVE-YACHTS-Socio-Spatial.html}
}

@article{LHanquinetEtAl2019a,
  title = {The Coming Crisis of Cultural Engagement? {{Measurement}}, Methods, and the Nuances of Niche Activities},
  shorttitle = {The Coming Crisis of Cultural Engagement?},
  journal = {Cultural Trends},
  author = {Hanquinet, Laurie and O'Brien, Dave and Taylor, Mark},
  year = {2019},
  pages = {1--22},
  file = {C\:\\Users\\presc\\Zotero\\storage\\FKWLVNZ9\\09548963.2019.html;C\:\\Users\\presc\\Zotero\\storage\\YQHERLXR\\09548963.2019.html}
}

@article{YLiuEtAl2019a,
  title = {A Principal Component Analysis ({{PCA}})-Based Framework for Automated Variable Selection in Geodemographic Classification},
  journal = {Geo-spatial Information Science},
  author = {Liu, Yunzhe and Singleton, Alex and {Arribas-Bel}, Daniel},
  year = {2019},
  pages = {1--14},
  file = {C\:\\Users\\presc\\Zotero\\storage\\D3HXHL3C\\10095020.2019.html;C\:\\Users\\presc\\Zotero\\storage\\L55FA5Y2\\10095020.2019.html}
}

@article{LBackStoneman2019,
  title = {The {{Fellowship Inn Project Evaluation}}},
  author = {Back, Les and Stoneman, Paul},
  year = {2019},
  file = {C\:\\Users\\presc\\Zotero\\storage\\EXCNM7KE\\Back and Stoneman - 2019 - The Fellowship Inn Project Evaluation.pdf;C\:\\Users\\presc\\Zotero\\storage\\MGDUQQKT\\26966.html}
}

@incollection{YKamimuraEtAl2020a,
  title = {Geodemographic {{Characteristics}} of {{Vacant Houses}} in the {{Resale Condominium Market}} in the {{Kansai Metropolitan Area}}},
  booktitle = {The {{Rise}} in {{Vacant Housing}} in {{Post}}-Growth {{Japan}}},
  publisher = {{Springer}},
  author = {Kamimura, Yoji and Uesugi, Masaya and Yano, Keiji},
  year = {2020},
  pages = {45--72},
  file = {C\:\\Users\\presc\\Zotero\\storage\\3QF4YXMX\\978-981-13-7920-8_4.html}
}

@book{RWebberBurrows2018,
  address = {{Los Angeles}},
  title = {The Predictive Postcode: The Geodemographic Classification of {{British}} Society},
  isbn = {978-1-5264-0233-2 978-1-5264-0234-9},
  lccn = {HB2043.A3 W43 2018},
  shorttitle = {The Predictive Postcode},
  abstract = {"It is not lost on commercial organisations that where we live colours how we view ourselves and others. That is why so many now place us into social groups on the basis of the type of postcode in which we live. Social scientists call this practice commercial sociology . Richard Webber originated Acorn and Mosaic, the two most successful geodemographic classifications. Roger Burrows is a critical interdisciplinary social scientist. Together they chart the origins of this practice and explain the challenges it poses to long-established social scientific beliefs such as: the role of the questionnaire in an era of big data the primacy of theory the relationship between qualitative and quantitative modes of understanding the relevance of visual clues to lay understanding. To help readers evaluate the validity of this form of classification, the book assesses how well geodemographic categories track the emergence of new types of residential neighbourhood and subject a number of key contemporary issues to geodemographic modes of analysis."--},
  publisher = {{SAGE}},
  author = {Webber, Richard and Burrows, Roger},
  year = {2018},
  keywords = {Human geography,Geodemographics,Neighborhoods,Social aspects,Economic aspects,Environment and Ecology,Great Britain,Postal codes},
  note = {OCLC: on1004841108}
}

license: Unlicense

repository: peterprescott/citation-graph

repo_name: peterprescott/citation-graph

gha_license_id: Unlicense

gha_language: TeX


text:
@misc{aavso2016,
  author = {Mark Blackford},
  title = {The AAVSO DSLR Observing Manual},
  publisher = {AAVSO},
  address = {Cambridge MA},
  year = {2016},
  note = {Version 1.4},
  howpublished = {Available at \url{http://www.aavso.org/sites/default/files/publications_files/dslr_manual/AAVSO_DSLR_Observing_Manual_V1.4.pdf} (2020/04/21)}
}
@book{berry2017the,
  author = {Berry, Richard},
  title = {The handbook of astronomical image processing},
  publisher = {Willmann-Bell},
  year = {2017},
  address = {Richmond, VA},
  isbn = {978-1-942675-08-2}
}
@ARTICLE{lang2010,
  author = {{Lang}, D. and {Hogg}, D.~W. and {Mierle}, K. and {Blanton}, M. and {Roweis}, S.},
  title = "{Astrometry.net: Blind astrometric calibration of arbitrary astronomical images}",
  journal = {The Astronomical Journal},
  year = 2010,
  volume = {137},
  pages = {1782--2800},
  note = {arXiv:0910.2233},
  adsurl = {http://adsabs.harvard.edu/abs/2009arXiv0910.2233L}
}
@article{Chambliss_1976,
	doi = {10.1086/129890},
	url = {https://doi.org/10.1086/129890},
	year = 1976,
	month = {2},
	publisher = {{IOP} Publishing},
	volume = {88},
	pages = {22},
	author = {C. R. Chambliss},
	title = {A three-color photoelectric investigation of the eclipsing binary system {RZ} Cassiopeiae},
	journal = {Publications of the Astronomical Society of the Pacific},
}
@ARTICLE{2000A&AS..143....9W,
       author = {{Wenger}, M. and {Ochsenbein}, F. and {Egret}, D. and {Dubois}, P. and
         {Bonnarel}, F. and {Borde}, S. and {Genova}, F. and {Jasniewicz}, G. and
         {Lalo{\"e}}, S. and {Lesteven}, S. and {Monier}, R.},
        title = "{The SIMBAD astronomical database. The CDS reference database for astronomical objects}",
      journal = {Astronomy and Astrophysics, Supplement},
     keywords = {ASTRONOMICAL DATA BASES: MISCELLANEOUS, CATALOGS, Astrophysics},
         year = 2000,
        month = apr,
       volume = {143},
        pages = {9-22},
          doi = {10.1051/aas:2000332},
archivePrefix = {arXiv},
       eprint = {astro-ph/0002110},
 primaryClass = {astro-ph},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2000A&AS..143....9W},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}


text:
package util

import (
	"fmt"
	"sync"

	"github.com/bmeg/grip/gdbi"
	"github.com/bmeg/grip/log"
	multierror "github.com/hashicorp/go-multierror"
)

// StreamBatch a stream of inputs and loads them into the graph
// This function assumes incoming stream is GraphElemnts from a single graph
func StreamBatch(stream <-chan *gdbi.GraphElement, batchSize int, graph string, vertexAdd func([]*gdbi.Vertex) error, edgeAdd func([]*gdbi.Edge) error) error {

	var bulkErr *multierror.Error
	vertCount := 0
	edgeCount := 0
	vertexBatchChan := make(chan []*gdbi.Vertex)
	edgeBatchChan := make(chan []*gdbi.Edge)
	wg := &sync.WaitGroup{}

	wg.Add(1)
	go func() {
		for vBatch := range vertexBatchChan {
			if len(vBatch) > 0 {
				err := vertexAdd(vBatch)
				if err != nil {
					bulkErr = multierror.Append(bulkErr, err)
				}
			}
		}
		wg.Done()
	}()

	wg.Add(1)
	go func() {
		for eBatch := range edgeBatchChan {
			if len(eBatch) > 0 {
				err := edgeAdd(eBatch)
				if err != nil {
					bulkErr = multierror.Append(bulkErr, err)
				}
			}
		}
		wg.Done()
	}()

	vertexBatch := make([]*gdbi.Vertex, 0, batchSize)
	edgeBatch := make([]*gdbi.Edge, 0, batchSize)

	for element := range stream {
		if element.Graph != graph {
			bulkErr = multierror.Append(
				bulkErr,
				fmt.Errorf("unexpected graph reference: %s != %s", element.Graph, graph),
			)
		} else if element.Vertex != nil {
			if len(vertexBatch) >= batchSize {
				vertexBatchChan <- vertexBatch
				vertexBatch = make([]*gdbi.Vertex, 0, batchSize)
			}
			vertex := element.Vertex
			err := vertex.Validate()
			if err != nil {
				bulkErr = multierror.Append(
					bulkErr,
					fmt.Errorf("vertex validation failed: %v", err),
				)
			} else {
				vertexBatch = append(vertexBatch, vertex)
				vertCount++
			}
		} else if element.Edge != nil {
			if len(edgeBatch) >= batchSize {
				edgeBatchChan <- edgeBatch
				edgeBatch = make([]*gdbi.Edge, 0, batchSize)
			}
			edge := element.Edge
			if edge.ID == "" {
				edge.ID = UUID()
			}
			err := edge.Validate()
			if err != nil {
				bulkErr = multierror.Append(
					bulkErr,
					fmt.Errorf("edge validation failed: %v", err),
				)
			} else {
				edgeBatch = append(edgeBatch, edge)
				edgeCount++
			}
		}
	}
	vertexBatchChan <- vertexBatch
	edgeBatchChan <- edgeBatch

	if vertCount != 0 {
		log.Debugf("%d vertices streamed to BulkAdd", vertCount)
	}

	if edgeCount != 0 {
		log.Debugf("%d edges streamed to BulkAdd", edgeCount)
	}

	close(edgeBatchChan)
	close(vertexBatchChan)
	wg.Wait()

	return bulkErr.ErrorOrNil()
}

repository: bmeg/grip

repo_name: bmeg/grip


text:
package servant

import (
	"github.com/stretchr/testify/assert"
	"testing"
)

func TestUserStruct(t *testing.T) {

	name := "Igor"
	passHash := "3fj39fd"
	u:=User{
		Name:           name,
		PasswordSha512: passHash,
	}

	assert.Equal(t, u.Name, name)
	assert.Equal(t, u.PasswordSha512, passHash)
}

func TestAuthStruct(t *testing.T) {
	state := true
	user := User{
		Name:           "Igor",
		PasswordSha512: "3fj39fd",
	}
	users := []User {user}

	auth := Auth{
		Enabled: state,
		Users:   users,
	}

	assert.Equal(t, auth.Enabled, state)
	assert.Equal(t, auth.Users, []User {User{
		Name:           "Igor",
		PasswordSha512: "3fj39fd",
	}})
}

func TestRouteStruct(t *testing.T) {
	endpoint := "/foobar"
	method := "GET"
	user := User{
		Name:           "Igor",
		PasswordSha512: "3fj39fd",
	}
	users := []User {user}

	auth := Auth{
		Enabled: true,
		Users:   users,
	}

	route := Route{
		Endpoint: endpoint,
		Method:   method,
		Auth:     auth,
		Function: func() string {return "string"},
	}

	assert.Equal(t, route.Endpoint, endpoint)
	assert.Equal(t, route.Method, method)
	assert.Equal(t, route.Auth, auth)

}

repository: cboxed/servant

repo_name: cboxed/servant


text:
@article{Shelahcombinatorialproblemstability1972,
  title = {A Combinatorial Problem; Stability and Order for Models and Theories in Infinitary Languages},
  author = {Shelah, Saharon},
  year = {1972},
  volume = {41},
  pages = {247--261},
  doi = {make it break},
  journal = {Pacific Journal of Mathematics},
  keywords = {user1,user2},
  note = {MR 46:7018}
}

repository: retorquere/bibtex-parser

path: /test/better-bibtex/export/automatic tags in export #1270.bibtex

repo_name: retorquere/bibtex-parser

extension: bibtex

filename: automatic tags in export #1270.bibtex