Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque convallis purus vitae ipsum imperdiet condimentum. Nunc vel vehicula augue. Vestibulum luctus nulla nisl, at congue augue maximus et. Mauris eget massa dui. Cras sagittis accumsan lacus.
Install
An example JavaScript code.
const srcPath = "./articles/";
const dstPath = "./content/posts/";
fs.watch(srcPath, { persistent: true }, function (event, filename) {
if ((event = "change")) {
const srcFile = filename;
const dstFile = srcFile.split(".")[0] + ".json";
processor.process(
toVFile.readSync(srcPath + srcFile, "utf8"),
function (error, file) {
if (error) throw error;
console.error(reporter(error || file));
let jsonOutput = {
schema: file.data.frontmatter,
body: file.contents,
};
let article = JSON.stringify(jsonOutput).replace(/\n/g, " ");
fs.writeFileSync(dstPath + dstFile, article);
}
);
}
});
A Python
code sample.
if __name__ == "__main__":
import doctest
doctest.testmod()
network = Perceptron(
sample=samples, target=exit, learning_rate=0.01, epoch_number=1000, bias=-1
)
network.training()
print("Finished training perceptron")
print("Enter values to predict or q to exit")
while True:
sample: list = []
for i in range(len(samples[0])):
user_input = input("value: ").strip()
if user_input == "q":
break
observation = float(user_input)
sample.insert(i, observation)
network.sort(sample)
Math
L=21ρv2SCL License
MIT