text:
@article{koletsi_are_2014,
	title = {Are sample sizes clear and justified in {RCTs} published in dental journals?},
	volume = {9},
	issn = {1932-6203},
	doi = {10.1371/journal.pone.0085949},
	abstract = {Sample size calculations are advocated by the {CONSORT} group to justify sample sizes in randomized controlled trials ({RCTs}). The aim of this study was primarily to evaluate the reporting of sample size calculations, to establish the accuracy of these calculations in dental {RCTs} and to explore potential predictors associated with adequate reporting. Electronic searching was undertaken in eight leading specific and general dental journals. Replication of sample size calculations was undertaken where possible. Assumed variances or odds for control and intervention groups were also compared against those observed. The relationship between parameters including journal type, number of authors, trial design, involvement of methodologist, single-/multi-center study and region and year of publication, and the accuracy of sample size reporting was assessed using univariable and multivariable logistic regression. Of 413 {RCTs} identified, sufficient information to allow replication of sample size calculations was provided in only 121 studies (29.3\%). Recalculations demonstrated an overall median overestimation of sample size of 15.2\% after provisions for losses to follow-up. There was evidence that journal, methodologist involvement ({OR} = 1.97, {CI}: 1.10, 3.53), multi-center settings ({OR} = 1.86, {CI}: 1.01, 3.43) and time since publication ({OR} = 1.24, {CI}: 1.12, 1.38) were significant predictors of adequate description of sample size assumptions. Among journals {JCP} had the highest odds of adequately reporting sufficient data to permit sample size recalculation, followed by {AJODO} and {JDR}, with 61\% ({OR} = 0.39, {CI}: 0.19, 0.80) and 66\% ({OR} = 0.34, {CI}: 0.15, 0.75) lower odds, respectively. Both assumed variances and odds were found to underestimate the observed values. Presentation of sample size calculations in the dental literature is suboptimal; incorrect assumptions may have a bearing on the power of {RCTs}.},
	pages = {e85949},
	number = {1},
	journaltitle = {{PloS} one},
	shortjournal = {{PLoS} {ONE}},
	author = {Koletsi, Despina and Fleming, Padhraig S and Seehra, Jadbinder and Bagos, Pantelis G and Pandis, Nikolaos},
	date = {2014},
	pmid = {24465806},
	pmcid = {PMC3897561}
}

@article{friede_sample_2006,
	title = {Sample size recalculation in internal pilot study designs: a review},
	volume = {48},
	issn = {0323-3847},
	shorttitle = {Sample size recalculation in internal pilot study designs},
	abstract = {The adequacy of sample size is important to clinical trials. In the planning phase of a trial, however, the investigators are often quite uncertain about the sizes of parameters which are needed for sample size calculations. A solution to this problem is mid-course recalculation of the sample size during the ongoing trial. In internal pilot study designs, nuisance parameters are estimated on the basis of interim data and the sample size is adjusted accordingly. This review attempts to give an overview on the available methods. It is written not only for biometricians who are already familar with the the topic and wish to update their knowledge but also for users new to the subject.},
	pages = {537--555},
	number = {4},
	journaltitle = {Biometrical journal. Biometrische Zeitschrift},
	shortjournal = {Biom J},
	author = {Friede, Tim and Kieser, Meinhard},
	date = {2006-08},
	pmid = {16972704}
}

@online{noauthor_meet_nodate,
	title = {Meet John Gawalt, Director of the National Center for Science and Engineering Statistics {\textbar} Amstat News},
	url = {http://magazine.amstat.org/blog/2014/05/01/meet-john-gawalt/},
	abstract = {Amstat News invited John Gawalt, director of the National Science Foundation’s National Center for Science and Engineering Statistics, to respond to a few},
	urldate = {2014-05-05}
}

@online{noauthor_allanalytics_nodate,
	title = {{AllAnalytics} - Beth Schultz - 8 Tips for Doing Data Visualization Right},
	url = {http://www.allanalytics.com/author.asp?_mc=sem%5Fotb%5Fedt%5Fallanppcm&section_id=1411&doc_id=261787&image_number=1},
	urldate = {2014-05-03}
}

@online{29_data_nodate,
	title = {Data Doesn't Speak for Itself},
	url = {http://blogs.hbr.org/2014/04/data-doesnt-speak-for-itself/},
	abstract = {You need to help different audiences understand it.},
	titleaddon = {Harvard Business Review},
	author = {29, Thomas C. Redman {\textbar} 12:00 PM April and {2014}},
	urldate = {2014-05-01}
}

@video{ted-ed_not_2014,
	title = {Not all scientific studies are created equal - David H. Schwartz},
	url = {http://www.youtube.com/watch?v=GUpd2HJHUt8&feature=youtube_gdata_player},
	abstract = {View full lesson: Not all scientific studies are created equal - David H. Schwartz

Every day, we are bombarded by attention grabbing headlines that promise miracle cures to all of our ailments -- often backed up by a "scientific study." But what are these studies, and how do we know if they are reliable? David H. Schwartz dissects two types of studies that scientists use, illuminating why you should always approach the claims with a critical eye.

Lesson by David H. Schwartz, animation by Augenblick Studios.},
	editora = {{TED-Ed}},
	editoratype = {collaborator},
	urldate = {2014-05-01},
	date = {2014-04-28}
}

@online{noauthor_ramblemuse_nodate,
	title = {Ramblemuse Touch Points » Science and Energy},
	url = {http://www.ramblemuse.com/rmtp/2014/04/27/science-and-energy/},
	urldate = {2014-04-28}
}

@article{harford_random_nodate,
	title = {The random risks of randomised trials},
	issn = {0307-1766},
	url = {http://www.ft.com/intl/cms/s/2/59bb202c-ca7b-11e3-8a31-00144feabdc0.html#axzz30BOFBYb7},
	abstract = {The backlash against randomised trials in policy has begun. Randomised controlled trials ({RCTs}) are widely accepted as the foundation for evidence-based medicine. Yet a decade ago, they were extremely rare in other contexts such as economics,},
	journaltitle = {Financial Times},
	author = {Harford, Tim},
	urldate = {2014-04-28}
}

@article{kauermann_note_2001,
	title = {A Note on the Efficiency of Sandwich Covariance Matrix Estimation},
	volume = {96},
	rights = {Copyright © 2001 American Statistical Association},
	issn = {0162-1459},
	url = {http://www.jstor.org/stable/3085907},
	abstract = {The sandwich estimator, also known as robust covariance matrix estimator, heteroscedasticity-consistent covariance matrix estimate, or empirical covariance matrix estimator, has achieved increasing use in the econometric literature as well as with the growing popularity of generalized estimating equations. Its virtue is that it provides consistent estimates of the covariance matrix for parameter estimates even when the fitted parametric model fails to hold or is not even specified. Surprisingly though, there has been little discussion of properties of the sandwich method other than consistency. We investigate the sandwich estimator in quasi-likelihood models asymptotically, and in the linear case analytically. We show that under certain circumstances when the quasi-likelihood model is correct, the sandwich estimate is often far more variable than the usual parametric variance estimate. The increased variance is a fixed feature of the method and the price that one pays to obtain consistency even when the parametric model fails or when there is heteroscedasticity. We show that the additional variability directly affects the coverage probability of confidence intervals constructed from sandwich variance estimates. In fact, the use of sandwich variance estimates combined with t-distribution quantiles gives confidence intervals with coverage probability falling below the nominal value. We propose an adjustment to compensate for this fact.},
	pages = {1387--1396},
	number = {456},
	journaltitle = {Journal of the American Statistical Association},
	shortjournal = {Journal of the American Statistical Association},
	author = {Kauermann, Göran and Carroll, Raymond J.},
	urldate = {2014-04-25},
	date = {2001-12-01}
}

@article{diaz_random-effects_2013,
	title = {Random-effects linear modeling and sample size tables for two special crossover designs of average bioequivalence studies: the four-period, two-sequence, two-formulation and six-period, three-sequence, three-formulation designs},
	volume = {52},
	issn = {0312-5963},
	doi = {10.1007/s40262-013-0103-4},
	shorttitle = {Random-effects linear modeling and sample size tables for two special crossover designs of average bioequivalence studies},
	abstract = {Due to concern and debate in the epilepsy medical community and to the current interest of the {US} Food and Drug Administration ({FDA}) in revising approaches to the approval of generic drugs, the {FDA} is currently supporting ongoing bioequivalence studies of antiepileptic drugs, the {EQUIGEN} studies. During the design of these crossover studies, the researchers could not find commercial or non-commercial statistical software that quickly allowed computation of sample sizes for their designs, particularly software implementing the {FDA} requirement of using random-effects linear models for the analyses of bioequivalence studies. This article presents tables for sample-size evaluations of average bioequivalence studies based on the two crossover designs used in the {EQUIGEN} studies: the four-period, two-sequence, two-formulation design, and the six-period, three-sequence, three-formulation design. Sample-size computations assume that random-effects linear models are used in bioequivalence analyses with crossover designs. Random-effects linear models have been traditionally viewed by many pharmacologists and clinical researchers as just mathematical devices to analyze repeated-measures data. In contrast, a modern view of these models attributes an important mathematical role in theoretical formulations in personalized medicine to them, because these models not only have parameters that represent average patients, but also have parameters that represent individual patients. Moreover, the notation and language of random-effects linear models have evolved over the years. Thus, another goal of this article is to provide a presentation of the statistical modeling of data from bioequivalence studies that highlights the modern view of these models, with special emphasis on power analyses and sample-size computations.},
	pages = {1033--1043},
	number = {12},
	journaltitle = {Clinical pharmacokinetics},
	shortjournal = {Clin Pharmacokinet},
	author = {Diaz, Francisco J and Berg, Michel J and Krebill, Ron and Welty, Timothy and Gidal, Barry E and Alloway, Rita and Privitera, Michael},
	date = {2013-12},
	pmid = {24085600}
}

@online{noauthor_datasets_nodate,
	title = {Datasets},
	url = {https://data.medicare.gov/data/hospital-compare},
	titleaddon = {Data.Medicare.Gov},
	urldate = {2014-04-24}
}

@online{noauthor_hcahps_nodate,
	title = {{HCAHPS} - Hospital Survey},
	url = {http://www.hcahpsonline.org/home.aspx},
	urldate = {2014-04-24}
}

@online{noauthor_can_nodate,
	title = {Can You Say That in English? Explaining {UX} Research to Clients},
	url = {http://alistapart.com/article/can-you-say-that-in-english-explaining-ux-research-to-clients},
	shorttitle = {Can You Say That in English?},
	abstract = {It's hard for clients to understand the true value of user experience research. As much as you'd like to tell your clients to go read The Elements of User Experience and call you back when they're done, that won't cut it in a professional services environment.  David Sherwin creates a cheat sheet to help you pitch {UX} research using plain, client-friendly language that focuses on the business value of each exercise.},
	urldate = {2014-04-23}
}

@article{simonsohn_p-curve:_2014,
	title = {P-curve: A key to the file-drawer.},
	volume = {143},
	issn = {1939-2222, 0096-3445},
	url = {http://doi.apa.org/getdoi.cfm?doi=10.1037/a0033242},
	doi = {10.1037/a0033242},
	shorttitle = {P-curve},
	pages = {534--547},
	number = {2},
	journaltitle = {Journal of Experimental Psychology: General},
	author = {Simonsohn, Uri and Nelson, Leif D. and Simmons, Joseph P.},
	urldate = {2014-04-21},
	date = {2014},
	langid = {english}
}

@article{nuzzo_scientific_2014,
	title = {Scientific method: Statistical errors},
	volume = {506},
	issn = {0028-0836, 1476-4687},
	url = {http://www.nature.com/doifinder/10.1038/506150a},
	doi = {10.1038/506150a},
	shorttitle = {Scientific method},
	pages = {150--152},
	number = {7487},
	journaltitle = {Nature},
	author = {Nuzzo, Regina},
	urldate = {2014-04-21},
	date = {2014-02-12}
}

@online{24_how_nodate,
	title = {How to Tell a Story with Data},
	url = {http://blogs.hbr.org/2013/04/how-to-tell-a-story-with-data/},
	abstract = {Five rules for doing it right.},
	titleaddon = {Harvard Business Review},
	author = {24, Jim Stikeleather {\textbar} 11:00 AM April and {2013}},
	urldate = {2014-04-21}
}

@online{16_quick_nodate,
	title = {The Quick and Dirty on Data Visualization},
	url = {http://blogs.hbr.org/2014/04/the-quick-and-dirty-on-data-visualization/},
	abstract = {These five questions will help give your numbers meaning.},
	titleaddon = {Harvard Business Review},
	author = {16, Nancy Duarte {\textbar} 11:00 AM April and {2014}},
	urldate = {2014-04-21}
}

@online{8_why_nodate,
	title = {Why Your Analytics are Failing You},
	url = {http://blogs.hbr.org/2014/04/why-your-analytics-are-failing-you/},
	abstract = {Companies with mediocre returns use big data and analytics for decision support; successful firms use them to support behavior change.},
	titleaddon = {Harvard Business Review},
	author = {8, Michael Schrage {\textbar} 10:00 AM April and {2014}},
	urldate = {2014-04-21}
}

@video{alfrednyny_what_2008,
	title = {What is epidemiology},
	url = {http://www.youtube.com/watch?v=jCK2mflwESM&feature=youtube_gdata_player},
	abstract = {Joke told during an Epi 1 lecture at Columbia university in September 2001},
	editora = {{alfrednyny}},
	editoratype = {collaborator},
	urldate = {2014-04-21},
	date = {2008-12-28}
}

@online{noauthor_data_nodate,
	title = {Data Science with R: Learning programming in R by doing - one tutorial at a time},
	url = {http://tutorialr.com/},
	urldate = {2014-04-12}
}

@online{noauthor_five_nodate,
	title = {Five Reasons to Teach Elementary Statistics With R: \#1 - A Statistics Blog},
	url = {http://statistics.rainandrhino.org/blog/2014/04/05/tigerstatsintro/},
	urldate = {2014-04-11}
}

@online{noauthor_thumbnail_nodate,
	title = {A Thumbnail History of Ensemble Methods},
	url = {http://blog.revolutionanalytics.com/2014/03/a-thumbnail-history-of-ensemble-methods.html},
	urldate = {2014-04-10}
}

@online{noauthor_rapidly_nodate,
	title = {Rapidly search all R programming language documentation{\textbar} Rdocumentation},
	url = {http://www.rdocumentation.org/},
	urldate = {2014-04-10}
}

@online{interest_updated_nodate,
	title = {Updated version of the Rough Guide to Spotting Bad Science, with a few suggested edits: http://wp.me/p4aPLT-ap  pic.twitter.com/{QrbsiTgehC}},
	url = {https://twitter.com/compoundchem/status/451784718619406336/photo/1},
	shorttitle = {Updated version of the Rough Guide to Spotting Bad Science, with a few suggested edits},
	titleaddon = {@compoundchem},
	type = {microblog},
	author = {Interest, Compound},
	urldate = {2014-04-08}
}

@online{rockey_more_nodate,
	title = {More on Big Data Training for the Scientific Workforce {\textbar} {NIH} Extramural Nexus},
	url = {http://nexus.od.nih.gov/all/2014/03/18/more-on-big-data-training-for-the-scientific-workforce/},
	author = {Rockey, Sally},
	urldate = {2014-04-08}
}

@article{broglio_predicting_2014,
	title = {Predicting clinical trial results based on announcements of interim analyses},
	volume = {15},
	rights = {2014 Broglio et al.; licensee {BioMed} Central Ltd.},
	issn = {1745-6215},
	url = {http://www.trialsjournal.com/content/15/1/73/abstract},
	doi = {10.1186/1745-6215-15-73},
	abstract = {Announcements of interim analyses of a clinical trial convey information about the results beyond the trial’s Data Safety Monitoring Board ({DSMB}). The amount of information conveyed may be minimal, but the fact that none of the trial’s stopping boundaries has been crossed implies that the experimental therapy is neither extremely effective nor hopeless. Predicting success of the ongoing trial is of interest to the trial’s sponsor, the medical community, pharmaceutical companies, and investors. We determine the probability of trial success by quantifying only the publicly available information from interim analyses of an ongoing trial. We illustrate our method in the context of the National Surgical Adjuvant Breast and Bowel ({NSABP}) trial, C-08.
{PMID}: 24607270},
	pages = {73},
	number = {1},
	journaltitle = {Trials},
	author = {Broglio, Kristine R. and Stivers, David N. and Berry, Donald A.},
	urldate = {2014-04-06},
	date = {2014-03-07},
	langid = {english},
	pmid = {24607270},
	keywords = {Bevacizumab, Colon cancer, {DSMB}, Interim analyses, Operational bias, Predictive probabilities, Prior distribution}
}

@online{29_nate_nodate,
	title = {Nate Silver's famous run of successful predictions came to an halt},
	url = {http://www.datasciencecentral.com/profiles/blogs/nate-silver-s-famous-run-of-successful-predictions-came-to-an},
	abstract = {This is a classic. A guy who correctly predicted election results in all 50 states, and many other correct predictions, now fails. Nate Silver First, Nate is…},
	author = {29, Mirko Krivanek on March and Blog, 2014 at 6:30am View},
	urldate = {2014-04-06}
}

@online{noauthor_data_nodate-1,
	title = {Data Visualiztion - Pie Chart or Bar Chart?},
	url = {http://ucanalytics.com/blogs/data-visualiztion-pie-chart-or-bar-chart/},
	abstract = {The topic we are going to discuss today will fit into visual analytics and data visualization – 101. Though on the surface this is really simple, over the years I have seen many young and sometimes seasoned analysts make this mistake. Hence I feel it is apt for us to discussion the topic about {appropriateRead} More...},
	titleaddon = {{YOU} {CANalytics}},
	urldate = {2014-04-06},
	keywords = {Business Analytics, Data Visualization, Roopam Upadhyay}
}

@online{k_sexiest_nodate,
	title = {The Sexiest Job of the 21st Century is Tedious, and that Needs to Change},
	url = {http://blogs.hbr.org/2014/04/the-sexiest-job-of-the-21st-century-is-tedious-and-that-needs-to-change/},
	abstract = {We're wasting the skills of our most talented data scientists.},
	titleaddon = {Harvard Business Review},
	author = {K, Sean and 1, el {\textbar} 12:00 PM April and {2014}},
	urldate = {2014-04-06},
	keywords = {{HBO}, {HBP}, {HBR}, {HBSP}, Harvard Business School Publishing, accounting, business management articles resources, business resources books articles case studies, communication, entrepreneurship, execution, finance, innovation, international global business strategy, leadership, managing people, operations, organizational development, technology}
}

@online{wed_big_nodate,
	title = {Big Data has big problems},
	url = {http://boingboing.net/2014/04/02/big-data-has-big-problems.html},
	abstract = {Writing in the Financial Times, Tim Harford (The Undercover Economist Strikes Back, Adapt, etc) offers a nuanced, but ultimately damning critique of Big Data and its promises.},
	titleaddon = {Boing Boing},
	author = {Wed, Cory Doctorow at 10:00 pm and 2, Apr and {2014}},
	urldate = {2014-04-06}
}

@article{harford_big_2014,
	title = {Big data: are we making a big mistake?},
	issn = {0307-1766},
	url = {http://www.ft.com/cms/s/2/21a6e7d8-b479-11e3-a09a-00144feabdc0.html#axzz2y3AcSaII},
	shorttitle = {Big data},
	abstract = {Five years ago, a team of researchers from Google announced a remarkable achievement in one of the world’s top scientific journals, Nature. Without needing the results of a single medical check-up, they were nevertheless able to track the spread of},
	journaltitle = {Financial Times},
	author = {Harford, Tim},
	urldate = {2014-04-06},
	date = {2014-03-28}
}

@article{ohagan_outlier_1979,
	title = {On Outlier Rejection Phenomena in Bayes Inference},
	volume = {41},
	rights = {Copyright © 1979 Royal Statistical Society},
	issn = {0035-9246},
	url = {http://www.jstor.org/stable/2985064},
	abstract = {Inference is considered for a location parameter given a random sample. Outliers are not explicitly modelled, but rejection of extreme observations occurs naturally in any Bayesian analysis of data from distributions with suitably thick tails. For other distributions outlier rejection behaviour can never occur. These phenomena motivate new definitions of outlier-proneness and outlier-resistance. The definitions and methodology are Bayesian but the conclusions also have meaning for non-Bayesians because they are proved for arbitrary prior distributions. Thus, for example, the t distribution is said to be outlier-prone because it is shown that any admissible inference procedure applied to a t sample will effectively ignore extreme outlying observations regardless of prior information. On the other hand, the normal distribution, for example, is said to be outlier-resistant because it never allows outlier rejection, regardless of prior information.},
	pages = {358--367},
	number = {3},
	journaltitle = {Journal of the Royal Statistical Society. Series B (Methodological)},
	shortjournal = {Journal of the Royal Statistical Society. Series B (Methodological)},
	author = {O'Hagan, A.},
	urldate = {2014-04-03},
	date = {1979-01-01}
}

@article{baeten_anti-interleukin-17a_2013,
	title = {Anti-interleukin-17A monoclonal antibody secukinumab in treatment of ankylosing spondylitis: a randomised, double-blind, placebo-controlled trial},
	volume = {382},
	issn = {0140-6736},
	url = {http://www.sciencedirect.com/science/article/pii/S0140673613611344},
	doi = {10.1016/S0140-6736(13)61134-4},
	shorttitle = {Anti-interleukin-17A monoclonal antibody secukinumab in treatment of ankylosing spondylitis},
	abstract = {Ankylosing spondylitis is a chronic immune-mediated inflammatory disease characterised by spinal inflammation, progressive spinal rigidity, and peripheral arthritis. Interleukin 17 ({IL}-17) is thought to be a key inflammatory cytokine in the development of ankylosing spondylitis, the prototypical form of spondyloarthritis. We assessed the efficacy and safety of the anti-{IL}-17A monoclonal antibody secukinumab in treating patients with active ankylosing spondylitis.
We did a randomised double-blind proof-of-concept study at eight centres in Europe (four in Germany, two in the Netherlands, and two in the {UK}). Patients aged 18–65 years were randomly assigned (in a 4:1 ratio) to either intravenous secukinumab (2×10 mg/kg) or placebo, given 3 weeks apart. Randomisation was done with a computer-generated block randomisation list without a stratification process. The primary efficacy endpoint was the percentage of patients with a 20\% response according to the Assessment of {SpondyloArthritis} international Society criteria for improvement ({ASAS}20) at week 6 (Bayesian analysis). Safety was assessed up to week 28. This study is registered with {ClinicalTrials}.gov, number {NCT}00809159.
37 patients with moderate-to-severe ankylosing spondylitis were screened, and 30 were randomly assigned to receive either intravenous secukinumab (n=24) or placebo (n=6). The final efficacy analysis included 23 patients receiving secukinumab and six patients receiving placebo, and the safety analysis included all 30 patients. At week 6, {ASAS}20 response estimates were 59\% on secukinumab versus 24\% on placebo (99·8\% probability that secukinumab is superior to placebo). One serious adverse event (subcutaneous abscess caused by Staphylococcus aureus) occurred in the secukinumab-treated group.
Secukinumab rapidly reduced clinical or biological signs of active ankylosing spondylitis and was well tolerated. It is the first targeted therapy that we know of that is an alternative to tumour necrosis factor inhibition to reach its primary endpoint in a phase 2 trial.
Novartis.},
	pages = {1705--1713},
	number = {9906},
	journaltitle = {The Lancet},
	shortjournal = {The Lancet},
	author = {Baeten, Dominique and Baraliakos, Xenofon and Braun, Jürgen and Sieper, Joachim and Emery, Paul and van der Heijde, Désirée and {McInnes}, Iain and van Laar, Jacob M and Landewé, Robert and Wordsworth, Paul and Wollenhaupt, Jürgen and Kellner, Herbert and Paramarta, Jacqueline and Wei, Jiawei and Brachat, Arndt and Bek, Stephan and Laurent, Didier and Li, Yali and Wang, Ying A and Bertolino, Arthur P and Gsteiger, Sandro and Wright, Andrew M and Hueber, Wolfgang},
	urldate = {2014-04-03},
	date = {2013-11-29}
}

@article{morita_determining_2008,
	title = {Determining the Effective Sample Size of a Parametric Prior},
	volume = {64},
	issn = {0006-341X},
	url = {http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3081791/},
	doi = {10.1111/j.1541-0420.2007.00888.x},
	abstract = {We present a definition for the effective sample size of a parametric prior distribution in a Bayesian model, and propose methods for computing the effective sample size in a variety of settings. Our approach first constructs a prior chosen to be vague in a suitable sense, and updates this prior to obtain a sequence of posteriors corresponding to each of a range of sample sizes. We then compute a distance between each posterior and the parametric prior, defined in terms of the curvature of the logarithm of each distribution, and the posterior minimizing the distance defines the effective sample size of the prior. For cases where the distance cannot be computed analytically, we provide a numerical approximation based on Monte Carlo simulation. We provide general guidelines for application, illustrate the method in several standard cases where the answer seems obvious, and then apply it to some nonstandard settings.},
	pages = {595--602},
	number = {2},
	journaltitle = {Biometrics},
	shortjournal = {Biometrics},
	author = {Morita, Satoshi and Thall, Peter F. and Muller, Peter},
	urldate = {2014-04-03},
	date = {2008-06},
	pmid = {17764481},
	pmcid = {PMC3081791}
}

@online{noauthor_cochrane_nodate,
	title = {Cochrane Handbook for Systematic Reviews of Interventions},
	url = {http://handbook.cochrane.org/},
	urldate = {2014-04-03}
}

@online{noauthor_testing_nodate,
	title = {Testing Treatments interactive},
	url = {http://www.testingtreatments.org/},
	urldate = {2014-03-27}
}

@online{noauthor_james_nodate,
	title = {The James Lind Alliance, patients and clinicians tackling treatment uncertainties together.},
	url = {http://www.lindalliance.org/index.asp},
	urldate = {2014-03-27}
}

@online{noauthor_thelancet.com_nodate,
	title = {{TheLancet}.com},
	url = {http://www.thelancet.com/series/research},
	abstract = {Excerpt: "The Lancet presents a Series of five papers about research. In the first report Iain Chalmers et al discuss how decisions about which research to fund should be based on issues relevant to users of research. Next, John Ioannidis et al consider improvements in the appropriateness of research design, methods, and analysis. Rustam Al-Shahi Salman et al then turn to issues of efficient research regulation and management. Next, An-Wen Chan et al examine the role of fully accessible research information. Finally, Paul Glasziou et al discuss the importance of unbiased and usable research reports. These papers set out some of the most pressing issues, recommend how to increase value and reduce waste in biomedical research, and propose metrics for stakeholders to monitor the implementation of these recommendations. "},
	urldate = {2014-03-27}
}

@article{djulbegovic_b_efficacy_2011,
	title = {From efficacy to effectiveness in the face of uncertainty: Indication creep and prevention creep},
	volume = {305},
	issn = {0098-7484},
	url = {http://dx.doi.org/10.1001/jama.2011.650},
	doi = {10.1001/jama.2011.650},
	shorttitle = {From efficacy to effectiveness in the face of uncertainty},
	abstract = {Therapeutic and prevention clinical research is typically performed to address questions of efficacy (“Can intervention work in the ideal study setting?”), effectiveness (“Does it work, generalized to real-world settings and applied to individual patients?”), and cost-effectiveness (“Is it worth it and should it be paid for?”). To date, both public and private research enterprise has predominantly funded efficacy research. Comparative effectiveness research holds promise to generate much-needed effectiveness data. However, given the large number of important clinical questions, it will not be possible to provide reliable empirical efficacy, effectiveness, and cost-effectiveness data for every question to help guide individual decision-making.1 Instead, practitioners will continue to rely on inductive reasoning to apply the results of the study (“group averages” from an efficacy trial) to individual patients who often differ in important ways from patients enrolled in the efficacy trial (eg, these patients may be older, have comorbid conditions, or might be using multiple medications).},
	pages = {2005--2006},
	number = {19},
	journaltitle = {{JAMA}},
	shortjournal = {{JAMA}},
	author = {{Djulbegovic B} and {Paul A}},
	urldate = {2014-03-27},
	date = {2011-05-18}
}

@online{noauthor_covariate_nodate,
	title = {Covariate Selection - Developing a Protocol for Observational Comparative Effectiveness Research: A User's Guide - {NCBI} Bookshelf},
	url = {http://www.ncbi.nlm.nih.gov/books/NBK126194/},
	urldate = {2014-03-26}
}

@online{noauthor_tetrachoric_nodate,
	title = {The Tetrachoric and Polychoric Correlation Coefficients},
	url = {http://www.john-uebersax.com/stat/tetra.htm},
	urldate = {2014-03-26}
}

@article{collins_policy:_2014,
	title = {Policy: {NIH} plans to enhance reproducibility},
	volume = {505},
	issn = {0028-0836, 1476-4687},
	url = {http://www.nature.com/news/policy-nih-plans-to-enhance-reproducibility-1.14586},
	doi = {10.1038/505612a},
	shorttitle = {Policy},
	pages = {612--613},
	number = {7485},
	journaltitle = {Nature},
	author = {Collins, Francis S. and Tabak, Lawrence A.},
	urldate = {2014-03-11},
	date = {2014-01-27}
}

@online{noauthor_why_nodate,
	title = {Why aren’t all of our graphs interactive?},
	url = {http://www.biostat.wisc.edu/~kbroman/talks/InteractiveGraphs/},
	urldate = {2014-02-26}
}

@online{noauthor_small_nodate,
	title = {Small Studies Can Lead To Big Results},
	url = {http://ebmteacher.com/2013/05/06/small-studies-can-lead-to-big-results/},
	abstract = {An interesting article was published in the British Medical Journal in April. Researchers looked at the influence of sample size on treatment effect estimates. The bottom line is that they found th...},
	titleaddon = {ebmteacher},
	urldate = {2014-02-21}
}

@online{noauthor_should_nodate,
	title = {Should Traditional Intention To Treat Analysis Be Abandoned?},
	url = {http://ebmteacher.com/2013/09/05/should-traditional-intention-to-treat-analysis-be-abandoned/},
	abstract = {A commenter on my video about intention to treat analysis  asked about my thoughts on a twist on intention to treat analysis in which an adjustment is made (via an instrumental variable) for "treat...},
	titleaddon = {ebmteacher},
	urldate = {2014-02-21}
}

@online{noauthor_why_nodate-1,
	title = {Why Coincidences, Miracles And Rare Events Happen Every Day},
	url = {http://www.forbes.com/sites/johnnavin/2014/02/18/why-coincidences-miracles-and-rare-events-happen-every-day/},
	abstract = {A probability expert explains the highly improbable.},
	titleaddon = {Forbes},
	urldate = {2014-02-20}
}

@article{van_ginkel_analysis_2014,
	title = {Analysis of Variance of Multiply Imputed Data},
	volume = {49},
	issn = {0027-3171, 1532-7906},
	url = {http://www.tandfonline.com/doi/pdf/10.1080/00273171.2013.855890#preview},
	doi = {10.1080/00273171.2013.855890},
	pages = {78--91},
	number = {1},
	journaltitle = {Multivariate Behavioral Research},
	author = {van Ginkel, Joost R. and Kroonenberg, Pieter M.},
	urldate = {2014-02-19},
	date = {2014-01}
}

@online{noauthor_statisticians_nodate,
	title = {'Statisticians need to have a seat at decision-making tables': John Pullinger on his upcoming years as {RSS} President - Statistics Views},
	url = {http://www.statisticsviews.com/details/feature/4364371/Statisticians-need-to-have-a-seat-at-decision-making-tables-John-Pullinger-on-hi.html},
	urldate = {2014-02-19}
}

@online{noauthor_five_nodate-1,
	title = {Five Best Time-Tracking Applications},
	url = {http://lifehacker.com/5362829/five-best-time+tracking-applications},
	abstract = {Where does the time go? Whether you need to know for billing purposes or just want a better idea of how your work day is split up, you can always answer that question with a good time-tracking application.},
	titleaddon = {Lifehacker},
	urldate = {2014-02-13},
	keywords = {Feature, Hive Five, Lifehacker, Productivity, Software, Time, Time Tracker, Time management, Top, Tracking}
}

@article{hsieh_simple_1998,
	title = {A simple method of sample size calculation for linear and logistic regression},
	volume = {17},
	rights = {Copyright © 1998 John Wiley \& Sons, Ltd.},
	issn = {1097-0258},
	url = {http://onlinelibrary.wiley.com/doi/10.1002/(SICI)1097-0258(19980730)17:14<1623::AID-SIM871>3.0.CO;2-S/abstract},
	doi = {10.1002/(SICI)1097-0258(19980730)17:14<1623::AID-SIM871>3.0.CO;2-S},
	abstract = {A sample size calculation for logistic regression involves complicated formulae. This paper suggests use of sample size formulae for comparing means or for comparing proportions in order to calculate the required sample size for a simple logistic regression model. One can then adjust the required sample size for a multiple logistic regression model by a variance inflation factor. This method requires no assumption of low response probability in the logistic model as in a previous publication. One can similarly calculate the sample size for linear regression models. This paper also compares the accuracy of some existing sample-size software for logistic regression with computer power simulations. An example illustrates the methods. © 1998 John Wiley \& Sons, Ltd.},
	pages = {1623--1634},
	number = {14},
	journaltitle = {Statistics in Medicine},
	author = {Hsieh, F. Y. and Bloch, Daniel A. and Larsen, Michael D.},
	urldate = {2014-02-06},
	date = {1998},
	langid = {english}
}

@article{sackett_why_2001,
	title = {Why randomized controlled trials fail but needn't: 2. Failure to employ physiological statistics, or the only formula a clinician-trialist is ever likely to need (or understand!)},
	volume = {165},
	issn = {0820-3946, 1488-2329},
	url = {http://www.cmaj.ca/content/165/9/1226},
	shorttitle = {Why randomized controlled trials fail but needn't},
	pages = {1226--1237},
	number = {9},
	journaltitle = {Canadian Medical Association Journal},
	shortjournal = {{CMAJ}},
	author = {Sackett, David L.},
	urldate = {2014-02-06},
	date = {2001-10-30},
	langid = {english},
	pmid = {11706914}
}

@article{detsky_when_1985,
	title = {When was a "negative" clinical trial big enough? How many patients you needed depends on what you found},
	volume = {145},
	issn = {0003-9926},
	shorttitle = {When was a "negative" clinical trial big enough?},
	abstract = {"Negative" clinical trials that conclude that neither of the treatments is superior are often criticized for having enrolled too few patients. These criticisms usually are based on formal sample size calculations that compute the numbers of patients required prospectively, as if the trial had not yet been carried out. We suggest that this "prospective" sample size calculation is incorrect, for once the trial is over we have "hard" data from which to estimate the actual size of the treatment effect. We can either generate confidence limits around the observed treatment effect or retrospectively compare it with the effect hypothesized before the trial. If the observed effect is small, the risk of the false-negative conclusion (and the sample size required to draw negative or equivalency conclusions) is often much less than that generated by the "prospective" calculation.},
	pages = {709--712},
	number = {4},
	journaltitle = {Archives of internal medicine},
	shortjournal = {Arch. Intern. Med.},
	author = {Detsky, A S and Sackett, D L},
	date = {1985-04},
	pmid = {3985731},
	keywords = {Clinical Trials as Topic, Humans, Prospective Studies, Random allocation, Research Design, Retrospective Studies, Statistics as Topic}
}

@article{roche_troubleshooting_2014,
	title = {Troubleshooting Public Data Archiving: Suggestions to Increase Participation},
	volume = {12},
	url = {http://dx.doi.org/10.1371/journal.pbio.1001779},
	doi = {10.1371/journal.pbio.1001779},
	shorttitle = {Troubleshooting Public Data Archiving},
	abstract = {{\textless}p{\textgreater}Public data archiving has many benefits for society, but some scientists are reluctant to share their data. This Perspective offers some practical solutions to reduce costs and increase benefits for individual researchers.{\textless}/p{\textgreater}{\textless}/sec{\textgreater}},
	pages = {e1001779},
	number = {1},
	journaltitle = {{PLoS} Biol},
	shortjournal = {{PLoS} Biol},
	author = {Roche, Dominique G. and Lanfear, Robert and Binning, Sandra A. and Haff, Tonya M. and Schwanz, Lisa E. and Cain, Kristal E. and Kokko, Hanna and Jennions, Michael D. and Kruuk, Loeske E. B.},
	urldate = {2014-02-03},
	date = {2014-01-28}
}

repository: pmean/build-website

repo_name: pmean/build-website


text:
package main

import (
	"fmt"
	"strings"

	"golang.org/x/net/html"
)

func ScanNode(node *html.Node) *html.Node {
	if node.Data == "blockroot" {
		return node
	}
	for _node := node.FirstChild; _node != nil; _node = _node.NextSibling {
		if _n := ScanNode(_node); _n != nil {
			return _n
		}
	}
	return nil
}

func main() {
	doc, _ := html.Parse(strings.NewReader(htm))
	node := ScanNode(doc)
	fmt.Println(node.Data, node.Attr)
}

const htm = `
<asdf />
<a>
<blockroot name="root" kind="basic" pivot="0,0,0,0" size="0,0,0,0" pos="0,0,0,0" rotation="0,0,0,0">
	<block name="body">
	</block>
</blockroot>
</a>
`

license: MIT

repository: gitbufenshuo/gopen

license_type: permissive

repo_name: gitbufenshuo/gopen

branch_name: refs/heads/master

extension: go


text:
// Code generated by mockery v2.16.0. DO NOT EDIT.

package arimocks

import mock "github.com/stretchr/testify/mock"

// TextMessage is an autogenerated mock type for the TextMessage type
type TextMessage struct {
	mock.Mock
}

// Send provides a mock function with given fields: from, tech, resource, body, vars
func (_m *TextMessage) Send(from string, tech string, resource string, body string, vars map[string]string) error {
	ret := _m.Called(from, tech, resource, body, vars)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string, string, string, map[string]string) error); ok {
		r0 = rf(from, tech, resource, body, vars)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// SendByURI provides a mock function with given fields: from, to, body, vars
func (_m *TextMessage) SendByURI(from string, to string, body string, vars map[string]string) error {
	ret := _m.Called(from, to, body, vars)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string, string, map[string]string) error); ok {
		r0 = rf(from, to, body, vars)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

type mockConstructorTestingTNewTextMessage interface {
	mock.TestingT
	Cleanup(func())
}

// NewTextMessage creates a new instance of TextMessage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewTextMessage(t mockConstructorTestingTNewTextMessage) *TextMessage {
	mock := &TextMessage{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}

repository: machworklab/ari

repo_name: machworklab/ari


text:
@article{Liang2012a,
 abstract = {Barium titanate (BTO) thin films were deposited on polycrystalline Ni foils by using the polymer assisted deposition (PAD) technique. The growth conditions including ambient and annealing temperatures were carefully optimized based on thermal dynamic analysis to control the oxidation processing and interdiffusion. Crystal structures, surface morphologies, and dielectric performance were examined and compared for BTO thin films annealed under different temperatures. Correlations between the fabrication conditions, microstructures, and dielectric properties were discussed. BTO thin films fabricated under the optimized conditions show good crystalline structure and promising dielectric properties with ∈ r ∼ 400 and tan $δ$ \textless 0.025 at 100 kHz. The data demonstrate that BTO films grown on polycrystalline Ni substrates by PAD are promising in device applications. © 2012 Chinese Physical Society and IOP Publishing Ltd.},
 author = {Liang, Wei Zheng and Ji, Yan Da and Nan, Tian Xiang and Huang, Jiang and Zeng, Hui Zhong and Du, Hui and Chen, Chong Lin and Lin, Yuan},
 doi = {10.1088/1674-1056/21/6/067701},
 issn = {16741056},
 journal = {Chinese Phys. B},
 keywords = {barium titanate,dielectric properties,nickel foils,polymer assisted deposition,thermodynamics,thin films},
 number = {6},
 title = {Optimized growth and dielectric properties of barium titanate thin films on polycrystalline Ni foils},
 volume = {21},
 year = {2012}
}

gha_license_id: MIT

extension: bib


text:
@inproceedings{szpak2015robustproblem,
 abstract = {The estimation of multiple homographies between two piecewise planar views of a rigid scene is often assumed to be a solved problem. We show that contrary to popular opinion various crucial aspects of the task have not been adequately emphasised. We are motivated by a growing body of literature in robust multi-structure estimation that purports to solve the multi-homography estimation prob- lem but in fact does not. We demonstrate that the estima- tion of multiple homographies is an ill-solved problem by deriving new constraints that a set of mutually compatible homographies must satisfy, and by showing that homogra- phies estimated with prevailing methods fail to satisfy the requisite constraints on real-world data. We also explain why incompatible homographies imply inconsistent epipo- lar geometries. The arguments and experiments presented in this paper signal the need for a new generation of robust multi-structure estimation methods that have the capacity to enforce constraints on projective entities such as homog- raphy matrices.},
 author = {Szpak, Z and Chojnacki, W and Van Den Hengel, A},
 booktitle = {Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition},
 conference = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
 doi = {10.1109/CVPR.2015.7298825},
 finishday = {12},
 finishmonth = {Jun},
 finishyear = {2015},
 isbn = {9781467369640},
 issn = {1063-6919},
 language = {en},
 organization = {Boston, MA},
 pages = {2132--2141},
 publicationstatus = {published},
 publisher = {IEEE},
 series = {IEEE Conference on Computer Vision and Pattern Recognition},
 startday = {7},
 startmonth = {Jun},
 startyear = {2015},
 title = {Robust multiple homography estimation: an ill-solved problem},
 url = {http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000387959202017&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=1f051b2c0ced71d786748f61000f9895},
 volume = {07-12-June-2015},
 year = {2015}
}

repository: zygmuntszpak/academic-website

repo_name: zygmuntszpak/academic-website


text:
require recipes-graphics/images/core-image-weston.bb

SUMMARY = "A very basic urho3d image"

# Setting this one, but this will have a fixed once among all machines
SPLASH = "psplash-raspberrypi"

IMAGE_INSTALL += "urho3d"

extension: bb


text:
DESCRIPTION = "This Log::Any adapter uses Lib::Log4cplus for logging."

SECTION = "libs"
LICENSE = "Artisticv1 | GPLv1+"
PR = "r0"

MAINTAINER=	"Poky <poky@yoctoproject.org>"
HOMEPAGE=	"https://metacpan.org/release/Log-Any-Adapter-Log4cplus"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0;md5=e9e36a9de734199567a4d769498f743d"

SRC_URI = "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/Log-Any-Adapter-Log4cplus-0.001.tar.gz"

SRC_URI[md5sum] = "000e343bf065960e6abfcae237ff00ca"
SRC_URI[sha256sum] = "5d8e7776cc7931fa9fe0bb1f825feed44911ac3492e31908b657d681336324d2"
RDEPENDS_${PN} += "lib-log4cplus-perl"
RDEPENDS_${PN} += "log-any-perl"

S = "${WORKDIR}/Log-Any-Adapter-Log4cplus-${PV}"

inherit cpan

do_compile() {
	export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
	cpan_do_compile
}

BBCLASSEXTEND = "native"

repository: CELLINKAB/meta-cpan

repo_name: CELLINKAB/meta-cpan


text:
@InProceedings{ramaswamy15,
  supplementary = {Supplementary:ramaswamy15-supp.pdf},
  title = {Convex Calibrated Surrogates for Hierarchical Classification},
  author = {Harish Ramaswamy and Ambuj Tewari and Shivani Agarwal},
  pages = {1852-1860},
  abstract = {Hierarchical classification problems are multiclass supervised learning problems with a pre-defined hierarchy over the set of class labels. In this work, we study the consistency of hierarchical classification algorithms with respect to a natural loss, namely the tree distance metric on the hierarchy tree of class labels, via the usage of calibrated surrogates. We first show that the Bayes optimal classifier for this loss classifies an instance according to the deepest node in the hierarchy such that the total conditional probability of the subtree rooted at the node is greater than $\frac{1}{2}$. We exploit this insight to develop new consistent algorithm for hierarchical classification, that makes use of an algorithm known to be consistent for the ``multiclass classification with reject option (MCRO)'' problem as a sub-routine. Our experiments on a number of benchmark datasets show that the resulting algorithm, which we term OvA-Cascade, gives improved performance over other state-of-the-art hierarchical classification algorithms.},
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_language: TeX


text:
package main

import (
	"log"
	"os"
	"strconv"
	"time"

	"github.com/appleboy/easyssh-proxy"
	"github.com/joho/godotenv"
	"github.com/urfave/cli/v2"
)

// Version set at compile-time
var (
	Version string
)

func main() {
	// Load env-file if it exists first
	if filename, found := os.LookupEnv("PLUGIN_ENV_FILE"); found {
		_ = godotenv.Load(filename)
	}

	app := cli.NewApp()
	app.Name = "Drone SCP"
	app.Usage = "Copy files and artifacts via SSH."
	app.Copyright = "Copyright (c) " + strconv.Itoa(time.Now().Year()) + " Bo-Yi Wu"
	app.Version = Version
	app.Authors = []*cli.Author{
		{
			Name:  "Bo-Yi Wu",
			Email: "appleboy.tw@gmail.com",
		},
	}
	app.Action = run
	app.Version = Version
	app.Flags = []cli.Flag{
		&cli.StringSliceFlag{
			Name:     "host",
			Aliases:  []string{"H"},
			Usage:    "connect to host",
			EnvVars:  []string{"PLUGIN_HOST", "SSH_HOST", "INPUT_HOST"},
			FilePath: ".host",
		},
		&cli.IntFlag{
			Name:    "port",
			Aliases: []string{"p"},
			Usage:   "connect to port",
			EnvVars: []string{"PLUGIN_PORT", "SSH_PORT", "INPUT_PORT"},
			Value:   22,
		},
		&cli.StringFlag{
			Name:    "username",
			Aliases: []string{"user", "u"},
			Usage:   "connect as user",
			EnvVars: []string{"PLUGIN_USERNAME", "PLUGIN_USER", "SSH_USERNAME", "INPUT_USERNAME"},
			Value:   "root",
		},
		&cli.StringFlag{
			Name:    "password",
			Aliases: []string{"P"},
			Usage:   "user password",
			EnvVars: []string{"PLUGIN_PASSWORD", "SSH_PASSWORD", "INPUT_PASSWORD"},
		},
		&cli.DurationFlag{
			Name:    "timeout",
			Usage:   "connection timeout",
			EnvVars: []string{"PLUGIN_TIMEOUT", "SSH_TIMEOUT", "INPUT_TIMEOUT"},
			Value:   30 * time.Second,
		},
		&cli.StringFlag{
			Name:    "ssh-key",
			Usage:   "private ssh key",
			EnvVars: []string{"PLUGIN_SSH_KEY", "PLUGIN_KEY", "SSH_KEY", "INPUT_KEY"},
		},
		&cli.StringFlag{
			Name:    "ssh-passphrase",
			Usage:   "The purpose of the passphrase is usually to encrypt the private key.",
			EnvVars: []string{"PLUGIN_SSH_PASSPHRASE", "PLUGIN_PASSPHRASE", "SSH_PASSPHRASE", "INPUT_PASSPHRASE"},
		},
		&cli.StringFlag{
			Name:    "key-path",
			Aliases: []string{"i"},
			Usage:   "ssh private key path",
			EnvVars: []string{"PLUGIN_KEY_PATH", "SSH_KEY_PATH", "INPUT_KEY_PATH"},
		},
		&cli.StringSliceFlag{
			Name:    "ciphers",
			Usage:   "The allowed cipher algorithms. If unspecified then a sensible",
			EnvVars: []string{"PLUGIN_CIPHERS", "SSH_CIPHERS", "INPUT_CIPHERS"},
		},
		&cli.BoolFlag{
			Name:    "useInsecureCipher",
			Usage:   "include more ciphers with use_insecure_cipher",
			EnvVars: []string{"PLUGIN_USE_INSECURE_CIPHER", "SSH_USE_INSECURE_CIPHER", "INPUT_USE_INSECURE_CIPHER"},
		},
		&cli.StringFlag{
			Name:    "fingerprint",
			Usage:   "fingerprint SHA256 of the host public key, default is to skip verification",
			EnvVars: []string{"PLUGIN_FINGERPRINT", "SSH_FINGERPRINT", "INPUT_FINGERPRINT"},
		},
		&cli.DurationFlag{
			Name:    "command.timeout",
			Usage:   "command timeout",
			EnvVars: []string{"PLUGIN_COMMAND_TIMEOUT", "SSH_COMMAND_TIMEOUT", "INPUT_COMMAND_TIMEOUT"},
			Value:   10 * time.Minute,
		},
		&cli.StringSliceFlag{
			Name:    "target",
			Aliases: []string{"t"},
			Usage:   "Target path on the server",
			EnvVars: []string{"PLUGIN_TARGET", "SSH_TARGET", "INPUT_TARGET"},
		},
		&cli.StringSliceFlag{
			Name:    "source",
			Aliases: []string{"s"},
			Usage:   "scp file list",
			EnvVars: []string{"PLUGIN_SOURCE", "SCP_SOURCE", "INPUT_SOURCE"},
		},
		&cli.BoolFlag{
			Name:    "rm",
			Aliases: []string{"r"},
			Usage:   "remove target folder before upload data",
			EnvVars: []string{"PLUGIN_RM", "SCP_RM", "INPUT_RM"},
		},
		&cli.StringFlag{
			Name:    "proxy.host",
			Usage:   "connect to host of proxy",
			EnvVars: []string{"PLUGIN_PROXY_HOST", "PROXY_SSH_HOST", "INPUT_PROXY_HOST"},
		},
		&cli.StringFlag{
			Name:    "proxy.port",
			Usage:   "connect to port of proxy",
			EnvVars: []string{"PLUGIN_PROXY_PORT", "PROXY_SSH_PORT", "INPUT_PROXY_PORT"},
			Value:   "22",
		},
		&cli.StringFlag{
			Name:    "proxy.username",
			Usage:   "connect as user of proxy",
			EnvVars: []string{"PLUGIN_PROXY_USERNAME", "PLUGIN_PROXY_USER", "PROXY_SSH_USERNAME", "INPUT_PROXY_USERNAME"},
			Value:   "root",
		},
		&cli.StringFlag{
			Name:    "proxy.password",
			Usage:   "user password of proxy",
			EnvVars: []string{"PLUGIN_PROXY_PASSWORD", "PROXY_SSH_PASSWORD", "INPUT_PROXY_PASSWORD"},
		},
		&cli.StringFlag{
			Name:    "proxy.ssh-key",
			Usage:   "private ssh key of proxy",
			EnvVars: []string{"PLUGIN_PROXY_SSH_KEY", "PLUGIN_PROXY_KEY", "PROXY_SSH_KEY", "INPUT_PROXY_KEY"},
		},
		&cli.StringFlag{
			Name:    "proxy.ssh-passphrase",
			Usage:   "The purpose of the passphrase is usually to encrypt the private key.",
			EnvVars: []string{"PLUGIN_PROXY_SSH_PASSPHRASE", "PLUGIN_PROXY_PASSPHRASE", "PROXY_SSH_PASSPHRASE", "INPUT_PROXY_PASSPHRASE"},
		},
		&cli.StringFlag{
			Name:    "proxy.key-path",
			Usage:   "ssh private key path of proxy",
			EnvVars: []string{"PLUGIN_PROXY_KEY_PATH", "PROXY_SSH_KEY_PATH", "INPUT_PROXY_KEY_PATH"},
		},
		&cli.DurationFlag{
			Name:    "proxy.timeout",
			Usage:   "proxy connection timeout",
			EnvVars: []string{"PLUGIN_PROXY_TIMEOUT", "PROXY_SSH_TIMEOUT", "INPUT_PROXY_TIMEOUT"},
		},
		&cli.StringSliceFlag{
			Name:    "proxy.ciphers",
			Usage:   "The allowed cipher algorithms. If unspecified then a sensible",
			EnvVars: []string{"PLUGIN_PROXY_CIPHERS", "PROXY_SSH_CIPHERS", "INPUT_PROXY_CIPHERS"},
		},
		&cli.BoolFlag{
			Name:    "proxy.useInsecureCipher",
			Usage:   "include more ciphers with use_insecure_cipher",
			EnvVars: []string{"PLUGIN_PROXY_USE_INSECURE_CIPHER", "PROXY_SSH_USE_INSECURE_CIPHER", "INPUT_PROXY_USE_INSECURE_CIPHER"},
		},
		&cli.StringFlag{
			Name:    "proxy.fingerprint",
			Usage:   "fingerprint SHA256 of the host public key, default is to skip verification",
			EnvVars: []string{"PLUGIN_PROXY_FINGERPRINT", "PROXY_SSH_FINGERPRINT", "PROXY_FINGERPRINT", "INPUT_PROXY_FINGERPRINT"},
		},
		&cli.IntFlag{
			Name:    "strip.components",
			Usage:   "Remove the specified number of leading path elements.",
			EnvVars: []string{"PLUGIN_STRIP_COMPONENTS", "TAR_STRIP_COMPONENTS", "INPUT_STRIP_COMPONENTS"},
		},
		&cli.StringFlag{
			Name:    "tar.exec",
			Usage:   "Alternative `tar` executable to on the dest host",
			EnvVars: []string{"PLUGIN_TAR_EXEC", "SSH_TAR_EXEC", "INPUT_TAR_EXEC"},
			Value:   "tar",
		},
		&cli.StringFlag{
			Name:    "tar.tmp-path",
			Usage:   "Temporary path for tar file on the dest host",
			EnvVars: []string{"PLUGIN_TAR_TMP_PATH", "SSH_TAR_TMP_PATH", "INPUT_TAR_TMP_PATH"},
		},
		&cli.BoolFlag{
			Name:    "debug",
			Usage:   "remove target folder before upload data",
			EnvVars: []string{"PLUGIN_DEBUG", "INPUT_DEBUG"},
		},
		&cli.BoolFlag{
			Name:    "overwrite",
			Usage:   "use --overwrite flag with tar",
			EnvVars: []string{"PLUGIN_OVERWRITE", "INPUT_OVERWRITE"},
		},
		&cli.BoolFlag{
			Name:    "unlink.first",
			Usage:   "use --unlink-first flag with tar",
			EnvVars: []string{"PLUGIN_UNLINK_FIRST", "INPUT_UNLINK_FIRST"},
		},
		&cli.BoolFlag{
			Name:    "tar.dereference",
			Usage:   "use --dereference flag with tar",
			EnvVars: []string{"PLUGIN_TAR_DEREFERENCE", "INPUT_TAR_DEREFERENCE"},
		},
	}

	// Override a template
	cli.AppHelpTemplate = `
________                                         ____________________________
\______ \_______  ____   ____   ____            /   _____/\_   ___ \______   \
 |    |  \_  __ \/  _ \ /    \_/ __ \   ______  \_____  \ /    \  \/|     ___/
 |    |   \  | \(  <_> )   |  \  ___/  /_____/  /        \\     \___|    |
/_______  /__|   \____/|___|  /\___  >         /_______  / \______  /____|
        \/                  \/     \/                  \/         \/
                                                            version: {{.Version}}
NAME:
   {{.Name}} - {{.Usage}}

USAGE:
   {{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
   {{if len .Authors}}
AUTHOR:
   {{range .Authors}}{{ . }}{{end}}
   {{end}}{{if .Commands}}
COMMANDS:
{{range .Commands}}{{if not .HideHelp}}   {{join .Names ", "}}{{ "\t"}}{{.Usage}}{{ "\n" }}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
GLOBAL OPTIONS:
   {{range .VisibleFlags}}{{.}}
   {{end}}{{end}}{{if .Copyright }}
COPYRIGHT:
   {{.Copyright}}
   {{end}}{{if .Version}}
VERSION:
   {{.Version}}
   {{end}}
REPOSITORY:
    Github: https://github.com/appleboy/drone-scp
`

	if err := app.Run(os.Args); err != nil {
		log.Fatal(err)
	}
}

func run(c *cli.Context) error {
	plugin := Plugin{
		Config: Config{
			Host:              c.StringSlice("host"),
			Port:              c.String("port"),
			Username:          c.String("username"),
			Password:          c.String("password"),
			Passphrase:        c.String("ssh-passphrase"),
			Fingerprint:       c.String("fingerprint"),
			Timeout:           c.Duration("timeout"),
			CommandTimeout:    c.Duration("command.timeout"),
			Key:               c.String("ssh-key"),
			KeyPath:           c.String("key-path"),
			Target:            c.StringSlice("target"),
			Source:            c.StringSlice("source"),
			Remove:            c.Bool("rm"),
			Debug:             c.Bool("debug"),
			StripComponents:   c.Int("strip.components"),
			TarExec:           c.String("tar.exec"),
			TarTmpPath:        c.String("tar.tmp-path"),
			Overwrite:         c.Bool("overwrite"),
			UnlinkFirst:       c.Bool("unlink.first"),
			Ciphers:           c.StringSlice("ciphers"),
			UseInsecureCipher: c.Bool("useInsecureCipher"),
			TarDereference:    c.Bool("tar.dereference"),
			Proxy: easyssh.DefaultConfig{
				Key:               c.String("proxy.ssh-key"),
				Passphrase:        c.String("proxy.ssh-passphrase"),
				Fingerprint:       c.String("proxy.fingerprint"),
				KeyPath:           c.String("proxy.key-path"),
				User:              c.String("proxy.username"),
				Password:          c.String("proxy.password"),
				Server:            c.String("proxy.host"),
				Port:              c.String("proxy.port"),
				Timeout:           c.Duration("proxy.timeout"),
				Ciphers:           c.StringSlice("proxy.ciphers"),
				UseInsecureCipher: c.Bool("proxy.useInsecureCipher"),
			},
		},
	}

	return plugin.Exec()
}

repository: appleboy/drone-scp

repo_name: appleboy/drone-scp

gha_language: Go


text:
@inproceedings{DBLP:conf/nips/OordDS13,
  author    = {A{\"{a}}ron Van Den Oord and
               Sander Dieleman and
               Benjamin Schrauwen},
  editor    = {Christopher J. C. Burges and
               L{\'{e}}on Bottou and
               Zoubin Ghahramani and
               Kilian Q. Weinberger},
  title     = {Deep content-based music recommendation},
  booktitle = {Advances in Neural Information Processing Systems 26: 27th Annual
               Conference on Neural Information Processing Systems 2013. Proceedings
               of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States.},
  pages     = {2643--2651},
  year      = {2013},
  url       = {http://papers.nips.cc/paper/5004-deep-content-based-music-recommendation},
  timestamp = {Fri, 31 Jan 2014 12:11:40 +0100},
  biburl    = {http://dblp.uni-trier.de/rec/bib/conf/nips/OordDS13},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}


text:
@article{alvarez-galvez_measuring_2019,
	title = {Measuring the impact of multiple discrimination on depression in {Europe}},
	volume = {19},
	issn = {1471-2458},
	url = {https://doi.org/10.1186/s12889-019-6714-4},
	doi = {10.1186/s12889-019-6714-4},
	abstract = {The study of the health effects of perceived discrimination based on ethnic and social traits has a long-standing and widespread tradition in epidemiological research, but less attention has been paid to the study of multiple discrimination, particularly its effects on mental health. The present work aims to analyse the association between multiple discrimination and depressive symptoms in Europe, and the impact of contextual socioeconomic circumstances on this relationship.},
	number = {1},
	journal = {BMC Public Health},
	author = {Alvarez-Galvez, Javier and Rojas-Garcia, Antonio},
	month = apr,
	year = {2019},
	pages = {435}
}


text:
SECTION = "libs"
inherit native
include db3_${PV}.bb

FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/db3-${PV}', '${FILE_DIRNAME}/db3', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""

repository: Terentyev/familiar-linux

repo_name: Terentyev/familiar-linux


text:
@article{zhao2016cyberbullying,
 author = {Zhao, Rui and Mao, Kezhi},
 journal = {IEEE Transactions on Affective Computing},
 number = {3},
 pages = {328--339},
 publisher = {IEEE},
 title = {Cyberbullying detection based on semantic-enhanced marginalized denoising auto-encoder},
 volume = {8},
 year = {2016}
}

repository: rzntu/academic-kickstart

repo_name: rzntu/academic-kickstart


text:
set (MYSQL_LIB_PATHS "/usr/local/opt/mysql/lib" "/usr/local/lib/mysql/")
set (MYSQL_INCLUDE_PATHS "/usr/local/opt/mysql/include")
if (USE_STATIC_LIBRARIES)
	find_library (STATIC_MYSQLCLIENT_LIB libmysqlclient.a PATHS ${MYSQL_LIB_PATHS})
else ()
	find_library (MYSQLCLIENT_LIB mysqlclient PATHS ${MYSQL_LIB_PATHS})
endif ()
find_path (MYSQL_INCLUDE_DIR NAMES mysql.h PATH_SUFFIXES mysql PATHS ${MYSQL_INCLUDE_PATHS})
include_directories (${MYSQL_INCLUDE_DIR})

repository: jaykelin/ClickHouse

repo_name: jaykelin/ClickHouse

extension: cmake


text:
set(DLIB_CMAKE_ARGS
  DLIB_HEADER_ONLY=OFF #all previous builds were header on, so that is the default
  DLIB_ENABLE_ASSERTS=OFF #must be set on/off or debug/release build will differ and config will not match one
  HUNTER_INSTALL_LICENSE_FILES=dlib/LICENSE.txt
  )

hunter_config(dlib VERSION ${HUNTER_dlib_VERSION} CMAKE_ARGS "${DLIB_CMAKE_ARGS}")


text:
@article{ISI:000400004200019,
 author = {Malinverno, Chiara and Corallino, Salvatore and Giavazzi, Fabio and
Bergert, Martin and Li, Qingsen and Leoni, Marco and Disanza, Andrea and
Frittoli, Emanuela and Oldani, Amanda and Martini, Emanuele and
Lendenmann, Tobias and Deflorian, Gianluca and Beznoussenko, Galina V.
and Poulikakos, Dimos and Ong, Kok Haur and Uroz, Marina and Trepat,
Xavier and Parazzoli, Dario and Maiuri, Paolo and Yu, Weimiao and
Ferrari, Aldo and Cerbino, Roberto and Scita, Giorgio},
 doi = {10.1038/NMAT4848},
 eissn = {1476-4660},
 issn = {1476-1122},
 journal = {NATURE MATERIALS},
 month = {MAY},
 number = {5},
 orcid-numbers = {Li, Qingsen/0000-0002-7487-3133
Trepat, Xavier/0000-0002-7621-5214
Cerbino, Roberto/0000-0003-0434-7741
poulikakos, dimos/0000-0001-5733-6478
Bergert, Martin/0000-0002-3222-8929
Maiuri, Paolo/0000-0001-5079-445X
Leoni, Marco/0000-0002-3965-0575
Uroz, Marina/0000-0003-4124-8048
Disanza, Andrea/0000-0001-5101-2907},
 pages = {587+},
 researcherid-numbers = {Yu, Weimiao/AAN-4790-2020
Li, Qingsen/H-4651-2015
Trepat, Xavier/I-3912-2015
Cerbino, Roberto/A-2286-2008
poulikakos, dimos/O-2853-2014
Leoni, Marco/J-5950-2015
},
 times-cited = {67},
 title = {Endocytic reawakening of motility in jammed epithelia},
 unique-id = {ISI:000400004200019},
 volume = {16},
 year = {2017}
}

repository: rcerbino/starter-academic

repo_name: rcerbino/starter-academic


text:
@online{CodeOrg,
  Author = {Code.org},
  Title = {Code.org},
  Url = {https://code.org/}
}

@online{ProgrammaIlFuturo,
  Author = {Programma Il Futuro},
  Title = {Programma Il Futuro},
  Url = {https://programmailfuturo.it/}
}

@online{BJC,
  Author = {Berkeley University of California},
  Title = {The Beauty and the Joy of Computing},
  Url = {https://bjc.berkeley.edu/}
}

@online{MichaelLodi,
  Author = {Michael Lodi},
  Title = {lodi.ml},
  Url = {https://lodi.ml/}
}

@online{EnricoNardelli,
  Author = {Enrico Nardelli},
  Title = {Enrico Nardelli},
  Url = {https://www.mat.uniroma2.it/~nardelli/}
}


text:
################################################################################
#
# \file      cmake/BuildShared.cmake
# \author    J. Bakosi
# \copyright 2012-2015, Jozsef Bakosi, 2016, Los Alamos National Security, LLC.
# \brief     Set default value for building shared libs if none was specified
# \date      Fri 06 May 2016 06:40:37 AM MDT
#
################################################################################

set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries. Possible values: ON | OFF")
if(NOT DEFINED BUILD_SHARED_LIBS)
  message(STATUS "BUILD_SHARED_LIBS not specified, setting to 'ON'")
else()
  if(NOT BUILD_SHARED_LIBS AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    message(STATUS "Static linking only supported with the GNU compiler suite, overriding BUILD_SHARED_LIBS = off -> on")
    set(BUILD_SHARED_LIBS on)
  endif()
  message(STATUS "BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
endif()


text:
@InProceedings{10.1007/978-981-15-1002-1_60,
author="Dalmet, Wallace
and Das, Abhishek
and Dhuri, Vivek
and Khaja, Moinuddin
and Karamchandani, Sunil H.",
editor="Vasudevan, Hari
and Gajic, Zoran
and Deshmukh, Amit A.",
title="Siamese Manhattan LSTM Implementation for Predicting Text Similarity and Grading of Student Test Papers",
booktitle="Proceedings of International Conference on Wireless Communication ",
year="2020",
publisher="Springer Singapore",
address="Singapore",
pages="593--602",
abstract="This paper presents a method to grade answer papers written by the students by assessing the semantic similarity between the written answers and the actual answers and grading them accordingly based on the amount of semantic similarity between the two. There is a need for automatic grading of answers for faster checking of papers and to reduce the work of the teachers, also the method of text similarity can be used in search engines to find a particular document on the Internet or by question-answer sites such as Quora to determine similar questions. We have implemented this by using Manhattan LSTM (Long short-term memory) which is a Siamese deep neural network. This method uses word embedding vectors to create embedded matrices which are fed to LSTM and similarity function to get the result of the similarity between answers and then scaled to the appropriate grade.",
isbn="978-981-15-1002-1"
}

url: https://raw.githubusercontent.com/Abhishek0697/starter-academic/5714ec00d3b1e22fae4fa95498df91c69f9a6a1c/content/publication/Siamese Manhattan LSTM Implementation for Predicting Text Similarity and Grading of Student Test Papers/cite.bib


text:
@inproceedings{txminer2015,
author={M. Zheleva and R. Chandra and A. Chowdhery and A. Kapoor and P. Garnett},
booktitle={2015 IEEE International Symposium on Dynamic Spectrum Access Networks (DySPAN)},
title={TxMiner: Identifying transmitters in real-world spectrum measurements},
year={2015},
month={Sept},
location={Stockholm, Sweden},
}

repository: achowdhery/achowdhery-website

repo_name: achowdhery/achowdhery-website

gha_language: HTML


text:
#
# base recipe: meta/recipes-graphics/cairo/cairo_1.12.16.bb
# base branch: daisy
#

require cairo.inc

PR = "${INC_PR}.0"

PACKAGES =+ " \
	cairo-gobject \
	cairo-script-interpreter \
	cairo-perf-utils \
"

SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."

SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
CairoScript.  CairoScript is used by tracing utilities to enable the ability \
to replay rendering."

DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"

FILES_${PN} = "${libdir}/libcairo.so.*"
FILES_${PN}-dev += "${libdir}/cairo/*.la ${libdir}/cairo/*.so"
FILES_cairo-gobject = "${libdir}/libcairo-gobject.so.*"
FILES_cairo-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
FILES_cairo-perf-utils = "${bindir}/cairo-* ${libdir}/cairo/libcairo-trace.so*"

do_install_append () {
	rm -rf ${D}${bindir}/cairo-sphinx
	rm -rf ${D}${libdir}/cairo/cairo-fdr*
	rm -rf ${D}${libdir}/cairo/cairo-sphinx*
	rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
	rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
}

DEBIANNAME_cairo-perf-utils = "cairo-perf-utils"

# Skip the QA check for symbolic link .so files in cairo-perf-utils.
# In debian, libcairo-trace.so is shipped to cairo-perf-utils.
INSANE_SKIP_cairo-perf-utils = "dev-so"

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro

gha_language: BitBake


text:
package app

import (
	"net"
	"os"
	"os/signal"
	"syscall"
	"time"

	h2 "net/http"

	"github.com/d7561985/questions/delivery/http"
	"github.com/d7561985/questions/internal/tr"
	"github.com/d7561985/questions/repository/filerepo"
	"github.com/d7561985/questions/repository/memcache"
	"github.com/d7561985/questions/repository/translate"
	"github.com/d7561985/questions/usecase/simple"
	"github.com/joho/godotenv"
	"github.com/opentracing/opentracing-go/log"
	"github.com/prometheus/client_golang/prometheus/promhttp"
	"github.com/prometheus/common/version"
	"github.com/rs/zerolog"
	zl "github.com/rs/zerolog/log"
	"github.com/uber/jaeger-client-go"
	"github.com/urfave/cli/v2"
)

const (
	ucTimeOut = time.Second * 5 // ToDo: move ot Env
	paramFile = "file"
)

var runFlags = []cli.Flag{
	&cli.StringFlag{
		Name:    paramFile,
		Value:   "questions.json",
		Usage:   "file inside data folder",
		Aliases: []string{"f"},
		//Required: true,
	},
}

func run(ctx *cli.Context) error {
	logger := tr.NewZero(&zl.Logger)
	logger.LogFields(zerolog.InfoLevel,
		log.String("build", version.BuildContext()), log.String("version", version.Info()),
		log.String("event", "start"))

	if err := godotenv.Load(".env"); err != nil {
		logger.LogFields(zerolog.ErrorLevel, log.Error(err), log.String("event", "load .env file"))
	}

	go func() {
		if err := h2.ListenAndServe(os.Getenv("PROMETHEUS_HTTP_ADDR"), promhttp.Handler()); err != nil {
			logger.LogFields(zerolog.FatalLevel, log.String("event", "prometheus"), log.Error(err))
		}
	}()

	// WIP: for delivery and repository should be own trace instances.
	trace, closer := jaeger.NewTracer("WIP", jaeger.NewConstSampler(false), jaeger.NewNullReporter())
	defer closer.Close()

	listen, err := net.Listen("tcp", os.Getenv("DELIVERY_HTTP_ADDR"))
	if err != nil {
		logger.LogFields(zerolog.FatalLevel, log.String("addr", os.Getenv("DELIVERY_HTTP_ADDR")),
			log.Error(err))
		return err
	}

	repo := filerepo.New(logger, trace)
	if err = repo.Load(ctx.String(paramFile)); err != nil {
		logger.LogFields(zerolog.FatalLevel, log.Error(err))
		return err
	}

	trnsl, err := translate.New(os.Getenv("GOOGLE_APPLICATION_PROJECT_ID"), trace, ucTimeOut)
	if err != nil {
		logger.LogFields(zerolog.InfoLevel, log.Error(err))
	}

	uc := simple.NewService(repo, trnsl, memcache.New(), logger, ucTimeOut)
	deliver := http.New(logger, uc, trace)
	go deliver.Serve(listen)

	s := make(chan os.Signal, 1)
	signal.Notify(s, syscall.SIGTERM, os.Interrupt)

	<-s

	deliver.Stop()
	if err := repo.Close(); err != nil {
		logger.LogFields(zerolog.ErrorLevel, log.Error(err))
		return err
	}

	// ToDo: cache or repo instances should also stop option
	return nil
}


text:
package telemetry

import (
	"net/url"
	"testing"
	"time"

	"github.com/NodeFactoryIo/vedran-daemon/internal/lb"
	nodeMocks "github.com/NodeFactoryIo/vedran-daemon/mocks/node"
	schedulerMocks "github.com/NodeFactoryIo/vedran-daemon/mocks/scheduler"
	"github.com/go-co-op/gocron"
	"github.com/stretchr/testify/mock"
)

func TestTelemetry_StartSendingTelemetry(t *testing.T) {
	lbURL, _ := url.Parse("localhost:4000")
	lbClient := lb.NewClient(lbURL)
	nodeClient := &nodeMocks.Client{}

	tests := []struct {
		name               string
		t                  *Telemetry
		expectedNumOfCalls int
	}{
		{
			name:               "Calls start blocking with ping and metrics jobs",
			expectedNumOfCalls: 1},
	}

	for _, tt := range tests {

		t.Run(tt.name, func(t *testing.T) {
			mockScheduler := &schedulerMocks.Scheduler{}
			telemetry := NewTelemetry()
			mockScheduler.On("StartBlocking").Return()
			mockScheduler.On("Every", mock.Anything).Return(gocron.NewScheduler(time.UTC).Every(10))

			telemetry.StartSendingTelemetry(mockScheduler, lbClient, nodeClient)

			mockScheduler.AssertNumberOfCalls(t, "StartBlocking", tt.expectedNumOfCalls)
		})
	}
}

repository: NodeFactoryIo/vedran-daemon

repo_name: NodeFactoryIo/vedran-daemon


text:
@misc( Cowles1932,
	author = "Alfred Cowles",
	title = "Can stock market forecasters forecast?",
	year = "1932",
	journal = "Econometrica"
     )
@misc( Bachelier1900,
	author = "Louis Bachelier",
	title = "Théorie de la Spéculation",
	year = "1900",
	journal = "Annales  scientifiques  de  l’É.N.S."
	)
@misc( GCM2013,
	author = "Graham Capital Management, L.P.",
	title = "Systematic Global Macro: Performance, Risk and Correlation Characteristics",
	year = "2013"

)
@misc( ShenJiangZhang2012,
	author = "Shunrong Shen, Haomiao Jiang, Tongda Zhang",
	title = "Stock Market Forecasting Using Machine Learning Algorithms",
	year = "2012",
	university = "Stanford University"
)
@misc( WangHoLin2018,
	author = "Zhaoxia Wang, Seng-Beng Ho, Zhiping Lin",
	title = "Stock Market Prediction Analysis by Incorporating Social and News Opinion and Sentiment",
	year = "2018",
	journal = "IEEE International Conference on Data Mining"

)
@misc( Capgemini2012,
	author = "Capgemini",
	title = "High Frequency Trading: Evolution and the Future",
	year = "2012"
)

@misc( Carbone2019,
	author = "Nicolas Carbone",
	title = "200+ Financial Indicators of US stocks (2014-2018)",
	year = "2019"
)

@misc( Kaminski2017,
	author = "Bogumił Kamiński",
	title = "Teoria uczenia statystycznego z perspektywy ekonometryka",
	year = "2017"
)


text:
/*
 * Copyright 2021 National Library of Norway.
 *
 * 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 server

import (
	"github.com/nlnwa/gowarc"
	"github.com/nlnwa/veidemann-api/go/config/v1"
	"github.com/stretchr/testify/assert"
	"regexp"
	"testing"
	"time"
)

func Test_timeToNextRotation(t *testing.T) {
	ts1 := time.Date(2021, 1, 1, 0, 0, 0, 0, time.Local)
	ts2 := time.Date(2021, 11, 20, 11, 29, 59, 0, time.Local)
	ts3 := time.Date(2021, 12, 31, 23, 59, 59, 0, time.Local)
	type args struct {
		now time.Time
		p   config.Collection_RotationPolicy
	}
	tests := []struct {
		name   string
		args   args
		want   time.Duration
		wantOk bool
	}{
		{"none", args{ts1, config.Collection_NONE}, 0, false},
		{"none", args{ts2, config.Collection_NONE}, 0, false},
		{"none", args{ts3, config.Collection_NONE}, 0, false},
		{"hourly", args{ts1, config.Collection_HOURLY}, time.Minute * 60, true},
		{"hourly", args{ts2, config.Collection_HOURLY}, time.Minute*30 + time.Second*1, true},
		{"hourly", args{ts3, config.Collection_HOURLY}, time.Second * 1, true},
		{"daily", args{ts1, config.Collection_DAILY}, time.Hour * 24, true},
		{"daily", args{ts2, config.Collection_DAILY}, time.Hour*12 + time.Minute*30 + time.Second*1, true},
		{"daily", args{ts3, config.Collection_DAILY}, time.Second * 1, true},
		{"monthly", args{ts1, config.Collection_MONTHLY}, time.Hour * 24 * 31, true},
		{"monthly", args{ts2, config.Collection_MONTHLY}, time.Hour*(24*10+12) + time.Minute*30 + time.Second*1, true},
		{"monthly", args{ts3, config.Collection_MONTHLY}, time.Second * 1, true},
		{"yearly", args{ts1, config.Collection_YEARLY}, time.Hour * 24 * 365, true},
		{"yearly", args{ts2, config.Collection_YEARLY}, time.Hour*(24*(10+31)+12) + time.Minute*30 + time.Second*1, true},
		{"yearly", args{ts3, config.Collection_YEARLY}, time.Second * 1, true},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			got, got1 := timeToNextRotation(tt.args.now, tt.args.p)
			if got != tt.want {
				t.Errorf("timeToNextRotation() got = %v, want %v", got, tt.want)
			}
			if got1 != tt.wantOk {
				t.Errorf("timeToNextRotation() got1 = %v, want %v", got1, tt.wantOk)
			}
		})
	}
}

func Test_createFileRotationKey(t *testing.T) {
	ts1 := time.Date(2021, 1, 1, 0, 0, 0, 0, time.Local)
	ts2 := time.Date(2021, 11, 20, 11, 29, 59, 0, time.Local)
	ts3 := time.Date(2021, 12, 31, 23, 59, 59, 0, time.Local)
	type args struct {
		now time.Time
		p   config.Collection_RotationPolicy
	}
	tests := []struct {
		name string
		args args
		want string
	}{
		{"none", args{ts1, config.Collection_NONE}, ""},
		{"none", args{ts2, config.Collection_NONE}, ""},
		{"none", args{ts3, config.Collection_NONE}, ""},
		{"hourly", args{ts1, config.Collection_HOURLY}, "2021010100"},
		{"hourly", args{ts2, config.Collection_HOURLY}, "2021112011"},
		{"hourly", args{ts3, config.Collection_HOURLY}, "2021123123"},
		{"daily", args{ts1, config.Collection_DAILY}, "20210101"},
		{"daily", args{ts2, config.Collection_DAILY}, "20211120"},
		{"daily", args{ts3, config.Collection_DAILY}, "20211231"},
		{"monthly", args{ts1, config.Collection_MONTHLY}, "202101"},
		{"monthly", args{ts2, config.Collection_MONTHLY}, "202111"},
		{"monthly", args{ts3, config.Collection_MONTHLY}, "202112"},
		{"yearly", args{ts1, config.Collection_YEARLY}, "2021"},
		{"yearly", args{ts2, config.Collection_YEARLY}, "2021"},
		{"yearly", args{ts3, config.Collection_YEARLY}, "2021"},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if got := createFileRotationKey(tt.args.now, tt.args.p); got != tt.want {
				t.Errorf("createFileRotationKey() = %v, want %v", got, tt.want)
			}
		})
	}
}

func Test_getFilename(t *testing.T) {
	ng := &gowarc.PatternNameGenerator{
		Directory: "",
		Prefix:    createFilePrefix("foo", config.Collection_UNDEFINED, time.Now(), config.Collection_NONE),
		Serial:    0,
	}
	d1, f1 := ng.NewWarcfileName()
	d2, f2 := ng.NewWarcfileName()
	assert.Regexp(t, regexp.MustCompile(`foo-\d{14}-0001-(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|.+)\.warc`), f1)
	assert.Equal(t, "", d1)
	assert.Regexp(t, regexp.MustCompile(`foo-\d{14}-0002-(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|.+)\.warc`), f2)
	assert.Equal(t, "", d2)

	ng = &gowarc.PatternNameGenerator{
		Directory: "",
		Prefix:    createFilePrefix("foo", config.Collection_UNDEFINED, time.Now(), config.Collection_YEARLY),
		Serial:    0,
	}
	d1, f1 = ng.NewWarcfileName()
	d2, f2 = ng.NewWarcfileName()
	assert.Regexp(t, regexp.MustCompile(`foo_\d{4}-\d{14}-0001-(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|.+)\.warc`), f1)
	assert.Equal(t, "", d1)
	assert.Regexp(t, regexp.MustCompile(`foo_\d{4}-\d{14}-0002-(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|.+)\.warc`), f2)
	assert.Equal(t, "", d2)

	ng = &gowarc.PatternNameGenerator{
		Directory: "myDir",
		Prefix:    createFilePrefix("foo", config.Collection_DNS, time.Now(), config.Collection_MONTHLY),
		Serial:    0,
	}
	d1, f1 = ng.NewWarcfileName()
	d2, f2 = ng.NewWarcfileName()
	assert.Regexp(t, regexp.MustCompile(`foo_DNS_\d{6}-\d{14}-0001-(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|.+)\.warc`), f1)
	assert.Equal(t, "myDir", d1)
	assert.Regexp(t, regexp.MustCompile(`foo_DNS_\d{6}-\d{14}-0002-(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|.+)\.warc`), f2)
	assert.Equal(t, "myDir", d2)

	ng = &gowarc.PatternNameGenerator{
		Directory: "myDir",
		Prefix:    createFilePrefix("foo", config.Collection_DNS, time.Now(), config.Collection_DAILY),
		Serial:    0,
	}
	d1, f1 = ng.NewWarcfileName()
	d2, f2 = ng.NewWarcfileName()
	assert.Regexp(t, regexp.MustCompile(`foo_DNS_\d{8}-\d{14}-0001-(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|.+)\.warc`), f1)
	assert.Equal(t, "myDir", d1)
	assert.Regexp(t, regexp.MustCompile(`foo_DNS_\d{8}-\d{14}-0002-(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|.+)\.warc`), f2)
	assert.Equal(t, "myDir", d2)
}

repository: nlnwa/veidemann-contentwriter

repo_name: nlnwa/veidemann-contentwriter


text:
package cmd

import (
	"github.com/golang/mock/gomock"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Table util test", func() {
	var (
		ctrl *gomock.Controller
	)

	BeforeEach(func() {
		ctrl = gomock.NewController(GinkgoT())
		config = nil
	})

	AfterEach(func() {
		config = nil
		ctrl.Finish()
	})

	Context("basic test", func() {
		It("getJenkinsNames", func() {
			config = &Config{
				JenkinsServers: []JenkinsServer{JenkinsServer{
					Name: "a",
				}, JenkinsServer{
					Name: "b",
				}},
			}

			names := getJenkinsNames()
			Expect(names).To(Equal([]string{"a", "b"}))

			config.JenkinsServers = []JenkinsServer{}
			names = getJenkinsNames()
			Expect(names).To(Equal([]string{}))
		})

		It("getCurrentJenkins", func() {
			config = &Config{}
			current := getCurrentJenkins()
			Expect(current).To(BeNil())

			config.Current = "test"
			config.JenkinsServers = []JenkinsServer{JenkinsServer{
				Name: "test",
			}}
			current = getCurrentJenkins()
			Expect(current).To(Equal(&config.JenkinsServers[0]))
		})

		It("findSuiteByName", func() {
			config = &Config{}
			suite := findSuiteByName("fake")
			Expect(suite).To(BeNil())

			pluginName := "plugin-one"
			config.PluginSuites = []PluginSuite{PluginSuite{
				Name: pluginName,
			}}
			suite = findSuiteByName(pluginName)
			Expect(suite).NotTo(BeNil())
			Expect(suite.Name).To(Equal(pluginName))
		})
	})
})


text:
package circleci

import (
	"github.com/giantswarm/circleci-exporter/flag/service/circleci/auth"
)

type CircleCI struct {
	Auth auth.Auth
}

repository: giantswarm/circleci-exporter

repo_name: giantswarm/circleci-exporter


text:
// Copyright 2016 The Cockroach 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.
//
// Author: Matt Tracy (matt@cockroachlabs.com)

package sqlutils

import (
	"fmt"
	"net"
	"net/url"

	"github.com/cockroachdb/cockroach/security"
	"github.com/cockroachdb/cockroach/security/securitytest"
	"github.com/cockroachdb/cockroach/server"
	"github.com/cockroachdb/cockroach/util"
)

// PGUrl returns a postgres connection url which connects to this server with
// the given user. Returns a connection string and a cleanup function which must
// be called after any connection created using the string has been closed.
//
// In order to connect securely using postgres, this method will create
// temporary on-disk copies of certain embedded security certificates. The
// certificates will be created as temporary files in the provided directory,
// and their filenames will have the provided prefix. The returned cleanup
// function will delete these temporary files.
func PGUrl(t util.Tester, ts *server.TestServer, user, tempDir, prefix string) (url.URL, func()) {
	host, port, err := net.SplitHostPort(ts.PGAddr())
	if err != nil {
		t.Fatal(err)
	}

	caPath := security.CACertPath(security.EmbeddedCertsDir)
	certPath := security.ClientCertPath(security.EmbeddedCertsDir, user)
	keyPath := security.ClientKeyPath(security.EmbeddedCertsDir, user)

	// Copy these assets to disk from embedded strings, so this test can
	// run from a standalone binary.
	tempCAPath, tempCACleanup := securitytest.RestrictedCopy(t, caPath, tempDir, "TestLogic_ca")
	tempCertPath, tempCertCleanup := securitytest.RestrictedCopy(t, certPath, tempDir, "TestLogic_cert")
	tempKeyPath, tempKeyCleanup := securitytest.RestrictedCopy(t, keyPath, tempDir, "TestLogic_key")

	return url.URL{
			Scheme: "postgres",
			User:   url.User(user),
			Host:   net.JoinHostPort(host, port),
			RawQuery: fmt.Sprintf("sslmode=verify-full&sslrootcert=%s&sslcert=%s&sslkey=%s",
				url.QueryEscape(tempCAPath),
				url.QueryEscape(tempCertPath),
				url.QueryEscape(tempKeyPath),
			),
		}, func() {
			tempCACleanup()
			tempCertCleanup()
			tempKeyCleanup()
		}
}

repository: sacheendra/cockroach

repo_name: sacheendra/cockroach


text:
package main

import (
	"fmt"
	"log"

	// 导入生成的consignment.pb.go文件
	pb "github.com/microke/consignment-service/proto/consignment"
	vesselProto "github.com/microke/vessel-service/proto/vessel"

	// 使用 go-mircro
	micro "github.com/micro/go-micro"
	"golang.org/x/net/context"
)

type Repository interface {
	Create(*pb.Consignment) (*pb.Consignment, error)
	GetAll() []*pb.Consignment
}

// Repository - 模拟一个数据库，我们会在此后使用真正的数据库替代他
type ConsignmentRepository struct {
	consignments []*pb.Consignment
}

func (repo *ConsignmentRepository) Create(consignment *pb.Consignment) (*pb.Consignment, error) {
	updated := append(repo.consignments, consignment)
	repo.consignments = updated
	return consignment, nil
}

func (repo *ConsignmentRepository) GetAll() []*pb.Consignment {
	return repo.consignments
}

// service要实现在proto中定义的所有方法。当你不确定时
// 可以去对应的*.pb.go文件里查看需要实现的方法及其定义
type service struct {
	repo Repository
	// 请注意，我们在这里记录了一个货船服务的客户端对象
	vesselClient vesselProto.VesselServiceClient
}

// CreateConsignment - 在proto中，我们只给这个微服务定一个了一个方法
// 就是这个CreateConsignment方法，它接受一个context以及proto中定义的
// Consignment消息，这个Consignment是由gRPC的服务器处理后提供给你的
func (s *service) CreateConsignment(ctx context.Context, req *pb.Consignment, res *pb.Response) error {
	// 这里，我们通过货船服务的客户端对象，向货船服务发出了一个请求
	vesselResponse, err := s.vesselClient.FindAvailable(context.Background(), &vesselProto.Specification{
		MaxWeight: req.Weight,
		Capacity:  int32(len(req.Containers)),
	})
	log.Printf("Found vessel: %s \n", vesselResponse.Vessel.Name)
	if err != nil {
		return err
	}
	req.VesselId = vesselResponse.Vessel.Id
	consignment, err := s.repo.Create(req)
	if err != nil {
		return err
	}
	res.Created = true
	res.Consignment = consignment
	return nil
}

func (s *service) GetConsignments(ctx context.Context, req *pb.GetRequest, res *pb.Response) error {
	consignments := s.repo.GetAll()
	res.Consignments = consignments
	return nil
}

func main() {
	repo := &ConsignmentRepository{}

	// 注意，在这里我们使用go-micro的NewService方法来创建新的微服务服务器，
	// 而不是上一篇文章中所用的标准
	srv := micro.NewService(
		// This name must match the package name given in your protobuf definition
		// 注意，Name方法的必须是你在proto文件中定义的package名字
		micro.Name("consignment"),
		micro.Version("latest"),
	)

	vesselClient := vesselProto.NewVesselServiceClient("go.micro.srv.vessel", srv.Client())

	srv.Init()

	pb.RegisterShippingServiceHandler(srv.Server(), &service{repo, vesselClient})
	if err := srv.Run(); err != nil {
		fmt.Println(err)
	}
}

repository: real-jacket/go-micro

repo_name: real-jacket/go-micro