{"id":13937120,"url":"https://github.com/ryanmcdermott/birdseed","last_synced_at":"2025-04-15T05:52:12.214Z","repository":{"id":57415306,"uuid":"45362369","full_name":"ryanmcdermott/birdseed","owner":"ryanmcdermott","description":":bird: :game_die: Use Twitter's Search API to get random numbers","archived":false,"fork":false,"pushed_at":"2015-12-27T16:56:31.000Z","size":14,"stargazers_count":78,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-21T21:09:43.919Z","etag":null,"topics":["hash","python","random","tweets","twitter-api"],"latest_commit_sha":null,"homepage":"http://twbirdseed.herokuapp.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanmcdermott.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-01T23:45:05.000Z","updated_at":"2023-06-14T08:10:12.000Z","dependencies_parsed_at":"2022-09-10T01:41:52.769Z","dependency_job_id":null,"html_url":"https://github.com/ryanmcdermott/birdseed","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmcdermott%2Fbirdseed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmcdermott%2Fbirdseed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmcdermott%2Fbirdseed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmcdermott%2Fbirdseed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanmcdermott","download_url":"https://codeload.github.com/ryanmcdermott/birdseed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016317,"owners_count":21198832,"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":["hash","python","random","tweets","twitter-api"],"created_at":"2024-08-07T23:03:18.579Z","updated_at":"2025-04-15T05:52:12.196Z","avatar_url":"https://github.com/ryanmcdermott.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Birdseed\r\n## What is it?\r\n`birdseed` is a utility to create pseudo and/or \"real\" random numbers from tweets based on a particular search query over Twitter's API. Use Twitter's noise to your advantage!\r\n\r\n## What else?\r\n**This is for fun. It's not secure. Don't use it in production :)**\r\n\r\nIt can be run in two modes: `real=True` and `real=False`. Real mode is default.\r\n\r\nWhen run in real mode, `birdseed` will get up to 100 tweets for a particular search query, compute a hash for each tweet, and store these in a list. When the user calls `birdseed_instance.random()` the last hash will be popped off the hashes list. When the list of hashes is 0, Twitter's API will be called again for the given search query. *There's no guarantee though that tweets coming back are new and were not previously hashed and popped off. Ideally, use a search query with lots of entropy (something short like a single character: 'a', 'e', 'i', 'o', 'u')*\r\n\r\nWhen run in non-real (pseudo) mode, `birdseed` will seed Python's random number generator with the first tweet it finds for the given search query.\r\n\r\nThe hash algorithm used is SHA224, with an input vector of the text of the tweet, the Twitter handle, and the timestamp. \r\n\r\n## Requirements\r\nPython 2.7+ or Python 3.3+, pip, and Twitter App credentials \r\n\r\n## Installation\r\n`pip install birdseed`\r\n\r\n## Usage\r\n```python\r\nfrom __future__ import print_function\r\n\r\nimport birdseed\r\nquery = 'donald trump'\r\naccess_key = 'YOUR_ACCESS_KEY'\r\naccess_secret = 'YOUR_ACCESS_SECRET'\r\nconsumer_key = 'YOUR_CONSUMER_KEY'\r\nconsumer_secret = 'YOUR_CONSUMER_SECRET'\r\n\r\nt = birdseed.Birdseed(query, access_key, access_secret, consumer_key, consumer_secret)\r\nprint(t.random())\r\n```\r\n\r\n## Contributing\r\nPull requests are much appreciated and accepted.\r\n\r\n## License\r\nReleased under the [MIT License](http://www.opensource.org/licenses/MIT)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanmcdermott%2Fbirdseed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanmcdermott%2Fbirdseed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanmcdermott%2Fbirdseed/lists"}