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
gss/engine:src/types/Matrix.coffee:3:raw_corpus
raw_corpus
class Matrix.Transformation1 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] ] @define translateX: (matrix, x) -> @mat3 matrix, 'translate', [x, 1, 1] translateY: (matrix, y) -> @mat3 matrix, 'translate', [1, y, 1] translateZ: (ma...
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
3e90ea84f0ee0eb9f948bbe938cd6467cb2c6a98
2,854
https://github.com/gss/engine/blob/3e90ea84f0ee0eb9f948bbe938cd6467cb2c6a98/src/types/Matrix.coffee
30
74
gss/engine:src/types/Matrix.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Matrix.Transformation1 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] ] @define translateX: (matrix, x) -> @mat3 matrix, 'translate', [x, 1, 1] translateY: (matrix, y) -> @mat3 ...
Matrix.Transformation1 = (function() { class Transformation1 extends Matrix {}; Transformation1.prototype.signature = [ [ { matrix: ['Matrix'] } ], { x: ['Variable', 'Number'] } ]; Transformation1.define({ translateX: function(matrix, x) { return this.ma...
CoffeeScript
JavaScript
gss/engine
src/types/Matrix.coffee
MIT
3e90ea84f0ee0eb9f948bbe938cd6467cb2c6a98
2,854
https://github.com/gss/engine/blob/3e90ea84f0ee0eb9f948bbe938cd6467cb2c6a98/src/types/Matrix.coffee
30
74
gss/engine:src/types/Matrix.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Matrix.Transformation1 = (function() { class Transformation1 extends Matrix {}; Transformation1.prototype.signature = [ [ { matrix: ['Matrix'] } ], { x: ['Variable', 'Number'] } ]; Transformation1.define({ ...
class Matrix.Transformation1 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] ] @define translateX: (matrix, x) -> @mat3 matrix, 'translate', [x, 1, 1] translateY: (matrix, y) -> @mat3 matrix, 'translate', [1, y, 1] translateZ: (ma...
JavaScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
3e90ea84f0ee0eb9f948bbe938cd6467cb2c6a98
2,854
https://github.com/gss/engine/blob/3e90ea84f0ee0eb9f948bbe938cd6467cb2c6a98/src/types/Matrix.coffee
30
74
gss/engine:src/types/Matrix.coffee:3:completion
completion
class Matrix.Transformation1 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] ] @define translateX: (matrix, x) -> @mat3 matrix, 'translate', [x, 1, 1] translateY: (matrix, y) -> @mat3 matrix, 'translate', [1, y, 1] translateZ: (ma...
rotateY: (matrix, y) -> @mat3 matrix, 'rotateY', y * 360 rotateZ: (matrix, z) -> @mat4 matrix, 'rotateZ', z * 360 scaleX: (matrix, x) -> @mat3 matrix, 'scale', [x, 1, 1] scaleY: (matrix, y) -> @mat3 matrix, 'scale', [1, y, 1] scaleZ...
CoffeeScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
3e90ea84f0ee0eb9f948bbe938cd6467cb2c6a98
2,854
https://github.com/gss/engine/blob/3e90ea84f0ee0eb9f948bbe938cd6467cb2c6a98/src/types/Matrix.coffee
30
74
gss/engine:src/types/Matrix.coffee:1:raw_corpus
raw_corpus
class Matrix extends Command type: 'Matrix' @Matrix: require('../../vendor/gl-matrix') matrix: -> matrix3d: -> mat3: (matrix, method, a, b, c) -> if matrix.length == 9 return mat3[method](matrix, matrix, a, b, c) else return mat4[method](matrix, matrix, a, b, c) mat4: (matrix, metho...
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
3
23
gss/engine:src/types/Matrix.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Matrix extends Command type: 'Matrix' @Matrix: require('../../vendor/gl-matrix') matrix: -> matrix3d: -> mat3: (matrix, method, a, b, c) -> if matrix.length == 9 return mat3[method](matrix, matrix, a, b, c) else return mat4...
var Matrix; Matrix = (function() { class Matrix extends Command { matrix() {} matrix3d() {} mat3(matrix, method, a, b, c) { if (matrix.length === 9) { return mat3[method](matrix, matrix, a, b, c); } else { return mat4[method](matrix, matrix, a, b, c); } } mat4...
CoffeeScript
JavaScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
3
23
gss/engine:src/types/Matrix.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Matrix; Matrix = (function() { class Matrix extends Command { matrix() {} matrix3d() {} mat3(matrix, method, a, b, c) { if (matrix.length === 9) { return mat3[method](matrix, matrix, a, b, c); } else { return mat4[me...
class Matrix extends Command type: 'Matrix' @Matrix: require('../../vendor/gl-matrix') matrix: -> matrix3d: -> mat3: (matrix, method, a, b, c) -> if matrix.length == 9 return mat3[method](matrix, matrix, a, b, c) else return mat4[method](matrix, matrix, a, b, c) mat4: (matrix, metho...
JavaScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
3
23
gss/engine:src/types/Matrix.coffee:1:completion
completion
class Matrix extends Command type: 'Matrix' @Matrix: require('../../vendor/gl-matrix') matrix: -> matrix3d: -> mat3: (matrix, method, a, b, c) ->
if matrix.length == 9 return mat3[method](matrix, matrix, a, b, c) else return mat4[method](matrix, matrix, a, b, c) mat4: (matrix, method, a, b, c) -> if matrix.length == 9 matrix = mat4.fromMat3(matrix) return mat4[method](matrix, matrix, a, b, c) # 1-axis transform
CoffeeScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
3
23
gss/engine:src/types/Matrix.coffee:2:raw_corpus
raw_corpus
class Matrix.Transformation1 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] ] @define translateX: (matrix, x) -> @mat3 matrix, 'translate', [x, 1, 1] translateY: (matrix, y) -> @mat3 matrix, 'translate', [1, y, 1] translateZ: (ma...
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
24
68
gss/engine:src/types/Matrix.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Matrix.Transformation1 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] ] @define translateX: (matrix, x) -> @mat3 matrix, 'translate', [x, 1, 1] translateY: (matrix, y) -> @mat3 ...
Matrix.Transformation1 = (function() { class Transformation1 extends Matrix {}; Transformation1.prototype.signature = [ [ { matrix: ['Matrix'] } ], { x: ['Variable', 'Number'] } ]; Transformation1.define({ translateX: function(matrix, x) { return this.ma...
CoffeeScript
JavaScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
24
68
gss/engine:src/types/Matrix.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Matrix.Transformation1 = (function() { class Transformation1 extends Matrix {}; Transformation1.prototype.signature = [ [ { matrix: ['Matrix'] } ], { x: ['Variable', 'Number'] } ]; Transformation1.define({ ...
class Matrix.Transformation1 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] ] @define translateX: (matrix, x) -> @mat3 matrix, 'translate', [x, 1, 1] translateY: (matrix, y) -> @mat3 matrix, 'translate', [1, y, 1] translateZ: (ma...
JavaScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
24
68
gss/engine:src/types/Matrix.coffee:2:completion
completion
class Matrix.Transformation1 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] ] @define translateX: (matrix, x) -> @mat3 matrix, 'translate', [x, 1, 1] translateY: (matrix, y) -> @mat3 matrix, 'translate', [1, y, 1] translateZ: (ma...
rotateY: (matrix, y) -> @mat3 matrix, 'rotateY', y rotateZ: (matrix, z) -> @mat4 matrix, 'rotateZ', z scaleX: (matrix, x) -> @mat3 matrix, 'scale', [x, 1, 1] scaleY: (matrix, y) -> @mat3 matrix, 'scale', [1, y, 1] scaleZ: (matr...
CoffeeScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
24
68
gss/engine:src/types/Matrix.coffee:4:raw_corpus
raw_corpus
class Matrix.Transformation3 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] y: ['Variable', 'Number'] z: ['Variable', 'Number'] ] @define translate3d: (matrix, x, y = x, z = 0) -> if z == 0 @mat3 matrix, 'translate', [x, y] ...
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
84
105
gss/engine:src/types/Matrix.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Matrix.Transformation3 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] y: ['Variable', 'Number'] z: ['Variable', 'Number'] ] @define translate3d: (matrix, x, y = x, z = 0) -> if z...
Matrix.Transformation3 = (function() { class Transformation3 extends Matrix {}; Transformation3.prototype.signature = [ [ { matrix: ['Matrix'] } ], { x: ['Variable', 'Number'], y: ['Variable', 'Number'], z: ['Variable', 'Number'] } ]; Transform...
CoffeeScript
JavaScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
84
105
gss/engine:src/types/Matrix.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Matrix.Transformation3 = (function() { class Transformation3 extends Matrix {}; Transformation3.prototype.signature = [ [ { matrix: ['Matrix'] } ], { x: ['Variable', 'Number'], y: ['Variable', 'Number'], ...
class Matrix.Transformation3 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] y: ['Variable', 'Number'] z: ['Variable', 'Number'] ] @define translate3d: (matrix, x, y = x, z = 0) -> if z == 0 @mat3 matrix, 'translate', [x, y] ...
JavaScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
84
105
gss/engine:src/types/Matrix.coffee:4:completion
completion
class Matrix.Transformation3 extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] y: ['Variable', 'Number'] z: ['Variable', 'Number'] ] @define translate3d: (matrix, x, y = x, z = 0) -> if z == 0
@mat3 matrix, 'translate', [x, y] else @mat4 matrix, 'translate', [x, y, z] scale3d: (matrix, x, y = x, z = 1) -> if z == 1 @mat3 matrix, 'scale', [x, y] else @mat4 matrix, 'scale', [x, y, z] # 3 axis + angle
CoffeeScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
84
105
gss/engine:src/types/Matrix.coffee:5:raw_corpus
raw_corpus
class Matrix.Transformation3A extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] y: ['Variable', 'Number'] z: ['Variable', 'Number'] a: ['Variable', 'Number'] ] @define rotate3d: (matrix, x, y = x, z = 0, angle) -> if z == 0 ...
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
106
120
gss/engine:src/types/Matrix.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Matrix.Transformation3A extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] y: ['Variable', 'Number'] z: ['Variable', 'Number'] a: ['Variable', 'Number'] ] @define rotate3d: (m...
Matrix.Transformation3A = (function() { class Transformation3A extends Matrix {}; Transformation3A.prototype.signature = [ [ { matrix: ['Matrix'] } ], { x: ['Variable', 'Number'], y: ['Variable', 'Number'], z: ['Variable', 'Number'], a: ['Variable...
CoffeeScript
JavaScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
106
120
gss/engine:src/types/Matrix.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Matrix.Transformation3A = (function() { class Transformation3A extends Matrix {}; Transformation3A.prototype.signature = [ [ { matrix: ['Matrix'] } ], { x: ['Variable', 'Number'], y: ['Variable', 'Number'], ...
class Matrix.Transformation3A extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] y: ['Variable', 'Number'] z: ['Variable', 'Number'] a: ['Variable', 'Number'] ] @define rotate3d: (matrix, x, y = x, z = 0, angle) -> if z == 0 ...
JavaScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
106
120
gss/engine:src/types/Matrix.coffee:5:completion
completion
class Matrix.Transformation3A extends Matrix signature: [ [matrix: ['Matrix']] x: ['Variable', 'Number'] y: ['Variable', 'Number'] z: ['Variable', 'Number'] a: ['Variable', 'Number']
] @define rotate3d: (matrix, x, y = x, z = 0, angle) -> if z == 0 @mat3 matrix, 'rotate', [x, y], angle else @mat4 matrix, 'rotate', [x, y, z], angle
CoffeeScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd
2,854
https://github.com/gss/engine/blob/46d7f4fab6d9b171a2f3e5b2ebc1dd21cfd2fadd/src/types/Matrix.coffee
106
120
meltingice/psd.js:lib/psd/color.coffee:1:raw_corpus
raw_corpus
Util = require './util.coffee' module.exports = # Converts from the CMYK color space to the RGB color space using # a preset color profile. cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = ...
CoffeeScript
meltingice/psd.js
lib/psd/color.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/color.coffee
1
10
meltingice/psd.js:lib/psd/color.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Util = require './util.coffee' module.exports = # Converts from the CMYK color space to the RGB color space using # a preset color profile. cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (...
var Util; Util = require('./util.coffee'); module.exports = { // Converts from the CMYK color space to the RGB color space using // a preset color profile. cmykToRgb: function(c, m, y, k) { var b, g, r; r = Util.clamp((65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255); g = Util.clamp((65535 - (m * (...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/color.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/color.coffee
1
10
meltingice/psd.js:lib/psd/color.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Util; Util = require('./util.coffee'); module.exports = { // Converts from the CMYK color space to the RGB color space using // a preset color profile. cmykToRgb: function(c, m, y, k) { var b, g, r; r = Util.clamp((65535 - (c * (255 - k) + (k <<...
Util = require './util.coffee' module.exports = # Converts from the CMYK color space to the RGB color space using # a preset color profile. cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = ...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/color.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/color.coffee
1
10
meltingice/psd.js:lib/psd/color.coffee:1:completion
completion
Util = require './util.coffee' module.exports = # Converts from the CMYK color space to the RGB color space using # a preset color profile.
cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = Util.clamp (65535 - (y * (255 - k) + (k << 8))) >> 8, 0, 255 [r, g, b]
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/color.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/color.coffee
1
10
meltingice/psd.js:lib/psd/color.coffee:1:raw_corpus
raw_corpus
Util = require './util.coffee' module.exports = cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = Util.clamp (65535 - (y * (255 - k) + (k << 8))) >> 8, 0, 255 [r, g, b]
CoffeeScript
meltingice/psd.js
lib/psd/color.coffee
MIT
8560364d7fc7df297564c685d9e54b87f1635342
2,846
https://github.com/meltingice/psd.js/blob/8560364d7fc7df297564c685d9e54b87f1635342/lib/psd/color.coffee
1
8
meltingice/psd.js:lib/psd/color.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Util = require './util.coffee' module.exports = cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = Util.clamp (65535 - (y * (255 - k) + (k...
var Util; Util = require('./util.coffee'); module.exports = { cmykToRgb: function(c, m, y, k) { var b, g, r; r = Util.clamp((65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255); g = Util.clamp((65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255); b = Util.clamp((65535 - (y * (255 - k) + (k << 8))) >> 8,...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/color.coffee
MIT
8560364d7fc7df297564c685d9e54b87f1635342
2,846
https://github.com/meltingice/psd.js/blob/8560364d7fc7df297564c685d9e54b87f1635342/lib/psd/color.coffee
1
8
meltingice/psd.js:lib/psd/color.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Util; Util = require('./util.coffee'); module.exports = { cmykToRgb: function(c, m, y, k) { var b, g, r; r = Util.clamp((65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255); g = Util.clamp((65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255); b ...
Util = require './util.coffee' module.exports = cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = Util.clamp (65535 - (y * (255 - k) + (k << 8))) >> 8, 0, 255 [r, g, b]
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/color.coffee
MIT
8560364d7fc7df297564c685d9e54b87f1635342
2,846
https://github.com/meltingice/psd.js/blob/8560364d7fc7df297564c685d9e54b87f1635342/lib/psd/color.coffee
1
8
meltingice/psd.js:lib/psd/color.coffee:1:completion
completion
Util = require './util.coffee' module.exports = cmykToRgb: (c, m, y, k) ->
r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = Util.clamp (65535 - (y * (255 - k) + (k << 8))) >> 8, 0, 255 [r, g, b]
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/color.coffee
MIT
8560364d7fc7df297564c685d9e54b87f1635342
2,846
https://github.com/meltingice/psd.js/blob/8560364d7fc7df297564c685d9e54b87f1635342/lib/psd/color.coffee
1
8
meltingice/psd.js:lib/psd/color.coffee:1:raw_corpus
raw_corpus
Util = require './util.coffee' module.exports = cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = Util.clamp (65535 - (y * (255 - k) + (k << 8))) >> 8, 0, 255 [r, g, b] # def cmyk_to_rgb(...
CoffeeScript
meltingice/psd.js
lib/psd/color.coffee
MIT
dcdec79219bb8b08f1d546a243320f799333a471
2,846
https://github.com/meltingice/psd.js/blob/dcdec79219bb8b08f1d546a243320f799333a471/lib/psd/color.coffee
1
16
meltingice/psd.js:lib/psd/color.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Util = require './util.coffee' module.exports = cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = Util.clamp (65535 - (y * (255 - k) + (k...
var Util; Util = require('./util.coffee'); module.exports = { cmykToRgb: function(c, m, y, k) { var b, g, r; r = Util.clamp((65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255); g = Util.clamp((65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255); b = Util.clamp((65535 - (y * (255 - k) + (k << 8))) >> 8,...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/color.coffee
MIT
dcdec79219bb8b08f1d546a243320f799333a471
2,846
https://github.com/meltingice/psd.js/blob/dcdec79219bb8b08f1d546a243320f799333a471/lib/psd/color.coffee
1
16
meltingice/psd.js:lib/psd/color.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Util; Util = require('./util.coffee'); module.exports = { cmykToRgb: function(c, m, y, k) { var b, g, r; r = Util.clamp((65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255); g = Util.clamp((65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255); b ...
Util = require './util.coffee' module.exports = cmykToRgb: (c, m, y, k) -> r = Util.clamp (65535 - (c * (255 - k) + (k << 8))) >> 8, 0, 255 g = Util.clamp (65535 - (m * (255 - k) + (k << 8))) >> 8, 0, 255 b = Util.clamp (65535 - (y * (255 - k) + (k << 8))) >> 8, 0, 255 [r, g, b] # def cmyk_to_rgb(...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/color.coffee
MIT
dcdec79219bb8b08f1d546a243320f799333a471
2,846
https://github.com/meltingice/psd.js/blob/dcdec79219bb8b08f1d546a243320f799333a471/lib/psd/color.coffee
1
16
mauricemach/zappa:tests/helpers.coffee:1:raw_corpus
raw_corpus
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper role: (name) -> if @request? @redirect '/login' unless @user.role is name @get '/': -> @user = role: 'commoner' @role 'lord' c =...
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
725e0103755c9a92fe84de06cee82db00e51a1f8
943
https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper role: (name) -> if @request? @redirect '/login' unless @user.role is name @get '/': -> ...
var port, zappa; zappa = require('../src/zappa'); port = 15100; this.tests = { http: function(t) { var c, zapp; t.expect(1, 2); t.wait(3000); zapp = zappa(port++, function() { this.helper({ role: function(name) { if (this.request != null) { if (this.user.role !==...
CoffeeScript
JavaScript
mauricemach/zappa
tests/helpers.coffee
MIT
725e0103755c9a92fe84de06cee82db00e51a1f8
943
https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var port, zappa; zappa = require('../src/zappa'); port = 15100; this.tests = { http: function(t) { var c, zapp; t.expect(1, 2); t.wait(3000); zapp = zappa(port++, function() { this.helper({ role: function(name) { if (thi...
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper role: (name) -> if @request? @redirect '/login' unless @user.role is name @get '/': -> @user = role: 'commoner' @role 'lord' c =...
JavaScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
725e0103755c9a92fe84de06cee82db00e51a1f8
943
https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:completion
completion
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper role: (name) -> if @request? @redirect '/login' unless @user.role is name @get '/': -> @user = role: 'commoner' @role 'lord' c =...
c.get '/', (err, res) -> t.equal 1, res.statusCode, 302 t.ok 2, res.headers.location.match /\/login$/ multiple: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper sum: (a, b) -> a + b @helper subtract: (a, b) -> a - b @get '/': -> t.equal 1, @sum(1, 2...
CoffeeScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
725e0103755c9a92fe84de06cee82db00e51a1f8
943
https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:raw_corpus
raw_corpus
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper role: (name) -> if @request? @redirect '/login' unless @data.user.role is name @get '/': -> @data.user = role: 'comonner' @role 'lord...
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
a62a122802b516d4195b60a741cef044d2ef59bb
943
https://github.com/mauricemach/zappa/blob/a62a122802b516d4195b60a741cef044d2ef59bb/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper role: (name) -> if @request? @redirect '/login' unless @data.user.role is name @get '/': -> ...
var port, zappa; zappa = require('../src/zappa'); port = 15100; this.tests = { http: function(t) { var c, zapp; t.expect(1, 2); t.wait(3000); zapp = zappa(port++, function() { this.helper({ role: function(name) { if (this.request != null) { if (this.data.user.rol...
CoffeeScript
JavaScript
mauricemach/zappa
tests/helpers.coffee
MIT
a62a122802b516d4195b60a741cef044d2ef59bb
943
https://github.com/mauricemach/zappa/blob/a62a122802b516d4195b60a741cef044d2ef59bb/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var port, zappa; zappa = require('../src/zappa'); port = 15100; this.tests = { http: function(t) { var c, zapp; t.expect(1, 2); t.wait(3000); zapp = zappa(port++, function() { this.helper({ role: function(name) { if (thi...
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper role: (name) -> if @request? @redirect '/login' unless @data.user.role is name @get '/': -> @data.user = role: 'comonner' @role 'lord...
JavaScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
a62a122802b516d4195b60a741cef044d2ef59bb
943
https://github.com/mauricemach/zappa/blob/a62a122802b516d4195b60a741cef044d2ef59bb/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:completion
completion
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper role: (name) -> if @request? @redirect '/login' unless @data.user.role is name @get '/': -> @data.user = role: 'comonner' @role 'lord...
c.get '/', (err, res) -> t.equal 1, res.statusCode, 302 t.ok 2, res.headers.location.match /\/login$/ multiple: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> @helper sum: (a, b) -> a + b @helper subtract: (a, b) -> a - b @get '/': -> t.equal 1, @sum(1, 2...
CoffeeScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
a62a122802b516d4195b60a741cef044d2ef59bb
943
https://github.com/mauricemach/zappa/blob/a62a122802b516d4195b60a741cef044d2ef59bb/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:raw_corpus
raw_corpus
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' c = t.cl...
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
119552daa059635e97de9b2967c1e1fcdcfb64dd
943
https://github.com/mauricemach/zappa/blob/119552daa059635e97de9b2967c1e1fcdcfb64dd/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @...
var port, zappa; zappa = require('../src/zappa'); port = 15100; this.tests = { http: function(t) { var c, zapp; t.expect(1, 2); t.wait(3000); zapp = zappa(port++, function() { helper({ role: function(name) { if (typeof request !== "undefined" && request !== null) { ...
CoffeeScript
JavaScript
mauricemach/zappa
tests/helpers.coffee
MIT
119552daa059635e97de9b2967c1e1fcdcfb64dd
943
https://github.com/mauricemach/zappa/blob/119552daa059635e97de9b2967c1e1fcdcfb64dd/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var port, zappa; zappa = require('../src/zappa'); port = 15100; this.tests = { http: function(t) { var c, zapp; t.expect(1, 2); t.wait(3000); zapp = zappa(port++, function() { helper({ role: function(name) { if (typeof r...
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' c = t.cl...
JavaScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
119552daa059635e97de9b2967c1e1fcdcfb64dd
943
https://github.com/mauricemach/zappa/blob/119552daa059635e97de9b2967c1e1fcdcfb64dd/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:completion
completion
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' c = t.cl...
c.get '/', (err, res) -> t.equal 1, res.statusCode, 302 t.ok 2, res.headers.location.match /\/login$/ multiple: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, {t}, -> helper sum: (a, b) -> a + b helper subtract: (a, b) -> a - b get '/': -> t.equal 1, sum(1, ...
CoffeeScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
119552daa059635e97de9b2967c1e1fcdcfb64dd
943
https://github.com/mauricemach/zappa/blob/119552daa059635e97de9b2967c1e1fcdcfb64dd/tests/helpers.coffee
1
37
mauricemach/zappa:tests/helpers.coffee:1:raw_corpus
raw_corpus
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' c = t.cl...
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
6a0bf34282a3db50b307b1319d30ff227d4277a9
943
https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/helpers.coffee
1
22
mauricemach/zappa:tests/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @...
var port, zappa; zappa = require('../src/zappa'); port = 15100; this.tests = { http: function(t) { var c, zapp; t.expect(1, 2); t.wait(3000); zapp = zappa(port++, function() { helper({ role: function(name) { if (typeof request !== "undefined" && request !== null) { ...
CoffeeScript
JavaScript
mauricemach/zappa
tests/helpers.coffee
MIT
6a0bf34282a3db50b307b1319d30ff227d4277a9
943
https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/helpers.coffee
1
22
mauricemach/zappa:tests/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var port, zappa; zappa = require('../src/zappa'); port = 15100; this.tests = { http: function(t) { var c, zapp; t.expect(1, 2); t.wait(3000); zapp = zappa(port++, function() { helper({ role: function(name) { if (typeof r...
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' c = t.cl...
JavaScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
6a0bf34282a3db50b307b1319d30ff227d4277a9
943
https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/helpers.coffee
1
22
mauricemach/zappa:tests/helpers.coffee:1:completion
completion
zappa = require '../src/zappa' port = 15100 @tests = http: (t) -> t.expect 1, 2 t.wait 3000 zapp = zappa port++, -> helper role: (name) -> if request?
redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' c = t.client(zapp.app) c.get '/', (err, res) -> t.equal 1, res.statusCode, 302 t.ok 2, res.headers.location.match /\/login$/
CoffeeScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
6a0bf34282a3db50b307b1319d30ff227d4277a9
943
https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/helpers.coffee
1
22
mauricemach/zappa:tests/helpers.coffee:1:raw_corpus
raw_corpus
zappa = require('./support/tester') require('../src/zappa') module.exports = request: -> t = zappa -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' t.response {url: '/'}, {status:...
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
9a07f55f8c030b026a3d2a6bb1f32cde77b6806a
943
https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/helpers.coffee
1
14
mauricemach/zappa:tests/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript zappa = require('./support/tester') require('../src/zappa') module.exports = request: -> t = zappa -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner'...
var zappa; zappa = require('./support/tester')(require('../src/zappa')); module.exports = { request: function() { var t; t = zappa(function() { helper({ role: function(name) { if (typeof request !== "undefined" && request !== null) { if (this.user.role !== name) { ...
CoffeeScript
JavaScript
mauricemach/zappa
tests/helpers.coffee
MIT
9a07f55f8c030b026a3d2a6bb1f32cde77b6806a
943
https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/helpers.coffee
1
14
mauricemach/zappa:tests/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var zappa; zappa = require('./support/tester')(require('../src/zappa')); module.exports = { request: function() { var t; t = zappa(function() { helper({ role: function(name) { if (typeof request !== "undefined" && request !== nul...
zappa = require('./support/tester') require('../src/zappa') module.exports = request: -> t = zappa -> helper role: (name) -> if request? redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' t.response {url: '/'}, {status:...
JavaScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
9a07f55f8c030b026a3d2a6bb1f32cde77b6806a
943
https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/helpers.coffee
1
14
mauricemach/zappa:tests/helpers.coffee:1:completion
completion
zappa = require('./support/tester') require('../src/zappa') module.exports = request: -> t = zappa -> helper role: (name) -> if request?
redirect '/login' unless @user.role is name get '/': -> @user = role: 'comonner' role 'lord' t.response {url: '/'}, {status: 302, headers: {Location: /\/login$/}}
CoffeeScript
CoffeeScript
mauricemach/zappa
tests/helpers.coffee
MIT
9a07f55f8c030b026a3d2a6bb1f32cde77b6806a
943
https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/helpers.coffee
1
14
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee:1:raw_corpus
raw_corpus
gold: silver: the_field: "unknown" award_medals: (first, second, rest...) -> gold: first silver: second the_field: rest contenders: [ "Michael Phelps" "Liu Xiang" "Yao Ming" "Allyson Felix" "Shawn Johnson" "Roman Sebrle" "Guo Jingjing" "Tyson Gay" "Asafa Powell" "Usain Bolt" ] aw...
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee
1
25
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript gold: silver: the_field: "unknown" award_medals: (first, second, rest...) -> gold: first silver: second the_field: rest contenders: [ "Michael Phelps" "Liu Xiang" "Yao Ming" "Allyson Felix" "Shawn Johnson" "Roman Sebrle" "Guo Jing...
({ gold: { silver: { the_field: "unknown" } }, award_medals: function(first, second, ...rest) { return { gold: first, silver: second, the_field: rest }; }, contenders: ["Michael Phelps", "Liu Xiang", "Yao Ming", "Allyson Felix", "Shawn Johnson", "Roman Sebrle", "Guo Jin...
CoffeeScript
JavaScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee
1
25
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ gold: { silver: { the_field: "unknown" } }, award_medals: function(first, second, ...rest) { return { gold: first, silver: second, the_field: rest }; }, contenders: ["Michael Phelps", "Liu Xiang", "Yao Ming", "Al...
gold: silver: the_field: "unknown" award_medals: (first, second, rest...) -> gold: first silver: second the_field: rest contenders: [ "Michael Phelps" "Liu Xiang" "Yao Ming" "Allyson Felix" "Shawn Johnson" "Roman Sebrle" "Guo Jingjing" "Tyson Gay" "Asafa Powell" "Usain Bolt" ] aw...
JavaScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee
1
25
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee:1:completion
completion
gold: silver: the_field: "unknown" award_medals: (first, second, rest...) -> gold: first silver: second the_field: rest contenders: [ "Michael Phelps" "Liu Xiang" "Yao Ming" "Allyson Felix"
"Shawn Johnson" "Roman Sebrle" "Guo Jingjing" "Tyson Gay" "Asafa Powell" "Usain Bolt" ] award_medals contenders... alert "Gold: " + gold alert "Silver: " + silver alert "The Field: " + the_field
CoffeeScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/splats.coffee
1
25
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
41
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2016-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
41
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2016-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
41
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:completion
completion
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# Implements a limited but useful subset of functionality and attempts to parse the results into Cyclotron's format. # For more control, the JSON Data Source should be used directly. # # Always proxies requests through the Cyclotron service. # cyclotronDataSources.factory 'elasticsearchDataSource', ($q, $http, configSe...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
41
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:2:raw_corpus
raw_corpus
if options.options? compiledOptions = _.compile(options.options, {}) _.assign(proxyBody, compiledOptions) if options.awsCredentials? # Add required properties for AWS request signing proxyBody.host = url.hostname() proxyBody.path = url.path() ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
43
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if options.options? compiledOptions = _.compile(options.options, {}) _.assign(proxyBody, compiledOptions) if options.awsCredentials? # Add required properties for AWS request signing proxyBody.host = url.ho...
var compiledOptions, processAggregations; if (options.options != null) { compiledOptions = _.compile(options.options, {}); _.assign(proxyBody, compiledOptions); } if (options.awsCredentials != null) { // Add required properties for AWS request signing proxyBody.host = url.hostname(); proxyBody.path = url.pa...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
43
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var compiledOptions, processAggregations; if (options.options != null) { compiledOptions = _.compile(options.options, {}); _.assign(proxyBody, compiledOptions); } if (options.awsCredentials != null) { // Add required properties for AWS request signing pro...
if options.options? compiledOptions = _.compile(options.options, {}) _.assign(proxyBody, compiledOptions) if options.awsCredentials? # Add required properties for AWS request signing proxyBody.host = url.hostname() proxyBody.path = url.path() ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
43
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:2:completion
completion
if options.options? compiledOptions = _.compile(options.options, {}) _.assign(proxyBody, compiledOptions) if options.awsCredentials? # Add required properties for AWS request signing proxyBody.host = url.hostname() proxyBody.path = url.path() ...
subBucketKey = null # Copy values to newBucket _.forOwn bucket, (value, key) -> if _.isObject(value) and not _.isArray(value) if value.buckets? # This is a sub-aggregation; store the key for later subBucketKey =...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
43
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:3:raw_corpus
raw_corpus
# Return subbuckets instead of current bucket return _.flatten subBuckets # Return updated bucket return newBucket # Flatten any subbuckets return _.flatten buckets processResponse = (response, responseAdapter, reject) -> # Auto-detect between hits/...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
85
127
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:3:completion
completion
# Return subbuckets instead of current bucket return _.flatten subBuckets # Return updated bucket return newBucket # Flatten any subbuckets return _.flatten buckets processResponse = (response, responseAdapter, reject) -> # Auto-detect between hits/...
when 'hits' return _.map response.hits?.hits, _.flattenObject when 'aggregations' return processAggregations response.aggregations else reject('Unknown responseAdapter value "' + responseAdapter + '"') runner = (options) -> $q (resolve...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
85
127
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:4:raw_corpus
raw_corpus
if result.body.responses? # E.g. _msearch responses data = _.map result.body.responses, (response) -> processResponse response, responseAdapter, reject data = _.flatten data else ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
129
167
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:4:completion
completion
if result.body.responses? # E.g. _msearch responses data = _.map result.body.responses, (response) -> processResponse response, responseAdapter, reject data = _.flatten data else ...
if !error? then error = 'Status code: ' + result.statusCode logService.error error reject error # Generate proxy URLs proxyUri = new URI(_.jsExec(options.proxy) || configService.restServiceUrl) .protocol '' # Remove protocol to work w...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
129
167
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
c128079380a86b05d50e9b72359c79f3ee206810
1,544
https://github.com/ExpediaGroup/cyclotron/blob/c128079380a86b05d50e9b72359c79f3ee206810/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2016-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
c128079380a86b05d50e9b72359c79f3ee206810
1,544
https://github.com/ExpediaGroup/cyclotron/blob/c128079380a86b05d50e9b72359c79f3ee206810/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2016-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
c128079380a86b05d50e9b72359c79f3ee206810
1,544
https://github.com/ExpediaGroup/cyclotron/blob/c128079380a86b05d50e9b72359c79f3ee206810/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:completion
completion
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# For more control, the JSON Data Source should be used directly. # # Always proxies requests through the Cyclotron service. # cyclotronDataSources.factory 'elasticsearchDataSource', ($q, $http, configService, dataSourceFactory, logService) -> getProxyRequest = (options) -> options = _.compile options, {} ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
c128079380a86b05d50e9b72359c79f3ee206810
1,544
https://github.com/ExpediaGroup/cyclotron/blob/c128079380a86b05d50e9b72359c79f3ee206810/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law or ag...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mi...
/* * Copyright (c) 2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applicable l...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/license...
### # Copyright (c) 2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law or ag...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:completion
completion
### # Copyright (c) 2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law or ag...
# For more control, the JSON Data Source should be used directly. # # Always proxies requests through the Cyclotron service. # cyclotronDataSources.factory 'elasticsearchDataSource', ($q, $http, configService, dataSourceFactory, logService) -> getProxyRequest = (options) -> options = _.compile options, {} ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:1:completion
completion
### # Copyright (c) 2013-2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
# For more control, the JSON Data Source should be used directly. # # Always proxies requests through the Cyclotron service. # cyclotronDataSources.factory 'elasticsearchDataSource', ($q, $http, configService, dataSourceFactory, logService) -> getProxyRequest = (options) -> options = _.compile options, {} ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:2:raw_corpus
raw_corpus
if options.awsCredentials? # Add required properties for AWS request signing proxyBody.host = url.hostname() proxyBody.path = url.path() proxyBody.awsCredentials = options.awsCredentials return proxyBody # Converts Elasticsearch aggregations response to Cycl...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
44
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if options.awsCredentials? # Add required properties for AWS request signing proxyBody.host = url.hostname() proxyBody.path = url.path() proxyBody.awsCredentials = options.awsCredentials return proxyBody ...
var processAggregations; if (options.awsCredentials != null) { // Add required properties for AWS request signing proxyBody.host = url.hostname(); proxyBody.path = url.path(); proxyBody.awsCredentials = options.awsCredentials; } return proxyBody; // Converts Elasticsearch aggregations response to Cyclotron f...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
44
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var processAggregations; if (options.awsCredentials != null) { // Add required properties for AWS request signing proxyBody.host = url.hostname(); proxyBody.path = url.path(); proxyBody.awsCredentials = options.awsCredentials; } return proxyBody; // Conv...
if options.awsCredentials? # Add required properties for AWS request signing proxyBody.host = url.hostname() proxyBody.path = url.path() proxyBody.awsCredentials = options.awsCredentials return proxyBody # Converts Elasticsearch aggregations response to Cycl...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
44
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:2:completion
completion
if options.awsCredentials? # Add required properties for AWS request signing proxyBody.host = url.hostname() proxyBody.path = url.path() proxyBody.awsCredentials = options.awsCredentials return proxyBody # Converts Elasticsearch aggregations response to Cycl...
_.forOwn bucket, (value, key) -> if _.isObject(value) and not _.isArray(value) if value.buckets? # This is a sub-aggregation; store the key for later subBucketKey = key else if value.value? ne...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
44
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:3:raw_corpus
raw_corpus
# Return updated bucket return newBucket # Flatten any subbuckets return _.flatten buckets processResponse = (response, responseAdapter, reject) -> # Auto-detect between hits/aggregations if responseAdapter == 'auto' if response.aggregations? ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
85
124
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:3:completion
completion
# Return updated bucket return newBucket # Flatten any subbuckets return _.flatten buckets processResponse = (response, responseAdapter, reject) -> # Auto-detect between hits/aggregations if responseAdapter == 'auto' if response.aggregations? ...
when 'aggregations' return processAggregations response.aggregations else reject('Unknown responseAdapter value "' + responseAdapter + '"') runner = (options) -> $q (resolve, reject) -> # Runner Failure errorCallback = (error, status) -> ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
85
124
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:4:raw_corpus
raw_corpus
if result.body.responses? # E.g. _msearch responses data = _.map result.body.responses, (response) -> processResponse response, responseAdapter, reject data = _.flatten data else ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
126
163
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:4:completion
completion
if result.body.responses? # E.g. _msearch responses data = _.map result.body.responses, (response) -> processResponse response, responseAdapter, reject data = _.flatten data else ...
if !error? then error = 'Status code: ' + result.statusCode logService.error error reject error # Do the request, wiring up success/failure handlers proxyUri = (_.jsExec(options.proxy) || configService.restServiceUrl) + '/proxy' # Remove pro...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
126
163
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:4:raw_corpus
raw_corpus
if result.body.responses? # E.g. _msearch responses data = _.map result.body.responses, (response) -> processResponse response, responseAdapter, reject data = _.flatten data else ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d6074320b57a8763c1fbff5ef45de0f9bc4e6752
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
126
160
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:4:completion
completion
if result.body.responses? # E.g. _msearch responses data = _.map result.body.responses, (response) -> processResponse response, responseAdapter, reject data = _.flatten data else ...
else error = result.body?.error if !error? then error = 'Status code: ' + result.statusCode logService.error error reject error # Do the request, wiring up success/failure handlers proxyUrl = (_.jsExec(options.prox...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
d6074320b57a8763c1fbff5ef45de0f9bc4e6752
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
126
160
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:3:raw_corpus
raw_corpus
# Return updated bucket return newBucket # Flatten any subbuckets return _.flatten buckets processResponse = (response, responseAdapter, reject) -> # Auto-detect between hits/aggregations if responseAdapter == 'auto' if response.aggregations? ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
e6c2d6b6ba251383102913db30400f783b64f049
1,544
https://github.com/ExpediaGroup/cyclotron/blob/e6c2d6b6ba251383102913db30400f783b64f049/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
85
123
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:3:completion
completion
# Return updated bucket return newBucket # Flatten any subbuckets return _.flatten buckets processResponse = (response, responseAdapter, reject) -> # Auto-detect between hits/aggregations if responseAdapter == 'auto' if response.aggregations? ...
return _.map response.hits?.hits, _.flattenObject when 'aggregations' return processAggregations response.aggregations else reject('Unknown responseAdapter value "' + responseAdapter + '"') runner = (options) -> $q (resolve, reject) -> # ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
e6c2d6b6ba251383102913db30400f783b64f049
1,544
https://github.com/ExpediaGroup/cyclotron/blob/e6c2d6b6ba251383102913db30400f783b64f049/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
85
123
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:4:raw_corpus
raw_corpus
if result.body.responses? # E.g. _msearch responses data = _.map result.body.responses, (response) -> processResponse response, responseAdapter, reject data = _.flatten data else data = processRespons...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
e6c2d6b6ba251383102913db30400f783b64f049
1,544
https://github.com/ExpediaGroup/cyclotron/blob/e6c2d6b6ba251383102913db30400f783b64f049/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
125
153
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee:4:completion
completion
if result.body.responses? # E.g. _msearch responses data = _.map result.body.responses, (response) -> processResponse response, responseAdapter, reject data = _.flatten data else data = processRespons...
data: data columns: null } # Do the request, wiring up success/failure handlers proxyUrl = (_.jsExec(options.proxy) || configService.restServiceUrl) + '/proxy' req = $http.post proxyUrl, getProxyRequest(options) # Add callback ha...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
MIT
e6c2d6b6ba251383102913db30400f783b64f049
1,544
https://github.com/ExpediaGroup/cyclotron/blob/e6c2d6b6ba251383102913db30400f783b64f049/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.elasticsearch.coffee
125
153
rs/pushd:lib/pushservices/wns.coffee:1:raw_corpus
raw_corpus
wns = require 'wns' class PushServiceWNS tokenFormat: /^https?:\/\/[a-zA-Z0-9-.]+\.notify\.windows\.com\/\S{0,500}$/ validateToken: (token) -> if PushServiceWNS::tokenFormat.test(token) return token constructor: (@conf, @logger, tokenResolver) -> # TODO: tileMapping configurati...
CoffeeScript
rs/pushd
lib/pushservices/wns.coffee
MIT
9dc56de9da2a64903cad510d22d4d0e078a8ba0a
1,157
https://github.com/rs/pushd/blob/9dc56de9da2a64903cad510d22d4d0e078a8ba0a/lib/pushservices/wns.coffee
1
50
rs/pushd:lib/pushservices/wns.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript wns = require 'wns' class PushServiceWNS tokenFormat: /^https?:\/\/[a-zA-Z0-9-.]+\.notify\.windows\.com\/\S{0,500}$/ validateToken: (token) -> if PushServiceWNS::tokenFormat.test(token) return token constructor: (@conf, @logger, ...
var PushServiceWNS, wns; wns = require('wns'); PushServiceWNS = (function() { class PushServiceWNS { validateToken(token) { if (PushServiceWNS.prototype.tokenFormat.test(token)) { return token; } } constructor(conf, logger, tokenResolver) { var base; this.conf = conf; ...
CoffeeScript
JavaScript
rs/pushd
lib/pushservices/wns.coffee
MIT
9dc56de9da2a64903cad510d22d4d0e078a8ba0a
1,157
https://github.com/rs/pushd/blob/9dc56de9da2a64903cad510d22d4d0e078a8ba0a/lib/pushservices/wns.coffee
1
50
rs/pushd:lib/pushservices/wns.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PushServiceWNS, wns; wns = require('wns'); PushServiceWNS = (function() { class PushServiceWNS { validateToken(token) { if (PushServiceWNS.prototype.tokenFormat.test(token)) { return token; } } constructor(conf, logger, toke...
wns = require 'wns' class PushServiceWNS tokenFormat: /^https?:\/\/[a-zA-Z0-9-.]+\.notify\.windows\.com\/\S{0,500}$/ validateToken: (token) -> if PushServiceWNS::tokenFormat.test(token) return token constructor: (@conf, @logger, tokenResolver) -> # TODO: tileMapping configurati...
JavaScript
CoffeeScript
rs/pushd
lib/pushservices/wns.coffee
MIT
9dc56de9da2a64903cad510d22d4d0e078a8ba0a
1,157
https://github.com/rs/pushd/blob/9dc56de9da2a64903cad510d22d4d0e078a8ba0a/lib/pushservices/wns.coffee
1
50
rs/pushd:lib/pushservices/wns.coffee:1:completion
completion
wns = require 'wns' class PushServiceWNS tokenFormat: /^https?:\/\/[a-zA-Z0-9-.]+\.notify\.windows\.com\/\S{0,500}$/ validateToken: (token) -> if PushServiceWNS::tokenFormat.test(token) return token constructor: (@conf, @logger, tokenResolver) -> # TODO: tileMapping configurati...
if @conf.launchTemplate and info.version >= 7.5 try launch = payload.compileTemplate(@conf.launchTemplate) @logger?.silly("Launch: #{launch}") catch e @logger?.error("C...
CoffeeScript
CoffeeScript
rs/pushd
lib/pushservices/wns.coffee
MIT
9dc56de9da2a64903cad510d22d4d0e078a8ba0a
1,157
https://github.com/rs/pushd/blob/9dc56de9da2a64903cad510d22d4d0e078a8ba0a/lib/pushservices/wns.coffee
1
50
rs/pushd:lib/pushservices/wns.coffee:2:raw_corpus
raw_corpus
if sender try options = { client_id: @conf.client_id, client_secret: @conf.client_secret } if launch? options["launch"] = launch @logger?.silly("WNS client URL: #{info.token}") sender info.token, note...
CoffeeScript
rs/pushd
lib/pushservices/wns.coffee
MIT
9dc56de9da2a64903cad510d22d4d0e078a8ba0a
1,157
https://github.com/rs/pushd/blob/9dc56de9da2a64903cad510d22d4d0e078a8ba0a/lib/pushservices/wns.coffee
51
67
rs/pushd:lib/pushservices/wns.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if sender try options = { client_id: @conf.client_id, client_secret: @conf.client_secret } if launch? options["launch"] = launch @logger?.silly("WNS client URL: #{...
var error, options, ref, ref1; if (sender) { try { options = { client_id: this.conf.client_id, client_secret: this.conf.client_secret }; if (typeof launch !== "undefined" && launch !== null) { options["launch"] = launch; } if ((ref = this.logger) != null) { ref.silly(`WNS ...
CoffeeScript
JavaScript
rs/pushd
lib/pushservices/wns.coffee
MIT
9dc56de9da2a64903cad510d22d4d0e078a8ba0a
1,157
https://github.com/rs/pushd/blob/9dc56de9da2a64903cad510d22d4d0e078a8ba0a/lib/pushservices/wns.coffee
51
67
rs/pushd:lib/pushservices/wns.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var error, options, ref, ref1; if (sender) { try { options = { client_id: this.conf.client_id, client_secret: this.conf.client_secret }; if (typeof launch !== "undefined" && launch !== null) { options["launch"] = launch; } i...
if sender try options = { client_id: @conf.client_id, client_secret: @conf.client_secret } if launch? options["launch"] = launch @logger?.silly("WNS client URL: #{info.token}") sender info.token, note...
JavaScript
CoffeeScript
rs/pushd
lib/pushservices/wns.coffee
MIT
9dc56de9da2a64903cad510d22d4d0e078a8ba0a
1,157
https://github.com/rs/pushd/blob/9dc56de9da2a64903cad510d22d4d0e078a8ba0a/lib/pushservices/wns.coffee
51
67