Dataset Viewer
Auto-converted to Parquet Duplicate
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
Atraci/Atraci:coffee/_update.coffee:1:raw_corpus
raw_corpus
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] latestVersion = data[getOpera...
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_update.coffee
1
40
Atraci/Atraci:coffee/_update.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[...
var request, versionCompare; request = require('request'); request({ url: Settings.get('updateUrl'), json: true }, function(error, response, data) { var latestDescription, latestVersion; if (!error && response.statusCode === 200) { if (data.updateUrl && data.downloadUrl) { Settings.set('updateUrl', ...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_update.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_update.coffee
1
40
Atraci/Atraci:coffee/_update.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var request, versionCompare; request = require('request'); request({ url: Settings.get('updateUrl'), json: true }, function(error, response, data) { var latestDescription, latestVersion; if (!error && response.statusCode === 200) { if (data.updateUrl ...
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] latestVersion = data[getOpera...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_update.coffee
1
40
Atraci/Atraci:coffee/_update.coffee:1:completion
completion
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] latestVersion = data[getOpera...
", (e) -> if e gui.Shell.openExternal(data.downloadUrl) ) versionCompare = (left, right) -> return false unless typeof left + typeof right is "stringstring" a = left.split(".") b = right.split(".") i = 0 len = Math.max(a.length, b.length) while i < len if (a[i] and not b[i...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_update.coffee
1
40
Atraci/Atraci:coffee/_update.coffee:1:raw_corpus
raw_corpus
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] if v...
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
452e6497b9e7c046992487ddc63e2d15c1e111de
800
https://github.com/Atraci/Atraci/blob/452e6497b9e7c046992487ddc63e2d15c1e111de/coffee/_update.coffee
1
29
Atraci/Atraci:coffee/_update.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUr...
var request, versionCompare; request = require('request'); request({ url: Settings.get('updateUrl'), json: true }, function(error, response, data) { if (!error && response.statusCode === 200) { if (data.updateUrl && data.downloadUrl) { Settings.set('updateUrl', data.updateUrl); } if (data[getO...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_update.coffee
MIT
452e6497b9e7c046992487ddc63e2d15c1e111de
800
https://github.com/Atraci/Atraci/blob/452e6497b9e7c046992487ddc63e2d15c1e111de/coffee/_update.coffee
1
29
Atraci/Atraci:coffee/_update.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var request, versionCompare; request = require('request'); request({ url: Settings.get('updateUrl'), json: true }, function(error, response, data) { if (!error && response.statusCode === 200) { if (data.updateUrl && data.downloadUrl) { Settings.se...
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] if v...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
452e6497b9e7c046992487ddc63e2d15c1e111de
800
https://github.com/Atraci/Atraci/blob/452e6497b9e7c046992487ddc63e2d15c1e111de/coffee/_update.coffee
1
29
Atraci/Atraci:coffee/_update.coffee:1:completion
completion
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] if v...
) versionCompare = (left, right) -> return false unless typeof left + typeof right is "stringstring" a = left.split(".") b = right.split(".") i = 0 len = Math.max(a.length, b.length) while i < len if (a[i] and not b[i] and parseInt(a[i]) > 0) or (parseInt(a[i]) > parseInt(b[i])) ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
452e6497b9e7c046992487ddc63e2d15c1e111de
800
https://github.com/Atraci/Atraci/blob/452e6497b9e7c046992487ddc63e2d15c1e111de/coffee/_update.coffee
1
29
Atraci/Atraci:coffee/_update.coffee:1:raw_corpus
raw_corpus
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] if v...
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_update.coffee
1
27
Atraci/Atraci:coffee/_update.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUr...
var request, versionCompare; request = require('request'); request({ url: Settings.get('updateUrl'), json: true }, function(error, response, data) { if (!error && response.statusCode === 200) { if (data.updateUrl && data.downloadUrl) { Settings.set('updateUrl', data.updateUrl); } if (data[getO...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_update.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_update.coffee
1
27
Atraci/Atraci:coffee/_update.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var request, versionCompare; request = require('request'); request({ url: Settings.get('updateUrl'), json: true }, function(error, response, data) { if (!error && response.statusCode === 200) { if (data.updateUrl && data.downloadUrl) { Settings.se...
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] if v...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_update.coffee
1
27
Atraci/Atraci:coffee/_update.coffee:1:completion
completion
request = require('request') request url: Settings.get('updateUrl') json: true , (error, response, data) -> if not error and response.statusCode is 200 if data.updateUrl and data.downloadUrl Settings.set('updateUrl', data.updateUrl) if data[getOperatingSystem()] if v...
versionCompare = (left, right) -> return false unless typeof left + typeof right is "stringstring" a = left.split(".") b = right.split(".") i = 0 len = Math.max(a.length, b.length) while i < len if (a[i] and not b[i] and parseInt(a[i]) > 0) or (parseInt(a[i]) > parseInt(b[i])) ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_update.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_update.coffee
1
27
oozcitak/xmlbuilder-js:src/XMLNodeList.coffee:1:raw_corpus
raw_corpus
# Represents a list of nodes module.exports = class XMLNodeList # Initializes a new instance of `XMLNodeList` # This is just a wrapper around an ordinary # JS array. # # `nodes` the array containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty @::, 'length', get: () -> @nodes....
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNodeList.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLNodeList.coffee
1
28
oozcitak/xmlbuilder-js:src/XMLNodeList.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Represents a list of nodes module.exports = class XMLNodeList # Initializes a new instance of `XMLNodeList` # This is just a wrapper around an ordinary # JS array. # # `nodes` the array containing nodes. constructor: (@nodes) -> # DOM level 1 ...
// Represents a list of nodes var XMLNodeList; module.exports = XMLNodeList = (function() { class XMLNodeList { // Initializes a new instance of `XMLNodeList` // This is just a wrapper around an ordinary // JS array. // `nodes` the array containing nodes. constructor(nodes) { this.nodes = ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLNodeList.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLNodeList.coffee
1
28
oozcitak/xmlbuilder-js:src/XMLNodeList.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Represents a list of nodes var XMLNodeList; module.exports = XMLNodeList = (function() { class XMLNodeList { // Initializes a new instance of `XMLNodeList` // This is just a wrapper around an ordinary // JS array. // `nodes` the array contain...
# Represents a list of nodes module.exports = class XMLNodeList # Initializes a new instance of `XMLNodeList` # This is just a wrapper around an ordinary # JS array. # # `nodes` the array containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty @::, 'length', get: () -> @nodes....
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNodeList.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLNodeList.coffee
1
28
oozcitak/xmlbuilder-js:src/XMLNodeList.coffee:1:completion
completion
# Represents a list of nodes module.exports = class XMLNodeList # Initializes a new instance of `XMLNodeList` # This is just a wrapper around an ordinary # JS array. # # `nodes` the array containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty @::, 'length', get: () -> @nodes....
# Creates and returns a deep clone of `this` # clone: () -> # this class should not be cloned since it wraps # around a given array. The calling function should check # whether the wrapped array is null and supply a new array # (from the clone). @nodes = null # DOM Level 1 item: (index) ->...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNodeList.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLNodeList.coffee
1
28
oozcitak/xmlbuilder-js:src/XMLNodeList.coffee:1:raw_corpus
raw_corpus
# Represents a list of nodes module.exports = class XMLNodeList # Initializes a new instance of `XMLNodeList` # This is just a wrapper around an ordinary # JS array. # # `nodes` the array containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty @, 'length', get: () -> @nodes....
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNodeList.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLNodeList.coffee
1
26
oozcitak/xmlbuilder-js:src/XMLNodeList.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Represents a list of nodes module.exports = class XMLNodeList # Initializes a new instance of `XMLNodeList` # This is just a wrapper around an ordinary # JS array. # # `nodes` the array containing nodes. constructor: (@nodes) -> # DOM level 1 ...
// Represents a list of nodes var XMLNodeList; module.exports = XMLNodeList = class XMLNodeList { // Initializes a new instance of `XMLNodeList` // This is just a wrapper around an ordinary // JS array. // `nodes` the array containing nodes. constructor(nodes) { this.nodes = nodes; // DOM level 1 ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLNodeList.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLNodeList.coffee
1
26
oozcitak/xmlbuilder-js:src/XMLNodeList.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Represents a list of nodes var XMLNodeList; module.exports = XMLNodeList = class XMLNodeList { // Initializes a new instance of `XMLNodeList` // This is just a wrapper around an ordinary // JS array. // `nodes` the array containing nodes. constructor...
# Represents a list of nodes module.exports = class XMLNodeList # Initializes a new instance of `XMLNodeList` # This is just a wrapper around an ordinary # JS array. # # `nodes` the array containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty @, 'length', get: () -> @nodes....
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNodeList.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLNodeList.coffee
1
26
oozcitak/xmlbuilder-js:src/XMLNodeList.coffee:1:completion
completion
# Represents a list of nodes module.exports = class XMLNodeList # Initializes a new instance of `XMLNodeList` # This is just a wrapper around an ordinary # JS array. # # `nodes` the array containing nodes. constructor: (@nodes) -> # DOM level 1 Object.defineProperty @, 'length', get: () -> @nodes....
# Creates and returns a deep clone of `this` # clone: () -> # this class should not be cloned since it wraps # around a given array. The calling function should check # whether the wrapped array is null and supply a new array # (from the clone). @nodes = null # DOM Level 1 item: (index) ->...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLNodeList.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLNodeList.coffee
1
26
mojs/mojs:spec/easing/approximate.coffee:1:raw_corpus
raw_corpus
approximate = mojs.easing.approximate describe 'approximate method ->', -> describe '_sample method', -> it 'should call _proximate method with fn, samples', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Math.pow( 10, n ) approximate fn, n samples = ...
CoffeeScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
1
39
mojs/mojs:spec/easing/approximate.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript approximate = mojs.easing.approximate describe 'approximate method ->', -> describe '_sample method', -> it 'should call _proximate method with fn, samples', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Ma...
var approximate; approximate = mojs.easing.approximate; describe('approximate method ->', function() { return describe('_sample method', function() { it('should call _proximate method with fn, samples', function() { var fn, i, index, j, keys, n, p, ref, samples, samplesCount, step; spyOn(approximate...
CoffeeScript
JavaScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
1
39
mojs/mojs:spec/easing/approximate.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var approximate; approximate = mojs.easing.approximate; describe('approximate method ->', function() { return describe('_sample method', function() { it('should call _proximate method with fn, samples', function() { var fn, i, index, j, keys, n, p, re...
approximate = mojs.easing.approximate describe 'approximate method ->', -> describe '_sample method', -> it 'should call _proximate method with fn, samples', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Math.pow( 10, n ) approximate fn, n samples = ...
JavaScript
CoffeeScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
1
39
mojs/mojs:spec/easing/approximate.coffee:1:completion
completion
approximate = mojs.easing.approximate describe 'approximate method ->', -> describe '_sample method', -> it 'should call _proximate method with fn, samples', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Math.pow( 10, n ) approximate fn, n samples = ...
for i in [0...samplesCount-1] p += step index = parseFloat(p.toFixed(n)); expect(samples[ index ]).toBe fn(p) expect(samples[1]).toBe fn(1) it 'should preserve presicion', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Math.pow( 10, n ...
CoffeeScript
CoffeeScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
1
39
mojs/mojs:spec/easing/approximate.coffee:2:raw_corpus
raw_corpus
it 'should set base to the samples', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Math.pow( 10, n ) approximate fn, n samples = approximate._proximate.calls.first().args[0] expect(samples.base).toBe n it 'should return a function', -> fn =...
CoffeeScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
41
80
mojs/mojs:spec/easing/approximate.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should set base to the samples', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Math.pow( 10, n ) approximate fn, n samples = approximate._proximate.calls.first().args[0] expect(samples.base)...
it('should set base to the samples', function() { var fn, n, samples, samplesCount; spyOn(approximate, '_proximate'); fn = function(k) { return 2 * k; }; n = 4; samplesCount = Math.pow(10, n); approximate(fn, n); samples = approximate._proximate.calls.first().args[0]; return expect(samples.base).t...
CoffeeScript
JavaScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
41
80
mojs/mojs:spec/easing/approximate.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should set base to the samples', function() { var fn, n, samples, samplesCount; spyOn(approximate, '_proximate'); fn = function(k) { return 2 * k; }; n = 4; samplesCount = Math.pow(10, n); approximate(fn, n); samples = approximate._proximate...
it 'should set base to the samples', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Math.pow( 10, n ) approximate fn, n samples = approximate._proximate.calls.first().args[0] expect(samples.base).toBe n it 'should return a function', -> fn =...
JavaScript
CoffeeScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
41
80
mojs/mojs:spec/easing/approximate.coffee:2:completion
completion
it 'should set base to the samples', -> spyOn approximate, '_proximate' fn = (k)-> 2*k n = 4 samplesCount = Math.pow( 10, n ) approximate fn, n samples = approximate._proximate.calls.first().args[0] expect(samples.base).toBe n it 'should return a function', -> fn =...
expect(result(p)).toBeCloseTo fn(p) p += Math.random() if p > 1 then p = 0 it 'should return samples', -> spyOn(approximate, '_proximate').and.callThrough() fn = (k)-> 2*k n = 4 result = approximate(fn, n) samples = approximate._proximate.calls.first().args[0] e...
CoffeeScript
CoffeeScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
41
80
mojs/mojs:spec/easing/approximate.coffee:3:raw_corpus
raw_corpus
expect(approximate._proximate).toHaveBeenCalledWith loadSamples samples = approximate._proximate.calls.first().args[0] expect(result.getSamples()).toBe loadSamples it 'should be able to load with stringified samples', -> spyOn(approximate, '_proximate').and.callThrough() loadSamples = { a:...
CoffeeScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
82
96
mojs/mojs:spec/easing/approximate.coffee:3:completion
completion
expect(approximate._proximate).toHaveBeenCalledWith loadSamples samples = approximate._proximate.calls.first().args[0] expect(result.getSamples()).toBe loadSamples it 'should be able to load with stringified samples', -> spyOn(approximate, '_proximate').and.callThrough()
loadSamples = { a: 2, c: 3, d: 10 } fn = (k)-> 2*k n = 4 result = approximate(fn, JSON.stringify(loadSamples) ) expect(approximate._proximate).toHaveBeenCalledWith loadSamples samples = approximate._proximate.calls.first().args[0] expect(result.getSamples()).toEqual loadSamples
CoffeeScript
CoffeeScript
mojs/mojs
spec/easing/approximate.coffee
MIT
0a9cf9a87dd5637e6fa770755e79048489bcf817
18,698
https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/easing/approximate.coffee
82
96
linemanjs/lineman:finds-lineman-dir.coffee:1:raw_corpus
raw_corpus
resolvesQuietly = require('./lib/resolves-quietly') module.exports = find: -> resolvesQuietly.resolve("lineman", {basedir: process.cwd()}) || __dirname
CoffeeScript
linemanjs/lineman
finds-lineman-dir.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/finds-lineman-dir.coffee
1
5
linemanjs/lineman:finds-lineman-dir.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript resolvesQuietly = require('./lib/resolves-quietly') module.exports = find: -> resolvesQuietly.resolve("lineman", {basedir: process.cwd()}) || __dirname ```
var resolvesQuietly; resolvesQuietly = require('./lib/resolves-quietly'); module.exports = { find: function() { return resolvesQuietly.resolve("lineman", { basedir: process.cwd() }) || __dirname; } };
CoffeeScript
JavaScript
linemanjs/lineman
finds-lineman-dir.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/finds-lineman-dir.coffee
1
5
linemanjs/lineman:finds-lineman-dir.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var resolvesQuietly; resolvesQuietly = require('./lib/resolves-quietly'); module.exports = { find: function() { return resolvesQuietly.resolve("lineman", { basedir: process.cwd() }) || __dirname; } }; ```
resolvesQuietly = require('./lib/resolves-quietly') module.exports = find: -> resolvesQuietly.resolve("lineman", {basedir: process.cwd()}) || __dirname
JavaScript
CoffeeScript
linemanjs/lineman
finds-lineman-dir.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/finds-lineman-dir.coffee
1
5
linemanjs/lineman:finds-lineman-dir.coffee:1:completion
completion
resolvesQuietly = require('./lib/resolves-quietly')
module.exports = find: -> resolvesQuietly.resolve("lineman", {basedir: process.cwd()}) || __dirname
CoffeeScript
CoffeeScript
linemanjs/lineman
finds-lineman-dir.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/finds-lineman-dir.coffee
1
5
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-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/mgmt/directives/directives.collapseMenu.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
1
41
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:1:completion
completion
### # Copyright (c) 2013-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 ...
items: '=' filter: '=' initialSelection: '=' selectItem: '&' templateUrl: '/partials/help/collapseMenu.html' controller: ($scope) -> $scope.unselectAll = -> _.each $scope.items, (item) -> item.selected = item.expanded ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
1
41
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:2:raw_corpus
raw_corpus
$scope.selectChild = (child, section) -> $scope.unselectAll() child.selected = true section.expanded = true $scope.selectItem {'item': child} # Find and select an item by name $scope.findItem = (name) -> _.each $sco...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
43
81
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $scope.selectChild = (child, section) -> $scope.unselectAll() child.selected = true section.expanded = true $scope.selectItem {'item': child} # Find and select an item by name ...
$scope.selectChild = function(child, section) { $scope.unselectAll(); child.selected = true; section.expanded = true; return $scope.selectItem({ 'item': child }); }; // Find and select an item by name $scope.findItem = function(name) { return _.each($scope.items, function(section) { var child; ...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
43
81
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $scope.selectChild = function(child, section) { $scope.unselectAll(); child.selected = true; section.expanded = true; return $scope.selectItem({ 'item': child }); }; // Find and select an item by name $scope.findItem = function(name) { return _.eac...
$scope.selectChild = (child, section) -> $scope.unselectAll() child.selected = true section.expanded = true $scope.selectItem {'item': child} # Find and select an item by name $scope.findItem = (name) -> _.each $sco...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
43
81
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:2:completion
completion
$scope.selectChild = (child, section) -> $scope.unselectAll() child.selected = true section.expanded = true $scope.selectItem {'item': child} # Find and select an item by name $scope.findItem = (name) -> _.each $sco...
$scope.isFiltered = not _.isEmpty filter $scope.$on 'feelingLucky', -> # Select the first item that matches the current filter # Use filterFilter to apply the filter to the items matchingSections = filterFilter($scope.items, $scope.filter) if ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
43
81
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:3:raw_corpus
raw_corpus
$scope.$on 'findItem', (event, args) -> $scope.findItem(args.name) # Initialize if $scope.initialSelection? $scope.findItem $scope.initialSelection else $scope.selectSection _.first $scope.items link: (scope, element, attrs) -...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
83
94
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:3:completion
completion
$scope.$on 'findItem', (event, args) -> $scope.findItem(args.name) # Initialize if $scope.initialSelection? $scope.findItem $scope.initialSelection
else $scope.selectSection _.first $scope.items link: (scope, element, attrs) -> return }
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
83
94
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 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/mgmt/directives/directives.collapseMenu.coffee
MIT
bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d
1,544
https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
1
41
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:1:completion
completion
### # Copyright (c) 2013-2015 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 ...
items: '=' filter: '=' initialSelection: '=' selectItem: '&' templateUrl: '/partials/help/collapseMenu.html' controller: ($scope) -> $scope.unselectAll = -> _.each $scope.items, (item) -> item.selected = item.expanded ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d
1,544
https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
1
41
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:2:raw_corpus
raw_corpus
$scope.selectChild = (child, section) -> $scope.unselectAll() child.selected = true section.expanded = true $scope.selectItem {'item': child} $scope.$watch 'filter', (filter) -> $scope.isFiltered = not _.isEmpty filter ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
2c2eb7bc16616a8b1d9601b8307884f5f6be40de
1,544
https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
43
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $scope.selectChild = (child, section) -> $scope.unselectAll() child.selected = true section.expanded = true $scope.selectItem {'item': child} $scope.$watch 'filter', (filter) -> ...
$scope.selectChild = function(child, section) { $scope.unselectAll(); child.selected = true; section.expanded = true; return $scope.selectItem({ 'item': child }); }; $scope.$watch('filter', function(filter) { return $scope.isFiltered = !_.isEmpty(filter); }); $scope.$on('feelingLucky', function() { ...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
2c2eb7bc16616a8b1d9601b8307884f5f6be40de
1,544
https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
43
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $scope.selectChild = function(child, section) { $scope.unselectAll(); child.selected = true; section.expanded = true; return $scope.selectItem({ 'item': child }); }; $scope.$watch('filter', function(filter) { return $scope.isFiltered = !_.isEmpty(f...
$scope.selectChild = (child, section) -> $scope.unselectAll() child.selected = true section.expanded = true $scope.selectItem {'item': child} $scope.$watch 'filter', (filter) -> $scope.isFiltered = not _.isEmpty filter ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
2c2eb7bc16616a8b1d9601b8307884f5f6be40de
1,544
https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
43
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:2:completion
completion
$scope.selectChild = (child, section) -> $scope.unselectAll() child.selected = true section.expanded = true $scope.selectItem {'item': child} $scope.$watch 'filter', (filter) -> $scope.isFiltered = not _.isEmpty filter ...
if filterFilter([firstSectionSolo], $scope.filter).length > 0 $scope.selectSection firstSection else # Parent section didn't match, so check children matchingChildren = filterFilter(firstSection.children, $scope.filter) ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
2c2eb7bc16616a8b1d9601b8307884f5f6be40de
1,544
https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
43
83
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:3:raw_corpus
raw_corpus
link: (scope, element, attrs) -> return }
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
2c2eb7bc16616a8b1d9601b8307884f5f6be40de
1,544
https://github.com/ExpediaGroup/cyclotron/blob/2c2eb7bc16616a8b1d9601b8307884f5f6be40de/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
85
87
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 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/mgmt/directives/directives.collapseMenu.coffee
MIT
14b0e411415be801f94fe13ea6f63d5ad957c2ed
1,544
https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
1
50
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee:1:completion
completion
### # Copyright (c) 2013-2015 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 ...
$scope.unselectAll = -> _.each $scope.items, (item) -> item.selected = item.expanded = false _.each item.children, (child) -> child.selected = false return return $scope.selectSection...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
MIT
14b0e411415be801f94fe13ea6f63d5ad957c2ed
1,544
https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/directives/directives.collapseMenu.coffee
1
50
jianliaoim/talk-os:talk-web/client/mixin/create-topic.coffee:1:raw_corpus
raw_corpus
React = require 'react' Immutable = require 'immutable' SlimModal = React.createFactory require '../app/slim-modal' TopicProfile = React.createFactory require '../app/topic-profile' TopicSelector = React.createFactory require '../app/topic-selector' div = React.createFactory 'div' a = React.createFactory 'a' roomA...
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/create-topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/create-topic.coffee
1
50
jianliaoim/talk-os:talk-web/client/mixin/create-topic.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' Immutable = require 'immutable' SlimModal = React.createFactory require '../app/slim-modal' TopicProfile = React.createFactory require '../app/topic-profile' TopicSelector = React.createFactory require '../app/topic-selector' div = React...
var Immutable, React, SlimModal, TopicProfile, TopicSelector, a, div, l, lang, roomActions; React = require('react'); Immutable = require('immutable'); SlimModal = React.createFactory(require('../app/slim-modal')); TopicProfile = React.createFactory(require('../app/topic-profile')); TopicSelector = React.createFac...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/mixin/create-topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/create-topic.coffee
1
50
jianliaoim/talk-os:talk-web/client/mixin/create-topic.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable, React, SlimModal, TopicProfile, TopicSelector, a, div, l, lang, roomActions; React = require('react'); Immutable = require('immutable'); SlimModal = React.createFactory(require('../app/slim-modal')); TopicProfile = React.createFactory(require('.....
React = require 'react' Immutable = require 'immutable' SlimModal = React.createFactory require '../app/slim-modal' TopicProfile = React.createFactory require '../app/topic-profile' TopicSelector = React.createFactory require '../app/topic-selector' div = React.createFactory 'div' a = React.createFactory 'a' roomA...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/create-topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/create-topic.coffee
1
50
jianliaoim/talk-os:talk-web/client/mixin/create-topic.coffee:1:completion
completion
React = require 'react' Immutable = require 'immutable' SlimModal = React.createFactory require '../app/slim-modal' TopicProfile = React.createFactory require '../app/topic-profile' TopicSelector = React.createFactory require '../app/topic-selector' div = React.createFactory 'div' a = React.createFactory 'a' roomA...
onTopicCreate: -> @setState showTopicConfigs: true onTopicClose: -> @setState showTopicConfigs: false onTopicSave: (data, cb) -> # may not give color due to its modify usage data._teamId = @props._teamId unless data.color then data.color = 'blue' roomActions.roomCreate data, (resp) => cb? res...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/create-topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/create-topic.coffee
1
50
jianliaoim/talk-os:talk-web/client/mixin/create-topic.coffee:2:raw_corpus
raw_corpus
div className: 'attr', div className: 'title', l('choose-topic-for-integration') div className: 'about muted', l('or-comma') a className: 'new-topic', onClick: @onTopicCreate, l('create-a-topic') div className: 'value', TopicSelector chosen: @state._roomId, onItemClick:...
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/create-topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/create-topic.coffee
51
57
jianliaoim/talk-os:talk-web/client/mixin/create-topic.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript div className: 'attr', div className: 'title', l('choose-topic-for-integration') div className: 'about muted', l('or-comma') a className: 'new-topic', onClick: @onTopicCreate, l('create-a-topic') div className: 'value', ...
div({ className: 'attr' }, div({ className: 'title' }, l('choose-topic-for-integration')), div({ className: 'about muted' }, l('or-comma'), a({ className: 'new-topic', onClick: this.onTopicCreate }, l('create-a-topic')))); div({ className: 'value' }, TopicSelector({ chosen: this.state._roomId, onItemCl...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/mixin/create-topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/create-topic.coffee
51
57
jianliaoim/talk-os:talk-web/client/mixin/create-topic.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript div({ className: 'attr' }, div({ className: 'title' }, l('choose-topic-for-integration')), div({ className: 'about muted' }, l('or-comma'), a({ className: 'new-topic', onClick: this.onTopicCreate }, l('create-a-topic')))); div({ className: 'value' }, T...
div className: 'attr', div className: 'title', l('choose-topic-for-integration') div className: 'about muted', l('or-comma') a className: 'new-topic', onClick: @onTopicCreate, l('create-a-topic') div className: 'value', TopicSelector chosen: @state._roomId, onItemClick:...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/create-topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/create-topic.coffee
51
57
jianliaoim/talk-os:talk-web/client/mixin/create-topic.coffee:2:completion
completion
div className: 'attr', div className: 'title', l('choose-topic-for-integration') div className: 'about muted',
l('or-comma') a className: 'new-topic', onClick: @onTopicCreate, l('create-a-topic') div className: 'value', TopicSelector chosen: @state._roomId, onItemClick: @onTopicSelect, _teamId: @props._teamId
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/create-topic.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/create-topic.coffee
51
57
meltingice/psd.js:lib/psd/file.coffee:1:raw_corpus
raw_corpus
module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: code: '>f' length: 4 Double: code: '>d' length: 8 LongLong: ...
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/file.coffee
8
57
meltingice/psd.js:lib/psd/file.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: code: '>f' length: 4 D...
var File, hasProp = {}.hasOwnProperty; module.exports = File = (function() { var FORMATS, format, info; class File { // Creates a new File with the given Uint8Array. constructor(data) { this.data = data; } // Returns the current cursor position. tell() { return this.pos; } ...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/file.coffee
8
57
meltingice/psd.js:lib/psd/file.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var File, hasProp = {}.hasOwnProperty; module.exports = File = (function() { var FORMATS, format, info; class File { // Creates a new File with the given Uint8Array. constructor(data) { this.data = data; } // Returns the current curso...
module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: code: '>f' length: 4 Double: code: '>d' length: 8 LongLong: ...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/file.coffee
8
57
meltingice/psd.js:lib/psd/file.coffee:1:completion
completion
module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: code: '>f' length: 4 Double: code: '>d' length: 8 LongLong: ...
@::["read#{format}"] = -> @readf(info.code, info.length)[0] # The current cursor position in the file. pos: 0 # Creates a new File with the given Uint8Array. constructor: (@data) -> # Returns the current cursor position. tell: -> @pos # Reads raw file data with no processing. read: (length) -> (@dat...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/file.coffee
8
57
meltingice/psd.js:lib/psd/file.coffee:2:raw_corpus
raw_corpus
# Reads a Unicode UTF-16BE encoded string. readUnicodeString: (length = null) -> length or= @readInt() iconv.decode(new Buffer(@read(length * 2)),'utf-16be').replace /\u0000/g, "" # Helper that reads a single byte. readByte: -> @read(1)[0] # Helper that reads a single byte and interprets it as a boole...
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/file.coffee
58
88
meltingice/psd.js:lib/psd/file.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Reads a Unicode UTF-16BE encoded string. readUnicodeString: (length = null) -> length or= @readInt() iconv.decode(new Buffer(@read(length * 2)),'utf-16be').replace /\u0000/g, "" # Helper that reads a single byte. readByte: -> @read(1)[0] # Hel...
// Reads a Unicode UTF-16BE encoded string. ({ readUnicodeString: function(length = null) { length || (length = this.readInt()); return iconv.decode(new Buffer(this.read(length * 2)), 'utf-16be').replace(/\u0000/g, ""); }, // Helper that reads a single byte. readByte: function() { return this.read(1...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/file.coffee
58
88
meltingice/psd.js:lib/psd/file.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Reads a Unicode UTF-16BE encoded string. ({ readUnicodeString: function(length = null) { length || (length = this.readInt()); return iconv.decode(new Buffer(this.read(length * 2)), 'utf-16be').replace(/\u0000/g, ""); }, // Helper that reads a singl...
# Reads a Unicode UTF-16BE encoded string. readUnicodeString: (length = null) -> length or= @readInt() iconv.decode(new Buffer(@read(length * 2)),'utf-16be').replace /\u0000/g, "" # Helper that reads a single byte. readByte: -> @read(1)[0] # Helper that reads a single byte and interprets it as a boole...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/file.coffee
58
88
meltingice/psd.js:lib/psd/file.coffee:2:completion
completion
# Reads a Unicode UTF-16BE encoded string. readUnicodeString: (length = null) -> length or= @readInt() iconv.decode(new Buffer(@read(length * 2)),'utf-16be').replace /\u0000/g, "" # Helper that reads a single byte. readByte: -> @read(1)[0] # Helper that reads a single byte and interprets it as a boole...
colorSpace: colorSpace, components: colorComponent # Adobe's lovely signed 32-bit fixed-point number with 8bits.24bits # http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/PhotoshopFileFormats.htm#50577409_17587 readPathNumber: -> a = @readByte() arr = @read(3) b1 = arr[0] << 16 b2 = ...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e8392d20fd5d66ad70ddda7309661b9a0ca67c8
2,846
https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/file.coffee
58
88
meltingice/psd.js:lib/psd/file.coffee:1:raw_corpus
raw_corpus
{jspack} = require 'jspack' iconv = require 'iconv-lite' Color = require './color.coffee' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' ...
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
c3e53bea91d69045c5c0eb31e605cfc15ecf5f92
2,846
https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/file.coffee
1
50
meltingice/psd.js:lib/psd/file.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {jspack} = require 'jspack' iconv = require 'iconv-lite' Color = require './color.coffee' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: ...
var Color, File, Util, iconv, jspack, hasProp = {}.hasOwnProperty; ({jspack} = require('jspack')); iconv = require('iconv-lite'); Color = require('./color.coffee'); Util = require('./util.coffee'); module.exports = File = (function() { var FORMATS, format, info; class File { constructor(data) { th...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/file.coffee
MIT
c3e53bea91d69045c5c0eb31e605cfc15ecf5f92
2,846
https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/file.coffee
1
50
meltingice/psd.js:lib/psd/file.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Color, File, Util, iconv, jspack, hasProp = {}.hasOwnProperty; ({jspack} = require('jspack')); iconv = require('iconv-lite'); Color = require('./color.coffee'); Util = require('./util.coffee'); module.exports = File = (function() { var FORMATS, format,...
{jspack} = require 'jspack' iconv = require 'iconv-lite' Color = require './color.coffee' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' ...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
c3e53bea91d69045c5c0eb31e605cfc15ecf5f92
2,846
https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/file.coffee
1
50
meltingice/psd.js:lib/psd/file.coffee:1:completion
completion
{jspack} = require 'jspack' iconv = require 'iconv-lite' Color = require './color.coffee' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' ...
length: 8 LongLong: code: '>q' length: 8 for own format, info of FORMATS then do (format, info) => @::["read#{format}"] = -> @readf(info.code, info.length)[0] constructor: (@data) -> @pos = 0 tell: -> @pos read: (length) -> (@data[@pos++] for i in [0...length]) readf: (format, len ...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
c3e53bea91d69045c5c0eb31e605cfc15ecf5f92
2,846
https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/file.coffee
1
50
meltingice/psd.js:lib/psd/file.coffee:2:raw_corpus
raw_corpus
# Reads a 32-bit color space value. readSpaceColor: -> colorSpace = @readShort() colorComponent = (@readShort() >> 8) for i in [0...4] colorSpace: colorSpace, components: colorComponent # Adobe's lovely signed 32-bit fixed-point number with 8bits.24bits # http://www.adobe.com/devnet-apps/photoshop...
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
c3e53bea91d69045c5c0eb31e605cfc15ecf5f92
2,846
https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/file.coffee
51
69
meltingice/psd.js:lib/psd/file.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Reads a 32-bit color space value. readSpaceColor: -> colorSpace = @readShort() colorComponent = (@readShort() >> 8) for i in [0...4] colorSpace: colorSpace, components: colorComponent # Adobe's lovely signed 32-bit fixed-point number with 8bit...
// Reads a 32-bit color space value. ({ readSpaceColor: function() { var colorComponent, colorSpace, i, j; colorSpace = this.readShort(); for (i = j = 0; j < 4; i = ++j) { colorComponent = this.readShort() >> 8; } return { colorSpace: colorSpace, components: colorComponent };...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/file.coffee
MIT
c3e53bea91d69045c5c0eb31e605cfc15ecf5f92
2,846
https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/file.coffee
51
69
meltingice/psd.js:lib/psd/file.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Reads a 32-bit color space value. ({ readSpaceColor: function() { var colorComponent, colorSpace, i, j; colorSpace = this.readShort(); for (i = j = 0; j < 4; i = ++j) { colorComponent = this.readShort() >> 8; } return { colorSpa...
# Reads a 32-bit color space value. readSpaceColor: -> colorSpace = @readShort() colorComponent = (@readShort() >> 8) for i in [0...4] colorSpace: colorSpace, components: colorComponent # Adobe's lovely signed 32-bit fixed-point number with 8bits.24bits # http://www.adobe.com/devnet-apps/photoshop...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
c3e53bea91d69045c5c0eb31e605cfc15ecf5f92
2,846
https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/file.coffee
51
69
meltingice/psd.js:lib/psd/file.coffee:2:completion
completion
# Reads a 32-bit color space value. readSpaceColor: -> colorSpace = @readShort() colorComponent = (@readShort() >> 8) for i in [0...4] colorSpace: colorSpace, components: colorComponent # Adobe's lovely signed 32-bit fixed-point number with 8bits.24bits # http://www.adobe.com/devnet-apps/photoshop...
readPathNumber: -> a = @readByte() arr = @read(3) b1 = arr[0] << 16 b2 = arr[1] << 8 b3 = arr[2] b = b1 | b2 | b3 parseFloat(a, 10) + parseFloat(b / Math.pow(2, 24), 10)
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
c3e53bea91d69045c5c0eb31e605cfc15ecf5f92
2,846
https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/file.coffee
51
69
meltingice/psd.js:lib/psd/file.coffee:2:raw_corpus
raw_corpus
# Reads a 32-bit color space value. readSpaceColor: -> colorSpace = @readShort() colorComponent = (@readShort() >> 8) for i in [0...4] colorSpace: colorSpace, components: colorComponent
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
8560364d7fc7df297564c685d9e54b87f1635342
2,846
https://github.com/meltingice/psd.js/blob/8560364d7fc7df297564c685d9e54b87f1635342/lib/psd/file.coffee
51
56
meltingice/psd.js:lib/psd/file.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Reads a 32-bit color space value. readSpaceColor: -> colorSpace = @readShort() colorComponent = (@readShort() >> 8) for i in [0...4] colorSpace: colorSpace, components: colorComponent ```
// Reads a 32-bit color space value. ({ readSpaceColor: function() { var colorComponent, colorSpace, i, j; colorSpace = this.readShort(); for (i = j = 0; j < 4; i = ++j) { colorComponent = this.readShort() >> 8; } return { colorSpace: colorSpace, components: colorComponent };...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/file.coffee
MIT
8560364d7fc7df297564c685d9e54b87f1635342
2,846
https://github.com/meltingice/psd.js/blob/8560364d7fc7df297564c685d9e54b87f1635342/lib/psd/file.coffee
51
56
meltingice/psd.js:lib/psd/file.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Reads a 32-bit color space value. ({ readSpaceColor: function() { var colorComponent, colorSpace, i, j; colorSpace = this.readShort(); for (i = j = 0; j < 4; i = ++j) { colorComponent = this.readShort() >> 8; } return { colorSpa...
# Reads a 32-bit color space value. readSpaceColor: -> colorSpace = @readShort() colorComponent = (@readShort() >> 8) for i in [0...4] colorSpace: colorSpace, components: colorComponent
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
8560364d7fc7df297564c685d9e54b87f1635342
2,846
https://github.com/meltingice/psd.js/blob/8560364d7fc7df297564c685d9e54b87f1635342/lib/psd/file.coffee
51
56
meltingice/psd.js:lib/psd/file.coffee:2:completion
completion
# Reads a 32-bit color space value. readSpaceColor: -> colorSpace = @readShort()
colorComponent = (@readShort() >> 8) for i in [0...4] colorSpace: colorSpace, components: colorComponent
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
8560364d7fc7df297564c685d9e54b87f1635342
2,846
https://github.com/meltingice/psd.js/blob/8560364d7fc7df297564c685d9e54b87f1635342/lib/psd/file.coffee
51
56
meltingice/psd.js:lib/psd/file.coffee:1:raw_corpus
raw_corpus
{jspack} = require 'jspack' Util = require './util.coffee' iconv = require 'iconv-lite' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: ...
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
301ffcc50c00be921d9f99203c09ddde64af3c0b
2,846
https://github.com/meltingice/psd.js/blob/301ffcc50c00be921d9f99203c09ddde64af3c0b/lib/psd/file.coffee
1
50
meltingice/psd.js:lib/psd/file.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {jspack} = require 'jspack' Util = require './util.coffee' iconv = require 'iconv-lite' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 U...
var File, Util, iconv, jspack, hasProp = {}.hasOwnProperty; ({jspack} = require('jspack')); Util = require('./util.coffee'); iconv = require('iconv-lite'); module.exports = File = (function() { var FORMATS, format, info; class File { constructor(data) { this.data = data; this.pos = 0; } ...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/file.coffee
MIT
301ffcc50c00be921d9f99203c09ddde64af3c0b
2,846
https://github.com/meltingice/psd.js/blob/301ffcc50c00be921d9f99203c09ddde64af3c0b/lib/psd/file.coffee
1
50
meltingice/psd.js:lib/psd/file.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var File, Util, iconv, jspack, hasProp = {}.hasOwnProperty; ({jspack} = require('jspack')); Util = require('./util.coffee'); iconv = require('iconv-lite'); module.exports = File = (function() { var FORMATS, format, info; class File { constructor(data...
{jspack} = require 'jspack' Util = require './util.coffee' iconv = require 'iconv-lite' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: ...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
301ffcc50c00be921d9f99203c09ddde64af3c0b
2,846
https://github.com/meltingice/psd.js/blob/301ffcc50c00be921d9f99203c09ddde64af3c0b/lib/psd/file.coffee
1
50
meltingice/psd.js:lib/psd/file.coffee:1:completion
completion
{jspack} = require 'jspack' Util = require './util.coffee' iconv = require 'iconv-lite' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: ...
LongLong: code: '>q' length: 8 for own format, info of FORMATS then do (format, info) => @::["read#{format}"] = -> @readf(info.code, info.length)[0] constructor: (@data) -> @pos = 0 tell: -> @pos read: (length) -> (@data[@pos++] for i in [0...length]) readf: (format, len = null) -> jsp...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
301ffcc50c00be921d9f99203c09ddde64af3c0b
2,846
https://github.com/meltingice/psd.js/blob/301ffcc50c00be921d9f99203c09ddde64af3c0b/lib/psd/file.coffee
1
50
meltingice/psd.js:lib/psd/file.coffee:1:raw_corpus
raw_corpus
{jspack} = require 'jspack' iconv = require 'iconv-lite' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: ...
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e29066091534c74673ca4470912dbe458eb3267
2,846
https://github.com/meltingice/psd.js/blob/7e29066091534c74673ca4470912dbe458eb3267/lib/psd/file.coffee
1
49
meltingice/psd.js:lib/psd/file.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {jspack} = require 'jspack' iconv = require 'iconv-lite' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 U...
var File, Util, iconv, jspack, hasProp = {}.hasOwnProperty; ({jspack} = require('jspack')); iconv = require('iconv-lite'); Util = require('./util.coffee'); module.exports = File = (function() { var FORMATS, format, info; class File { constructor(data1) { this.data = data1; this.pos = 0; }...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e29066091534c74673ca4470912dbe458eb3267
2,846
https://github.com/meltingice/psd.js/blob/7e29066091534c74673ca4470912dbe458eb3267/lib/psd/file.coffee
1
49
meltingice/psd.js:lib/psd/file.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var File, Util, iconv, jspack, hasProp = {}.hasOwnProperty; ({jspack} = require('jspack')); iconv = require('iconv-lite'); Util = require('./util.coffee'); module.exports = File = (function() { var FORMATS, format, info; class File { constructor(data...
{jspack} = require 'jspack' iconv = require 'iconv-lite' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: ...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e29066091534c74673ca4470912dbe458eb3267
2,846
https://github.com/meltingice/psd.js/blob/7e29066091534c74673ca4470912dbe458eb3267/lib/psd/file.coffee
1
49
meltingice/psd.js:lib/psd/file.coffee:1:completion
completion
{jspack} = require 'jspack' iconv = require 'iconv-lite' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: ...
LongLong: code: '>q' length: 8 for own format, info of FORMATS then do (format, info) => @::["read#{format}"] = -> @readf(info.code, info.length)[0] constructor: (@data) -> @pos = 0 tell: -> @pos read: (length) -> (@data[@pos++] for i in [0...length]) readf: (format, len = null) -> jsp...
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
7e29066091534c74673ca4470912dbe458eb3267
2,846
https://github.com/meltingice/psd.js/blob/7e29066091534c74673ca4470912dbe458eb3267/lib/psd/file.coffee
1
49
meltingice/psd.js:lib/psd/file.coffee:1:raw_corpus
raw_corpus
{jspack} = require 'jspack' Util = require './util.coffee' module.exports = class File FORMATS = Int: code: '>i' length: 4 UInt: code: '>I' length: 4 Short: code: '>h' length: 2 UShort: code: '>H' length: 2 Float: code: '>f' length: 4 ...
CoffeeScript
meltingice/psd.js
lib/psd/file.coffee
MIT
e6cbce07391fbf424fbf8e699957de1c18f3fc4b
2,846
https://github.com/meltingice/psd.js/blob/e6cbce07391fbf424fbf8e699957de1c18f3fc4b/lib/psd/file.coffee
1
50
End of preview. Expand in Data Studio

CoffeeScript Code Suite

CoffeeScript Code Suite is a public code dataset built from permissively licensed open-source CoffeeScript repositories. It is designed for three practical uses:

  1. CoffeeScript domain adaptation and continued pretraining through raw_corpus examples.
  2. CoffeeScript completion training through completion examples.
  3. CoffeeScript and JavaScript translation training through coffee_to_js and js_to_coffee examples.

The dataset was assembled automatically from public GitHub repositories and includes both current repository snapshots and selected historical file versions from git history. Each record keeps source provenance so downstream users can audit where the code came from.

Dataset Summary

  • Name: CoffeeScript Code Suite
  • Suggested Hub repo name: brody/coffeescript-code-suite
  • Records: 49,491
  • Training split: 44,535
  • Validation split: 2,481
  • Test split: 2,475
  • Source repositories: 79
  • Raw candidate chunks: 14,682
  • Compilable translation chunks: 10,313

Record Types

  • raw_corpus: raw CoffeeScript snippets for code-language modeling.
  • completion: prefix-to-continuation CoffeeScript completion samples.
  • coffee_to_js: CoffeeScript to JavaScript translation pairs.
  • js_to_coffee: JavaScript to CoffeeScript translation pairs.

Data Schema

Each line is a JSON object. Common fields:

{
  "id": "owner/repo:path:chunk:type",
  "type": "coffee_to_js",
  "prompt": "Convert this CoffeeScript to JavaScript...\n```coffeescript\n...\n```",
  "response": "...",
  "source_lang": "CoffeeScript",
  "target_lang": "JavaScript",
  "repo": "owner/repo",
  "path": "src/example.coffee",
  "license": "MIT",
  "commit": "abcdef123456",
  "stars": 1234,
  "source_url": "https://github.com/owner/repo/blob/abcdef123456/src/example.coffee",
  "line_start": 1,
  "line_end": 42
}

Notes:

  • raw_corpus records have an empty prompt and the CoffeeScript snippet in response.
  • completion records use a CoffeeScript prefix in prompt and the continuation in response.
  • Translation records contain executable source/target code pairs when compilation succeeded.

Source Collection Policy

The dataset builder uses the following collection policy:

  • public GitHub repositories only
  • permissive licenses only
  • current repository snapshots plus selected historical CoffeeScript file versions
  • CoffeeScript files only
  • vendor, build, generated, docs, demos, and example-heavy paths filtered out
  • exact deduplication over normalized chunks

Accepted license families in this release:

  • MIT
  • Apache-2.0
  • BSD-2-Clause
  • BSD-3-Clause
  • ISC

Construction Process

The dataset was built with an automated pipeline that:

  1. discovers public CoffeeScript repositories
  2. clones repositories locally
  3. extracts .coffee files from repository heads and git history
  4. splits files into training-sized chunks
  5. compiles CoffeeScript chunks to JavaScript when possible
  6. creates completion and translation samples
  7. removes exact duplicates
  8. splits records into train, validation, and test sets

Quality Notes

Strengths:

  • source provenance is retained for every record
  • dataset contains real-world CoffeeScript from multiple projects rather than synthetic-only samples
  • includes both direct code modeling and translation-style supervision
  • historical versions increase stylistic and temporal diversity

Limitations:

  • this is an automatically generated dataset, not a hand-curated benchmark
  • some projects contribute more samples than others
  • raw_corpus and completion include chunks that may not compile in isolation
  • translation pairs only exist for chunks that compiled successfully
  • exact deduplication is applied, but near-duplicate code may still remain

Intended Uses

Recommended uses:

  • continued pretraining or domain adaptation for code models with CoffeeScript support
  • SFT for CoffeeScript completion
  • JavaScript/CoffeeScript translation experiments
  • retrieval and evaluation experiments on legacy JavaScript ecosystem code

Less suitable uses:

  • legal or security-sensitive compliance analysis
  • benchmark claims about general programming ability
  • direct deployment without additional filtering, evaluation, and safety review

Split Sizes

train.jsonl       44,535
validation.jsonl   2,481
test.jsonl         2,475
total             49,491

Build Summary

{
  "repos": 79,
  "files": 10586,
  "chunks": 14682,
  "candidates": 14682,
  "compiled_ok": 10313,
  "compile_failed": 4369,
  "examples": 49491,
  "train": 44535,
  "validation": 2481,
  "test": 2475
}

Provenance

Each record contains:

  • repository name
  • repository-relative path
  • source commit
  • source URL
  • license label

This makes the dataset auditable and easier to extend or prune.

Citation

If you use this dataset, cite the dataset repository and the original upstream repositories referenced in the provenance fields.

Downloads last month
13