<commit_before># -*- coding: utf-8 -*-
from flask import Flask, g
from flask.ext.restful import Api

from shiva.models import db
from shiva import resources, views

app = Flask(__name__)
app.config.from_object('shiva.config')

db.app = app
db.init_app(app)

# URIs
app.add_url_rule('/track/<int:track_id>/download.<ext>', 'download',
                 views.download)

# RESTful API
api = Api(app)

# Artists
api.add_resource(resources.ArtistResource, '/artists',
                 '/artist/<int:artist_id>', '/artist/<artist_slug>',
                 endpoint='artist')
api.add_resource(resources.ShowsResource, '/artist/<int:artist_id>/shows',
                 '/artist/<artist_slug>/shows', endpoint='shows')

# Albums
api.add_resource(resources.AlbumResource, '/albums', '/album/<int:album_id>',
                 '/album/<album_slug>', endpoint='album')

# Tracks
api.add_resource(resources.TracksResource, '/tracks', '/track/<int:track_id>',
                 '/track/<track_slug>', endpoint='track')
api.add_resource(resources.LyricsResource, '/track/<int:track_id>/lyrics',
                 '/track/<track_slug>/lyrics', endpoint='lyrics')

# Clients
api.add_resource(resources.ClientResource, '/clients', endpoint='client')


@app.before_request
def before_request():
    g.db = db

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=True)<commit_msg>Changed port<commit_after># -*- coding: utf-8 -*-
from flask import Flask, g
from flask.ext.restful import Api

from shiva.models import db
from shiva import resources, views

app = Flask(__name__)
app.config.from_object('shiva.config')

db.app = app
db.init_app(app)

# URIs
app.add_url_rule('/track/<int:track_id>/download.<ext>', 'download',
                 views.download)

# RESTful API
api = Api(app)

# Artists
api.add_resource(resources.ArtistResource, '/artists',
                 '/artist/<int:artist_id>', '/artist/<artist_slug>',
                 endpoint='artist')
api.add_resource(resources.ShowsResource, '/artist/<int:artist_id>/shows',
                 '/artist/<artist_slug>/shows', endpoint='shows')

# Albums
api.add_resource(resources.AlbumResource, '/albums', '/album/<int:album_id>',
                 '/album/<album_slug>', endpoint='album')

# Tracks
api.add_resource(resources.TracksResource, '/tracks', '/track/<int:track_id>',
                 '/track/<track_slug>', endpoint='track')
api.add_resource(resources.LyricsResource, '/track/<int:track_id>/lyrics',
                 '/track/<track_slug>/lyrics', endpoint='lyrics')

# Clients
api.add_resource(resources.ClientResource, '/clients', endpoint='client')


@app.before_request
def before_request():
    g.db = db

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=9002, debug=True)
{'fraction_non_alphanumeric': 0.16575790621592149, 'fraction_numerical': 0.006543075245365322, 'mean_word_length': 3.696245733788396, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5723542', 'n_tokens_mistral': 932, 'n_tokens_neox': 939, 'n_words': 152}