Using the Node.js child_process module to create and use a python3 process to do a sum over an array.
node father.js
Using the Node.js child_process module to create and use a python3 process to do a sum over an array.
node father.js
import pandas as pd | |
dict = {'description': 'value'} | |
dict_items = dict.items() | |
dataframe = pd.DataFrame(list(dict_items), columns=['Description', 'Values']) |
const asyncFunction = async (arr) => { | |
const arrOfPromises = arr.map(async param => { | |
const response = await fetch(`/api/${param}`); | |
return response.json(); | |
}); | |
const result = await Promise.all(arrOfPromises); | |
return result; | |
} |
const cats = { | |
Puma: { age: 3 }, | |
Ringo: { age: 4 } | |
}; | |
const object = Object.keys(cats) | |
.map(cat => ({[cat]: `age: ${cats[cat].age}`}) ) | |
.reduce((acc, curr) => ({...acc, ...curr}) , {}); | |
/* object: |
> log in line | |
git log --oneline | |
> retrive all commits by a message | |
git log --all --grep="corinthians" | |
> retrieve all commits by an author | |
git log --author="Nikolas" | |
> get everything you did |
defmodule RobotSimulator do | |
@doc """ | |
Create a Robot Simulator given an initial direction and position. | |
Valid directions are: `:north`, `:east`, `:south`, `:west` | |
""" | |
@valid_directions [:north, :south, :east, :west] | |
@spec create() :: {:north, {0,0}} | |
def create(), do: {:north, {0,0}} |