Skip to content

Instantly share code, notes, and snippets.

View joynal's full-sized avatar
🏠
Working from home

Joynal Abedin joynal

🏠
Working from home
View GitHub Profile
const isTwin = (first, second) => {
// Impelement this function
};
isTwin('Hello', 'World'); // false
isTwin('Silent', 'Listen'); // true
isTwin("Good", "OODG"); // true
@joynal
joynal / countWords.js
Created December 5, 2021 19:26
Count word solution
const { deepStrictEqual } = require('assert')
const mutableApproach = (line) => {
const words = {};
line.split(' ').forEach((key) => {
if (words[key]) {
words[key] += 1;
return;
}
words[key] = 1;
const { deepStrictEqual } = require('assert');
const wordCounter = (line) => {
// implement me!
}
const input = 'This is some random text and some raddom work';
const want = {
This: 1,
const job = (state) => new Promise((resolve, reject) => {
if (state) {
resolve('resolved');
} else {
reject('rejected');
}
});
job(true)
.then((data) => {
/*
* Given two functions `head` and `tail`
* Implement the array `map` function using this two fucntions.
* Example: `map([1,2,3], (n) => n * 2) == [2,4,6]`
*/
const head = (array) => array[0];
const tail = (array) => array.slice(1, array.length);
/* Example: map([1,2,3], (n) => n * 2) === [2,4,6]
apiVersion: batch/v1
kind: Job
metadata:
name: backoffice-populate-job-test
namespace: biz-apps
spec:
template:
metadata:
name: backoffice-populate-job-test
spec:
(venv) ➜ oda_api_importer git:(master) ✗ python -u -m app -client DenBosch
2021-11-10 13:55:55,892 - root - INFO - Sentry logging set up successfully
2021-11-10 13:55:57,668 - root - INFO - Sent P4CollectedDataBatchRequest: DenBosch,2021-11-10 12:55:55,INT,871687940032528174,9
2021-11-10 13:55:58,349 - root - INFO - Sent P4CollectedDataBatchRequest: DenBosch,2021-11-10 12:55:55,INT,871687940032528167,9
2021-11-10 13:55:58,927 - root - INFO - Sent P4CollectedDataBatchRequest: DenBosch,2021-11-10 12:55:55,INT,871687940031819204,9
2021-11-10 13:55:59,937 - root - INFO - Sent P4CollectedDataBatchRequest: DenBosch,2021-11-10 12:55:55,INT,871687940031887876,9
2021-11-10 13:56:00,416 - root - INFO - Sent P4CollectedDataBatchRequest: DenBosch,2021-11-10 12:55:55,INT,871687940031681191,9
2021-11-10 13:56:01,033 - root - INFO - Sent P4CollectedDataBatchResultRequest
2021-11-10 13:56:01,033 - root - INFO - P4 returned an empty response
2021-11-10 13:56:22,825 - root - INFO - Sent P4CollectedDataBatchResultReque
SET
SET
SET
SET
SET
set_config
------------
(1 row)
12:22:00.067 ERROR: //lengor/models/farm_model/features:broiler_feeds_feature failed:
Expected: <0>
but: was <6>
Fail: //lengor/models/farm_model/features:broiler_feeds_feature 0 passed 0 skipped 6 failed 1 errored Took 16.77s
Failure: AssertionError in starter only orders
Expected: <0>
but: was <6>
/* 1 */
{
"_id" : ObjectId("6112959ea81b44ee18352a64"),
"type" : "LONE_FEED",
"privacy" : {
"clist" : [],
"listType" : "allow",
"type" : "public"
},
"background" : {