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
| // triton_seq2seq_backend.h | |
| #pragma once | |
| #include <memory> | |
| #include <string> | |
| #include <vector> | |
| #include <cuda_runtime.h> | |
| #include "triton/backend/backend_common.h" | |
| #include "triton/backend/backend_model.h" | |
| #include "triton/backend/backend_model_instance.h" |
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
| # Configure the OIDC/JWT Auth Backend for GitHub Actions in HashiCorp Vault | |
| resource "vault_jwt_auth_backend" "github" { | |
| description = "JWT Auth backend for GitHub Actions OIDC tokens" | |
| path = "github-actions" | |
| oidc_discovery_url = "https://token.actions.githubusercontent.com" | |
| bound_issuer = "https://token.actions.githubusercontent.com" | |
| } | |
| # Define a policy that allows reading dynamic database credentials | |
| resource "vault_policy" "production_db_read" { |
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 io_uring::{opcode, squeue, types, IoUring}; | |
| use std::fs::File; | |
| use std::os::unix::io::AsRawFd; | |
| use std::alloc::{alloc, dealloc, Layout}; | |
| pub struct StorageRing { | |
| ring: IoUring, | |
| registered_buffers: Vec<*mut u8>, | |
| buffer_layout: Layout, | |
| } |
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" | |
| "io" | |
| "log" | |
| "net/http" | |
| "time" | |
| ) |
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 ( | |
| "bytes" | |
| "errors" | |
| "math/rand" | |
| "sync" | |
| "sync/atomic" | |
| ) |
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
| # SPIRE Server configuration snippet for TPM 2.0 node attestation | |
| server { | |
| bind_address = "0.0.0.0" | |
| bind_port = "8081" | |
| trust_domain = "prod.muklis.internal" | |
| data_dir = "/run/spire/data" | |
| log_level = "INFO" | |
| ca_key_type = "rsa-2048" | |
| ca_ttl = "24h" |
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 numpy as np | |
| from qdrant_client import QdrantClient | |
| from qdrant_client.http import models | |
| class SemanticVectorResolver: | |
| def __init__(self, host: str, port: int, collection_name: str, threshold: float = 0.88): | |
| self.client = QdrantClient(host=host, port=port) | |
| self.collection_name = collection_name | |
| self.threshold = threshold |
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 <uapi/linux/bpf.h> | |
| #include <linux/sched.h> | |
| #include <net/sock.h> | |
| #include <net/inet_connection_sock.h> | |
| #include <bcc/proto.h> | |
| #define MAX_PAYLOAD_READ 256 | |
| #define TRACEPARENT_LEN 55 | |
| struct conn_info_t { |
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
| // Cargo.toml configuration: | |
| // [dependencies] | |
| // tikv-jemallocator = { version = "0.6", features = ["profiling", "unprefixed_malloc_on_supported_platforms"] } | |
| // tikv-jemalloc-ctl = "0.6" | |
| // tokio = { version = "1.0", features = ["full"] } | |
| use std::alloc::System; | |
| #[global_allocator] | |
| static GLOBAL: tikv-jemallocator::Jemalloc = tikv-jemallocator::Jemalloc; |
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 std::alloc::{alloc, dealloc, Layout}; | |
| use std::ptr::NonNull; | |
| pub struct AlignedBuffer { | |
| ptr: NonNull<u8>, | |
| layout: Layout, | |
| capacity: usize, | |
| } | |
| impl AlignedBuffer { |