text:
@ARTICLE{Kipke11,
  AUTHOR =       "J.P. Seymour and N.B. Langhals and D.J. Anderson and D.R. Kipke",
  TITLE =        "Novel multi-sided, microelectrode arrays for implantable neural applications",
  JOURNAL =      "Biomed Microdevices",
  YEAR =         "2011",
};

@ARTICLE{Wang11,
  AUTHOR =       "C. Wang and J. Paisley and D. Blei",
  TITLE =        "Online variational inference for the hierarchical {D}irichlet process",
  JOURNAL =      "Artificial Intelligence and Statistics",
  YEAR =         "2011",
};

@ARTICLE{Donoghue07,
  AUTHOR =       "J.P. Donoghue and A. Nurmikko and M. Black and L.R. Hochberg",
  TITLE =        "Assistive technology and robotic control using mortor cortex ensemble-based neural interface systems in humans with tetraplegia",
  JOURNAL =      "J. Physiol.",
  YEAR =         "2007",
};

 @ARTICLE{Nature2012,
  AUTHOR =       "A. Abbott",
  TITLE =        "Mind-controlled robot arms show promise",
  JOURNAL =      "Nature",
  YEAR =         "2012",
};

@ARTICLE{tetrode,
  AUTHOR =       "A.A. Emondi and S.P. Rebrik  and A.V. Kurgansky and K.D. Miller",
  TITLE =        "Tracking neurons recorded from tetrodes across time",
  JOURNAL =      "J. Neuro. Meth.",
  YEAR =         "2004",
};

@incollection{Teh2010a,
Author = {Y. W. Teh},
Booktitle = {Encyclopedia of Machine Learning},
Publisher = {Springer},
Title = {{D}irichlet Processes},
Year = {2010}}

@inproceedings{Wright09,
    author = {J. Wright and Y. Peng and Y. Ma and A. Ganesh and S. Rao},
    title = {Robust Principal Component Analysis: Exact Recovery of Corrupted Low-Rank Matrices by Convex Optimization},
    booktitle = {Neural Information Processing Systems (NIPS)},
    year = {2009}
}

@INPROCEEDINGS{Mingyuan2012,
    author = {M. Zhou and L.A. Hannah and D.B. Dunson and L. Carin},
    title = {Beta-Negative Binomial Process and {P}oisson Factor Analysis},
    year = {2012},
    booktitle={AISTATS},
}

@INPROCEEDINGS{Bo2011,
    author = {B. Chen and D.E. Carlson and L. Carin},
    title = {On the Analysis of Multi-Channel Neural Spike Data},
    year = {2011},
    booktitle={NIPS},
}

@article{Carvalho,
  author = "C. Carvalho and J. Chang and J. Lucas and J.R. Nevins and Q. Wang and M. West",
  title = "High-Dimensional Sparse Factor Modelling: Applications in Gene Expression Genomics",
  journal = "Journal of the American Statistical Association",
  pages = "1438-1456",
  volume = "103",
  year = "2008"
}

@INPROCEEDINGS{HKSBP,
    author = {Q. An and C. Wang and I. Shterev and E. Wang and D.B. Dunson and L. Carin},
    title = {Hierarchical Kernel Stick-Breaking Process for Multi-Task Image Analysis},
    year = {2008},
    booktitle={ICML},
}

@ARTICLE{microglia,
  AUTHOR =       "Z. Soltys and O. Orzylowska-Sliwinska and M. Zaremba and D. Orlowski and M. Piechota and A. Fiedorowicz and K. Janeczko and B. Oderfeld-Nowak",
  TITLE =        "Quantitative morphological study of microglial cells in the ischemic rat brain using principal component analysis",
  JOURNAL =      "J. Neuro. Meth.",
  YEAR =         "2005",
};

@ARTICLE{Lmeasures,
  AUTHOR =       "R. Scorcioni and S. Polavaram and G.A. Ascoli",
  TITLE =        "L-Measure: a web-accessible tool for the analysis, comparison and search of digital reconstructions of neuronal morphologies",
  JOURNAL =      "Nature Protocols",
  YEAR =         "2008",
};

@ARTICLE{Badri08,
  AUTHOR =       "C.S. Bjornsson and G. Lin and Y. Al-Kafahi and K.L. Smith and W. Shain and B. Roysam",
  TITLE =        "Computer-aided classification of cells in complex brain tissue from 5-channel 3-{D} confocal datasets",
  JOURNAL =      "J. Neuro. Meth.",
  YEAR =         "2008",
};

@article{Castillo,
    author  = "I. Castillo and A. van der Vaart",
    title   = "Needles and straws in a haystack: Posterior concentration for possibly sparse sequences",
    year    = "2012",
    journal = "Arxiv preprint math",
}

@article{Dunson07KSBP,
    author  = "D.B. Dunson and J.-H. Park",
    title   = "Kernel Stick-Breaking Process",
    year    = "2008",
    journal = "Biometrika",
}

@book{SVM,
  author = "N. Cristianini and J. Shawe-Taylor",
  title = "An Introduction to Support Vector Machines",
  publisher = "Cambridge University Press",
  year = "2000"
}

@MISC{Bhattacharya_sparsebayesian,
    author = {A. Bhattacharya and D.B. Dunson},
    JOURNAL = "Biometrika",
    title = {Sparse Bayesian infinite factor models},
    year = {2010}
}

@book{GP,
    author  = "C.E. Rasmussen and C. Williams",
    title   = "Gaussian Processes for Machine Learning",
    year    = "2006",
    publisher = "MIT Press",
    volume  = "",
    number  = "",
    pages   = ""
}

@book{kingman,
    author  = "J.F.C. Kingman",
    title   = "Poisson Processes",
    year    = "2002",
    publisher = "Oxford Press",
    volume  = "",
    number  = "",
    pages   = ""
}

@ARTICLE{Chen,
  AUTHOR =       "J. Chen and X. Huo",
  TITLE =        "Theoretical results on sparse representations of multiple-measurement vectors",
  JOURNAL =      "IEEE Trans. Sigal Process",
  YEAR =         "2006",
};

@ARTICLE{LSBP,
  AUTHOR =       "L. Ren and  L. Du and L. Carin and D. B. Dunson",
  TITLE =        "Logistic Stick-Breaking Process",
  JOURNAL =      "J. Machine Learning Research",
  YEAR =         "2011",
};

@ARTICLE{Mishali,
  AUTHOR =       "M. Mishali and Y. C. Eldar",
  TITLE =        "Reduce and boost: Recovering arbitrary sets of jointly sparse vectors",
  JOURNAL =      "IEEE Trans. Sigal Process.",
  YEAR =         "2008",
};

@ARTICLE{Tropp06,
  AUTHOR =       "J. Tropp",
  TITLE =        "Algorithms for simultaneous sparse approximation. part {II}: Convex relaxation",
  JOURNAL =      "Signal Process.",
  YEAR =         "2006",
};

@ARTICLE{Olshausen,
  AUTHOR =       "B.A. Olshausen and D. J. Field",
  TITLE =        "Sparse coding with an overcomplete basis set: {A} strategy employed by {V}1?",
  JOURNAL =      "Vision Research",
  YEAR =         "1997",
  volume =       "37",
};

@inproceedings{knowles,
  author =        {D. Knowles and Z. Ghahramani},
  title =         {Infinite Sparse Factor Analysis and Infinite Independent Components Analysis},
  booktitle = {  Independent Component Analysis and Signal Separation},
  year =      {2007},
  editor =    {},
  volume =    {}
}

@inproceedings{dHBP,
  author =        {M. Zhou and H. Yang and G. Sapiro and D. Dunson and L. Carin},
  title =         {Dependent Hierarchical Beta Process for Image Interpolation and Denoising},
  booktitle = {AISTATS},
  year =      {2011},
  editor =    {},
  volume =    {}
}

@ARTICLE{Richard07,
  AUTHOR =       "R.G. Baraniuk",
  TITLE =        "Compressive sensing",
  JOURNAL =      "IEEE Signal Process. Magazine",
  YEAR =         "2007",
};

@article{RVM,
    author = {M. Tipping},
    journal = {Journal of Machine Learning Research},
    month = {June},
    title = {Sparse {B}ayesian Learning and the Relevance Vector Machine},
    volume = {1},
    year = {2001}
}

@ARTICLE{Antoniak74,
  AUTHOR =       "C. Antoniak",
  TITLE =        "Mixtures of Dirichlet processes with applications to Bayesian nonparametric problems",
  JOURNAL =      "The Annals of Statistics",
  YEAR =         "1974",
  number =       "2",
  pages =        "1152-1174",
};

@article{Lasso,
  author = "R. Tibshirani",
  title = "Regression shrinkage and selection via the lasso",
  journal = "J. Royal. Statist. Soc B.",
  volume = "58",
  pages = "267-288",
  year = "1996"
}

@article{Hjort,
  author = "N. L. Hjort",
  title = "Nonparametric {B}ayes Estimators Based on Beta Processes in Models for Life History Data",
  journal = "Annals of Statistics",
  year = "1990"
}

@article{West,
  author = "Mike West",
  title = "Bayesian Factor Regression Models in the ``Large p, Small n'' Paradigm",
  journal = "Bayesian Statistics",
  volume = "7",
  pages = "723-732",
  year = "2003"
}

@article{HGDPCEPH,
  author = "Noah A. Rosenberg and Jonathan K. Pritchard and James L. Weber and Howard M. Cann and Kenneth K. Kidd and Lev A. Zhivotovsky and Marcus W. Feldman",
  title = "Genetic Structure of Human Populations",
  journal = "Science",
  volume = "298",
  pages = "2381-2385",
  year = "2002"
}

@article{face_class,
  author = "J. Wright and A.Y. Yang and A. Ganesh and S.S. Sastry and Y. Ma",
  title = "Robust Face Recognition via Sparse Representation",
  journal = "IEEE Trans. Pattern Analysis Machine Intelligence",
  year = "2009"
}

@article{face_comp,
  author = "O. Bryt and M. Elad",
  title = "Compression of facial images using the K-SVD algorithm",
  journal = "J. Vis. Commun. Image R.",
  volum = "19",
  year = "2008"
}

@article{Candes09rpca,
  author = {E. J. Cand\`{e}s and X. Li and Y. Ma and J. Wright},
  title = {Robust Principal Component Analysis?},
  journal = {Submitted to Journal of the ACM},
  volume = {},
  pages = {},
  year = {2009}
}

@inproceedings{Wright09,
    author = {J. Wright and Y. Peng and Y. Ma and A. Ganesh and S. Rao},
    title = {Robust Principal Component Analysis: Exact Recovery of Corrupted Low-Rank Matrices by Convex Optimization},
    booktitle = {  NIPS },
    year = {2009}
}

@inproceedings{Ng_ICML07,
  author =        {R. Raina and A. Battle and H. Lee and B. Packer and A.Y. Ng},
  title =         {Self-taught learning: transfer learning from unlabeled data},
  booktitle = {  ICML},
  year =      {2007},
}

@inproceedings{JordanBP,
  author =        {R. Thibaux and M. I. Jordan},
  title =         "{Hierarchical beta processes and the Indian buffet process}",
  booktitle = {AISTATS},
  year =      {2007},
  editor =    {},
}

@inproceedings{stable_beta,
  author =        {Y.W. Teh and D. Gorur},
  title =         "{Indian Buffet Processes with Power-law Behavior}",
  booktitle = {NIPS},
  year =      {2009},
  editor =    {},
}

 @inproceedings{stick_IBP,
    author = {Y.W. Teh and D. Gorur and Z. Ghahramani},
    title = {Stick-breaking Construction for the Indian Buffet Process},
    booktitle={AISTATS},
    year = {2007},
    }

@article{BDR,
author = {D. B. Dunson and N. S. Pillai and J.-H. Park},
title = {Bayesian density regression},
journal = {Journal of the Royal Statistical Society B},
year = 2007},
}

@inproceedings{Mingyuan09,
  author =        {M. Zhou and H. Chen and J. Paisley and L. Ren and G. Sapiro and L. Carin},
  title =         {Non-Parametric {B}ayesian Dictionary Learning for Sparse Image Representations},
  booktitle = {  NIPS},
  year =      {2009},
  editor =    {},
  volume =    {}
}

@inproceedings{Mingyuan09,
  author =        {M. Zhou and H. Chen and J. Paisley and L. Ren and G. Sapiro and L. Carin},
  title =         {Non-Parametric {B}ayesian Dictionary Learning for Sparse Image Representations},
  booktitle = {  NIPS},
  year =      {2009},
  editor =    {},
  volume =    {}
}

@inproceedings{compound,
  author =        {S. Williamson and C. Wang and K.A. Heller and D.M. Blei},
  title =         {The {IBP} Compound {D}irichlet Process and its Application to Focused Topic Modeling},
  booktitle = {ICML},
  year =      {2010},
  editor =    {},
  volume =    {}
}

,

@inproceedings{Rai,
  author =        {P. Rai and H. Daum\'{e}},
  title =         {The infinite hierarchical factor regression model},
  booktitle = {  NIPS},
  year =      {2008},
  editor =    {},
  volume =    {}
}

@inproceedings{IBP,
  author =        {T. L. Griffiths and Z. Ghahramani},
  title =         "{Infinite latent feature models and the Indian buffet process}",
  booktitle = {  NIPS},
  year =      {2005},
}

@inproceedings{NPB_FA,
  author =        {P. Rai and H. Daume III},
  title =         {Nonparametric Bayesian Sparse Hierarchical Factor Modeling and Regression},
  booktitle = {  NIPS},
  year =      {2008},
  editor =    {},
  volume =    {}
}

@inproceedings{BLF,
  author =        {Edward Meeds and Zoubin Ghahramani and Radford Neal and Sam Roweis},
  title =         {Modeling Dyadic Data with Binary Latent Factors},
  booktitle = {  NIPS},
  year =      {2007},
  pages =     {977-984}
}

@inproceedings{mStruct,
  author =        {Suyash Shringarpure and Eric P. Xing},
  title =         {mStruct: A New Admixture Model for Inference of Population Structure in Light of Both Genetic Admixing and Allele Mutation},
  booktitle = {  ICML},
  year =      {2008},
  editor =    {},
  pages =     {952-959}
}

@techreport{PaisleyBPstick,
  author =        {John Paisley and Lawrence Carin},
  title =         {A Stick-Breaking Construction of the Beta Process},
  institution =  {Duke University, ee.duke.edu/$\sim$jwp4/StickBP.pdf},
  year =          {2009},
  number =       {}
}

@phdthesis{bealphd,
  author = {M.J. Beal},
  title =  {Variational Algorithms for Approximate Bayesian Inference},
  school = {Gatsby Computational Neuroscience Unit, University College London},
  year =   {2003}
}

@article{Ferguson73,
  author = "T. Ferguson",
  title = "A {B}ayesian analysis of some nonparametric problems",
  journal = "The Annals of Statistics",
  year = "1973"
}

@article{Multi_probit,
  author = "M. Girolami and S. Rogers",
  title = "Variational {B}ayesian multinomial probit regression with {G}aussian process priors",
  journal = "Neural Computation",
  year = "2006"
}

@article{aldous,
  author = "D. Aldous",
  title = "Exchangeability and related topics",
  journal = "\'{E}cole d'ete de probabilit\'{e}s de Saint-Flour XIII-1983",
  pages = "1-198",
  year = "1985"
}

@book{billingsley,
  author = "P. Billingsley",
  title = "Probability and Measure, 3rd edition",
  publisher = "Wiley Press, New York",
  year = "1995"
}

@article{sethuraman,
  author = "J. Sethuraman",
  title = "A constructive definition of {D}irichlet priors",
  journal = "Statistica Sinica",
  year = "1994"
}

@inproceedings{tehSB,
  author =        {Yee Whye Teh and Dilan G\"{o}r\"{u}r and Zoubin Ghahramani},
  title =         "{Stick-breaking construction for the Indian buffet process}",
  booktitle = {
AISTATS},
  year =      {2007},
  editor =    {},
  volume =    {}
}

@inproceedings{Sapiro_ICML09,
  author =        {J. Mairal and F. Bach and J. Ponce and G. Sapiro},
  title =         {ONLINE DICTIONARY LEARNING FOR SPARSE CODING},
  booktitle = {  ICML},
  year =      {2009},
  editor =    {},
  volume =    {}
}

@inproceedings{Sapiro_NIPS08,
  author =        {J. Mairal and F. Bach and J. Ponce and G. Sapiro and A. Zisserman},
  title =         {Supervised Dictionary Learning},
  booktitle = {  NIPS},
  year =      {2008},
}

@article{HDP,
  author = "Y. W. Teh and M. I. Jordan and M. J. Beal and D. M. Blei",
  title = "Hierarchical Dirichlet processes",
  journal = "J. Am. Stat. Ass.",
  year = "2006"
}

@article{Enet,
  author = "H. Zou and T. Hastie",
  title = "Regularization and variable selection via the elastic net",
  journal = "J. Royal. Statist. Soc B.",
  year = "2005"
}

@ARTICLE{Candes06_3,
  author = "E. Cand\`{e}s and T. Tao",
  title = "Near-optimal signal recovery from random projections and universal encoding strategies",
  JOURNAL =      "IEEE Trans. Inform. Theory",
  year = "2006",
  volume= "52",
  nunumber ="12",
};

@ARTICLE{SparseRest,
title={Sparse Representation for Color Image Restoration},
author={J. Mairal and M. Elad and G. Sapiro},
journal={IEEE Trans. on Image Process.},
year={2008},
volume={17},
}

@ARTICLE{KSVD,
title={The {K-SVD}: An algorithm for designing of overcomplete dictionaries for sparse representations},
author={M. Aharon and M. Elad and A. M. Bruckstein},
journal={IEEE Trans. Signal Process.},
year={2006},
}

@ARTICLE{KSVD_Denoising,
title={Image denoising via sparse and redundant representations over learned dictionaries},
author={M. Elad and M. Aharon},
journal={IEEE Trans. Image Process.},
year={2006},
}

@inproceedings{Lecun,
    author = {M. Ranzato and C. Poultney and S. Chopra and Y. Lecun},
    booktitle = {  NIPS},
    title = {Efficient Learning of Sparse Representations with an Energy-Based Model},
    year = {2006}
}

@ARTICLE{BCS,
title={Bayesian Compressive Sensing},
author={S. Ji and Y. Xue and L. Carin},
journal={IEEE Trans. on Signal Process.},
year={2008},
volume={56},
}

@ARTICLE{CS_IMA,
title={LEARNING TO SENSE SPARSE SIGNALS: SIMULTANEOUS SENSING MATRIX AND SPARSIFYING DICTIONARY OPTIMIZATION},
author={J. M. Duarte-Carvajalino and G. Sapiro},
journal={IMA Preprint Series 2211},
year={2008},
}

@inproceedings{BPFA,
    author = {J. Paisley and L. Carin},
    booktitle = {  ICML},
    title = {Nonparametric Factor Analysis with Beta Process Priors},
    year = {2009}
}

@ARTICLE{PSBP,
title={Nonparametric Bayesian models through probit stickbreaking processes},
author={A. Rodriguez and D. B. Dunson},
journal={Univ. California Santa Cruz Technical Report},
year={2009},
}

@inproceedings{SBP,
    title = "{Indian buffet processes with power-law behavior}",
    author = {Y. W. Teh and D. Gorur},
    year = {2009},
   booktitle = {  NIPS},
   }

@ARTICLE{SliceSampling,
title={Gibbs sampling for {B}ayesian non-conjugate and hierarchical models by using auxiliary variables},
author={P. Damlen and J. Wakefield and S. Walker},
journal={Journal of the Royal
Statistical Society B Stat. Methodol},
year={1999},
}

@ARTICLE{MCMC,
title={{M}onte {C}arlo sampling methods using {M}arkov chains
and their application},
author={W. Hastings},
journal={Biometrika},
year={1970},
}

@ARTICLE{DataAugment,
title={The Art of Data
Augmentation},
author={D.A. van Dyk and X. Meng},
journal={Journal of Computational and Graphical Statistics},
year={2001},
}

@INPROCEEDINGS{diffmaps,
    author = {B. Nadler and S. Lafon and R. R. Coifman and I. G. Kevrekidis},
    title = {Diffusion Maps, Spectral Clustering and Eigenfunctions of {F}okker-{P}lanck Operators},
    booktitle = {  NIPS},
    year = {2005},
}

@article{Isomap,
  author = {J. B. Tenenbaum and V. Silva and J. C. Langford},
  journal = {Science},
  title = {A Global Geometric Framework for Nonlinear Dimensionality Reduction},
   year = 2000,
}

@INPROCEEDINGS{CVPR_dict,
author = {J. Mairal and F. Bach and J. Ponce and G. Sapiro and A. Zisserman},
    title = {Discriminative learned dictionaries for local image analysis},
    booktitle = {  CVPR},
    year = {2008},
}

@INPROCEEDINGS{IBP_tree,
author = {K. Miller and T. Griffiths and M. I. Jordan.},
    title = "{The phylogenetic Indian buffet process: A non-exchangeable nonparametric prior for latent features}",
    booktitle = {  UAI},
    year = {2008},
}

@INPROCEEDINGS{dIBP,
    author = {S. Williamson and P. Orbanz and Z. Ghahramani},
    title = "{Dependent Indian buffet processes}",
    booktitle = {
AISTATS},
    year = {2010},
}

@article{Levy_Sato,
author = {K. Sato},
title = {L\'evy processes and infinitely divisible distributions},
year = {1999},
masid = {2043401}
}

@incollection{TehJor2010a,
Author =        {Y. W. Teh and M. I. Jordan},
Title =         {Hierarchical {B}ayesian Nonparametric Models with Applications},
Booktitle =     {Bayesian Nonparametrics: Principles and Practice},
Editor =        {N. Hjort and C. Holmes and P. M{\"u}ller and S. Walker},
Publisher =     {Cambridge University Press},
Year =          {2010}}

@book{BM,
  author = "Peter {M\"orters} and Yuval Peres",
  title = "Brown motion",
  publisher = "Cambridge University Press",
  year = "2010"
}

@book{Applebaum,
  author = {D. Applebaum},
  title = {Levy Processes and Stochastic Calculus},
  publisher = {Cambridge University Press},
  year = {2009}
}

@article{Sethuraman1994,
author = {J. Sethuraman},
title = {A constructive definition of Dirichlet priors},
year = {1994},
masid = {2030929}
}

@inproceedings{DDP,
author = {S. N. MacEachern},
title = {Dependent {N}onparametric {P}rocesses},
booktitle = {In Proceedings of the Section on Bayesian Statistical Science},
year = {1999}
}

@inproceedings{HPY,
title= "A Hierarchical {B}ayesian Language Model based on {P}itman-{Y}or Processes",
author= "Y. W. Teh",
booktitle= "Proceedings of the 21st International Conference on Computational Linguistics and 44th Annual Meeting of the Association for Computational Linguistics",
pages= "985-992",
year= "2006",
url= {http://www.aclweb.org/anthology/P/P06/P06-1124}
}

@article{KSBP,
author = {D. B. Dunson and J.-H. Park},
title = {Kernel stick-breaking processes},
journal = {Biometrika},
volume = {95},
year = {2008},
pages = {307--323},
doi = {10.1093/biomet/asn012},
masid = {4555396}
}

@incollection{Lin2010,
 title = {Construction of Dependent Dirichlet Processes based on Poisson Processes},
 author = {Dahua Lin and Eric Grimson and John Fisher},
 booktitle = {Advances in Neural Information Processing Systems 23},
 pages = {1396--1404},
 year = {2010}
}

@inproceedings{CRM,
  author =        {J. F. C. Kingman},
  title =         {Completely Random Measure},
  booktitle = {Pacific Journal of Mathematics},
  year =      {1967},
  editor =    {},
  volume =    {21(1):59-78}
}

@article{dHDP,
author = {L. Ren and D. Dunson and S. Lindroth and L. Carin},
title = {Dynamic Nonparametric Bayesian Models for Analysis of Music},
journal = {Journal of The American Statistical Association},
volume = {105},
year = {2010},
pages = {458--472},
doi = {10.1198/jasa.2009.ap08497},
masid = {12948454}
}

repository: jovo/spike-sorting

repo_name: jovo/spike-sorting

gha_language: Matlab


text:
@inproceedings{Degabriele:2007:EAU:1386610.1386645,
 author = {Degabriele, Jean Paul and Pym, David},
 title = {Economic aspects of a utility computing service},
 booktitle = {Proceedings of the first international conference on Networks for grid applications},
 series = {GridNets '07},
 year = {2007},
 isbn = {978-963-9799-02-8},
 location = {Lyon, France},
 pages = {27:1--27:7},
 articleno = {27},
 numpages = {7},
 url = {http://dl.acm.org/citation.cfm?id=1386610.1386645},
 acmid = {1386645},
 publisher = {ICST (Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering)},
 address = {ICST, Brussels, Belgium, Belgium},
 keywords = {DEMOS 2000, economics, modelling, pricing, resource flexing, security, utility computing},
}

@inproceedings{Wang:2009:CMH:1646468.1646475,
 author = {Wang, Lei and Zhan, Jianfeng and Shi, Weisong and Liang, Yi and Yuan, Lin},
 title = {{In cloud, do MTC or HTC service providers benefit from the economies of scale?}},
 booktitle = {Proceedings of the 2nd Workshop on Many-Task Computing on Grids and Supercomputers},
 series = {MTAGS '09},
 year = {2009},
 isbn = {978-1-60558-714-1},
 location = {Portland, Oregon},
 pages = {7:1--7:10},
 articleno = {7},
 numpages = {10},
 url = {http://doi.acm.org/10.1145/1646468.1646475},
 doi = {10.1145/1646468.1646475},
 acmid = {1646475},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {cloud computing, economies of scale, high throughput computing, many task computing, service providers},
}

@inproceedings{Ghanbari:2012:OAI:2371536.2371567,
 author = {Ghanbari, Hamoun and Simmons, Bradley and Litoiu, Marin and Barna, Cornel and Iszlai, Gabriel},
 title = {{Optimal autoscaling in a IaaS cloud}},
 booktitle = {Proceedings of the 9th international conference on Autonomic computing},
 series = {ICAC '12},
 year = {2012},
 isbn = {978-1-4503-1520-3},
 location = {San Jose, California, USA},
 pages = {173--178},
 numpages = {6},
 url = {http://doi.acm.org/10.1145/2371536.2371567},
 doi = {10.1145/2371536.2371567},
 acmid = {2371567},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {application, autoscaling, cloud, cost, model predictive control, optimization, performance},
}

@inproceedings{Brebner:2012:YCE:2188286.2188334,
 author = {Brebner, Paul C.},
 title = {{Is your cloud elastic enough?: performance modelling the elasticity of infrastructure as a service (IaaS) cloud applications}},
 booktitle = {Proceedings of the third joint WOSP/SIPEW international conference on Performance Engineering},
 series = {ICPE '12},
 year = {2012},
 isbn = {978-1-4503-1202-8},
 location = {Boston, Massachusetts, USA},
 pages = {263--266},
 numpages = {4},
 url = {http://doi.acm.org/10.1145/2188286.2188334},
 doi = {10.1145/2188286.2188334},
 acmid = {2188334},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {cloud, elasticity, iaas},
}

@inproceedings{Wilkes:2004:UTI:1133572.1133603,
 author = {Wilkes, John and Mogul, Jeffrey and Suermondt, Jaap},
 title = {Utilification},
 booktitle = {Proceedings of the 11th workshop on ACM SIGOPS European workshop},
 series = {EW 11},
 year = {2004},
 location = {Leuven, Belgium},
 articleno = {13},
 url = {http://doi.acm.org/10.1145/1133572.1133603},
 doi = {10.1145/1133572.1133603},
 acmid = {1133603},
 publisher = {ACM},
 address = {New York, NY, USA},
}

@article{Valiant:1990:BMP:79173.79181,
 author = {Valiant, Leslie G.},
 title = {A bridging model for parallel computation},
 journal = {Commun. ACM},
 issue_date = {Aug. 1990},
 volume = {33},
 number = {8},
 month = aug,
 year = {1990},
 issn = {0001-0782},
 pages = {103--111},
 numpages = {9},
 url = {http://doi.acm.org/10.1145/79173.79181},
 doi = {10.1145/79173.79181},
 acmid = {79181},
 publisher = {ACM},
 address = {New York, NY, USA},
}

@article{Dean:2008:MSD:1327452.1327492,
 author = {Dean, Jeffrey and Ghemawat, Sanjay},
 title = {{MapReduce: simplified data processing on large clusters}},
 journal = {Commun. ACM},
 issue_date = {January 2008},
 volume = {51},
 number = {1},
 month = jan,
 year = {2008},
 issn = {0001-0782},
 pages = {107--113},
 numpages = {7},
 url = {http://doi.acm.org/10.1145/1327452.1327492},
 doi = {10.1145/1327452.1327492},
 acmid = {1327492},
 publisher = {ACM},
 address = {New York, NY, USA},
}

@inproceedings{Malewicz:2010:PSL:1807167.1807184,
 author = {Malewicz, Grzegorz and Austern, Matthew H. and Bik, Aart J.C and Dehnert, James C. and Horn, Ilan and Leiser, Naty and Czajkowski, Grzegorz},
 title = {Pregel: a system for large-scale graph processing},
 booktitle = {Proceedings of the 2010 ACM SIGMOD International Conference on Management of data},
 series = {SIGMOD '10},
 year = {2010},
 isbn = {978-1-4503-0032-2},
 location = {Indianapolis, Indiana, USA},
 pages = {135--146},
 numpages = {12},
 url = {http://doi.acm.org/10.1145/1807167.1807184},
 doi = {10.1145/1807167.1807184},
 acmid = {1807184},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {distributed computing, graph algorigthms},
}

@INPROCEEDINGS{MTF08,
author={Matsunaga, A. and Tsugawa, M. and Fortes, J.},
booktitle={eScience, 2008. eScience '08. IEEE Fourth International Conference on},
title={{CloudBLAST: Combining MapReduce and Virtualization on Distributed Resources for Bioinformatics Applications}},
year={2008},
pages={222-229},
keywords={application program interfaces;bioinformatics;message passing;virtual machines;wide area networks;CloudBLAST;MPI-based solution;MapReduce;WAN-based test bed;bioinformatics applications;bioinformatics tool;computing resources;distributed computing;distributed resources;message passing interface;network virtualization;virtual machines;virtual network technology;wide area networks;Application virtualization;Bioinformatics;Computer network management;Distributed computing;Environmental management;Resource management;Resource virtualization;Technology management;Testing;Virtual machining;Cloud computing;bioinformatics;mapreduce;virtualization},
doi={10.1109/eScience.2008.62},}

@INPROCEEDINGS{SS12,
author={Slawinski, J. and Sunderam, V.},
booktitle={Utility and Cloud Computing (UCC), 2012 IEEE Fifth International Conference on},
title={{Adapting MPI to MapReduce PaaS Clouds: An Experiment in Cross-Paradigm Execution}},
year={2012},
pages={199-203},
keywords={cloud computing;message passing;middleware;MPI;MapReduce PaaS cloud;application requirement;cloud computing;collateral benefit;cross paradigm execution;message passing program;middleware component;platform model;programming paradigm;utility computing;Adaptation models;Cloud computing;Computational modeling;Libraries;Programming;Runtime;Standards;Cloud computing;cloud stacks;computing as a utility;middleware;paradigm interoperability;programming models},
doi={10.1109/UCC.2012.52},}

@inproceedings{Bunch:2011:NDS:1996109.1996120,
 author = {Bunch, Chris and Chohan, Navraj and Krintz, Chandra and Shams, Khawaja},
 title = {Neptune: a domain specific language for deploying hpc software on cloud platforms},
 booktitle = {Proceedings of the 2nd international workshop on Scientific cloud computing},
 series = {ScienceCloud '11},
 year = {2011},
 isbn = {978-1-4503-0699-7},
 location = {San Jose, California, USA},
 pages = {59--68},
 numpages = {10},
 url = {http://doi.acm.org/10.1145/1996109.1996120},
 doi = {10.1145/1996109.1996120},
 acmid = {1996120},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {cloud platform, domain specific language, service placement},
}

@inproceedings{Hoefler:2009:TEM:1612208.1612248,
 author = {Hoefler, Torsten and Lumsdaine, Andrew and Dongarra, Jack},
 title = {{Towards Efficient MapReduce Using MPI}},
 booktitle = {Proceedings of the 16th European PVM/MPI Users' Group Meeting on Recent Advances in Parallel Virtual Machine and Message Passing Interface},
 year = {2009},
 isbn = {978-3-642-03769-6},
 location = {Espoo, Finland},
 pages = {240--249},
 numpages = {10},
 doi = {10.1007/978-3-642-03770-2_30},
 acmid = {1612248},
 publisher = {Springer-Verlag},
 address = {Berlin, Heidelberg},
}

@inproceedings{Hamidouche:2010:HBS:1863482.1863494,
 author = {Hamidouche, Khaled and Falcou, Joel and Etiemble, Daniel},
 title = {Hybrid bulk synchronous parallelism library for clustered smp architectures},
 booktitle = {Proceedings of the fourth international workshop on High-level parallel programming and applications},
 series = {HLPP '10},
 year = {2010},
 isbn = {978-1-4503-0254-8},
 location = {Baltimore, Maryland, USA},
 pages = {55--62},
 numpages = {8},
 url = {http://doi.acm.org/10.1145/1863482.1863494},
 doi = {10.1145/1863482.1863494},
 acmid = {1863494},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {bulk synchronous parallelism, mpi, openmp, smp cluster},
}

@inproceedings{Roda:1998:BSP:945406.938371,
 author = {Roda, J. and Rodr\'{\i}guez, C. and Morales, D. G. and Almeida, F.},
 title = {Bulk Synchronous Parallel without Barriers},
 booktitle = {Proceedings of the 24th Conference on EUROMICRO - Volume 2},
 series = {EUROMICRO '98},
 year = {1998},
 isbn = {0-8186-8646-4-2},
 pages = {20961--},
 url = {http://dl.acm.org/citation.cfm?id=945406.938371},
 acmid = {938371},
 publisher = {IEEE Computer Society},
 address = {Washington, DC, USA},
}

@misc{url:ec2,
        title = {{Amazon Elastic Computing Cloud}},
        howpublished = {\url{http://aws.amazon.com/ec2}},
        key = {Amazon Elastic Computing Cloud},
        year = 2013
}

@misc{url:gae,
        title = {{Google App Engine}},
        howpublished = {\url{https://developers.google.com/appengine}},
        key = {Google App Engine},
        year = 2013
}

@misc{url:azure,
        title = {{Windows Azure}},
        howpublished = {\url{http://www.windowsazure.com}},
        key = {Windows Azure},
        year = 2013
}

@misc{url:euca,
        title = {Eucalyptus},
        howpublished = {\url{http://www.eucalyptus.com}},
        key = {Eucalyptus},
        year = 2013
}

@misc{url:openshift,
        title = {{OpenShift}},
        howpublished = {\url{http://www.openshift.com}},
        key = {OpenShift},
        year = 2013
}

@misc{url:mpi,
        title = {{Message Passing Interface Standard}},
        howpublished = {\url{http://www.mcs.anl.gov/research/projects/mpi}},
        key = {Message Passing Interface Standard},
        year = 2013
}

@misc{url:hadoop,
        title = {{Apache Hadoop}},
        howpublished = {\url{http://hadoop.apache.org}},
        key = {Apache Hadoop},
        year = 2013
}

@misc{url:emr,
        title = {{Amazon Elastic MapReduce}},
        howpublished = {\url{http://aws.amazon.com/elasticmapreduce}},
        key = {Amazon Elastic MapReduce},
        year = 2013
}

@misc{url:mrmpi,
        title = {{MapReduce MPI Library}},
        howpublished = {\url{http://mapreduce.sandia.gov}},
        key = {MapReduce MPI Library},
        year = 2013
}

@misc{url:bsponmpi,
        title = {{BSPonMPI Library}},
        howpublished = {\url{http://bsponmpi.sourceforge.net}},
        key = {BSPonMPI Library},
        year = 2013
}

@misc{url:hama,
        title = {{Apache Hama}},
        howpublished = {\url{http://hama.apache.org}},
        key = {Apache Hama},
        year = 2013
}

@misc{url:dmtcp,
        title = {{DMTCP: Distributed multithreaded checkpointing}},
        howpublished = {\url{http://dmtcp.sourceforge.net}},
        key = {DMTCP: Distributed multithreaded checkpointing},
        year = 2013
}

@misc{url:mpich,
        title = {{MPICH: High performance portable MPI}},
        howpublished = {\url{http://www.mpich.org}},
        key = {MPICH: High performance portable MPI},
        year = 2013
}

@misc{url:yarn,
        title = {{Apache Hadoop NextGen MapReduce (YARN)}},
        howpublished = {\url{http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YARN.html}},
        key = {Apache Hadoop NextGen MapReduce (YARN)},
        year = 2013
}

repository: UCSB-CS-RACELab/eager-appscale

license_type: permissive

repo_name: UCSB-CS-RACELab/eager-appscale

branch_name: refs/heads/master

extension: bib


text:
package actions

import (
	"context"
	"time"

	"github.com/gobuffalo/buffalo/worker"
	"github.com/gobuffalo/envy"
	"github.com/gobuffalo/toolkit/models"
	"github.com/gobuffalo/toolkit/models/discovery/github"
	"github.com/pkg/errors"
)

func addRepoWorkers(ctx context.Context, w worker.Worker) error {
	if err := w.Register("findGitHubRepos", findGitHubRepos(ctx, w)); err != nil {
		return errors.WithStack(err)
	}
	if err := w.Perform(githubJob); err != nil {
		return errors.WithStack(err)
	}
	return nil
}

var githubJob = worker.Job{
	Queue:   "default",
	Handler: "findGitHubRepos",
	Args:    worker.Args{},
}

func findGitHubRepos(ctx context.Context, w worker.Worker) worker.Handler {
	return func(args worker.Args) error {
		defer w.PerformIn(githubJob, 60*time.Minute)
		token, err := envy.MustGet("GITHUB_TOKEN")
		if err != nil {
			return errors.WithStack(err)
		}

		g, err := github.New(ctx, token)
		if err != nil {
			return errors.WithStack(err)
		}
		repos, err := g.Search(ctx, "gobuffalo")
		if err != nil {
			return errors.WithStack(err)
		}

		return models.ProcessProjects(repos)
	}
}

license: MIT

repository: gobuffalo/toolkit

repo_name: gobuffalo/toolkit

gha_license_id: MIT

gha_language: Go

extension: go


text:
DESCRIPTION = "The Open webOS power management daemon"
AUTHOR = "Hewlett-Packard Development Company, L.P"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://README.md;md5=55a6001c5e0219eb260937964862a8a6"
PV = "4.0.0-rc1+gitr${SRCPV}"
PR = "r6"

DEPENDS = "glib-2.0 cjson-openwebos luna-service2 nyx-lib"

SRC_URI = " \
  git://github.com/openwebos/powerd.git;protocol=http;branch=master \
  file://add-missing-dependency-librt.patch \
  file://powerd.service"
S = "${WORKDIR}/git"

SRCREV = "5077891a3430aa6ed5c10b222d82126b44a905cc"

inherit cmake systemd upstart

SYSTEMD_PACKAGES = "${PN}-systemd"
SYSTEMD_SERVICE = "powerd.service"

EXTRA_OECMAKE = "-DTARGET_CORE_OS=rockhopper"

do_install_append() {
  install -d ${D}${datadir}/ls2/roles/prv
  install -d ${D}${datadir}/ls2/services/prv
  install -d ${D}${datadir}/ls2/roles/pub
  install -d ${D}${datadir}/ls2/services/pub

  install -m 0644 ${S}/service/com.palm.power.json.prv \
    ${D}${datadir}/ls2/roles/prv/com.palm.power.json
  install -m 0644 ${S}/service/com.palm.power.json.pub \
    ${D}${datadir}/ls2/roles/pub/com.palm.power.json

  install -m 0644 ${S}/service/com.palm.power.service.prv \
    ${D}${datadir}/ls2/services/prv/com.palm.power.service
  install -m 0644 ${S}/service/com.palm.power.service.pub \
    ${D}${datadir}/ls2/services/pub/com.palm.power.service

  install -d ${D}${localstatedir}/preferences/com.palm.power
  install -m 0644 ${S}/powerd/preferences/powerd.conf \
    ${D}${localstatedir}/preferences/com.palm.power
}

FILES_${PN} += " \
  ${datadir}/ls2/ \
  ${localstatedir}/preferences/com.palm.power"

extension: bb


text:
DESCRIPTION = "NXLIB X11 Emulation Library for Nano-X"
PRIORITY = "optional"
LICENSE = "GPL"
PROVIDES = "virtual/libx11"
DEPENDS = "microwindows-snapshot"

PR="r0"

SRC_URI = " \
  ftp://ftp.microwindows.org/pub/microwindows/nxlib-${PV}.tar.gz \
  file://varargs.patch \
 "

EXTRA_OEMAKE = ' \
  CC="${CC}" \
  MWIN=${STAGING_DIR}/${HOST_SYS} \
  X11=${STAGING_DIR}/${HOST_SYS} \
 '

# not sure yet about installation -- uncommenting below over-writes libX11 in staging
#do_install() {
#  oe_runmake install
#}

SRC_URI[md5sum] = "9a1e3b81df0e32189fa873fd6fc086e5"
SRC_URI[sha256sum] = "8e63251e1599474d18912ad82b2e6b0c6c612e7eb9507958ab0f60f92d7ea454"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
SUMMARY = "The qml application launcher for the Luna Next webOS UI platform."
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=4ddd17b0c9241d7b24a4960caefe8e40"

DEPENDS = "qtbase qtdeclarative luna-sysmgr-common libwebos-application"
RDEPENDS_${PN} += " qtdeclarative-qmlplugins"

WEBOS_VERSION = "0.1.0-4_217c572e23d5a9613e4c3e277be2a768887cf55f"

inherit webos_component
inherit webos_public_repo
inherit webos_enhanced_submissions
inherit webos_system_bus

SRC_URI = "git://github.com/webOS-ports/${PN};protocol=git;branch=master"
S = "${WORKDIR}/git"

# We need to warrant the correct order for the following two inherits as webos_cmake is
# setting the build dir to be outside of the source dir which is overriden by cmake_qt5
# again if we inherit it afterwards.
inherit cmake_qt5
inherit webos_cmake

repository: nizovn/meta-webos-ports

repo_name: nizovn/meta-webos-ports


text:
/*
 * @lc app=leetcode.cn id=349 lang=golang
 *
 * [349] 两个数组的交集
 *
 * https://leetcode-cn.com/problems/intersection-of-two-arrays/description/
 *
 * algorithms
 * Easy (65.69%)
 * Likes:    128
 * Dislikes: 0
 * Total Accepted:    33.9K
 * Total Submissions: 51.2K
 * Testcase Example:  '[1,2,2,1]\n[2,2]'
 *
 * 给定两个数组，编写一个函数来计算它们的交集。
 *
 * 示例 1:
 *
 * 输入: nums1 = [1,2,2,1], nums2 = [2,2]
 * 输出: [2]
 *
 *
 * 示例 2:
 *
 * 输入: nums1 = [4,9,5], nums2 = [9,4,9,8,4]
 * 输出: [9,4]
 *
 * 说明:
 *
 *
 * 输出结果中的每个元素一定是唯一的。
 * 我们可以不考虑输出结果的顺序。
 *
 *
 */
func intersection(nums1 []int, nums2 []int) []int {
	m1 := map[int]bool{}
	for _, el := range nums1 {
		m1[el] = true
	}
	m2 := map[int]bool{}
	for _, el := range nums2 {
		if m1[el] {
			m2[el] = true
		}
	}
	ret := []int{}
	for k, _ := range m2 {
		ret = append(ret, k)
	}
	return ret
}

filename: 349.两个数组的交集.go


text:
package main

import (
  "os"
  "github.com/codegangsta/cli"
)

func main() {
  newApp().Run(os.Args)
}

func newApp() *cli.App {
  app := cli.NewApp()
  app.Name = "journal"
  app.Usage = "Journal for Daily Reports"
  app.Version = "0.1.4"
  app.Author = "jigsaw"
  app.Email = "m@jgs.me"
  app.Commands = Commands
  return app
}

repository: e-jigsaw/journal

repo_name: e-jigsaw/journal


text:
package tail

import (
	"bytes"
	"database/sql"
	"fmt"
	"github.com/pkg/errors"
	"text/template"
	"time"

	"github.com/Masterminds/sprig"
)

// Option to configure Tails
type Option func(c *Config) (*Config, error)

// Config for tails
type Config struct {
	db     *sql.DB
	table  string
	target chan string

	fields      string
	id          string
	format      string
	interval    time.Duration
	placeholder string

	template *template.Template
	ticker   *time.Ticker
	done     chan bool
	last     interface{}
	// TODO: add logger if nothing happens...
	lastChange time.Time
	started    bool
}

// Format for tail - default is {{.ID}}
func Format(format string) Option {
	return func(c *Config) (*Config, error) {
		c.format = format
		return c, nil
	}
}

// ID for tail - default is ID
func ID(id string) Option {
	return func(c *Config) (*Config, error) {
		c.id = id
		return c, nil
	}
}

// Fields for tail - default is ID
func Fields(fields string) Option {
	return func(c *Config) (*Config, error) {
		c.fields = fields
		return c, nil
	}
}

// Interval for tail - default is 200ms
func Interval(d time.Duration) Option {
	return func(c *Config) (*Config, error) {
		c.interval = d
		return c, nil
	}
}

// Placeholder ident to use for your driver, default is :
func Placeholder(p string) Option {
	return func(c *Config) (*Config, error) {
		c.placeholder = p
		return c, nil
	}
}

// Start creates and starts a new tail new Tail
func Start(db *sql.DB, table string, target chan string, opts ...Option) (*Config, error) {
	c := &Config{
		db:     db,
		table:  table,
		target: target,

		id:          "ID",
		fields:      "ID",
		format:      "{{.ID}}",
		interval:    200 * time.Millisecond,
		placeholder: ":",

		done:    make(chan bool, 1),
		started: false,
	}
	var err error

	for _, opt := range opts {
		c, err = opt(c)
		if err != nil {
			return nil, err
		}
	}

	if c.started {
		panic("already started")
	}
	c.started = true

	c.template, err = template.New("").Funcs(sprig.TxtFuncMap()).Parse(c.format)
	if err != nil {
		return nil, err
	}

	err = c.fetchInitial()
	if err != nil {
		return nil, err
	}

	c.ticker = time.NewTicker(c.interval)
	go c.tail()
	return c, nil
}

// Stop the tail and close the channel
func (c *Config) Stop() {
	c.ticker.Stop()
	close(c.done)
	close(c.target)
}

func (c *Config) tail() {
	for {
		select {
		case <-c.ticker.C:
			// TODO: add possibility for error channel
			err := c.fetch()
			if err != nil {
				c.target <- err.Error()
			}
		case <-c.done:
			return
		}
	}
}

func (c *Config) fetchInitial() error {
	query := fmt.Sprintf("SELECT %s FROM %s ORDER BY %s DESC FETCH FIRST ROW ONLY", c.id, c.table, c.id)
	row := c.db.QueryRow(query)
	if row != nil {
		var initialLast interface{}
		err := row.Scan(&initialLast)
		if err != nil && err != sql.ErrNoRows {
			return errors.Wrap(err, "while executing: "+query)
		}
		c.last = initialLast
	}
	return nil
}

// tries to fetch and set last row
func (c *Config) fetch() error {
	query := fmt.Sprintf("SELECT %s FROM %s where %s > %s1 ORDER BY %s ASC", c.fields, c.table, c.id, c.placeholder, c.id)
	params := []interface{}{c.last}
	if c.last == nil {
		query = fmt.Sprintf("SELECT %s FROM %s ORDER BY %s ASC FETCH FIRST ROW ONLY", c.fields, c.table, c.id)
		params = []interface{}{}
	}

	rows, err := c.db.Query(query, params...)
	if err != nil {
		return errors.Wrap(err, "while executing: "+query)
	}
	cols, err := rows.Columns()
	if err != nil {
		return err
	}
	var newLast interface{}

	for rows.Next() {
		columns := make([]interface{}, len(cols))
		columnPointers := make([]interface{}, len(cols))
		for i := range columns {
			columnPointers[i] = &columns[i]
		}

		if err := rows.Scan(columnPointers...); err != nil {
			return err
		}
		m := make(map[string]interface{})
		for i, colName := range cols {
			val := columnPointers[i].(*interface{})
			m[colName] = *val
		}

		var tpl bytes.Buffer
		if err := c.template.Execute(&tpl, m); err != nil {
			return err
		}
		last, found := m[c.id]
		if !found {
			keys := make([]string, 0, len(m))
			for k := range m {
				keys = append(keys, k)
			}
			return errors.Errorf("id: [%v] not found in fields: %+v", c.id, keys)
		}
		newLast = last
		c.target <- tpl.String()
	}
	if newLast != nil {
		c.last = newLast
	}
	return nil
}

repository: gitu/table-tail

repo_name: gitu/table-tail


text:
package quic

import (
  "mime"
  "path/filepath"
  "strings"
  "sync"

  "github.com/google/logger"
	"github.com/lucas-clemente/quic-go/order"
)

// StreamControlBlock 是 MemoryStorage 中存放的 stream 控制块
type StreamControlBlock struct {
  StreamID StreamID
  URL      string
  Active   bool
  Data     *[]byte
  Replaced bool
}

// NewStreamControlBlock 返回一个按照给定值构造的 StreamControlBlock 变量
func NewStreamControlBlock(id StreamID, url string, active bool, data *[]byte, replaced bool) *StreamControlBlock {
  return &StreamControlBlock{
    StreamID: id,
    URL:      url,
    Active:   active,
    Data:     data,
    Replaced: replaced,
  }
}

// GetMimeType 根据资源路径返回对应的 MIME 类型
func GetMimeType(fileName string) string {
  // 获取资源的扩展名
  fileExt := filepath.Ext(fileName)
  var mtype string

  // 以下扩展名的资源无法从系统库中获取 MIME 类型，需要在本函数中指定 MIME 类型
  switch fileExt {
  case "":
    mtype = "text/html"
  case ".woff2":
    mtype = "font"
  }
  if mtype != "" {
    return mtype
  }

  // 不是已知的无法从系统库中获取到 MIME 类型的资源，则需要尝试从系统库中获取资源
  mtype = mime.TypeByExtension(filepath.Ext(fileName))
  if mtype == "" {
    // 无法从系统库中查找到该资源对应的 MIME 类型
    mtype = "unknown"
    logger.Infof("warning: unknown mimetype for url = %v\n", fileName)
  } else {
    // 针对可以从系统库中获取到 MIME 类型的资源，检查系统库给的 MIME 类型中是否包含
    // 类似于 “text/css; charset=utf-8” 的字符集信息
    semicolonIndex := strings.Index(mtype, ";")
    if semicolonIndex > 0 {
      // 移除字符集信息
      mtype = mtype[:semicolonIndex]
    }
  }
  return mtype
}

// MemoryStorage 在内存中存放所有静态文件的控制字段和数据字段
type MemoryStorage struct {
  mutex sync.Mutex

  // 约定的传输顺序
  ManagedStreams []*StreamControlBlock
  // 保存 url 到 managed 类型 stream 在 sequence 数组中的位置
  URLToManagedStreamIndex map[string]int
  // 保存 StreamID 到 managed 类型 stream 在 sequence 数组中的位置
  IDToManagedStreamIndex map[StreamID]int
  // 已安排顺序的活跃 stream 数目
  ActiveManagedStreamCount int

  // 没有指定顺序的 stream 采用 RR 算法交替发送数据
	UnmanagedStreams []StreamID
}

// 全局唯一的 memory storage 实例
var storage = MemoryStorage{
  ManagedStreams:          make([]*StreamControlBlock, 0),
  URLToManagedStreamIndex: make(map[string]int),
  IDToManagedStreamIndex:  make(map[StreamID]int),
  UnmanagedStreams:        make([]StreamID, 0),
}

// InitMemoryStorage 负责在内存中加载指定的资源文件
func InitMemoryStorage() {
  /* 把所有 managed 的资源 url 全部读出并压入 memory storage 中的传输队列中 */
  storage.ManagedStreams = append(storage.ManagedStreams,
    NewStreamControlBlock(-1, "", false, nil, false)) // 先把控制 stream 压入队列
  storage.URLToManagedStreamIndex[""] = 0 // 此 stream 位于队伍首位，以最高优先级传输
  logger.Infof("url = <%v> added to index <%v>", "", 0)
  // 加载其余的 url 队列中
  for index, url := range order.YoutubeNetworkList {
    storage.ManagedStreams =
      append(storage.ManagedStreams, NewStreamControlBlock(-1, url, false, nil, false))
    storage.URLToManagedStreamIndex[url] = index + 1
    logger.Infof("url = <%v> added to index <%v>", url, index+1)
  }
  logger.Infof("memory storage inited")
}

// GetMemoryStorage 返回指向 memory storage 全局变量的指针
func GetMemoryStorage() *MemoryStorage {
  return &storage
}

// ContainsByURL 检查给出的 url 是否有收录在 MemoryStorage 中
// func (ms *MemoryStorage) ContainsByURL(key string) bool {
//   defer ms.mutex.Unlock()
//   ms.mutex.Lock()
//   _, ok := ms.URLToManagedStreamIndex[key]
//   return ok
// }

// ContainsByID 检查给出的 StreamID 是否有收录在 MemoryStorage 中
// func (ms *MemoryStorage) ContainsByID(key StreamID) bool {
//   defer ms.mutex.Unlock()
//   ms.mutex.Lock()
//   _, ok := ms.IDToManagedStreamIndex[key]
//   return ok
// }

// ActivateByURL 激活 storage 实例中以 url 为 key 的 stream
// func (ms *MemoryStorage) ActivateByURL(url string) {
//   defer ms.mutex.Unlock()
//   ms.mutex.Lock()
//   index, ok := ms.URLToManagedStreamIndex[url]
//   if ok {
//     logger.Infof("error in activating non-exists stream by url <%v>", url)
//     return
//   }
//   ms.ManagedStreams[index].Active = true
// }

// GetByURL 以 url 为 key 查找资源对应的 stream control block
// func (ms *MemoryStorage) GetByURL(url string) *StreamControlBlock {
//   defer ms.mutex.Unlock()
//   ms.mutex.Lock()
//   val, ok := ms.urlToBlockMap[url]
//   if !ok {
//     logger.Errorf("error: loading non-existent value by key <%v>\n", url)
//     return nil
//   }
//   logger.Infof("cache hit, key = <%v>, len = <%v>", url, len(*val.Data))
//   return val
// }

// GetByID 通过 StreamID 来在 storage 实例中查找对应的 StreamControlBlock
// func (ms *MemoryStorage) GetByID(id StreamID) *StreamControlBlock {
//   defer ms.mutex.Unlock()
//   ms.mutex.Lock()
//   val, ok := ms.idToBlockMap[id]
//   if !ok {
//     logger.Errorf("error: loading non-existent value by key <%v>", id)
//     return nil
//   }
//   return val
// }

// MarkAsReplaced 把 url 指定的资源的替换标志位设为 true
// func (ms *MemoryStorage) MarkAsReplaced(url string) bool {
//   defer ms.mutex.Unlock()
//   ms.mutex.Lock()
//   val, ok := ms.urlToBlockMap[url]
//   if ok {
//     val.Replaced = true
//     logger.Infof("replace bit for url <%v> set to true", url)
//     return ok
//   }
//   return ok
// }

// BindURLAndStreamID 在 storage 实例中绑定 url 和 对应的 StreamID
func (ms *MemoryStorage) BindURLAndStreamID(url string, id StreamID) {
  defer ms.mutex.Unlock()
  ms.mutex.Lock()
  index, ok := ms.URLToManagedStreamIndex[url]
  if !ok {
		// 不会向 IDToManagedStreamIndex 中添加 unmanaged stream 的条目
    logger.Infof("binding an unmanaged stream with url <%v> to id <%v>", url, id)
    return
  }
  _, ok = ms.IDToManagedStreamIndex[id]
  if ok {
    logger.Errorf("given id already exists, id = <%v>, url = <%v>", id, url)
    return
  }
	ms.IDToManagedStreamIndex[id] = index
	// 绑定 StreamID 和 URL 的关系
	ms.ManagedStreams[index].StreamID = id
  logger.Infof("binding stream id <%v> to url <%v>", id, url)
}

gha_language: HTML


text:
@article{Irvine-2019-Seasonal,
    title = "Seasonal nutrient export dynamics in a mixed land use subwatershed of the Grand River, Ontario, Canada",
    author = "Irvine, Cameron  and
      Macrae, Merrin  and
      Morison, Matthew  and
      Petrone, Richard",
    journal = "Journal of Great Lakes Research, Volume 45, Issue 6",
    volume = "45",
    number = "6",
    year = "2019",
    publisher = "Elsevier BV",
    url = "https://aclanthology.org/G19-76001",
    doi = "10.1016/j.jglr.2019.10.005",
    pages = "1171--1181",
    abstract = "Abstract Algal blooms in the Great Lakes are a concern due to excess nutrient loading from non-point sources; however, there is uncertainty over the relative contributions of various non-point sources under different types of land use in rural watersheds, particularly over annual time scales. Four nested subwatersheds in Southern Ontario, Canada (one natural woodlot, two agricultural and one mixed agricultural and urban) were monitored over one year to identify peak periods ({`}hot moments{'}) and areas ({`}hot spots{'}) of nutrient (dissolved reactive phosphorus, DRP; total phosphorus, TP; and nitrate, NO3−) export and discharge. Annual nutrient export was small at the natural site (0.001 kg DRP ha−1; 0.004 kg TP ha−1; 0.04 kg NO3{---}N ha−1) compared to the agricultural and mixed-use sites (0.10{--}0.15 kg DRP ha−1; 0.70{--}0.94 kg TP ha−1; 9.15{--}11.55 kg NO3{---}N ha−1). Temporal patterns in P concentrations were similar throughout the sites, where spring was the dominant season for P export, irrespective of land use. Within the Hopewell Creek watershed, P and N hot spots existed that were consistently hot spots across all events with the location of these hot spots driven by local land use patterns, where there was elevated P export from a dairy-dominated sub-watershed and elevated N export from both of the two agricultural sub-watersheds. These estimates of seasonal- and event-based nutrient loads and discharge across nested sub-watersheds contribute to the growing body of evidence demonstrating the importance of identifying critical areas and periods in which to emphasize management efforts.",
}

repository: gwf-uwaterloo/gwf-publications

repo_name: gwf-uwaterloo/gwf-publications

branch_name: refs/heads/main

gha_language: Python


text:
DESCRIPTION = "This module provides some drop-in replacements for the string comparison \
functions of Test::More, but which are more suitable when you test against \
long strings. If you've ever had to search for text in a multi-line string \
like an HTML document, or find specific items in binary data, this is the \
module for you."

SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
PR = "r0"

MAINTAINER=	"Poky <poky@yoctoproject.org>"
HOMEPAGE=	"https://metacpan.org/release/Test-LongString"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61"

SRC_URI = "https://cpan.metacpan.org/authors/id/R/RG/RGARCIA/Test-LongString-0.17.tar.gz"

SRC_URI[md5sum] = "8baab770f61ebd5647a9dd3679f42fbd"
SRC_URI[sha256sum] = "abc4349eaf04d1bec1e464166a3018591ea846d8f3c5c9c8af4ac4905d3e974f"

S = "${WORKDIR}/Test-LongString-${PV}"

inherit cpan allarch

BBCLASSEXTEND = "native"

repository: rehsack/meta-cpan

repo_name: rehsack/meta-cpan

gha_language: BitBake


text:
/*
Copyright 2021 The Ceph-COSI 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 cosi

import (
	"context"

	"github.com/noobaa/noobaa-operator/v5/pkg/util"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"

	cosi "sigs.k8s.io/container-object-storage-interface-spec"
)

// IdentityServer holds the name of NooBaa's COSI driver
type IdentityServer struct {
	driver string
}

// DriverGetInfo returns the info of the Noobaa's COSI driver
func (id *IdentityServer) DriverGetInfo(ctx context.Context,
	req *cosi.DriverGetInfoRequest) (*cosi.DriverGetInfoResponse, error) {
	log := util.Logger()
	if id.driver == "" {
		log.Errorf("Driver name cannot be empty")
		return nil, status.Error(codes.InvalidArgument, "Driver name is empty")
	}

	return &cosi.DriverGetInfoResponse{
		Name: id.driver,
	}, nil
}

repository: noobaa/noobaa-operator

repo_name: noobaa/noobaa-operator


text:
@misc{richard2018rl,
    title={1. Introduction},
    url={http://incompleteideas.net/book/first/ebook/node6.html},
    journal={Reinforcement Learning: An Introduction},
    author={Richard S. and Andrew G.},
    year={2018}
}

@misc{richard2018sarsa,
    title={6.4 Sarsa: On-Policy TD Control},
    url={http://incompleteideas.net/book/ebook/node64.html},
    journal={Reinforcement Learning: An Introduction},
    author={Richard S. and Andrew G.},
    year={2018}
}

@misc{richard2018sarsalambda,
    title={7.5 Sarsa(\({\lambda}\))},
    url={http://incompleteideas.net/book/first/ebook/node77.html},
    journal={Reinforcement Learning: An Introduction},
    author={Richard S. and Andrew G.},
    year={2018}
}


text:
# Generated by superflore -- DO NOT EDIT
#
# Copyright Open Source Robotics Foundation

inherit ros_distro_noetic
inherit ros_superflore_generated

DESCRIPTION = "Display satellite map tiles in RViz"
AUTHOR = "Tim Clephas <tim.clephas@nobleo.nl>"
ROS_AUTHOR = "Gareth Cross <gcross.code@icloud.com>"
HOMEPAGE = "https://github.com/nobleo/rviz_satellite"
SECTION = "devel"
# Original license in package.xml, joined with "&" when multiple license tags were used:
#         "Apache 2"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://package.xml;beginline=13;endline=13;md5=fc216ef9336537897fbeafa564601763"

ROS_CN = "rviz_satellite"
ROS_BPN = "rviz_satellite"

ROS_BUILD_DEPENDS = " \
    qtbase \
    roscpp \
    rviz \
    sensor-msgs \
"

ROS_BUILDTOOL_DEPENDS = " \
    catkin-native \
"

ROS_EXPORT_DEPENDS = " \
    roscpp \
    rviz \
    sensor-msgs \
    tf2-ros \
"

ROS_BUILDTOOL_EXPORT_DEPENDS = ""

ROS_EXEC_DEPENDS = " \
    roscpp \
    rviz \
    sensor-msgs \
    tf2-ros \
"

# Currently informational only -- see http://www.ros.org/reps/rep-0149.html#dependency-tags.
ROS_TEST_DEPENDS = ""

DEPENDS = "${ROS_BUILD_DEPENDS} ${ROS_BUILDTOOL_DEPENDS}"
# Bitbake doesn't support the "export" concept, so build them as if we needed them to build this package (even though we actually
# don't) so that they're guaranteed to have been staged should this package appear in another's DEPENDS.
DEPENDS += "${ROS_EXPORT_DEPENDS} ${ROS_BUILDTOOL_EXPORT_DEPENDS}"

RDEPENDS:${PN} += "${ROS_EXEC_DEPENDS}"

# matches with: https://github.com/nobleo/rviz_satellite-release/archive/release/noetic/rviz_satellite/3.0.3-1.tar.gz
ROS_BRANCH ?= "branch=release/noetic/rviz_satellite"
SRC_URI = "git://github.com/nobleo/rviz_satellite-release;${ROS_BRANCH};protocol=https"
SRCREV = "3e5ae92c60daef5fccb3bd068229243b3d84b504"
S = "${WORKDIR}/git"

ROS_BUILD_TYPE = "catkin"

inherit ros_${ROS_BUILD_TYPE}

repository: DasRoteSkelett/meta-ros

repo_name: DasRoteSkelett/meta-ros


text:
package models

import (
	"github.com/astaxie/beego/orm"
	"time"
)

// 用户表
type User struct {
	Id              int64
	Account         string    `orm:"size(64)"`
	Password        string    `orm:"size(64)"`
	Name            string    `orm:"size(64)"`
	CredentialsSalt string    `orm:"size(64)"`
	Email           string    `orm:"size(64)"`
	CreateTime      time.Time `orm:"auto_now_add;type(datetime)"`
	UpdateTime      time.Time `orm:"null"`
	Peers           *Peers    `orm:"rel(one)"`
}

// 集群表
type Peers struct {
	Id            int64
	ServerName    string    `orm:"size(255)"`
	GroupName     string    `orm:"size(255)"`
	ServerAddress string    `orm:"size(255)"`
	ShowAddress   string    `orm:"null;size(255)"`
	CreateTime    time.Time `orm:"auto_now_add;type(datetime)"`
}

func init() {
	orm.RegisterModel(new(User), new(Peers))
}

repository: weichangdong/go-fastdfs-web-go

repo_name: weichangdong/go-fastdfs-web-go


text:
require xorg-driver-input.inc
DESCRIPTION = "Mouse Support in X11"
PE = "1"
PR = "${INC_PR}.0"

SRC_URI[archive.md5sum] = "d8bcd9fb1b4efb02acd251495f9a30c1"
SRC_URI[archive.sha256sum] = "7d4c2ecbe8f9327f7c8093c05401ab68b22f3343bcf04e4838cc40c21b7f8e0a"

repository: trini/openembedded

repo_name: trini/openembedded


text:
include(CMakeForceCompiler)
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Darwin)

# The libgit2 CMakeFile.txt needs this to be set:
SET(CMAKE_SIZEOF_VOID_P 8)

# which compilers to use for C and C++
cmake_force_c_compiler(/usr/local/osx-ndk-x86/bin/x86_64-apple-darwin15-clang Clang)
cmake_force_cxx_compiler(/usr/local/osx-ndk-x86/bin/x86_64-apple-darwin15-clang++ Clang)
SET(CMAKE_AR /usr/local/osx-ndk-x86/bin/x86_64-apple-darwin15-ar CACHE FILEPATH "Archiver")
SET(PKG_CONFIG_EXECUTABLE /usr/local/osx-ndk-x86/bin/x86_64h-apple-darwin15-pkg-config)

SET(CMAKE_OSX_SYSROOT /usr/local/osx-ndk-x86/SDK/MacOSX10.11.sdk)

# here is the target environment located
#SET(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT} ${CMAKE_OSX_SYSROOT}/usr/bin)
SET(CMAKE_FIND_ROOT_PATH /usr/local/osx-ndk-x86/macports/pkgs/opt/local ${CMAKE_OSX_SYSROOT} ${CMAKE_OSX_SYSROOT}/usr/bin )

# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

extension: cmake


text:
require ${PN}.inc

PR = "r0"

SRC_URI = "http://sources.openembedded.org/opie-1.2.5-split_inputmethods_multikey.tar.bz2;name=split_inputmethods_multikey \
           http://sources.openembedded.org/opie-1.2.5-split_share.tar.bz2;name=split_share \
           file://fix-rpath.patch"
SRC_URI[split_inputmethods_multikey.md5sum] = "fe9401e13070fb458701cc416ccbab0b"
SRC_URI[split_inputmethods_multikey.sha256sum] = "a26bbc5db64dc6c904324a7b3ddbe4e3ba303eb648dcb19760b2ef214e2f7ebf"
SRC_URI[split_share.md5sum] = "a715ae54405cae2b17c35d166f161aa8"
SRC_URI[split_share.sha256sum] = "0b71c8726b41f8c4dfd3a31fbb23f9c533c16d7d9c1f3002ab0d2daea274da7a"

#           file://friendly-button-names.patch"


text:
package ec2

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/ec2"
	"github.com/quintilesims/layer0/common/aws/provider"
	"github.com/zpatrick/go-bytesize"
)

type Provider interface {
	CreateSecurityGroup(name, desc, vpcId string) (*string, error)
	AuthorizeSecurityGroupIngress(input []*SecurityGroupIngress) error
	RevokeSecurityGroupIngress(input []*SecurityGroupIngress) error
	RevokeSecurityGroupIngressHelper(groupID string, permission IpPermission) error
	AuthorizeSecurityGroupIngressFromGroup(groupId, sourceGroupId string) error
	DescribeSecurityGroup(name string) (*SecurityGroup, error)
	DescribeSubnet(subnetId string) (*Subnet, error)
	DeleteSecurityGroup(*SecurityGroup) error
	DescribeInstance(instanceId string) (*Instance, error)
	DescribeVPC(vpcID string) (*VPC, error)
	DescribeVPCByName(vpcName string) (*VPC, error)
	DescribeVPCSubnets(vpcId string) ([]*Subnet, error)
	DescribeVPCGateways(vpcId string) ([]*InternetGateway, error)
	DescribeVPCRoutes(vpcId string) ([]*RouteTable, error)
}

type EC2 struct {
	credProvider provider.CredProvider
	region       string
	Connect      func() (EC2Internal, error)
}

type EC2Internal interface {
	CreateSecurityGroup(*ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)
	AuthorizeSecurityGroupIngress(*ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
	RevokeSecurityGroupIngress(*ec2.RevokeSecurityGroupIngressInput) (*ec2.RevokeSecurityGroupIngressOutput, error)
	DescribeSecurityGroups(*ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error)
	DescribeSubnets(input *ec2.DescribeSubnetsInput) (*ec2.DescribeSubnetsOutput, error)
	DeleteSecurityGroup(*ec2.DeleteSecurityGroupInput) (*ec2.DeleteSecurityGroupOutput, error)
	DescribeInstances(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)
	DescribeVpcs(input *ec2.DescribeVpcsInput) (*ec2.DescribeVpcsOutput, error)
	DescribeInternetGateways(input *ec2.DescribeInternetGatewaysInput) (*ec2.DescribeInternetGatewaysOutput, error)
	DescribeRouteTables(input *ec2.DescribeRouteTablesInput) (*ec2.DescribeRouteTablesOutput, error)
}

// https://aws.amazon.com/ec2/instance-types/
var InstanceSizes = map[string]bytesize.Bytesize{
	"t2.nano":     0.5 * bytesize.GiB,
	"t2.micro":    1 * bytesize.GiB,
	"t2.small":    2 * bytesize.GiB,
	"t2.medium":   4 * bytesize.GiB,
	"t2.large":    8 * bytesize.GiB,
	"m4.large":    8 * bytesize.GiB,
	"m4.xlarge":   16 * bytesize.GiB,
	"m4.2xlarge":  32 * bytesize.GiB,
	"m4.4xlarge":  64 * bytesize.GiB,
	"m4.10xlarge": 160 * bytesize.GiB,
	"m3.medium":   3.75 * bytesize.GiB,
	"m3.large":    7.5 * bytesize.GiB,
	"m3.xlarge":   15 * bytesize.GiB,
	"m3.2xlarge":  30 * bytesize.GiB,
	"c4.large":    3.75 * bytesize.GiB,
	"c4.xlarge":   7.5 * bytesize.GiB,
	"c4.2xlarge":  15 * bytesize.GiB,
	"c4.4xlarge":  30 * bytesize.GiB,
	"c4.8xlarge":  60 * bytesize.GiB,
	"c3.large":    3.75 * bytesize.GiB,
	"c3.xlarge":   7.5 * bytesize.GiB,
	"c3.2xlarge":  15 * bytesize.GiB,
	"c3.4xlarge":  30 * bytesize.GiB,
	"c3.8xlarge":  60 * bytesize.GiB,
	"g2.2xlarge":  15 * bytesize.GiB,
	"g2.8xlarge":  60 * bytesize.GiB,
	"x1.32xlarge": 1952 * bytesize.GiB,
	"r3.large":    15.25 * bytesize.GiB,
	"r3.xlarge":   30.5 * bytesize.GiB,
	"r3.2xlarge":  61 * bytesize.GiB,
	"r3.4xlarge":  122 * bytesize.GiB,
	"r3.8xlarge":  244 * bytesize.GiB,
	"i3.large":    15.25 * bytesize.GiB,
	"i3.xlarge":   30.5 * bytesize.GiB,
	"i3.2xlarge":  61 * bytesize.GiB,
	"i3.4xlarge":  122 * bytesize.GiB,
	"i3.8xlarge":  244 * bytesize.GiB,
	"d2.xlarge":   30.5 * bytesize.GiB,
	"d2.2xlarge":  61 * bytesize.GiB,
	"d2.4xlarge":  122 * bytesize.GiB,
	"d2.8xlarge":  244 * bytesize.GiB,
}

type SecurityGroup struct {
	*ec2.SecurityGroup
}

func NewSecurityGroup(id string) *SecurityGroup {
	return &SecurityGroup{
		&ec2.SecurityGroup{
			GroupId: aws.String(id),
		},
	}
}

type SecurityGroupIngress struct {
	*ec2.AuthorizeSecurityGroupIngressInput
	*ec2.RevokeSecurityGroupIngressInput
}

func NewSecurityGroupIngress(groupID, cidrIP, protocol string, fromPort, toPort int) *SecurityGroupIngress {
	return &SecurityGroupIngress{
		AuthorizeSecurityGroupIngressInput: &ec2.AuthorizeSecurityGroupIngressInput{
			GroupId:    aws.String(groupID),
			CidrIp:     aws.String(cidrIP),
			FromPort:   aws.Int64(int64(fromPort)),
			ToPort:     aws.Int64(int64(toPort)),
			IpProtocol: aws.String(protocol),
		},
		RevokeSecurityGroupIngressInput: &ec2.RevokeSecurityGroupIngressInput{
			GroupId:    aws.String(groupID),
			CidrIp:     aws.String(cidrIP),
			FromPort:   aws.Int64(int64(fromPort)),
			ToPort:     aws.Int64(int64(toPort)),
			IpProtocol: aws.String(protocol),
		},
	}
}

type IpPermission struct {
	*ec2.IpPermission
}

type UserIdGroupPair struct {
	*ec2.UserIdGroupPair
}

type Subnet struct {
	*ec2.Subnet
}

func NewSubnet() *Subnet {
	return &Subnet{&ec2.Subnet{}}
}

type Instance struct {
	*ec2.Instance
}

func NewInstance() *Instance {
	return &Instance{&ec2.Instance{}}
}

type VPC struct {
	*ec2.Vpc
}

func NewVpc() *VPC {
	return &VPC{&ec2.Vpc{}}
}

type InternetGateway struct {
	*ec2.InternetGateway
}

func NewInternetGateway() *InternetGateway {
	return &InternetGateway{&ec2.InternetGateway{}}
}

type RouteTable struct {
	*ec2.RouteTable
}

func NewRouteTable() *RouteTable {
	return &RouteTable{&ec2.RouteTable{}}
}

func NewEC2(credProvider provider.CredProvider, region string) (Provider, error) {
	ec2 := EC2{
		credProvider,
		region,
		func() (EC2Internal, error) {
			return Connect(credProvider, region)
		},
	}
	_, err := ec2.Connect()
	if err != nil {
		return nil, err
	}
	return &ec2, nil
}

func Connect(credProvider provider.CredProvider, region string) (EC2Internal, error) {
	connection, err := provider.GetEC2Connection(credProvider, region)
	if err != nil {
		return nil, err
	}
	return connection, nil
}

func (this *EC2) CreateSecurityGroup(name, desc, vpcId string) (*string, error) {
	input := &ec2.CreateSecurityGroupInput{
		Description: aws.String(desc),
		GroupName:   aws.String(name),
		VpcId:       aws.String(vpcId),
	}
	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}
	output, err := connection.CreateSecurityGroup(input)
	return output.GroupId, err
}

func (this *EC2) AuthorizeSecurityGroupIngress(ingresses []*SecurityGroupIngress) error {
	connection, err := this.Connect()
	if err != nil {
		return err
	}

	for _, ingress := range ingresses {
		input := ingress.AuthorizeSecurityGroupIngressInput
		if _, err := connection.AuthorizeSecurityGroupIngress(input); err != nil {
			return err
		}
	}

	return nil
}

func (this *EC2) RevokeSecurityGroupIngress(ingresses []*SecurityGroupIngress) error {
	connection, err := this.Connect()
	if err != nil {
		return err
	}

	for _, ingress := range ingresses {
		input := ingress.RevokeSecurityGroupIngressInput

		if _, err := connection.RevokeSecurityGroupIngress(input); err != nil {
			return err
		}
	}

	return nil
}

func (this *EC2) RevokeSecurityGroupIngressHelper(groupID string, permission IpPermission) error {
	connection, err := this.Connect()
	if err != nil {
		return err
	}

	input := &ec2.RevokeSecurityGroupIngressInput{
		GroupId:       aws.String(groupID),
		IpPermissions: []*ec2.IpPermission{permission.IpPermission},
	}

	if _, err := connection.RevokeSecurityGroupIngress(input); err != nil {
		return err
	}

	return nil
}

func (this *EC2) AuthorizeSecurityGroupIngressFromGroup(groupId, sourceGroupId string) error {
	input := &ec2.AuthorizeSecurityGroupIngressInput{
		GroupId: aws.String(groupId),
		IpPermissions: []*ec2.IpPermission{
			{
				UserIdGroupPairs: []*ec2.UserIdGroupPair{
					{GroupId: aws.String(sourceGroupId)},
				},
				IpProtocol: aws.String("-1"),
			},
		},
	}
	connection, err := this.Connect()
	if err != nil {
		return err
	}
	_, err = connection.AuthorizeSecurityGroupIngress(input)
	return err
}

func (this *EC2) DescribeSecurityGroup(name string) (*SecurityGroup, error) {
	input := &ec2.DescribeSecurityGroupsInput{
		Filters: []*ec2.Filter{
			{
				Name:   aws.String("group-name"),
				Values: []*string{aws.String(name)},
			},
		},
	}

	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}

	groups, err := connection.DescribeSecurityGroups(input)
	if err != nil {
		return nil, err
	}

	if len(groups.SecurityGroups) == 0 {
		return nil, nil
	}

	return &SecurityGroup{groups.SecurityGroups[0]}, nil
}

func (this *EC2) DescribeSubnet(subnetId string) (*Subnet, error) {
	input := &ec2.DescribeSubnetsInput{
		Filters: []*ec2.Filter{
			{
				Name:   aws.String("subnet-id"),
				Values: []*string{aws.String(subnetId)},
			},
		},
	}
	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}

	subnets, err := connection.DescribeSubnets(input)
	var subnet *Subnet
	if err == nil {
		if len(subnets.Subnets) > 0 {
			subnet = &Subnet{subnets.Subnets[0]}
		}
	}
	return subnet, err
}

func (this *EC2) DeleteSecurityGroup(group *SecurityGroup) error {
	input := &ec2.DeleteSecurityGroupInput{
		GroupId: group.GroupId,
	}

	connection, err := this.Connect()
	if err != nil {
		return err
	}

	_, err = connection.DeleteSecurityGroup(input)
	return err
}

func (this *EC2) DescribeInstance(instanceId string) (*Instance, error) {
	input := &ec2.DescribeInstancesInput{
		InstanceIds: []*string{&instanceId},
	}
	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}

	resp, err := connection.DescribeInstances(input)
	var instance *Instance
	if err == nil {
		if len(resp.Reservations) > 0 && len(resp.Reservations[0].Instances) > 0 {
			instance = &Instance{resp.Reservations[0].Instances[0]}
		}
	}
	return instance, err
}

func (this *EC2) DescribeVPC(vpcId string) (*VPC, error) {
	input := &ec2.DescribeVpcsInput{
		VpcIds: []*string{&vpcId},
	}
	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}

	resp, err := connection.DescribeVpcs(input)
	var vpc *VPC
	if err == nil {
		if len(resp.Vpcs) > 0 {
			vpc = &VPC{resp.Vpcs[0]}
		}
	}
	return vpc, err
}

func (this *EC2) DescribeVPCByName(vpcName string) (*VPC, error) {
	input := &ec2.DescribeVpcsInput{
		Filters: []*ec2.Filter{
			{
				Name:   aws.String("tag:Name"),
				Values: []*string{&vpcName},
			},
		},
	}
	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}

	var vpc *VPC
	resp, err := connection.DescribeVpcs(input)
	if err == nil {
		if len(resp.Vpcs) > 0 {
			vpc = &VPC{resp.Vpcs[0]}
		}
	}
	return vpc, err
}

func (this *EC2) DescribeVPCSubnets(vpcId string) ([]*Subnet, error) {
	input := &ec2.DescribeSubnetsInput{
		Filters: []*ec2.Filter{
			{
				Name:   aws.String("vpc-id"),
				Values: []*string{aws.String(vpcId)},
			},
		},
	}
	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}

	subnets, err := connection.DescribeSubnets(input)
	var subnetList []*Subnet
	if err == nil {
		fmt.Printf("Found %d subnets\n", len(subnets.Subnets))

		length := len(subnets.Subnets)
		subnetList = make([]*Subnet, length, length)
		for i, net := range subnets.Subnets {
			subnetList[i] = &Subnet{net}
		}
	}
	return subnetList, err
}

func (this *EC2) DescribeVPCGateways(vpcId string) ([]*InternetGateway, error) {
	input := &ec2.DescribeInternetGatewaysInput{
		Filters: []*ec2.Filter{
			{
				Name:   aws.String("attachment.vpc-id"),
				Values: []*string{aws.String(vpcId)},
			},
		},
	}
	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}

	gateways, err := connection.DescribeInternetGateways(input)
	var result []*InternetGateway
	if err == nil {
		fmt.Printf("Found %d gateways\n", len(gateways.InternetGateways))

		length := len(gateways.InternetGateways)
		result = make([]*InternetGateway, length, length)
		for i, net := range gateways.InternetGateways {
			result[i] = &InternetGateway{net}
		}
	}
	return result, err
}

func (this *EC2) DescribeVPCRoutes(vpcId string) ([]*RouteTable, error) {
	input := &ec2.DescribeRouteTablesInput{
		Filters: []*ec2.Filter{
			{
				Name:   aws.String("vpc-id"),
				Values: []*string{aws.String(vpcId)},
			},
		},
	}
	connection, err := this.Connect()
	if err != nil {
		return nil, err
	}

	output, err := connection.DescribeRouteTables(input)
	var result []*RouteTable
	if err == nil {
		list := output.RouteTables
		fmt.Printf("Found %d routes\n", len(list))

		length := len(list)
		result = make([]*RouteTable, length, length)
		for i, o := range list {
			result[i] = &RouteTable{o}
		}
	}
	return result, err
}


text:
@Article{chairs,
  title={Learning to Generate Chairs, Tables and Cars with Convolutional Networks},
  author={Learning to Generate Chairs, Tables and Cars with Convolutional Networks},
  journal      = "IEEE Transactions on Pattern Analysis and Machine Intelligence",
  number       = "4",
  volume       = "39",
  pages        = "692-705",
  month        = "Apr",
  year         = "2017"
}

repository: tatarchm/academic

repo_name: tatarchm/academic

gha_language: Shell


text:
DESCRIPTION = "fantasy turn-based strategy game"
PV = "0.01+svnr${SRCPV}"
PR = "r1"
SECTION = "games"
LICENSE = "GPL"
DEPENDS += "libsdl-image libsdl-mixer libsdl-net"
SRC_URI = "svn://svn.gna.org/svn/wesnoth;module=trunk;proto=http"

EXTRA_OECONF += " --enable-tinygui --disable-python --enable-lite --enable-lowmem"

S = "${WORKDIR}/trunk"

inherit autotools

addtask autogen after do_patch before do_configure

do_autogen() {
        cd ${WORKDIR}/trunk/ && ./autogen.sh --host=armv4t-angstrom-linux-gnueabi
}


text:
var searchData=
[
  ['laguerre_1883',['laguerre',['../namespacenc_1_1polynomial.html#aa2c08952d8dfd2cccfbcd6da40b49f4f',1,'nc::polynomial::laguerre(uint32 n, dtype x)'],['../namespacenc_1_1polynomial.html#ad7fef1e52b0054b5894995ee1ed94340',1,'nc::polynomial::laguerre(uint32 n, uint32 m, dtype x)'],['../namespacenc_1_1polynomial.html#a55e940d8393b196ebce707ac8b0df5b9',1,'nc::polynomial::laguerre(uint32 n, const NdArray< dtype > &inArrayX)'],['../namespacenc_1_1polynomial.html#a9a3c9fb31c548094a1ce7ec927f28bee',1,'nc::polynomial::laguerre(uint32 n, uint32 m, const NdArray< dtype > &inArrayX)']]],
  ['laplace_1884',['laplace',['../namespacenc_1_1filter.html#aae2d06efe29180faf7363b9322588f46',1,'nc::filter::laplace()'],['../namespacenc_1_1random.html#a76e5b2a6feb9bf6a05c5dd9402f9c62f',1,'nc::random::laplace(dtype inLoc=0, dtype inScale=1)'],['../namespacenc_1_1random.html#ab2ecb1401cb11a3c816073fcbc7b05b5',1,'nc::random::laplace(const Shape &inShape, dtype inLoc=0, dtype inScale=1)']]],
  ['lcm_1885',['lcm',['../namespacenc.html#a7ffd0c15b8419a5d84458d4009b38b88',1,'nc::lcm(dtype inValue1, dtype inValue2) noexcept'],['../namespacenc.html#aa69cf791720987deb546d71057a668a1',1,'nc::lcm(const NdArray< dtype > &inArray)']]],
  ['ldexp_1886',['ldexp',['../namespacenc.html#aca805ef0273314ddc6c70b2c913bf485',1,'nc::ldexp(dtype inValue1, uint8 inValue2) noexcept'],['../namespacenc.html#a52060ff2d69ed791b3f19c1d78cf8551',1,'nc::ldexp(const NdArray< dtype > &inArray1, const NdArray< uint8 > &inArray2)']]],
  ['left_1887',['left',['../classnc_1_1_vec2.html#ade3f4342726264a1493f91ae80ab24ca',1,'nc::Vec2::left()'],['../classnc_1_1_vec3.html#a7e6730d945972ecda1815c1d41f5074c',1,'nc::Vec3::left()']]],
  ['left_5fshift_1888',['left_shift',['../namespacenc.html#a6f10270824079210d4264d50f5a64f4d',1,'nc']]],
  ['legendre_5fp_1889',['legendre_p',['../namespacenc_1_1polynomial.html#a0f49fd4ed2ad26ed5176ca69ee62013f',1,'nc::polynomial::legendre_p(int32 n, dtype x)'],['../namespacenc_1_1polynomial.html#a7c8f219798eea097e85877892323ca8a',1,'nc::polynomial::legendre_p(int32 n, int32 m, dtype x)'],['../namespacenc_1_1polynomial.html#a4e15f397e7c9dc338e990eaf2c2f55f0',1,'nc::polynomial::legendre_p(int32 n, const NdArray< dtype > &inArrayX)'],['../namespacenc_1_1polynomial.html#aa17c1920f8efa35e91af667b2eaf32cf',1,'nc::polynomial::legendre_p(int32 n, int32 m, const NdArray< dtype > &inArrayX)']]],
  ['legendre_5fq_1890',['legendre_q',['../namespacenc_1_1polynomial.html#a78897e159974d6732b77759be2f2da13',1,'nc::polynomial::legendre_q(int32 n, dtype x)'],['../namespacenc_1_1polynomial.html#aed5c95f5a321ec71c1a34a42414bec52',1,'nc::polynomial::legendre_q(int32 n, const NdArray< dtype > &inArrayX)']]],
  ['legendrepolynomial_1891',['LegendrePolynomial',['../classnc_1_1integrate_1_1_legendre_polynomial.html#a2e1fefae138e66215cd7586a85fc3642',1,'nc::integrate::LegendrePolynomial']]],
  ['lerp_1892',['lerp',['../classnc_1_1_vec2.html#a91e6417e5b9903ed6bee3ad90c0c38f4',1,'nc::Vec2::lerp()'],['../classnc_1_1_vec3.html#ab4878c8a4ebcd94fd0baf93059b50ac6',1,'nc::Vec3::lerp()']]],
  ['less_1893',['less',['../namespacenc.html#a114baa0d21d439b7971dedd4b4042db8',1,'nc']]],
  ['less_5fequal_1894',['less_equal',['../namespacenc.html#ac51b96f0ac720a028ebd856abf1b5785',1,'nc']]],
  ['linspace_1895',['linspace',['../namespacenc.html#a672fbcbd2271d5fc58bd1b94750bbdcc',1,'nc']]],
  ['list2vector_1896',['list2vector',['../namespacenc_1_1boost_python_interface.html#aafe87a2533a53c470b051e7499131e47',1,'nc::boostPythonInterface']]],
  ['load_1897',['load',['../namespacenc.html#abec5f2e4d2a1598de762e32b839a3067',1,'nc']]],
  ['log_1898',['log',['../namespacenc.html#a3f08d373ae167ac90d3bb6b6c4da0fb9',1,'nc::log(dtype inValue) noexcept'],['../namespacenc.html#aba925957229bf54bfe854be197cd3d52',1,'nc::log(const NdArray< dtype > &inArray)']]],
  ['log10_1899',['log10',['../namespacenc.html#a0d8a5ffeaed868463a6e55645c625c8f',1,'nc::log10(dtype inValue) noexcept'],['../namespacenc.html#a3cd82f65b6ee069a7d6443646dfecf67',1,'nc::log10(const NdArray< dtype > &inArray)']]],
  ['log1p_1900',['log1p',['../namespacenc.html#a5abcc8523a49a47fd2224d5588f128b4',1,'nc::log1p(dtype inValue) noexcept'],['../namespacenc.html#a1ae30700a2db1cd8e44fa59b84c2b547',1,'nc::log1p(const NdArray< dtype > &inArray)']]],
  ['log2_1901',['log2',['../namespacenc.html#a48cbc16dc706678b6f85e655e935cd41',1,'nc::log2(dtype inValue) noexcept'],['../namespacenc.html#a536e5046481a32bd6955a222f323393a',1,'nc::log2(const NdArray< dtype > &inArray)']]],
  ['log_5fgamma_1902',['log_gamma',['../namespacenc_1_1special.html#a11ec3d4677a53eafd8b0144cd6e42ce3',1,'nc::special::log_gamma(dtype inValue)'],['../namespacenc_1_1special.html#addebe777849a11f027a793975a53b653',1,'nc::special::log_gamma(const NdArray< dtype > &inArray)']]],
  ['logical_5fand_1903',['logical_and',['../namespacenc.html#a951c3f9acd6147a8e2be1ab2cda4d51c',1,'nc']]],
  ['logical_5fnot_1904',['logical_not',['../namespacenc.html#ae90620999105f741609c7f279cac2907',1,'nc']]],
  ['logical_5for_1905',['logical_or',['../namespacenc.html#a0492e302b114ab15b996b1330604478b',1,'nc']]],
  ['logical_5fxor_1906',['logical_xor',['../namespacenc.html#a7b84e63b2d32e1b59bfef4690c918989',1,'nc']]],
  ['lognormal_1907',['lognormal',['../namespacenc_1_1random.html#a03d5528a3a97b3731210ba2cc5d1c75d',1,'nc::random::lognormal(dtype inMean=0, dtype inSigma=1)'],['../namespacenc_1_1random.html#a3adc9de1025d27ed485603980657225b',1,'nc::random::lognormal(const Shape &inShape, dtype inMean=0, dtype inSigma=1)']]],
  ['lstsq_1908',['lstsq',['../namespacenc_1_1linalg.html#a9c15421c77e6b4b12fca1515596d1414',1,'nc::linalg']]],
  ['lu_5fdecomposition_1909',['lu_decomposition',['../namespacenc_1_1linalg.html#a153a90dbcc2ca94c664c429868d15bc4',1,'nc::linalg']]]
];

repository: stjordanis/NumCpp

repo_name: stjordanis/NumCpp

extension: js


text:
SUMMARY = "A powerful BitTorrent client"
LICENSE = "GPL-2.0-only & GPL-2.0-or-later & GPL-3.0-only & LGPL-2.0-only"
LIC_FILES_CHKSUM = " \
    file://LICENSES/GPL-2.0-only.txt;md5=9e2385fe012386d34dcc5c9863070881 \
    file://LICENSES/GPL-2.0-or-later.txt;md5=9e2385fe012386d34dcc5c9863070881 \
    file://LICENSES/GPL-3.0-only.txt;md5=49fc03046e56a282c0c743b5d3a55b7c \
    file://LICENSES/LGPL-2.0-only.txt;md5=da48810c4ddf8e49efa031294a26b98c \
"

inherit kde-apps gtk-icon-cache mime-xdg

DEPENDS += " \
    kconfig-native \
    kcoreaddons-native \
    kauth-native \
    kdoctools-native \
    kcmutils-native \
    libktorrent \
    knotifyconfig \
    kcmutils \
    kparts \
"

PV = "${KDE_APP_VERSION}"
SRC_URI[sha256sum] = "5932300dd52c563ef2caa43e8269e1120529c952fcb038ee3ecb2b1736e9b5b5"

FILES:${PN} += " \
    ${datadir}/knotifications5 \
    ${datadir}/kxmlgui5 \
    ${OE_QMAKE_PATH_PLUGINS} \
"


text:
# Intel ixp4xx access library software.  Note that this has an Intel
# license which restricts its use.
MAINTAINER = "NSLU2 Linux <nslu2-linux@yahoogroups.com>"
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:
#
#	ixp400AccessLibrary-1_4.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", follow
# the "Archived" link and the v1.4 software then select the the "Intel
# Hardware Access Software" "1.4 download", this will take you to the
# license agreement which you must accept to use this package.
#
# Store the file with the name given below in your downloads directory
#
SRC_URI  = "http://www.intel.com/Please-Read-The-BB-File/ixp400AccessLibrary-1_4.zip"
SRC_URI += "http://www.wnk.at/ixp400_accesslib_kernel26/data/patch_accesslib_kernel26_20040811.diff;patch=1"
SRC_URI += "file://badpaths.patch;patch=1"
SRC_URI += "file://build-timing-annoyance.patch;patch=1"

S = "${WORKDIR}/ixp400_xscale_sw"
PR = "r6"

COMPATIBLE_HOST = "^armeb-linux.*"

inherit module

#LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
CFLAGS = "-fno-common -D__KERNEL__ -DMODULE -D__linux -DCPU=33 -DXSCALE=33 \
	  -D__LINUX_ARM_ARCH__=5 \
	  -I${S}/src/linux -I${S}/src/include \
	  ${BUILD_OPTIMIZATION} \
	  -I${STAGING_KERNEL_DIR}/include"

EXTRA_OEMAKE = "'CFLAGS=${CFLAGS}' \
		'CC=${KERNEL_CC}' \
		'LD=${KERNEL_LD}' \
		'IX_TARGET=linuxbe' \
		'LINUX_SRC=${STAGING_KERNEL_DIR}' \
		'ARCH=${ARCH}'"
#EXTRA_OEMAKE = "'LINUX_SRC=${STAGING_KERNEL_DIR}' 'IX_TARGET=${IX_TARGET}' \
#	        'ARCH=${TARGET_ARCH}' 'CROSS_COMPILE=${TARGET_PREFIX}'"

do_compile () {
	oe_runmake ixp400.ko
}

do_stage () {
	install -d ${STAGING_INCDIR}/linux/ixp4xx-csr
	install -m 0644 src/include/*.h ${STAGING_INCDIR}/linux/ixp4xx-csr/
	cp -rf --dereference src/linux/* ${STAGING_INCDIR}/linux/ixp4xx-csr/
}

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

repository: BackupTheBerlios/openslug-svn

repo_name: BackupTheBerlios/openslug-svn


text:
#include <tiramisu/tiramisu.h>
#include <tiramisu/block.h>

#include "configuration.h"

using namespace tiramisu;

int main(int argc, char **argv)
{
    // cache_shared

    tiramisu::init("matmul");

    int t_block = 16;  // Thread block
    int k_block = 4;  // K reduction split
    int r_block_i = 16; // Register blocks
    int r_block_j = 8;

    // -------------------------------------------------------
    // Layer I
    // -------------------------------------------------------

    // Declare loop iterators
    var i("i", 0, M), j("j", 0, N), k("k", 0, K);
    var i0("i0", 0, M / r_block_i), i1("i1", 0, r_block_i);
    var j0("j0", 0, N / r_block_j), j1("j1", 0, r_block_j);
    var i00("i00"), i01("i01");
    var j00("j00"), j01("j01");
    var k0("k0"), k1("k1");

    // Declare input wrappers
    input c_A({i, k}, DATA_PTYPE);
    input c_B({k, j}, DATA_PTYPE);
    c_A.get_buffer()->tag_gpu_global();
    c_B.get_buffer()->tag_gpu_global();
    input c_Consts({i}, DATA_PTYPE);
    constant c_alpha("alpha", c_Consts(0));
    constant c_beta("beta", c_Consts(1));

    // Declare computations
    // Accumulator
    computation c_acc_init({i, j}, (float) 0);
    c_acc_init.store_in({i % r_block_i, j % r_block_j}, {r_block_i, r_block_j});
    c_acc_init.get_buffer()->tag_gpu_local();
    computation c_acc({i, j, k}, DATA_PTYPE);
    c_acc.store_in(c_acc_init.get_buffer(), {i % r_block_i, j % r_block_j});
    c_acc.set_expression(c_acc(i, j, 0) + c_A(i, k) * c_B(k, j));
    // Output
    computation c_C({i, j}, DATA_PTYPE);
    c_C.get_buffer()->tag_gpu_global();
    c_C.set_expression(c_acc(i, j, 0) * c_alpha + c_C(i, j) * c_beta);
    computation c_acc_dec({i0, j0}, allocate(*c_acc_init.get_buffer()));

    // Declare cpu buffers.
    buffer b_A("b_A", {M, K}, DATA_PTYPE, a_input);
    buffer b_B("b_B", {K, N}, DATA_PTYPE, a_input);
    buffer b_C("b_C", {M, N}, DATA_PTYPE, a_output);

    // Declare host-gpu transfer computations.
    computation copy_A_to_device({}, memcpy(b_A, *c_A.get_buffer()));
    computation copy_B_to_device({}, memcpy(b_B, *c_B.get_buffer()));
    computation copy_C_to_device({}, memcpy(b_C, *c_C.get_buffer()));
    computation copy_C_to_host({}, memcpy(*c_C.get_buffer(), b_C));

    // External call to timer function to find GPU time
    computation time_start({var("dummy", 0, 1)}, expr(o_call, "get_time", {int32_t(0)}, p_float32));
    computation time_end({var("dummy", 0, 1)}, expr(o_call, "get_time", {int32_t(0)}, p_float32));
    // Synchronize before timing
    computation final_sync({var("dummy", 0, 1)}, cuda_stream_synchronize());

    // -------------------------------------------------------
    // Layer II
    // -------------------------------------------------------

    // Scheduling commands

    block({&c_acc_init, &c_acc, &c_C}).tile(i, j, r_block_i, r_block_j, i0, j0, i1, j1);
    c_acc.interchange(j1, k);
    c_acc.interchange(i1, k);
    c_acc.split(k, k_block, k0, k1);

    block kernel_block({&c_acc_dec, &c_acc_init, &c_acc, &c_C});
    kernel_block.gpu_tile(i0, j0, t_block, t_block, i00, j00, i01, j01);

    copy_A_to_device.then(copy_B_to_device)
                    .then(copy_C_to_device)
                    .then(time_start)
                    .then(c_acc_dec)
                    .then(c_acc_init, j01)
                    .then(c_acc, j01)
                    .then(c_C, j01)
                    .then(final_sync)
                    .then(time_end)
                    .then(copy_C_to_host);

    // -------------------------------------------------------
    // Layer III
    // -------------------------------------------------------

    // Use shared memory for global memory access
    c_acc.cache_shared(c_A, k0, {t_block * r_block_i, k_block}, {i00 * t_block * r_block_i, k0 * k_block}, true);
    c_acc.cache_shared(c_B, k0, {k_block, t_block * r_block_j}, {k0 * k_block, j00 * t_block * r_block_j});

    // -------------------------------------------------------
    // Code Generation
    // -------------------------------------------------------

    // Generate object files. Last argument triggers cuda compilation.
    tiramisu::codegen({c_Consts.get_buffer(), &b_A, &b_B, &b_C, time_start.get_buffer(), time_end.get_buffer()}, "fct.o", true);

    return 0;
}

repository: Tiramisu-Compiler/tiramisu

repo_name: Tiramisu-Compiler/tiramisu

extension: cpp


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

#include "aml-cpufreq.h"
#include "aml-fclk.h"
#include "hiu-registers.h"
#include <ddk/debug.h>
#include <unistd.h>

namespace thermal {

namespace {

#define SYS_CPU_WAIT_BUSY_RETRIES 5
#define SYS_CPU_WAIT_BUSY_TIMEOUT_US 10000

// CLK indexes.
constexpr uint32_t kSysPllDiv16 = 0;
constexpr uint32_t kSysCpuClkDiv16 = 1;

// MMIO indexes.
constexpr uint32_t kHiuMmio = 2;

// 1GHz Frequency.
constexpr uint32_t kFrequencyThreshold = 1000000000;

// 1.896GHz Frequency.
constexpr uint32_t kMaxCPUFrequency = 1896000000;

// Final Mux for selecting clock source.
constexpr uint32_t kFixedPll = 0;
constexpr uint32_t kSysPll = 1;

} // namespace

zx_status_t AmlCpuFrequency::InitPdev(zx_device_t* parent) {
    zx_status_t status = device_get_protocol(parent,
                                             ZX_PROTOCOL_PLATFORM_DEV,
                                             &pdev_);
    if (status != ZX_OK) {
        return status;
    }

    // Get the clock protocol
    status = device_get_protocol(parent, ZX_PROTOCOL_CLK, &clk_protocol_);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: failed to get clk protocol, status = %d", status);
        return status;
    }

    // Initialized the MMIOs
    mmio_buffer_t mmio;
    status = pdev_map_mmio_buffer2(&pdev_, kHiuMmio, ZX_CACHE_POLICY_UNCACHED_DEVICE,
                                   &mmio);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: could not map periph mmio: %d\n", status);
        return status;
    }
    hiu_mmio_ = ddk::MmioBuffer(mmio);

    // Get BTI handle.
    status = pdev_get_bti(&pdev_, 0, bti_.reset_and_get_address());
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: could not get BTI handle: %d\n", status);
        return status;
    }

    return ZX_OK;
}

zx_status_t AmlCpuFrequency::Init(zx_device_t* parent) {
    zx_status_t status = InitPdev(parent);
    if (status != ZX_OK) {
        return status;
    }

    // HIU Init.
    status = s905d2_hiu_init(&hiu_);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: hiu_init failed: %d\n", status);
        return status;
    }

    // Enable the following clocks so we can measure them
    // and calculate what the actual CPU freq is set to at
    // any given point.
    ddk::ClkProtocolProxy clk(&clk_protocol_);

    status = clk.Enable(kSysPllDiv16);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: failed to enable clock, status = %d\n", status);
        return status;
    }

    status = clk.Enable(kSysCpuClkDiv16);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: failed to enable clock, status = %d\n", status);
        return status;
    }

    // Set up CPU freq. frequency to 1GHz.
    // Once we switch to using the MPLL, we re-initialize the SYS PLL
    // to known values and then the thermal driver can take over the dynamic
    // switching.
    status = SetFrequency(kFrequencyThreshold);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: failed to set CPU freq, status = %d\n", status);
        return status;
    }

    // SYS PLL Init.
    status = s905d2_pll_init(&hiu_, &sys_pll_, SYS_PLL);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: s905d2_pll_init failed: %d\n", status);
        return status;
    }

    // Set the SYS PLL to some known rate, before enabling the PLL.
    status = s905d2_pll_set_rate(&sys_pll_, kMaxCPUFrequency);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: failed to set SYS_PLL rate, status = %d\n", status);
        return status;
    }

    // Enable SYS PLL.
    status = s905d2_pll_ena(&sys_pll_);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: s905d2_pll_ena failed: %d\n", status);
        return status;
    }

    return ZX_OK;
}

zx_status_t AmlCpuFrequency::WaitForBusy() {
    auto sys_cpu_ctrl0 = SysCpuClkControl0::Get().ReadFrom(&*hiu_mmio_);

    // Wait till we are not busy.
    for (uint32_t i = 0; i < SYS_CPU_WAIT_BUSY_RETRIES; i++) {
        sys_cpu_ctrl0 = SysCpuClkControl0::Get().ReadFrom(&*hiu_mmio_);
        if (sys_cpu_ctrl0.busy()) {
            // Wait a little bit before trying again.
            zx_nanosleep(zx_deadline_after(ZX_USEC(SYS_CPU_WAIT_BUSY_TIMEOUT_US)));
            continue;
        } else {
            return ZX_OK;
        }
    }
    return ZX_ERR_TIMED_OUT;
}

// NOTE: This block doesn't modify the MPLL, it just programs the muxes &
// dividers to get the new_rate in the sys_pll_div block. Refer fig. 6.6 Multi
// Phase PLLS for A53 in the datasheet.
zx_status_t AmlCpuFrequency::ConfigureFixedPLL(uint32_t new_rate) {
    const aml_fclk_rate_table_t* fclk_rate_table = s905d2_fclk_get_rate_table();
    size_t rate_count = s905d2_fclk_get_rate_table_count();
    size_t i;

    // Validate if the new_rate is available
    for (i = 0; i < rate_count; i++) {
        if (new_rate == fclk_rate_table[i].rate) {
            break;
        }
    }
    if (i == rate_count) {
        return ZX_ERR_NOT_SUPPORTED;
    }

    zx_status_t status = WaitForBusy();
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: failed to wait for busy, status = %d\n", status);
        return status;
    }

    // Now program the values into sys cpu clk control0
    auto sys_cpu_ctrl0 = SysCpuClkControl0::Get().ReadFrom(&*hiu_mmio_);

    if (sys_cpu_ctrl0.final_dyn_mux_sel()) {
        // Dynamic mux 1 is in use, we setup dynamic mux 0
        sys_cpu_ctrl0.set_final_dyn_mux_sel(0)
            .set_mux0_divn_tcnt(fclk_rate_table[i].mux_div)
            .set_postmux0(fclk_rate_table[i].postmux)
            .set_premux0(fclk_rate_table[i].premux);
    } else {
        // Dynamic mux 0 is in use, we setup dynamic mux 1
        sys_cpu_ctrl0.set_final_dyn_mux_sel(1)
            .set_mux1_divn_tcnt(fclk_rate_table[i].mux_div)
            .set_postmux1(fclk_rate_table[i].postmux)
            .set_premux1(fclk_rate_table[i].premux);
    }

    // Select the final mux.
    sys_cpu_ctrl0.set_final_mux_sel(kFixedPll).WriteTo(&*hiu_mmio_);

    current_rate_ = new_rate;
    return ZX_OK;
}

zx_status_t AmlCpuFrequency::ConfigureSysPLL(uint32_t new_rate) {
    // This API also validates if the new_rate is valid.
    // So no need to validate it here.
    zx_status_t status = s905d2_pll_set_rate(&sys_pll_, new_rate);
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: failed to set SYS_PLL rate, status = %d\n", status);
        return status;
    }

    // Now we need to change the final mux to select input as SYS_PLL.
    status = WaitForBusy();
    if (status != ZX_OK) {
        zxlogf(ERROR, "aml-cpufreq: failed to wait for busy, status = %d\n", status);
        return status;
    }

    // Select the final mux.
    auto sys_cpu_ctrl0 = SysCpuClkControl0::Get().ReadFrom(&*hiu_mmio_);
    sys_cpu_ctrl0.set_final_mux_sel(kSysPll).WriteTo(&*hiu_mmio_);

    current_rate_ = new_rate;
    return status;
}

zx_status_t AmlCpuFrequency::SetFrequency(uint32_t new_rate) {
    zx_status_t status;

    if (new_rate > kFrequencyThreshold && current_rate_ > kFrequencyThreshold) {
        // Switching between two frequencies both higher than 1GHz.
        // In this case, as per the datasheet it is recommended to change
        // to a frequency lower than 1GHz first and then switch to higher
        // frequency to avoid glitches.

        // Let's first switch to 1GHz
        status = SetFrequency(kFrequencyThreshold);
        if (status != ZX_OK) {
            zxlogf(ERROR, "aml-cpufreq: failed to set CPU freq to intermediate freq, status = %d\n",
                   status);
            return status;
        }

        // Now let's set SYS_PLL rate to new_rate.
        return ConfigureSysPLL(new_rate);

    } else if (new_rate > kFrequencyThreshold && current_rate_ <= kFrequencyThreshold) {
        // Switching from a frequency lower than 1GHz to one greater than 1GHz.
        // In this case we just need to set the SYS_PLL to required rate and
        // then set the final mux to 1 (to select SYS_PLL as the source.)

        // Now let's set SYS_PLL rate to new_rate.
        return ConfigureSysPLL(new_rate);

    } else {
        // Switching between two frequencies below 1GHz.
        // In this case we change the source and dividers accordingly
        // to get the required rate from MPLL and do not touch the
        // final mux.
        return ConfigureFixedPLL(new_rate);
    }
    return ZX_OK;
}

uint32_t AmlCpuFrequency::GetFrequency() {
    return current_rate_;
}

} // namespace thermal

repository: OpenTrustGroup/zircon

repo_name: OpenTrustGroup/zircon


text:
class TweetCounts {
    unordered_map<string, vector<int> > rec;
public:
    TweetCounts() {
        unordered_map<string, vector<int> >().swap(rec);
    }

    void recordTweet(string tweetName, int time) {
        rec[tweetName].push_back(time);
    }

    vector<int> getTweetCountsPerFrequency(string freq, string tweetName, int startTime, int endTime) {
        static unordered_map<string, int> trans = {
            {"minute", 60},
            {"hour", 3600},
            {"day", 86400}
        };
        int stp = trans[freq], tot = (endTime - startTime) / stp + 1;
        vector<int> ctr(tot, 0);
        for(int tim : rec[tweetName])
            if(tim >= startTime && tim <= endTime)
                ++ctr[(tim - startTime) / stp];
        return ctr;
    }
};

/**
 * Your TweetCounts object will be instantiated and called as such:
 * TweetCounts* obj = new TweetCounts();
 * obj->recordTweet(tweetName,time);
 * vector<int> param_2 = obj->getTweetCountsPerFrequency(freq,tweetName,startTime,endTime);
 */

repository: tangjz/acm-icpc

repo_name: tangjz/acm-icpc