<commit_before>define(function(require) {
var Backbone = require('backbone'),
    Mustache = require('mustache'),
    FeedView = require('streamhub-backbone/views/FeedView'),
    DeckFeedColumnHeadingTemplate = require('text!streamhub-deck/templates/DeckFeedColumnHeading.html'),
    // Content Templates
    TwitterContentTemplate = require('text!streamhub-deck/templates/TwitterContent.html'),
    sources = require('streamhub-backbone/const/sources'),
    _ = require('underscore');

var DeckFeedView = Backbone.View.extend({
    initialize: function(opts) {
        this.defaultAvatarUrl = opts.defaultAvatarUrl; // Placeholder Avatar, when there is a missing avatar
        this.$el.addClass(this.className);
        this.template = opts.template;
        // call render method externally
    },
    className: 'hub-DeckFeedView',
    render: function() {
        $heading = this.setupHeading();

        var $deckScroll = this.$el.parents('.deck-col-scroll');
        $deckScroll.before($heading);
        $deckScroll.css('top', parseInt($deckScroll.css('top')) + $heading.height());
        
        // Setup container elements required for Deck view
        if (this.template) {
            this.$el.html(this.template());
        }
        $feed = $('.deck-col-feed', this.$el);
        this.$el.append($feed);

        // Supported sources and their templates
        var sources = {
            twitter: {
                template: function (d) {
                    return Mustache.compile(TwitterContentTemplate)(d);
                }
            }<commit_msg>Attempt to parse out tweet id from content id<commit_after>define(function(require) {
var Backbone = require('backbone'),
    Mustache = require('mustache'),
    FeedView = require('streamhub-backbone/views/FeedView'),
    DeckFeedColumnHeadingTemplate = require('text!streamhub-deck/templates/DeckFeedColumnHeading.html'),
    // Content Templates
    TwitterContentTemplate = require('text!streamhub-deck/templates/TwitterContent.html'),
    sources = require('streamhub-backbone/const/sources'),
    _ = require('underscore');

var DeckFeedView = Backbone.View.extend({
    initialize: function(opts) {
        this.defaultAvatarUrl = opts.defaultAvatarUrl; // Placeholder Avatar, when there is a missing avatar
        this.$el.addClass(this.className);
        this.template = opts.template;
        // call render method externally
    },
    className: 'hub-DeckFeedView',
    render: function() {
        $heading = this.setupHeading();

        var $deckScroll = this.$el.parents('.deck-col-scroll');
        $deckScroll.before($heading);
        $deckScroll.css('top', parseInt($deckScroll.css('top')) + $heading.height());
        
        // Setup container elements required for Deck view
        if (this.template) {
            this.$el.html(this.template());
        }
        $feed = $('.deck-col-feed', this.$el);
        this.$el.append($feed);

        // Supported sources and their templates
        var sources = {
            twitter: {
                template: function (d) {
                    // Attempt to set the tweet_id for the template
                    var content_id = content.get('id');
                    if (content_id) {
                        d.set('tweet_id', content_id.split('@twitter.com')[0].substring('tweet-'.length));
                    }
                    return Mustache.compile(TwitterContentTemplate)(d);
                }
            }
{'fraction_non_alphanumeric': 0.1302969155376189, 'fraction_numerical': 0.0002882675122513693, 'mean_word_length': 2.4734734734734736, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2448012', 'n_tokens_mistral': 947, 'n_tokens_neox': 912, 'n_words': 181}