- Download as zip with command
curl -LJO https://gist.github.com/kangks/eda238bdee360070244ff9e53fc71312/archive/7ae513002e69388b438dd2b3e6994b9d2abbb801.zip
- Extract and run
docker-compose up
from the folder - For first run, wait for the composer to finish download all dependencies
- Open a browser and enter
http://localhost/pinpoint.php
as the url
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance_type,model,Prompt,e2e_time(s),ttft(s),generated_text | |
c8g.24xlarge,deepseek-ai/DeepSeek-R1-Distill-Qwen-14B,1,168.12608194351200,8.629130601882940,"Okay, so I need to figure out how to split a $500,000 budget among three areas: warehouse expansion, delivery fleet upgrades, and last-mile distribution technology. Each has different ROI potentials, but also some constraints. Let me break this down step by step.\n\nFirst, I remember there are some constraints. There's an ongoing maintenance contract for the fleet that requires a minimum of $100,000. That's a fixed expense, so I can't go below that. Also, there's a regulatory guideline that says at least 10% of the budget must be set aside for sustainability improvements. Let me calculate that 10% of $500,000 is $50,000. So, I need to allocate at least $50,000 to sustainability.\n\nNow, the total minimum required for both the fleet and sustainability is $100,000 + $50,000 = $150,000. That leaves me with $500,000 - $150,000 = $350,000 to distribute among th |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://docs.cardano.org/projects/plutus/en/latest/tutorials/basic-validators.html#basic-validators-tutorial | |
-- https://edu.clio.one/lessons/writing-your-first-plutus-smart-contract/lessons/writing-your-first-plutus-code/ | |
module SimpleValidator where | |
import Data.Text | |
-- import Language.Plutus.Contract | |
import Language.PlutusTx | |
--import qualified Language.PlutusTx as PlutusTx | |
import Playground.Contract |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib3 | |
def lambda_handler(event, context): | |
return { | |
'statusCode': 200, | |
'body': get_public_ip() | |
} | |
def get_public_ip(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip install --upgrade mxnet-cu$(ls /usr/local/cuda/lib64/libcudart.so.*.? | sed -e 's/.*\.\([0-9]*\.[0-9]*\)/\$1/g' -e 's/\.//g') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, argparse | |
import boto3 | |
import pathlib | |
from pathlib import Path | |
import random | |
parser = argparse.ArgumentParser(description='Script to start OTA update') | |
parser.add_argument("--aws_profile", help="Profile name created using aws configure", default="default", required=False) | |
parser.add_argument("--s3bucket", help="S3 bucket to store firmware updates", required=True) | |
parser.add_argument("--s3prefix", help="S3 bucket prefix to store firmware updates", required=False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import time | |
import threading | |
import json | |
import logging | |
import paho.mqtt.client as mqtt | |
import paho.mqtt.publish as mqtt_publish | |
import boto3 | |
subscriber_keepalive_sec = 40 * 60 # 40 mins |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from awsglue.transforms import * | |
from awsglue.utils import getResolvedOptions | |
from pyspark.context import SparkContext | |
from awsglue.context import GlueContext | |
from awsglue.job import Job | |
import json | |
import requests | |
from pyspark import sql | |
from uuid import UUID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Metadata: | |
Comment: "Stack for S3 event -> Lambda transform from csv to json -> kinesis stream -> downstream Lambda for each row processing. | |
These are the purpose of the demo: | |
- Retry of downstream Lambda when failed. The record in Kinesis Stream will not be removed until success Runtime | |
- With large CSV, the Lambda will parallel according to number of shards of Kinesis Stream" | |
Resources: | |
IAMRole: | |
Type: "AWS::IAM::Role" | |
Properties: |
NewerOlder