brew install youtube-dl ffmpeg
youtube-dl -f best 'http://www.youtube.com/watch?v=P9pzm5b6FFY'
At the center of the Maana Q Knowledge Platform is the Computational Knowledge Graph, which consists of a cloud distributed set of GraphQL and RESTful microservices. Each service exposes a set of types and functions. The functions can be evaluated lazily (i.e., streaming) or strict/eager (i.e., batch) and can be marked as having pure (i.e., referential integrity) vs effectful (i.e., causes change or relies on changing externals) semantics.
The purpose of this system is to represent domain knowledge (i.e., concepts, properties, relations, individuals) and perform reasoning (i.e., operations performed on the domain to achieve various goals). This is similar in nature to the goals of the Semantic Web, which aims to unify:
While the goals are similar, the underlying
const fs = require("fs-extra"); | |
const Path = require("path"); | |
// | |
// String utilities | |
// | |
// Ensure initial letter is capitalized | |
const capitalize = word => word[0].toUpperCase() + word.substr(1); |
Meta is a NodeJS-based shell command that provides a solution to working with many repos across machines/teams without the tradeoffs involved with submodules or monorepos.
npm i -g meta
mkdir my-meta-repo
cd my-meta-repo
const fs = require('fs'); | |
const mkdirp = require('mkdirp'); | |
const path = require('path'); | |
const request = require('request'); | |
const url = require('url'); | |
const downloadFile = async (file, targetFolder) => { | |
// Parse remote file spec | |
const sourceUrl = url.parse(file.url ? file.url.id : file.id); | |
const sourceHref = sourceUrl.href; |
// --- Object path operations | |
export const objGetPathList = ({ path }) => { | |
let pathList; | |
if (Array.isArray(path)) { | |
pathList = path; | |
} else if (typeof path === "string") { | |
pathList = path.split("/"); | |
} | |
return pathList; |
This will work for any model that you hook it up to, you just need to define the types in your service schema.
As it’s inspecting the metadata that graphql carries with each query to figure out which fields correspond to what type to construct the mutations (and the types have to be the same as those in the model in Q) because it assumes the boilerplate will look like:
def create_mutation_singular(type):