Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
{"type":"Feature","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[140.62377016190007,-22.780560869748395],[140.62498575584422,-22.77571535991859],[140.6301201675233,-22.77408254715608],[140.6340394877437,-22.777295177048817],[140.6391741268257,-22.775662033265295],[140.6430940709689,-22.778874595401366],[140.6482289372175,-22.77724112054187],[140.65214950518765,-22.780453614758805],[140.6572845983663,-22.77881980876849],[140.6612057900674,-22.782032234903745],[140.66634110993945,-22.780398097727762],[140.67026292527552,-22.783610455618835],[140.67539847160427,-22.781975987202404],[140.67661170026943,-22.777129228709452],[140.67268977979094,-22.7739172014943],[140.66755473575034,-22.775551602105494],[140.66363343873374,-22.77233950662832],[140.65849862118233,-22.773973576124632],[140.6545779477238,-22.770761412547905],[140.64944335689816,-22.772395150984142],[140.64552330709375,-22.769182919470317],[140.64038894323042,-22.770816326901286],[140.63646951717607,-22.76760402761282],[140.6313353
@ejdoh1
ejdoh1 / sampleTripData.json
Created April 8, 2022 07:57
Kepler.gl sample trip data
{
"fields": [
{
"name": "tpep_pickup_datetime",
"format": "YYYY-M-D H:m:s",
"type": "timestamp"
},
{
"name": "pickup_longitude",
"format": "",
@ejdoh1
ejdoh1 / rtsp-fwd.md
Last active May 4, 2021 04:58
RTSP Forwarding

Overview

This is information for how to forward a video stream from an RTSP server to another RTSP server with an Android smartphone. For demo purposes it uses the MacOS webcam to create a RTSP stream which is forwarded to a cloud hosted RTSP server

Prerequisites

  • Macbook with webcam, ffmpeg and ffplay installed.
  • Docker.
  • Android phone with app FFmpegui installed & configure to use the built-in binary.
  • Cloud docker container hosting (Azure ACI, AWS ECS, etc)
@ejdoh1
ejdoh1 / macos-webcam-rtsp.sh
Last active April 24, 2024 03:29
MacOS webcam RTSP server & client
# local
ffmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" -preset ultrafast -tune zerolatency -f mpegts udp://127.0.0.1:9090
ffplay -fflags nobuffer -flags low_delay -framedrop -strict experimental udp://127.0.0.1:9090
# remote
ffmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" -preset ultrafast -tune zerolatency -f flv rtmp://REPLACEME.australiaeast.azurecontainer.io/live/test
ffplay -fflags nobuffer -flags low_delay -framedrop -strict experimental rtmp://REPLACEME.australiaeast.azurecontainer.io/live/test
@ejdoh1
ejdoh1 / websocket-server-sender.py
Created March 30, 2021 01:20
websocket-server-sender.py
import asyncio
import websockets
import time
import json
async def sender(websocket, path):
print("Client connected on path:", path)
while True:
time.sleep(5)
m = json.dumps({'hello': 'world'})
@ejdoh1
ejdoh1 / getwines.sh
Created February 2, 2021 14:18
Script for getting wines list
#!/bin/bash
for i in {1..76}; do
echo "Processing page $i"
curl -s "https://bestwine24.ru/vino/smf/tsvet-is-krasnoe/tsena-is-do-1000/?page=${i}" | grep -e 'data-object=' -A 7 | grep -v -e 'data-object=' >"p${i}.html" && cat "p${i}.html" | cut -f2 -d':' | tr -d '\n' >"p${i}.csv" && sed -i '' $'s/--/\\\n/g' "p${i}.csv" &
done
echo '"name","id","price","brand","category","list","position"' > out.csv && cat *csv > out.csv
@ejdoh1
ejdoh1 / get_stock_symbols.py
Created January 29, 2021 05:05
Gets a list of stock ticker symbols
import shutil
import urllib.request as request
from contextlib import closing
import csv
URLS = [
{
"url": "ftp://ftp.nasdaqtrader.com/SymbolDirectory/otherlisted.txt",
"key": "ACT Symbol"
},
@ejdoh1
ejdoh1 / get_reddit_comments.py
Created January 29, 2021 01:56
Write all Reddit comments for a submission to a file
import sys
import argparse
import praw
from praw.models import MoreComments
import json
SUBMISSION = 'l79x17'
def main(arguments):
@ejdoh1
ejdoh1 / lyrics1.txt
Created August 5, 2020 12:37
BeyoncAI
But I'm not the one to judge, I'm not even the one to judge
This all started when you looked at me
Baby
I wanted more than just a man
I needed a friend
You are my best friend (yeah)
I really like you (yeah)
And I really like you (yeah)
But baby I'm not a big girl
I'm not a chick, I'm not even close to chick