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
# Install dependencies first (if not already installed): | |
# pip install chromadb sentence-transformers | |
import chromadb | |
from chromadb.utils import embedding_functions | |
# 1. Create or connect to a local ChromaDB client | |
client = chromadb.Client() | |
# 2. Define an embedding function (using a small local model) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Network Simulator Intro</title> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; |
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
This software includes nanoflann (https://github.com/jlblancoc/nanoflann), | |
which is licensed under the BSD 2-Clause License: | |
Copyright (c) 2008-2020 Jose Luis Blanco | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, | |
this list of conditions and the following disclaimer. |
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
#include <iostream> | |
#include <vector> | |
#include <queue> | |
#include <unordered_map> | |
#include <unordered_set> | |
#include <cmath> | |
#include <limits> | |
#include <tuple> | |
#include <set> | |
#include <algorithm> |
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
// Revised version of FlightProfile with time in minutes | |
#include <cmath> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
struct FlightState { | |
double t; // time in minutes | |
double altitude; // meters | |
double speed; // km/h |