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
// $ node index.js playlist.csv Album "Track Title" Artist | |
const fs = require('fs'); | |
const papa = require('papaparse'); | |
const filePath = process.argv[2]; | |
const parts = {}; | |
for (let i = 3; i < process.argv.length; i++) { | |
parts[process.argv[i]] = -1; | |
} |
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 sleep = (ms) => new Promise(r => setTimeout(r, ms)); | |
for await (const x of [300, 100, 200]) { | |
console.log(x); | |
await sleep(x); | |
} | |
// It prints 300 100 200, which means it was not executed concurrently |
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 union = require('lodash.union'); | |
const list = [2890, 10004, 145]; | |
const largeArray = []; | |
for (let i = 0; i < 25000; i++) { | |
largeArray.push(Math.floor(Math.random() * 25000)); | |
} | |
const mediumArray = []; | |
for (let i = 0; i < 10000; i++) { | |
mediumArray.push(Math.floor(Math.random() * 10000)); |
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
{ | |
"bool": { | |
"must": [{ | |
"term": { | |
"name": "承太郎" | |
} | |
}, { | |
"match": { | |
"description": { | |
"query": "やれやれだぜ" |