# build docker image with tag
$ docker build -t USERNAME/REPO .
# docker run
$ docker run -it container_id || image_name
# list all container
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
// solution 1 | |
function fibonacci(n){ | |
if(n < 2){ | |
return n; | |
} | |
// temporary variables | |
let prev = 0; | |
let curr = 1; | |
let arr = [0, 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
def shuffle(student_list: list, order: int): | |
"""A function for shuffling an iterable using a specific order and size | |
Args: | |
student_list (iter): an iterable data type | |
order (int): the order and size for shuffling | |
Returns: | |
iter: shuffled obect according to order | |
""" |
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 repl = require("repl"); | |
const caseSwitcher = (str) => { | |
if (str === str.toLowerCase()) { | |
return str.toUpperCase(); | |
} else { | |
return str.toLowerCase(); | |
} | |
}; |
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 http = require("http"); | |
const { parse } = require("querystring"); | |
const PORT = process.env.PORT || 5000; | |
const server = http.createServer((req, res) => { | |
try { | |
if (req.method === "POST") { | |
dataHandler(req, (data) => { | |
res.end(`Hello ${data.name}, Welcome to the WeJapa Internship"`); | |
}); |