This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sepal length | sepal width | petal length | petal width | species | |
---|---|---|---|---|---|
5.1 | 3.5 | 1.4 | 0.2 | Iris-setosa | |
4.9 | 3.0 | 1.4 | 0.2 | Iris-setosa | |
4.7 | 3.2 | 1.3 | 0.2 | Iris-setosa | |
4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa | |
5.0 | 3.6 | 1.4 | 0.2 | Iris-setosa | |
5.4 | 3.9 | 1.7 | 0.4 | Iris-setosa | |
4.6 | 3.4 | 1.4 | 0.3 | Iris-setosa | |
5.0 | 3.4 | 1.5 | 0.2 | Iris-setosa | |
4.4 | 2.9 | 1.4 | 0.2 | Iris-setosa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write the implementation of concatFiles(), a callback-style function that takes two or more paths | |
* to text files in the filesystem and a destination file: | |
* ```js | |
* function concatFiles (srcFile1, srcFile2, srcFile3, ..., dest, cb) { | |
* // ... | |
* } | |
* ``` | |
* This function must copy the contents of every source file into the destination file, respecting | |
* the order of the files, as provided by the arguments list. For instance, given two files, if the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a function that accepts a number an a callback as the arguments. The function will return an EventEmitter | |
* that emits an event called 'tick' every 50 milliseconds until the number of milliseconds is passed from the invocation | |
* of the function. The function will also call the callback when the number of milliseconds has passed, providing, as | |
* the result, the total count of tick events emitted. Hint: you can use setTimeout() to schedule another setTimeout() | |
* recursively. | |
*/ | |
module.exports = function ticker(number, cb) { | |
const ee = new (require('events').EventEmitter)() | |
let count = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Modify the function created in exercise 3.3 so that it produces an error if the timestamp at the moment of a | |
* tick (including the initial one that we added as part of exercise 3.3) is divisible by 5. Propagate the error | |
* using both the callback and the event emitter. Hint: use Date.now() to get the timestamp and the remainder (%) | |
* operator to check whether the timestamp is divisible by 5. | |
*/ | |
const ticker = require('./ticker.js') | |
function callback(error, ...args) { | |
if (error) return console.error(error.message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Modify the function created in exercise 3.3 so that it produces an error if the timestamp at the moment of a | |
* tick (including the initial one that we added as part of exercise 3.3) is divisible by 5. Propagate the error | |
* using both the callback and the event emitter. Hint: use Date.now() to get the timestamp and the remainder (%) | |
* operator to check whether the timestamp is divisible by 5. | |
*/ | |
const ticker = require('./ticker.js') | |
function callback(error, ...args) { | |
if (error) return console.error(error.message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a function that accepts a number an a callback as the arguments. The function will return an EventEmitter | |
* that emits an event called 'tick' every 50 milliseconds until the number of milliseconds is passed from the invocation | |
* of the function. The function will also call the callback when the number of milliseconds has passed, providing, as | |
* the result, the total count of tick events emitted. Hint: you can use setTimeout() to schedule another setTimeout() | |
* recursively. | |
*/ | |
module.exports = function ticker(number, cb) { | |
const ee = new (require('events').EventEmitter)() | |
let count = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const VideoComponent = props => { | |
useEffect(() => { | |
const video = document.getElementById('srcVideo'); | |
video.crossOrigin = "anonymous"; | |
const bind = async () => { | |
const net = await posenet.load({ | |
architecture: input.architecture, | |
outputStride: input.outputStride, | |
inputResolution: input.inputResolution, | |
multiplier: input.multiplier, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from optparse import OptionParser | |
from scapy.all import srp, ARP, Ether | |
def get_args(): | |
parser = OptionParser() | |
parser.add_option('-t', '--target', dest='ip', help='IP address range') | |
options = parser.parse_args()[0] | |
if not options.ip: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CRUD operator | |
const mongodb = require("mongodb"); | |
class dbClient { | |
constructor() { | |
this.MongoClient = mongodb.MongoClient; | |
this.connectionURL = ""; | |
this.client = undefined; | |
this.error = undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mapbox = require("./mapbox"); | |
const { assert } = require("chai"); | |
describe("--> mapbox module test <--", () => { | |
describe("forwardGeocoding() test", () => { | |
it("should have response with default", () => { | |
mapbox.forwardGeocoding(undefined, undefined, {}, (error, response) => { | |
// if (error) throw error; | |
assert.isObject(response, "is not an object?"); | |
}); |
NewerOlder