text:
require ${PN}.inc

PR = "r1"

SRC_URI = "http://sources.openembedded.org/opie-1.2.4-split_core_pim_addressbook.tar.bz2;name=split_core_pim_addressbook \
           http://sources.openembedded.org/opie-1.2.4-split_apps.tar.bz2;name=split_apps"
SRC_URI[split_core_pim_addressbook.md5sum] = "34e616179374a04a75e579e4d174daec"
SRC_URI[split_core_pim_addressbook.sha256sum] = "f13d5f0933d78d57edb25b565ab667ff3feb5dedf90431ce64e3d69131f22060"
SRC_URI[split_apps.md5sum] = "67a43e8e4bcd9e63b884ea25deea5b34"
SRC_URI[split_apps.sha256sum] = "a33a55efb4ae4c15a8c2c5d6faba6d671a5652da8e216ce35088896fe597215b"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
@article{Robinne-2021-Scientists',
    title = "Scientists' warning on extreme wildfire risks to water supply",
    author = "Robinne, Fran{\c{c}}ois‐Nicolas  and
      Hallema, Dennis W.  and
      Bladon, Kevin D.  and
      Flannigan, Mike D.  and
      Boisram{\'e}, Gabrielle  and
      Br{\'e}thaut, Christian M.  and
      Doerr, Stefan H.  and
      Di Baldassarre, Giuliano  and
      Gallagher, Louise A.  and
      Hohner, Amanda K.  and
      Khan, Stuart J.  and
      Kinoshita, Alicia M.  and
      Mordecai, Rua  and
      Nunes, Jo{\~a}o Pedro  and
      Nyman, Petter  and
      Sant{\'\i}n, Cristina  and
      Sheridan, Gary  and
      Stoof, Cathelijne R.  and
      Thompson, Matthew P.  and
      Waddington, James M.  and
      Wei, Yu",
    journal = "Hydrological Processes, Volume 35, Issue 5",
    volume = "35",
    number = "5",
    year = "2021",
    publisher = "Wiley",
    url = "https://aclanthology.org/G21-9001",
    doi = "10.1002/hyp.14086",
}
@article{Langs-2021-Subalpine,
    title = "Subalpine forest water use behaviour and evapotranspiration during two hydrologically contrasting growing seasons in the Canadian Rockies",
    author = "Langs, Lindsey E.  and
      Petrone, Richard M.  and
      Pomeroy, John W.",
    journal = "Hydrological Processes, Volume 35, Issue 5",
    volume = "35",
    number = "5",
    year = "2021",
    publisher = "Wiley",
    url = "https://aclanthology.org/G21-9002",
    doi = "10.1002/hyp.14158",
}
@article{McDonnell-2021-The,
    title = "The Maimai {\textless}scp{\textgreater}M8{\textless}/scp{\textgreater} experimental catchment database: Forty years of process‐based research on steep, wet hillslopes",
    author = "McDonnell, Jeffrey J.  and
      Gabrielli, Chris  and
      Ameli, Ali  and
      Ekanayake, Jagath  and
      Fenicia, Fabrizio  and
      Freer, Jim  and
      Graham, Chris  and
      McGlynn, Brian  and
      Morgenstern, Uwe  and
      Pietroniro, Alain  and
      Sayama, Takahiro  and
      Seibert, Jan  and
      Stewart, Mike  and
      Vache, Kellie  and
      Weiler, Markus  and
      Woods, Ross",
    journal = "Hydrological Processes, Volume 35, Issue 5",
    volume = "35",
    number = "5",
    year = "2021",
    publisher = "Wiley",
    url = "https://aclanthology.org/G21-4001",
    doi = "10.1002/hyp.14112",
}

repository: gwf-uwaterloo/gwf-publications

license_type: permissive

repo_name: gwf-uwaterloo/gwf-publications

branch_name: refs/heads/main

gha_language: Python

extension: bib


text:
@article{Veitch:PE2015,
 author = {Veitch, J. and Raymond, V. and Farr, B. and Farr, W. and Graff, P. and Vitale, S. and Aylott, B. and Blackburn, K. and Christensen, N. and Coughlin, M. and Del Pozzo, W. and Feroz, F. and Gair, J. and Haster, C.-J. and Kalogera, V. and Littenberg, T. and Mandel, I. and O'Shaughnessy, R. and Pitkin, M. and Rodriguez, C. and Röver, C. and Sidery, T. and Smith, R. and Van Der Sluys, M. and Vecchio, A. and Vousden, W. and Wade, L.},
 doi = {10.1103/PhysRevD.91.042003},
 issue = {4},
 journal = {Phys. Rev. D},
 month = {Feb},
 numpages = {25},
 pages = {042003},
 publisher = {American Physical Society},
 title = {Parameter estimation for compact binaries with ground-based gravitational-wave observations using the LALInference software library},
 url = {http://link.aps.org/doi/10.1103/PhysRevD.91.042003},
 volume = {91},
 year = {2015}
}

license: MIT

repository: mcoughlin/personal-website

repo_name: mcoughlin/personal-website

branch_name: refs/heads/master

gha_license_id: MIT

gha_language: TeX


text:
SUMMARY = "Image processing routines for SciPy"
DESCRIPTION = "Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc."
SECTION = "devel/python"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8e3ca74d79f64ff70c1878021251d785"

DEPENDS += "python3-numpy python3-numpy-native"

SRC_URI = "https://pypi.python.org/packages/86/d0/b0192dc9a544da90f2d9150bcd84b981c6873e42a1f752b6affb89180ad8/scikit-image-0.12.3.tar.gz"

SRC_URI[md5sum] = "04ea833383e0b6ad5f65da21292c25e1"
SRC_URI[sha256sum] = "82da192f0e524701e89c5379c79200bc6dc21373f48bf7778a864c583897d7c7"

UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/scikit-image/"
UPSTREAM_CHECK_REGEX = "/scikit-image/(?P<pver>(\d+[\.\-_]*)+)"

S = "${WORKDIR}/scikit-image-${PV}"

inherit setuptools3

RDEPENDS_${PN} += "python3-scipy python3-numpy python3-multiprocessing python3-pillow python3-networkx"

repository: qtec/meta-qtec-core

repo_name: qtec/meta-qtec-core

extension: bb


text:
@incollection{navas-molinaAdvancingOurUnderstanding2013,
 abstract = {Abstract High-throughput DNA sequencing technologies, coupled with advanced bioinformatics tools, have enabled rapid advances in microbial ecology and our understanding of the human microbiome. QIIME (Quantitative Insights Into Microbial Ecology) is an open-source bioinformatics software package designed for microbial community analysis based on DNA sequence data, which provides a single analysis framework for analysis of raw sequence data through publication-quality statistical analyses and interactive visualizations. In this chapter, we demonstrate the use of the QIIME pipeline to analyze microbial communities obtained from several sites on the bodies of transgenic and wild-type mice, as assessed using 16S rRNA gene sequences generated on the Illumina MiSeq platform. We present our recommended pipeline for performing microbial community analysis and provide guidelines for making critical choices in the process. We present examples of some of the types of analyses that are enabled by QIIME and discuss how other tools, such as phyloseq and R, can be applied to expand upon these analyses.},
 author = {Navas-Molina, José A. and Peralta-Sánchez, Juan M. and González, Antonio and McMurdie, Paul J. and Vázquez-Baeza, Yoshiki and Xu, Zhenjiang and Ursell, Luke K. and Lauber, Christian and Zhou, Hongwei and Song, Se Jin and Huntley, James and Ackermann, Gail L. and Berg-Lyons, Donna and Holmes, Susan and Caporaso, J. Gregory and Knight, Rob},
 booktitle = {Methods in Enzymology},
 editor = {Edward F. DeLong},
 file = {/Users/zech/Zotero/storage/SMQ873QA/2013_Navas-Molina_et_al_Advancing_Our_Understanding_of_the_Human_Microbiome_Using_QIIME.pdf},
 isbn = {0076-6879},
 pages = {371--444},
 publisher = {Academic Press},
 series = {Microbial Metagenomics, Metatranscriptomics, and Metaproteomics},
 title = {Advancing Our Understanding of the Human Microbiome Using QIIME},
 urldate = {2013-09-30},
 volume = {Volume 531},
 year = {2013}
}

repository: zxlab/lab-web

repo_name: zxlab/lab-web


text:
package main

import (
	"fmt"
	"log"
)

type NumMatrix struct {
	Dp [][]int //每一行的前缀和

}

func Constructor(matrix [][]int) NumMatrix {
	s := NumMatrix{Dp: nil}
	if len(matrix) == 0 || len(matrix[0]) == 0 {
		return s
	}

	row := len(matrix)
	col := len(matrix[0])
	s.Dp = make([][]int,row+1)

	for i := 0; i < len(s.Dp); i++ {
			s.Dp[i] = make([]int,col+1)
	}
	for i := 0; i < len(matrix); i++ {
		for j := 0; j < len(matrix[i]); j++ {
			s.Dp[i + 1][j + 1] = s.Dp[i + 1][j] + s.Dp[i][j + 1] + matrix[i][j] - s.Dp[i][j]
		}
	}

	return s
}

func (this *NumMatrix) SumRegion(row1 int, col1 int, row2 int, col2 int) int {
	if this.Dp == nil {
		return 0
	}

	return this.Dp[row2 + 1][col2 + 1] - this.Dp[row1][col2 + 1] - this.Dp[row2 + 1][col1] + this.Dp[row1][col1]

}

func main() {

	s := Constructor([][]int{
		{3, 0, 1, 4, 2},
		{5, 6, 3, 2, 1},
		{1, 2, 0, 1, 5},
		{4, 1, 0, 1, 7},
		{1, 0, 3, 0, 5},
	})

	log.Println(s.Dp)

	fmt.Println(s.SumRegion(2,1,4,3))
}

extension: go


text:
@Manual{@citeJanitor,
    title = {janitor: Simple Tools for Examining and Cleaning Dirty Data},
    author = {Sam Firke},
    year = {2021},
    note = {R package version 2.1.0},
    url = {https://CRAN.R-project.org/package=janitor},
  }

    @Manual{citeForcats,
    title = {forcats: Tools for Working with Categorical Variables (Factors)},
    author = {Hadley Wickham},
    year = {2021},
    note = {R package version 0.5.1},
    url = {https://CRAN.R-project.org/package=forcats},
  }

  @Manual{citeR,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2020},
    url = {https://www.R-project.org/},
  }

  @Manual{citeHere,
    title = {here: A Simpler Way to Find Your Files},
    author = {Kirill Müller},
    year = {2020},
    note = {R package version 1.0.1},
    url = {https://CRAN.R-project.org/package=here},
  }

  @Book{citeGGplot2,
    author = {Hadley Wickham},
    title = {ggplot2: Elegant Graphics for Data Analysis},
    publisher = {Springer-Verlag New York},
    year = {2016},
    isbn = {978-3-319-24277-4},
    url = {https://ggplot2.tidyverse.org},
  }

  @Article{citeTidyverse,
    title = {Welcome to the {tidyverse}},
    author = {Hadley Wickham and Mara Averick and Jennifer Bryan and Winston Chang and Lucy D'Agostino McGowan and Romain François and Garrett Grolemund and Alex Hayes and Lionel Henry and Jim Hester and Max Kuhn and Thomas Lin Pedersen and Evan Miller and Stephan Milton Bache and Kirill Müller and Jeroen Ooms and David Robinson and Dana Paige Seidel and Vitalie Spinu and Kohske Takahashi and Davis Vaughan and Claus Wilke and Kara Woo and Hiroaki Yutani},
    year = {2019},
    journal = {Journal of Open Source Software},
    volume = {4},
    number = {43},
    pages = {1686},
    doi = {10.21105/joss.01686},
  }

  @Manual{citekableExtra,
    title = {kableExtra: Construct Complex Table with 'kable' and Pipe Syntax},
    author = {Hao Zhu},
    year = {2020},
    note = {R package version 1.3.1},
    url = {https://CRAN.R-project.org/package=kableExtra},
  }

  @Manual{@citeStar,
    title = {stargazer: Well-Formatted Regression and Summary Statistics Tables},
    author = {Marek Hlavac},
    year = {2018},
    note = {R package version 5.2.2},
    organization = {Central European Labour Studies Institute (CELSI)},
    address = {Bratislava, Slovakia},
    url = {https://CRAN.R-project.org/package=stargazer},
  }

  @Manual{citeScore,
    title = {Commissioner's Directive 705-6
Correctional Planning and Criminal Profile},
    author = {Correctional Service Canada},
    year = {2019},
    url = {https://www.csc-scc.gc.ca/acts-and-regulations/705-6-cd-en.shtml#7},
  }

  @Manual{citeInvestigator,
    title = {Indigenous People in Federal Custody Surpasses 30%
Correctional Investigator Issues Statement and Challenge},
    author = {Marie-France Kingsley},
    year = {2020},
    url = {https://www.oci-bec.gc.ca/cnt/comm/press/press20200121-eng.aspx},
  }

  @Manual{citeWomen,
    title = {First Nations, Métis and Inuit Women},
    author = {Statistics Canada},
    year = {2016},
    url = {https://www150.statcan.gc.ca/n1/pub/89-503-x/2010001/article/11442-eng.htm},
  }

  @Manual{citeMedia,
    title = {Media constructions of Indigenous women in sexual assault cases: reflections from Australia and Canada},
    author = {Kyllie Cripps},
    year = {2021},
    url = {https://www.tandfonline.com/doi/abs/10.1080/10345329.2020.1867039?journalCode=rcic20},
  }

  @Manual{citePrincess,
    title = {Iskwewak Kah' Ki Yaw Ni Wahkomakanak: Neither Indian Princesses nor Easy Squaws},
    author = {Janice Acoose},
    year = {1995},
    url = {https://www.canadianscholars.ca/books/iskwewak-kah-ki-yaw-ni-wahkomakanak-2nd-edition},
  }

  @Manual{citePolice,
    title = {Section 3: Police-reported intimate partner violence in Canada, 2019},
    author = {Statistics Canada},
    year = {2021},
    url = {https://www150.statcan.gc.ca/n1/pub/85-002-x/2021001/article/00001/03-eng.htm},
  }

  @Manual{citePublic,
    title = {Family Violence Initiative},
    author = {Public Health Agency of Canada},
    year = {2014},
    url = {https://www.canada.ca/en/public-health/services/health-promotion/stop-family-violence/initiative.html},
  }

  @Manual{citeWilk,
    title = {Residential schools and the effects on Indigenous health and well-being in Canada—a scoping review},
    author = {Piotr Wilk, Alana Maltby, and Martin Cooke},
    year = {2017},
    url = {https://www.canada.ca/en/public-health/services/health-promotion/stop-family-violence/initiative.html},
  }

  @Manual{citeBrodsky,
    title = {Indian Act Sex Discrimination: Enough Inquiry Already, Just Fix It},
    author = {Gwen Brodsky},
    year = {2016},
    url = {https://www.utpjournals.press/doi/abs/10.3138/cjwl.28.2.314},
  }

  @Manual{citeHow,
    title = {How we did it: How The Globe uncovered systemic bias in prisoners’ risk assessments},
    author = {Tom Cardoso},
    year = {2020},
    url = {https://www.theglobeandmail.com/canada/article-investigation-racial-bias-in-canadian-prisons-methodology/},
  }

  @Manual{citeDark,
    title = {A shot in the dark and 185 megabytes of data: How I investigated a system of bias in Canada’s prison system},
    author = {Tom Cardoso},
    year = {2020},
    url = {https://www.theglobeandmail.com/canada/article-risk-backstory/},
  }

  @Manual{citeBias,
    title = {Bias behind bars: A Globe investigation finds a prison system stacked against Black and Indigenous inmates},
    author = {Tom Cardoso},
    year = {2020},
    url = {https://www.theglobeandmail.com/canada/article-investigation-racial-bias-in-canadian-prison-risk-assessments/},
  }

  @Manual{citeGlobe,
    title = {Bias behind bars: The Globe’s newest investigation finds a prison system stacked against Black and Indigenous inmates},
    author = {Globe Media Group},
    year = {2020},
    url = {https://globelink.ca/bias-behind-bars-the-globes-newest-investigation-finds-a-prison-system-stacked-against-black-and-indigenous-inmates/},
  }

   @Manual{citeBoyd,
    title = {Ten simple rules for responsible big data research},
    author = {Matthew Zook, Solon Barocas, danah boyd, Emily Keller, Setta Pena Gangadharan, Alyssa Goodman, Rachelle Hollander, Barbara A. Koenig, Arvind Narayan, Alondra Nelson, and Frank Pasquale},
    year = {2017},
    url = {https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005399},
  }

  @Manual{citeKendi,
    title = {How to be an antiracist},
    author = {Ibram X. Kendi},
    year = {2019},
  }

   @Manual{citeGocke,
    title = {Inuit Self-Government in the Canadian North: The Next Step in the Nunavut Project},
    author = {Katja Gocke},
    year = {2011},
    url = {https://www.zaoerv.de/71_2011/71_2011_1_a_77_102.pdf},
  }

  @Manual{citeSander,
    title = {Statistical Tests, P Values, Confidence Intervals and Power: A Guide to Misinterpretations},
    author = {Sander Greenland, Kenneth J. Rothman, Stephen J. Senn, and Douglas G. Altman},
    year = {2016},
    url = {https://www.tellingstorieswithdata.com},
  }

  @Manual{citeCaret,
    title = {caret: Classification and Regression Training},
    author = {Max Kuhn},
    year = {2020},
    note = {R package version 6.0-86},
    url = {https://CRAN.R-project.org/package=caret},
  }

  @Manual{citeGeek,
    title = {R Squared for Logistic Regression},
    author = {Jonathan Bartlett},
    year = {2014},
    url = {https://thestatsgeek.com/2014/02/08/r-squared-in-logistic-regression/},
  }

  @Manual{citeJackman,
    title = {pscl: Classes and Methods for R Developed in the Political Science Computational Laboratory},
    author = {Simon Jackman},
    year = {2020},
    url = {https://github.com/atahk/pscl/},
  }

  @Manual{citeHux,
    title = {huxtable: Easily Create and Style Tables for LaTeX, HTML and Other Formats},
    author = {David Hugh-Jones},
    year = {2021},
    note = {R package version 5.2.0},
    url = {https://CRAN.R-project.org/package=huxtable},
  }

  @Manual{citeStory,
    title = {Stories from the Front: Realities of Over-Incarceration of Aboriginal Women in Canada},
    author = {Jennifer Dyck},
    year = {2013},
    url = {https://www.collectionscanada.gc.ca/obj/thesescanada/vol2/BVAU/TC-BVAU-45347.pdf},
  }

  @Manual{citeCorr,
    title = {Correctional Programs for Indigenous Offenders},
    author = {Canadian Correctional Services},
    year = {2019},
    url = {https://www.csc-scc.gc.ca/002/002-0004-en.shtml#piw},
  }

  @Manual{citeAUC,
    title = {Understanding AUC-ROC Curve},
    author = {Sarang Narkhede},
    year = {2018},
    url = {https://towardsdatascience.com/understanding-auc-roc-curve-68b2303cc9c5},
  }

  @Article{citeROCR,
    entry = {article},
    title = {ROCR: visualizing classifier performance in R},
    author = {T. Sing and O. Sander and N. Beerenwinkel and T. Lengauer},
    year = {2005},
    journal = {Bioinformatics},
    volume = {21},
    number = {20},
    pages = {7881},
    url = {http://rocr.bioinf.mpi-sb.mpg.de},
  }

gha_language: R


text:
// Copyright 2020 spaGO Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package gradfn

import (
	"fmt"

	"github.com/nlpodyssey/spago/mat"
)

// Min is an operator to perform element-wise min.
// y = min(x1, x2)
type Min[O mat.Tensor] struct {
	x1 O
	x2 O
}

// NewMin returns a new Min Function.
func NewMin[O mat.Tensor](x1 O, x2 O) *Min[O] {
	return &Min[O]{
		x1: x1,
		x2: x2,
	}
}

// Operands returns the list of operands.
func (r *Min[O]) Operands() []mat.Tensor {
	return []mat.Tensor{r.x1, r.x2}
}

// Forward computes the output of the function.
func (r *Min[O]) Forward() (mat.Tensor, error) {
	return r.x1.Value().(mat.Matrix).Minimum(r.x2.Value().(mat.Matrix)), nil
}

// Backward computes the backward pass.
func (r *Min[O]) Backward(gy mat.Tensor) error {
	x1v := r.x1.Value().(mat.Matrix)
	x2v := r.x2.Value().(mat.Matrix)
	if !mat.SameDims(x1v, gy) || !mat.SameDims(x2v, gy) {
		return fmt.Errorf("fn: matrices have incompatible dimensions")
	}

	n := gy.Size()
	// FIXME: avoid casting to specific type
	gyData := mat.Data[float64](gy.(mat.Matrix))
	x1vData := mat.Data[float64](x1v)
	x2vData := mat.Data[float64](x2v)

	if r.x1.RequiresGrad() {
		gxData := make([]float64, n)
		for i := 0; i < n; i++ {
			if x1vData[i] < x2vData[i] {
				gxData[i] = gyData[i]
			}
		}
		gx := x1v.NewMatrix(mat.WithBacking(gxData))
		r.x1.AccGrad(gx)
	}
	if r.x2.RequiresGrad() {
		gxData := make([]float64, n)
		for i := 0; i < n; i++ {
			if x2vData[i] < x1vData[i] {
				gxData[i] = gyData[i]
			}
		}
		gx := x1v.NewMatrix(mat.WithBacking(gxData))
		r.x2.AccGrad(gx)
	}
	return nil
}

repository: nlpodyssey/spago

repo_name: nlpodyssey/spago

gha_language: Go


text:
@article{navon2003paradox,
  title={The paradox of driving speed: two adverse effects on highway accident rate},
  author={Navon, David},
  journal={Accident Analysis \& Prevention},
  volume={35},
  number={3},
  pages={361--367},
  year={2003},
  publisher={Elsevier}
}


text:
@article{achdou17,
  title={Income and wealth distribution in macroeconomics: A continuous-time approach},
  author={Achdou, Yves and Han, Jiequn and Lasry, Jean-Michel and Lions, Pierre-Louis and Moll, Benjamin},
  journal={Working Paper},
  year={2017},
  institution={National Bureau of Economic Research}
}
@article{gabaix16,
  title={The dynamics of inequality},
  author={Gabaix, Xavier and Lasry, Jean-Michel and Lions, Pierre-Louis and Moll, Benjamin},
  journal={Econometrica},
  volume={84},
  number={6},
  pages={2071--2111},
  year={2016},
  publisher={Wiley Online Library}
}
@article{rackauckas17,
  title={Differentialequations.jl -- a performant and feature-rich ecosystem for solving differential equations in julia},
  author={Rackauckas, Christopher and Nie, Qing},
  journal={Journal of Open Research Software},
  volume={5},
  number={1},
  year={2017},
  publisher={Ubiquity Press}
}

gha_language: Julia


text:
// Copyright (C) 2017, Zipper Team.  All rights reserved.
//
// This file is part of zipper
//
// The zipper is free software: you can use, copy, modify,
// and distribute this software for any purpose with or
// without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// The zipper 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
// ISC License for more details.
//
// You should have received a copy of the ISC License
// along with this program.  If not, see <https://opensource.org/licenses/isc>.

package rpc

import (
	"bytes"
	"io"
	"io/ioutil"
	"net/http"

	"github.com/rs/cors"
)

const (
	maxHTTPRequestContentLength = 1024 * 128
)

type httpReadWriteNopCloser struct {
	io.Reader
	io.Writer
}

func (c *httpReadWriteNopCloser) Close() error { return nil }

// NewHTTPServer creates a new HTTP RPC server around an API provider.
func NewHTTPServer(srv *Server, cors []string) *http.Server {
	return &http.Server{Handler: newCorsHandler(srv, cors)}
}

// Client represents a JSON-RPC client.
type httpClient struct {
	client     *http.Client
	req        *http.Request
	resp       chan *http.Response
	remainResp *http.Response
	canRead    bool
}

// DialHTTP creates a new RPC clients that connection to an RPC server over HTTP.
func DialHTTP(url string) (*Client, error) {
	client := new(http.Client)

	req, err := http.NewRequest("POST", url, nil)
	if err != nil {
		return nil, err
	}
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Accept", "application/json")

	return NewClient(&httpClient{client, req, make(chan *http.Response), &http.Response{}, false}), nil
}

// Write implements io.Writer interface.
func (c *httpClient) Write(d []byte) (n int, err error) {
	c.req.ContentLength = int64(len(d))
	c.req.Body = ioutil.NopCloser(bytes.NewReader(d))
	resp, err := c.client.Do(c.req)
	if err != nil {
		panic(err)
	}

	c.resp <- resp
	return len(d), nil
}

// Read implements io.Reader interface.
func (c *httpClient) Read(p []byte) (n int, err error) {
	var resp *http.Response

	if !c.canRead {
		resp = <-c.resp
	} else {
		resp = c.remainResp
	}

	n, err = resp.Body.Read(p)
	if err != nil {
		defer resp.Body.Close()
		c.canRead = false
	} else {
		c.remainResp = resp
		c.canRead = true
	}

	return n, err
}

// Close implements io.Closer interface.
func (c *httpClient) Close() error {
	c.req.Body.Close()
	return nil
}

func newCorsHandler(srv *Server, allowedOrigins []string) http.Handler {
	// disable CORS support if user has not specified a custom CORS configuration
	if len(allowedOrigins) == 0 {
		return srv
	}

	c := cors.New(cors.Options{
		AllowedOrigins: allowedOrigins,
		AllowedMethods: []string{"POST", "GET"},
		MaxAge:         600,
		AllowedHeaders: []string{"*"},
	})
	return c.Handler(srv)
}

license: ISC

repository: zipper-project/zipper

repo_name: zipper-project/zipper

gha_license_id: ISC


text:
file(REMOVE_RECURSE
  "CMakeFiles/websocket.dir/main.cpp.o"
  "CMakeFiles/websocket.dir/HttpProtocolParser.cpp.o"
  "CMakeFiles/websocket.dir/WebsocketProtocolParser.cpp.o"
  "CMakeFiles/websocket.dir/HttpResponse.cpp.o"
  "CMakeFiles/websocket.dir/Server.cpp.o"
  "CMakeFiles/websocket.dir/Event.cpp.o"
  "CMakeFiles/websocket.dir/WebsocketServer.cpp.o"
  "CMakeFiles/websocket.dir/base64.cpp.o"
  "CMakeFiles/websocket.dir/utils.cpp.o"
  "CMakeFiles/websocket.dir/EchoServer.cpp.o"
  "CMakeFiles/websocket.dir/MessageHandler.cpp.o"
  "CMakeFiles/websocket.dir/WebsocketResponse.cpp.o"
  "CMakeFiles/websocket.dir/Config.cpp.o"
  "CMakeFiles/websocket.dir/Log.cpp.o"
  "CMakeFiles/websocket.dir/Daemon.cpp.o"
  "CMakeFiles/websocket.dir/net_utils.cpp.o"
  "websocket.pdb"
  "websocket.exe"
  "libwebsocket.dll.a"
)

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

repository: SABERYJS/Websocket

repo_name: SABERYJS/Websocket

extension: cmake


text:
# Distributes under BSD licence

#.rst:
# FindCCTBX
# ---------
#
# Find an existing CCTBX distribution and sets up targets for using it
#
# The CCTBX distribution is found by, in order:
#
# 1. Reading the ``CCTBX_BUILD_DIR`` cache variable, if set
# 2. Reading the ``LIBTBX_BUILD`` environment variable
# 3. Using python to ``import libtbx``
#
# Components
# ^^^^^^^^^^
#
# Any ``COMPONENTS`` passed to ``find_package`` will cause this module
# to look for a libtbx-distribution module of the same name. This will
# then be exposed as the target ``CCTBX::<module_name>`` which will set
# up the include, library paths associated with that module.
#
# Other libtbx module dependencies are not currently transitively
# followed, so will need to be specified manually.
#
# Any known shared libraries for a particular tbx-module will have
# targets added themselves. For example, cctbx builds a ``libcctbx``
# shared library. If the cctbx component is requested, this will be made
# available for linking with the target name ``CCTBX::cctbx::cctbx``.
#
# The database for recognising these shared library targets can be found
# in ``module_info.json`` in the folder above this FindCCTBX module.

# If python isn't already included, pull it in here
if (NOT TARGET Python::Interpreter)
    find_package(Python COMPONENTS Interpreter REQUIRED)
endif()

# Find the location of the libtbx build directory - where libtbx_env is
function(_cctbx_determine_libtbx_build_dir)
    # Try and read it from the environment
    message(DEBUG "Looking for libtbx build dir via environment LIBTBX_BUILD")
    if (DEFINED ENV{LIBTBX_BUILD})
        get_filename_component(_ABS_BUILD "$ENV{LIBTBX_BUILD}" ABSOLUTE BASE_DIR "${CMAKE_BINARY_DIR}")
        set(LIBTBX_ENV "${_ABS_BUILD}/libtbx_env")
        message(DEBUG "Checking ${LIBTBX_ENV}")
        if (EXISTS "${LIBTBX_ENV}")
            set(CCTBX_BUILD_DIR "${_ABS_BUILD}" CACHE FILEPATH "Location of CCTBX build directory")
            message(DEBUG "Found libtbx via environment LIBTBX_BUILD: ${_ABS_BUILD}")
            return()
        endif()
    endif()

    message(DEBUG "Looking for libtbx build dir via importing libtbx in python")
    execute_process(COMMAND ${Python_EXECUTABLE} -c "import libtbx.load_env; print(abs(libtbx.env.build_path))"
                    RESULT_VARIABLE _LOAD_ENV_RESULT
                    OUTPUT_VARIABLE _LOAD_LIBTBX_BUILD_DIR
                    OUTPUT_STRIP_TRAILING_WHITESPACE
                    ERROR_QUIET)

    if (NOT ${_LOAD_ENV_RESULT})
        # We found it via python import
        message(DEBUG "Got libtbx build path: ${_LOAD_LIBTBX_BUILD_DIR}")
        set(CCTBX_BUILD_DIR "${_LOAD_LIBTBX_BUILD_DIR}" CACHE FILEPATH "Location of CCTBX build directory")
        return()
    endif()

    message(DEBUG "Could not find through direct python; looking for libtbx.python as last resort")
    execute_process(COMMAND "libtbx.python" -c "import libtbx.load_env; print(abs(libtbx.env.build_path))"
                    RESULT_VARIABLE _TBX_LOAD_ENV_RESULT
                    OUTPUT_VARIABLE _TBX_LOAD_LIBTBX_BUILD_DIR
                    OUTPUT_STRIP_TRAILING_WHITESPACE
                    ERROR_QUIET)

    if (NOT ${_TBX_LOAD_ENV_RESULT})
        # We found it via python import
        message(DEBUG "Got libtbx build path: ${_TBX_LOAD_LIBTBX_BUILD_DIR}")
        set(CCTBX_BUILD_DIR "${_TBX_LOAD_LIBTBX_BUILD_DIR}" CACHE FILEPATH "Location of CCTBX build directory")
        return()
    endif()
endfunction()

function(_read_libtbx_env RESULT_VARIABLE)
    cmake_path(SET _read_env_script NORMALIZE "${CMAKE_CURRENT_LIST_DIR}/../read_env.py")
    if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
        set(_read_env_is_windows "--windows")
    endif()
    # Get the system prefix from python
    execute_process(COMMAND ${Python_EXECUTABLE} -c "import sys; print(sys.prefix)"
                    RESULT_VARIABLE _SYS_PREFIX_RESULT
                    OUTPUT_VARIABLE _SYS_PREFIX
                    OUTPUT_STRIP_TRAILING_WHITESPACE)
    if (${_SYS_PREFIX_RESULT})
        message(FATAL_ERROR "Failed to read sys.prefix out of configured python")
    endif()
    # Now, use this an read out the libtbx_env
    execute_process(
        COMMAND ${Python_EXECUTABLE}
        "${_read_env_script}"
        "${CCTBX_BUILD_DIR}/libtbx_env"
        "--build-path"
        "${CCTBX_BUILD_DIR}"
        "--sys-prefix"
        "${_SYS_PREFIX}"
        ${_read_env_is_windows}
        OUTPUT_VARIABLE _env_json
        RESULT_VARIABLE _result)
    if (_result)
        message(FATAL_ERROR "Failed to read environment file: ${CCTBX_BUILD_DIR}/libtbx_env")
    endif()
    set("${RESULT_VARIABLE}" "${_env_json}" PARENT_SCOPE)
endfunction()

# Read details for a single module out of libtbx_env and other info
function(_cctbx_read_module MODULE)
    _read_libtbx_env(_env_json)
    # We now have a json representation of libtbx_env - extract the entry for this modile
    string(JSON _module_json ERROR_VARIABLE _error GET "${_env_json}" module_dict ${MODULE})
    if (NOT _module_json)
        set("CCTBX_${MODULE}_FOUND" FALSE PARENT_SCOPE)
        return()
    else()
        set("CCTBX_${MODULE}_FOUND" TRUE PARENT_SCOPE)
    endif()
    # Now, ensure a target exists for this module
    set(_target "CCTBX::${MODULE}")
    if (NOT TARGET CCTBX::${MODULE})
        add_library(${_target} INTERFACE IMPORTED)
    endif()

    # Get the dist-wide include dir
    string(JSON _include_paths GET "${_env_json}" include_path)
    string(JSON _lib_path GET "${_env_json}" lib_path)

    # Read the metainfo database - we might have extra information we need to inject
    file(READ "${CMAKE_CURRENT_LIST_DIR}/../module_info.json" _modules_db)
    # Read a list of libraries that this module exports
    string(JSON _module_libs     ERROR_VARIABLE _error GET "${_modules_db}" "libraries" "${MODULE}")
    # Read the extra include paths for this module
    string(JSON _module_includes_array ERROR_VARIABLE _error GET "${_modules_db}" "includes" "${MODULE}")
    if (_module_includes_array)
        # Convert this array to a CMake list
        string(JSON _n_includes LENGTH "${_module_includes_array}")
        math(EXPR _n_includes "${_n_includes} - 1")  # CMake RANGE is inclusive
        foreach( _n RANGE "${_n_includes}")
            string(JSON _include GET "${_module_includes_array}" "${_n}")
            list(APPEND _module_includes "${_include}")
        endforeach()
    endif()

    # Work out what dist paths need to be consulted for this module
    string(JSON _n_dist_paths LENGTH "${_module_json}" dist_paths)
    math(EXPR _n_dist_paths "${_n_dist_paths} - 1")  # CMake RANGE is inclusive

    # We need to work out include/ directories for this module.
    #
    # Algorithm: For every listed dist path:
    #               if the module_info database contains an entry for this module:
    #                   use those
    #               else if folder has an include/ subdir:
    #                   use that
    #               else:
    #                   use the parent of the dist path above
    foreach(_n RANGE "${_n_dist_paths}")
        string(JSON _dist_path GET "${_module_json}" dist_paths ${_n})
        if(NOT _dist_path)
            continue()
        endif()
        list(APPEND _dist_paths "${_dist_path}")
        # If we don't have a specific include-path override for this,
        # then use the dist-paths as roots for the include paths
        if (_module_includes)
            # Try appending every includes dir
            foreach(_include ${_module_includes})
                # Build up a full path for this
                string(FIND "${_include}" "#build/" _build_relative)
                if ("${_build_relative}" EQUAL 0)
                    string(SUBSTRING "${_include}" 7 -1 _include)
                    # We use an include directory relative to the environment build/
                    cmake_path(APPEND CCTBX_BUILD_DIR "${_include}" OUTPUT_VARIABLE _full_include)
                else()
                    cmake_path(APPEND _dist_path "${_include}" OUTPUT_VARIABLE _full_include)
                endif()
                cmake_path(ABSOLUTE_PATH _full_include NORMALIZE)
                # We might have multiple dist paths. Only use include dirs that exist.
                if(EXISTS "${_full_include}")
                    list(APPEND _include_paths "${_full_include}")
                endif()
            endforeach()
        else()
            # We didn't have any speciic override. If include/ exists
            # then use that, otherwise use the module parent directory.
            if (EXISTS "${_dist_path}/include")
                list(APPEND _include_paths "${_dist_path}/include")
            else()
                cmake_path(GET _dist_path PARENT_PATH _result)
                list(APPEND _include_paths "${_result}")
            endif()
        endif()
    endforeach()
    list(REMOVE_DUPLICATES _include_paths)
    list(REMOVE_DUPLICATES _dist_paths)
    target_include_directories(${_target} INTERFACE ${_include_paths})
    message(DEBUG "${MODULE} include directories: ${_include_paths}")
    set(CCTBX_${MODULE}_DIST "${_dist_paths}" PARENT_SCOPE)

    # Find if this module has a "base" library, and any sub-libraries
    # string(JSON _modules_libs GET "${_modules_libs}" "libraries")
    if (_module_libs)
        # We have actual libraries to import as imported libraries
        # iterate over every key: value in the object
        string(JSON _n_libs LENGTH "${_module_libs}")
        math(EXPR _n_libs "${_n_libs} - 1")
        foreach(_n RANGE ${_n_libs})
            string(JSON _name MEMBER "${_module_libs}" ${_n})
            string(JSON _libnames GET "${_module_libs}" "${_name}")
            set(_lib_searchname "_lib_${MODULE}_${_name}")

            # Find this library - or the first of a list of fallback options
            foreach(_libname ${_libnames})
                message(DEBUG "Processing ${_libname}")
                set(lib_specific_name "_liblocation_CCTBX_${MODULE}_${_libname}")
                find_library(${lib_specific_name} ${_libname} HINTS ${_lib_path})
                if(${lib_specific_name})
                    set(${_lib_searchname} "${${lib_specific_name}}")
                    message(DEBUG "Found ${lib_specific_name}=${${lib_specific_name}}")
                    break()
                endif()
                message(DEBUG "Didn't find lib${_libname} for ${MODULE}::${_name}")
            endforeach()

            if (NOT ${_lib_searchname})
                # If this library isn't present, it might not be important - so warn only
                message(WARNING "Libtbx module ${MODULE} has library named lib${_libname} but cannot find it - the module may be misconfigured")
            else()
                if(_name STREQUAL base)
                    message(DEBUG "Module library ${_target} has root library at ${${_lib_searchname}}")
                    target_link_libraries(${_target} INTERFACE "${${_lib_searchname}}")
                else()
                    message(DEBUG "Extra library ${_target}::${_name} = ${${_lib_searchname}}")
                    add_library(${_target}::${_name} INTERFACE IMPORTED)
                    target_link_libraries(${_target}::${_name} INTERFACE ${_target} "${${_lib_searchname}}")
                endif()
            endif()
        endforeach()
    endif()
endfunction()

if (NOT CCTBX_BUILD_DIR)
    _cctbx_determine_libtbx_build_dir()
endif()
# Make this absolute, in case it was specified as relative
cmake_path(ABSOLUTE_PATH CCTBX_BUILD_DIR BASE_DIRECTORY "${CMAKE_BINARY_DIR}" NORMALIZE)

if (CCTBX_BUILD_DIR)
    message(DEBUG "Using build dir ${CCTBX_BUILD_DIR}")

    foreach(_comp IN LISTS CCTBX_FIND_COMPONENTS)
        # Only try and find this component if we didn't already find it
        if(NOT TARGET CCTBX::${_comp})
            _cctbx_read_module(${_comp})
        else()
            # We already had a target for this module, so mark found
            set("CCTBX_${_comp}_FOUND" TRUE)
        endif()
    endforeach()
    unset(_comp)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CCTBX
    REQUIRED_VARS CCTBX_BUILD_DIR
    HANDLE_COMPONENTS
)

repository: dials/dials

repo_name: dials/dials


text:
---
---
% Pour un livre
@book{foster2019,
author = "David Foster",
title = "Generative Deep Learning",
publisher = "O’Reilly Media",
year = "2019"
}
@book{Goodfellow-et-al-2016,
    title={Deep Learning},
    author={Ian Goodfellow and Yoshua Bengio and Aaron Courville},
    publisher={MIT Press},
    note={\url{http://www.deeplearningbook.org}},
    year={2016}
}
% Pour un site internet
@misc{coursml,
author = "Andrew Ng",
title = "Machine Learning by Stanford University",
url = "https://www.coursera.org/learn/machine-learning",
}
  %wikipedia
% https://en.wikipedia.org/wiki/The_Pentagon
% https://en.wikipedia.org/wiki/Artificial_intelligence_arms_race#United_States
@misc{wikipediaocr,
author = "Wikipedia",
title = "Optical character recognition",
url = "https://en.wikipedia.org/wiki/Optical_character_recognition#:~:text=Optical%20character%20recognition%20or%20optical,billboards%20in%20a%20landscape%20photo)",
year = "2020"
}

@book{NNFS,
title = {Neural Networks From Scratch},
author = {Harrison Kinsley & Daniel Kukieła},
publisher ={ Kinsley Enterprises Inc.},
note={\url{https://nnfs.io}},
year={2020}
}

@misc{Ubiquity,
author = "DONALD M. LAURO",
title = "HUMAN BRAIN AND NEURAL NETWORK BEHAVIOR A COMPARISON",
url = "https://ubiquity.acm.org/article.cfm?id=958078"
}

@misc{HIPR2,
author = " R. Fisher, S. Perkins, A. Walker and E. Wolfart",
title = "Pixel Values",
url = "https://homepages.inf.ed.ac.uk/rbf/HIPR2/value.htm#:~:text=For%20a%20grayscale%20images%2C%20the,is%20taken%20to%20be%20white.",
year = "2003"
}

@misc{TDS,
author = "Richard Nagyfi",
title = "The differences between Artificial and Biological Neural Networks",
url = "https://towardsdatascience.com/the-differences-between-artificial-and-biological-neural-networks-a8b46db828b7",
year = "2018"
}

@misc{futura-sciences,
author = "futura-sciences",
title = "Potentiel d'action",
url = "https://www.futura-sciences.com/sante/definitions/biologie-potentiel-action-172/"
}

@misc{missinglink,
author = "missinglink.ai",
title = "7 Types of Neural Network Activation Functions: How to Choose?",
url = "https://missinglink.ai/guides/neural-network-concepts/7-types-neural-network-activation-functions-right/"
}

@misc{tma,
author = "WGBH",
title = "They Made America, Ray Kurzweil",
url = "https://www.pbs.org/wgbh/theymadeamerica/whomade/kurzweil_hi.html",
year = "2004"
}

@book{nistbias,
author = "Patrick Grother and Mei Ngan and Kayee Hanaoka",
title = "Face Recognition Vendor Test (FRVT) Part 3: Demographic Effects",
publisher = "NIST",
year = "2019",
url = "https://nvlpubs.nist.gov/nistpubs/ir/2019/NIST.IR.8280.pdf",
}

@misc{brookings,
author = "Darrel M. West and John R. Allen",
title = "How artificial intelligence is transforming the world",
url = "https://www.brookings.edu/research/how-artificial-intelligence-is-transforming-the-world/",
year = "2018"
}

@misc{nytimes,
author = "Nathaniel Popper",
title = "The Robots Are Coming for Wall Street",
url = "https://www.nytimes.com/2016/02/28/magazine/the-robots-are-coming-for-wall-street.html",
year = "2016"
}

@misc{gouvqc,
author = "Économie et Innovation Québec",
title = "Les avantages et inconvénients de l'intelligence artificielle",
url = "https://www.economie.gouv.qc.ca/objectifs/informer/vecteurs/vecteurs-actualites/vecteurs-actualites-details/?no_cache=1&tx_ttnews%5Btt_news%5D=23153&tx_ttnews%5Bcat%5D=&cHash=2f4aa33c55d12596ff0c2d6f468960bc",
year = "2018"
}

@misc{Michael,
author = "Michael A. Nielsen",
title = "Neural Networl and Deep Learning",
url = "http://neuralnetworksanddeeplearning.com/chap1.html",
year = "2019"
}

@misc{cnnportland,
author = "Rachel Metz",
title = "Portland passes broadest facial recognition ban in the US",
publisher = "CNN",
year = "2020",
url = "https://www.cnn.com/2020/09/09/tech/portland-facial-recognition-ban/index.html",
}

@misc{trendsml,
author = "Google",
title = "Compare",
publisher = "Google Trends",
url = "https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0h1fn8h,machine%20learning",
}

@misc{trendsai,
author = "Google",
title = "Compare",
publisher = "Google Trends",
url = "https://trends.google.com/trends/explore?date=all&q=Artificial%20intelligence",
}

@misc{preprocessing,
author = "Susmith Reddy",
title = "Pre-Processing in OCR",
publisher = "Towardsdatascience",
year = 2019,
url = "https://towardsdatascience.com/pre-processing-in-ocr-fc231c6035a7",
}

@misc{ibmai,
author = "{IBM Cloud Education}",
title = "Artificial Intelligence (AI)",
publisher = "IBM",
year = "2020",
url = "https://www.ibm.com/cloud/learn/what-is-artificial-intelligence",
}

@misc{harvardeliza,
author = "Corydon Ireland",
title = "Alan Turing at 100",
publisher = "The Harvard Gazette",
year = "2012",
url = "https://news.harvard.edu/gazette/story/2012/09/alan-turing-at-100/",
}

@misc{wiredai,
author = "Tom Simonite",
title = "The WIRED Guide to Artificial Intelligence",
publisher = "WIRED",
year = "2018",
url = "https://www.wired.com/story/guide-artificial-intelligence/",
}

@misc{wikitf,
author = "{Les contributeurs de Wikipedia}",
title = "TensorFlow",
publisher = "Wikipedia",
year = "2020",
url = "https://en.wikipedia.org/wiki/TensorFlow",
}

@misc{tfpaper,
author = "{The TensorFlow developper team}",
title = "TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems",
publisher = "Google Research",
year = "2015",
url = "http://download.tensorflow.org/paper/whitepaper2015.pdf"
}

@misc{tfmain,
author = "{The TensorFlow developper team}",
title = "TensorFlow",
publisher = "TensorFlow",
year = "2020",
url = "https://www.tensorflow.org",
}

@inbook{Goodfellow-et-al-2016-5,
  title        = "Machine Learning Basics",
  booktitle    = "Deep Learning Book",
  chapter      = 5,
  author       = "Ian Goodfellow and Yoshua Bengio and Aaron Courville",
  publisher    = "MIT Press",
  note         = "\url{http://www.deeplearningbook.org}",
  year         = "2016"
}

@misc{numpy,
author = "{The Numpy documentation team}",
title = "About us",
publisher = "Numpy",
year = "2020",
url = "https://numpy.org/about/"
}

@misc{oupblog,
author = "{Diane Proudfoot}",
title = "Alan Turing and Evil Artificial Intelligence",
publisher = "OUPblog",
year = "2018",
url = "blog.oup.com/2018/01/alan-turing-evil-artificial-intelligence/",
}

@misc{theguardianrise,
author = "{Stephen Buranyi}",
title = "Rise of the Racist Robots – How AI Is Learning All Our Worst Impulses",
publisher = "The Guardian, Guardian News and Media",
year = "2017",
url = "www.theguardian.com/inequality/2017/aug/08/rise-of-the-racist-robots-how-ai-is-learning-all-our-worst-impulses",
}

@misc{forbes10charts,
author = "{Louis Columbus}",
title = "10 Charts That Will Change Your Perspective On Artificial Intelligence's Growth.",
publisher = "Forbes Magazine",
year = "2018",
url = "www.forbes.com/sites/louiscolumbus/2018/01/12/10-charts-that-will-change-your-perspective-on-artificial-intelligences-growth/?sh=47fcd6b47583",
}

@misc{european,
author = "{European Commision}",
title = "On Artificial Intelligence - A European Approach to Excellence and Trust",
publisher = "European Commision",
year = "2020",
}

@misc{brookingsmalevolent,
author = "{Elaine Kamarck}",
title = "Malevolent Soft Power, AI, and the Threat to Democracy",
publisher = "brookings",
year = "2019",
url = "www.brookings.edu/research/malevolent-soft-power-ai-and-the-threat-to-democracy/",
}

@misc{springer,
author = "{KH. Berge, DR. Maiers, et al.}",
title = "AI-Assisted Decision-Making in Healthcare.",
publisher = "Asian Bioethics Review, Springer Singapore",
year = "2019",
url = "link.springer.com/article/10.1007/s41649-019-00096-0",
}

@misc{towardsdatascience,
author = "{Sunil Kumar}",
title = "Advantages and Disadvantages of Artificial Intelligence",
publisher = "Towards Data Science",
year = "2019",
url = "towardsdatascience.com/advantages-and-disadvantages-of-artificial-intelligence-182a5ef6588c",
}

@misc{thenewyorkerturing,
author = "{Marcus Gary}",
title = "What Comes After the Turing Test?",
publisher = "The New Yorker",
year = "2017",
url = "www.newyorker.com/tech/annals-of-technology/what-comes-after-the-turing-test",
}

@misc{forbes8example,
author = "{Bernard Marr}",
title = "8 Powerful Examples Of AI For Good",
publisher = "Forbes Magazine",
year = "2020",
url = "www.forbes.com/sites/bernardmarr/2020/02/10/8-powerful-examples-of-ai-for-good/?sh=7cccfe02d18a",
}

@misc{forbesaithreat,
author = "{Bernard Marr}",
title = "Is Artificial Intelligence (AI) A Threat To Humans?",
publisher = "Forbes Magazine",
year = "2020",
url = "www.forbes.com/sites/bernardmarr/2020/03/02/is-artificial-intelligence-ai-a-threat-to-humans/?sh=2aa4186f205d",
}

@misc{bernardmarr,
author = "{Bernard Marr}",
title = "What Are The Negative Impacts Of Artificial Intelligence (AI)?",
publisher = "Bernard Marr",
year = "2020",
url = "bernardmarr.com/default.asp?contentID=1827.",
}

@misc{foo,
author = "{Frank Pasquale}",
title = "'Machines Set Loose to Slaughter': the Dangerous Rise of Military AI",
publisher = "The Guardian, Guardian News and Media",
year = "2020",
url = "www.theguardian.com/news/2020/oct/15/dangerous-rise-of-military-ai-drone-swarm-autonomous-weapons",
}

@misc{bar,
author = "{Wikipedia}",
title = "Curiosity (Rover)",
publisher = "Wikipedia, Wikimedia Foundation",
year = "2020",
url = "en.wikipedia.org/wiki/Curiosity_(rover)",
}

@misc{toto,
author = "{Wikipedia}",
title = "Tay (Bot)",
publisher = "Wikipedia, Wikimedia Foundation",
year = "2020",
url = "en.wikipedia.org/wiki/Tay_(bot)",
}

@misc{foobar,
author = {"Preetham Vishwanatha"},
title = "The Math Behind Neural Networks (01)",
publisher = "Course Hero",
year = "2018",
url = "https://www.youtube.com/watch?v=RiqWATOoos8&ab_channel=3Blue1Brown",
}

repository: TrickyTroll/ML-intro

repo_name: TrickyTroll/ML-intro

gha_language: Jupyter Notebook


text:
package linear

import (
	"log"
	"testing"

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

func TestZeros(t *testing.T) {
	res, err := Zeros(2, 2)
	if err != nil {
		log.Fatal(err)
	}
	assert.Equal(t, res, Matrix([]Vector{
		Vector{0, 0}, Vector{0, 0},
	}), "numbers is not equal")

	res, err = Zeros(3, 2)
	if err != nil {
		log.Fatal(err)
	}
	assert.Equal(t, res, Matrix([]Vector{
		Vector{0, 0}, Vector{0, 0}, Vector{0, 0},
	}), "numbers is not equal")

	_, err = Zeros(-3, 2)
	if err == nil {
		log.Fatal("shouldn't allow negative numbers")
	}
	_, err = Zeros(3, -2)
	if err == nil {
		log.Fatal("shouldn't allow negative numbers")
	}

}

func TestRows(t *testing.T) {
	res, err := Zeros(2, 2)
	if err != nil {
		log.Fatal(err)
	}
	assert.Equal(t, res.Rows(), 2, "numbers is not equal")

	res, err = Zeros(3, 2)
	if err != nil {
		log.Fatal(err)
	}
	assert.Equal(t, res.Rows(), 2, "numbers is not equal")

	res, err = Zeros(2, 7)
	if err != nil {
		log.Fatal(err)
	}
	assert.Equal(t, res.Rows(), 7, "numbers is not equal")
}

func TestColumns(t *testing.T) {
	res, err := Zeros(2, 2)
	if err != nil {
		log.Fatal(err)
	}
	assert.Equal(t, res.Columns(), 2, "numbers is not equal")

	res, err = Zeros(3, 2)
	if err != nil {
		log.Fatal(err)
	}
	assert.Equal(t, res.Columns(), 3, "numbers is not equal")

	res, err = Zeros(2, 7)
	if err != nil {
		log.Fatal(err)
	}
	assert.Equal(t, res.Columns(), 2, "numbers is not equal")
}

func TestMatrixMax(t *testing.T) {
	m := Matrix([]Vector{
		Vector{4, 2},
		Vector{6, 7},
		Vector{3, 7},
		Vector{4, 10},
		Vector{9, 3},
	})
	result, err := m.Max()
	assert.NoError(t, err)
	assert.Equal(t, result, float64(10), "numbers is not equal")
}

repository: saromanov/numeric

repo_name: saromanov/numeric


text:
package uritemplate

import (
	"fmt"
	"go.sancus.dev/sancus/attic/log"
	"unicode/utf8"
)

/*
 * Based on "Lexical Scanning in Go" by Rob Pike
 * http://cuddle.googlecode.com/hg/talk/lex.html
 *
 */

/*
 * Optional = "[" ... "]"
 * Capture  = "{" name [ ":" option { "|" option } ] "}"
 * EOL      = "$"
 */

/*
 * Token
 */
type tokenType int

type token struct {
	typ tokenType
	val string
}

const (
	tokenError tokenType = iota
	tokenEOF
	tokenEOL          // "$"
	tokenLeftBracket  // "["
	tokenRightBracket // "]"
	tokenLeftBrace    // "{"
	tokenRightBrace   // "}"
	tokenIdentifier   // [a-zA-Z] [a-zA-Z0-9_]*
	tokenText         // [a-zA-Z0-9.,%_-]
	tokenOption
)

const (
	eof = -1
)

func (t token) String() string {
	switch t.typ {
	case tokenEOF:
		return "EOF"
	case tokenError:
		return "Error: " + t.val
	case tokenText:
		return fmt.Sprintf("LITERAL:%q", t.val)
	case tokenIdentifier:
		return fmt.Sprintf("ID:%s", t.val)
	case tokenOption:
		return fmt.Sprintf("OPTION:%q", t.val)
	default:
		return fmt.Sprintf("%q", t.val)
	}
}

/*
 * Lexer
 */
type lexer struct {
	log    *log.Logger // logger
	input  string      // string being scanned
	start  int         // start position of this token
	pos    int         // current position in the input
	width  int         // width of the last run read from input
	state  stateFn     // current state
	tokens chan token  // channel of scanned tokens
}

func newLexer(input string, logger *log.Logger) *lexer {
	l := &lexer{
		log:    logger,
		input:  input,
		state:  lexText,
		tokens: make(chan token, 2),
	}

	return l
}

func (l *lexer) nextToken() token {
	for {
		select {
		case t := <-l.tokens:
			return t
		default:
			l.state = l.state(l)
		}
	}
	l.log.Panic("not reached")
	return token{}
}

func (l *lexer) emit(typ tokenType) {
	s := l.input[l.start:l.pos]
	t := token{typ, s}

	l.log.Trace("emit(%s) [%v..%v]", t, l.start, l.pos)

	l.tokens <- t
	l.start = l.pos
}

func (l *lexer) next() (r rune) {
	if l.pos >= len(l.input) {
		l.width = 0
		return eof
	}

	r, l.width = utf8.DecodeRuneInString(l.input[l.pos:])
	l.pos += l.width
	return r
}

func (l *lexer) ignore() {
	l.start = l.pos
}

func (l *lexer) backup() {
	l.pos -= l.width
}

func (l *lexer) restore() {
	l.pos += l.width
}

func (l *lexer) peek() rune {
	r := l.next()
	l.backup()
	return r
}

/*
 * States
 */
type stateFn func(*lexer) stateFn

func (l *lexer) fail(msg string, a ...interface{}) stateFn {
	s := " at position %v"
	if len(a) > 0 {
		a = append(a, l.pos)
		msg += s
		msg = fmt.Sprintf(msg, a...)
	} else {
		msg += fmt.Sprintf(s, l.pos)
	}

	l.tokens <- token{tokenError, msg}
	return nil
}

func lexText(l *lexer) stateFn {
	l.log.Trace("state:lexText [%v..%v/%v]",
		l.start, l.pos, len(l.input))

	for {
		var r rune
		var t tokenType
		var nextState = lexText

		if r = l.next(); r == eof {
			break
		}

		l.log.Debug("state:lexText r:%q (%v) [%v..%v/%v] ",
			r, l.width,
			l.start, l.pos, len(l.input))

		switch r {
		case '[':
			t = tokenLeftBracket
		case ']':
			t = tokenRightBracket
		case '$':
			t = tokenEOL
		case '{':
			t, nextState = tokenLeftBrace, lexCaptureID
		default:
			continue
		}

		l.backup()
		if l.pos > l.start {
			l.emit(tokenText)
		}

		l.restore()
		l.emit(t)

		return nextState
	}
	if l.pos > l.start {
		l.emit(tokenText)
	}
	l.emit(tokenEOF)
	return nil
}

repository: sancus-project/sancus-golang

repo_name: sancus-project/sancus-golang


text:
package statestore

import "github.com/cjphaha/ebeats/libbeat/statestore/backend"

type Registry struct {
	backend backend.Registry
	active map[string]*sharedStore // active/open stores
}

// NewRegistry creates a new Registry with a configured backend.
func NewRegistry(backend backend.Registry) *Registry {
	return &Registry{
		backend: backend,
		active:  map[string]*sharedStore{},
	}
}

// Close closes the backend storage. Close blocks until all stores in use are closed.
func (r *Registry) Close() error {
	return nil
}

repository: cjphaha/ebeats

repo_name: cjphaha/ebeats


text:
@article{schmidt_fecal_2020,
 abstract = {Secondary manifestations of spinal cord injury beyond motor and sensory dysfunction can negatively affect a person's quality of life. Spinal cord injury is associated with an increased incidence of depression and anxiety; however, the mechanisms of this relationship are currently not well understood. Human and animal studies suggest that changes in the composition of the intestinal microbiota (dysbiosis) are associated with mood disorders. The objective of the current study is to establish a model of anxiety following a cervical contusion spinal cord injury in rats and to determine whether the microbiota play a role in the observed behavioural changes. We found that spinal cord injury caused dysbiosis and increased symptoms of anxiety-like behaviour. Treatment with a fecal transplant prevented both spinal cord injury-induced dysbiosis as well as the development of anxiety-like behaviour. These results indicate that an incomplete unilateral cervical spinal cord injury can cause affective disorders and intestinal dysbiosis, and that both can be prevented by treatment with fecal transplant therapy.},
 author = {Schmidt, Emma K. A. and Torres-Espin, Abel and Raposo, Pamela J. F. and Madsen, Karen L. and Kigerl, Kristina A. and Popovich, Phillip G. and Fenrich, Keith K. and Fouad, Karim},
 doi = {10.1371/journal.pone.0226128},
 file = {Full Text:C\:\\Users\\Perro Verde\\Zotero\\storage\\VYST4CC7\\Schmidt et al. - 2020 - Fecal transplant prevents gut dysbiosis and anxiet.pdf:application/pdf},
 issn = {1932-6203},
 journal = {PloS One},
 language = {eng},
 number = {1},
 pages = {e0226128},
 pmid = {31940312},
 title = {Fecal transplant prevents gut dysbiosis and anxiety-like behaviour after spinal cord injury in rats},
 volume = {15},
 year = {2020}
}

repository: ATEspin/ATE-academic-kickstart

repo_name: ATEspin/ATE-academic-kickstart


text:
@InProceedings{clemencon14,
  title = {Anomaly Ranking as Supervised Bipartite Ranking},
  author = {Stephan Clémençon and Sylvain Robbiano},
  pages = {343-351},
  abstract = {The Mass Volume (MV) curve is a visual  tool to evaluate the performance of a scoring  function with regard to its capacity to rank  data in the same order as the underlying density function. Anomaly ranking refers to the  unsupervised learning task which consists in  building a scoring function, based on unlabeled data, with a MV curve as low as possible at any point. In this paper, it is proved  that, in the case where the data generating probability distribution has compact support, anomaly ranking is equivalent to (supervised) bipartite ranking, where the goal is  to discriminate between the underlying probability distribution and the uniform distribution with same support. In this situation, the  MV curve can be then seen as a simple transform of the corresponding ROC curve. Exploiting this view, we then show how to use  bipartite ranking algorithms, possibly combined with random sampling, to solve the  MV curve minimization problem. Numerical experiments based on a variety of bipartite ranking algorithms well-documented in  the literature are displayed in order to illustrate the relevance of our approach.},
  section = {cycle-2},
}

repository: mreid/papersite

repo_name: mreid/papersite


text:
@article{xu2019joint,
title={Joint Event Detection and Description in Continuous Video Streams},
  	author={Xu, Huijuan and Li, Boyang and Ramanishka, Vasili and Sigal, Leonid and Saenko, Kate},
journal={2019 IEEE Winter Conference on Applications of Computer Vision (WACV)},
    year={2019}
}

url: https://raw.githubusercontent.com/Hugh-Shi/DL-NLP-Readings/924e4d189e5660c5b5d4854278f3df755ae2231d/Bibtex/Joint Event Detection and Description in Continuous Video Streams.bib

repository: Hugh-Shi/DL-NLP-Readings

repo_name: Hugh-Shi/DL-NLP-Readings


text:
@article{Bartels:2018eyb,
 archiveprefix = {arXiv},
 author = {Bartels, Richard and Calore, Francesca and Storm, Emma and Weniger, Christoph},
 doi = {10.1093/mnras/sty2135},
 eprint = {1803.04370},
 journal = {Mon. Not. Roy. Astron. Soc.},
 number = {3},
 pages = {3826--3841},
 primaryclass = {astro-ph.HE},
 title = {Galactic binaries can explain the Fermi Galactic centre excess and 511 keV emission},
 volume = {480},
 year = {2018}
}

repository: cweniger/personal-website

repo_name: cweniger/personal-website


text:
import FileManager from '../components/FileManager';

new window.Vue({
    el: '#app',
    components: { 'file-manager': FileManager },
});

extension: js


text:
// +build linux

package cosmovisor_test

import (
	"bytes"
	"testing"

	"github.com/stretchr/testify/suite"

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

type processTestSuite struct {
	suite.Suite
}

func TestProcessTestSuite(t *testing.T) {
	suite.Run(t, new(processTestSuite))
}

// TestLaunchProcess will try running the script a few times and watch upgrades work properly
// and args are passed through
func (s *processTestSuite) TestLaunchProcess() {
	home := copyTestData(s.T(), "validate")
	cfg := &cosmovisor.Config{Home: home, Name: "dummyd"}

	// should run the genesis binary and produce expected output
	var stdout, stderr bytes.Buffer
	currentBin, err := cfg.CurrentBin()
	s.Require().NoError(err)

	s.Require().Equal(cfg.GenesisBin(), currentBin)

	args := []string{"foo", "bar", "1234"}
	doUpgrade, err := cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr)
	s.Require().NoError(err)
	s.Require().True(doUpgrade)
	s.Require().Equal("", stderr.String())
	s.Require().Equal("Genesis foo bar 1234\nUPGRADE \"chain2\" NEEDED at height: 49: {}\n", stdout.String())

	// ensure this is upgraded now and produces new output

	currentBin, err = cfg.CurrentBin()
	s.Require().NoError(err)
	s.Require().Equal(cfg.UpgradeBin("chain2"), currentBin)
	args = []string{"second", "run", "--verbose"}
	stdout.Reset()
	stderr.Reset()
	doUpgrade, err = cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr)
	s.Require().NoError(err)
	s.Require().False(doUpgrade)
	s.Require().Equal("", stderr.String())
	s.Require().Equal("Chain 2 is live!\nArgs: second run --verbose\nFinished successfully\n", stdout.String())

	// ended without other upgrade
	s.Require().Equal(cfg.UpgradeBin("chain2"), currentBin)
}

// TestLaunchProcess will try running the script a few times and watch upgrades work properly
// and args are passed through
func (s *processTestSuite) TestLaunchProcessWithDownloads() {
	// this is a fun path
	// genesis -> "chain2" = zip_binary
	// zip_binary -> "chain3" = ref_zipped -> zip_directory
	// zip_directory no upgrade
	home := copyTestData(s.T(), "download")
	cfg := &cosmovisor.Config{Home: home, Name: "autod", AllowDownloadBinaries: true}

	// should run the genesis binary and produce expected output
	var stdout, stderr bytes.Buffer
	currentBin, err := cfg.CurrentBin()
	s.Require().NoError(err)

	s.Require().Equal(cfg.GenesisBin(), currentBin)
	args := []string{"some", "args"}
	doUpgrade, err := cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr)
	s.Require().NoError(err)
	s.Require().True(doUpgrade)
	s.Require().Equal("", stderr.String())
	s.Require().Equal("Preparing auto-download some args\n"+`ERROR: UPGRADE "chain2" NEEDED at height: 49: {"binaries":{"linux/amd64":"https://github.com/cosmos/cosmos-sdk/raw/51249cb93130810033408934454841c98423ed4b/cosmovisor/testdata/repo/zip_binary/autod.zip?checksum=sha256:dc48829b4126ae95bc0db316c66d4e9da5f3db95e212665b6080638cca77e998"}} module=main`+"\n", stdout.String())

	// ensure this is upgraded now and produces new output
	currentBin, err = cfg.CurrentBin()
	s.Require().NoError(err)
	s.Require().Equal(cfg.UpgradeBin("chain2"), currentBin)
	args = []string{"run", "--fast"}
	stdout.Reset()
	stderr.Reset()
	doUpgrade, err = cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr)
	s.Require().NoError(err)
	s.Require().True(doUpgrade)
	s.Require().Equal("", stderr.String())
	s.Require().Equal("Chain 2 from zipped binary link to referral\nArgs: run --fast\n"+`ERROR: UPGRADE "chain3" NEEDED at height: 936: https://github.com/cosmos/cosmos-sdk/raw/0eae1a50612b8bf803336d35055896fbddaa1ddd/cosmovisor/testdata/repo/ref_zipped?checksum=sha256:0a428575de718ed3cf0771c9687eefaf6f19359977eca4d94a0abd0e11ef8e64 module=main`+"\n", stdout.String())

	// ended with one more upgrade
	currentBin, err = cfg.CurrentBin()
	s.Require().NoError(err)
	s.Require().Equal(cfg.UpgradeBin("chain3"), currentBin)
	// make sure this is the proper binary now....
	args = []string{"end", "--halt"}
	stdout.Reset()
	stderr.Reset()
	doUpgrade, err = cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr)
	s.Require().NoError(err)
	s.Require().False(doUpgrade)
	s.Require().Equal("", stderr.String())
	s.Require().Equal("Chain 2 from zipped directory\nArgs: end --halt\n", stdout.String())

	// and this doesn't upgrade
	currentBin, err = cfg.CurrentBin()
	s.Require().NoError(err)
	s.Require().Equal(cfg.UpgradeBin("chain3"), currentBin)
}

repository: sahith-narahari/cosmos-sdk

repo_name: sahith-narahari/cosmos-sdk


text:
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

//go:build !linux

package magicsock

import (
	"errors"
	"io"

	"tailscale.com/types/logger"
	"tailscale.com/types/nettype"
)

func (c *Conn) listenRawDisco(family string) (io.Closer, error) {
	return nil, errors.New("raw disco listening not supported on this OS")
}

func trySetSocketBuffer(pconn nettype.PacketConn, logf logger.Logf) {
	portableTrySetSocketBuffer(pconn, logf)
}

repository: suryatmodulus/tailscale

repo_name: suryatmodulus/tailscale


text:
@incollection{woznowski2016sphere,
  title     ={{SPHERE}: {A} {S}ensor {P}latform for {HE}althcare in a {R}esidential {E}nvironment},
  authorshort={P. Woznowski and A. Burrows and M. Camplani and T. Diethe and others},
  booktitle ={Designing and Developing and and Facilitating Smart Cities: Urban Design to {IoT} Solutions},
  editor    ={V. Angelakis and E. Tragos and H.C. P{\"o}hls and A. Kapovits and A. Bassi},
  year      ={2016},
  publisher ={Springer},
  author    ={P. Woznowski and A. Burrows and M. Camplani and T. Diethe and X. Fafoutis and J. Hall and S. Hannuna and M. Kozlowski and N. Twomey and B. Tan and N. Zhu and A. Elsts and A. Vafeas and M. Mirmehdi and T. Burghardt and D. Damen and A. Paiement and L. Tao and P. Flach and G. Oikonomou and R. Piechocki and I. Craddock.}
}


text:
package main

import (
    "fmt"
    "log"

    "github.com/ethereum/go-ethereum/common"
    "github.com/ethereum/go-ethereum/ethclient"

    store "./contracts" // for demo
)

func main() {
    client, err := ethclient.Dial("http://localhost:8545")
    if err != nil {
        log.Fatal(err)
    }

    address := common.HexToAddress("0x147B8eb97fD247D06C4006D269c90C1908Fb5D54")
    instance, err := store.NewStore(address, client)
    if err != nil {
        log.Fatal(err)
    }

    version, err := instance.Version(nil)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(version) // "1.0"
}