{"id":14959156,"url":"https://github.com/pckosek/easy_tfrecords","last_synced_at":"2026-01-20T05:31:51.423Z","repository":{"id":57425287,"uuid":"156424404","full_name":"pckosek/easy_tfrecords","owner":"pckosek","description":"Python package to assist tfrecord file read and write","archived":false,"fork":false,"pushed_at":"2018-12-02T02:22:32.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T17:50:55.750Z","etag":null,"topics":["python","tensorflow","tensorflow-tutorials","tfrecord","tfrecords"],"latest_commit_sha":null,"homepage":"","language":"Python","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/pckosek.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":"2018-11-06T17:50:43.000Z","updated_at":"2020-01-27T16:53:35.000Z","dependencies_parsed_at":"2022-08-29T22:51:07.405Z","dependency_job_id":null,"html_url":"https://github.com/pckosek/easy_tfrecords","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pckosek/easy_tfrecords","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pckosek%2Feasy_tfrecords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pckosek%2Feasy_tfrecords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pckosek%2Feasy_tfrecords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pckosek%2Feasy_tfrecords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pckosek","download_url":"https://codeload.github.com/pckosek/easy_tfrecords/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pckosek%2Feasy_tfrecords/sbom","scorecard":{"id":725206,"data":{"date":"2025-08-11","repo":{"name":"github.com/pckosek/easy_tfrecords","commit":"362fc49bd1b02cd4fd6960b1bcc632339d7b93e3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/11 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T12:34:44.882Z","repository_id":57425287,"created_at":"2025-08-22T12:34:44.882Z","updated_at":"2025-08-22T12:34:44.882Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28596414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["python","tensorflow","tensorflow-tutorials","tfrecord","tfrecords"],"created_at":"2024-09-24T13:18:57.219Z","updated_at":"2026-01-20T05:31:51.395Z","avatar_url":"https://github.com/pckosek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# easy_tfrecords\n\n### this package is designed to assist reading and writing to tfrecord files in an intuitive way that preserves dtype and data structure\n\n### _Purpose_:\u003cbr\u003e\nThe tfrecord format is a fast and powerful way of feeding data to a tensorflow model; it can automatically batch, randomize and iterate your data across epochs without special instructions. The **problem** with using tfrecord files comes from orchestrating the madness of matching feature structures across the reader, writer and fetcher.\n\u003cbr\u003e\u003cbr\u003e\nThe **easy_tfrecords** module contains methods and classes that allow you to write to and read from tfrecord files in a straightforward, extensible manner.\n\n### _Features_:\u003cbr\u003e\n- create tfrecord files\n- read from single or multiple tfrecord files\n- selectively read data from tfrecord files\n- examine the data structure of tfrecord files\n\n### _Usage_:\u003cbr\u003e\n#### **Writing**\u003cbr\u003e\n- Import data into python however you normally would (excel, pandas, csv, matlab, etc.)\n- Reshape each of your arrays of features to `shape=[N, x[, y[, z[, etc.]]]]` where N is the number of features. \n  - Add multiple lists of features to the file as key-value pairs\n#### **Reading**\u003cbr\u003e\n- Create a reader class object, specifying your file list (can be length 1), optionally specifying batch size and shuffe spec.\n- pass a list of which inputs to read from the file\n\n#### Example Code:\n```python\nimport numpy as np\nimport tensorflow as tf\n\nfrom easy_tfrecords import create_tfrecords, easy_tfrecords as records\n\n\n# CREATE SOME TEST DATA\nx      = np.array([[0, 0, 0, 0], [0, 0, 0, 0]], np.int32)\ntrainX = np.asarray( [x, x+1, x+2] )\n\ny      = np.array([0.25], np.float32)\ntrainY = np.asarray( [y, y+1, y+2] )\n\n\n# CREATE AND SAVE TO A FEW TFRECORDS FILES\ncreate_tfrecords('tfr_1.tf', x=trainX, y=trainY)\ncreate_tfrecords('tfr_2.tf', x=trainX+10, y=trainY+10)\ncreate_tfrecords('tfr_3.tf', x=trainX+100, y=trainY+100, z=trainY+100)\n\n# INSTANTIATE THE RECORDS OBJECT\nrec = records(files=['data_1.tf', 'data_2.tf'],\n  shuffle=False,\n  batch_size=1, \n  keys=['x', 'y'])\n\nnext_factory = rec.get_next_factory()\n\nbatch_x = next_factory['x']\nbatch_y = next_factory['y']\n\nwith tf.Session() as sess:\n\n  sess.run(rec.get_initializer())\n\n  for n in range(10):\n    print('------------')\n    print('n =\u003e {}\\n'.format(n))\n\n    x_eval, y_eval = sess.run( [batch_x, batch_y] )\n    print('x_eval=\\n{}\\n'.format(x_eval))\n    print('y_eval=\\n{}'.format(y_eval))\n\nsess.close()\n```\n#### Output :\n```\n------------\nn =\u003e 0\n\nx_eval=\n[[ 0.25]]\n\ny_eval=\n[[[0 0 0 0]\n  [0 0 0 0]]]\n------------\nn =\u003e 1\n\nx_eval=\n[[ 1.25]]\n\ny_eval=\n[[[1 1 1 1]\n  [1 1 1 1]]]\n------------\nn =\u003e 2\n\nx_eval=\n[[ 2.25]]\n\ny_eval=\n[[[2 2 2 2]\n  [2 2 2 2]]]\n------------\nn =\u003e 3\n\nx_eval=\n[[ 100.25]]\n\ny_eval=\n[[[100 100 100 100]\n  [100 100 100 100]]]\n------------\nn =\u003e 4\n\nx_eval=\n[[ 101.25]]\n\ny_eval=\n[[[101 101 101 101]\n  [101 101 101 101]]]\n------------\nn =\u003e 5\n\nx_eval=\n[[ 102.25]]\n\ny_eval=\n[[[102 102 102 102]\n  [102 102 102 102]]]\n------------\nn =\u003e 6\n\nx_eval=\n[[ 10.25]]\n\ny_eval=\n[[[10 10 10 10]\n  [10 10 10 10]]]\n------------\nn =\u003e 7\n\nx_eval=\n[[ 11.25]]\n\ny_eval=\n[[[11 11 11 11]\n  [11 11 11 11]]]\n------------\nn =\u003e 8\n\nx_eval=\n[[ 12.25]]\n\ny_eval=\n[[[12 12 12 12]\n  [12 12 12 12]]]\n------------\nn =\u003e 9\n\nx_eval=\n[[ 0.25]]\n\ny_eval=\n[[[0 0 0 0]\n  [0 0 0 0]]]\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpckosek%2Feasy_tfrecords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpckosek%2Feasy_tfrecords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpckosek%2Feasy_tfrecords/lists"}