text:
package shopping_guide

import (
	"encoding/json"
	"fmt"

	"github.com/dcsunny/wechat/define"

	"github.com/dcsunny/wechat/common_error"
	"github.com/dcsunny/wechat/util"

	"github.com/dcsunny/wechat/context"
)

const (
	GuideManagerAcctAdd          = "https://api.weixin.qq.com/cgi-bin/guide/addguideacct"
	GuideManagerAcctGet          = "https://api.weixin.qq.com/cgi-bin/guide/getguideacct"
	GuideManagerAcctUpdate       = "https://api.weixin.qq.com/cgi-bin/guide/updateguideacct"
	GuideManagerAcctDelete       = "https://api.weixin.qq.com/cgi-bin/guide/delguideacct"
	GuideManagerAcctList         = "https://api.weixin.qq.com/cgi-bin/guide/getguideacctlist"
	GuideManagerAcctCreateQrCode = "https://api.weixin.qq.com/cgi-bin/guide/guidecreateqrcode"
)

type GuideManager struct {
	*context.Context
}

func NewGuideManager(ctx *context.Context) *GuideManager {
	return &GuideManager{ctx}
}

type GuideManagerAddReq struct {
	Account    string `json:"guide_account"`    //顾问微信号（guide_account和guide_openid二选一）
	OpenID     string `json:"guide_openid"`     //顾问openid或者unionid（guide_account和guide_openid二选一）
	HeadImgURL string `json:"guide_headimgurl"` //顾问头像，头像url只能用《上传图文消息内的图片获取URL》
	Nickname   string `json:"guide_nickname"`
}

type GuideManagerAcctReq struct {
	Account string `json:"guide_account"` //顾问微信号（guide_account和guide_openid二选一）
	OpenID  string `json:"guide_openid"`  //顾问openid或者unionid（guide_account和guide_openid二选一）
}

type GuideAcctInfo struct {
	Account    string `json:"guide_account"`    //顾问微信号（guide_account和guide_openid二选一）
	OpenID     string `json:"guide_openid"`     //顾问openid或者unionid（guide_account和guide_openid二选一）
	HeadImgURL string `json:"guide_headimgurl"` //顾问头像，头像url只能用《上传图文消息内的图片获取URL》
	Nickname   string `json:"guide_nickname"`
	Status     int    `json:"status"` //顾问状态（1:确认中；2已确认；3已拒绝；4已过期）
	define.CommonError
}

//为服务号添加顾问
func (g *GuideManager) AddGuideAcct(req GuideManagerAddReq) error {
	accessToken, err := g.GetAccessToken()
	if err != nil {
		return err
	}

	uri := fmt.Sprintf("%s?access_token=%s", GuideManagerAcctAdd, accessToken)
	response, err := util.PostJSON(uri, req)
	if err != nil {
		return err
	}
	return common_error.DecodeWithCommonError(g.Context, response, "AddGuideAcct")
}

//获取顾问信息
func (g *GuideManager) GetGuideAcct(req GuideManagerAcctReq) (*GuideAcctInfo, error) {
	accessToken, err := g.GetAccessToken()
	if err != nil {
		return nil, err
	}

	uri := fmt.Sprintf("%s?access_token=%s", GuideManagerAcctGet, accessToken)
	response, err := util.PostJSON(uri, req)
	if err != nil {
		return nil, err
	}
	var result GuideAcctInfo
	err = json.Unmarshal(response, &result)
	if err != nil {
		return nil, err
	}
	if result.ErrCode != 0 {
		return nil, common_error.CommonErrorHandle(result.CommonError, g.Context, "GetGuideAcct")
	}
	return &result, nil
}

//修改顾问的昵称或头像
func (g *GuideManager) UpdateGuideAcct(req GuideManagerAddReq) error {
	accessToken, err := g.GetAccessToken()
	if err != nil {
		return err
	}

	uri := fmt.Sprintf("%s?access_token=%s", GuideManagerAcctUpdate, accessToken)
	response, err := util.PostJSON(uri, req)
	if err != nil {
		return err
	}
	return common_error.DecodeWithCommonError(g.Context, response, "UpdateGuideAcct")
}

//删除顾问
func (g *GuideManager) DeleteGuideAcct(req GuideManagerAcctReq) error {
	accessToken, err := g.GetAccessToken()
	if err != nil {
		return err
	}

	uri := fmt.Sprintf("%s?access_token=%s", GuideManagerAcctDelete, accessToken)
	response, err := util.PostJSON(uri, req)
	if err != nil {
		return err
	}
	return common_error.DecodeWithCommonError(g.Context, response, "UpdateGuideAcct")
}

type GuideAcctList struct {
	TotalNum int             `json:"total_num"`
	List     []GuideAcctInfo `json:"list"`
	define.CommonError
}

//获取服务号顾问列表 page从0开始
func (g *GuideManager) GetGuideAcctList(page int, num int) (GuideAcctList, error) {
	accessToken, err := g.GetAccessToken()
	if err != nil {
		return GuideAcctList{}, err
	}

	uri := fmt.Sprintf("%s?access_token=%s", GuideManagerAcctList, accessToken)
	response, err := util.PostJSON(uri, map[string]interface{}{
		"page": page,
		"num":  num,
	})
	if err != nil {
		return GuideAcctList{}, err
	}
	var result GuideAcctList
	err = json.Unmarshal(response, &result)
	if err != nil {
		return GuideAcctList{}, err
	}
	if result.ErrCode != 0 {
		return GuideAcctList{}, common_error.CommonErrorHandle(result.CommonError, g.Context, "GetGuideAcctList")
	}
	return result, nil
}

type GuideCreateQrCodeReq struct {
	GuideManagerAcctReq
	QrcodeInfo string `json:"qrcode_info"`
}

type GuideCreateQrCodeResp struct {
	QrcodeURL string `json:"qrcode_url"`
	define.CommonError
}

//生成顾问二维码
func (g *GuideManager) CreateQrCode(req GuideCreateQrCodeReq) (string, error) {
	accessToken, err := g.GetAccessToken()
	if err != nil {
		return "", err
	}

	uri := fmt.Sprintf("%s?access_token=%s", GuideManagerAcctCreateQrCode, accessToken)
	response, err := util.PostJSON(uri, req)
	if err != nil {
		return "", err
	}
	var result GuideCreateQrCodeResp
	err = json.Unmarshal(response, &result)
	if err != nil {
		return "", err
	}
	if result.ErrCode != 0 {
		return "", common_error.CommonErrorHandle(result.CommonError, g.Context, "CreateQrCode")
	}
	return result.QrcodeURL, nil
}

repository: dcsunny/wechat

repo_name: dcsunny/wechat


text:
SUMMARY = "Touchscreen calibration data"
SECTION = "base"
PR = "r11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=4b5fcfc87fb615860d398b5e38685edf"

SRC_URI = "file://pointercal \
           file://COPYING"

S = "${WORKDIR}"

do_install() {
    # Only install file if it has a contents
    if [ -s ${S}/pointercal ]; then
        install -d ${D}${sysconfdir}/
        install -m 0644 ${S}/pointercal ${D}${sysconfdir}/
    fi
}

ALLOW_EMPTY:${PN} = "1"
PACKAGE_ARCH = "${MACHINE_ARCH}"
INHIBIT_DEFAULT_DEPS = "1"

BBCLASSEXTEND = "native nativesdk"

license: MIT

repository: openembedded/meta-openembedded

license_type: permissive

repo_name: openembedded/meta-openembedded

branch_name: refs/heads/master

gha_license_id: MIT

gha_language: BitBake

extension: bb


text:
SUMMARY = "VLAN provides vconfig utility"
HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html"
SECTION = "misc"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://vconfig.c;beginline=1;endline=19;md5=094ca47de36c20c598b15b32c270ce0a"

SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/vlan/1.9-3ubuntu10.6/${BPN}_${PV}.orig.tar.gz \
           file://no-HOME-includes.patch \
           file://0001-Add-printf-format-and-silence-format-security-warnin.patch \
"

SRC_URI[md5sum] = "5f0c6060b33956fb16e11a15467dd394"
SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca"

UPSTREAM_CHECK_URI = "http://vlan.sourcearchive.com/"
UPSTREAM_CHECK_REGEX = "/(?P<pver>\d+(\.\d+)+)/"

S = "${WORKDIR}/${BPN}"

inherit update-alternatives

EXTRA_OEMAKE = "-e MAKEFLAGS="

# comment out MakeInclude in Makefile which sets build environment
do_configure:append () {
    sed -i 's/^ include/#^include/' ${S}/Makefile
}

# ignore strip to avoid yocto errors in stripping
do_compile () {
    oe_runmake PLATFORM=ARM 'STRIP=echo' CCFLAGS="${CFLAGS}" all
}

do_install () {
    install -d ${D}/${base_sbindir}
    install -m 0755 ${S}/vconfig ${D}/${base_sbindir}/
}

ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE:${PN} = "vconfig"
ALTERNATIVE_LINK_NAME[vconfig] = "${base_sbindir}/vconfig"


text:
SUMMARY = "Image for building a PiPoint"

LICENSE = "MIT"

#    read-only-rootfs
IMAGE_FEATURES += " \
    ssh-server-openssh \
"

IMAGE_INSTALL = " \
    packagegroup-core-boot \
    packagegroup-base-extended \
    ${CORE_IMAGE_EXTRA_INSTALL} \
"
# Future possibilities:
# kea
IMAGE_INSTALL += " \
    chrony \
    chronyc \
    dnsmasq \
    hostapd \
    nftables \
"
# Debug
IMAGE_INSTALL += " \
    dmidecode \
    htop \
    lmsensors \
    lmsensors-sensors \
    lmsensors-sensorsdetect \
    util-linux \
"
IMAGE_LINGUAS = "en-us"

inherit core-image

repository: bobolopolis/meta-redrouter

repo_name: bobolopolis/meta-redrouter

branch_name: refs/heads/main


text:
@phdthesis{paumard2020solving,
  title={Solving Jigsaw Puzzles with Deep Learning for Heritage},
  author={Paumard, Marie-Morgane},
  year={2020},
  school={CY Cergy Paris Universit{\'e}}
}

 @article{cho_avidan_freeman_2010, title={A probabilistic image jigsaw puzzle solver}, DOI={10.1109/cvpr.2010.5540212}, journal={2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition}, author={Cho, Taeg Sang and Avidan, Shai and Freeman, William T.}, year={2010}}

 @article{de_lima-hernandez_vergauwen_2020, title={A hybrid approach to reassemble ancient decorated block fragments through a 3D puzzling engine}, volume={12}, DOI={10.3390/rs12162526}, number={16}, journal={Remote Sensing}, author={de Lima-Hernandez, Roberto and Vergauwen, Maarten}, year={2020}, pages={2526}}

 @article{de_lima-hernandez_vergauwen_2021, title={A generative and entropy-based registration approach for the reassembly of ancient inscriptions}, volume={14}, DOI={10.3390/rs14010006}, number={1}, journal={Remote Sensing}, author={de Lima-Hernandez, Roberto and Vergauwen, Maarten}, year={2021}, pages={6}}

 @article{doersch_gupta_efros_2015, title={Unsupervised visual representation learning by context prediction}, DOI={10.1109/iccv.2015.167}, journal={2015 IEEE International Conference on Computer Vision (ICCV)}, author={Doersch, Carl and Gupta, Abhinav and Efros, Alexei A.}, year={2015}}

 @article{freeman_garder_1964, title={Apictorial jigsaw puzzles: The computer solution of a problem in pattern recognition}, volume={EC-13}, DOI={10.1109/pgec.1964.263781}, number={2}, journal={IEEE Transactions on Electronic Computers}, author={Freeman, H. and Garder, L.}, year={1964}, pages={118–127}}
 @article{gallagher_2012, title={Jigsaw puzzles with pieces of unknown orientation}, DOI={10.1109/cvpr.2012.6247699}, journal={2012 IEEE Conference on Computer Vision and Pattern Recognition}, author={Gallagher, A. C.}, year={2012}}

 @article{hernandez_vincke_bassier_mattheuwsen_derdeale_vergauwen_2019, title={Puzzling engine: A digital platform to aid the reassembling of fractured fragments}, volume={XLII-2/W15}, DOI={10.5194/isprs-archives-xlii-2-w15-563-2019}, journal={The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences}, author={Hernandez, R. D. and Vincke, S. and Bassier, M. and Mattheuwsen, L. and Derdeale, J. and Vergauwen, M.}, year={2019}, pages={563–570}}

 @article{jampy_hostein_fauvet_laligant_truchetet_2015, title={3D puzzle reconstruction for archeological fragments}, DOI={10.1117/12.2075655}, journal={SPIE Proceedings}, author={Jampy, F. and Hostein, A. and Fauvet, E. and Laligant, O. and Truchetet, F.}, year={2015}}

 @article{lermé_hégarat-mascle_zhang_aldea_2020, title={Fast and efficient reconstruction of digitized frescoes}, volume={138}, DOI={10.1016/j.patrec.2020.08.006}, journal={Pattern Recognition Letters}, author={Lermé, Nicolas and Hégarat-Mascle, Sylvie Le and Zhang, Boyang and Aldea, Emanuel}, year={2020}, pages={417–423}}

 @article{paikin_tal_2015, title={Solving multiple square jigsaw puzzles with missing pieces}, DOI={10.1109/cvpr.2015.7299116}, journal={2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, author={Paikin, Genady and Tal, Ayellet}, year={2015}}

 @article{pomeranz_shemesh_ben-shahar_2011, title={A fully automated greedy square jigsaw puzzle solver}, DOI={10.1109/cvpr.2011.5995331}, journal={CVPR 2011}, author={Pomeranz, Dolev and Shemesh, Michal and Ben-Shahar, Ohad}, year={2011}}

 @article{sholomon_david_netanyahu_2013, title={A genetic algorithm-based solver for very large jigsaw puzzles}, DOI={10.1109/cvpr.2013.231}, journal={2013 IEEE Conference on Computer Vision and Pattern Recognition}, author={Sholomon, Dror and David, Omid and Netanyahu, Nathan S.}, year={2013}}

 @article{son_hays_cooper_2014, title={Solving square jigsaw puzzles with loop constraints}, DOI={10.1007/978-3-319-10599-4_3}, journal={Computer Vision – ECCV 2014}, author={Son, Kilho and Hays, James and Cooper, David B.}, year={2014}, pages={32–46}}

 @article{son_moreno_hays_cooper_2016, title={Solving small-piece jigsaw puzzles by growing consensus}, DOI={10.1109/cvpr.2016.134}, journal={2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, author={Son, Kilho and Moreno, Daniel and Hays, James and Cooper, David B.}, year={2016}}

repository: casperfg/thesis-NTNU

repo_name: casperfg/thesis-NTNU

extension: bib


text:
require libosso.inc

PR = "r2"

SRC_URI = "\
  http://repository.maemo.org/pool/maemo4.0/free/source/libo/${PN}/${PN}_${PV}-1.1fix.tar.gz \
  file://libosso-buildfix.patch \
  file://libosso-dont-use-inline.patch \
  "

PACKAGES += "${PN}-outo ${PN}-outo-dev ${PN}-outo-dbg ${PN}-outo-bin-dbg ${PN}-outo-bin"

FILES_${PN}-outo = "${libdir}/outo/lib*.so"
FILES_${PN}-outo-dev = "${libdir}/outo/*.la ${libdir}/outo/*.a"
FILES_${PN}-outo-dbg = "${libdir}/outo/.debug/lib*.so
FILES_${PN}-outo-bin-dbg = "${libdir}/outo/.debug/*bin"
FILES_${PN}-outo-bin = "${libdir}/outo/*bin ${libdir}/outo/mimedummy.doc"

SRC_URI[md5sum] = "92c51a937120eb1f230f84f58ce08da7"
SRC_URI[sha256sum] = "998a13a713c826a6ddbc69f956fbb78deef18b63e65f450a430df39930bcadb4"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
%%%
%%% Referencias del capítulo de ejemplo, se recomienda utilizar http://scholar.google.es/
%%% para otener la citación en formato de bibTex

@book{griffiths1997learning,
  title={Learning LaTeX},
  author={Griffiths, David F and Higham, Desmond J},
  year={1997},
  publisher={Siam}
}

@book{lamport1985i1,
  title={I1 ($\backslash$ LaTeX)---A Document},
  author={Lamport, Leslie},
  volume={410},
  year={1985},
  publisher={pub-AW}
}

repository: mbaez/fpuna-tesis-template

repo_name: mbaez/fpuna-tesis-template

gha_language: TeX


text:
@book{sutton1998reinforcement,
  title={Reinforcement learning: An introduction},
  author={Sutton, Richard S and Barto, Andrew G},
  volume={1},
  number={1},
  year={1998},
  publisher={MIT press Cambridge}
}

@article{sherstan2018directly,
  title={Directly Estimating the Variance of the {$\lambda$}-Return Using Temporal-Difference Methods},
  author={Sherstan, Craig and Bennett, Brendan and Young, Kenny and Ashley, Dylan R and White, Adam and White, Martha and Sutton, Richard S},
  journal={arXiv preprint arXiv:1801.08287},
  year={2018}
}

@article{zeiler2012adadelta,
  title={ADADELTA: an adaptive learning rate method},
  author={Zeiler, Matthew D},
  journal={arXiv preprint arXiv:1212.5701},
  year={2012}
}

@inproceedings{sutton2009fast,
  title={Fast gradient-descent methods for temporal-difference learning with linear function approximation},
  author={Sutton, Richard S and Maei, Hamid Reza and Precup, Doina and Bhatnagar, Shalabh and Silver, David and Szepesv{\'a}ri, Csaba and Wiewiora, Eric},
  booktitle={Proceedings of the 26th Annual International Conference on Machine Learning},
  pages={993--1000},
  year={2009},
  organization={ACM}
}

@inproceedings{sutton2011horde,
  title={Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction},
  author={Sutton, Richard S and Modayil, Joseph and Delp, Michael and Degris, Thomas and Pilarski, Patrick M and White, Adam and Precup, Doina},
  booktitle={The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume 2},
  pages={761--768},
  year={2011},
  organization={International Foundation for Autonomous Agents and Multiagent Systems}
}

@inproceedings{white2016greedy,
  title={A greedy approach to adapting the trace parameter for temporal difference learning},
  author={White, Martha and White, Adam},
  booktitle={Proceedings of the 2016 International Conference on Autonomous Agents \& Multiagent Systems},
  pages={557--565},
  year={2016},
  organization={International Foundation for Autonomous Agents and Multiagent Systems}
}

@phdthesis{white2015developing,
  title={Developing a predictive approach to knowledge},
  author={White, Adam},
  year={2015},
  school={PhD thesis, University of Alberta}
}

@unpublished{kearney2017adapting,
  title={{TIDBD}: Adapting Temporal-difference Step-sizes Through Stochastic Meta-descent.},
  author={Kearney, A and Veeriah, V and Travnik, J and Sutton, Richard S and Pilarski, Patrick M},
  year={2017},
  note={University of Alberta}
}

repository: dylanashley/direct-lambda-greedy

repo_name: dylanashley/direct-lambda-greedy


text:
@article{de_luca_generalized_2012,
 author = {de Luca, Aldo and De Luca, Alessandro},
 doi = {10.1016/j.tcs.2012.01.029},
 issn = {0304-3975},
 journal = {Theoretical Computer Science},
 keywords = {Factor complexity, Morphic images of AR words, Palindromization, Pseudopalindromes},
 month = {oct},
 pages = {109--128},
 title = {A generalized palindromization map in free monoids},
 volume = {454},
 year = {2012}
}

repository: aledeluca/academic-kickstart

repo_name: aledeluca/academic-kickstart


text:
DESCRIPTION = "libvncserver - A library implementing the VCN protocol"
HOMEPAGE = "https://github.com/LibVNC/libvncserver"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=361b6b837cad26c6900a926b62aada5f"
PR = "r1"
PR_append = "+gitr${SRCPV}"
DEPENDS += "jpeg libpng openssl"
SRC_URI = "git://github.com/LibVNC/libvncserver"
SRCREV = "1781ecda341fb06fd414a4d84bb363b070958ea4"
S = "${WORKDIR}/git"

inherit cmake


text:
@proceedings{ws-2016-approaches-deception,
    title = "Proceedings of the Second Workshop on Computational Approaches to Deception Detection",
    editor = "Fornaciari, Tommaso  and
      Fitzpatrick, Eileen  and
      Bachenko, Joan",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W16-0800",
    doi = "10.18653/v1/W16-08",
}
@inproceedings{volkova-bell-2016-account,
    title = "Account Deletion Prediction on {R}u{N}et: A Case Study of Suspicious Twitter Accounts Active During the {R}ussian-{U}krainian Crisis",
    author = "Volkova, Svitlana  and
      Bell, Eric",
    booktitle = "Proceedings of the Second Workshop on Computational Approaches to Deception Detection",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W16-0801",
    doi = "10.18653/v1/W16-0801",
    pages = "1--6",
}
@inproceedings{rubin-etal-2016-fake,
    title = "Fake News or Truth? Using Satirical Cues to Detect Potentially Misleading News",
    author = "Rubin, Victoria  and
      Conroy, Niall  and
      Chen, Yimin  and
      Cornwell, Sarah",
    booktitle = "Proceedings of the Second Workshop on Computational Approaches to Deception Detection",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W16-0802",
    doi = "10.18653/v1/W16-0802",
    pages = "7--17",
}
@inproceedings{kleinberg-etal-2016-using,
    title = "Using the verifiability of details as a test of deception: A conceptual framework for the automation of the verifiability approach",
    author = "Kleinberg, Bennett  and
      Nahari, Galit  and
      Verschuere, Bruno",
    booktitle = "Proceedings of the Second Workshop on Computational Approaches to Deception Detection",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W16-0803",
    doi = "10.18653/v1/W16-0803",
    pages = "18--25",
}
@inproceedings{fitzpatrick-bachenko-2016-estimating,
    title = "Estimating the amenibility of new domains for deception detection",
    author = "Fitzpatrick, Eileen  and
      Bachenko, Joan",
    booktitle = "Proceedings of the Second Workshop on Computational Approaches to Deception Detection",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W16-0804",
    doi = "10.18653/v1/W16-0804",
    pages = "26--31",
}
@inproceedings{kunath-mccabe-2016-use,
    title = "The Use of Second Life for Deception Detection Research",
    author = "Kunath, Stephen  and
      McCabe, Kevin",
    booktitle = "Proceedings of the Second Workshop on Computational Approaches to Deception Detection",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W16-0805",
    doi = "10.18653/v1/W16-0805",
    pages = "32--39",
}
@inproceedings{levitan-etal-2016-identifying,
    title = "Identifying Individual Differences in Gender, Ethnicity, and Personality from Dialogue for Deception Detection",
    author = "Levitan, Sarah Ita  and
      Levitan, Yocheved  and
      An, Guozhen  and
      Levine, Michelle  and
      Levitan, Rivka  and
      Rosenberg, Andrew  and
      Hirschberg, Julia",
    booktitle = "Proceedings of the Second Workshop on Computational Approaches to Deception Detection",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W16-0806",
    doi = "10.18653/v1/W16-0806",
    pages = "40--44",
}
@inproceedings{appling-briscoe-2016-individual,
    title = "Individual Differences in Strategic Deception",
    author = "Appling, Scott  and
      Briscoe, Erica",
    booktitle = "Proceedings of the Second Workshop on Computational Approaches to Deception Detection",
    month = jun,
    year = "2016",
    address = "San Diego, California",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W16-0807",
    doi = "10.18653/v1/W16-0807",
    pages = "45--52",
}

repository: emorynlp/nlprankings

repo_name: emorynlp/nlprankings

gha_license_id: NOASSERTION


text:
package formatter

import (
	"github.com/krok-o/krok/pkg/models"
)

// FormatCommandRun formats a command run and displays it with the request
// format option.
func FormatCommandRun(run *models.CommandRun, opt string) string {
	d := []kv{
		{"id", run.ID},
		{"event-id", run.EventID},
		{"name", run.CommandName},
		{"status", run.Status},
		{"created-at", run.CreateAt.String()},
		{"outcome", run.Outcome},
	}
	formatter := NewFormatter(opt)
	return formatter.FormatObject(d)
}

repository: krok-o/krokctl

repo_name: krok-o/krokctl

gha_language: Go

extension: go


text:
# Install script for directory: /home/jack/Desktop/MCU/stm/stlink

# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
  set(CMAKE_INSTALL_PREFIX "/usr/local")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
  if(BUILD_TYPE)
    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
  else()
    set(CMAKE_INSTALL_CONFIG_NAME "Debug")
  endif()
  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()

# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
  if(COMPONENT)
    message(STATUS "Install component: \"${COMPONENT}\"")
    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
  else()
    set(CMAKE_INSTALL_COMPONENT)
  endif()
endif()

# Install shared libraries without execute permission?
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
  set(CMAKE_INSTALL_SO_NO_EXE "1")
endif()

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES
    "/home/jack/Desktop/MCU/stm/stlink/CMakeFiles/CMakeRelink.dir/libstlink-shared.so.1.4.0"
    "/home/jack/Desktop/MCU/stm/stlink/CMakeFiles/CMakeRelink.dir/libstlink-shared.so.1"
    "/home/jack/Desktop/MCU/stm/stlink/CMakeFiles/CMakeRelink.dir/libstlink-shared.so"
    )
endif()

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/home/jack/Desktop/MCU/stm/stlink/libstlink.a")
endif()

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "/home/jack/Desktop/MCU/stm/stlink/CMakeFiles/CMakeRelink.dir/st-flash")
endif()

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "/home/jack/Desktop/MCU/stm/stlink/CMakeFiles/CMakeRelink.dir/st-info")
endif()

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "/etc/modprobe.d/stlink_v1.conf")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
file(INSTALL DESTINATION "/etc/modprobe.d" TYPE FILE FILES "/home/jack/Desktop/MCU/stm/stlink/etc/modprobe.d/stlink_v1.conf")
endif()

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "/etc/udev/rules.d/49-stlinkv2.rules;/etc/udev/rules.d/49-stlinkv1.rules;/etc/udev/rules.d/49-stlinkv2-1.rules")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
file(INSTALL DESTINATION "/etc/udev/rules.d" TYPE FILE FILES
    "/home/jack/Desktop/MCU/stm/stlink/etc/udev/rules.d/49-stlinkv2.rules"
    "/home/jack/Desktop/MCU/stm/stlink/etc/udev/rules.d/49-stlinkv1.rules"
    "/home/jack/Desktop/MCU/stm/stlink/etc/udev/rules.d/49-stlinkv2-1.rules"
    )
endif()

if(NOT CMAKE_INSTALL_LOCAL_ONLY)
  # Include the install script for each subdirectory.
  include("/home/jack/Desktop/MCU/stm/stlink/src/gdbserver/cmake_install.cmake")
  include("/home/jack/Desktop/MCU/stm/stlink/src/tools/gui/cmake_install.cmake")
  include("/home/jack/Desktop/MCU/stm/stlink/usr/lib/pkgconfig/cmake_install.cmake")
  include("/home/jack/Desktop/MCU/stm/stlink/include/cmake_install.cmake")
  include("/home/jack/Desktop/MCU/stm/stlink/doc/man/cmake_install.cmake")
  include("/home/jack/Desktop/MCU/stm/stlink/tests/cmake_install.cmake")

endif()

if(CMAKE_INSTALL_COMPONENT)
  set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
  set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()

string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
       "${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "/home/jack/Desktop/MCU/stm/stlink/${CMAKE_INSTALL_MANIFEST}"
     "${CMAKE_INSTALL_MANIFEST_CONTENT}")

repository: chmodJack/stlink

repo_name: chmodJack/stlink

extension: cmake


text:
@article{yenni2012strong,
 author = {Yenni, Glenda Marie and Adler, Peter and Ernest, SK Morgan},
 journal = {Ecology},
 pages = {456--461},
 publisher = {ap},
 title = {Strong self-limitation promotes the persistence of rare species},
 volume = {93},
 year = {2012}
}

repository: weecology/website

repo_name: weecology/website


text:
#
# linux-base_git.bb
#
# This recipe provides virtual/kernel.
# The purpose is to build various kernel sources by changing a few variables.
#
# LINUX_GIT_URI, LINUX_GIT_REPO, LINUX_GIT_PROTOCOL, LINUX_GIT_SRCREV:
#   Define the target git repository and source tree.
#   See linux-src.bbclass for more details.
# LINUX_DEFCONFIG, LINUX_CONFIG, LINUX_CONFIG_APPEND
#   Define the base kernel configuration. See the below comments.
# KERNEL_DEVICETREE
#   Define the target devicetrees. See linux-dtb.inc.
#
# The kernel source specified by the above variables is shared with
# linux-libc-headers-base_git.bb through linux-src.bbclass,
# in order to use only one kernel source in the system.
#

# based on OE-Core kernel functions
inherit kernel

# Use the common functions to generate DTBs.
# dtb files (e.g. device.dtb) defined in KERNEL_DEVICETREE are
# automatically generated. Do nothing if KERNEL_DEVICETREE is not set.
require recipes-kernel/linux/linux-dtb.inc

# use the same kernel source as linux-libc-headers-base_git.bb
inherit linux-src

# prevent bitbake from wasting a task for fetching the same source
do_fetch[depends] += "linux-libc-headers:do_fetch"

B = "${WORKDIR}/build"

# 3.9 or later kernel needs bc to build kernel/timeconst.h
DEPENDS += "bc-native"

# Variables to specify the base configuration.
# Either LINUX_DEFCONFIG or LINUX_CONFIG must be defined.
# LINUX_DEFCONFIG:
#   A defconfig file in ${S}/arch/${ARCH}/configs.
#   This variable is ignored if LINUX_CONFIG is set.
#   Usually used with LINUX_CONFIG_APPEND.
# LINUX_CONFIG:
#   A config file in FILESPATH.
# LINUX_CONFIG_APPEND:
#   A config file in FILESPATH, which includes additional configurations.
#   This file is always appended to LINUX_DEFCONFIG or LINUX_CONF if set.
LINUX_DEFCONFIG ?= ""
LINUX_CONFIG ?= ""
LINUX_CONFIG_APPEND ?= ""

# define the default kernel configuration for QEMU targets
require linux-base-qemu-config.inc

SRC_URI += " \
${@base_conditional('LINUX_CONFIG', '', '', 'file://${LINUX_CONFIG}', d)} \
${@base_conditional('LINUX_CONFIG_APPEND', '', '', 'file://${LINUX_CONFIG_APPEND}', d)} \
"

# Generate ${WORKDIR}/defconfig from specified config files.
# ${WORKDIR}/defconfig is copied to ${B}/.config by kernel_do_configure.
do_configure_prepend() {
	rm -f ${WORKDIR}/defconfig

	if [ -n "${LINUX_CONFIG}" ]; then
		DEFCONFIG=${WORKDIR}/${LINUX_CONFIG}
	elif [ -n "${LINUX_DEFCONFIG}" ]; then
		DEFCONFIG=${S}/arch/${ARCH}/configs/${LINUX_DEFCONFIG}
	else
		bbfatal "Both LINUX_DEFCONFIG and LINUX_CONFIG are not defined.
       Please set one of them at lease.
       LINUX_DEFCONFIG: a defconfig file in ${S}/arch/${ARCH}/configs
       LINUX_CONFIG: a config file in FILESPATH"
	fi
	if [ ! -f ${DEFCONFIG} ]; then
		bbfatal "${DEFCONFIG} not found"
	fi
	bbnote "use ${DEFCONFIG} as the base .config"
	cp ${DEFCONFIG} ${WORKDIR}/defconfig

	if [ -n "${LINUX_CONFIG_APPEND}" ]; then
		if [ -f "${WORKDIR}/${LINUX_CONFIG_APPEND}" ]; then
			bbnote "appending ${LINUX_CONFIG_APPEND}"
			cat ${WORKDIR}/${LINUX_CONFIG_APPEND} \
				>> ${WORKDIR}/defconfig
		else
			bbfatal "${LINUX_CONFIG_APPEND} not found in ${WORKDIR}"
		fi
	fi
}

# KERNEL_CONFIG_COMMAND is the final command in do_configure.
# Need to add the source & build directories into the command
# because kernel.bbclass assumes that ${S} is the same as ${B}.
# ARCH and CROSS_COMPILE are already exported, so no need to define them.
KERNEL_CONFIG_COMMAND = "oe_runmake_call O=${B} -C ${S} oldnoconfig"

# only vmlinux lies in the top of the build directory
KERNEL_OUTPUT = "${@base_conditional('KERNEL_IMAGETYPE', 'vmlinux', \
	'${KERNEL_IMAGETYPE}', 'arch/${ARCH}/boot/${KERNEL_IMAGETYPE}', d)}"

# Always use a static integer as KERNEL_PRIORITY, which is automatically
# calcurated from PV by default (see kernel.bbclass).
# This means that only one kernel package version is available in our system.
KERNEL_PRIORITY = "1"

repository: takuya-t/meta-debian

repo_name: takuya-t/meta-debian

branch_name: refs/heads/daisy


text:
#include "precomp.h"
#include "redballapp.h"
#include "entity.h"
#include "component_visual.h"
#include "component_bounce.h"
#include "component_colorshift.h"
#include "component_sound.h"
#include "component_horizontal_movement.h"
#include "visual_manager.h"
#include "sound_manager.h"

void RedBallApp::run()
{
	quit = false;
	last_time = 0;

	CL_DisplayWindow window("Balls", 800, 600, false, false);
	slots.connect(window.sig_window_close(), this, &RedBallApp::on_window_close);
	slots.connect(window.get_ic().get_keyboard().sig_key_up(), this, &RedBallApp::on_input_up);
	CL_GraphicContext gc = window.get_gc();

	VisualManager visual_manager;
	SoundManager sound_manager;
	sound_manager.add_sound("bounce", "Resources/bounce2.ogg");
	sound_manager.add_sound("music", "Resources/music.ogg");
	sound_manager.play("music");

	Entity background;
	background.addComponent(std::make_shared<Visual>(&background, visual_manager));
	background.addComponent(std::make_shared<ColorShift>(&background));
	background.get<CL_Sprite>("sprite") = CL_Sprite(gc, "Resources/background.png");
	background.get<CL_Origin>("alignment") = origin_top_left;
	background.get<CL_Colorf>("color") = CL_Colorf(1.0f, 0.0f, 0.0f, 1.0f);
	background.get<CL_Colorf>("color_to") = CL_Colorf(1.0f, 1.0f, 1.0f, 1.0f);
	background.get<float>("shift_speed") = 40.0f;
	entities.push_back(&background);

	Entity ball1;
	ball1.addComponent(std::make_shared<Visual>(&ball1, visual_manager));
	ball1.addComponent(std::make_shared<Bounce>(&ball1));
	ball1.addComponent(std::make_shared<Sound>(&ball1, sound_manager));
	ball1.addComponent(std::make_shared<HorizontalMovement>(&ball1));
	ball1.get<CL_Sprite>("sprite") = CL_Sprite(gc, "Resources/Ball2.png");
	ball1.get<CL_Colorf>("color") = CL_Colorf(1.0f, 0.2f, 0.2f, 1.0f);
	ball1.get<CL_Pointf>("scale") = CL_Pointf(0.4f, 0.4f);
	ball1.get<CL_Pointf>("position") = CL_Pointf(200.0f, 500.0f);
	ball1.get<CL_Origin>("alignment") = origin_bottom_center;
	entities.push_back(&ball1);

	Entity ball1_shadow;
	ball1_shadow.addComponent(std::make_shared<Visual>(&ball1_shadow, visual_manager));
	ball1_shadow.addComponent(std::make_shared<HorizontalMovement>(&ball1_shadow));
	ball1_shadow.addComponent(std::make_shared<ColorShift>(&ball1_shadow));
	ball1_shadow.get<CL_Sprite>("sprite") = CL_Sprite(gc, "Resources/Shadow.png");
	ball1_shadow.get<CL_Pointf>("scale") = CL_Pointf(0.4f, 0.4f);
	ball1_shadow.get<CL_Pointf>("position") = CL_Pointf(200.0f, 506.0f);
	ball1_shadow.get<CL_Colorf>("color") = CL_Colorf(1.0f, 1.0f, 1.0f, 0.3f);
	ball1_shadow.get<CL_Colorf>("color_to") = CL_Colorf(1.0f, 1.0f, 1.0f, 1.0f);
	ball1_shadow.get<float>("shift_speed") = 1000.0f;
	entities.push_back(&ball1_shadow);

	Entity ball2;
	ball2.addComponent(std::make_shared<Visual>(&ball2, visual_manager));
	ball2.addComponent(std::make_shared<Bounce>(&ball2));
	ball2.addComponent(std::make_shared<ColorShift>(&ball2));
	ball2.addComponent(std::make_shared<Sound>(&ball2, sound_manager));
	ball2.get<CL_Sprite>("sprite") = CL_Sprite(gc, "Resources/Ball2.png");
	ball2.get<CL_Colorf>("color") = CL_Colorf(1.0f, 0.2f, 0.2f, 1.0f);
	ball2.get<CL_Colorf>("color_to") = CL_Colorf(0.5f, 0.5f, 0.5f, 1.0f);
	ball2.get<CL_Pointf>("scale") = CL_Pointf(0.6f, 0.6f);
	ball2.get<CL_Pointf>("position") = CL_Pointf(400.0f, 550.0f);
	ball2.get<CL_Origin>("alignment") = origin_bottom_center;
	ball2.get<float>("bounce_height") = 150.0f;
	ball2.get<float>("bounce_speed") = 4.5f;
	entities.push_back(&ball2);

	Entity ball2_shadow;
	ball2_shadow.addComponent(std::make_shared<Visual>(&ball2_shadow, visual_manager));
	ball2_shadow.addComponent(std::make_shared<ColorShift>(&ball2_shadow));
	ball2_shadow.get<CL_Sprite>("sprite") = CL_Sprite(gc, "Resources/Shadow.png");
	ball2_shadow.get<CL_Pointf>("scale") = CL_Pointf(0.6f, 0.6f);
	ball2_shadow.get<CL_Pointf>("position") = CL_Pointf(400.0f, 556.0f);
	ball2_shadow.get<CL_Colorf>("color") = CL_Colorf(1.0f, 1.0f, 1.0f, 0.3f);
	ball2_shadow.get<CL_Colorf>("color_to") = CL_Colorf(1.0f, 1.0f, 1.0f, 1.0f);
	ball2_shadow.get<float>("shift_speed") = 900.0f;
	entities.push_back(&ball2_shadow);

	Entity ball3;
	ball3.addComponent(std::make_shared<Visual>(&ball3, visual_manager));
	ball3.addComponent(std::make_shared<ColorShift>(&ball3));
	ball3.get<CL_Sprite>("sprite") = CL_Sprite(gc, "Resources/Ball2.png");
	ball3.get<CL_Colorf>("color_to") = CL_Colorf(0.5f, 0.5f, 0.5f, 0.0f);
	ball3.get<CL_Pointf>("scale") = CL_Pointf(0.5f, 0.5f);
	ball3.get<CL_Pointf>("position") = CL_Pointf(570.0f, 520.0f);
	ball3.get<CL_Origin>("alignment") = origin_bottom_center;
	entities.push_back(&ball3);

	Entity ball3_shadow;
	ball3_shadow.addComponent(std::make_shared<Visual>(&ball3_shadow, visual_manager));
	ball3_shadow.addComponent(std::make_shared<ColorShift>(&ball3_shadow));
	ball3_shadow.get<CL_Sprite>("sprite") = CL_Sprite(gc, "Resources/Shadow.png");
	ball3_shadow.get<CL_Pointf>("scale") = CL_Pointf(0.5f, 0.5f);
	ball3_shadow.get<CL_Pointf>("position") = CL_Pointf(570.0f, 530.0f);
	ball3_shadow.get<CL_Colorf>("color_to") = CL_Colorf(1.0f, 1.0f, 1.0f, 0.0f);
	entities.push_back(&ball3_shadow);

	while (!quit)
	{
		float time_delta_ms = calculate_delta_time();

		for(size_t i = 0; i < entities.size(); ++i)
			entities[i]->update(time_delta_ms);

		visual_manager.render(gc);

		window.flip(1);
		CL_KeepAlive::process(0);
	}
}

float RedBallApp::calculate_delta_time()
{
	if(last_time == 0)
		last_time = CL_System::get_time();

	unsigned int current_time = CL_System::get_time();
	float time_delta_ms = static_cast<float> (current_time - last_time);
	last_time = current_time;

	return time_delta_ms;
}

void RedBallApp::on_input_up(const CL_InputEvent &key)
{
	if(key.id == CL_KEY_ESCAPE)
	{
		quit = true;
	}
}

void RedBallApp::on_window_close()
{
	quit = true;
}

repository: ptrefall/propcomp

repo_name: ptrefall/propcomp

extension: cpp


text:
/*
Copyright 2018 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 predicates

// Map is a "map predicate". It's a type that decides if a
// map matches or not.
type Map interface {
	Match(map[string]interface{}) bool
}

// MapNot inverses the value of the predicate.
func MapNot(predicate Map) Map {
	return mapNot{mp: predicate}
}

type mapNot struct {
	mp Map
}

func (p mapNot) Match(m map[string]interface{}) bool {
	return !p.mp.Match(m)
}

// MapAnd returns true if all the sub-predicates are true. If there are
// no sub-predicates, always returns true.
func MapAnd(predicates ...Map) Map {
	return mapAnd{mps: predicates}
}

type mapAnd struct {
	mps []Map
}

func (p mapAnd) Match(m map[string]interface{}) bool {
	for _, mp := range p.mps {
		if !mp.Match(m) {
			return false
		}
	}
	return true
}

// MapOr returns true if any sub-predicate is true. If there are no
// sub-predicates, always returns false.
func MapOr(predicates ...Map) Map {
	mps := []Map{}

	// Implements "De Morgan's law"
	for _, mp := range predicates {
		mps = append(mps, MapNot(mp))
	}
	return MapNot(MapAnd(mps...))
}

// MapNumFields matches if the number of fields matches the number
// predicate.
func MapNumFields(predicate Number) Map {
	return mapNumFields{ip: predicate}
}

type mapNumFields struct {
	ip Number
}

func (p mapNumFields) Match(m map[string]interface{}) bool {
	return p.ip.Match(float64(len(m)))
}

repository: xichengliudui/kubectl

repo_name: xichengliudui/kubectl


text:
# Intel ixp4xx access library software.  Note that this has an Intel
# license which restricts its use.
HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp420.htm"
LICENSE = "http://www.intel.com/design/network/swsup/np_sla/ixp400.htm"
LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425swr1.htm"
# You must download the following software to your OpenEmbedded downloads
# directory before using this package:
#
#	IPL_ixp400AccessLibrary-2_1.zip
#	IPL_ixp400NpeLibrary-2_1.zip
#
# To do this go to the LICENSE_HOMEPAGE above, register/login (using a
# web browser which is supported by the login page), this will give you
# access to the web page from which you can download the software - you
# need the: "Intel® IXP400 Software and RedBoot* Boot Loader" and, from
# this the "Intel Hardware Access Software" and "NPE Microcode" (both
# versions 2.1, encryption is not required.)
#
# Store the files with the names given below in your downloads directory
# and store the 32 character md5sum of the file in a file of the same
# name with the additional extension .md5:
#
#	IPL_ixp400AccessLibrary-2_1.zip.md5
#	IPL_ixp400NpeLibrary-2_1.zip.md5
#
SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400AccessLibrary-2_1.zip"
SRC_URI += "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400NpeLibrary-2_1.zip"
SRC_URI += "file://Makefile.patch;patch=1"
SRC_URI += "file://ixethdb-header.patch;patch=1"
SRC_URI += "file://bit-macro.patch;patch=1"
SRC_URI += "file://ixnpemhconfigisr-is-private.patch;patch=1"
SRC_URI += "file://le.patch;patch=1"
SRC_URI += "file://mii-debug.patch;patch=1"
SRC_URI += "file://rtl8201-support.patch;patch=1"
SRC_URI += "file://gcc4.patch;patch=1"
SRC_URI += "file://oe-makefile.patch;patch=1"
SRC_URI += "file://livelock.patch;patch=1"
SRC_URI += "file://module-param.patch;patch=1"

DEPENDS = "ixp-osal"
S = "${WORKDIR}/ixp400_xscale_sw"
PR = "r12"

COMPATIBLE_HOST = "^arm.*-linux.*"
COMPATIBLE_MACHINE = "(nslu2|ixp4xx)"

inherit module

IX_TARGET = "linux${SITEINFO_ENDIANESS}"
IX_ENSURE = ""
#IX_ENSURE = "IX_OSAL_ENSURE_ON=1"

OSAL_PATH = "lib/ixp425/linux/${IX_TARGET}"
# This is a somewhat arbitrary choice:
OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"

# COMPONENTS: do not build all the components, this just creates a
# ridiculously large module which duplicates functionality in the
# available Linux drivers.
COMPONENTS = "qmgr npeMh npeDl ethAcc ethDB ethMii featureCtrl osServices oslinux"
CODELETS_COMPONENTS = ""

# NOTE: IX_INCLUDE_MICROCODE causes the microcode to be included in
# the ixp4xx-csr module, this *requires* the IPL_ixp400NpeLibrary-2_1.zip
# to be added to the SRC_URI - see above.
EXTRA_OEMAKE = "'AR=${AR}' \
		'IX_XSCALE_SW=${S}' \
		'IX_TARGET=${IX_TARGET}' \
		'${IX_TARGET}_COMPONENTS=${COMPONENTS}' \
		'${IX_TARGET}_CODELETS_COMPONENTS=${CODELETS_COMPONENTS}' \
		'IX_DEVICE=ixp42X' \
		'IX_INCLUDE_MICROCODE=1' \
		'IX_UTOPIAMODE=0' \
		'IX_MPHYSINGLEPORT=1' \
		${IX_ENSURE} \
		'LINUX_SRC=${STAGING_KERNEL_DIR}' \
		'LINUX_CROSS_COMPILE=${HOST_PREFIX}' \
		'OSAL_DIR=${OSAL_DIR}' \
		'OSAL_IMAGE=${OSAL_DIR}/${OSAL_PATH}/libosal.a' \
		'OSAL_MODULE=${OSAL_DIR}/${OSAL_PATH}/ixp_osal.o' \
		"

MAKE_TARGETS = "lib/${IX_TARGET}/ixp400.o"

KCONFIG_FILE = "${STAGING_KERNEL_DIR}/kernel-config"
do_stage () {
	install -d ${STAGING_INCDIR}/linux/ixp4xx-csr
	install -m 0644 src/include/*.h ${STAGING_INCDIR}/linux/ixp4xx-csr/
	# Since Module.symvers in the kernel staging directory doesn't include
	# the symbols from ixp400.o we need to add them to another file for
	# the ixp400-eth build
	rm -f '${STAGING_KERNEL_DIR}/ixp400-csr.symvers'
	. '${KCONFIG_FILE}'
	if '${STAGING_KERNEL_DIR}/scripts/mod/modpost' \
		${CONFIG_MODVERSIONS:+-m} \
		${CONFIG_MODULE_SRCVERSION_ALL:+-a} \
		-i '${STAGING_KERNEL_DIR}/Module.symvers' \
		-o '${STAGING_KERNEL_DIR}/ixp400-csr.symvers' \
		${MAKE_TARGETS} 2>&1 | egrep .
	then
		echo "MODPOST errors - see above"
		return 1
	else
		return 0
	fi
}

do_install () {
	install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/ixp400
	install -m 0644 lib/${IX_TARGET}/ixp400.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/ixp400/
}


text:
package oauth

import (
	"crypto/rand"
	"crypto/rsa"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"net/http/httptest"
	"net/url"
	"sort"
	"testing"

	"github.com/sirupsen/logrus"
	"github.com/stretchr/testify/assert"
	jose "gopkg.in/square/go-jose.v2"

	"github.com/dexidp/dex/connector"
)

func TestOpen(t *testing.T) {
	tokenClaims := map[string]interface{}{}
	userInfoClaims := map[string]interface{}{}

	testServer := testSetup(t, tokenClaims, userInfoClaims)
	defer testServer.Close()

	conn := newConnector(t, testServer.URL)

	sort.Strings(conn.scopes)

	assert.Equal(t, conn.clientID, "testClient")
	assert.Equal(t, conn.clientSecret, "testSecret")
	assert.Equal(t, conn.redirectURI, testServer.URL+"/callback")
	assert.Equal(t, conn.tokenURL, testServer.URL+"/token")
	assert.Equal(t, conn.authorizationURL, testServer.URL+"/authorize")
	assert.Equal(t, conn.userInfoURL, testServer.URL+"/userinfo")
	assert.Equal(t, len(conn.scopes), 2)
	assert.Equal(t, conn.scopes[0], "groups")
	assert.Equal(t, conn.scopes[1], "openid")
}

func TestLoginURL(t *testing.T) {
	tokenClaims := map[string]interface{}{}
	userInfoClaims := map[string]interface{}{}

	testServer := testSetup(t, tokenClaims, userInfoClaims)
	defer testServer.Close()

	conn := newConnector(t, testServer.URL)

	loginURL, err := conn.LoginURL(connector.Scopes{}, conn.redirectURI, "some-state")
	assert.Equal(t, err, nil)

	expectedURL, err := url.Parse(testServer.URL + "/authorize")
	assert.Equal(t, err, nil)

	values := url.Values{}
	values.Add("client_id", "testClient")
	values.Add("redirect_uri", conn.redirectURI)
	values.Add("response_type", "code")
	values.Add("scope", "openid groups")
	values.Add("state", "some-state")
	expectedURL.RawQuery = values.Encode()

	assert.Equal(t, loginURL, expectedURL.String())
}

func TestHandleCallBackForGroupsInUserInfo(t *testing.T) {
	tokenClaims := map[string]interface{}{}

	userInfoClaims := map[string]interface{}{
		"name":               "test-name",
		"user_id_key":        "test-user-id",
		"user_name_key":      "test-username",
		"preferred_username": "test-preferred-username",
		"mail":               "mod_mail",
		"has_verified_email": false,
		"groups_key":         []string{"admin-group", "user-group"},
	}

	testServer := testSetup(t, tokenClaims, userInfoClaims)
	defer testServer.Close()

	conn := newConnector(t, testServer.URL)
	req := newRequestWithAuthCode(t, testServer.URL, "TestHandleCallBackForGroupsInUserInfo")

	identity, err := conn.HandleCallback(connector.Scopes{Groups: true}, req)
	assert.Equal(t, err, nil)

	sort.Strings(identity.Groups)
	assert.Equal(t, len(identity.Groups), 2)
	assert.Equal(t, identity.Groups[0], "admin-group")
	assert.Equal(t, identity.Groups[1], "user-group")
	assert.Equal(t, identity.UserID, "test-user-id")
	assert.Equal(t, identity.Username, "test-username")
	assert.Equal(t, identity.PreferredUsername, "test-preferred-username")
	assert.Equal(t, identity.Email, "mod_mail")
	assert.Equal(t, identity.EmailVerified, false)
}

func TestHandleCallBackForGroupMapsInUserInfo(t *testing.T) {
	tokenClaims := map[string]interface{}{}

	userInfoClaims := map[string]interface{}{
		"name":               "test-name",
		"user_id_key":        "test-user-id",
		"user_name_key":      "test-username",
		"preferred_username": "test-preferred-username",
		"mail":               "mod_mail",
		"has_verified_email": false,
		"groups_key": []interface{}{
			map[string]string{"name": "admin-group", "id": "111"},
			map[string]string{"name": "user-group", "id": "222"},
		},
	}

	testServer := testSetup(t, tokenClaims, userInfoClaims)
	defer testServer.Close()

	conn := newConnector(t, testServer.URL)
	req := newRequestWithAuthCode(t, testServer.URL, "TestHandleCallBackForGroupMapsInUserInfo")

	identity, err := conn.HandleCallback(connector.Scopes{Groups: true}, req)
	assert.Equal(t, err, nil)

	sort.Strings(identity.Groups)
	assert.Equal(t, len(identity.Groups), 2)
	assert.Equal(t, identity.Groups[0], "admin-group")
	assert.Equal(t, identity.Groups[1], "user-group")
	assert.Equal(t, identity.UserID, "test-user-id")
	assert.Equal(t, identity.Username, "test-username")
	assert.Equal(t, identity.PreferredUsername, "test-preferred-username")
	assert.Equal(t, identity.Email, "mod_mail")
	assert.Equal(t, identity.EmailVerified, false)
}

func TestHandleCallBackForGroupsInToken(t *testing.T) {
	tokenClaims := map[string]interface{}{
		"groups_key": []string{"test-group"},
	}

	userInfoClaims := map[string]interface{}{
		"name":               "test-name",
		"user_id_key":        "test-user-id",
		"user_name_key":      "test-username",
		"preferred_username": "test-preferred-username",
		"email":              "test-email",
		"email_verified":     true,
	}

	testServer := testSetup(t, tokenClaims, userInfoClaims)
	defer testServer.Close()

	conn := newConnector(t, testServer.URL)
	req := newRequestWithAuthCode(t, testServer.URL, "TestHandleCallBackForGroupsInToken")

	identity, err := conn.HandleCallback(connector.Scopes{Groups: true}, req)
	assert.Equal(t, err, nil)

	assert.Equal(t, len(identity.Groups), 1)
	assert.Equal(t, identity.Groups[0], "test-group")
	assert.Equal(t, identity.PreferredUsername, "test-preferred-username")
	assert.Equal(t, identity.UserID, "test-user-id")
	assert.Equal(t, identity.Username, "test-username")
	assert.Equal(t, identity.Email, "")
	assert.Equal(t, identity.EmailVerified, false)
}

func TestHandleCallbackForNumericUserID(t *testing.T) {
	tokenClaims := map[string]interface{}{}

	userInfoClaims := map[string]interface{}{
		"name":               "test-name",
		"user_id_key":        1000,
		"user_name_key":      "test-username",
		"preferred_username": "test-preferred-username",
		"mail":               "mod_mail",
		"has_verified_email": false,
	}

	testServer := testSetup(t, tokenClaims, userInfoClaims)
	defer testServer.Close()

	conn := newConnector(t, testServer.URL)
	req := newRequestWithAuthCode(t, testServer.URL, "TestHandleCallbackForNumericUserID")

	identity, err := conn.HandleCallback(connector.Scopes{Groups: true}, req)
	assert.Equal(t, err, nil)

	assert.Equal(t, identity.UserID, "1000")
	assert.Equal(t, identity.Username, "test-username")
	assert.Equal(t, identity.PreferredUsername, "test-preferred-username")
	assert.Equal(t, identity.Email, "mod_mail")
	assert.Equal(t, identity.EmailVerified, false)
}

func testSetup(t *testing.T, tokenClaims map[string]interface{}, userInfoClaims map[string]interface{}) *httptest.Server {
	key, err := rsa.GenerateKey(rand.Reader, 1024)
	if err != nil {
		t.Fatal("Failed to generate rsa key", err)
	}

	jwk := jose.JSONWebKey{
		Key:       key,
		KeyID:     "some-key",
		Algorithm: "RSA",
	}

	mux := http.NewServeMux()

	mux.HandleFunc("/token", func(w http.ResponseWriter, r *http.Request) {
		token, err := newToken(&jwk, tokenClaims)
		if err != nil {
			t.Fatal("unable to generate token", err)
		}

		w.Header().Add("Content-Type", "application/json")
		json.NewEncoder(w).Encode(&map[string]string{
			"access_token": token,
			"id_token":     token,
			"token_type":   "Bearer",
		})
	})

	mux.HandleFunc("/userinfo", func(w http.ResponseWriter, r *http.Request) {
		w.Header().Add("Content-Type", "application/json")
		json.NewEncoder(w).Encode(userInfoClaims)
	})

	return httptest.NewServer(mux)
}

func newToken(key *jose.JSONWebKey, claims map[string]interface{}) (string, error) {
	signingKey := jose.SigningKey{Key: key, Algorithm: jose.RS256}

	signer, err := jose.NewSigner(signingKey, &jose.SignerOptions{})
	if err != nil {
		return "", fmt.Errorf("new signer: %v", err)
	}

	payload, err := json.Marshal(claims)
	if err != nil {
		return "", fmt.Errorf("marshaling claims: %v", err)
	}

	signature, err := signer.Sign(payload)
	if err != nil {
		return "", fmt.Errorf("signing payload: %v", err)
	}

	return signature.CompactSerialize()
}

func newConnector(t *testing.T, serverURL string) *oauthConnector {
	testConfig := Config{
		ClientID:         "testClient",
		ClientSecret:     "testSecret",
		RedirectURI:      serverURL + "/callback",
		TokenURL:         serverURL + "/token",
		AuthorizationURL: serverURL + "/authorize",
		UserInfoURL:      serverURL + "/userinfo",
		Scopes:           []string{"openid", "groups"},
		UserIDKey:        "user_id_key",
	}

	testConfig.ClaimMapping.UserNameKey = "user_name_key"
	testConfig.ClaimMapping.GroupsKey = "groups_key"
	testConfig.ClaimMapping.EmailKey = "mail"
	testConfig.ClaimMapping.EmailVerifiedKey = "has_verified_email"

	log := logrus.New()

	conn, err := testConfig.Open("id", log)
	if err != nil {
		t.Fatal(err)
	}

	oauthConn, ok := conn.(*oauthConnector)
	if !ok {
		t.Fatal(errors.New("failed to convert to oauthConnector"))
	}

	return oauthConn
}

func newRequestWithAuthCode(t *testing.T, serverURL string, code string) *http.Request {
	req, err := http.NewRequest("GET", serverURL, nil)
	if err != nil {
		t.Fatal("failed to create request", err)
	}

	values := req.URL.Query()
	values.Add("code", code)
	req.URL.RawQuery = values.Encode()

	return req
}

repository: dexidp/dex

repo_name: dexidp/dex


text:
package main

import (
	"fmt"

	"bazil.org/fuse"
	"bazil.org/fuse/fs"
	"github.com/daos-stack/go-daos/pkg/daosfs"
	"github.com/intel-hpdd/logging/debug"
)

func mount(group, pool, name, mountpoint string) error {
	dfs, err := daosfs.NewFileSystem(group, pool, name)
	if err != nil {
		return err
	}
	defer dfs.Fini()

	if mountpoint == "" {
		mountpoint = "/mnt/" + name
	}
	c, err := fuse.Mount(mountpoint)
	if err != nil {
		return err
	}
	defer c.Close()

	srv := fs.New(c, &fs.Config{
		Debug: func(msg interface{}) {
			if !debug.Enabled() {
				return
			}
			debug.Output(4, fmt.Sprint(msg))
		},
	})
	filesystem := &FS{
		dfs: dfs,
	}
	root := NewNode(dfs.Root())
	filesystem.root = root
	if err := srv.Serve(filesystem); err != nil {
		return err
	}

	<-c.Ready
	return c.MountError // should be nil
}

repository: daos-stack/go-daos

repo_name: daos-stack/go-daos


text:
// MIT License
// Author: Umesh Patil, Neosemantix, Inc.

// There are three methods to initialize logs and set log settings:
//
// 1) Caller can pass LoggingCfg structure as defined here to initialize logs.
//
// 2) Alternatively, assuming caller has used 'cfg' program in the 'util' package,
// that 'uber' configuration file can be passed as long as it has a JSON member
// of name "LogSettings". The configuration file can be passed:
// - either with the absolute path
// - or the file name only in which case GP_CFG_HOME environment variable value
// is used as the directory name where the give configuration file is located.
//
// 3) Finally, caller can explicitly call InitializeLog method with arguments.
// The file path can be absolute. It is not absolute, it is appended to the
// current working directory.
//
// Until LoggingCfg is set, GlobalLogSettings will be nil. All log calls will be
// handled by the built in logging facility of Golang. Once the logging is
// initialized by one of the above mentioned 3 methods; log calls will be
// directing the output to the specified rotating log file.
package util

import (
	"encoding/json"
	"fmt"
	"gopkg.in/natefinch/lumberjack.v2"
	"log"
	"path/filepath"
)

type LoggingCfg struct {
	LogFileName  string
	MaxSizeInMb  int
	Backups      int
	AgeInDays    int
	Compress     bool
	LogOnConsole bool
	DebugLog     bool
}

// Name of the Json element in any Json Configuration file which contains
// LoggingCfg structure value.
const LoggingCfgJsonElementName = "LogSettings"

// Pointer to a structure which holds log settings in effect.
var GlobalLogSettings *LoggingCfg

// Initialize logging to given inputs:
// fn	:	Log files with fill path
// ms	:	Maximum allowed log file size  in Megabytes
// bk	:	How many backups to be retained.
// age	:	Past logs of how many days to be retained.
// compress:	Whether logs are compressed or not.
func InitializeLog(fn string, ms int, bk int, age int, compress bool) {
	log.SetOutput(&lumberjack.Logger{
		Filename:   fn,
		MaxSize:    ms, // megabytes
		MaxBackups: bk,
		MaxAge:     age,      //days
		Compress:   compress, // disabled by default
	})
	logFilePath, _ := filepath.Abs(fn)
	log.Printf("logFilePath: %s\n", logFilePath)
	GlobalLogSettings = &LoggingCfg{}
	GlobalLogSettings.LogFileName = fn
	GlobalLogSettings.MaxSizeInMb = ms
	GlobalLogSettings.Backups = bk
	GlobalLogSettings.AgeInDays = age
	GlobalLogSettings.Compress = compress
	if GlobalLogSettings.LogOnConsole {
		// typically it will be false when GlobalLogSettings is created
		fmt.Printf("logFilePath: %s\n", logFilePath)
	}
}

func SetLoggingCfg(ls *LoggingCfg) {
	if ls != nil {
		InitializeLog(ls.LogFileName, ls.MaxSizeInMb, ls.Backups, ls.AgeInDays, ls.Compress)
		GlobalLogSettings.DebugLog = ls.DebugLog
		GlobalLogSettings.LogOnConsole = ls.LogOnConsole
	} else {
		log.Fatal("Logging configuration is nil")
	}
}

// It assumes argument configuration file in JSON format and it contains an
// element named LogSettings. Contents of that member are used to build the
// log setting configuration.
func SetLogSettings(cfgFileName string) {
	if len(cfgFileName) > 0 {
		ls, err := ExtractCfgJsonEleFromFile(cfgFileName, LoggingCfgJsonElementName)
		if err != nil {
			fmt.Println(fmt.Sprintf("Error extracting LogSettings from the given config file (%s): %v\n", cfgFileName, err))
		} else {
			ls, err := FormLoggingCfg(ls)
			if err != nil {
				fmt.Println(fmt.Sprintf("Error forming LoggingCfg from the given config file (%s): %v\n", cfgFileName, err))
			} else {
				SetLoggingCfg(ls)
				// Log the setting values which will be used
				Log(fmt.Sprintf("Log Settings: %v\n", ls))
			}
		}
	} else {
		msg := "configuration file is nil"
		fmt.Println(msg)
		log.Fatal(msg)
	}
}

// Make logging configuration struct from the given input string.
func FormLoggingCfg(ls []byte) (*LoggingCfg, error) {
	var lc LoggingCfg
	err := json.Unmarshal([]byte(ls), &lc)
	return &lc, err
}

// Enable or disable the console logging
func SetConsoleLog(val bool) {
	GlobalLogSettings.LogOnConsole = val
}

// Enable or disable debug logging.
func SetDebugLog(val bool) {
	GlobalLogSettings.DebugLog = val
}

// Log the given message.
func Log(msg string) {
	log.Println(msg)
	if GlobalLogSettings.LogOnConsole {
		fmt.Println(msg)
	}
}

// Log debug messages. Invocation of this call will result in adding the message
// to the log provided SetDebugLog(true) is called.
func LogDebug(msg string) {
	if GlobalLogSettings.DebugLog {
		Log(msg)
	}
}

// Indicates whether logging has been configured or not.
func IsLoggingConfigured() bool {
	if GlobalLogSettings != nil {
		return true
	} else {
		return false
	}
}

repository: umeshgeeta/goshared

repo_name: umeshgeeta/goshared


text:
package software

import (
	//"fmt"
	"os/exec"
	"runtime"
)

type Profiler interface {
        AddMetadata([]byte)
        AddPart(string)
        AddPartData([]byte)
}

func GetSoftware(p Profiler) error  {
	//software = new(HeaderType)
        //	_ = AddMetadata(software)
	var pkg_query string
	var pkg_list []byte

	switch os := runtime.GOOS; os {
	case "darwin":
		pkg_query = "select * from homebrew_packages"
	case "linux":
		pkg_query = "select * from rpm_packages"
	case "windows":
		pkg_query = "select * from programs"
	}

	p.AddPart("software")
	pkg_cmd := "osqueryi"
	pkg_list, _ = exec.Command(pkg_cmd, pkg_query, "--json").Output()

	p.AddPartData(pkg_list)
	return nil
}

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

repository: jercherng/profiler

repo_name: jercherng/profiler


text:
file(REMOVE_RECURSE
  "CMakeFiles/paex_record_file.dir/paex_record_file.o"
  "paex_record_file"
  "paex_record_file.pdb"
)

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

repository: okicampos/soundengine

repo_name: okicampos/soundengine


text:
DESCRIPTION = "nylon preliminary web configuration interface"
SECTION = "base"
PRIORITY = "optional"
MAINTAINER = "Bruno Randolf <bruno.randolf@4g-systems.biz>"
LICENSE = "closed"
DEPENDS = "perl virtual/kernel hostap-daemon busybox"
RDEPENDS_${PN} = "perl perl-module-exporter perl-module-posix perl-module-autoloader perl-module-strict perl-module-xsloader perl-module-data-dumper perl-module-carp perl-module-bytes perl-module-overload perl-module-warnings-register perl-module-warnings  kernel-module-aes madwifi-modules hostap-daemon simple-firewall wlan-ng-utils busybox-httpd"
CVSDATE = "20051026"
PV = "cvs${CVSDATE}"
PR = "r1"

SRC_URI = "http://br1.einfach.org/nylon/stable/sources/nylon-config_gruen.4g__20051026.tar.gz"
S = "${WORKDIR}/${PN}"

do_install() {
	(cd ${S}; tar -c --exclude .svn -f - . ) | tar -C ${D} -xpf -
	# chmod 600 ${D}/etc/certs/stunnel.key
	chmod a+x ${D}/srv/www/cgi-bin/*
}

pkg_postinst() {
#!/bin/sh
if test "x$D" != "x"; then
	exit 1
fi

# Create resolv.conf-link to ppp-file
rm /etc/resolv.conf
ln -s /etc/ppp/resolv.conf /etc/resolv.conf

# enable factorydefaults
update-rc.d factorydefaults start 90 2 .

# "fix" /etc/network/interfaces
perl -I /srv/www/cgi-bin -MConfig::IFace -e '$w=new Config::IFace(); $v = $w->read(); $v->{auto} = {0=>"lo",1=>eth0,2=>"wlan0",3=>"wlan1",4=>"ath0",5=>"ath1"}; $w->write($v)'

update-rc.d busybox-httpd start 40 2 3 4 5 .
/etc/init.d/busybox-httpd restart
}

FILES_${PN} += "/srv"

SRC_URI[md5sum] = "f373680b3b792925eb5293eafe487168"
SRC_URI[sha256sum] = "c848b2a53396e51fccb589c56ddba928671f08d30bece7883dc69f4fa5f8e113"


text:
% Generated by Paperpile. Check out https://paperpile.com for more information.
% BibTeX export options can be customized via Settings -> BibTeX.

@ARTICLE{Gabry2019-ra,
  title     = "Visualization in Bayesian workflow",
  author    = "Gabry, Jonah and Simpson, Daniel and Vehtari, Aki and
               Betancourt, Michael and Gelman, Andrew",
  abstract  = "Abstract Bayesian data analysis is about more than just
               computing a posterior distribution, and Bayesian visualization
               is about more than trace plots of Markov chains. Practical
               Bayesian data analysis, like all data analysis, is an iterative
               process of model building, inference, model checking and
               evaluation, and model expansion. Visualization is helpful in
               each of these stages of the Bayesian workflow and it is
               indispensable when drawing inferences from the types of modern,
               high dimensional models that are used by applied researchers.",
  journal   = "J. R. Stat. Soc. Ser. A Stat. Soc.",
  publisher = "Wiley",
  volume    =  182,
  number    =  2,
  pages     = "389--402",
  month     =  feb,
  year      =  2019,
  keywords  = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression",
  copyright = "http://onlinelibrary.wiley.com/termsAndConditions\#vor",
  language  = "en"
}

@ARTICLE{Vehtari2015-wc,
  title         = "Pareto Smoothed Importance Sampling",
  author        = "Vehtari, Aki and Simpson, Daniel and Gelman, Andrew and Yao,
                   Yuling and Gabry, Jonah",
  abstract      = "Importance weighting is a general way to adjust Monte Carlo
                   integration to account for draws from the wrong
                   distribution, but the resulting estimate can be noisy when
                   the importance ratios have a heavy right tail. This
                   routinely occurs when there are aspects of the target
                   distribution that are not well captured by the approximating
                   distribution, in which case more stable estimates can be
                   obtained by modifying extreme importance ratios. We present
                   a new method for stabilizing importance weights using a
                   generalized Pareto distribution fit to the upper tail of the
                   distribution of the simulated importance ratios. The method,
                   which empirically performs better than existing methods for
                   stabilizing importance sampling estimates, includes
                   stabilized effective sample size estimates, Monte Carlo
                   error estimates and convergence diagnostics.",
  month         =  jul,
  year          =  2015,
  keywords      = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian
                   Regression",
  archivePrefix = "arXiv",
  primaryClass  = "stat.CO",
  eprint        = "1507.02646"
}

@BOOK{Kurz_undated-lt,
  title    = "Statistical Rethinking with brms, ggplot2, and the tidyverse",
  author   = "Kurz, Solomon",
  edition  = "v1.0.1",
  keywords = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression"
}

@ARTICLE{Van_de_Schoot2020-ei,
  title    = "A tutorial on using the {WAMBS} checklist to avoid the misuse of
              Bayesian statistics",
  author   = "Van de Schoot, Rens and Veen, Duco and Smeets, Laurent and
              Winter, Sonja D and Depaoli, Sarah",
  journal  = "Small Sample Size Solutions: A Guide for Applied Researchers and
              Practitioners; van de Schoot, R. , Miocevic, M. , Eds",
  pages    = "30--49",
  year     =  2020,
  keywords = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression"
}

@MISC{Team2013-nq,
  title     = "R: A language and environment for statistical computing",
  author    = "Team, R Core and {Others}",
  publisher = "Vienna, Austria",
  year      =  2013,
  keywords  = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression"
}

@ARTICLE{Wickham2019-jb,
  title     = "Welcome to the tidyverse",
  author    = "Wickham, Hadley and Averick, Mara and Bryan, Jennifer and Chang,
               Winston and McGowan, Lucy and Fran{\c c}ois, Romain and
               Grolemund, Garrett and Hayes, Alex and Henry, Lionel and Hester,
               Jim and Kuhn, Max and Pedersen, Thomas and Miller, Evan and
               Bache, Stephan and M{\"u}ller, Kirill and Ooms, Jeroen and
               Robinson, David and Seidel, Dana and Spinu, Vitalie and
               Takahashi, Kohske and Vaughan, Davis and Wilke, Claus and Woo,
               Kara and Yutani, Hiroaki",
  journal   = "J. Open Source Softw.",
  publisher = "The Open Journal",
  volume    =  4,
  number    =  43,
  pages     = "1686",
  month     =  nov,
  year      =  2019,
  keywords  = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression",
  copyright = "http://creativecommons.org/licenses/by/4.0/"
}

@ARTICLE{Kay2018-kn,
  title    = "tidybayes: Tidy data and geoms for Bayesian models",
  author   = "Kay, M",
  journal  = "R package version",
  volume   =  1,
  number   =  3,
  year     =  2018,
  keywords = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression"
}

@ARTICLE{Gabry2017-jm,
  title    = "bayesplot: Plotting for Bayesian models",
  author   = "Gabry, Jonah and Mahr, Tristan",
  journal  = "R package version",
  volume   =  1,
  number   =  0,
  year     =  2017,
  keywords = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression"
}

% The entry below contains non-ASCII chars that could not be converted
% to a LaTeX equivalent.
@ARTICLE{Carpenter2017-pj,
  title     = "Stan: A probabilistic programming language",
  author    = "Carpenter, B and Gelman, A and Hoffman, M D and Lee, D and
               {others}",
  abstract  = "… The inverse mass matrix is estimated by regularizing the
               sample (co)variance of the latter half of the warmup iterations;
               see ( Stan Development Team 2016) for full details … 2013) and (
               Stan Development Team 2016) for definitions …",
  journal   = "Journal of statistical",
  publisher = "osti.gov",
  year      =  2017,
  keywords  = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression"
}

@ARTICLE{Gelman2020-sf,
  title         = "Bayesian Workflow",
  author        = "Gelman, Andrew and Vehtari, Aki and Simpson, Daniel and
                   Margossian, Charles C and Carpenter, Bob and Yao, Yuling and
                   Kennedy, Lauren and Gabry, Jonah and B{\"u}rkner,
                   Paul-Christian and Modr{\'a}k, Martin",
  abstract      = "The Bayesian approach to data analysis provides a powerful
                   way to handle uncertainty in all observations, model
                   parameters, and model structure using probability theory.
                   Probabilistic programming languages make it easier to
                   specify and fit Bayesian models, but this still leaves us
                   with many options regarding constructing, evaluating, and
                   using these models, along with many remaining challenges in
                   computation. Using Bayesian inference to solve real-world
                   problems requires not only statistical skills, subject
                   matter knowledge, and programming, but also awareness of the
                   decisions made in the process of data analysis. All of these
                   aspects can be understood as part of a tangled workflow of
                   applied Bayesian statistics. Beyond inference, the workflow
                   also includes iterative model building, model checking,
                   validation and troubleshooting of computational problems,
                   model understanding, and model comparison. We review all
                   these aspects of workflow in the context of several
                   examples, keeping in mind that in practice we will be
                   fitting many models for any given problem, even if only a
                   subset of them will ultimately be relevant for our
                   conclusions.",
  month         =  nov,
  year          =  2020,
  keywords      = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian
                   Regression",
  archivePrefix = "arXiv",
  primaryClass  = "stat.ME",
  eprint        = "2011.01808"
}

@BOOK{McElreath2016-ef,
  title     = "Statistical Rethinking: A Bayesian Course with Examples in {R}
               and Stan",
  author    = "McElreath, Richard",
  abstract  = "Statistical Rethinking: A Bayesian Course with Examples in R and
               Stan builds readers' knowledge of and confidence in statistical
               modeling. Reflecting the need for even minor programming in
               today's model-based statistics, the book pushes readers to
               perform step-by-step calculations that are usually automated.
               This unique computational approach ensures that readers
               understand enough of the details to make reasonable choices and
               interpretations in their own modeling work. The text presents
               generalized linear multilevel models from a Bayesian
               perspective, relying on a simple logical interpretation of
               Bayesian probability and maximum entropy. It covers from the
               basics of regression to multilevel models. The author also
               discusses measurement error, missing data, and Gaussian process
               models for spatial and network autocorrelation. By using
               complete R code examples throughout, this book provides a
               practical foundation for performing statistical inference.
               Designed for both PhD students and seasoned professionals in the
               natural and social sciences, it prepares them for more advanced
               or specialized statistical modeling. Web ResourceThe book is
               accompanied by an R package (rethinking) that is available on
               the author's website and GitHub. The two core functions (map and
               map2stan) of this package allow a variety of statistical models
               to be constructed from standard model formulas.",
  publisher = "CRC Press/Taylor \& Francis Group",
  year      =  2016,
  keywords  = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression",
  language  = "en"
}

@ARTICLE{Vehtari2017-pw,
  title    = "Practical Bayesian model evaluation using leave-one-out
              cross-validation and {WAIC}",
  author   = "Vehtari, Aki and Gelman, Andrew and Gabry, Jonah",
  abstract = "Leave-one-out cross-validation (LOO) and the widely applicable
              information criterion (WAIC) are methods for estimating pointwise
              out-of-sample prediction accuracy from a fitted Bayesian model
              using the log-likelihood evaluated at the posterior simulations
              of the parameter values. LOO and WAIC have various advantages
              over simpler estimates of predictive error such as AIC and DIC
              but are less used in practice because they involve additional
              computational steps. Here we lay out fast and stable computations
              for LOO and WAIC that can be performed using existing simulation
              draws. We introduce an efficient computation of LOO using
              Pareto-smoothed importance sampling (PSIS), a new procedure for
              regularizing importance weights. Although WAIC is asymptotically
              equal to LOO, we demonstrate that PSIS-LOO is more robust in the
              finite case with weak priors or influential observations. As a
              byproduct of our calculations, we also obtain approximate
              standard errors for estimated predictive errors and for
              comparison of predictive errors between two models. We implement
              the computations in an R package called loo and demonstrate using
              models fit with the Bayesian inference package Stan.",
  journal  = "Stat. Comput.",
  volume   =  27,
  number   =  5,
  pages    = "1413--1432",
  month    =  sep,
  year     =  2017,
  keywords = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression"
}

@ARTICLE{Burkner2017-ww,
  title    = "brms: An {R} Package for Bayesian Multilevel Models Using Stan",
  author   = "B{\"u}rkner, Paul-Christian",
  abstract = "The brms package implements Bayesian multilevel models in R using
              the probabilistic programming language Stan. A wide range of
              distributions and link functions are supported, allowing users to
              fit - among others - linear, robust linear, binomial, Poisson,
              survival, ordinal, zero-inflated, hurdle, and even non-linear
              models all in a multilevel context. Further modeling options
              include autocorrelation of the response variable, user defined
              covariance structures, censored data, as well as meta-analytic
              standard errors. Prior specifications are flexible and explicitly
              encourage users to apply prior distributions that actually
              reflect their beliefs. In addition, model fit can easily be
              assessed and compared with the Watanabe-Akaike information
              criterion and leave-one-out cross-validation.",
  journal  = "Journal of Statistical Software, Articles",
  volume   =  80,
  number   =  1,
  pages    = "1--28",
  year     =  2017,
  keywords = "Bayesian inference; multilevel model; ordinal data; MCMC; Stan;
              R;Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian
              Regression"
}

@ARTICLE{Breiden2019-py,
  title    = "Emerging mechanisms of drug-induced phospholipidosis",
  author   = "Breiden, Bernadette and Sandhoff, Konrad",
  abstract = "Drug-induced phospholipidosis is a lysosomal storage disorder
              characterized by excessive accumulation of phospholipids. Its
              cellular mechanism is still not well understood, but it is known
              that cationic amphiphilic drugs can induce it. These drugs have a
              hydrophilic amine head group that can be protonated in the
              endolysosomal compartment. As cationic amphiphiles, they are
              trapped in lysosomes, where they interfere with negatively
              charged intralysosomal vesicles, the major platforms of cellular
              sphingolipid degradation. Metabolic principles observed in
              sphingolipid and phospholipid catabolism and inherited
              sphingolipidoses are of great importance for lysosomal function
              and physiological lipid turnover at large. Therefore, we also
              propose intralysosomal vesicles as major platforms for
              degradation of lipids and phospholipids reaching them by
              intracellular pathways like autophagy and endocytosis.
              Phospholipids are catabolized as components of vesicle surfaces
              by protonated, positively charged phospholipases,
              electrostatically attracted to the negatively charged vesicles.
              Model experiments suggest that progressively accumulating
              cationic amphiphilic drugs inserting into the vesicle membrane
              with their hydrophobic molecular moieties disturb and attenuate
              the main mechanism of lipid degradation as discussed here. By
              compensating the negative surface charge, cationic enzymes are
              released from the surface of vesicles and proteolytically
              degraded, triggering a progressive lipid storage and the
              formation of inactive lamellar bodies.",
  journal  = "Biol. Chem.",
  volume   =  401,
  number   =  1,
  pages    = "31--46",
  month    =  dec,
  year     =  2019,
  keywords = "acid sphingomyelinase; cationic amphiphilic drugs; lysosomal
              lipid degradation; lysosomal phospholipase; lysosomotropism;
              phospholipid;Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD
              Bayesian Regression",
  language = "en"
}

@BOOK{Wickham2016-xy,
  title     = "ggplot2: Elegant Graphics for Data Analysis",
  author    = "Wickham, Hadley",
  abstract  = "This new edition to the classic book by ggplot2 creator Hadley
               Wickham highlights compatibility with knitr and RStudio. ggplot2
               is a data visualization package for R that helps users create
               data graphics, including those that are multi-layered, with
               ease. With ggplot2, it's easy to: produce handsome,
               publication-quality plots with automatic legends created from
               the plot specificationsuperimpose multiple layers (points,
               lines, maps, tiles, box plots) from different data sources with
               automatically adjusted common scalesadd customizable smoothers
               that use powerful modeling capabilities of R, such as loess,
               linear models, generalized additive models, and robust
               regressionsave any ggplot2 plot (or part thereof) for later
               modification or reusecreate custom themes that capture in-house
               or journal style requirements and that can easily be applied to
               multiple plotsapproach a graph from a visual perspective,
               thinking about how each component of the data is represented on
               the final plot This book will be useful to everyone who has
               struggled with displaying data in an informative and attractive
               way. Some basic knowledge of R is necessary (e.g., importing
               data into R). ggplot2 is a mini-language specifically tailored
               for producing graphics, and you'll learn everything you need in
               the book. After reading this book you'll be able to produce
               graphics customized precisely for your problems, and you'll find
               it easy to get graphics out of your head and on to the screen or
               page.",
  publisher = "Springer",
  month     =  jun,
  year      =  2016,
  keywords  = "Shoichet Lab/SARS-CoV-2/PLD/Infection by PLD Bayesian Regression",
  language  = "en"
}

repository: jilimcaoco/MPProjects

repo_name: jilimcaoco/MPProjects


text:
//
// Copyright 2013 Yangbin Lin. All Rights Reserved.
//
// Author: yblin@jmu.edu.cn (Yangbin Lin)
//
// This file is part of the Code Library.
//
// Description: Euclidean distance between 3D geometric kernel objects.
//

#ifndef GEOMETRY_UTIL_DISTANCE_3D_H_
#define GEOMETRY_UTIL_DISTANCE_3D_H_

#include <cmath>

#include "codelibrary/geometry/kernel/line_3d.h"
#include "codelibrary/geometry/kernel/plane_3d.h"
#include "codelibrary/geometry/kernel/segment_3d.h"

namespace cl {
namespace geometry {

/**
 * Return the squared Euclidean distance between two 3D points.
 */
template <typename T>
double SquaredDistance(const Point3D<T>& p1, const Point3D<T>& p2) {
    double t1 = static_cast<double>(p1.x) - p2.x;
    double t2 = static_cast<double>(p1.y) - p2.y;
    double t3 = static_cast<double>(p1.z) - p2.z;
    return t1 * t1 + t2 * t2 + t3 * t3;
}

/**
 * Return the Euclidean distance between two 3D points.
 */
template <typename T>
double Distance(const Point3D<T>& p1, const Point3D<T>& p2) {
    return std::sqrt(SquaredDistance(p1, p2));
}

/**
 * Return the Euclidean distance from point to plane.
 */
template <typename T>
double Distance(const Point3D<T>& p, const Plane3D<T>& plane) {
    double a = plane.normal().x;
    double b = plane.normal().y;
    double c = plane.normal().z;
    double d = -a * plane.point().x - b * plane.point().y - c * plane.point().z;

    return std::fabs(a * p.x + b * p.y + c * p.z + d) /
           std::sqrt(a * a + b * b + c * c);
}
template <typename T>
double Distance(const Plane3D<T>& plane, const Point3D<T>& p) {
    return Distance(p, plane);
}

/**
 * Return the Euclidean distance from point to segment.
 */
template <typename T>
double Distance(const Point3D<T>& p, const Segment3D<T>& segment) {
    if (segment.lower_point() == segment.upper_point()) {
        return Distance(p, segment.lower_point());
    }

    Vector3D<T> v0 = segment.upper_point() - segment.lower_point();
    Vector3D<T> v1 = p - segment.lower_point();

    double t1 = v0 * v1;
    if (t1 < 0.0) {
        return Distance(p, segment.lower_point());
    }

    double t2 = v0 * v0;
    if (t2 <= t1) {
        return Distance(p, segment.upper_point());
    }

    double b = t1 / t2;
    RPoint3D pb(b * v0.x + segment.lower_point().x,
                b * v0.y + segment.lower_point().y,
                b * v0.z + segment.lower_point().z);

    return Distance(p, pb);
}
template <typename T>
double Distance(const Segment3D<T>& seg, const Point3D<T>& p) {
    return Distance(p, seg);
}

/**
 * Return the Euclidean distance from point to line.
 */
template <typename T>
double Distance(const Point3D<T>& p, const Line3D<T>& line) {
    const Vector3D<T>& v0 = line.direction();
    Vector3D<T> v1 = p - line.point1();

    double t1 = v0 * v1;
    double t2 = v0 * v0;
    double b = t1 / t2;
    RPoint3D pb(b * v0.x + line.point1().x, b * v0.y + line.point1().y,
                b * v0.z + line.point1().z);

    return Distance(p, pb);
}
template <typename T>
double Distance(const Line3D<T>& line, const Point3D<T>& p) {
    return Distance(p, line);
}

} // namespace geometry
} // namespace cl

#endif // GEOMETRY_UTIL_DISTANCE_3D_H_

extension: h


text:
@article{Sayers_2010,
 author = {Sayers, E. W. and Barrett, T. and Benson, D. A. and Bolton, E. and Bryant, S. H. and Canese, K. and Chetvernin, V. and Church, D. M. and DiCuccio, M. and Federhen, S. and Feolo, M. and Fingerman, I. M. and Geer, L. Y. and Helmberg, W. and Kapustin, Y. and Landsman, D. and Lipman, D. J. and Lu, Z. and Madden, T. L. and Madej, T. and Maglott, D. R. and Marchler-Bauer, A. and Miller, V. and Mizrachi, I. and Ostell, J. and Panchenko, A. and Phan, L. and Pruitt, K. D. and Schuler, G. D. and Sequeira, E. and Sherry, S. T. and Shumway, M. and Sirotkin, K. and Slotta, D. and Souvorov, A. and Starchenko, G. and Tatusova, T. A. and Wagner, L. and Wang, Y. and Wilbur, W. J. and Yaschenko, E. and Ye, J.},
 title = {Database resources of the National Center for Biotechnology Information},
 journal = {Nucleic Acids Research},
 publisher = {Oxford University Press ({OUP})},
 year = {2010},
 month = {nov},
 number = {Database},
 volume = {39},
 pages = {D38--D51},
 url = {https://doi.org/10.1093%2Fnar%2Fgkq1172},
 doi = {10.1093/nar/gkq1172}
}


text:
require recipes-devtools/libtool/libtool-cross_2.4.2.bb
FILESEXTRAPATHS_prepend = "\
${THISDIR}/files:${COREBASE}/meta/recipes-devtools/libtool/libtool:\
"

inherit debian-package
DEBIAN_SECTION = "devel"
DPR = "0"

LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = "\
	file://COPYING;md5=751419260aa954499f7abaabaa882bbe\
	file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06\
"

# Patch file fixinstall.patch and patch file
# dont-depend-on-help2man.patch can not apply, so
# fixinstall_edited.patch and
# dont-depend-on-help2man-edited.patch was created for apply
# with the same purpose.
SRC_URI += " \
file://trailingslash.patch \
file://rename-with-sysroot.patch \
file://use-sysroot-in-libpath.patch \
file://fix-final-rpath.patch \
file://avoid_absolute_paths_for_general_utils.patch \
file://fix-rpath.patch \
file://respect-fstack-protector.patch \
file://norm-rpath.patch \
file://dont-depend-on-help2man-edited.patch \
file://fix-resolve-lt-sysroot.patch \
file://prefix.patch \
file://fixinstall.patch \
"

# Don't apply debian/patches/link_all_deplibs.patch
# This patch make libtool do not link all dependency libs when create shared
# object archive and causes an error while link gettext's libraries although
# the dependency flag was already added.

do_debian_patch_prepend() {
	sed -i -e "/link_all_deplibs/ d" ${S}/debian/patches/series
}


text:
package fake

import (
	"context"
	"fmt"

	"github.com/jenkins-x/go-scm/scm"
)

const (
	// RoleAll lists both members and admins
	RoleAll = "all"
	// RoleAdmin specifies the user is an org admin, or lists only admins
	RoleAdmin = "admin"
	// RoleMaintainer specifies the user is a team maintainer, or lists only maintainers
	RoleMaintainer = "maintainer"
	// RoleMember specifies the user is a regular user, or only lists regular users
	RoleMember = "member"
	// StatePending specifies the user has an invitation to the org/team.
	StatePending = "pending"
	// StateActive specifies the user's membership is active.
	StateActive = "active"
)

type organizationService struct {
	client *wrapper
	data   *Data
}

func (s *organizationService) Create(context.Context, *scm.OrganizationInput) (*scm.Organization, *scm.Response, error) {
	panic("implement me")
}

func (s *organizationService) Delete(context.Context, string) (*scm.Response, error) {
	return nil, scm.ErrNotSupported
}

func (s *organizationService) IsMember(ctx context.Context, org, user string) (bool, *scm.Response, error) {
	panic("implement me")
}

func (s *organizationService) IsAdmin(ctx context.Context, org, user string) (bool, *scm.Response, error) {
	return user == "adminUser", &scm.Response{}, nil
}

func (s *organizationService) Find(ctx context.Context, name string) (*scm.Organization, *scm.Response, error) {
	for _, org := range s.data.Organizations {
		if org.Name == name {
			return org, nil, nil
		}
	}
	return nil, nil, scm.ErrNotFound
}

func (s *organizationService) List(context.Context, *scm.ListOptions) ([]*scm.Organization, *scm.Response, error) {
	orgs := s.data.Organizations
	if orgs == nil {
		// Return hardcoded organizations if none specified explicitly
		for i := 0; i < 5; i++ {
			org := scm.Organization{
				ID:     i,
				Name:   fmt.Sprintf("organisation%d", i),
				Avatar: fmt.Sprintf("https://github.com/organisation%d.png", i),
				Permissions: scm.Permissions{
					MembersCreatePrivate:  true,
					MembersCreatePublic:   true,
					MembersCreateInternal: true,
				},
			}
			orgs = append(orgs, &org)
		}
	}
	return orgs, &scm.Response{}, nil
}

func (s *organizationService) ListTeams(ctx context.Context, org string, opts *scm.ListOptions) ([]*scm.Team, *scm.Response, error) {
	return []*scm.Team{
		{
			ID:   0,
			Name: "Admins",
		},
		{
			ID:   42,
			Name: "Leads",
		},
	}, nil, nil
}

func (s *organizationService) ListTeamMembers(ctx context.Context, teamID int, role string, opts *scm.ListOptions) ([]*scm.TeamMember, *scm.Response, error) {
	if role != RoleAll {
		return nil, nil, fmt.Errorf("unsupported role %v (only all supported)", role)
	}
	teams := map[int][]*scm.TeamMember{
		0:  {{Login: "default-sig-lead"}},
		42: {{Login: "sig-lead"}},
	}
	members, ok := teams[teamID]
	if !ok {
		return []*scm.TeamMember{}, nil, nil
	}
	return members, nil, nil
}

func (s *organizationService) ListOrgMembers(ctx context.Context, org string, opts *scm.ListOptions) ([]*scm.TeamMember, *scm.Response, error) {
	return nil, nil, scm.ErrNotSupported
}

func (s *organizationService) ListPendingInvitations(_ context.Context, org string, opts *scm.ListOptions) ([]*scm.OrganizationPendingInvite, *scm.Response, error) {
	for _, o := range s.data.Organizations {
		if o.Name == org {
			return []*scm.OrganizationPendingInvite{{
				ID:           123,
				Login:        "fred",
				InviterLogin: "charles",
			}}, nil, nil
		}
	}
	return nil, nil, scm.ErrNotFound
}

func (s *organizationService) ListMemberships(ctx context.Context, opts *scm.ListOptions) ([]*scm.Membership, *scm.Response, error) {
	return []*scm.Membership{
		{
			OrganizationName: "test-org1",
			State:            "active",
			Role:             "admin",
		},
		{
			OrganizationName: "test-org2",
			State:            "pending",
			Role:             "member",
		},
	}, nil, nil
}

func (s *organizationService) AcceptOrganizationInvitation(_ context.Context, org string) (*scm.Response, error) {
	for _, o := range s.data.Organizations {
		if o.Name == org {
			return nil, nil
		}
	}
	return nil, scm.ErrNotFound
}

repository: jenkins-x/go-scm

repo_name: jenkins-x/go-scm


text:
//  Copyright (c) 2019 Cisco and/or its affiliates.
//
//  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 e2e

import (
	"testing"

	. "github.com/onsi/gomega"

	"go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler"
	ns "go.ligato.io/vpp-agent/v3/proto/ligato/linux/namespace"
	. "go.ligato.io/vpp-agent/v3/tests/e2e/e2etest"
)

func TestAgentInSync(t *testing.T) {
	ctx := Setup(t)
	defer ctx.Teardown()

	ctx.Expect(ctx.AgentInSync()).To(BeTrue())
}

func TestStartStopMicroservice(t *testing.T) {
	ctx := Setup(t)
	defer ctx.Teardown()

	const msName = "microservice1"
	key := ns.MicroserviceKey(MsNamePrefix + msName)

	ctx.StartMicroservice(msName)
	ctx.Eventually(ctx.Agent.GetValueStateByKeyClb(key)).Should(Equal(kvscheduler.ValueState_OBTAINED))

	ctx.StopMicroservice(msName)
	ctx.Eventually(ctx.Agent.GetValueStateByKeyClb(key)).Should(Equal(kvscheduler.ValueState_NONEXISTENT))
}

func TestStartStopAgent(t *testing.T) {
	ctx := Setup(t)
	defer ctx.Teardown()

	const agentName = "agent1"
	key := ns.MicroserviceKey(agentName)

	ctx.StartAgent(agentName)
	ctx.Eventually(ctx.Agent.GetValueStateByKeyClb(key)).Should(Equal(kvscheduler.ValueState_OBTAINED))

	ctx.StopAgent(agentName)
	ctx.Eventually(ctx.Agent.GetValueStateByKeyClb(key)).Should(Equal(kvscheduler.ValueState_NONEXISTENT))
}

repository: ligato/vpp-agent

repo_name: ligato/vpp-agent


text:
package template

// Overrides defines replacement text for names of items in the templates
type Overrides struct {
	//Paths contains the file/folder names and the override values
	Paths map[string]string `yaml:"paths"`
}

repository: thmhoag/codectl

repo_name: thmhoag/codectl


text:
if(EXISTS "/home/lvtingxun/Project/tools/faiss/tests/faiss_test[1]_tests.cmake")
  include("/home/lvtingxun/Project/tools/faiss/tests/faiss_test[1]_tests.cmake")
else()
  add_test(faiss_test_NOT_BUILT faiss_test_NOT_BUILT)
endif()

repository: hahaxun/faiss

repo_name: hahaxun/faiss


text:
package models

type GermanTranslator  struct {
}

func (g *GermanTranslator) Translator(words string) string {

	return "德语 == >> "+ words
}

repository: shunuanwei/go-sample-service

repo_name: shunuanwei/go-sample-service


text:
// Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.

package libkbfs

import (
	"testing"

	"github.com/keybase/client/go/protocol/keybase1"
	"github.com/keybase/kbfs/kbfscodec"
	"github.com/keybase/kbfs/kbfscrypto"
	"github.com/keybase/kbfs/tlf"
	"github.com/stretchr/testify/require"
)

func TestRootMetadataVersionV3(t *testing.T) {
	tlfID := tlf.FakeID(1, false)

	// All V3 objects should have SegregatedKeyBundlesVer.

	uid := keybase1.MakeTestUID(1)
	bh, err := MakeBareTlfHandle([]keybase1.UID{uid}, nil, nil, nil, nil)
	require.NoError(t, err)

	rmd, err := MakeInitialBareRootMetadataV3(tlfID, bh)
	require.NoError(t, err)

	require.Equal(t, SegregatedKeyBundlesVer, rmd.Version())
}

func TestIsValidRekeyRequestBasicV3(t *testing.T) {
	tlfID := tlf.FakeID(1, false)

	uid := keybase1.MakeTestUID(1)
	bh, err := MakeBareTlfHandle([]keybase1.UID{uid}, nil, nil, nil, nil)
	require.NoError(t, err)

	codec := kbfscodec.NewMsgpack()
	crypto := MakeCryptoCommon(kbfscodec.NewMsgpack())

	brmd, err := MakeInitialBareRootMetadataV3(tlfID, bh)
	extra, err := FakeInitialRekey(
		brmd, crypto, bh, kbfscrypto.TLFPublicKey{})

	newBrmd, err := MakeInitialBareRootMetadataV3(tlfID, bh)
	require.NoError(t, err)
	newExtra, err := FakeInitialRekey(
		newBrmd, crypto, bh, kbfscrypto.TLFPublicKey{})

	ok, err := newBrmd.IsValidRekeyRequest(
		codec, brmd, newBrmd.LastModifyingWriter(), extra, newExtra)
	require.NoError(t, err)
	// Should fail because the copy bit is unset.
	require.False(t, ok)

	// Set the copy bit; note the writer metadata is the same.
	newBrmd.SetWriterMetadataCopiedBit()

	// There's no internal signature to compare, so this should
	// then work.

	ok, err = newBrmd.IsValidRekeyRequest(
		codec, brmd, newBrmd.LastModifyingWriter(), extra, newExtra)
	require.NoError(t, err)
	require.True(t, ok)
}

func TestRootMetadataPublicVersionV3(t *testing.T) {
	tlfID := tlf.FakeID(1, true)

	uid := keybase1.MakeTestUID(1)
	bh, err := MakeBareTlfHandle([]keybase1.UID{uid}, []keybase1.UID{keybase1.PublicUID}, nil, nil, nil)
	require.NoError(t, err)

	rmd, err := MakeInitialBareRootMetadataV3(tlfID, bh)
	require.NoError(t, err)
	require.Equal(t, SegregatedKeyBundlesVer, rmd.Version())

	bh2, err := rmd.MakeBareTlfHandle(nil)
	require.Equal(t, bh, bh2)
}

repository: benjaminbollen/kbfs

repo_name: benjaminbollen/kbfs


text:
/*
Copyright (c) 2019, Aniol Marti
This file is part of Nininini Bot.
Nininini Bot is free software: you can redistribute it and/or modify
it under the terms of the BSD 3 clause license.
Nininini Bot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
BSD 3 clause license for more details.
You should have received a copy of the BSD 3 clause license
along with Nininini Bot. If not, see <https://opensource.org/licenses/BSD-3-Clause>.
*/

package app

import (
    "log"
    "github.com/go-telegram-bot-api/telegram-bot-api"
    "github.com/aniolm9/ninini-bot/tools"
)

func ProcessUpdates(updates tgbotapi.UpdatesChannel, bot *tgbotapi.BotAPI) {
    for update := range updates {
        if update.InlineQuery == nil {
            continue
        } else if update.InlineQuery.Query == "" {
            continue
        }
        log.Printf("[%s] %s", update.InlineQuery.From, update.InlineQuery.Query)
        nininiString := normalToNinini(update.InlineQuery.Query)
        article := tgbotapi.NewInlineQueryResultArticle("nininiString", nininiString, nininiString)

        inlineConf := tgbotapi.InlineConfig{
            InlineQueryID:  update.InlineQuery.ID,
            IsPersonal:     true,
            CacheTime:      0,
            Results:        []interface{}{article},
        }
        _, err := bot.AnswerInlineQuery(inlineConf)
        tools.Check(err)
    }
}


text:
@article{MartinezImperativeTransparencyforthcoming,
 author = {Martinez, Manolo},
 copyright = {All rights reserved},
 doi = {10.1093/mind/fzab009},
 journal = {Mind},
 title = {Imperative Transparency},
 year = {forthcoming}
}

repository: manolomartinez/my-website

repo_name: manolomartinez/my-website


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

package models

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

import (
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// SessionStateObject SessionStateObject
//
// swagger:model SessionStateObject
type SessionStateObject struct {

	// specifies the time at which session was authenticated.
	AuthTime int32 `json:"auth_time,omitempty"`

	// custom state
	CustomState string `json:"custom_state,omitempty"`

	// String that represents the End-User's login state at the OP. It MUST NOT contain the space (\" \") character.
	State string `json:"state,omitempty"`
}

// Validate validates this session state object
func (m *SessionStateObject) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *SessionStateObject) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *SessionStateObject) UnmarshalBinary(b []byte) error {
	var res SessionStateObject
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

repository: timdrysdale/gojans

repo_name: timdrysdale/gojans


text:
@inproceedings{huang2021cross,
  title={Cross-Sentence Temporal and Semantic Relations in Video Activity Localisation},
  author={Huang, Jiabo and Liu, Yang and Gong, Shaogang and Jin, Hailin},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={7199--7208},
  year={2021}
}

url: https://raw.githubusercontent.com/rbt-c/DL-NLP-Readings/82ca76e9184a3b00ac87129d99391477c85cfcd2/Bibtex/Cross-Sentence Temporal and Semantic Relations in Video Activity Localisation.bib

repository: rbt-c/DL-NLP-Readings

repo_name: rbt-c/DL-NLP-Readings