Skip to content

Instantly share code, notes, and snippets.

View mohammadasim98's full-sized avatar
👽

Mohammad Asim mohammadasim98

👽
View GitHub Profile
@dave-malone
dave-malone / aws-iot-update-thing-shadow-lambda-function.js
Last active May 25, 2022 05:57
AWS Lambda function example of how to update IoT Thing Shadows
const AWS = require('aws-sdk')
AWS.config.region = process.env.AWS_REGION
const AWS_IOT_CORE_ENDPOINT = process.env.MQTT_BROKER_ENDPOINT
const IOT_THING_NAME = process.env.THING_NAME
const iotdata = new AWS.IotData({
endpoint: AWS_IOT_CORE_ENDPOINT,
})
@ctralie
ctralie / GreedyFurthestPoint.py
Last active December 12, 2023 22:20
Greedy Furthest Point Sampling
"""
Programmer: Chris Tralie
Purpose: To demonstrate a greedy furthest point sampling, which is a general technique
for getting good points that are "spread out" and cover the dataset well
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn.metrics.pairwise import pairwise_distances
def getGreedyPerm(D):