Skip to content

eveningcafe/community-detection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Community Detection

Prerequisite

  • Python 3

Instructions

  • First, create an application and an endpoint at Twitter/Getting Started App.
  • Replace the sample fields in src/config.sample.yaml with your own access token key and consumer key.
access_token_key: <access-token-key>
access_token_secret: <access-token-secret>
consumer_key: <consumer-key>
consumer_secret: <consumer-secret>
  • Follow the following instructions to setup the project.
  • Run src/twitter_app.py and see the result in src/output.yaml file.
python src/twitter_app.py

output.yaml

- contributors: null
  coordinates: null
  created_at: Fri Feb 09 02:37:44 +0000 2018
  entities:
    hashtags: []
    symbols: []
    urls:
    - display_url: turing-nlp.github.io
      expanded_url: https://turing-nlp.github.io
      indices: [69, 92]
      url: https://t.co/5HQxR3yqN8
...

Install

To install project dependencies, run the following command in cmd or bash:

# use pip3 on linux
pip install -r requirement.txt

In powershell, you need to replace pip with pip.exe in order to make it work.

Testing

You can run test by running either one of the following commands:

# pytest.exe in powershell
pytest

# py.test.exe in powershell
py.test

# use git bash on windows
scripts/test.sh

Incase you want to debug test with vscode, run ./test.py.

Run test coverage:

py.test --cov=src --cov-config .coveragerc

# use git bash on windows
scripts/cov.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Shell 1.3%