{"id":34099788,"url":"https://github.com/starlangsoftware/datastructure-py","last_synced_at":"2025-12-14T16:02:58.417Z","repository":{"id":41508479,"uuid":"198713902","full_name":"StarlangSoftware/DataStructure-Py","owner":"StarlangSoftware","description":"Simple Data Structures Library","archived":false,"fork":false,"pushed_at":"2024-11-30T12:08:24.000Z","size":87,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-22T21:57:54.771Z","etag":null,"topics":["cache","data-structure"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StarlangSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-24T21:46:09.000Z","updated_at":"2024-11-30T12:08:27.000Z","dependencies_parsed_at":"2024-11-30T13:18:55.732Z","dependency_job_id":"b397b8f3-c1fc-40cc-a62a-48b7d5e1eac2","html_url":"https://github.com/StarlangSoftware/DataStructure-Py","commit_stats":{"total_commits":44,"total_committers":4,"mean_commits":11.0,"dds":0.6590909090909092,"last_synced_commit":"1cb4ded8ca027d06f132c010def190ae26ba9850"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/StarlangSoftware/DataStructure-Py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FDataStructure-Py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FDataStructure-Py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FDataStructure-Py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FDataStructure-Py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StarlangSoftware","download_url":"https://codeload.github.com/StarlangSoftware/DataStructure-Py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FDataStructure-Py/sbom","scorecard":{"id":133775,"data":{"date":"2025-08-04","repo":{"name":"github.com/StarlangSoftware/DataStructure-Py","commit":"65588b1d1a149eda43b36a4dafe0c2868ab7ca57"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-16T05:51:24.465Z","repository_id":41508479,"created_at":"2025-08-16T05:51:24.465Z","updated_at":"2025-08-16T05:51:24.465Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27730945,"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-12-14T02:00:11.348Z","response_time":56,"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":["cache","data-structure"],"created_at":"2025-12-14T16:02:57.422Z","updated_at":"2025-12-14T16:02:58.402Z","avatar_url":"https://github.com/StarlangSoftware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cache\n============\n\nThe idea of caching items for fast retrieval goes back nearly to the beginning of the computer science. We also use that idea and use a LRU cache for storing morphological analyses of surface forms. Before analyzing a surface form, we first look up to the cache, and if there is an hit, we just take the analyses from the cache. If there is a miss, we analyze the surface form and put the morphological analyses of that surface form in the LRU cache. As can be expected, the speed of the caching mechanism surely depends on the size of the cache.\n\nFor Developers\n============\n\nYou can also see [Cython](https://github.com/starlangsoftware/DataStructure-Cy), [Java](https://github.com/starlangsoftware/DataStructure), [C](https://github.com/starlangsoftware/DataStructure-C), [C++](https://github.com/starlangsoftware/DataStructure-CPP), [Swift](https://github.com/starlangsoftware/DataStructure-Swift), [Php](https://github.com/starlangsoftware/DataStructure-Php), [Js](https://github.com/starlangsoftware/DataStructure-Js), or [C#](https://github.com/starlangsoftware/DataStructure-CS) repository.\n\n## Requirements\n\n* [Python 3.7 or higher](#python)\n* [Git](#git)\n\n### Python \n\nTo check if you have a compatible version of Python installed, use the following command:\n\n    python -V\n    \nYou can find the latest version of Python [here](https://www.python.org/downloads/).\n\n### Git\n\nInstall the [latest version of Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).\n\n## Pip Install\n\n\tpip3 install NlpToolkit-DataStructure\n\n## Download Code\n\nIn order to work on code, create a fork from GitHub page. \nUse Git for cloning the code to your local or below line for Ubuntu:\n\n\tgit clone \u003cyour-fork-git-link\u003e\n\nA directory called DataStructure will be created. Or you can use below link for exploring the code:\n\n\tgit clone https://github.com/starlangsoftware/DataStructure-Py.git\n\n## Open project with Pycharm IDE\n\nSteps for opening the cloned project:\n\n* Start IDE\n* Select **File | Open** from main menu\n* Choose `DataStructure-PY` file\n* Select open as project option\n* Couple of seconds, dependencies will be downloaded. \n\nFor Developers\n============\n\n+ [CounterHashMap](#counterhashmap)\n+ [LRUCache](#lrucache)\n\n## CounterHashMap\n\nCounterHashMap bir veri tipinin kaç kere geçtiğini hafızada tutmak için kullanılmaktadır.\n\nBir CounterHashMap yaratmak için\n\n\ta = CounterHashMap()\n\nHafızaya veri eklemek için\n\n\tput(self, key: object)\n\nÖrneğin,\n\n\ta.put(\"ali\");\n\nBu aşamanın ardından \"ali\" nin sayacı 1 olur.\n\nHafızaya o veriyi birden fazla kez eklemek için\n\n\tputNTimes(self, key: object, N: int)\n\nÖrneğin,\n\n\ta.putNTimes(\"veli\", 5)\n\nBu aşamanın ardından \"ali\"'nin sayacı 5 olur.\n\nHafızada o verinin kaç kere geçtiğini bulmak için\n\n\tcount(self, key: object) -\u003e int\n\nÖrneğin, \"veli\" nin kaç kere geçtiğini bulmak için\n\n\tkacKere = a.count(\"veli\")\n\nBu aşamanın ardından kacKere değişkeninin değeri 5 olur.\n\nHafızada hangi verinin en çok geçtiğini bulmak için\n\n\tmax(self) -\u003e object\n\nÖrneğin,\n\n\tkelime = a.max()\n\nBu aşamanın ardından kelime \"veli\" olur.\n\n## LRUCache\n\nLRUCache veri cachelemek için kullanılan bir veri yapısıdır. LRUCache en yakın zamanda \nkullanılan verileri öncelikli olarak hafızada tutar. Bir LRUCache yaratmak için\n\n\tLRUCache(self, cacheSize: int)\n\nkullanılır. cacheSize burada cachelenecek verinin büyüklüğünün limitini göstermektedir.\n\nCache'e bir veri eklemek için\n\n\tadd(self, key: object, data: object)\n\nkullanılır. data burada eklenecek veriyi, key anahtar göstergeyi göstermektedir.\n\nCache'de bir veri var mı diye kontrol etmek için\n\n\tcontains(self, key: object) -\u003e bool\n\nkullanılır.\n\nCache'deki veriyi anahtarına göre getirmek için\n\n\tget(self, key: object) -\u003e object\n\nkullanılır.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarlangsoftware%2Fdatastructure-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarlangsoftware%2Fdatastructure-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarlangsoftware%2Fdatastructure-py/lists"}