id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
octoblu/meshblu:lib/publishConfig.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
41c73ace85490484b1f0b202684ef2716fdab4e4
815
https://github.com/octoblu/meshblu/blob/41c73ace85490484b1f0b202684ef2716fdab4e4/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = req...
var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class PublishConfig { constructor({ uuid: uuid1, ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
41c73ace85490484b1f0b202684ef2716fdab4e4
815
https://github.com/octoblu/meshblu/blob/41c73ace85490484b1f0b202684ef2716fdab4e4/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class Pu...
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
41c73ace85490484b1f0b202684ef2716fdab4e4
815
https://github.com/octoblu/meshblu/blob/41c73ace85490484b1f0b202684ef2716fdab4e4/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:completion
completion
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
device = new Device {uuid}, {@database} device.fetch (error, result) => # ignore errors, because not finding the device means we won't forward to them callback null, result fetchToAndFromDevice: ({fromUuid, toUuid}, callback) => async.parallel { fromDevice: async.apply @fetchDevice, fromUui...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
41c73ace85490484b1f0b202684ef2716fdab4e4
815
https://github.com/octoblu/meshblu/blob/41c73ace85490484b1f0b202684ef2716fdab4e4/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:2:raw_corpus
raw_corpus
shouldSend: ({fromUuid, toUuid}, callback) => return callback null, false if _.contains @forwardedFor, toUuid @fetchToAndFromDevice {fromUuid, toUuid}, (error, {fromDevice, toDevice}={}) => return callback error if error? simpleAuth = new SimpleAuth simpleAuth.canSend fromDevice, toDevice, {}...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
41c73ace85490484b1f0b202684ef2716fdab4e4
815
https://github.com/octoblu/meshblu/blob/41c73ace85490484b1f0b202684ef2716fdab4e4/lib/publishConfig.coffee
51
59
octoblu/meshblu:lib/publishConfig.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript shouldSend: ({fromUuid, toUuid}, callback) => return callback null, false if _.contains @forwardedFor, toUuid @fetchToAndFromDevice {fromUuid, toUuid}, (error, {fromDevice, toDevice}={}) => return callback error if error? simpleAuth = new Sim...
({ shouldSend: ({fromUuid, toUuid}, callback) => { if (_.contains(this.forwardedFor, toUuid)) { return callback(null, false); } return this.fetchToAndFromDevice({fromUuid, toUuid}, (error, {fromDevice, toDevice} = {}) => { var simpleAuth; if (error != null) { return callback(erro...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
41c73ace85490484b1f0b202684ef2716fdab4e4
815
https://github.com/octoblu/meshblu/blob/41c73ace85490484b1f0b202684ef2716fdab4e4/lib/publishConfig.coffee
51
59
octoblu/meshblu:lib/publishConfig.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ shouldSend: ({fromUuid, toUuid}, callback) => { if (_.contains(this.forwardedFor, toUuid)) { return callback(null, false); } return this.fetchToAndFromDevice({fromUuid, toUuid}, (error, {fromDevice, toDevice} = {}) => { var simpleAuth; ...
shouldSend: ({fromUuid, toUuid}, callback) => return callback null, false if _.contains @forwardedFor, toUuid @fetchToAndFromDevice {fromUuid, toUuid}, (error, {fromDevice, toDevice}={}) => return callback error if error? simpleAuth = new SimpleAuth simpleAuth.canSend fromDevice, toDevice, {}...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
41c73ace85490484b1f0b202684ef2716fdab4e4
815
https://github.com/octoblu/meshblu/blob/41c73ace85490484b1f0b202684ef2716fdab4e4/lib/publishConfig.coffee
51
59
octoblu/meshblu:lib/publishConfig.coffee:2:completion
completion
shouldSend: ({fromUuid, toUuid}, callback) => return callback null, false if _.contains @forwardedFor, toUuid @fetchToAndFromDevice {fromUuid, toUuid}, (error, {fromDevice, toDevice}={}) =>
return callback error if error? simpleAuth = new SimpleAuth simpleAuth.canSend fromDevice, toDevice, {}, callback module.exports = PublishConfig
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
41c73ace85490484b1f0b202684ef2716fdab4e4
815
https://github.com/octoblu/meshblu/blob/41c73ace85490484b1f0b202684ef2716fdab4e4/lib/publishConfig.coffee
51
59
octoblu/meshblu:lib/publishConfig.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
a6268c5db88504848ff7fb1d3eb40d4951dd49d9
815
https://github.com/octoblu/meshblu/blob/a6268c5db88504848ff7fb1d3eb40d4951dd49d9/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = req...
var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class PublishConfig { constructor({ uuid: uuid1, ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
a6268c5db88504848ff7fb1d3eb40d4951dd49d9
815
https://github.com/octoblu/meshblu/blob/a6268c5db88504848ff7fb1d3eb40d4951dd49d9/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class Pu...
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
a6268c5db88504848ff7fb1d3eb40d4951dd49d9
815
https://github.com/octoblu/meshblu/blob/a6268c5db88504848ff7fb1d3eb40d4951dd49d9/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:completion
completion
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
@fetchToAndFromDevice {fromUuid, toUuid}, (error, {fromDevice, toDevice}={}) => return callback error if error? simpleAuth = new SimpleAuth simpleAuth.canSend fromDevice, toDevice, {}, callback fetchDevice: (uuid, callback) => device = new Device {uuid}, {@database} device.fetch (error, res...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
a6268c5db88504848ff7fb1d3eb40d4951dd49d9
815
https://github.com/octoblu/meshblu/blob/a6268c5db88504848ff7fb1d3eb40d4951dd49d9/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:2:raw_corpus
raw_corpus
publishConfig = new PublishConfig uuid: toUuid config: @config database: @database forwardedFor: @forwardedFor publishConfig.publish callback module.exports = PublishConfig
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
a6268c5db88504848ff7fb1d3eb40d4951dd49d9
815
https://github.com/octoblu/meshblu/blob/a6268c5db88504848ff7fb1d3eb40d4951dd49d9/lib/publishConfig.coffee
51
59
octoblu/meshblu:lib/publishConfig.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript publishConfig = new PublishConfig uuid: toUuid config: @config database: @database forwardedFor: @forwardedFor publishConfig.publish callback module.exports = PublishConfig ```
var publishConfig; publishConfig = new PublishConfig({ uuid: toUuid, config: this.config, database: this.database, forwardedFor: this.forwardedFor }); publishConfig.publish(callback); module.exports = PublishConfig;
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
a6268c5db88504848ff7fb1d3eb40d4951dd49d9
815
https://github.com/octoblu/meshblu/blob/a6268c5db88504848ff7fb1d3eb40d4951dd49d9/lib/publishConfig.coffee
51
59
octoblu/meshblu:lib/publishConfig.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var publishConfig; publishConfig = new PublishConfig({ uuid: toUuid, config: this.config, database: this.database, forwardedFor: this.forwardedFor }); publishConfig.publish(callback); module.exports = PublishConfig; ```
publishConfig = new PublishConfig uuid: toUuid config: @config database: @database forwardedFor: @forwardedFor publishConfig.publish callback module.exports = PublishConfig
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
a6268c5db88504848ff7fb1d3eb40d4951dd49d9
815
https://github.com/octoblu/meshblu/blob/a6268c5db88504848ff7fb1d3eb40d4951dd49d9/lib/publishConfig.coffee
51
59
octoblu/meshblu:lib/publishConfig.coffee:2:completion
completion
publishConfig = new PublishConfig uuid: toUuid config: @config database: @database
forwardedFor: @forwardedFor publishConfig.publish callback module.exports = PublishConfig
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
a6268c5db88504848ff7fb1d3eb40d4951dd49d9
815
https://github.com/octoblu/meshblu/blob/a6268c5db88504848ff7fb1d3eb40d4951dd49d9/lib/publishConfig.coffee
51
59
octoblu/meshblu:lib/publishConfig.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
78805b5aa1ddb414f1b99bbb14b68ef91613175c
815
https://github.com/octoblu/meshblu/blob/78805b5aa1ddb414f1b99bbb14b68ef91613175c/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = req...
var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class PublishConfig { constructor({ uuid: uuid1, ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
78805b5aa1ddb414f1b99bbb14b68ef91613175c
815
https://github.com/octoblu/meshblu/blob/78805b5aa1ddb414f1b99bbb14b68ef91613175c/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class Pu...
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
78805b5aa1ddb414f1b99bbb14b68ef91613175c
815
https://github.com/octoblu/meshblu/blob/78805b5aa1ddb414f1b99bbb14b68ef91613175c/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:completion
completion
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
@fetchToAndFromDevice {fromUuid, toUuid}, (error, {fromDevice, toDevice}={}) => return callback error if error? simpleAuth = new SimpleAuth simpleAuth.canSend fromDevice, toDevice, {}, callback fetchDevice: (uuid, callback) => device = new Device {uuid}, {@database} device.fetch (error, res...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
78805b5aa1ddb414f1b99bbb14b68ef91613175c
815
https://github.com/octoblu/meshblu/blob/78805b5aa1ddb414f1b99bbb14b68ef91613175c/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
94c66b4433a3cb9cd2c92e56946b4eaba0953cfd
815
https://github.com/octoblu/meshblu/blob/94c66b4433a3cb9cd2c92e56946b4eaba0953cfd/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = req...
var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class PublishConfig { constructor({ uuid: uuid1, ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
94c66b4433a3cb9cd2c92e56946b4eaba0953cfd
815
https://github.com/octoblu/meshblu/blob/94c66b4433a3cb9cd2c92e56946b4eaba0953cfd/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class Pu...
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
94c66b4433a3cb9cd2c92e56946b4eaba0953cfd
815
https://github.com/octoblu/meshblu/blob/94c66b4433a3cb9cd2c92e56946b4eaba0953cfd/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:completion
completion
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
fetchDevice: (uuid, callback) => device = new Device {uuid}, {@database} device.fetch (error, result) => callback null, result # ignore errors, cause why not? fetchToAndFromDevice: ({fromUuid, toUuid}, callback) => async.parallel { fromDevice: async.apply @fetchDevice, fromUuid toDevice...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
94c66b4433a3cb9cd2c92e56946b4eaba0953cfd
815
https://github.com/octoblu/meshblu/blob/94c66b4433a3cb9cd2c92e56946b4eaba0953cfd/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:2:raw_corpus
raw_corpus
database: @database forwardedFor: @forwardedFor publishConfig.publish callback module.exports = PublishConfig
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
94c66b4433a3cb9cd2c92e56946b4eaba0953cfd
815
https://github.com/octoblu/meshblu/blob/94c66b4433a3cb9cd2c92e56946b4eaba0953cfd/lib/publishConfig.coffee
51
55
octoblu/meshblu:lib/publishConfig.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript database: @database forwardedFor: @forwardedFor publishConfig.publish callback module.exports = PublishConfig ```
({ database: this.database({ forwardedFor: this.forwardedFor }) }); publishConfig.publish(callback); module.exports = PublishConfig;
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
94c66b4433a3cb9cd2c92e56946b4eaba0953cfd
815
https://github.com/octoblu/meshblu/blob/94c66b4433a3cb9cd2c92e56946b4eaba0953cfd/lib/publishConfig.coffee
51
55
octoblu/meshblu:lib/publishConfig.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ database: this.database({ forwardedFor: this.forwardedFor }) }); publishConfig.publish(callback); module.exports = PublishConfig; ```
database: @database forwardedFor: @forwardedFor publishConfig.publish callback module.exports = PublishConfig
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
94c66b4433a3cb9cd2c92e56946b4eaba0953cfd
815
https://github.com/octoblu/meshblu/blob/94c66b4433a3cb9cd2c92e56946b4eaba0953cfd/lib/publishConfig.coffee
51
55
octoblu/meshblu:lib/publishConfig.coffee:2:completion
completion
database: @database forwardedFor: @forwardedFor
publishConfig.publish callback module.exports = PublishConfig
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
94c66b4433a3cb9cd2c92e56946b4eaba0953cfd
815
https://github.com/octoblu/meshblu/blob/94c66b4433a3cb9cd2c92e56946b4eaba0953cfd/lib/publishConfig.coffee
51
55
octoblu/meshblu:lib/publishConfig.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
1c575e6450bd17976188accb32080ee5bc027085
815
https://github.com/octoblu/meshblu/blob/1c575e6450bd17976188accb32080ee5bc027085/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = req...
var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class PublishConfig { constructor({ uuid: uuid1, ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
1c575e6450bd17976188accb32080ee5bc027085
815
https://github.com/octoblu/meshblu/blob/1c575e6450bd17976188accb32080ee5bc027085/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = class Pu...
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
1c575e6450bd17976188accb32080ee5bc027085
815
https://github.com/octoblu/meshblu/blob/1c575e6450bd17976188accb32080ee5bc027085/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:completion
completion
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
callback null, result # ignore errors, cause why not? forwardPublish: ({uuid}, callback) => toUuid = uuid return callback() if _.contains @forwardedFor, toUuid @fetchToAndFromDevice @uuid, toUuid, (error, fromDevice, toDevice) => simpleAuth = new SimpleAuth simpleAuth.canSend fromDevice, toD...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
1c575e6450bd17976188accb32080ee5bc027085
815
https://github.com/octoblu/meshblu/blob/1c575e6450bd17976188accb32080ee5bc027085/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
5ff2b78d94732888598ab74c45e8baadbca4c3fe
815
https://github.com/octoblu/meshblu/blob/5ff2b78d94732888598ab74c45e8baadbca4c3fe/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = req...
var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = (function() { class PublishConfig { constructor({ ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
5ff2b78d94732888598ab74c45e8baadbca4c3fe
815
https://github.com/octoblu/meshblu/blob/5ff2b78d94732888598ab74c45e8baadbca4c3fe/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Device, PublishConfig, Publisher, SimpleAuth, _, async; _ = require('lodash'); async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = (functio...
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
5ff2b78d94732888598ab74c45e8baadbca4c3fe
815
https://github.com/octoblu/meshblu/blob/5ff2b78d94732888598ab74c45e8baadbca4c3fe/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:completion
completion
_ = require 'lodash' async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database,@forwardedFor}) -> Device = require './models/device' @forwardedFor ?= [] @forwa...
callback null, result # ignore errors, cause why not? forwardPublish: ({uuid}, callback) => toUuid = uuid return callback() if _.contains @forwardedFor, toUuid @fetchDevice @uuid, (error, fromDevice) => return callback error if error? @fetchDevice toUuid, (error, toDevice) => return...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
5ff2b78d94732888598ab74c45e8baadbca4c3fe
815
https://github.com/octoblu/meshblu/blob/5ff2b78d94732888598ab74c45e8baadbca4c3fe/lib/publishConfig.coffee
1
50
octoblu/meshblu:lib/publishConfig.coffee:1:raw_corpus
raw_corpus
async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database}) -> Device = require './models/device' publish: (callback) => publisher = new Publisher namespace: 'm...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
13a3c041ea07cf961d2c5c31973225c2fc7f5fac
815
https://github.com/octoblu/meshblu/blob/13a3c041ea07cf961d2c5c31973225c2fc7f5fac/lib/publishConfig.coffee
1
40
octoblu/meshblu:lib/publishConfig.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database}) -> Device = require './models/device' publish: ...
var Device, PublishConfig, Publisher, SimpleAuth, async; async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = (function() { class PublishConfig { constructor({ uuid: uuid1, confi...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
13a3c041ea07cf961d2c5c31973225c2fc7f5fac
815
https://github.com/octoblu/meshblu/blob/13a3c041ea07cf961d2c5c31973225c2fc7f5fac/lib/publishConfig.coffee
1
40
octoblu/meshblu:lib/publishConfig.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Device, PublishConfig, Publisher, SimpleAuth, async; async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; //circular dependencies are awesome. PublishConfig = (function() { class PublishConfig...
async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database}) -> Device = require './models/device' publish: (callback) => publisher = new Publisher namespace: 'm...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
13a3c041ea07cf961d2c5c31973225c2fc7f5fac
815
https://github.com/octoblu/meshblu/blob/13a3c041ea07cf961d2c5c31973225c2fc7f5fac/lib/publishConfig.coffee
1
40
octoblu/meshblu:lib/publishConfig.coffee:1:completion
completion
async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null #circular dependencies are awesome. class PublishConfig constructor: ({@uuid,@config,@database}) -> Device = require './models/device' publish: (callback) => publisher = new Publisher namespace: 'm...
device = new Device {uuid: uuid}, database: @database device.fetch (error, result) => callback null, result # ignore errors, cause why not? forwardPublish: ({uuid}, callback) => toUuid = uuid @fetchDevice @uuid, (error, fromDevice) => return callback error if error? @fetchDevice toUuid...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
13a3c041ea07cf961d2c5c31973225c2fc7f5fac
815
https://github.com/octoblu/meshblu/blob/13a3c041ea07cf961d2c5c31973225c2fc7f5fac/lib/publishConfig.coffee
1
40
octoblu/meshblu:lib/publishConfig.coffee:1:raw_corpus
raw_corpus
async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null class PublishConfig constructor: ({@uuid,@config,@database}) -> Device = require './models/device' publish: (callback) => publisher = new Publisher namespace: 'meshblu' publisher.publish 'confi...
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
04b90646685343d0bffd0da135582e4accf29efe
815
https://github.com/octoblu/meshblu/blob/04b90646685343d0bffd0da135582e4accf29efe/lib/publishConfig.coffee
1
40
octoblu/meshblu:lib/publishConfig.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null class PublishConfig constructor: ({@uuid,@config,@database}) -> Device = require './models/device' publish: (callback) => publisher = new Pu...
var Device, PublishConfig, Publisher, SimpleAuth, async; async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; PublishConfig = (function() { class PublishConfig { constructor({ uuid: uuid1, config, database }) { ...
CoffeeScript
JavaScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
04b90646685343d0bffd0da135582e4accf29efe
815
https://github.com/octoblu/meshblu/blob/04b90646685343d0bffd0da135582e4accf29efe/lib/publishConfig.coffee
1
40
octoblu/meshblu:lib/publishConfig.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Device, PublishConfig, Publisher, SimpleAuth, async; async = require('async'); Publisher = require('./Publisher'); SimpleAuth = require('./SimpleAuth'); Device = null; PublishConfig = (function() { class PublishConfig { constructor({ uuid: uu...
async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null class PublishConfig constructor: ({@uuid,@config,@database}) -> Device = require './models/device' publish: (callback) => publisher = new Publisher namespace: 'meshblu' publisher.publish 'confi...
JavaScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
04b90646685343d0bffd0da135582e4accf29efe
815
https://github.com/octoblu/meshblu/blob/04b90646685343d0bffd0da135582e4accf29efe/lib/publishConfig.coffee
1
40
octoblu/meshblu:lib/publishConfig.coffee:1:completion
completion
async = require 'async' Publisher = require './Publisher' SimpleAuth = require './SimpleAuth' Device = null class PublishConfig constructor: ({@uuid,@config,@database}) -> Device = require './models/device' publish: (callback) => publisher = new Publisher namespace: 'meshblu' publisher.publish 'confi...
device = new Device {uuid: uuid}, database: @database device.fetch (error, result) => callback null, result # ignore errors, cause why not? forwardPublish: ({uuid}, callback) => toUuid = uuid @fetchDevice @uuid, (error, fromDevice) => return callback error if error? @fetchDevice toUuid...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/publishConfig.coffee
MIT
04b90646685343d0bffd0da135582e4accf29efe
815
https://github.com/octoblu/meshblu/blob/04b90646685343d0bffd0da135582e4accf29efe/lib/publishConfig.coffee
1
40
mojs/mojs:spec/shapes/rect.coffee:1:raw_corpus
raw_corpus
Rect = mojs.shapesMap.getShape('rect') Bit = mojs.shapesMap.getShape('bit') ns = 'http://www.w3.org/2000/svg' svg = document.createElementNS?(ns, "svg") rect = new Rect ctx: svg describe 'Rect ->', -> it 'should extend Bit', -> expect(rect instanceof Bit).toBe(true) describe '_declareDefault...
CoffeeScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
1
50
mojs/mojs:spec/shapes/rect.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Rect = mojs.shapesMap.getShape('rect') Bit = mojs.shapesMap.getShape('bit') ns = 'http://www.w3.org/2000/svg' svg = document.createElementNS?(ns, "svg") rect = new Rect ctx: svg describe 'Rect ->', -> it 'should extend Bit', -> expect(re...
var Bit, Rect, ns, rect, svg; Rect = mojs.shapesMap.getShape('rect'); Bit = mojs.shapesMap.getShape('bit'); ns = 'http://www.w3.org/2000/svg'; svg = typeof document.createElementNS === "function" ? document.createElementNS(ns, "svg") : void 0; rect = new Rect({ ctx: svg }); describe('Rect ->', function() { it...
CoffeeScript
JavaScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
1
50
mojs/mojs:spec/shapes/rect.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Bit, Rect, ns, rect, svg; Rect = mojs.shapesMap.getShape('rect'); Bit = mojs.shapesMap.getShape('bit'); ns = 'http://www.w3.org/2000/svg'; svg = typeof document.createElementNS === "function" ? document.createElementNS(ns, "svg") : void 0; rect = new Rect(...
Rect = mojs.shapesMap.getShape('rect') Bit = mojs.shapesMap.getShape('bit') ns = 'http://www.w3.org/2000/svg' svg = document.createElementNS?(ns, "svg") rect = new Rect ctx: svg describe 'Rect ->', -> it 'should extend Bit', -> expect(rect instanceof Bit).toBe(true) describe '_declareDefault...
JavaScript
CoffeeScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
1
50
mojs/mojs:spec/shapes/rect.coffee:1:completion
completion
Rect = mojs.shapesMap.getShape('rect') Bit = mojs.shapesMap.getShape('bit') ns = 'http://www.w3.org/2000/svg' svg = document.createElementNS?(ns, "svg") rect = new Rect ctx: svg describe 'Rect ->', -> it 'should extend Bit', -> expect(rect instanceof Bit).toBe(true) describe '_declareDefault...
it 'should add properties to el', -> # svg = document.createElementNS?(ns, "svg") rect = new Rect radius: 20, x: 50, y: 100, rx: 10, ry: 20 width: 50, height: 50 rect._draw() width = rect.el.getAttribute 'width' height = rect.el.getAttribu...
CoffeeScript
CoffeeScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
1
50
mojs/mojs:spec/shapes/rect.coffee:2:raw_corpus
raw_corpus
radiusY: 50, radiusX: 40, width: 100, height: 200 rect._draw() width = rect.el.getAttribute 'width' height = rect.el.getAttribute 'height' expect(width) .toBe '80' expect(height).toBe '100' x = rect.el.getAttribute 'x' y = rect.el.getAttribute 'y' expec...
CoffeeScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
51
73
mojs/mojs:spec/shapes/rect.coffee:2:completion
completion
radiusY: 50, radiusX: 40, width: 100, height: 200 rect._draw() width = rect.el.getAttribute 'width' height = rect.el.getAttribute 'height' expect(width) .toBe '80' expect(height).toBe '100' x = rect.el.getAttribute 'x' y = rect.el.getAttribute 'y' expec...
svg = document.createElementNS?(ns, "svg") rect = new Rect spyOn(Bit::, '_draw') rect._draw() expect(Bit::_draw).toHaveBeenCalled() describe 'getLength method', -> it 'should calculate total length of the path', -> radius = 100 bit = new Rect ctx: document.creat...
CoffeeScript
CoffeeScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
51
73
mojs/mojs:spec/shapes/rect.coffee:3:raw_corpus
raw_corpus
it 'should calculate total length of the with different radiusX/Y', -> radiusX = 100 radiusY = 50 bit = new Rect ctx: document.createElementNS ns, 'svg' radiusX: radiusX radiusY: radiusY expect(bit._getLength()).toBe 2*(2*radiusX + 2*radiusY)
CoffeeScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
75
82
mojs/mojs:spec/shapes/rect.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should calculate total length of the with different radiusX/Y', -> radiusX = 100 radiusY = 50 bit = new Rect ctx: document.createElementNS ns, 'svg' radiusX: radiusX radiusY: radiusY expect(bit._getLength())....
it('should calculate total length of the with different radiusX/Y', function() { var bit, radiusX, radiusY; radiusX = 100; radiusY = 50; bit = new Rect({ ctx: document.createElementNS(ns, 'svg'), radiusX: radiusX, radiusY: radiusY }); return expect(bit._getLength()).toBe(2 * (2 * radiusX + 2 * r...
CoffeeScript
JavaScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
75
82
mojs/mojs:spec/shapes/rect.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should calculate total length of the with different radiusX/Y', function() { var bit, radiusX, radiusY; radiusX = 100; radiusY = 50; bit = new Rect({ ctx: document.createElementNS(ns, 'svg'), radiusX: radiusX, radiusY: radiusY }); return...
it 'should calculate total length of the with different radiusX/Y', -> radiusX = 100 radiusY = 50 bit = new Rect ctx: document.createElementNS ns, 'svg' radiusX: radiusX radiusY: radiusY expect(bit._getLength()).toBe 2*(2*radiusX + 2*radiusY)
JavaScript
CoffeeScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
75
82
mojs/mojs:spec/shapes/rect.coffee:3:completion
completion
it 'should calculate total length of the with different radiusX/Y', -> radiusX = 100 radiusY = 50 bit = new Rect
ctx: document.createElementNS ns, 'svg' radiusX: radiusX radiusY: radiusY expect(bit._getLength()).toBe 2*(2*radiusX + 2*radiusY)
CoffeeScript
CoffeeScript
mojs/mojs
spec/shapes/rect.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/rect.coffee
75
82
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:raw_corpus
raw_corpus
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep counts over CUTOFF in descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or ...
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep counts over CUTOFF in descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully mat...
var BATCH_SIZE, CUTOFF, check_usage; check_usage = function() { var ref, usage, valid; usage = ` Run a frequency count on the raw 10M xato password set and keep counts over CUTOFF in descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully mat...
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var BATCH_SIZE, CUTOFF, check_usage; check_usage = function() { var ref, usage, valid; usage = ` Run a frequency count on the raw 10M xato password set and keep counts over CUTOFF in descending frequency. That file can be found by googling around for: "xato 10...
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep counts over CUTOFF in descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or ...
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:completion
completion
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep counts over CUTOFF in descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or ...
then change into data-scripts directory and run: coffee count_xato.coffee --nodejs xato_file.txt ../data/passwords.txt ''' valid = process.argv.length == 5 valid = valid and process.argv[0] == 'coffee' and process.argv[2] in ['--nodejs', '-n'] valid = valid and __dirname.split('/').slice(-1)[0] == 'data-scr...
CoffeeScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:2:raw_corpus
raw_corpus
counts = {} # maps pw -> count skipped_lines = 0 # skipped lines in xato file -- lines w/o two tokens line_count = 0 # current number of lines processed
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
47
49
dropbox/zxcvbn:data-scripts/count_xato.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript counts = {} # maps pw -> count skipped_lines = 0 # skipped lines in xato file -- lines w/o two tokens line_count = 0 # current number of lines processed ```
var counts, line_count, skipped_lines; counts = {}; // maps pw -> count skipped_lines = 0; // skipped lines in xato file -- lines w/o two tokens line_count = 0; // current number of lines processed
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
47
49
dropbox/zxcvbn:data-scripts/count_xato.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var counts, line_count, skipped_lines; counts = {}; // maps pw -> count skipped_lines = 0; // skipped lines in xato file -- lines w/o two tokens line_count = 0; // current number of lines processed ```
counts = {} # maps pw -> count skipped_lines = 0 # skipped lines in xato file -- lines w/o two tokens line_count = 0 # current number of lines processed
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
47
49
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:raw_corpus
raw_corpus
should_include = (password, xato_rank) -> for i in [0...password.length] if password.charCodeAt(i) > 127 # xato mostly contains ascii-only passwords, so in practice # this will only skip one or two top passwords over the cutoff. # were that not the case / were this used on a different data sourc...
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
54
80
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should_include = (password, xato_rank) -> for i in [0...password.length] if password.charCodeAt(i) > 127 # xato mostly contains ascii-only passwords, so in practice # this will only skip one or two top passwords over the cutoff. # were tha...
var should_include; should_include = function(password, xato_rank) { var i, j, k, l, len, len1, match, matcher, matches, ref, ref1; for (i = j = 0, ref = password.length; (0 <= ref ? j < ref : j > ref); i = 0 <= ref ? ++j : --j) { if (password.charCodeAt(i) > 127) { // xato mostly contains ascii-only pas...
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
54
80
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var should_include; should_include = function(password, xato_rank) { var i, j, k, l, len, len1, match, matcher, matches, ref, ref1; for (i = j = 0, ref = password.length; (0 <= ref ? j < ref : j > ref); i = 0 <= ref ? ++j : --j) { if (password.charCodeAt(i...
should_include = (password, xato_rank) -> for i in [0...password.length] if password.charCodeAt(i) > 127 # xato mostly contains ascii-only passwords, so in practice # this will only skip one or two top passwords over the cutoff. # were that not the case / were this used on a different data sourc...
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
54
80
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:completion
completion
should_include = (password, xato_rank) -> for i in [0...password.length] if password.charCodeAt(i) > 127 # xato mostly contains ascii-only passwords, so in practice # this will only skip one or two top passwords over the cutoff. # were that not the case / were this used on a different data sourc...
matching.sequence_match matching.regex_match matching.date_match ] matches.push.apply matches, matcher.call(matching, password) matches = matches.filter (match) -> # only keep matches that span full password match.i == 0 and match.j == password.length - 1 for match in matches if scoring....
CoffeeScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
54
80
dropbox/zxcvbn:data-scripts/count_xato.coffee:5:raw_corpus
raw_corpus
prune = (counts) -> for pw, count of counts if count == 1 delete counts[pw]
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
82
85
dropbox/zxcvbn:data-scripts/count_xato.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript prune = (counts) -> for pw, count of counts if count == 1 delete counts[pw] ```
var prune; prune = function(counts) { var count, pw, results; results = []; for (pw in counts) { count = counts[pw]; if (count === 1) { results.push(delete counts[pw]); } else { results.push(void 0); } } return results; };
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
82
85
dropbox/zxcvbn:data-scripts/count_xato.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var prune; prune = function(counts) { var count, pw, results; results = []; for (pw in counts) { count = counts[pw]; if (count === 1) { results.push(delete counts[pw]); } else { results.push(void 0); } } return results; }; ```
prune = (counts) -> for pw, count of counts if count == 1 delete counts[pw]
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
82
85
dropbox/zxcvbn:data-scripts/count_xato.coffee:5:completion
completion
prune = (counts) -> for pw, count of counts
if count == 1 delete counts[pw]
CoffeeScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
82
85
dropbox/zxcvbn:data-scripts/count_xato.coffee:6:raw_corpus
raw_corpus
main = (xato_filename, output_filename) -> stream = byline.createStream fs.createReadStream(xato_filename, encoding: 'utf8') stream.on 'readable', -> while null != (line = stream.read()) line_count += 1 if line_count % BATCH_SIZE == 0 console.log 'counting tokens:', line_count prune ...
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
87
129
dropbox/zxcvbn:data-scripts/count_xato.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript main = (xato_filename, output_filename) -> stream = byline.createStream fs.createReadStream(xato_filename, encoding: 'utf8') stream.on 'readable', -> while null != (line = stream.read()) line_count += 1 if line_count % BATCH_SIZE == 0 ...
var main; main = function(xato_filename, output_filename) { var stream; stream = byline.createStream(fs.createReadStream(xato_filename, { encoding: 'utf8' })); stream.on('readable', function() { var line, password, results, tokens, username; results = []; while (null !== (line = stream.read()))...
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
87
129
dropbox/zxcvbn:data-scripts/count_xato.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var main; main = function(xato_filename, output_filename) { var stream; stream = byline.createStream(fs.createReadStream(xato_filename, { encoding: 'utf8' })); stream.on('readable', function() { var line, password, results, tokens, username; re...
main = (xato_filename, output_filename) -> stream = byline.createStream fs.createReadStream(xato_filename, encoding: 'utf8') stream.on 'readable', -> while null != (line = stream.read()) line_count += 1 if line_count % BATCH_SIZE == 0 console.log 'counting tokens:', line_count prune ...
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
87
129
dropbox/zxcvbn:data-scripts/count_xato.coffee:6:completion
completion
main = (xato_filename, output_filename) -> stream = byline.createStream fs.createReadStream(xato_filename, encoding: 'utf8') stream.on 'readable', -> while null != (line = stream.read()) line_count += 1 if line_count % BATCH_SIZE == 0 console.log 'counting tokens:', line_count prune ...
console.log 'copying to tuples' for pw, count of counts if count > CUTOFF pairs.push [pw, count] delete counts[pw] # save memory to avoid v8 1GB limit console.log 'sorting' pairs.sort (p1, p2) -> # sort by count. higher counts go first. p2[1] - p1[1] console.log 'filterin...
CoffeeScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
67c4ece9efc40c9d0a1d7d995b2b22a91be500c2
15,961
https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/data-scripts/count_xato.coffee
87
129
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:raw_corpus
raw_corpus
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or keyboar...
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
31bb0df296a44867447ea813d7dedcd3a0af885d
15,961
https://github.com/dropbox/zxcvbn/blob/31bb0df296a44867447ea813d7dedcd3a0af885d/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match acco...
var BATCH_SIZE, CUTOFF, check_usage; check_usage = function() { var ref, usage, valid; usage = ` Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match acco...
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
31bb0df296a44867447ea813d7dedcd3a0af885d
15,961
https://github.com/dropbox/zxcvbn/blob/31bb0df296a44867447ea813d7dedcd3a0af885d/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var BATCH_SIZE, CUTOFF, check_usage; check_usage = function() { var ref, usage, valid; usage = ` Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-millio...
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or keyboar...
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
31bb0df296a44867447ea813d7dedcd3a0af885d
15,961
https://github.com/dropbox/zxcvbn/blob/31bb0df296a44867447ea813d7dedcd3a0af885d/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:completion
completion
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or keyboar...
then change into data-scripts directory and run: coffee count_xato.coffee --nodejs xato_file.txt ../data/passwords.txt ''' valid = process.argv.length == 5 valid = valid and process.argv[0] == 'coffee' and process.argv[2] in ['--nodejs', '-n'] valid = valid and __dirname.split('/').slice(-1)[0] == 'data-scr...
CoffeeScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
31bb0df296a44867447ea813d7dedcd3a0af885d
15,961
https://github.com/dropbox/zxcvbn/blob/31bb0df296a44867447ea813d7dedcd3a0af885d/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:raw_corpus
raw_corpus
should_include = (password, xato_rank) -> for i in [0...password.length] if password.charCodeAt(i) > 127 # xato mostly contains ascii-only passwords, so in practice # this will only skip one or two things. were that not the case / # were this used on a different data source, consider using ...
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
3bf5a6cf3aa916dabb4c4e73a6ae24277ab36170
15,961
https://github.com/dropbox/zxcvbn/blob/3bf5a6cf3aa916dabb4c4e73a6ae24277ab36170/data-scripts/count_xato.coffee
54
80
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should_include = (password, xato_rank) -> for i in [0...password.length] if password.charCodeAt(i) > 127 # xato mostly contains ascii-only passwords, so in practice # this will only skip one or two things. were that not the case / # were t...
var should_include; should_include = function(password, xato_rank) { var i, j, k, l, len, len1, match, matcher, matches, ref, ref1; for (i = j = 0, ref = password.length; (0 <= ref ? j < ref : j > ref); i = 0 <= ref ? ++j : --j) { if (password.charCodeAt(i) > 127) { // xato mostly contains ascii-only pas...
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
3bf5a6cf3aa916dabb4c4e73a6ae24277ab36170
15,961
https://github.com/dropbox/zxcvbn/blob/3bf5a6cf3aa916dabb4c4e73a6ae24277ab36170/data-scripts/count_xato.coffee
54
80
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var should_include; should_include = function(password, xato_rank) { var i, j, k, l, len, len1, match, matcher, matches, ref, ref1; for (i = j = 0, ref = password.length; (0 <= ref ? j < ref : j > ref); i = 0 <= ref ? ++j : --j) { if (password.charCodeAt(i...
should_include = (password, xato_rank) -> for i in [0...password.length] if password.charCodeAt(i) > 127 # xato mostly contains ascii-only passwords, so in practice # this will only skip one or two things. were that not the case / # were this used on a different data source, consider using ...
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
3bf5a6cf3aa916dabb4c4e73a6ae24277ab36170
15,961
https://github.com/dropbox/zxcvbn/blob/3bf5a6cf3aa916dabb4c4e73a6ae24277ab36170/data-scripts/count_xato.coffee
54
80
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:completion
completion
should_include = (password, xato_rank) -> for i in [0...password.length] if password.charCodeAt(i) > 127 # xato mostly contains ascii-only passwords, so in practice # this will only skip one or two things. were that not the case / # were this used on a different data source, consider using ...
matching.sequence_match matching.regex_match matching.date_match ] matches.push.apply matches, matcher.call(matching, password) matches = matches.filter (match) -> # only keep matches that span full password match.i == 0 and match.j == password.length - 1 for match in matches if scoring....
CoffeeScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
3bf5a6cf3aa916dabb4c4e73a6ae24277ab36170
15,961
https://github.com/dropbox/zxcvbn/blob/3bf5a6cf3aa916dabb4c4e73a6ae24277ab36170/data-scripts/count_xato.coffee
54
80
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:raw_corpus
raw_corpus
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or keyboar...
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
bc1f782a2d1d74be19e3c6379a899bad52bcc3c8
15,961
https://github.com/dropbox/zxcvbn/blob/bc1f782a2d1d74be19e3c6379a899bad52bcc3c8/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match acco...
var BATCH_SIZE, CUTOFF, check_usage; check_usage = function() { var ref, usage, valid; usage = ` Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match acco...
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
bc1f782a2d1d74be19e3c6379a899bad52bcc3c8
15,961
https://github.com/dropbox/zxcvbn/blob/bc1f782a2d1d74be19e3c6379a899bad52bcc3c8/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var BATCH_SIZE, CUTOFF, check_usage; check_usage = function() { var ref, usage, valid; usage = ` Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-millio...
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or keyboar...
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
bc1f782a2d1d74be19e3c6379a899bad52bcc3c8
15,961
https://github.com/dropbox/zxcvbn/blob/bc1f782a2d1d74be19e3c6379a899bad52bcc3c8/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:1:completion
completion
check_usage = () -> usage = ''' Run a frequency count on the raw 10M xato password set and keep the top 40k by descending frequency. That file can be found by googling around for: "xato 10-million-combos.txt" Passwords that both: -- fully match according to zxcvbn's date, year, repeat, sequence or keyboar...
then change into data-scripts directory and run: coffee count_xato.coffee --nodejs xato_file.txt ../data/passwords.txt ''' valid = process.argv.length == 5 valid = valid and process.argv[0] == 'coffee' and process.argv[2] in ['--nodejs', '-n'] valid = valid and __dirname.split('/').slice(-1)[0] == 'data-scr...
CoffeeScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
bc1f782a2d1d74be19e3c6379a899bad52bcc3c8
15,961
https://github.com/dropbox/zxcvbn/blob/bc1f782a2d1d74be19e3c6379a899bad52bcc3c8/data-scripts/count_xato.coffee
9
45
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:raw_corpus
raw_corpus
should_include = (password, xato_rank) -> matches = [] for matcher in [ matching.spatial_match matching.repeat_match matching.sequence_match matching.regex_match matching.date_match ] matches.push.apply matches, matcher.call(matching, password) matches = matches.filter (match) -> #...
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
bc1f782a2d1d74be19e3c6379a899bad52bcc3c8
15,961
https://github.com/dropbox/zxcvbn/blob/bc1f782a2d1d74be19e3c6379a899bad52bcc3c8/data-scripts/count_xato.coffee
54
72
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should_include = (password, xato_rank) -> matches = [] for matcher in [ matching.spatial_match matching.repeat_match matching.sequence_match matching.regex_match matching.date_match ] matches.push.apply matches, matcher.call(matchi...
var should_include; should_include = function(password, xato_rank) { var i, j, len, len1, match, matcher, matches, ref; matches = []; ref = [matching.spatial_match, matching.repeat_match, matching.sequence_match, matching.regex_match, matching.date_match]; for (i = 0, len = ref.length; i < len; i++) { matc...
CoffeeScript
JavaScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
bc1f782a2d1d74be19e3c6379a899bad52bcc3c8
15,961
https://github.com/dropbox/zxcvbn/blob/bc1f782a2d1d74be19e3c6379a899bad52bcc3c8/data-scripts/count_xato.coffee
54
72
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var should_include; should_include = function(password, xato_rank) { var i, j, len, len1, match, matcher, matches, ref; matches = []; ref = [matching.spatial_match, matching.repeat_match, matching.sequence_match, matching.regex_match, matching.date_match]; ...
should_include = (password, xato_rank) -> matches = [] for matcher in [ matching.spatial_match matching.repeat_match matching.sequence_match matching.regex_match matching.date_match ] matches.push.apply matches, matcher.call(matching, password) matches = matches.filter (match) -> #...
JavaScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
bc1f782a2d1d74be19e3c6379a899bad52bcc3c8
15,961
https://github.com/dropbox/zxcvbn/blob/bc1f782a2d1d74be19e3c6379a899bad52bcc3c8/data-scripts/count_xato.coffee
54
72
dropbox/zxcvbn:data-scripts/count_xato.coffee:4:completion
completion
should_include = (password, xato_rank) -> matches = [] for matcher in [ matching.spatial_match matching.repeat_match matching.sequence_match matching.regex_match matching.date_match ]
matches.push.apply matches, matcher.call(matching, password) matches = matches.filter (match) -> # only keep matches that span full password match.i == 0 and match.j == password.length - 1 for match in matches if scoring.estimate_guesses(match, password) < xato_rank # filter out this entry: non-di...
CoffeeScript
CoffeeScript
dropbox/zxcvbn
data-scripts/count_xato.coffee
MIT
bc1f782a2d1d74be19e3c6379a899bad52bcc3c8
15,961
https://github.com/dropbox/zxcvbn/blob/bc1f782a2d1d74be19e3c6379a899bad52bcc3c8/data-scripts/count_xato.coffee
54
72
jianliaoim/talk-os:talk-web/client/app/activity-item.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass propTypes: activity: React.PropTypes.instanceOf(Immutable.Map).isRequired translateCreator: (creator) -> return '' if not creator? or not Immutable.Map.isMap creator creator.get('name') or '' translateTarget: -> return '' if not @props.activity.get 'target' ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/activity-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/activity-item.coffee
13
62
jianliaoim/talk-os:talk-web/client/app/activity-item.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass propTypes: activity: React.PropTypes.instanceOf(Immutable.Map).isRequired translateCreator: (creator) -> return '' if not creator? or not Immutable.Map.isMap creator creator.get('name') or '' translateTarget...
module.exports = React.createClass({ propTypes: { activity: React.PropTypes.instanceOf(Immutable.Map).isRequired }, translateCreator: function(creator) { if ((creator == null) || !Immutable.Map.isMap(creator)) { return ''; } return creator.get('name') || ''; }, translateTarget: function(...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/activity-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/activity-item.coffee
13
62
jianliaoim/talk-os:talk-web/client/app/activity-item.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ propTypes: { activity: React.PropTypes.instanceOf(Immutable.Map).isRequired }, translateCreator: function(creator) { if ((creator == null) || !Immutable.Map.isMap(creator)) { return ''; } return creat...
module.exports = React.createClass propTypes: activity: React.PropTypes.instanceOf(Immutable.Map).isRequired translateCreator: (creator) -> return '' if not creator? or not Immutable.Map.isMap creator creator.get('name') or '' translateTarget: -> return '' if not @props.activity.get 'target' ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/activity-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/activity-item.coffee
13
62
jianliaoim/talk-os:talk-web/client/app/activity-item.coffee:1:completion
completion
module.exports = React.createClass propTypes: activity: React.PropTypes.instanceOf(Immutable.Map).isRequired translateCreator: (creator) -> return '' if not creator? or not Immutable.Map.isMap creator creator.get('name') or '' translateTarget: -> return '' if not @props.activity.get 'target' ...
formatTime: (time) -> moment(time).format 'MM/DD HH:mm' getText: -> creatorText = @translateCreator @props.activity.get('creator') activityText = @translateText @props.activity.get('text') targetText = @translateTarget @props.activity span null, "#{creatorText} #{activityText}".trim(), if t...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/activity-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/activity-item.coffee
13
62
jianliaoim/talk-os:talk-web/client/app/activity-item.coffee:2:raw_corpus
raw_corpus
renderAvatar: -> if @props.activity.get('type') style = backgroundImage: "url(#{@props.activity.getIn ['creator', 'avatarUrl']})" i className: 'activity-item-avatar', style: style, @renderType() renderType: -> type = switch @props.activity.get 'type' when 'room' then 's...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/activity-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/activity-item.coffee
63
106
jianliaoim/talk-os:talk-web/client/app/activity-item.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript renderAvatar: -> if @props.activity.get('type') style = backgroundImage: "url(#{@props.activity.getIn ['creator', 'avatarUrl']})" i className: 'activity-item-avatar', style: style, @renderType() renderType: -> type = swit...
({ renderAvatar: function() { var style; if (this.props.activity.get('type')) { style = { backgroundImage: `url(${this.props.activity.getIn(['creator', 'avatarUrl'])})` }; } return i({ className: 'activity-item-avatar', style: style }, this.renderType()); }, ren...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/activity-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/activity-item.coffee
63
106
jianliaoim/talk-os:talk-web/client/app/activity-item.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ renderAvatar: function() { var style; if (this.props.activity.get('type')) { style = { backgroundImage: `url(${this.props.activity.getIn(['creator', 'avatarUrl'])})` }; } return i({ className: 'activity-item-avatar', ...
renderAvatar: -> if @props.activity.get('type') style = backgroundImage: "url(#{@props.activity.getIn ['creator', 'avatarUrl']})" i className: 'activity-item-avatar', style: style, @renderType() renderType: -> type = switch @props.activity.get 'type' when 'room' then 's...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/activity-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/activity-item.coffee
63
106
jianliaoim/talk-os:talk-web/client/app/activity-item.coffee:2:completion
completion
renderAvatar: -> if @props.activity.get('type') style = backgroundImage: "url(#{@props.activity.getIn ['creator', 'avatarUrl']})" i className: 'activity-item-avatar', style: style, @renderType() renderType: -> type = switch @props.activity.get 'type' when 'room' then 's...
when 'room' then '#63C7F2' when 'story' switch @props.activity.getIn ['target', 'category'] when 'file' then '#A66A95' when 'link' then '#67C395' when 'topic' then '#FFCB2B' else '#AFB0B3' i className: "ti ti-#{type}", style: style render: -> if ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/activity-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/activity-item.coffee
63
106
jianliaoim/talk-os:talk-web/client/module/light-modal.coffee:1:raw_corpus
raw_corpus
cx = require 'classnames' React = require 'react' keycode = require 'keycode' mixinLayered = require '../mixin/layered' Transition = React.createFactory require './transition' { a, div, span, noscript } = React.DOM T = React.PropTypes module.exports = React.createClass displayName: 'light-modal' mixins: [mixinL...
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/light-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/light-modal.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/light-modal.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript cx = require 'classnames' React = require 'react' keycode = require 'keycode' mixinLayered = require '../mixin/layered' Transition = React.createFactory require './transition' { a, div, span, noscript } = React.DOM T = React.PropTypes module.exports = React.c...
var React, T, Transition, a, cx, div, keycode, mixinLayered, noscript, span; cx = require('classnames'); React = require('react'); keycode = require('keycode'); mixinLayered = require('../mixin/layered'); Transition = React.createFactory(require('./transition')); ({a, div, span, noscript} = React.DOM); T = React...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/module/light-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/light-modal.coffee
1
50
jianliaoim/talk-os:talk-web/client/module/light-modal.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var React, T, Transition, a, cx, div, keycode, mixinLayered, noscript, span; cx = require('classnames'); React = require('react'); keycode = require('keycode'); mixinLayered = require('../mixin/layered'); Transition = React.createFactory(require('./transition'...
cx = require 'classnames' React = require 'react' keycode = require 'keycode' mixinLayered = require '../mixin/layered' Transition = React.createFactory require './transition' { a, div, span, noscript } = React.DOM T = React.PropTypes module.exports = React.createClass displayName: 'light-modal' mixins: [mixinL...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/light-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/light-modal.coffee
1
50