{"id":20634252,"url":"https://github.com/sameetandpotatoes/swocker","last_synced_at":"2025-07-05T03:36:46.143Z","repository":{"id":90568442,"uuid":"42744901","full_name":"sameetandpotatoes/Swocker","owner":"sameetandpotatoes","description":"Get company tweets, predict company stocks.","archived":false,"fork":false,"pushed_at":"2015-10-13T16:24:44.000Z","size":7487,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T03:34:07.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sameetandpotatoes.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-09-18T20:11:05.000Z","updated_at":"2018-03-27T11:17:58.000Z","dependencies_parsed_at":"2023-03-13T17:56:16.154Z","dependency_job_id":null,"html_url":"https://github.com/sameetandpotatoes/Swocker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sameetandpotatoes/Swocker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameetandpotatoes%2FSwocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameetandpotatoes%2FSwocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameetandpotatoes%2FSwocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameetandpotatoes%2FSwocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameetandpotatoes","download_url":"https://codeload.github.com/sameetandpotatoes/Swocker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameetandpotatoes%2FSwocker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263677007,"owners_count":23494615,"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-16T14:24:32.032Z","updated_at":"2025-07-05T03:36:46.109Z","avatar_url":"https://github.com/sameetandpotatoes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"URL\n======\n\nhttp://swocker-ssapra.rhcloud.com\n\nProject Description\n======\n\nThe goal of this project was to map twitter sentiments to a company to actual Twitter stock prices. To accomplish this, we wrote a Flask-based web application with a SQL database. We used Twitter's API and Yahoo's stock API. Our database has a Company and a Tweet model with a \"has_many\" relationship (i.e a Company has many Tweets).\n\nAdvantages of using a database include really fast indexing of data, and also the potential to store a lot more than a week's worth of historical Twitter data.\n\nScreenshots\n=======\n\n![](https://copy.com/b34zK2narGYXH2jF)\n![](https://copy.com/rtMqw9Oh1FemdFvY)\n\n\nDependencies:\n=======\nInstall `command line tools`:\n\n    xcode-select –install\n\nInstall `brew`:\n\n    ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”\n\n    brew doctor\n\nInstall `Python (2.7)`:\n\n    brew install python\n\nInstall `virtualenv`:\n\n    pip install virtualenv\n\nInstall [`mysql (5.5)`](https://dev.mysql.com/downloads/mysql/5.5.html)\n\nDownloading the Code\n===\n\n    git clone https://github.com/sameetandpotatoes/Swocker.git\n\nMake sure you have run `bin/activate` to activate the virtualenv, and then run the following commands to install all necessary dependencies inside the virtualenv:\n\n    pip install -r requirements.txt\n\n###`secrets.py` is organized like this inside the swocker folder:###\n\n    ALCHEMY_CODES = [\n        ''\n    ]\n    TWITTER_CODES = [\n        {\n            'CONSUMER_KEY': '',\n            'CONSUMER_SECRET': '',\n            'ACCESS_TOKEN': '',\n            'ACCESS_SECRET': ''\n        },\n    ]\n\nCreate a file `secrets.py` in the app directory with `touch secrets.py`, and copy the default format.\n\nFill in your API keys, we'll collect everyone's when we deploy / store them as environment variables in production eventually\n\n### Creating the Database\n\n**Note: You only have to do this if there isn't an app.db file. Basically, ignore the rest of the instructions, this is just things that I had to do to get things working**\n\n- Run `python db_create.py` to create the database\n- Run `python db_migrate.py` to migrate the database\n- Open up the python shell (On Mac, just type `python`)\n- `from swocker import company`\n- `company.load_objects_into_database()`\n- All companies are now created. You can see them all with:\n- `from swocker.models import *`\n- `Company.query.all()`\n- Now, to get some tweets in there:\n- `from swocker import tasks`\n- `tasks.store_tweets_in_database()`\n\nThis won't complete all the way. Wait about a day, then rerun.\n\n## RabbitMQ and Celery Set Up:\n\nTo get this running on a deployed server, you need RabbitMQ and Celery. If you want to try to simulate this on your computer, you need all three of these commands running at the same time:\n\n- `rabbitmq-server`\n- `celery -A app.tasks.celery worker --loglevel=info`\n- `celery -A app.tasks.celery beat`\n\nYou won't see anything for a day or so (you can change the frequency of the task if you want in `tasks.py`)\n\n- `Ctrl + D` to exit the shell\n\n\nRunning the App\n===\n\n- Then run the app with `python app.py`. You'll see data instantly for the companies that we have tweets for!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameetandpotatoes%2Fswocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameetandpotatoes%2Fswocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameetandpotatoes%2Fswocker/lists"}