text:
@inproceedings{tag,
  author = {},
  title = {},
  booktitle = {},
  year = {},
  month = {}
  }

  @book{latexcompanion,
   author = {Frank Mittelbach and Michel Goossens},
   title = {The {\LaTeX} Compation},
   publisher = {Addison-Wesley},
   year = {2004}
   }

@article{hawes2017strands,
  title={The STRANDS project: Long-term autonomy in everyday environments},
  author={Hawes, Nick and Burbridge, Christopher and Jovan, Ferdian and Kunze, Lars and Lacerda, Bruno and Mudrov{\'a}, Lenka and Young, Jay and Wyatt, Jeremy and Hebesberger, Denise and Kortner, Tobias and others},
  journal={IEEE Robotics \& Automation Magazine},
  volume={24},
  number={3},
  pages={146--156},
  year={2017},
  publisher={IEEE}
}

@inproceedings{deleforge2012cocktail,
  title={The cocktail party robot: Sound source separation and localisation with an active binaural head},
  author={Deleforge, Antoine and Horaud, Radu},
  booktitle={Proceedings of the seventh annual ACM/IEEE international conference on Human-Robot Interaction},
  pages={431--438},
  year={2012},
  organization={ACM}
}

Campaign to Stop Killer Robots

@article{smithers1997autonomy,
  title={Autonomy in robots and other agents},
  author={Smithers, Tim},
  journal={Brain and Cognition},
  volume={34},
  number={1},
  pages={88--106},
  year={1997},
  publisher={Elsevier}
}

@article{brooks1990elephants,
  title={Elephants don't play chess},
  author={Brooks, Rodney A},
  journal={Robotics and autonomous systems},
  volume={6},
  number={1-2},
  pages={3--15},
  year={1990},
  publisher={Elsevier}
}

@misc{pfeifer1996building,
  title={Building fungus eaters: Design principles of autonomous agents},
  author={Pfeifer, Rolf},
  year={1996},
  publisher={From Animals to Animats, Cambridge, MA: MIT Press}
}

@article{dautenhahn1997ants,
  title={Ants don’t have friends--thoughts on socially intelligent agents},
  author={Dautenhahn, Kerstin},
  journal={Socially intelligent agents},
  pages={22--27},
  year={1997}
}

@article{johnson1988mixing,
  title={Mixing humans and nonhumans together: The sociology of a door-closer},
  author={Johnson, Jim},
  journal={Social problems},
  volume={35},
  number={3},
  pages={298--310},
  year={1988},
  publisher={Oxford University Press Oxford, UK}
}

@article{kuipers2012existing,
  title={An existing, ecologically-successful genus of collectively intelligent artificial creatures},
  author={Kuipers, Benjamin},
  journal={arXiv preprint arXiv:1204.4116},
  year={2012}
}

@article{haraway1991cyborg,
  title={A cyborg manifesto},
  author={Haraway, Donna},
  journal={New York},
  pages={150},
  year={1991}
}

@article{steels1995robots,
  title={When are robots intelligent autonomous agents?},
  author={Steels, Luc},
  journal={Robotics and Autonomous systems},
  volume={15},
  number={1-2},
  pages={3--9},
  year={1995},
  publisher={Elsevier}
}

@inproceedings{breazeal1999build,
  title={How to build robots that make friends and influence people},
  author={Breazeal, Cynthia and Scassellati, Brian},
  booktitle={Intelligent Robots and Systems, 1999. IROS'99. Proceedings. 1999 IEEE/RSJ International Conference on},
  volume={2},
  pages={858--863},
  year={1999},
  organization={IEEE}
}

@article{coleman2001android,
  title={Android arete: Toward a virtue ethic for computational agents},
  author={Coleman, Kari Gwen},
  journal={Ethics and Information Technology},
  volume={3},
  number={4},
  pages={247--265},
  year={2001},
  publisher={Springer}
}

@book{bekey2005autonomous,
  title={Autonomous robots: from biological inspiration to implementation and control},
  author={Bekey, George A},
  year={2005},
  publisher={MIT press}
}

@techreport{nilsson1984shakey,
  title={Shakey the robot},
  author={Nilsson, Nils J},
  year={1984},
  institution={SRI INTERNATIONAL MENLO PARK CA}
}

@article{brooks1986robust,
  title={A robust layered control system for a mobile robot},
  author={Brooks, Rodney},
  journal={IEEE journal on robotics and automation},
  volume={2},
  number={1},
  pages={14--23},
  year={1986},
  publisher={IEEE}
}

@book{thrun2005probabilistic,
  title={Probabilistic robotics},
  author={Thrun, Sebastian and Burgard, Wolfram and Fox, Dieter},
  year={2005},
  publisher={MIT press}
}

@inproceedings{meeussen2011long,
  title={Long term autonomy in office environments},
  author={Meeussen, Wim and Marder-Eppstein, Eitan and Watts, Kevin and Gerkey, Brian P},
  booktitle={ALONE Workshop, In Proceedings of Robotics: Science and Systems (RSS’11), Los Angeles, USA},
  year={2011}
}

@inproceedings{meeussen2010autonomous,
  title={Autonomous door opening and plugging in with a personal robot},
  author={Meeussen, Wim and Wise, Melonee and Glaser, Stuart and Chitta, Sachin and McGann, Conor and Mihelich, Patrick and Marder-Eppstein, Eitan and Muja, Marius and Eruhimov, Victor and Foote, Tully and others},
  booktitle={Robotics and Automation (ICRA), 2010 IEEE International Conference on},
  pages={729--736},
  year={2010},
  organization={IEEE}
}

@article{silverman2003staying,
  title={Staying alive longer: Autonomous robot recharging put to the test},
  author={Silverman, M and Jung, Boyoon and Nies, Dan and Sukhatme, G},
  journal={Center for Robotics and Embedded Systems (CRES) Technical Report CRES},
  volume={3},
  pages={015},
  year={2003}
}

@article{mcfarland1997basic,
  title={Basic cycles, utility and opportunism in self-sufficient robots},
  author={McFarland, David and Spier, Emmet},
  journal={Robotics and Autonomous Systems},
  volume={20},
  number={2-4},
  pages={179--190},
  year={1997},
  publisher={Elsevier}
}

@article{korsah2013comprehensive,
  title={A comprehensive taxonomy for multi-robot task allocation},
  author={Korsah, G Ayorkor and Stentz, Anthony and Dias, M Bernardine},
  journal={The International Journal of Robotics Research},
  volume={32},
  number={12},
  pages={1495--1512},
  year={2013},
  publisher={SAGE Publications Sage UK: London, England}
}

@inproceedings{higuera2013fair,
  title={Fair subdivision of multi-robot tasks},
  author={Higuera, Juan Camilo Gamboa and Dudek, Gregory},
  booktitle={Robotics and Automation (ICRA), 2013 IEEE International Conference on},
  pages={3014--3019},
  year={2013},
  organization={IEEE}
}

@inproceedings{gerkey2003multi,
  title={Multi-robot task allocation: Analyzing the complexity and optimality of key architectures},
  author={Gerkey, Brian P and Mataric, Maja J},
  booktitle={Robotics and Automation, 2003. Proceedings. ICRA'03. IEEE International Conference on},
  volume={3},
  pages={3862--3868},
  year={2003},
  organization={IEEE}
}

@inproceedings{wawerla2010fast,
  title={A fast and frugal method for team-task allocation in a multi-robot transportation system},
  author={Wawerla, Jens and Vaughan, Richard T},
  booktitle={Robotics and Automation (ICRA), 2010 IEEE International Conference on},
  pages={1432--1437},
  year={2010},
  organization={IEEE}
}

@inproceedings{sung2009robots,
  title={Robots in the wild: understanding long-term use},
  author={Sung, JaYoung and Christensen, Henrik I and Grinter, Rebecca E},
  booktitle={Proceedings of the 4th ACM/IEEE international conference on Human robot interaction},
  pages={45--52},
  year={2009},
  organization={ACM}
}

@article{vaussard2014lessons,
  title={Lessons learned from robotic vacuum cleaners entering the home ecosystem},
  author={Vaussard, Florian and Fink, Julia and Bauwens, Val{\'e}rie and R{\'e}tornaz, Philippe and Hamel, David and Dillenbourg, Pierre and Mondada, Francesco},
  journal={Robotics and Autonomous Systems},
  volume={62},
  number={3},
  pages={376--391},
  year={2014},
  publisher={Elsevier}
}

@inproceedings{forlizzi2007robotic,
  title={How robotic products become social products: an ethnographic study of cleaning in the home},
  author={Forlizzi, Jodi},
  booktitle={Proceedings of the ACM/IEEE international conference on Human-robot interaction},
  pages={129--136},
  year={2007},
  organization={ACM}
}

@inproceedings{forlizzi2006service,
  title={Service robots in the domestic environment: a study of the roomba vacuum in the home},
  author={Forlizzi, Jodi and DiSalvo, Carl},
  booktitle={Proceedings of the 1st ACM SIGCHI/SIGART conference on Human-robot interaction},
  pages={258--265},
  year={2006},
  organization={ACM}
}

@inproceedings{nourbakhsh2003mobot,
  title={The mobot museum robot installations: A five year experiment},
  author={Nourbakhsh, Illah R and Kunz, Clayton and Willeke, Thomas},
  booktitle={Intelligent Robots and Systems, 2003.(IROS 2003). Proceedings. 2003 IEEE/RSJ International Conference on},
  volume={4},
  pages={3636--3641},
  year={2003},
  organization={IEEE}
}

@article{michaud2001experiences,
  title={Experiences with an autonomous robot attending AAAI},
  author={Michaud, Fran{\c{c}}ois and Audet, Jonathan and L{\'e}tourneau, Dominic and Lussier, Luc and Th{\'e}berge-Turmel, Catherine and Caron, Serge},
  journal={IEEE Intelligent Systems},
  volume={16},
  number={5},
  pages={23--29},
  year={2001},
  publisher={IEEE}
}

@article{hart1968formal,
  title={A formal basis for the heuristic determination of minimum cost paths},
  author={Hart, Peter E and Nilsson, Nils J and Raphael, Bertram},
  journal={IEEE transactions on Systems Science and Cybernetics},
  volume={4},
  number={2},
  pages={100--107},
  year={1968},
  publisher={IEEE}
}

@article{fox1997dynamic,
  title={The dynamic window approach to collision avoidance},
  author={Fox, Dieter and Burgard, Wolfram and Thrun, Sebastian},
  journal={IEEE Robotics \& Automation Magazine},
  volume={4},
  number={1},
  pages={23--33},
  year={1997},
  publisher={IEEE}
}

@article{fiorini1998motion,
  title={Motion planning in dynamic environments using velocity obstacles},
  author={Fiorini, Paolo and Shiller, Zvi},
  journal={The International Journal of Robotics Research},
  volume={17},
  number={7},
  pages={760--772},
  year={1998},
  publisher={Sage Publications Sage CA: Thousand Oaks, CA}
}

@inproceedings{van2008reciprocal,
  title={Reciprocal velocity obstacles for real-time multi-agent navigation},
  author={Van den Berg, Jur and Lin, Ming and Manocha, Dinesh},
  booktitle={Robotics and Automation, 2008. ICRA 2008. IEEE International Conference on},
  pages={1928--1935},
  year={2008},
  organization={IEEE}
}

@inproceedings{sadat2012bravo,
  title={Bravo: Biased reciprocal velocity obstacles break symmetry in dense robot populations},
  author={Sadat, Seyed Abbas and Vaughan, Richard T},
  booktitle={Computer and Robot Vision (CRV), 2012 Ninth Conference on},
  pages={441--447},
  year={2012},
  organization={IEEE}
}

@inproceedings{quigley2009ros,
  title={ROS: an open-source Robot Operating System},
  author={Quigley, Morgan and Conley, Ken and Gerkey, Brian and Faust, Josh and Foote, Tully and Leibs, Jeremy and Wheeler, Rob and Ng, Andrew Y},
  booktitle={ICRA workshop on open source software},
  volume={3},
  number={3.2},
  pages={5},
  year={2009},
  organization={Kobe, Japan}
}

@article{lawton2003decentralized,
  title={A decentralized approach to formation maneuvers},
  author={Lawton, Jonathan RT and Beard, Randal W and Young, Brett J},
  journal={IEEE transactions on robotics and automation},
  volume={19},
  number={6},
  pages={933--941},
  year={2003},
  publisher={IEEE}
}

@inproceedings{guy2010pledestrians,
  title={Pledestrians: a least-effort approach to crowd simulation},
  author={Guy, Stephen J and Chhugani, Jatin and Curtis, Sean and Dubey, Pradeep and Lin, Ming and Manocha, Dinesh},
  booktitle={Proceedings of the 2010 ACM SIGGRAPH/Eurographics symposium on computer animation},
  pages={119--128},
  year={2010},
  organization={Eurographics Association}
}

@inproceedings{guy2010pledestrians,
  title={Pledestrians: a least-effort approach to crowd simulation},
  author={Guy, Stephen J and Chhugani, Jatin and Curtis, Sean and Dubey, Pradeep and Lin, Ming and Manocha, Dinesh},
  booktitle={Proceedings of the 2010 ACM SIGGRAPH/Eurographics symposium on computer animation},
  pages={119--128},
  year={2010},
  organization={Eurographics Association}
}

@inproceedings{kummerle2013navigation,
  title={A navigation system for robots operating in crowded urban environments},
  author={K{\"u}mmerle, Rainer and Ruhnke, Michael and Steder, Bastian and Stachniss, Cyrill and Burgard, Wolfram},
  booktitle={Robotics and Automation (ICRA), 2013 IEEE International Conference on},
  pages={3225--3232},
  year={2013},
  organization={IEEE}
}

@inproceedings{yuan2010dynamic,
  title={Dynamic path planning adopting human navigation strategies for a domestic mobile robot},
  author={Yuan, Fang and Twardon, Lukas and Hanheide, Marc},
  booktitle={Intelligent Robots and Systems (IROS), 2010 IEEE/RSJ International Conference on},
  pages={3275--3281},
  year={2010},
  organization={IEEE}
}

@inproceedings{zuluaga2005reducing,
  title={Reducing spatial interference in robot teams by local-investment aggression},
  author={Zuluaga, Mauricio and Vaughan, Richard},
  booktitle={Intelligent Robots and Systems, 2005.(IROS 2005). 2005 IEEE/RSJ International Conference on},
  pages={2798--2805},
  year={2005},
  organization={IEEE}
}

@inproceedings{reynolds1987flocks,
  title={Flocks, herds and schools: A distributed behavioral model},
  author={Reynolds, Craig W},
  booktitle={ACM SIGGRAPH computer graphics},
  volume={21},
  number={4},
  pages={25--34},
  year={1987},
  organization={ACM}
}

@article{turgut2008self,
  title={Self-organized flocking in mobile robot swarms},
  author={Turgut, Ali E and {\c{C}}elikkanat, Hande and G{\"o}k{\c{c}}e, Fatih and {\c{S}}ahin, Erol},
  journal={Swarm Intelligence},
  volume={2},
  number={2-4},
  pages={97--120},
  year={2008},
  publisher={Springer}
}

@inproceedings{murphy2013survey,
  title={Survey of metrics for human-robot interaction},
  author={Murphy, Robin and Schreckenghost, Debra},
  booktitle={Proceedings of the 8th ACM/IEEE international conference on Human-robot interaction},
  pages={197--198},
  year={2013},
  organization={IEEE Press}
}

@article{kruse2013human,
  title={Human-aware robot navigation: A survey},
  author={Kruse, Thibault and Pandey, Amit Kumar and Alami, Rachid and Kirsch, Alexandra},
  journal={Robotics and Autonomous Systems},
  volume={61},
  number={12},
  pages={1726--1743},
  year={2013},
  publisher={Elsevier}
}

@inproceedings{pacchierotti2006evaluation,
  title={Evaluation of passing distance for social robots},
  author={Pacchierotti, Elena and Christensen, Henrik I and Jensfelt, Patric},
  booktitle={Robot and Human Interactive Communication, 2006. ROMAN 2006. The 15th IEEE International Symposium on},
  pages={315--320},
  year={2006},
  organization={IEEE}
}

@article{fiore2013toward,
  title={Toward understanding social cues and signals in human--robot interaction: effects of robot gaze and proxemic behavior},
  author={Fiore, Stephen M and Wiltshire, Travis J and Lobato, Emilio JC and Jentsch, Florian G and Huang, Wesley H and Axelrod, Benjamin},
  journal={Frontiers in psychology},
  volume={4},
  pages={859},
  year={2013},
  publisher={Frontiers}
}

@inproceedings{mumm2011human,
  title={Human-robot proxemics: physical and psychological distancing in human-robot interaction},
  author={Mumm, Jonathan and Mutlu, Bilge},
  booktitle={Proceedings of the 6th international conference on Human-robot interaction},
  pages={331--338},
  year={2011},
  organization={ACM}
}

@inproceedings{karamouzas2009predictive,
  title={A predictive collision avoidance model for pedestrian simulation},
  author={Karamouzas, Ioannis and Heil, Peter and Van Beek, Pascal and Overmars, Mark H},
  booktitle={International Workshop on Motion in Games},
  pages={41--52},
  year={2009},
  organization={Springer}
}

@article{helbing1995social,
  title={Social force model for pedestrian dynamics},
  author={Helbing, Dirk and Molnar, Peter},
  journal={Physical review E},
  volume={51},
  number={5},
  pages={4282},
  year={1995},
  publisher={APS}
}

Towards a socially acceptable collision avoidance for a mobile robot navigating among pedestrians using a pedestrian model

@inproceedings{guzzi2013local,
  title={Local reactive robot navigation: A comparison between reciprocal velocity obstacle variants and human-like behavior},
  author={Guzzi, Jerome and Giusti, Alessandro and Gambardella, Luca M and Di Caro, Gianni A},
  booktitle={Intelligent Robots and Systems (IROS), 2013 IEEE/RSJ International Conference on},
  pages={2622--2629},
  year={2013},
  organization={IEEE}
}

@inproceedings{alahi2016social,
  title={Social lstm: Human trajectory prediction in crowded spaces},
  author={Alahi, Alexandre and Goel, Kratarth and Ramanathan, Vignesh and Robicquet, Alexandre and Fei-Fei, Li and Savarese, Silvio},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={961--971},
  year={2016}
}

@inproceedings{robicquet2016learning,
  title={Learning social etiquette: Human trajectory understanding in crowded scenes},
  author={Robicquet, Alexandre and Sadeghian, Amir and Alahi, Alexandre and Savarese, Silvio},
  booktitle={European conference on computer vision},
  pages={549--565},
  year={2016},
  organization={Springer}
}

@article{kretzschmar2016socially,
  title={Socially compliant mobile robot navigation via inverse reinforcement learning},
  author={Kretzschmar, Henrik and Spies, Markus and Sprunk, Christoph and Burgard, Wolfram},
  journal={The International Journal of Robotics Research},
  volume={35},
  number={11},
  pages={1289--1307},
  year={2016},
  publisher={SAGE Publications Sage UK: London, England}
}

@article{chen2017socially,
  title={Socially aware motion planning with deep reinforcement learning},
  author={Chen, Yu Fan and Everett, Michael and Liu, Miao and How, Jonathan P},
  journal={arXiv preprint arXiv:1703.08862},
  year={2017}
}

@article{kim2016socially,
  title={Socially adaptive path planning in human environments using inverse reinforcement learning},
  author={Kim, Beomjoon and Pineau, Joelle},
  journal={International Journal of Social Robotics},
  volume={8},
  number={1},
  pages={51--66},
  year={2016},
  publisher={Springer}
}

@article{khambhaita2017viewing,
  title={Viewing Robot Navigation in Human Environment as a Cooperative Activity},
  author={Khambhaita, Harmish and Alami, Rachid},
  journal={arXiv preprint arXiv:1708.01267},
  year={2017}
}

@inproceedings{kitade2013understanding,
  title={Understanding suitable locations for waiting},
  author={Kitade, Takuya and Satake, Satoru and Kanda, Takayuki and Imai, Michita},
  booktitle={Proceedings of the 8th ACM/IEEE international conference on Human-robot interaction},
  pages={57--64},
  year={2013},
  organization={IEEE Press}
}

@inproceedings{satake2009approach,
  title={How to approach humans?: strategies for social robots to initiate interaction},
  author={Satake, Satoru and Kanda, Takayuki and Glas, Dylan F and Imai, Michita and Ishiguro, Hiroshi and Hagita, Norihiro},
  booktitle={Proceedings of the 4th ACM/IEEE international conference on Human robot interaction},
  pages={109--116},
  year={2009},
  organization={ACM}
}

@inproceedings{mutlu2009footing,
  title={Footing in human-robot conversations: how robots might shape participant roles using gaze cues},
  author={Mutlu, Bilge and Shiwa, Toshiyuki and Kanda, Takayuki and Ishiguro, Hiroshi and Hagita, Norihiro},
  booktitle={Proceedings of the 4th ACM/IEEE international conference on Human robot interaction},
  pages={61--68},
  year={2009},
  organization={ACM}
}

@inproceedings{saerbeck2010perception,
  title={Perception of affect elicited by robot motion},
  author={Saerbeck, Martin and Bartneck, Christoph},
  booktitle={Human-Robot Interaction (HRI), 2010 5th ACM/IEEE International Conference on},
  pages={53--60},
  year={2010},
  organization={IEEE}
}

@inproceedings{dragan2014analysis,
  title={An Analysis of Deceptive Robot Motion.},
  author={Dragan, Anca D and Holladay, Rachel M and Srinivasa, Siddhartha S},
  booktitle={Robotics: science and systems},
  pages={10},
  year={2014},
  organization={Citeseer}
}

@inproceedings{mutlu2009nonverbal,
  title={Nonverbal leakage in robots: communication of intentions through seemingly unintentional behavior},
  author={Mutlu, Bilge and Yamaoka, Fumitaka and Kanda, Takayuki and Ishiguro, Hiroshi and Hagita, Norihiro},
  booktitle={Proceedings of the 4th ACM/IEEE international conference on Human robot interaction},
  pages={69--76},
  year={2009},
  organization={ACM}
}

@inproceedings{green2006making,
  title={Making a case for spatial prompting in human-robot communication},
  author={Green, Anders and H{\"u}ttenrauch, Helge},
  booktitle={Workshop Programme},
  volume={10},
  pages={52},
  year={2006}
}

@inproceedings{kirchner2011nonverbal,
  title={Nonverbal robot-group interaction using an imitated gaze cue},
  author={Kirchner, Nathan and Alempijevic, Alen and Dissanayake, Gamini},
  booktitle={Human-Robot Interaction (HRI), 2011 6th ACM/IEEE International Conference on},
  pages={497--504},
  year={2011},
  organization={IEEE}
}

@article{breazeal2004social,
  title={Social interactions in HRI: the robot view},
  author={Breazeal, Cynthia},
  journal={IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews)},
  volume={34},
  number={2},
  pages={181--186},
  year={2004},
  publisher={IEEE}
}

@article{leite2013social,
  title={Social robots for long-term interaction: a survey},
  author={Leite, Iolanda and Martinho, Carlos and Paiva, Ana},
  journal={International Journal of Social Robotics},
  volume={5},
  number={2},
  pages={291--308},
  year={2013},
  publisher={Springer}
}

@inproceedings{xu2012trust,
  title={Trust-driven interactive visual navigation for autonomous robots},
  author={Xu, Anqi and Dudek, Gregory},
  booktitle={Robotics and Automation (ICRA), 2012 IEEE International Conference on},
  pages={3922--3929},
  year={2012},
  organization={IEEE}
}

@inproceedings{xu2016maintaining,
  title={Maintaining efficient collaboration with trust-seeking robots},
  author={Xu, Anqi and Dudek, Gregory},
  booktitle={Intelligent Robots and Systems (IROS), 2016 IEEE/RSJ International Conference on},
  pages={3312--3319},
  year={2016},
  organization={IEEE}
}

@inproceedings{deshmukh2014exploring,
  title={Exploring socially intelligent recharge behaviour for human-robot interaction},
  author={Deshmukh, Amol A and Aylett, Ruth},
  booktitle={Proceedings of the 2014 ACM/IEEE international conference on Human-robot interaction},
  pages={150--151},
  year={2014},
  organization={ACM}
}

@inproceedings{deshmukh2011managing,
  title={Managing social constraints on recharge behaviour for robot companions using memory},
  author={Deshmukh, Amol A and Lim, Mei Yii and Kriegel, Michael and Aylett, Ruth and Du Casse, Kyron and Kheng L, Koay and Dautenhahn, Kerstin},
  booktitle={Proceedings of the 6th international conference on Human-robot interaction},
  pages={129--130},
  year={2011},
  organization={ACM}
}

@inproceedings{weiss2010robots,
  title={Robots asking for directions—The willingness of passers-by to support robots},
  author={Weiss, Astrid and Igelsb{\"o}ck, Judith and Tscheligi, Manfred and Bauer, Andrea and K{\"u}hnlenz, Kolja and Wollherr, Dirk and Buss, Martin},
  booktitle={Human-Robot Interaction (HRI), 2010 5th ACM/IEEE International Conference on},
  pages={23--30},
  year={2010},
  organization={IEEE}
}

@inproceedings{michalowski2006socially,
  title={Socially distributed perception},
  author={Michalowski, Marek P and DiSalvo, Carl and Busquets, Didac and Hiatt, Laura M and Melchior, Nik A and Simmons, Reid and Sabanovic, Selma},
  booktitle={Proceedings of the 1st ACM SIGCHI/SIGART conference on Human-robot interaction},
  pages={349--350},
  year={2006},
  organization={ACM}
}

@article{nakauchi2002social,
  title={A social robot that stands in line},
  author={Nakauchi, Yasushi and Simmons, Reid},
  journal={Autonomous Robots},
  volume={12},
  number={3},
  pages={313--324},
  year={2002},
  publisher={Springer}
}

@inproceedings{gockley2005designing,
  title={Designing robots for long-term social interaction},
  author={Gockley, Rachel and Bruce, Allison and Forlizzi, Jodi and Michalowski, Marek and Mundell, Anne and Rosenthal, Stephanie and Sellner, Brennan and Simmons, Reid and Snipes, Kevin and Schultz, Alan C and others},
  booktitle={Intelligent Robots and Systems, 2005.(IROS 2005). 2005 IEEE/RSJ International Conference on},
  pages={1338--1343},
  year={2005},
  organization={IEEE}
}

@inproceedings{lee2012personalization,
  title={Personalization in HRI: A longitudinal field experiment},
  author={Lee, Min Kyung and Forlizzi, Jodi and Kiesler, Sara and Rybski, Paul and Antanitis, John and Savetsila, Sarun},
  booktitle={Human-Robot Interaction (HRI), 2012 7th ACM/IEEE International Conference on},
  pages={319--326},
  year={2012},
  organization={IEEE}
}

@article{baddoura2013social,
  title={Social vs. useful HRI: experiencing the familiar, perceiving the robot as a sociable partner and responding to its actions},
  author={Baddoura, Ritta and Venture, Gentiane},
  journal={International Journal of Social Robotics},
  volume={5},
  number={4},
  pages={529--547},
  year={2013},
  publisher={Springer}
}

@inproceedings{fiore2011human,
  title={Human-robot teams collaborating socially, organizationally, and culturally},
  author={Fiore, Stephen M and Badler, Norman L and Boloni, Lotzi and Goodrich, Michael A and Wu, Annie S and Chen, Jessie},
  booktitle={Proceedings of the Human Factors and Ergonomics Society Annual Meeting},
  volume={55},
  number={1},
  pages={465--469},
  year={2011},
  organization={SAGE Publications Sage CA: Los Angeles, CA}
}

@article{breazeal2003toward,
  title={Toward sociable robots},
  author={Breazeal, Cynthia},
  journal={Robotics and autonomous systems},
  volume={42},
  number={3-4},
  pages={167--175},
  year={2003},
  publisher={Elsevier}
}

%Ikea's Lamp (just use a link to a video for this one)

@inproceedings{ccuruklu2010towards,
  title={Towards industrial robots with human-like moral responsibilities},
  author={{\c{C}}{\"u}r{\"u}kl{\"u}, Baran and Dodig-Crnkovic, Gordana and Akan, Batu},
  booktitle={Human-Robot Interaction (HRI), 2010 5th ACM/IEEE International Conference on},
  pages={85--86},
  year={2010},
  organization={IEEE}
}

@inproceedings{higuera2012socially,
  title={Socially-driven collective path planning for robot missions},
  author={Higuera, Juan Camilo Gamboa and Xu, Anqi and Shkurti, Florian and Dudek, Gregory},
  booktitle={Computer and Robot Vision (CRV), 2012 Ninth Conference on},
  pages={417--424},
  year={2012},
  organization={IEEE}
}

@inproceedings{you2011robot,
  title={When the robot criticizes you...: self-serving bias in human-robot interaction},
  author={You, Sangseok and Nie, Jiaqi and Suh, Kiseul and Sundar, S Shyam},
  booktitle={Proceedings of the 6th international conference on Human-robot interaction},
  pages={295--296},
  year={2011},
  organization={ACM}
}

@inproceedings{groom2010critic,
  title={Critic, compatriot, or chump?: Responses to robot blame attribution},
  author={Groom, Victoria and Chen, Jimmy and Johnson, Theresa and Kara, F Arda and Nass, Clifford},
  booktitle={Proceedings of the 5th ACM/IEEE international conference on Human-robot interaction},
  pages={211--218},
  year={2010},
  organization={IEEE Press}
}

@inproceedings{litoiu2015evidence,
  title={Evidence that robots trigger a cheating detector in humans},
  author={Litoiu, Alexandru and Ullman, Daniel and Kim, Jason and Scassellati, Brian},
  booktitle={Proceedings of the Tenth Annual ACM/IEEE International Conference on Human-Robot Interaction},
  pages={165--172},
  year={2015},
  organization={ACM}
}

@inproceedings{bethel2013eyewitnesses,
  title={Eyewitnesses are misled by human but not robot interviewers},
  author={Bethel, Cindy L and Eakin, Deborah and Anreddy, Sujan and Stuart, James Kaleb and Carruth, Daniel},
  booktitle={Human-Robot Interaction (HRI), 2013 8th ACM/IEEE International Conference on},
  pages={25--32},
  year={2013},
  organization={IEEE}
}

@article{gombolay2015decision,
  title={Decision-making authority, team efficiency and human worker satisfaction in mixed human--robot teams},
  author={Gombolay, Matthew C and Gutierrez, Reymundo A and Clarke, Shanelle G and Sturla, Giancarlo F and Shah, Julie A},
  journal={Autonomous Robots},
  volume={39},
  number={3},
  pages={293--312},
  year={2015},
  publisher={Springer}
}

@inproceedings{bailey2001effects,
  title={The Effects of Interruptions on Task Performance, Annoyance, and Anxiety in the User Interface.},
  author={Bailey, Brian P and Konstan, Joseph A and Carlis, John V},
  booktitle={Interact},
  volume={1},
  pages={593--601},
  year={2001}
}

@inproceedings{saulnier2011exploring,
  title={Exploring minimal nonverbal interruption in HRI},
  author={Saulnier, Paul and Sharlin, Ehud and Greenberg, Saul},
  booktitle={RO-MAN, 2011 IEEE},
  pages={79--86},
  year={2011},
  organization={IEEE}
}

@inproceedings{evers2011designing,
  title={Designing interruptive behaviors of a public environmental monitoring robot},
  author={Evers, Vanessa and de Vries, Roelof and Alvito, Paulo},
  booktitle={Proceedings of the 6th international conference on Human-robot interaction},
  pages={131--132},
  year={2011},
  organization={ACM}
}

@inproceedings{takayama2008beyond,
  title={Beyond dirty, dangerous and dull: what everyday people think robots should do},
  author={Takayama, Leila and Ju, Wendy and Nass, Clifford},
  booktitle={Proceedings of the 3rd ACM/IEEE international conference on Human robot interaction},
  pages={25--32},
  year={2008},
  organization={ACM}
}

@inproceedings{leyzberg2011robots,
  title={Robots that express emotion elicit better human teaching},
  author={Leyzberg, Dan and Avrunin, Eleanor and Liu, Jenny and Scassellati, Brian},
  booktitle={Proceedings of the 6th international conference on Human-robot interaction},
  pages={347--354},
  year={2011},
  organization={ACM}
}

@inproceedings{cha2014effects,
  title={Effects of speech on perceived capability},
  author={Cha, Elizabeth and Dragan, Anca and Forlizzi, Jodi and Srinivasa, Siddhartha},
  booktitle={Proceedings of the 2014 ACM/IEEE international conference on Human-robot interaction},
  pages={134--135},
  year={2014},
  organization={ACM}
}

@inproceedings{park2017backchannel,
  title={Backchannel opportunity prediction for social robot listeners},
  author={Park, Hae Won and Gelsomini, Mirko and Lee, Jin Joo and Zhu, Tonghui and Breazeal, Cynthia},
  booktitle={Robotics and Automation (ICRA), 2017 IEEE International Conference on},
  pages={2308--2314},
  year={2017},
  organization={IEEE}
}

@inproceedings{bartneck2007daisy,
  title={Daisy, Daisy, give me your answer do!: switching off a robot},
  author={Bartneck, Christoph and Van Der Hoek, Michel and Mubin, Omar and Al Mahmud, Abdullah},
  booktitle={Proceedings of the ACM/IEEE international conference on Human-robot interaction},
  pages={217--222},
  year={2007},
  organization={ACM}
}

@article{miligram1974obedience,
  title={Obedience to authority: An experimental view},
  author={Miligram, Stanley},
  journal={New York},
  year={1974}
}

@inproceedings{westlund2016effects,
  title={Effects of framing a robot as a social agent or as a machine on children's social behavior},
  author={Westlund, Jacqueline M Kory and Martinez, Marayna and Archie, Maryam and Das, Madhurima and Breazeal, Cynthia},
  booktitle={Robot and Human Interactive Communication (RO-MAN), 2016 25th IEEE International Symposium on},
  pages={688--693},
  year={2016},
  organization={IEEE}
}

@inproceedings{brandstetter2014peer,
  title={A peer pressure experiment: Recreation of the Asch conformity experiment with robots},
  author={Brandstetter, J{\"u}rgen and R{\'a}cz, P{\'e}ter and Beckner, Clay and Sandoval, Eduardo B and Hay, Jennifer and Bartneck, Christoph},
  booktitle={Intelligent Robots and Systems (IROS 2014), 2014 IEEE/RSJ International Conference on},
  pages={1335--1340},
  year={2014},
  organization={IEEE}
}

@inproceedings{paepcke2010judging,
  title={Judging a bot by its cover: an experiment on expectation setting for personal robots},
  author={Paepcke, Steffi and Takayama, Leila},
  booktitle={Proceedings of the 5th ACM/IEEE international conference on Human-robot interaction},
  pages={45--52},
  year={2010},
  organization={IEEE Press}
}

@inproceedings{fraune2015rabble,
  title={Rabble of robots effects: Number and type of robots modulates attitudes, emotions, and stereotypes},
  author={Fraune, Marlena R and Sherrin, Steven and Sabanovi{\'c}, Selma and Smith, Eliot R},
  booktitle={Proceedings of the Tenth Annual ACM/IEEE International Conference on Human-Robot Interaction},
  pages={109--116},
  year={2015},
  organization={ACM}
}

@inproceedings{powers2006advisor,
  title={The advisor robot: tracing people's mental model from a robot's physical attributes},
  author={Powers, Aaron and Kiesler, Sara},
  booktitle={Proceedings of the 1st ACM SIGCHI/SIGART conference on Human-robot interaction},
  pages={218--225},
  year={2006},
  organization={ACM}
}

@inproceedings{bethel2006affective,
  title={Affective expression in appearance constrained robots},
  author={Bethel, Cindy L and Murphy, Robin R},
  booktitle={Proceedings of the 1st ACM SIGCHI/SIGART conference on Human-robot interaction},
  pages={327--328},
  year={2006},
  organization={ACM}
}

@inproceedings{malle2016robot,
  title={Which Robot Am I Thinking About?: The Impact of Action and Appearance on People's Evaluations of a Moral Robot},
  author={Malle, Bertram F and Scheutz, Matthias and Forlizzi, Jodi and Voiklis, John},
  booktitle={The Eleventh ACM/IEEE International Conference on Human Robot Interaction},
  pages={125--132},
  year={2016},
  organization={IEEE Press}
}

@inproceedings{kahn2012people,
  title={Do people hold a humanoid robot morally accountable for the harm it causes?},
  author={Kahn Jr, Peter H and Kanda, Takayuki and Ishiguro, Hiroshi and Gill, Brian T and Ruckert, Jolina H and Shen, Solace and Gary, Heather E and Reichert, Aimee L and Freier, Nathan G and Severson, Rachel L},
  booktitle={Proceedings of the seventh annual ACM/IEEE international conference on Human-Robot Interaction},
  pages={33--40},
  year={2012},
  organization={ACM}
}

@inproceedings{fraune2015three,
  title={Three's company, or a crowd?: The effects of robot number and behavior on HRI in Japan and the USA.},
  author={Fraune, Marlena R and Kawakami, Satoru and Sabanovic, Selma and De Silva, P Ravindra S and Okada, Michio},
  booktitle={Robotics: Science and Systems},
  year={2015}
}

@inproceedings{ralph2006effect,
  title={On the effect of the user's background on communicating grasping commands},
  author={Ralph, Maria and Moussa, Medhat A},
  booktitle={Proceedings of the 1st ACM SIGCHI/SIGART conference on Human-robot interaction},
  pages={353--354},
  year={2006},
  organization={ACM}
}

@article{bartneck2007influence,
  title={The influence of people’s culture and prior experiences with Aibo on their attitude towards robots},
  author={Bartneck, Christoph and Suzuki, Tomohiro and Kanda, Takayuki and Nomura, Tatsuya},
  journal={Ai \& Society},
  volume={21},
  number={1-2},
  pages={217--230},
  year={2007},
  publisher={Springer}
}

@inproceedings{wang2010rome,
  title={When in Rome: the role of culture \& context in adherence to robot recommendations},
  author={Wang, Lin and Rau, Pei-Luen Patrick and Evers, Vanessa and Robinson, Benjamin Krisper and Hinds, Pamela},
  booktitle={Proceedings of the 5th ACM/IEEE international conference on Human-robot interaction},
  pages={359--366},
  year={2010},
  organization={IEEE Press}
}

@inproceedings{basu2017you,
  title={Do you want your autonomous car to drive like you?},
  author={Basu, Chandrayee and Yang, Qian and Hungerman, David and Singhal, Mukesh and Dragan, Anca D},
  booktitle={Proceedings of the 2017 ACM/IEEE International Conference on Human-Robot Interaction},
  pages={417--425},
  year={2017},
  organization={ACM}
}

@book{seuss1953zax,
  title={The Sneetches and Other Stories},
  author={Geisel, Theodore S},
  year={1953},
  publisher={Random House}
}

@book{dick1955autofac,
  title={Autonomous robots: from biological inspiration to implementation and control},
  author={Dick, Philip K},
  year={1955},
  publisher={TeknoBooks}
}

@incollection{turing2009computing,
  title={Computing machinery and intelligence},
  author={Turing, Alan M},
  booktitle={Parsing the Turing Test},
  pages={23--65},
  year={2009},
  publisher={Springer}
}

@article{patil2011directing,
  title={Directing crowd simulations using navigation fields},
  author={Patil, Sachin and Van Den Berg, Jur and Curtis, Sean and Lin, Ming C and Manocha, Dinesh},
  journal={IEEE transactions on visualization and computer graphics},
  volume={17},
  number={2},
  pages={244--254},
  year={2011},
  publisher={IEEE}
}

@article{shiomi2014towards,
  title={Towards a socially acceptable collision avoidance for a mobile robot navigating among pedestrians using a pedestrian model},
  author={Shiomi, Masahiro and Zanlungo, Francesco and Hayashi, Kotaro and Kanda, Takayuki},
  journal={International Journal of Social Robotics},
  volume={6},
  number={3},
  pages={443--455},
  year={2014},
  publisher={Springer}
}

@inproceedings{torrey2013robot,
  title={How a robot should give advice},
  author={Torrey, Cristen and Fussell, Susan and Kiesler, Sara},
  booktitle={Proceedings of the 8th ACM/IEEE international conference on Human-robot interaction},
  pages={275--282},
  year={2013},
  organization={IEEE Press}
}

@article{searle1990brain,
  title={Is the brain's mind a computer program?},
  author={Searle, John R},
  journal={Scientific American},
  volume={262},
  number={1},
  pages={25--31},
  year={1990},
  publisher={JSTOR}
}


text:
require odile.inc
inherit native

do_stage() {
    install -m 0755 ${S}/hello ${STAGING_BINDIR_NATIVE}/
}

do_install () {
    :
}

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: bb


text:
package posts

import (
	"github.com/sagittaros/gonews/models"
	"github.com/russross/blackfriday"
	"html/template"
)

type Comment struct {
	Comment  models.Comment
	Children []Comment
}

func (v *Comment) HasChildren() bool {
	return len(v.Children) > 0
}

func (v *Comment) CommentContent() template.HTML {
	return template.HTML(string(blackfriday.MarkdownCommon([]byte(v.Comment.Content))))
}

repository: easyrider/golang-seed-project

repo_name: easyrider/golang-seed-project

extension: go


text:
package models

const (
	ServerToken         = `default-token-used-in-server-side`
	DatetimeFormat      = `2006-01-02 15:04:05`
	DateFormatWithZone  = `2006-01-02 15:04:05 MST`
	Version             = `1.0.0`
	SystemRole          = `SUB_SYSTEM`
	PlatformUser        = `SYS_PLATFORM`
	UrlPrefix           = "/monitor"
	RsaPemPath          = "/data/certs/rsa_key"
	LogMetricName       = "node_log_metric_monitor_value"
	DBMonitorMetricName = "db_monitor_value"
	SPAlertMailKey           = "alert_mail"
	SPMetricTemplate    = "metric_template"
	SPServiceMetricTemplate    = "service_metric_template"
	MetricWorkspaceService  = "all_object"
	MetricWorkspaceAll  = "any_object"
	DefaultActiveWindow = "00:00-23:59"
)

var (
	LogIgnorePath         = []string{"/monitor/webhook", "export/ping/source"}
	LogParamIgnorePath    = []string{"/dashboard/newchart", "/dashboard/pie/chart", "/problem/query", "/problem/history"}
	DashboardIgnoreTagKey = []string{"job", "__name__"}
)

repository: WeBankPartners/open-monitor

repo_name: WeBankPartners/open-monitor

gha_language: Go


text:
# Copyright (C) 2014 Matthias Lay <matthias.lay@securepoint.de>
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "tidy up html/xml"
HOMEPAGE = "http://tidy.sourceforge.net"
LICENSE = "CLOSED"
SECTION = "libs"
DEPENDS = ""
PR = "r0"

#SRC_URI = "cvs://tidy.cvs.sourceforge.net/cvsroot/tidy;protocol=cvs;module=tidy/tidy;date=2009-03-25"
SRC_URI = "git://github.com/toddr/libtidy.git;protocol=http"
SRCREV = "438749153abffcfb7214ae2632e17c5e51bc7bb3"
S = "${WORKDIR}/git"

inherit autotools-brokensep

EXTRA_OEMAKE = "-C build/gmake/ CC='${CC}' devinst_prefix='${D}/usr' runinst_prefix='${D}/usr'"
PARALLEL_MAKE = ""
FILES_${PN}-dev += "/usr/man"

do_configure(){
    #manpage install needs tidy itself to install so if you really want them,
    #you have to build tidy native AND manipulate the static Makefile to use the native tidy
    sed -i 's/install: installhdrs installib installexes installmanpage/install: installhdrs installib installexes/' ${S}/build/gmake/Makefile
}

repository: Securepoint/yocto-meta-securepoint

repo_name: Securepoint/yocto-meta-securepoint


text:
package apiserver

import (
	"context"
	"net/http"
	"strconv"
	"strings"

	"github.com/samsung-cnct/ims-kaas/internal/apiserver"
	pb "github.com/samsung-cnct/ims-kaas/pkg/generated/api"
	"github.com/samsung-cnct/ims-kaas/pkg/ui/website"

	"github.com/grpc-ecosystem/grpc-gateway/runtime"
	"github.com/soheilhy/cmux"
	"google.golang.org/grpc"
	"google.golang.org/grpc/reflection"
	"k8s.io/klog"
	"sigs.k8s.io/controller-runtime/pkg/manager"
)

type ServerOptions struct {
	PortNumber int
}

type ApiServer struct {
	Manager manager.Manager
	TcpMux  cmux.CMux
}

type MuxApiServer interface {
	AddServersToMux(options *ServerOptions)
	GetMux() cmux.CMux
}

func NewApiServer(manager manager.Manager, tcpMux cmux.CMux) MuxApiServer {
	return &ApiServer{Manager: manager, TcpMux: tcpMux}
}

func (r *ApiServer) AddServersToMux(options *ServerOptions) {
	r.addGRPCServer(r.TcpMux)
	r.addRestAndWebsite(r.TcpMux, options.PortNumber)
}

func (r *ApiServer) GetMux() cmux.CMux {
	return r.TcpMux
}

func (r *ApiServer) addGRPCServer(tcpMux cmux.CMux) {
	var opts []grpc.ServerOption
	grpcServer := grpc.NewServer(opts...)
	pb.RegisterClusterServer(grpcServer, r.newgRPCServiceServer())
	// Register reflection service on gRPC server.
	reflection.Register(grpcServer)

	grpcListener := tcpMux.MatchWithWriters(cmux.HTTP2MatchHeaderFieldPrefixSendSettings("content-type", "application/grpc"))
	// Start servers
	go func() {
		klog.Info("Starting gRPC Server")
		if err := grpcServer.Serve(grpcListener); err != nil {
			klog.Errorf("Unable to start external gRPC server: %q", err)
		}
	}()
}

func (r *ApiServer) addRestAndWebsite(tcpMux cmux.CMux, grpcPortNumber int) {
	httpListener := tcpMux.Match(cmux.HTTP1Fast())

	go func() {
		router := http.NewServeMux()
		website.AddWebsiteHandles(router)
		r.addgRPCRestGateway(router, grpcPortNumber)
		httpServer := http.Server{
			Handler: router,
		}
		klog.Info("Starting HTTP/1 Server")
		err := httpServer.Serve(httpListener)
		if err != nil {
			klog.Errorf("Failed to start http server Serve(): %q", err)
		}
	}()

}

func (r *ApiServer) addgRPCRestGateway(router *http.ServeMux, grpcPortNumber int) {
	dopts := []grpc.DialOption{grpc.WithInsecure()}
	gwmux := runtime.NewServeMux()
	err := pb.RegisterClusterHandlerFromEndpoint(context.Background(), gwmux, "localhost:"+strconv.Itoa(grpcPortNumber), dopts)
	if err != nil {
		klog.Errorf("Failed to register handler from endpoint: %q", err)
	}
	router.Handle("/api/", allowCORS(gwmux))
}

func (r *ApiServer) newgRPCServiceServer() *apiserver.Server {
	return &apiserver.Server{Manager: r.Manager}
}

// allowCORS allows Cross Origin Resource Sharing from any origin.
// Don't do this without consideration in production systems.
func allowCORS(h http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		if origin := r.Header.Get("Origin"); origin != "" {
			w.Header().Set("Access-Control-Allow-Origin", origin)
			if r.Method == "OPTIONS" && r.Header.Get("Access-Control-Request-Method") != "" {
				preflightHandler(w, r)
				return
			}
		}
		h.ServeHTTP(w, r)
	})
}

// pre-flightHandler adds the necessary headers in order to serve
// CORS from any origin using the methods "GET", "HEAD", "POST", "PUT", "DELETE"
// We insist, don't do this without consideration in production systems.
func preflightHandler(w http.ResponseWriter, r *http.Request) {
	headers := []string{"Content-Type", "Accept"}
	methods := []string{"GET", "HEAD", "POST", "PUT", "DELETE"}

	w.Header().Set("Access-Control-Allow-Headers", strings.Join(headers, ","))
	w.Header().Set("Access-Control-Allow-Methods", strings.Join(methods, ","))

	klog.Infof("pre-flight request for %s", r.URL.Path)
}

repository: alika/cma-ssh

repo_name: alika/cma-ssh


text:
SUMMARY = "Hardware Platform Interface Library and Tools"

DESCRIPTION = "\
OpenHPI is an open source project created with the intent of providing an \
implementation of the SA Forum's Hardware Platform Interface (HPI). HPI \
provides an abstracted interface to managing computer hardware, typically for \
chassis and rack based servers. HPI includes resource modeling; access to and \
control over sensor, control, watchdog, and inventory data associated with \
resources; abstracted System Event Log interfaces; hardware events and alerts; \
and a managed hotswap interface. \
\
OpenHPI provides a modular mechanism for adding new hardware and device support \
easily. Many plugins exist in the OpenHPI source tree to provide access to \
various types of hardware. This includes, but is not limited to, IPMI based \
servers, Blade Center, and machines which export data via sysfs. \
"

HOMEPAGE = "http://openhpi.sourceforge.net/Home"
SECTION = "net"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4"

DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs \
           autoconf-archive-native os-release"

SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
           file://openhpi.init \
           file://openhpid.service \
           file://run-ptest \
           file://openhpi-netsnmp-cross-compile.patch \
           file://openhpi-sysfs-cross-compile.patch \
           file://openhpi-libxml2-cross-compile.patch \
           file://openhpi-glib-cross-compile.patch \
           file://openhpi-linkfix.patch \
           file://openhpi-fix-host-gcc.patch \
           file://openhpi-fix-function-saHpiSensorThresholds.patch \
           file://openhpi-add-libnetsnmp-when-link.patch \
           file://openhpi-invalide-session.patch \
           file://openhpi-use-serial-tests-config-needed-by-ptest.patch \
           file://openhpi-fix-alignment-issue.patch \
           file://c++11.patch \
           file://clang-c++11.patch \
           file://fix-narrowing-warning.patch \
           file://0001-session-close-socket.patch \
           file://openhpi-3.6.1-ssl.patch \
           file://0001-Do-not-poke-at-build-host-s-etc-os-release.patch \
           file://cross_899198.patch \
           file://no-md2.patch \
           file://0001-include-iostream-for-cout.patch \
           "
SRC_URI[md5sum] = "fffda3deea8a0d3671a72eea9d13a4df"
SRC_URI[sha256sum] = "c94332a29160dd75cb799c027e614690c00263b0fabed87417707bec04c38723"

inherit autotools pkgconfig ptest update-rc.d systemd

PACKAGES =+ "${PN}-libs"

FILES:${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"

INSANE_SKIP:${PN}-libs = "dev-so"
RDEPENDS:${PN} += "${PN}-libs"

PACKAGECONFIG ??= "libgcrypt non32bit snmp-bc"
PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils,"
PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt,"
PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,,"
PACKAGECONFIG[snmp-bc] = "--enable-snmp_bc,--disable-snmp_bc"

export DISTRO

do_install:append () {
    install -m 0755 -d ${D}${sysconfdir}/${BPN}
    install -m 0644 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf
    install -m 0600 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf
    install -m 0644 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data
    install -m 0644 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data
    install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid

    install -d ${D}${systemd_unitdir}/system
    install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system
    sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \
        ${D}${systemd_unitdir}/system/openhpid.service
}

do_compile_ptest () {
    for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do
        dir=`dirname ${x}`
        case $dir in
            *cpp/t)      ;;
            *snmp_bc/t)  if ${@bb.utils.contains('PACKAGECONFIG','snmp-bc','true','false',d)}
                         then
                           oe_runmake -C ${dir} buildtest-TESTS
                         fi
                         ;;
            *)           oe_runmake -C ${dir} buildtest-TESTS ;;
        esac
    done
}

ack_do_compile_ptest () {
    for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do
        dir=`dirname ${x}`
        upper=`dirname ${dir}`
        if [ `basename ${upper}` != "cpp" ]; then
            oe_runmake -C ${dir} buildtest-TESTS
        fi
    done
}

do_install_ptest () {
    cp -rf ${B}/openhpid/t/ohpi/.libs/* ${B}/openhpid/t/ohpi/
    TESTS="utils marshal openhpid"
    for subtest in ${TESTS}; do
        mkdir -p ${D}${PTEST_PATH}/${subtest}/t
        cp -rf ${B}/${subtest}/t/* ${D}${PTEST_PATH}/${subtest}/t
    done

    for x in `find ${D}${PTEST_PATH} -name Makefile`; do
        sed -i "s:${S}:${PTEST_PATH}/:g" ${x};
        sed -i "s/^Makefile:/MM:/g" ${x};
    done;

    install -m 644 ${S}/openhpid/t/ohpi/openhpi.conf ${D}${PTEST_PATH}/openhpid/t/ohpi/
    sed -i "s:OPENHPI_CONF=[^ ]*:OPENHPI_CONF=./openhpi.conf:g" ${D}${PTEST_PATH}/openhpid/t/ohpi/Makefile

    mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/
    cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/
    cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/
    find ${D}${PTEST_PATH}/ -name "*.c" -exec rm {} \;
    find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \;
    find ${D}${PTEST_PATH}/ -name "*.h" -exec rm {} \;
}

INITSCRIPT_NAME = "openhpid"
INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."

SYSTEMD_SERVICE:${PN} = "openhpid.service"
SYSTEMD_AUTO_ENABLE = "disable"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_license_id: MIT

gha_language: BitBake


text:
/*
 *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#define MS_CLASS "webrtc::ProbeController"
// #define MS_LOG_DEV_LEVEL 3

#include "modules/congestion_controller/goog_cc/probe_controller.h"
#include "api/units/data_rate.h"
#include "api/units/time_delta.h"
#include "api/units/timestamp.h"
#include "rtc_base/numerics/safe_conversions.h"

#include "Logger.hpp"

#include <absl/memory/memory.h>
#include <algorithm>
#include <initializer_list>
#include <string>

namespace webrtc {

namespace {
// The minimum number probing packets used.
constexpr int kMinProbePacketsSent = 5;

// The minimum probing duration in ms.
constexpr int kMinProbeDurationMs = 15;

// Maximum waiting time from the time of initiating probing to getting
// the measured results back.
constexpr int64_t kMaxWaitingTimeForProbingResultMs = 1000;

// Value of |min_bitrate_to_probe_further_bps_| that indicates
// further probing is disabled.
constexpr int kExponentialProbingDisabled = 0;

// Default probing bitrate limit. Applied only when the application didn't
// specify max bitrate.
constexpr int64_t kDefaultMaxProbingBitrateBps = 5000000;

// If the bitrate drops to a factor |kBitrateDropThreshold| or lower
// and we recover within |kBitrateDropTimeoutMs|, then we'll send
// a probe at a fraction |kProbeFractionAfterDrop| of the original bitrate.
constexpr double kBitrateDropThreshold = 0.66;
constexpr int kBitrateDropTimeoutMs = 5000;
constexpr double kProbeFractionAfterDrop = 0.85;

// Timeout for probing after leaving ALR. If the bitrate drops significantly,
// (as determined by the delay based estimator) and we leave ALR, then we will
// send a probe if we recover within |kLeftAlrTimeoutMs| ms.
constexpr int kAlrEndedTimeoutMs = 3000;

// The expected uncertainty of probe result (as a fraction of the target probe
// This is a limit on how often probing can be done when there is a BW
// drop detected in ALR.
constexpr int64_t kMinTimeBetweenAlrProbesMs = 5000;

// bitrate). Used to avoid probing if the probe bitrate is close to our current
// estimate.
constexpr double kProbeUncertainty = 0.05;

// Use probing to recover faster after large bitrate estimate drops.
constexpr char kBweRapidRecoveryExperiment[] =
    "WebRTC-BweRapidRecoveryExperiment";

// Never probe higher than configured by OnMaxTotalAllocatedBitrate().
constexpr char kCappedProbingFieldTrialName[] = "WebRTC-BweCappedProbing";

// Only do allocation probing when in ALR (but not when network-limited).
constexpr char kAllocProbingOnlyInAlrFieldTrialName[] =
    "WebRTC-BweAllocProbingOnlyInAlr";

void MaybeLogProbeClusterCreated(const ProbeClusterConfig& probe) {
#if MS_LOG_DEV_LEVEL == 3
  size_t min_bytes = static_cast<int32_t>(probe.target_data_rate.bps() *
                                          probe.target_duration.ms() / 8000);
#endif

  MS_DEBUG_DEV(
    "probe cluster created [id:%d, target data rate(bps):%lld, target probe count:%d, min_bytes:%zu]",
    probe.id, probe.target_data_rate.bps(), probe.target_probe_count, min_bytes);
}

}  // namespace

ProbeControllerConfig::ProbeControllerConfig(
    const WebRtcKeyValueConfig* key_value_config)
    : first_exponential_probe_scale("p1", 3.0),
      second_exponential_probe_scale("p2", 6.0),
      further_exponential_probe_scale("step_size", 2),
      further_probe_threshold("further_probe_threshold", 0.7),
      alr_probing_interval("alr_interval", TimeDelta::seconds(5)),
      alr_probe_scale("alr_scale", 2),
      first_allocation_probe_scale("alloc_p1", 1),
      second_allocation_probe_scale("alloc_p2", 2),
      allocation_allow_further_probing("alloc_probe_further", false) {
  ParseFieldTrial(
      {&first_exponential_probe_scale, &second_exponential_probe_scale,
       &further_exponential_probe_scale, &further_probe_threshold,
       &alr_probing_interval, &alr_probe_scale, &first_allocation_probe_scale,
       &second_allocation_probe_scale, &allocation_allow_further_probing},
      key_value_config->Lookup("WebRTC-Bwe-ProbingConfiguration"));

  // Specialized keys overriding subsets of WebRTC-Bwe-ProbingConfiguration
  ParseFieldTrial(
      {&first_exponential_probe_scale, &second_exponential_probe_scale},
      key_value_config->Lookup("WebRTC-Bwe-InitialProbing"));
  ParseFieldTrial({&further_exponential_probe_scale, &further_probe_threshold},
                  key_value_config->Lookup("WebRTC-Bwe-ExponentialProbing"));
  ParseFieldTrial({&alr_probing_interval, &alr_probe_scale},
                  key_value_config->Lookup("WebRTC-Bwe-AlrProbing"));
  ParseFieldTrial(
      {&first_allocation_probe_scale, &second_allocation_probe_scale,
       &allocation_allow_further_probing},
      key_value_config->Lookup("WebRTC-Bwe-AllocationProbing"));
}

ProbeControllerConfig::ProbeControllerConfig(const ProbeControllerConfig&) =
    default;
ProbeControllerConfig::~ProbeControllerConfig() = default;

ProbeController::ProbeController(const WebRtcKeyValueConfig* key_value_config)
    : enable_periodic_alr_probing_(false),
      in_rapid_recovery_experiment_(
          key_value_config->Lookup(kBweRapidRecoveryExperiment)
              .find("Enabled") == 0),
      limit_probes_with_allocateable_rate_(
          key_value_config->Lookup(kCappedProbingFieldTrialName)
              .find("Disabled") != 0),
      allocation_probing_only_in_alr_(
          key_value_config->Lookup(kAllocProbingOnlyInAlrFieldTrialName)
              .find("Enabled") == 0),
      config_(ProbeControllerConfig(key_value_config)) {
  Reset(0);
}

ProbeController::~ProbeController() {}

std::vector<ProbeClusterConfig> ProbeController::SetBitrates(
    int64_t min_bitrate_bps,
    int64_t start_bitrate_bps,
    int64_t max_bitrate_bps,
    int64_t at_time_ms) {
  if (start_bitrate_bps > 0) {
    start_bitrate_bps_ = start_bitrate_bps;
    estimated_bitrate_bps_ = start_bitrate_bps;
  } else if (start_bitrate_bps_ == 0) {
    start_bitrate_bps_ = min_bitrate_bps;
  }

  MS_DEBUG_DEV(
    "[old_max_bitrate_bps:%lld, max_bitrate_bps:%lld]",
    max_bitrate_bps_,
    max_bitrate_bps);

  // The reason we use the variable |old_max_bitrate_pbs| is because we
  // need to set |max_bitrate_bps_| before we call InitiateProbing.
  int64_t old_max_bitrate_bps = max_bitrate_bps_;
  max_bitrate_bps_ = max_bitrate_bps;

  switch (state_) {
    case State::kInit:
      if (network_available_)
        return InitiateExponentialProbing(at_time_ms);
      break;

    case State::kWaitingForProbingResult:
      break;

    case State::kProbingComplete:
      // If the new max bitrate is higher than both the old max bitrate and the
      // estimate then initiate probing.
      if (estimated_bitrate_bps_ != 0 &&
          old_max_bitrate_bps < max_bitrate_bps_ &&
          estimated_bitrate_bps_ < max_bitrate_bps_) {
        // The assumption is that if we jump more than 20% in the bandwidth
        // estimate or if the bandwidth estimate is within 90% of the new
        // max bitrate then the probing attempt was successful.
        mid_call_probing_succcess_threshold_ =
            std::min(estimated_bitrate_bps_ * 1.2, max_bitrate_bps_ * 0.9);
        mid_call_probing_waiting_for_result_ = true;
        mid_call_probing_bitrate_bps_ = max_bitrate_bps_;

        // RTC_HISTOGRAM_COUNTS_10000("WebRTC.BWE.MidCallProbing.Initiated",
                                   // max_bitrate_bps_ / 1000);

        return InitiateProbing(at_time_ms, {max_bitrate_bps_}, false);
      }
      break;
  }
  return std::vector<ProbeClusterConfig>();
}

std::vector<ProbeClusterConfig> ProbeController::OnMaxTotalAllocatedBitrate(
    int64_t max_total_allocated_bitrate,
    int64_t at_time_ms) {
  MS_DEBUG_DEV("[max_total_allocated_bitrate:%" PRIi64 "]", max_total_allocated_bitrate);

  const bool in_alr = alr_start_time_ms_.has_value();
  const bool allow_allocation_probe =
      allocation_probing_only_in_alr_ ? in_alr : true;

  if (state_ == State::kProbingComplete &&
      max_total_allocated_bitrate != max_total_allocated_bitrate_ &&
      estimated_bitrate_bps_ != 0 &&
      (max_bitrate_bps_ <= 0 || estimated_bitrate_bps_ < max_bitrate_bps_) &&
      estimated_bitrate_bps_ < max_total_allocated_bitrate &&
      allow_allocation_probe) {
    max_total_allocated_bitrate_ = max_total_allocated_bitrate;

    if (!config_.first_allocation_probe_scale)
      return std::vector<ProbeClusterConfig>();

    std::vector<int64_t> probes = {
        static_cast<int64_t>(config_.first_allocation_probe_scale.Value() *
                             max_total_allocated_bitrate)};
    if (config_.second_allocation_probe_scale) {
      probes.push_back(config_.second_allocation_probe_scale.Value() *
                       max_total_allocated_bitrate);
    }
    return InitiateProbing(at_time_ms, probes,
                           config_.allocation_allow_further_probing);
  }
  max_total_allocated_bitrate_ = max_total_allocated_bitrate;
  return std::vector<ProbeClusterConfig>();
}

std::vector<ProbeClusterConfig> ProbeController::OnNetworkAvailability(
    NetworkAvailability msg) {
  network_available_ = msg.network_available;

  if (!network_available_ && state_ == State::kWaitingForProbingResult) {
    state_ = State::kProbingComplete;
    min_bitrate_to_probe_further_bps_ = kExponentialProbingDisabled;
  }

  if (network_available_ && state_ == State::kInit && start_bitrate_bps_ > 0)
    return InitiateExponentialProbing(msg.at_time.ms());
  return std::vector<ProbeClusterConfig>();
}

std::vector<ProbeClusterConfig> ProbeController::InitiateExponentialProbing(
    int64_t at_time_ms) {
  //RTC_DCHECK(network_available_);
  //RTC_DCHECK(state_ == State::kInit);
  //RTC_DCHECK_GT(start_bitrate_bps_, 0);
  if (!network_available_) {
    MS_ERROR("network not available");
  }
  if (state_ != State::kInit) {
    MS_ERROR("state_ must be State::kInit");
  }
  if (start_bitrate_bps_ <= 0) {
    MS_ERROR("start_bitrate_bps_ must be > 0");
  }

  // When probing at 1.8 Mbps ( 6x 300), this represents a threshold of
  // 1.2 Mbps to continue probing.
  std::vector<int64_t> probes = {static_cast<int64_t>(
      config_.first_exponential_probe_scale * start_bitrate_bps_)};
  if (config_.second_exponential_probe_scale) {
    probes.push_back(config_.second_exponential_probe_scale.Value() *
                     start_bitrate_bps_);
  }
  return InitiateProbing(at_time_ms, probes, true);
}

std::vector<ProbeClusterConfig> ProbeController::SetEstimatedBitrate(
    int64_t bitrate_bps,
    int64_t at_time_ms) {
  if (mid_call_probing_waiting_for_result_ &&
      bitrate_bps >= mid_call_probing_succcess_threshold_) {
    // RTC_HISTOGRAM_COUNTS_10000("WebRTC.BWE.MidCallProbing.Success",
                               // mid_call_probing_bitrate_bps_ / 1000);
    // RTC_HISTOGRAM_COUNTS_10000("WebRTC.BWE.MidCallProbing.ProbedKbps",
                               // bitrate_bps / 1000);
    mid_call_probing_waiting_for_result_ = false;
  }
  std::vector<ProbeClusterConfig> pending_probes;
  if (state_ == State::kWaitingForProbingResult) {
    // Continue probing if probing results indicate channel has greater
    // capacity.
    // MS_DEBUG_DEV(
    //   "[measured bitrate:%" PRIi64 ", minimum to probe further:%" PRIi64 "]",
    //   bitrate_bps, min_bitrate_to_probe_further_bps_);

    if (min_bitrate_to_probe_further_bps_ != kExponentialProbingDisabled &&
        bitrate_bps > min_bitrate_to_probe_further_bps_) {
      pending_probes = InitiateProbing(
          at_time_ms,
          {static_cast<int64_t>(config_.further_exponential_probe_scale *
                                bitrate_bps)},
          true);
    }
  }

  if (bitrate_bps < kBitrateDropThreshold * estimated_bitrate_bps_) {
    time_of_last_large_drop_ms_ = at_time_ms;
    bitrate_before_last_large_drop_bps_ = estimated_bitrate_bps_;
  }

  estimated_bitrate_bps_ = bitrate_bps;
  return pending_probes;
}

void ProbeController::EnablePeriodicAlrProbing(bool enable) {
  enable_periodic_alr_probing_ = enable;
}

void ProbeController::SetAlrStartTimeMs(
    absl::optional<int64_t> alr_start_time_ms) {
  alr_start_time_ms_ = alr_start_time_ms;
}
void ProbeController::SetAlrEndedTimeMs(int64_t alr_end_time_ms) {
  alr_end_time_ms_.emplace(alr_end_time_ms);
}

std::vector<ProbeClusterConfig> ProbeController::RequestProbe(
    int64_t at_time_ms) {
  // Called once we have returned to normal state after a large drop in
  // estimated bandwidth. The current response is to initiate a single probe
  // session (if not already probing) at the previous bitrate.
  //
  // If the probe session fails, the assumption is that this drop was a
  // real one from a competing flow or a network change.
  bool in_alr = alr_start_time_ms_.has_value();
  bool alr_ended_recently =
      (alr_end_time_ms_.has_value() &&
       at_time_ms - alr_end_time_ms_.value() < kAlrEndedTimeoutMs);
  if (in_alr || alr_ended_recently || in_rapid_recovery_experiment_) {
    if (state_ == State::kProbingComplete) {
      uint32_t suggested_probe_bps =
          kProbeFractionAfterDrop * bitrate_before_last_large_drop_bps_;
      uint32_t min_expected_probe_result_bps =
          (1 - kProbeUncertainty) * suggested_probe_bps;
      int64_t time_since_drop_ms = at_time_ms - time_of_last_large_drop_ms_;
      int64_t time_since_probe_ms = at_time_ms - last_bwe_drop_probing_time_ms_;
      if (min_expected_probe_result_bps > estimated_bitrate_bps_ &&
          time_since_drop_ms < kBitrateDropTimeoutMs &&
          time_since_probe_ms > kMinTimeBetweenAlrProbesMs) {
        MS_WARN_TAG(bwe, "detected big bandwidth drop, start probing");
        // Track how often we probe in response to bandwidth drop in ALR.
        // RTC_HISTOGRAM_COUNTS_10000(
        //     "WebRTC.BWE.BweDropProbingIntervalInS",
        //     (at_time_ms - last_bwe_drop_probing_time_ms_) / 1000);
        last_bwe_drop_probing_time_ms_ = at_time_ms;
        return InitiateProbing(at_time_ms, {suggested_probe_bps}, false);
      }
    }
  }
  return std::vector<ProbeClusterConfig>();
}

void ProbeController::SetMaxBitrate(int64_t max_bitrate_bps) {
  MS_DEBUG_DEV("[max_bitrate_bps:%" PRIi64 "]", max_bitrate_bps);

  max_bitrate_bps_ = max_bitrate_bps;
}

void ProbeController::Reset(int64_t at_time_ms) {
  MS_DEBUG_DEV("resetted");

  network_available_ = true;
  state_ = State::kInit;
  min_bitrate_to_probe_further_bps_ = kExponentialProbingDisabled;
  time_last_probing_initiated_ms_ = 0;
  estimated_bitrate_bps_ = 0;
  start_bitrate_bps_ = 0;
  max_bitrate_bps_ = 0;
  int64_t now_ms = at_time_ms;
  last_bwe_drop_probing_time_ms_ = now_ms;
  alr_end_time_ms_.reset();
  mid_call_probing_waiting_for_result_ = false;
  time_of_last_large_drop_ms_ = now_ms;
  bitrate_before_last_large_drop_bps_ = 0;
  max_total_allocated_bitrate_ = 0;
}

std::vector<ProbeClusterConfig> ProbeController::Process(int64_t at_time_ms) {
  if (at_time_ms - time_last_probing_initiated_ms_ >
      kMaxWaitingTimeForProbingResultMs) {
    mid_call_probing_waiting_for_result_ = false;

    if (state_ == State::kWaitingForProbingResult) {
      MS_WARN_TAG(bwe, "kWaitingForProbingResult: timeout");
      state_ = State::kProbingComplete;
      min_bitrate_to_probe_further_bps_ = kExponentialProbingDisabled;
    }
  }

  if (enable_periodic_alr_probing_ && state_ == State::kProbingComplete) {
    // Probe bandwidth periodically when in ALR state.
    if (alr_start_time_ms_ && estimated_bitrate_bps_ > 0) {
      int64_t next_probe_time_ms =
          std::max(*alr_start_time_ms_, time_last_probing_initiated_ms_) +
          config_.alr_probing_interval->ms();
      if (at_time_ms >= next_probe_time_ms) {
        return InitiateProbing(at_time_ms,
                               {static_cast<int64_t>(estimated_bitrate_bps_ *
                                                     config_.alr_probe_scale)},
                               true);
      }
    }
  }
  return std::vector<ProbeClusterConfig>();
}

std::vector<ProbeClusterConfig> ProbeController::InitiateProbing(
    int64_t now_ms,
    std::vector<int64_t> bitrates_to_probe,
    bool probe_further) {
  int64_t max_probe_bitrate_bps =
      max_bitrate_bps_ > 0 ? max_bitrate_bps_ : kDefaultMaxProbingBitrateBps;

  MS_DEBUG_DEV(
    "[max_bitrate_bps_:%lld, max_probe_bitrate_bps:%" PRIi64 "]",
    max_bitrate_bps_,
    max_probe_bitrate_bps);

  if (limit_probes_with_allocateable_rate_ &&
      max_total_allocated_bitrate_ > 0) {
    // If a max allocated bitrate has been configured, allow probing up to 2x
    // that rate. This allows some overhead to account for bursty streams,
    // which otherwise would have to ramp up when the overshoot is already in
    // progress.
    // It also avoids minor quality reduction caused by probes often being
    // received at slightly less than the target probe bitrate.
    max_probe_bitrate_bps =
        std::min(max_probe_bitrate_bps, max_total_allocated_bitrate_ * 2);
  }

  std::vector<ProbeClusterConfig> pending_probes;
  for (int64_t bitrate : bitrates_to_probe) {
    //RTC_DCHECK_GT(bitrate, 0);

    if (bitrate > max_probe_bitrate_bps) {
      bitrate = max_probe_bitrate_bps;
      probe_further = false;
    }

    ProbeClusterConfig config;
    config.at_time = Timestamp::ms(now_ms);
    config.target_data_rate = DataRate::bps(rtc::dchecked_cast<int>(bitrate));
    config.target_duration = TimeDelta::ms(kMinProbeDurationMs);
    config.target_probe_count = kMinProbePacketsSent;
    config.id = next_probe_cluster_id_;
    next_probe_cluster_id_++;
    MaybeLogProbeClusterCreated(config);
    pending_probes.push_back(config);
  }
  time_last_probing_initiated_ms_ = now_ms;
  if (probe_further) {
    state_ = State::kWaitingForProbingResult;
    min_bitrate_to_probe_further_bps_ =
        (*(bitrates_to_probe.end() - 1)) * config_.further_probe_threshold;
  } else {
    state_ = State::kProbingComplete;
    min_bitrate_to_probe_further_bps_ = kExponentialProbingDisabled;
  }
  return pending_probes;
}

}  // namespace webrtc

repository: versatica/mediasoup

repo_name: versatica/mediasoup

gha_license_id: ISC

extension: cc


text:
@InProceedings{sznitman13,
  pdf = {http://jmlr.org/proceedings/papers/v28/sznitman13.pdf},
  title = {An Optimal Policy for Target Localization with Application to Electron Microscopy},
  author = {Sznitman, Raphael and Lucchi, Aurelien and Frazier, Peter and Jedynak, Bruno and Fua, Pascal},
  number = {1},
  section = {cycle-1},
  pages = {1-9},
  abstract = {This paper considers the task of finding a target location by making a limited number of sequential observations.  Each observation results from evaluating an imperfect classifier of a chosen cost and accuracy on an interval of chosen length and position.  Within a Bayesian framework, we study the problem of minimizing an objective that combines the entropy of the posterior distribution with the cost of the questions asked.  In this problem, we show that the one-step lookahead policy is Bayes-optimal for any arbitrary time horizon.  Moreover, this one-step lookahead policy is easy to compute and implement. We then use this policy in the context of localizing mitochondria in electron microscope images, and experimentally show that significant speed ups in acquisition can be gained, while maintaining near equal image quality at target locations, when compared to current policies.},
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_language: TeX

extension: bib


text:
package config

type AppConfig struct {
	HostSuffix string              `envconfig:"HOST_SUFFIX" default:".localhost:3002"`
	IDPattern  string              `envconfig:"ID_PATTERN" default:"^[a-z0-9][a-z0-9-]{2,30}[a-z0-9]$"`
	Kubernetes AppKubernetesConfig `envconfig:"KUBERNETES"`

	// BuiltinResourceDirectory sets the directory for built-in resource files
	BuiltinResourceDirectory string `envconfig:"BUILTIN_RESOURCE_DIRECTORY" default:"resources/authgear"`
	// CustomResourceDirectory sets the directory for customized resource files
	CustomResourceDirectory string `envconfig:"CUSTOM_RESOURCE_DIRECTORY"`
	// MaxOwnedApps controls how many apps a user can own.
	MaxOwnedApps int `envconfig:"MAX_OWNED_APPS" default:"-1"`
	// DefaultPlan defines the default plan for apps during app creation
	DefaultPlan string `envconfig:"DEFAULT_PLAN"`
}

type AppKubernetesConfig struct {
	IngressTemplateFile string `envconfig:"INGRESS_TEMPLATE_FILE"`
}

repository: authgear/authgear-server

repo_name: authgear/authgear-server

branch_name: refs/heads/main


text:
@article{Watt-Meyer2021-ij,
 abstract = {Abstract Due to limited resolution and inaccurate physical
parameterizations, weather and climate models consistently
develop biases compared to the observed atmosphere. Using the
FV3GFS model at coarse resolution, we propose a method of
machine learning corrective tendencies from a hindcast
simulation nudged toward observational analysis. We show that a
random forest can predict the nudging tendencies from this
hindcast simulation with moderate skill using only the model
state as input. This random forest is then coupled to FV3GFS,
adding corrective tendencies of temperature, specific humidity
and horizontal winds at each timestep. The coupled model shows
no signs of instability in year-long simulations and has
significant reductions in short-term forecast error for 500 hPa
height, surface pressure and near-surface temperature.
Furthermore, the root mean square error of the annual-mean
precipitation is reduced by about 20%. Biases of other
variables remain similar or in some cases, like
upper-atmospheric temperature, increase in the year-long
simulations.},
 author = {Watt-Meyer, Oliver and Brenowitz, Noah D and Clark, Spencer K
and Henn, Brian and Kwa, Anna and McGibbon, Jeremy and Perkins,
W Andre and Bretherton, Christopher S},
 copyright = {http://creativecommons.org/licenses/by-nc/4.0/},
 doi = {10.1029/2021gl092555},
 issn = {0094-8276, 1944-8007},
 journal = {Geophys. Res. Lett.},
 language = {en},
 month = {August},
 number = {15},
 publisher = {American Geophysical Union (AGU)},
 title = {Correcting weather and climate models by machine learning nudged
historical simulations},
 volume = {48},
 year = {2021}
}


text:
# bs cmake option

set(BS_BASE_DIR ${CMAKE_SOURCE_DIR}/bank-system)

add_executable(bank-system)

target_sources(bank-system PRIVATE
               ${BS_BASE_DIR}/bs-main.cpp
               ${BS_BASE_DIR}/bank.cpp
               ${BS_BASE_DIR}/bs-cli.cpp)

target_compile_options(bank-system PRIVATE
                       -Wall -Wextra)

target_include_directories(bank-system PRIVATE ${BS_BASE_DIR})

extension: cmake


text:
@book{alap2008,
 address = {Córdoba},
 author = {{Meichtry, Norma}, {Pellegrino, Adela} and {Bologna, Eduardo}},
 isbn = {978-85-62016-00-4},
 pages = {328},
 title = {MIGRANTES LATINOAMERICANOS: El estado de las investigaciones en la región},
 url = {http://www.alapop.org/alap/index.php?option=com_content&view=article&id=250&Itemid=437},
 year = {2008}
}

repository: ebologna/academic-kickstart

repo_name: ebologna/academic-kickstart


text:
package bootnode

import (
	"bytes"
	"context"
	"crypto/tls"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net"
	"net/http"
	"time"

	"github.com/lianxiangcloud/linkchain/libs/log"
)

const (
	defaultDialTimeout = 10 * time.Second
	keepAliveInterval  = 30 * time.Second
)

var (
	gTransport = &http.Transport{
		TLSClientConfig: &tls.Config{
			InsecureSkipVerify: false,
		},
		ResponseHeaderTimeout: 2 * time.Minute,
		DisableCompression:    true,
		DisableKeepAlives:     false,
		IdleConnTimeout:       2 * time.Minute,
		MaxIdleConns:          4,
		MaxIdleConnsPerHost:   2,
		DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
			dialer := &net.Dialer{Timeout: defaultDialTimeout, KeepAlive: keepAliveInterval}
			return dialer.DialContext(ctx, network, addr)
		},
	}
	gHTTPClient = &http.Client{
		Transport: gTransport,
	}
)

func HttpPost(url string, request interface{}) ([]byte, error) {
	client := gHTTPClient
	data, err := json.Marshal(request)
	if err != nil {
		return nil, err
	}
	req, err := http.NewRequest("POST", url, bytes.NewReader(data))
	if err != nil {
		return nil, fmt.Errorf("NewRequest: err=%v", err)
	}
	req.Header.Add("Content-Type", "application/json")
	req = req.WithContext(context.Background())
	resp, err := client.Do(req)
	if err != nil {
		return nil, fmt.Errorf("client.Do: %v", err)
	}
	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, fmt.Errorf("read response body: %v", err)
	}
	log.Trace("HTTPPost", "url", url, "req", string(data), "resp", string(body))
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("StatusCode %d, Resp %s", resp.StatusCode, string(body))
	}
	return body, nil
}

func HttpPost2(url string, request interface{}) ([]byte, error) {
	client := gHTTPClient
	data, err := json.Marshal(request)
	if err != nil {
		return nil, err
	}
	req, err := http.NewRequest("POST", url, bytes.NewReader(data))
	if err != nil {
		return nil, fmt.Errorf("NewRequest: err=%v", err)
	}
	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("nc", "IN")
	req = req.WithContext(context.Background())
	resp, err := client.Do(req)
	if err != nil {
		return nil, fmt.Errorf("client.Do: %v", err)
	}
	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, fmt.Errorf("read response body: %v", err)
	}
	log.Trace("HTTPPost", "url", url, "req", string(data), "resp", string(body))
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("StatusCode %d, Resp %s", resp.StatusCode, string(body))
	}
	return body, nil
}

func HttpPostWithHeader(url string, data []byte, header map[string]string) ([]byte, error) {
	client := gHTTPClient
	req, err := http.NewRequest("POST", url, bytes.NewReader(data))
	if err != nil {
		return nil, fmt.Errorf("NewRequest: err=%v", err)
	}

	req.Header.Add("Content-Type", "application/json")
	for k, v := range header {
		req.Header.Add(k, v)
	}
	req = req.WithContext(context.Background())
	resp, err := client.Do(req)
	if err != nil {
		return nil, fmt.Errorf("client.Do: %v", err)
	}
	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, fmt.Errorf("read response body: %v", err)
	}
	log.Trace("HTTPPost", "url", url, "req", string(data), "resp", string(body))
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("StatusCode %d, Resp %s", resp.StatusCode, string(body))
	}
	return body, nil
}

func HttpGet(addr string) ([]byte, error) {
	resp, err := gHTTPClient.Get(addr)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	data, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, fmt.Errorf("read response body: %v", err)
	}
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("StatusCode %d, Resp %s", resp.StatusCode, string(data))
	}
	return data, nil
}

repository: lianxiangcloud/linkchain

repo_name: lianxiangcloud/linkchain


text:
package mutator

import (
	"context"
	"fmt"
	"strings"

	"github.com/giantswarm/apiextensions/v3/pkg/label"
	"github.com/giantswarm/microerror"
	apierrors "k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	capz "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3"
	"sigs.k8s.io/controller-runtime/pkg/client"

	"github.com/giantswarm/azure-admission-controller/internal/errors"
)

func EnsureReleaseVersionLabel(ctx context.Context, ctrlClient client.Client, meta metav1.Object) (*PatchOperation, error) {
	if meta.GetLabels()[label.ReleaseVersion] == "" {
		release, err := getReleaseLabelValueFromAzureCluster(ctx, ctrlClient, meta)
		if err != nil {
			return nil, microerror.Mask(err)
		}
		if release == "" {
			return nil, microerror.Maskf(releaseLabelNotFoundError, "AzureCluster did not have the %#q label set. Can't continue.", label.ReleaseVersion)
		}

		return PatchAdd(fmt.Sprintf("/metadata/labels/%s", escapeJSONPatchString(label.ReleaseVersion)), release), nil
	}

	return nil, nil
}

func getReleaseLabelValueFromAzureCluster(ctx context.Context, ctrlClient client.Client, meta metav1.Object) (string, error) {
	return getLabelValueFromAzureCluster(ctx, ctrlClient, meta, label.ReleaseVersion)
}

func getLabelValueFromAzureCluster(ctx context.Context, ctrlClient client.Client, meta metav1.Object, labelName string) (string, error) {
	clusterID := meta.GetLabels()[label.Cluster]
	if clusterID == "" {
		return "", microerror.Maskf(clusterLabelNotFoundError, "Object has no %#q label, can't detect cluster ID.", label.Cluster)
	}

	// Retrieve the `AzureCluster` CR related to this object.
	cluster := &capz.AzureCluster{}
	{
		err := ctrlClient.Get(ctx, client.ObjectKey{Name: clusterID, Namespace: meta.GetNamespace()}, cluster)
		if apierrors.IsNotFound(err) {
			return "", microerror.Maskf(errors.NotFoundError, "Looking for AzureCluster named %#q but it was not found. Can't continue.", clusterID)
		} else if err != nil {
			return "", microerror.Mask(err)
		}
	}

	// Extract desired label from Cluster.
	release := cluster.GetLabels()[labelName]

	return release, nil
}

// Ensure the needed escapes are in place. See https://tools.ietf.org/html/rfc6901#section-3 .
func escapeJSONPatchString(input string) string {
	input = strings.ReplaceAll(input, "~", "~0")
	input = strings.ReplaceAll(input, "/", "~1")

	return input
}


text:
@article{Caron2016,
 abstract = {Protists, which are single-celled eukaryotes, critically influence the ecology and chemistry of marine ecosystems, but genome-based studies of these organisms have lagged behind those of other microorganisms. However, recent transcriptomic studies of cultured species, complemented by meta-omics analyses of natural communities, have increased the amount of genetic information available for poorly represented branches on the tree of eukaryotic life. This information is providing insights into the adaptations and interactions between protists and other microorganisms and macroorganisms, but many of the genes sequenced show no similarity to sequences currently available in public databases. A better understanding of these newly discovered genes will lead to a deeper appreciation of the functional diversity and metabolic processes in the ocean. In this Review, we summarize recent developments in our understanding of the ecology, physiology and evolution of protists, derived from transcriptomic studies of cultured strains and natural communities, and discuss how these novel large-scale genetic datasets will be used in the future.},
 author = {Caron, David A. and Alexander, Harriet and Allen, Andrew E. and Archibald, John M. and Armbrust, E. Virginia and Bachy, Charles and Bell, Callum J. and Bharti, Arvind and Dyhrman, Sonya T. and Guida, Stephanie M. and Heidelberg, Karla B. and Kaye, Jonathan Z. and Metzner, Julia and Smith, Sarah R. and Worden, Alexandra Z.},
 doi = {10.1038/nrmicro.2016.160},
 journal = {Nature Reviews Microbiology},
 mendeley-groups = {Oped_Reanalysis},
 month = {nov},
 number = {1},
 pages = {6--20},
 publisher = {Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.},
 title = {Probing the evolution, ecology and physiology of marine protists using transcriptomics},
 volume = {15},
 year = {2016}
}

repository: AlexanderLabWHOI/academic-kickstart

repo_name: AlexanderLabWHOI/academic-kickstart


text:
# Copyright (c) 2012-2013 LG Electronics, Inc.

SUMMARY = "Open webOS edition of the open-source glibcurl library"
SECTION = "libs"
LICENSE = "MIT BSD"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
                    file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \
"

DEPENDS = "glib-2.0 curl"

WEBOS_VERSION = "0.7.3-5_02973b88e5305769c281f728d9bebfff0c6f0da7"

inherit webos_upstream_from_repo
inherit webos_public_repo
inherit webos_enhanced_submissions
inherit webos_cmake
inherit webos_library

SRC_URI = "${OPENWEBOS_GIT_REPO_COMPLETE}"
S = "${WORKDIR}/git"

repository: skrishnakar/meta-webos-ports

repo_name: skrishnakar/meta-webos-ports


text:
package main

import (
	"os"

	"github.com/Checkmarx/kics/internal/console"
	"github.com/Checkmarx/kics/internal/console/helpers"
	"github.com/Checkmarx/kics/internal/constants"
)

func main() { // nolint:funlen,gocyclo
	if err := console.Execute(); err != nil {
		if helpers.ShowError("errors") {
			os.Exit(constants.EngineErrorCode)
		}
	}
}

repository: nvuillam/kics

repo_name: nvuillam/kics