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
| #pragma once | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <stdatomic.h> | |
| #include <semaphore.h> | |
| #include <sys/types.h> | |
| #define RING_CAPACITY 4096 // Must be a power of two | |
| #define MSG_PAYLOAD_SIZE 1024 |
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
| package com.example.observability; | |
| import io.opentelemetry.api.trace.Span; | |
| import io.opentelemetry.api.trace.Tracer; | |
| import io.opentelemetry.context.Context; | |
| import io.opentelemetry.context.Scope; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| public class ManualContextPropagator { |
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 os | |
| import datetime | |
| from collections import defaultdict | |
| from git import Repo | |
| import numpy as np | |
| def analyze_git_temporal_coupling(repo_path, service_dirs, days=90): | |
| repo = Repo(repo_path) | |
| since_date = datetime.datetime.now() - datetime.timedelta(days=days) | |
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
| resource "aws_kms_key" "spiffe_attestation" { | |
| description = "Asymmetric KMS Key for SPIFFE/SPIRE Fargate Attestation" | |
| customer_master_key_spec = "RSA_2048" | |
| key_usage = "SIGN_VERIFY" | |
| deletion_window_in_days = 7 | |
| policy = jsonencode({ | |
| Version = "2012-10-17" | |
| Statement = [ | |
| { |
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
| package blink | |
| import ( | |
| "bytes" | |
| "sync" | |
| "sync/atomic" | |
| "unsafe" | |
| ) | |
| // Key represents the indexing key. |
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
| use log::{info, warn}; | |
| use proxy_wasm::traits::*; | |
| use proxy_wasm::types::*; | |
| proxy_wasm::main! {{ | |
| proxy_wasm::set_log_level(LogLevel::Info); | |
| proxy_wasm::set_root_context(|_| -> Box<dyn RootContext> { | |
| Box::new(GuardrailRootContext { | |
| config: GuardrailConfig::default(), | |
| }) |
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
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "time" | |
| "google.golang.org/grpc" | |
| "google.golang.org/grpc/credentials/insecure" | |
| pb "github.com/ashari/grpc-otel-ebpf/proto" |
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
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "time" | |
| "google.golang.org/grpc" | |
| "google.golang.org/grpc/credentials/insecure" | |
| pb "google.golang.org/grpc/examples/helloworld/helloworld" |
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 re | |
| from typing import List, Dict, Any | |
| class MarkdownStructuralChunker: | |
| def __init__(self, max_chunk_size: int = 1000): | |
| self.max_chunk_size = max_chunk_size | |
| self.header_regex = re.compile(r'^(#{1,6})\s+(.+)$', re.MULTILINE) | |
| def chunk_document(self, text: str) -> List[Dict[str, Any]]: | |
| lines = text.split('\n') |
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
| package main | |
| import ( | |
| "sync/atomic" | |
| ) | |
| // Node represents a physical backend server (e.g., a Redis or gRPC instance). | |
| type Node struct { | |
| ID string | |
| Addr string |