The guide inspired by Static outbound IP address for Cloud Run.
gcloud compute networks list
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| import codecs | |
| import os | |
| import sys | |
| import numpy as np | |
| from sklearn.feature_extraction.text import TfidfVectorizer |
The guide inspired by Static outbound IP address for Cloud Run.
gcloud compute networks list
| const call1Session = callSessionList[0]; // JsSIP.RTCSession instance | |
| const call2Session = callSessionList[1]; // JsSIP.RTCSession instance | |
| const options = { | |
| replaces: call2Session | |
| }; | |
| // Finish attended transfer | |
| call1Session.refer(call2Session.remote_identity.uri, options); |
| const shorten_names = { | |
| "deviceId": "did" | |
| ,"tid": "id" | |
| ,"in1": "in1" | |
| ,"in2": "in2" | |
| ,"in3": "in3" | |
| ,"out1": "out1" | |
| ,"blocked": "out1" // realocation | |
| ,"out2": "out2" | |
| ,"out3": "out3" |
| <html> | |
| <head> | |
| <script src='http://35.209.36.199:8080/client/js-yaml.min.js'></script> | |
| <script type='module'> | |
| import { getUpdates } from 'http://35.209.36.199:8080/client/getUpdates.mjs'; | |
| let now = new Date().getTime(); | |
| function print( obj ) { | |
| console.log("Total elements: ", obj.length); | |
| console.log("seconds processing: ",(new Date().getTime() - now)/1000); |
| /* UTILS AND CONSTANTS*/ | |
| const SPEED_MULTIPLIER = 1.852; | |
| const DISTANCE_MULTIPLIER = 111.045; | |
| const SETTINGS = { | |
| "default_object_online_timeout": 5 | |
| ,"valid_by_avg_speed": false | |
| ,"min_moving_speed": 6 | |
| ,"addon.device_tracker_app_login": false |
| let yamldata = { | |
| t: newdata.t | |
| ,dt: newdata.dt | |
| ,ft: newdata.ft | |
| ,spd: newdata.spd | |
| ,lat: newdata.lat || 0 | |
| ,lng: newdata.lng || 0 | |
| ,ang: newdata.ang | |
| ,stp: newdata.stp | |
| ,ign: newdata.ign |
| import { DocumentData, DocumentSnapshot, QuerySnapshot } from "firebase-admin/firestore"; | |
| type withDocId<T> = T & { docId: string } | |
| type SingleDocument = DocumentSnapshot<DocumentData>; | |
| type QueryDocuments = QuerySnapshot<DocumentData>; | |
| type Snapshot = SingleDocument | QueryDocuments; | |
| type SnapshotNullable = Snapshot | null; | |
| const checkSingle = (snapshot: Snapshot): snapshot is SingleDocument => { |
| import { subDays, format, parse, startOfWeek, addWeeks, startOfMonth, subMonths, subWeeks, addMonths, addDays } from "date-fns"; | |
| import { ReportFields } from "../WindowDeviceReport.asset"; | |
| const getDateRangeFromPresets = function ({ range, timeRange, startTime: customStartTime, endTime: customEndTime, customRange }: ReportFields) { | |
| const rangeToOffset = { | |
| today: [new Date(), new Date()], | |
| yesterday: [subDays(new Date(), 1), subDays(new Date(), 1)], | |
| two_days_ago: [subDays(new Date(), 2), subDays(new Date(), 2)], | |
| three_days_ago: [subDays(new Date(), 3), subDays(new Date(), 3)], |
| import { isNumeric } from "@core/Utils/index"; | |
| const DateDuration = function (milliseconds?: number, hasSeconds = true, hasMinutes = true): string { | |
| if (!milliseconds) { | |
| return "0s"; | |
| } | |
| if (milliseconds <= 0 || milliseconds === Infinity) { | |
| return "0s"; | |
| } |