<commit_before>IBM Watson Personality Insights Badge
=====================================

Arduino Yún-based demo that displays your Twitter handle and "Big 5" personality traits.

Uses IBM Watson Personality Insights service to calculate your personality traits based on
your recent tweets.

[![Picture of badge in action](https://watson-developer-cloud.github.io/arduino-pi-badge-demo/watson-pi-twitter-badge-small.jpg)](https://watson-developer-cloud.github.io/arduino-pi-badge-demo/watson-pi-twitter-badge.jpg)

Set Up
------

Accounts:

Create a Personality Insights service instance at http://bluemix.net/ and bind it to a 
server instance. Then view the server's dashboard and click View Credentials on the service.
Copy the credentials to `linux/twitter-personality-insights/credentials.json`.

Create a twitter app and also copy it's credentials to `credentials.json`.

Linux Setup:

Copy the `arduino/pibadge/` folder into your Arduino Projects folder.

Copy the `linux/twitter-personality-insights/` folder onto a MicroSD card and insert it into the Yun.

SSH into the linux side of the Yun and run the following commands to install dependencies:

```
opkg update #updates the available packages list
opkg install distribute #it contains the easy_install command line tool
opkg install python-openssl #adds ssl support to python
easy_install pip #installs pip
mkdir /mnt/sda1/python-packages
pip install --target /mnt/sda1/python-packages twitter # current release of twitter
pip install --target /mnt/sda1/python-packages requests==2.5.3 # outdated release of requests that works on Yun's outdated python version
```

Wiring:

You'll need to connect a display such as [this one](https://www.adafruit.com/products/358) - 
note that on the Yun, the only SPI pins are on the ICSP header, so you'll need a female 
connector on at least two of your wires.

Bringing it all together: 

Upload the sketch and wait a minute or two for it to process things, then enjoy your new
Personality Insights Badge!

The sketch defaults @nfriedly, but you can change it to any twitter username you like. A 
potential enhancement could be to add a web interface for setting the username at runtime.<commit_msg>Adding twitter link and formatting<commit_after>IBM Watson Personality Insights Badge
=====================================

Arduino Yún-based demo that displays your Twitter handle and "Big 5" personality traits.

Uses IBM Watson Personality Insights service to calculate your personality traits based on
your recent tweets.

[![Picture of badge in action](https://watson-developer-cloud.github.io/arduino-pi-badge-demo/watson-pi-twitter-badge-small.jpg)](https://watson-developer-cloud.github.io/arduino-pi-badge-demo/watson-pi-twitter-badge.jpg)

Set Up
------

### Credentials:

Create a Personality Insights service instance at http://bluemix.net/ and bind it to a 
server instance. Then view the server's dashboard and click View Credentials on the service.
Copy the credentials to `linux/twitter-personality-insights/credentials.json`.

Create a twitter app at https://apps.twitter.com/ and also copy it's credentials to `credentials.json`.

### Linux Setup:

Copy the `arduino/pibadge/` folder into your Arduino Projects folder.

Copy the `linux/twitter-personality-insights/` folder onto a MicroSD card and insert it into the Yun.

SSH into the linux side of the Yun and run the following commands to install dependencies:

```
opkg update #updates the available packages list
opkg install distribute #it contains the easy_install command line tool
opkg install python-openssl #adds ssl support to python
easy_install pip #installs pip
mkdir /mnt/sda1/python-packages
pip install --target /mnt/sda1/python-packages twitter # current release of twitter
pip install --target /mnt/sda1/python-packages requests==2.5.3 # outdated release of requests that works on Yun's outdated python version
```

### Wiring:

You'll need to connect a display such as [this one](https://www.adafruit.com/products/358) - 
note that on the Yun, the only SPI pins are on the ICSP header, so you'll need a female 
connector on at least two of your wires.

### Bringing it all together: 

Upload the sketch and wait a minute or two for it to process things, then enjoy your new
Personality Insights Badge!

The sketch defaults @nfriedly, but you can change it to any twitter username you like. A 
potential enhancement could be to add a web interface for setting the username at runtime.

{'fraction_non_alphanumeric': 0.08802502234137623, 'fraction_numerical': 0.004468275245755138, 'mean_word_length': 4.547707558859975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4951539', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1209, 'n_words': 557}