<commit_before>import Ember from 'ember';

export default Ember.Component.extend({
    tagName: 'img',
    size: 200,
    email: '',

    emailObserver: function() {
        Ember.run.debounce(this, this._fetchGravatar, 1000);
    }.observes('email'),

    didInsertElement: function() {
        this._fetchGravatar();
    },

    _fetchGravatar: function() {
        var email = this.get('email');
        var size = this.get('size');
        var gravatarUrl = 'http://www.gravatar.com/avatar/' + this._md5(email) + '?d=mm&s=' + size;
        this.$().attr('src', gravatarUrl);
    },

    // https://css-tricks.com/snippets/javascript/javascript-md5/
    _md5: function (string) {

        function RotateLeft(lValue, iShiftBits) {
            return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
        }

        function AddUnsigned(lX,lY) {
            var lX4,lY4,lX8,lY8,lResult;
            lX8 = (lX & 0x80000000);
            lY8 = (lY & 0x80000000);
            lX4 = (lX & 0x40000000);
            lY4 = (lY & 0x40000000);
            lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);
            if (lX4 & lY4) {
                return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
            }
            if (lX4 | lY4) {
                if (lResult & 0x40000000) {<commit_msg>Switched the fallback avatar to the unique picture thing<commit_after>import Ember from 'ember';

export default Ember.Component.extend({
    tagName: 'img',
    size: 200,
    email: '',

    emailObserver: function() {
        Ember.run.debounce(this, this._fetchGravatar, 1000);
    }.observes('email'),

    didInsertElement: function() {
        this._fetchGravatar();
    },

    _fetchGravatar: function() {
        var email = this.get('email');
        var size = this.get('size');
        var gravatarUrl = 'http://www.gravatar.com/avatar/' + this._md5(email) + '?d=identicon&s=' + size;
        this.$().attr('src', gravatarUrl);
    },

    // https://css-tricks.com/snippets/javascript/javascript-md5/
    _md5: function (string) {

        function RotateLeft(lValue, iShiftBits) {
            return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
        }

        function AddUnsigned(lX,lY) {
            var lX4,lY4,lX8,lY8,lResult;
            lX8 = (lX & 0x80000000);
            lY8 = (lY & 0x80000000);
            lX4 = (lX & 0x40000000);
            lY4 = (lY & 0x40000000);
            lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);
            if (lX4 & lY4) {
                return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
            }
            if (lX4 | lY4) {
                if (lResult & 0x40000000) {
{'fraction_non_alphanumeric': 0.1486280487804878, 'fraction_numerical': 0.06402439024390244, 'mean_word_length': 2.0630105017502918, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 16, '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': '3929445', 'n_tokens_mistral': 1041, 'n_tokens_neox': 901, 'n_words': 170}