This demo shows you how to build an infrastructure monitoring tool, similar to a mini-datadog, that keeps track of some stats from all of the computers running this included script. Using this data, we can plot time series and build something based on "real" data being captured in the moment.
A new alien species has moved to earth and they only speak pig-latin! The president has called you and says that they need your help!
Your mission is to create a module that is capable of taking an english sentence and translating it into pig latin. We must also be able to understand what our new alien friends are saying, so the module needs to be able to convert pig-latin back to english.
TL;DR: Create a module that translates a string into Pig Latin, and is capable of translating Pig Latin back into in the native language.
Basically, the Pig Latin system used here works as follows:
const MongoClient = require("mongodb").MongoClient; | |
class LinkedList { | |
constructor() {} | |
async init() { | |
const uri = | |
"ATLAS CLUSTER URL HERE"; | |
this.client = new MongoClient(uri, { | |
useNewUrlParser: true, |
function sendDataToTinybird() { | |
// 1. Get Data from the Sheet | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
var rows = sheet.getRange('A1:C2').getValues(); // Modify this range as needed | |
// 2. Define the options common to all requests | |
var headers = { | |
Authorization: 'Bearer YOUR_AUTH_TOKEN' // Replace with your token | |
}; |
How to test if Dataloader is working correctly, we are going to turn on server logging in order to see how many queries are being made to our db. If Dataloader is setup correctly, we should only see one hit on our db perrequest, even if duplicate data is being requested. Here's how to enable logging on postgresql. Note - This is the Mac way to enable logging.
-
subl /usr/local/var/postgres/postgresql.conf
-
around line 434
log_statement = 'all'
uncomment and set to alllog_statement = 'all'
-
then
brew service restart postgresql
import asyncio | |
from viam.robot.client import RobotClient | |
from viam.rpc.dial import Credentials, DialOptions | |
from viam.components.board import Board | |
async def connect(): | |
ADDRESS_SECRET = "[ADD YOUR ROBOT ADDRESS HERE. YOU CAN FIND THIS ON THE CONNECT TAB]" | |
PAYLOAD_SECRET = "[PLEASE ADD YOUR SECRET HERE. YOU CAN FIND THIS ON THE CONNECT TAB]" | |
creds = Credentials( |
from viam.components.arm import ArmClient | |
from viam.components.gripper import GripperClient | |
from viam.proto.api.component.arm import JointPositions | |
from viam.robot.client import RobotClient | |
from viam.components.camera import CameraClient, Camera | |
from viam.services.vision import DetectorConfig, DetectorType, Detection | |
from viam.services.types import ServiceType | |
from viam.rpc.dial import Credentials, DialOptions | |
import time | |
import asyncio |
[user] | |
name = Joe Karlsson | |
email = joekarlsson1@gmail.com | |
github = joekarlsson1 | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
ui = auto |
-- create a database | |
create database cosmeticshop; | |
-- create a table | |
use cosmeticshop; | |
create table cosmeticshopfunnel | |
( | |
event_time TIMESTAMP, | |
event_type CHAR(18), | |
product_id CHAR(10), |
/* mySeedScript.js */ | |
// require the necessary libraries | |
const faker = require("faker"); | |
const MongoClient = require("mongodb").MongoClient; | |
function randomIntFromInterval(min, max) { // min and max included | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
} | |
async function init() { |