{"id":17153901,"url":"https://github.com/stevenmmortimer/beard","last_synced_at":"2025-09-29T08:50:18.635Z","repository":{"id":33587025,"uuid":"37233472","full_name":"StevenMMortimer/beard","owner":"StevenMMortimer","description":"A Simple Webservice to Predict Proportion of Men with Beards","archived":false,"fork":false,"pushed_at":"2015-11-30T13:57:50.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T13:25:29.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StevenMMortimer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-11T01:59:06.000Z","updated_at":"2015-11-05T23:04:08.000Z","dependencies_parsed_at":"2022-09-04T02:51:47.700Z","dependency_job_id":null,"html_url":"https://github.com/StevenMMortimer/beard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StevenMMortimer/beard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenMMortimer%2Fbeard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenMMortimer%2Fbeard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenMMortimer%2Fbeard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenMMortimer%2Fbeard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StevenMMortimer","download_url":"https://codeload.github.com/StevenMMortimer/beard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenMMortimer%2Fbeard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277489017,"owners_count":25826632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-29T02:00:09.175Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T21:47:38.552Z","updated_at":"2025-09-29T08:50:18.610Z","avatar_url":"https://github.com/StevenMMortimer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Deploy scoring model\n====================\n\nThis package illustrates how to deploy a model for remote scoring/prediction. \n\n\n    # Install in R\n    library(devtools)\n    install_github(\"ReportMort/beard\")\n\n    # Score in R\n    library(beard)\n    mydata \u003c- data.frame(year=c(1890))\n    beard(input = mydata)\n\n    # Score remotely\n    curl https://public.opencpu.org/ocpu/github/ReportMort/beard/R/beard/json \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\"input\" : [ {\"year\":1914} ]}'\n      \n    # Score using Vagrant and Virtualbox\n    # First setup virtual machine, copy package to it, ssh into it and install, and run curl against that machine\n    scp -P 2222 /cygdrive/c/users/steven.mortimer/documents/personal-github/beard_0.0.tar.gz vagrant@127.0.0.1:~/.\n    vagrant ssh\n    sudo R CMD INSTALL beard_0.0.tar.gz --library=/usr/local/lib/R/site-library\n    curl http://10.68.12.119/ocpu/library/beard/R/beard/json \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\"input\" : [ {\"year\":1914} ]}'\n      \n    # Score from R using RCurl\n    library(RCurl)\n    library(RJSONIO)\n    res \u003c- postForm(\"https://public.opencpu.org/ocpu/github/ReportMort/beard/R/beard/json\",\n            .opts = list(postfields = toJSON(list(input=list(year=1890))),\n            httpheader = c('Content-Type' = 'application/json', Accept = 'application/json'),\n            ssl.verifypeer = FALSE))\n    fromJSON(res)\n      \nThe model is included in the `data` directory of the package, and was created\nusing the [createmodel.R](https://github.com/reportmort/beard/blob/master/inst/beard/createmodel.R) script. It predicts in the early 20th century the prevelance of beards among men.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenmmortimer%2Fbeard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenmmortimer%2Fbeard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenmmortimer%2Fbeard/lists"}