<commit_before># URL Shortener

This URL Shortener is a service that takes long URL and squeezes it into short characters to make a link that is easier to share, tweet, or email to friends.

The app is using python flask, bootstrap and postgresql database. The core function is here: [https://github.com/maqdisi/python-url-shortener](https://github.com/maqdisi/python-url-shortener)

This service supports internationalization (i18n) such as English, Deutsch and Arabic عربي

![Default language: English](https://raw.githubusercontent.com/maqdisi/Flask-URLShortener/master/screenshots/screenshot-en.png)


Installation:
-------------
Create your postgres database.
As per config.py setting the database name is: urls

	psql
	CREATE DATABASE urls;

Follow the steps below:

	$ git clone https://github.com/maqdisi/Flask-URLShortener
	$ cd Flask-URLShortener
	$ workon <your virtual environment>
	$ export APP_SETTINGS="config.DevelopmentConfig"

Add your psql to your machine's path

*Example for psql on Mac OS X*

	export PATH=/Applications/Postgres.app/Contents/Versions/9.4/bin:$PATH
	
Continue by executing the folowing commands:

	$ pip install psycopg2
	$ pip install -r requirements.txt
	$ python db-create.db


To run the app:
---------------
	$ python web.py

Goto: [http://localhost:8081](http://localhost:8081)



**German locale:**

![Detecting language: German](https://raw.githubusercontent.com/maqdisi/Flask-URLShortener/master/screenshots/screenshot-de.png)

**Arabic locale:**

![Detecting language: Arabic](https://raw.githubusercontent.com/maqdisi/Flask-URLShortener/master/screenshots/screenshot-ar.png)
<commit_msg>fix conflict<commit_after># URL Shortener

This URL Shortener is a service that takes long URL and squeezes it into short characters to make a link that is easier to share, tweet, or email to friends.

The app is using python flask, bootstrap and postgresql database. The core function is here: [https://github.com/maqdisi/python-url-shortener](https://github.com/maqdisi/python-url-shortener)

This service supports internationalization (i18n) such as English, Deutsch and Arabic عربي

![Default language: English](https://raw.githubusercontent.com/maqdisi/Flask-URLShortener/master/screenshots/screenshot-en.png)


Installation:
-------------
Create your postgres database.
As per config.py setting the database name is: urls

	psql
	CREATE DATABASE urls;

Follow the steps below:

	$ git clone https://github.com/maqdisi/Flask-URLShortener
	$ cd Flask-URLShortener
	$ workon <your virtual environment>
	$ export APP_SETTINGS="config.DevelopmentConfig"

Add your psql to your machine's path

*Example for psql on Mac OS X*

	export PATH=/Applications/Postgres.app/Contents/Versions/9.4/bin:$PATH
	
Continue by executing the folowing commands:

	$ pip install psycopg2
	$ pip install -r requirements.txt
	$ python db-create.db


To run the app:
---------------
	$ python web.py

Goto: [http://localhost:8081](http://localhost:8081)



**German locale:**

![Detecting language: German](https://raw.githubusercontent.com/maqdisi/Flask-URLShortener/master/screenshots/screenshot-de.png)

**Arabic locale:**

![Detecting language: Arabic](https://raw.githubusercontent.com/maqdisi/Flask-URLShortener/master/screenshots/screenshot-ar.png)


{'fraction_non_alphanumeric': 0.11613691931540342, 'fraction_numerical': 0.007946210268948655, 'mean_word_length': 4.464106844741235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '33761', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1011, 'n_words': 293}