<commit_before>/*
  example usage for a CSV with no header row and columns for name, email, & image:

  UserImport.runWithCSVFile('test.csv', {
    headers: ['name', 'email', 'avatar_url'],
    community: {id: 1}
  })
*/

var request = require('request')
var fs = require('fs')
var csv = require('csv-parser')

var createUser = function (row, options) {
  return User.create(_.merge(row, {community: options.community}))
}

module.exports = {
  runWithRemoteCSV: function (url, options) {
    return this.runWithCSVStream(request(url), options)
  },
<commit_msg>default bulk-imported users to weekly digests<commit_after>/*
  example usage for a CSV with no header row and columns for name, email, & image:

  UserImport.runWithCSVFile('test.csv', {
    headers: ['name', 'email', 'avatar_url'],
    community: {id: 1}
  })
*/

var request = require('request')
var fs = require('fs')
var csv = require('csv-parser')

var createUser = function (row, options) {
  return User.create(_.merge(row, {
    community: options.community,
    settings: {
      digest_frequency: 'weekly'
    }
  }))
}

module.exports = {
  runWithRemoteCSV: function (url, options) {
    return this.runWithCSVStream(request(url), options)
  },

{'fraction_non_alphanumeric': 0.14590163934426228, 'fraction_numerical': 0.001639344262295082, 'mean_word_length': 4.130252100840337, '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': '7288861', 'n_tokens_mistral': 405, 'n_tokens_neox': 392, 'n_words': 108}