{"id":20823316,"url":"https://github.com/gorros/medianonstream","last_synced_at":"2026-04-28T04:36:19.146Z","repository":{"id":197540839,"uuid":"73707212","full_name":"gorros/medianonstream","owner":"gorros","description":"Calculates median on stream with limited memory.","archived":false,"fork":false,"pushed_at":"2016-11-14T14:13:35.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T16:57:04.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/gorros.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,"governance":null}},"created_at":"2016-11-14T13:28:34.000Z","updated_at":"2016-11-14T13:58:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"1131a101-38b8-4c6a-8932-76c569477341","html_url":"https://github.com/gorros/medianonstream","commit_stats":null,"previous_names":["gorros/medianonstream"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorros%2Fmedianonstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorros%2Fmedianonstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorros%2Fmedianonstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gorros%2Fmedianonstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gorros","download_url":"https://codeload.github.com/gorros/medianonstream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243172125,"owners_count":20247885,"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","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-11-17T22:18:04.666Z","updated_at":"2025-12-27T07:36:33.638Z","avatar_url":"https://github.com/gorros.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Median on stream\nCalculates median on stream with limited memory.\n\nDefault buffer size is 1000. It should be at least twice large than \nstandard deviation of the sequence. \n\n## Example\n```golang\n\ta := []float64{1,2,5.6,6,10,12,35,45,2,5,7,4.6,0}\n\tmos := medianonstream.NewMedianOnStream(30)\n\tfor i := 0; i \u003c len(a); i++  {\n\t\tmos.Insert(a[i])\n\t\tfmt.Printf(\"Added %6.3f, current median is %3.3f\\n\", a[i], mos.GetMedian())\n\t}\n```\n\nOutput\n```\nAdded  1.000, current median is 1.000\nAdded  2.000, current median is 1.500\nAdded  5.600, current median is 2.000\nAdded  6.000, current median is 3.800\nAdded 10.000, current median is 5.600\nAdded 12.000, current median is 5.800\nAdded 35.000, current median is 6.000\nAdded 45.000, current median is 8.000\nAdded  2.000, current median is 6.000\nAdded  5.000, current median is 5.800\nAdded  7.000, current median is 6.000\nAdded  4.600, current median is 5.800\nAdded  0.000, current median is 5.600\n\n```\n\n\n###Notice\nThe original version was written in Java by @shunanya","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgorros%2Fmedianonstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgorros%2Fmedianonstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgorros%2Fmedianonstream/lists"}