Skip to content

Instantly share code, notes, and snippets.

View Ugbot's full-sized avatar
🏠
Working from home

Ben Gamble Ugbot

🏠
Working from home
View GitHub Profile
@Ugbot
Ugbot / simd-vmv.c
Created May 31, 2020 10:18 — forked from kbarbary/simd-vmv.c
Vector-matrix-vector multiplication with SIMD (AVX) intrinsics
// Doing the operation:
//
// | a a a a | | y |
// x * A * y = [ x x x x ] | a a a a | | y |
// | a a a a | | y |
// | a a a a | | y |
//
// with SIMD intrinics (specifically AVX).
//
// adapted from https://gist.github.com/rygorous/4172889
@Ugbot
Ugbot / s3lamdba
Created November 12, 2020 15:43
This AWS Lambda that posts an Ably message to S3
package example;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import com.amazonaws.services.lambda.runtime.LambdaLogger;
import com.amazonaws.SdkClientException;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3;
@Ugbot
Ugbot / LICENSE.txt
Created February 22, 2021 17:50 — forked from atanumallick/LICENSE.txt
D3 Rotating Globe with Location Marker
MIT License
Copyright (c) 2018-2022 Atanu Mallick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Ugbot
Ugbot / QuestLogger.js
Last active April 21, 2021 16:06
Logging from Ably into QuestDB
var net = require('net');
var path = require('path');
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const port = 3141;
const fetch = require("node-fetch");
@Ugbot
Ugbot / UE4-build.bat
Created December 23, 2021 08:51 — forked from drewsberry/UE4-build.bat
UE4 Windows command line building
:: Build client
RunUAT BuildCookRun -project="full_path.uproject"^
-noP4 -platform=Win64^
-clientconfig=Development -serverconfig=Development^
-cook -allmaps -build -stage^
-pak -archive -archivedirectory="Output Directory"
:: Cook client
RunUAT BuildCookRun -project="full_project_path_and_project_name".uproject^
-noP4 -platform=Win64^
@Ugbot
Ugbot / RT_plot.py
Created February 1, 2022 11:38
Realtime plotting with SSE
import matplotlib.pyplot as plt
import numpy as np
from pprint import pprint
from sseclient import SSEClient
from urllib.parse import urlencode, quote_plus
from pydantic import BaseModel
import collections
class coinbaseData(BaseModel):
id : str
@Ugbot
Ugbot / Ably_Async_mqtt.py
Created June 21, 2022 15:15
An async example of mqtt from ably realtime in python
async def ably_mqtt():
async with Client(
hostname='mqtt.ably.io',
username="***************",
password="**************"
port=1883,
# protocol=ProtocolVersion.V31
) as client:
@Ugbot
Ugbot / ably-paho-mqtt.py
Created June 21, 2022 16:29
simple python paho mqtt example, using hub data
import paho.mqtt.client as mqtt
import logging
def create_logger():
logger = logging.getLogger('mqtt debug')
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
/*
* 3D Geohash modified from https://github.com/kungfoo/geohash-java/blob/master/src/main/java/ch/hsr/geohash/GeoHash.java
* Paul Brebner, Instaclustr.com
* 5 June 2019
* Just a demonstration of how altitude can be used to encode a 3D geohash, for use with Anomalia Machina blog series.
*/
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
{
"info": {
"_postman_id": "07c117b0-7200-41b9-94fc-5836a6b08d7b",
"name": "Kafka Rest Proxy API",
"description": "Adapted from https://docs.confluent.io/current/kafka-rest/api.html",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "v2",