Download Flutter SDK, extract the "Flutter" folder and put somewhere on your machine https://flutter.dev/docs/get-started/install
Add path for 'location/flutter/bin'
#!/bin/bash | |
echo "Cleaning up any git ignored files..." | |
# copy and paste the line below to get the same results as running this script | |
git rm --cached `git ls-files -ic --exclude-from=.gitignore` | |
echo "Finished clean up." | |
# source: https://stackoverflow.com/questions/13541615/how-to-remove-files-that-are-listed-in-the-gitignore-but-still-on-the-repositor/13541721 |
""" | |
This file contains many crazy isEven() functions. | |
(C) 2024 Joe Chau. Released under the MIT License. | |
""" | |
@__import__('functools').cache | |
@__import__('typing').final | |
def isIntSafe[x, e](x: int, /) -> bool: | |
"""(C) 2024 Joe Chau. Released under MIT License.""" |
## Unofficial Dockerfile for 3D Gaussian Splatting for Real-Time Radiance Field Rendering | |
## Bernhard Kerbl, Georgios Kopanas, Thomas Leimkühler, George Drettakis | |
## https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/ | |
# Use the base image with PyTorch and CUDA support | |
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel | |
# NOTE: | |
# Building the libraries for this repository requires cuda *DURING BUILD PHASE*, therefore: |
Download Flutter SDK, extract the "Flutter" folder and put somewhere on your machine https://flutter.dev/docs/get-started/install
Add path for 'location/flutter/bin'
//JavaScript implementation of winding number algorithm to determine whether a point is inside a polygon | |
//Based on C++ implementation of wn_PnPoly() published on http://geomalgorithms.com/a03-_inclusion.html | |
function pointInPolygon(point, vs) { | |
const x = point[0], y = point[1]; | |
let wn = 0; | |
for (let i = 0, j = vs.length - 1; i < vs.length; j = i++) { | |
let xi = vs[i][0], yi = vs[i][1]; | |
let xj = vs[j][0], yj = vs[j][1]; |
@echo off | |
rem ===================================================== | |
rem Converts a MP3 file to a M4R file using ffmpeg. | |
rem Usage: Drop a MP3 file at the top of this batch file. | |
rem ===================================================== | |
set ffmpeg_exe="C:\ffmpeg\ffmpeg-20150619-git-bb3703a-win64-static\bin\ffmpeg.exe" | |
rem %~f1 = Full File Path, with drive letter | |
rem %~p1 = Drive Letter | |
rem %~p1 = Path Only |
This logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.
Then, you can use Structlog loggers or standard logging
loggers, and they both will be processed by the Structlog pipeline (see the hello()
endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!
Requests are assigned a correlation ID with the asgi-correlation-id
middleware (either captured from incoming request or generated on the fly).
All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented.
This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog.
You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom
## get interface name (ovs_eth0 below) via ip link | |
ip link add macvlan0 link ovs_eth0 type macvlan mode bridge | |
##192.168.4.204/30 (204-207) | |
ip addr add 192.168.4.204/30 dev macvlan0 | |
ip link set macvlan0 up | |
ip route add 192.168.44.204/30 dev macvlan0 | |
docker network create frontend |
/** | |
normalize co-ordinates that lie outside of the normal ranges. | |
longitude wrapping simply requires adding +- 360 to the value until it comes | |
in to range. | |
for the latitude values we need to flip the longitude whenever the latitude | |
crosses a pole. | |
**/ |
# MIT License | |
# This code will run on VRAM 12GB+ GPU such as T4, RTX 3060 | |
import torch | |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline | |
from langchain.text_splitter import RecursiveCharacterTextSplitter | |
from langchain.document_loaders import PyPDFLoader | |
from langchain.vectorstores import FAISS | |
from langchain.chains import RetrievalQA | |
from langchain.embeddings import HuggingFaceEmbeddings | |
from langchain.llms.huggingface_pipeline import HuggingFacePipeline |