sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
d47763882d4f4ce4278894f283764c33a5a6de3d6f879dada20c9d19c38fb963 | R | 68,809 | 2,388 | ..required_plotting_packages <- function(extended = FALSE) {
plot_packages <- c("ggplot2", "labeling", "scales", "rlang")
if (extended) plot_packages <- c(plot_packages, "gtable", "ragg")
return(plot_packages)
}
#' Familiar ggplot2 theme
#'
#' This is the default theme used for plots created by familiar. The... |
bfc5da54b680b7a20dbbe8be7b942157ec2af2c08812e68677013acc7de10b47 | R | 69,081 | 2,209 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
#' @include FamiliarDataComputationPredictionData.R
# predictionTableRegression ----------------------------------------------------
setClass(
"predictionTableRegression",
contains = "familiarDataElementPredictionTable",
slots = list(
"observed... |
439b0e055dd2360dab5b4f138ff5f0a5cbcb2fb67ff4394743f5f4585b375175 | R | 70,134 | 1,788 | # familiarModel object ---------------------------------------------------------
#' Familiar model.
#'
#' A familiarModel object is a self-contained model that can be applied to
#' generate predictions for a dataset. familiarModel objects form the parent
#' class of learner-specific child classes.
#'
#' @slot name Nam... |
d37b297237270bda101e96f41eac357786964ac6d02174bf8768f40ccb4c7afb | R | 70,669 | 2,478 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# plot_ice (generic) -----------------------------------------------------------
#' @title Plot individual conditional expectation plots.
#'
#' @description This method creates individual conditional expectation plots
#' based on data in a fami... |
acb2cdd70e0af86c448d38cf1ff3a13ad75c774f478b59205d0de6bc4cafc2cd | R | 72,081 | 1,511 | ---
title: "Entopallium Ephys analysis"
output:
html_document:
df_print: paged
pdf_document: default
---
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the *Run* but... |
a0641921f26b57b1203c8894c1543ca295c755a5c8967d35923f81b0aecd17fb | R | 72,842 | 1,669 | # This code was used for statistical analyses involving brain region immediate early gene data for the following manuscript:
# Morgan L. Gustison, Rodrigo Muñoz Castañeda, Pavel Osten, Steven M. Phelps (2023) Sexual coordination in a whole-brain map of prairie vole pair bonding. eLife. DOI: https://doi.org/10.7554/eLi... |
ce8946b7bb18ed7c81ee4ecb0285022e05ea67c630cf03a6875459869c29c071 | R | 73,694 | 1,504 |
##
##
##
##
########################################################################################################################################################
########################################################################################################################################################
#... |
aa21058664329b44c3cb13b18d72c973b4a0da758e7b90588346e2640d47119c | R | 74,259 | 1,836 |
#' @title aes_string2
#' @name aes_string2
#' @param \dots aes_string parameters
#' @keywords internal
#' @description makes sure aes_string can also be used with names that start with numeric values
aes_string2 <- function(...){
args <- lapply(list(...), function(x) sprintf("`%s`", x))
do.call(ggplot2::aes_string... |
8a83cd2b89fabff07bd8dee3f72476d9ede6636018b15875a2de1b142de5170f | R | 75,674 | 2,431 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# plot_sample_clustering (generic) ---------------------------------------------
#' @title Plot heatmaps for pairwise similarity between features.
#'
#' @description This method creates a heatmap based on data stored in a
#' `familiarCollection... |
4ab867c4d847fa8824fe6232a393678e31f5e01a1722e2aecb2c79be17f11e66 | R | 76,244 | 1,276 |
##
##
##
##
##
##
##
########################################################################################################################################################
#################################################################################################################################################... |
1947eb7f7e898ed16731284114d72d0992a83940cde38dc01699e137fcd7f997 | R | 77,552 | 2,859 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
#' @include LearnerS4Naive.R
NULL
# as_data_object methods -------------------------------------------------------
#'@title Creates a valid data object from input data.
#'
#'@description Creates a `dataObject` object from input data. Input data can be
... |
95292519b456613cab4507f1ad18b8809ca2986384f18d1b1be7912b7a79242a | R | 80,093 | 1,878 | ## Giotto cell type enrichment for spots functions ####
# * ####
# cell type proximity for spots ####
#' @title cell_proximity_spots_internal
#' @name cell_proximity_spots_internal
#' @description Compute cell-cell interactions observed value inner each spot
#' @param cell_IDs cell_IDs get from gobject@cell_ID
#' @pa... |
61b89f191693afc1e9d4a973d24a24b3ef6599604f805c1cfd461c8ec880350f | R | 80,195 | 1,850 | ---
title: "PB34_calculations_RMarkdown"
author: "Kathleen Heng"
date: "7/05/2022"
output: html_document
---
```{r}
library(tidyverse)
library(readxl)
library(ggplot2)
library(quantmod)
library(writexl)
library(beepr)
```
```{r}
#load the data
PB34_baseline_OD <- read_excel("C:\\Users\\Kathy H... |
91678b1c794469f327615852ee982b11e5cc25f81c6088a5bd4c7a6413221290 | R | 80,906 | 1,803 | ##############
### Script ###
##############
# Script to generate tables for parameter estimates, prediction and inference results.
#################
### Libraries ###
#################
library(ggplot2)
library(viridisLite)
library(RColorBrewer)
library(scales)
library(dplyr)
library(reshape2)
library(abind)
librar... |
2bb4dd0146ff11f3990eb9eb740422fd0b2f0b5fb0f0646c70350fecc7c5acad | R | 81,581 | 2,342 |
## Giotto stat functions ####
#' @title mean_giotto
#' @description mean function that works with multiple matrix representations
#' @param x vector
#' @param \dots additional parameters
#' @return numeric
#' @keywords internal
mean_giotto = function(x, ...) {
if(methods::is(x, 'dgCMatrix')) {
return(Matrix::m... |
36172fc99fa65cf90597415b458d74cc926163d455430c3853d0fc843d746162 | R | 83,839 | 1,385 | #########################################################
### Source code for Audet et al. 2023 Nat. Ecol. Evol ###
#########################################################
### Load packages ###
library("rptR")
library("MCMCglmm")
library("lme4")
library("lmerTest")
library("tidyverse")
library("ggplot2")... |
9c65979798d5f9ea7387cbdcf8c96bd96d81d55b87e7eda999480702929f075b | R | 84,369 | 2,542 | #' Internal function for creating or retrieving iteration data
#'
#' @param file_paths Path to directory where iteration files are stored.
#' @param data Data set as loaded using the `.load_data` function.
#' @param experiment_setup data.table with subsampler information at different
#' levels of the experimental des... |
90d7e6de4186449e0dcc9e3943433ba39f41a1d97d3172aecb68ec9072d25acd | R | 92,373 | 2,260 |
## Spatial structure helper functions ####
#' @title spatNetwDistributionsDistance
#' @description This function return histograms displaying the distance distribution for each spatial k-neighbor
#' @param gobject Giotto object
#' @param spatial_network_name name of spatial network
#' @param hist_bins number of bin... |
7d14af2cf8e9dce7646acd19cd6d429498d3d54bf0caf71ea62f6ed4cccdf4e4 | R | 93,305 | 1,230 | #' Plots relative abundance heatmaps annotated by the metadata using as input a SummarizedExperiment object
#' @param ExpObj JAMS-style SummarizedExperiment object
#' @param glomby String giving the taxonomic level at which to agglomerate counts. This argument should only be used with taxonomic SummarizedExperiment o... |
f94820530a49b36aa65f02c7a9cb7e3f5b5a50864f8f23698b344be42914a683 | R | 99,186 | 2,466 |
#' @title doLeidenCluster
#' @name doLeidenCluster
#' @description cluster cells using a NN-network and the Leiden community detection algorithm
#' @param gobject giotto object
#' @param name name for cluster
#' @param nn_network_to_use type of NN network to use (kNN vs sNN)
#' @param network_name name of NN network t... |
af2b594cdc8aad029a623b36d7e38a23ca78e142c574e7283e8f7fd2986f626d | R | 103,878 | 2,190 | # This code was used to create functions for the data analysis in following manuscript:
# Morgan L. Gustison, Rodrigo Muñoz Castañeda, Pavel Osten, Steven M. Phelps (2023) Sexual coordination in a whole-brain map of prairie vole pair bonding. eLife. DOI: https://doi.org/10.7554/eLife.87029.1
########################... |
4b900a5485e52fb75b5154fb281dc0824ac7b8d730bad1463519269e1ba01091 | R | 110,753 | 2,510 |
# cell type proximity enrichment ####
#' @title make_simulated_network
#' @name make_simulated_network
#' @description Simulate random network.
#' @keywords internal
make_simulated_network = function(gobject,
spatial_network_name = 'Delaunay_network',
... |
d21df4e16bc29cce05ab5b35da3a9f5ab3774b9071769d959e68ee9b8a9f8c93 | R | 121,726 | 1,788 | library(shiny)
library(ShinyDash)
library(markdown)
library(shinydashboard)
library(rCharts)
#library(shinyIncubator)
library(digest)
library(shinyjs)
library(colourpicker)
library(d3heatmap)
library(networkD3)
source("version.R")
source("language.R")
#library("shinythemes")
#RGB colors table
#http://www.javascripte... |
58d1d1d029b84f62bf024c1251183429663684d8e0c77cbc36baa1940e7047fa | R | 121,794 | 3,099 | ## ---- clusNum --------
py <- readr::read_csv(file = 'data/ch_score_LEiDa_dim.csv',
col_names = FALSE)
py2 <- readr::read_csv(file = 'data/db_score_LEiDa_dim.csv',
col_names = FALSE)
clusSc <- as.data.frame(cbind(2:20,
py$X1,
... |
b0e8897e08bc8c6ff385af465104a0d349b1288037ce1fb47590831c3d895593 | R | 131,635 | 2,905 |
#' @title cellProximityBarplot
#' @name cellProximityBarplot
#' @description Create barplot from cell-cell proximity scores
#' @param gobject giotto object
#' @param CPscore CPscore, output from cellProximityEnrichment()
#' @param min_orig_ints filter on minimum original cell-cell interactions
#' @param min_sim_ints ... |
d7514d1904b0e6fbcf6fe67ed9b9ab90e82626356d6c4ec41101607a2f3359cb | R | 152,323 | 4,585 | ####################################################
# MuxNetLib: Library for Multilayer Network Analysis in muxViz
#
# Version: 3.0
# Last update: Jan 2021
# Authors: Manlio De Domenico
#
# History:
#
# Jan 2021: From R source file to an R package
# Mar 2017: From Matlab to R!
# May 2014: First release, including part... |
d1334a0d62244a8666809239e956a9acca7ce1a3e62f094fb93c55557106b85a | R | 152,923 | 3,885 |
## spatial gene detection ####
#' @title spat_fish_func
#' @name spat_fish_func
#' @description performs fisher exact test
#' @keywords internal
spat_fish_func = function(gene,
bin_matrix,
spat_mat,
calc_hub = F,
... |
5e93d0f99d26764f16360afdde09fe789029796a4502dd44f07e03784d7ffb3e | R | 153,747 | 3,131 | # This code was used to create figures for the following manuscript:
# Morgan L. Gustison, Rodrigo Muñoz Castañeda, Pavel Osten, Steven M. Phelps (2023) Sexual coordination in a whole-brain map of prairie vole pair bonding. eLife. DOI: https://doi.org/10.7554/eLife.87029.1
#====================================
# Set... |
89dbd642c17a498f960d3835a1c9cd2b56e1f9524ad42e1243c732517e45a96c | R | 159,602 | 3,029 | ### EE CA1 Shiny app
library(shiny)
library(plotly)
library(ggpubr)
library(afex)
library(dplyr)
library(reshape2)
library(xtable)
library(emmeans)
# library(Rmpfr)
library(ggsignif)
library(plotrix)
library(scales)
# library(forcats)
# library(Hmisc)
library(rstatix)
shinyServer(... |
f5638135c3add753928a96c25e4c890a28f7fa5b089544c311ee4806b46d088c | R | 179,586 | 5,281 | rowid=.N=colid=V1=inner=startFrom=breakAt=upTo=qid2=tmp.start=subject.id=query.id=transition=ix=nacluster=clusterlength=ix.new=slen=slev=clilp=val=query.id=subject.id=lev=len=cs=type=group=run=chr=ra1.ix=ra2.ix=pos2=chr=V1=NULL
#' DNAaseI hypersensitivity sites for hg19A
#'
#' DNAaseI hypersensitivity sites from UCSC ... |
2f57e6ff3c3791ab702f161bc3b50fa1efeb3b182c7e29f24ffb556bc6d75008 | R | 184,667 | 3,994 | # Sam LaMunion; samuel.lamunion@nih.gov
rm(list=ls()) # start with a clean environment
# list.of.packages <- c("ggplot2", "stats", "tidyr", "dplyr", "magrittr", "reshape2", "janitor", "broom", "ggpubr", "ggpmisc", "readxl", "patchwork")
# new.packages <- list.of.packages[!(list.of.packages %in% installed.packages(... |
151d6400f29a68708d8b145f0e53a37216b8f5a146ef06b6fee0067a8f7342c5 | R | 194,036 | 5,001 | #' Internal function for parsing file paths
#'
#' @param config A list of settings, e.g. from an xml file.
#' @param project_dir (*optional*) Path to the project directory. `familiar`
#' checks if the directory indicated by `experiment_dir` and data files in
#' `data_file` are relative to the `project_dir`.
#'
#' @... |
538ae6ad29d669bcf1bafc62d8b5597cfdbd06a978d94ae373ed9acaf5b98144 | R | 200,000 | 6,009 | test_all_learners_available <- function(learners) {
# Create placeholder flags.
learner_available <- logical(length(learners))
names(learner_available) <- learners
# Iterate over learners.
for (learner in learners) {
# Determine if the learner is available for any outcome.
for (outcome_type in c(
... |
5c83fd7b83f663ae564c7d73bd1bd42fb4ebbc3e51dac2968058ab4d0497f2e7 | R | 200,000 | 3,729 | library(RColorBrewer)
library(colorspace)
library(igraph)
library(rgl)
library(mapproj)
library(maps)
library(OpenStreetMap)
library(shiny)
library(shinyjs)
library(graphics)
library(ShinyDash)
#library(shinydashboard)
#library(shinyIncubator)
library(digest)
library(googleVis)
library(lattice)
library(fields)
library(... |
6b444009e3d0964a63c9e8035c44a0fac4fd712bd963d3a908b2a3e8be1b55a1 | R | 200,000 | 4,583 |
## * ####
## 2-D ggplots ####
## ----------- ##
#' @title plot_network_layer_ggplot
#' @name plot_network_layer_ggplot
#' @description Visualize cells in network layer according to dimension reduction coordinates
#' @param gobject giotto object
#' @param annotated_network_DT annotated network data.table of selected... |
07f64d2d01b8a8cb81d8c387756f293688c981953b796e6852aa6e0627d4da34 | R | 200,002 | 3,470 | ---
title: "Spatial Extent Paper - Analyses"
output: html_document
date: "2023-09-07"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Author: Frederic St-Onge
Date: September 7th 2023
Updated: November 14th 2023
# Introduction and notes
This document includes all analyses from the paper "Tau ... |
97d44f2fb0ef7fb79cc8f7c04438d34bc262a99774abb427cd310bceb56c7107 | Rust | 15 | 1 | pub mod types;
|
6826e31f3dd2351f63a121ca6fc9159b7ecf6d443ac6d4dfab167d6b9f24e339 | Rust | 23 | 1 | pub(crate) mod errors;
|
ed896ef19f93307684ce6af84f9700c6b4c8da3798aab021f5b31b4dda2ec557 | Rust | 28 | 1 | pub mod collection_browser;
|
ad99848c6fda8f711df96712da912e29f1dbf6229d077d60859a91aa9b26d027 | Rust | 30 | 2 | #[cfg(test)]
mod integration;
|
60da1da7061257145a1c1f06e52ff78303ca9599b51deca5e074dd29d5f4c566 | Rust | 33 | 1 | pub mod sparse_index_test_utils;
|
dabbd60a3f90ab5b66ec4dc92a03e025c7f88afaf43aef9d8037d0a523bb4fa4 | Rust | 37 | 2 | pub mod benchmark;
pub mod datasets;
|
7fed1f1f31c3cd3e15a238745d9555a277ad8a7aa27c0771c6df6d04c9d0c6c9 | Rust | 47 | 3 | pub mod error;
pub mod operator;
pub mod plan;
|
0bfdbd50aa2501b94f8ee627d6cbf14c493012dd0b67024e06cf1d7cfdc17315 | Rust | 48 | 2 | pub mod dashboard_client;
pub(crate) mod utils;
|
e95d8872fc3d0932a9caa093f0d792242b29c7c7879416b4f13fdb949fb995fa | Rust | 50 | 1 | pub use chroma_tracing::init_server_otel_tracing;
|
68bb780bb2ea620c438b1002e3dfbe57416125c6a757bb47f1e82cbdf6829366 | Rust | 53 | 3 | //! Built-in tool implementations.
pub mod weather;
|
749fc12e536e77482971bea45763386c21192a1f0e3b8175b8a2a7e003511da9 | Rust | 55 | 2 | pub(crate) mod convert;
pub(crate) mod fragment_fetch;
|
94085c7b7f7e1621259386a0fd92721bddb450b86a019ea9a96a206221b531d3 | Rust | 61 | 3 | pub mod functions;
pub mod operators;
pub mod orchestration;
|
71b61de74caafb5f27db3d24d197b64282f49f807b969e140ca8ce181e5464fc | Rust | 63 | 5 | extern crate napi_build;
fn main() {
napi_build::setup();
}
|
02f1579b4fd1b28dc2374ea4ff8523f13e9c21fcfe49472400ac039fcc42d39a | Rust | 66 | 4 | pub mod bitmap_index;
pub mod tokenizer;
pub mod types;
mod util;
|
7105d9253d5e3803571bb4ac8d84c7869f36e0f9e701a3c466a928df4438e8f9 | Rust | 76 | 5 | pub mod config;
pub mod db;
pub mod helpers;
mod migrations;
pub mod table;
|
bdb65dd48fdf9d0e049a7b864483e4f8de1064db7891189bc965461a1cfd7b4b | Rust | 81 | 5 | pub mod cursor;
pub mod maxscore;
pub mod reader;
pub mod types;
pub mod writer;
|
d023a84e5fb33ee486a33e5ba16a7bedbe50f41626a3d2707af95e330d5276cb | Rust | 94 | 4 | #[tokio::main]
async fn main() {
worker::work_queue::server::service_entrypoint().await
}
|
3a31924db64a9c3669a48d655c124409d3c9b4ef2fcdff287896b810837ef1e1 | Rust | 97 | 4 | pub(super) mod bool_key;
pub(super) mod f32_key;
pub(super) mod str_key;
pub(super) mod u32_key;
|
8a45abd5ff9dd266be5796108dd6d0875396038dbce197cbaa517ddec33d3e5b | Rust | 100 | 5 | pub mod client_manager;
pub mod config;
pub mod memberlist_provider;
pub use client_manager::Tier;
|
a46c8f9d613fb6e17a0891d28d802fcda40d2963b30da0a9f4e761bf61a94196 | Rust | 104 | 5 | pub mod fast_writer;
#[cfg(feature = "usearch")]
pub mod quantized_spann;
pub mod types;
pub mod utils;
|
61e4cacb8962a13705fa502f5c2ba36ee850cf4aab5767f263a7b687e690a990 | Rust | 107 | 4 | pub(crate) mod provider;
pub(super) mod reader_writer;
pub(crate) mod storage;
pub use storage::Writeable;
|
545921d06d84ef45b4e05616c466b0b963f416f2db27486b740a22c9a0d6261d | Rust | 120 | 6 | pub mod config;
pub mod fn_consumer_manager;
mod grpc;
pub mod server;
pub use server::fn_consumer_service_entrypoint;
|
4bfe8be002c7ab4c0ac6b5f2884c3d7647b5d9d7a4185602bec5e51846bfac5d | Rust | 145 | 7 | use thiserror::Error;
#[derive(Debug, Error)]
pub enum MeteringError {
#[error("Unable to send meter event: {0}")]
SendError(String),
}
|
ba91096473894092c067c391fcf25d12987799d19aa00b1f6f3a3d8212729146 | Rust | 153 | 10 | pub mod browse;
pub mod copy;
pub mod db;
pub mod install;
pub mod login;
pub mod profile;
pub mod run;
pub mod update;
pub mod vacuum;
pub mod webpage;
|
79d12ed5f776519c619ff69e63d4bf316938e4c0a9fa073b22fd9aa72b684349 | Rust | 155 | 6 | fn main() {
println!("moo!");
// Stop once per day.
std::thread::sleep(std::time::Duration::from_secs(86_400));
println!("going down!");
}
|
f9398841fc3bb74c5756d195a35488988162a084f5a15badc6c103feb11fc054 | Rust | 160 | 10 | pub mod types;
pub mod util;
pub mod gist;
pub mod ms_marco_queries;
pub mod rust;
pub mod scidocs;
pub mod sift;
pub mod wikipedia;
pub mod wikipedia_splade;
|
ad91c81623ebca965ae78361f6d8d8ebcd2b25775f7514050655828ad6dfc4c8 | Rust | 164 | 11 | mod error;
mod fork;
mod get;
mod heartbeat;
mod user_identity;
pub use error::*;
pub use fork::*;
pub use get::*;
pub use heartbeat::*;
pub use user_identity::*;
|
e610ff40cbc2c2cf5cc206f5449101f10cadd01edafbef55cf0cef932ae21cd6 | Rust | 164 | 9 | #![windows_subsystem = "console"]
use chroma_cli::chroma_cli;
use std::env;
fn main() {
let args: Vec<String> = env::args().collect();
chroma_cli(args)
}
|
b19edf7a38c6cb35d82d77eb98a69090454dce31d4678b86e0c7fac5c89cdf73 | Rust | 165 | 7 | pub mod in_memory_frontend;
pub mod service_based_frontend;
mod utils;
use service_based_frontend::ServiceBasedFrontend;
pub type Frontend = ServiceBasedFrontend;
|
4223b1751166be588974bf2bc52bd43566f93dff5f82bd4b9da6bc06feddbf97 | Rust | 166 | 8 | pub(in crate::arrow) mod delta;
mod key;
mod types;
mod value;
// Re-export types at the arrow_blockfile module level
pub(crate) use types::*;
pub use types::Block;
|
b29bf3ccfce7488cf2aabad3cec2b3219b46042767e97d1be0ceb91f954b6705 | Rust | 177 | 6 | pub(crate) mod arbitrary;
pub(crate) mod assertions;
pub(crate) mod frontend_reference;
pub(crate) mod frontend_under_test;
pub(crate) mod proptest_types;
pub(crate) mod stats;
|
bcf912f18139a4ae8e8cc59b920d467c76a67168e93bdbaa049551bce79d58f3 | Rust | 182 | 5 | pub(crate) mod garbage_collector_reference;
pub(crate) mod garbage_collector_under_test;
pub(crate) mod proptest_types;
pub(crate) mod segment_file_strategies;
pub(crate) mod stats;
|
697d22175c450bb2adce813c28f03ed48cd9c82c2cb01513e0964856891039f7 | Rust | 183 | 5 | #[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ForkCollectionPayload {
pub new_name: String,
}
|
d4ad7881b531d574bdfd4ce5c68cad7492b48d4dc0d2dfa0d13437353bbf5b32 | Rust | 202 | 11 | mod affinity;
pub mod config;
pub mod dispatcher;
pub mod operator;
pub mod orchestrator;
pub mod worker_thread;
pub use config::*;
pub use dispatcher::*;
pub use operator::*;
pub use orchestrator::*;
|
00ee77dcae135b848fa0e08d695be8d25c7a85174d41b2133d92dd9a37b7e2da | Rust | 213 | 9 | use serial_test::serial;
use worker::config::RootConfig;
#[test]
#[serial]
fn test_default_config_path() {
// Sanity check that root config loads from default path correctly
let _ = RootConfig::load();
}
|
89e404b3e8e7dba3a51e5ca5e0e2910133630ee8b4d7f837e543959177c649e1 | Rust | 214 | 11 | mod compaction_manager;
pub(crate) mod config;
mod scheduler;
mod scheduler_policy;
mod types;
pub(crate) use compaction_manager::*;
pub(crate) use types::*;
pub mod compaction_client;
pub mod compaction_server;
|
7b92728f7049a0ff819b4b661f3b3831a7147453e0d758e6409a6463579addf2 | Rust | 223 | 11 | #![recursion_limit = "256"]
pub mod config;
pub mod sqlite;
#[allow(clippy::module_inception)]
pub mod sysdb;
pub mod test_sysdb;
pub mod types;
pub use config::*;
pub use sysdb::*;
pub use test_sysdb::*;
pub use types::*;
|
fd1e2d3cc887e44073663494d305432852fadca2a6d75076a9a7548e874e7514 | Rust | 237 | 7 | use chroma_cli::hnsw_integrity_check::{hnsw_integrity_check_exit_code, HnswIntegrityCheckArgs};
use clap::Parser;
use std::process::ExitCode;
fn main() -> ExitCode {
hnsw_integrity_check_exit_code(HnswIntegrityCheckArgs::parse())
}
|
5cb771a9fb491d93de2485bd34e02e2c6b96c12a66cd11daec7b9b2016ac05a6 | Rust | 255 | 14 | pub mod errors;
pub mod flusher;
pub mod key;
pub mod reader;
pub mod value;
pub mod writer;
pub mod writer_options;
pub use errors::*;
pub use flusher::*;
pub use key::*;
pub use reader::*;
pub use value::*;
pub use writer::*;
pub use writer_options::*;
|
be7bd37e28ab1d02dadc367fde32af7b18a3229ebb0d9b58d857539e0d1164ec | Rust | 256 | 12 | pub(crate) mod block;
pub(crate) mod blockfile;
#[cfg(test)]
mod concurrency_test;
pub mod config;
pub(crate) mod flusher;
mod migrations;
pub(crate) mod ordered_blockfile_writer;
pub mod provider;
pub mod root;
pub(crate) mod sparse_index;
pub mod types;
|
13c41cd377419e13fb3f900e7ffd863943caf8a3b375fce425754563e189f96d | Rust | 285 | 9 | mod circuit_breaker;
mod fnmatch;
mod scorecard;
mod token_bucket;
pub use circuit_breaker::{CircuitBreaker, CircuitBreakerConfig};
pub use fnmatch::Pattern;
pub use scorecard::{Rule, Scorecard, ScorecardGuard, ScorecardTicket};
pub use token_bucket::{TokenBucket, TokenBucketError};
|
ab18dfb0f9a6595f557783bd8474da7469c71b9d76f53a7dd8c80ab2c3f0dd17 | Rust | 292 | 10 | use serde::{Deserialize, Serialize};
use std::collections::HashSet;
#[derive(Serialize, Deserialize, Debug)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct GetUserIdentityResponse {
pub user_id: String,
pub tenant: String,
pub databases: HashSet<String>,
}
|
fd7ed27ba8ffbedef90f128543ca43c25ad47da1326b7967163ce827239d58b1 | Rust | 298 | 12 | //! Writes a memory cache config to stdout.
use clap::Parser;
use chroma_cache::{CacheConfig, FoyerCacheConfig};
fn main() {
let mut config = FoyerCacheConfig::parse();
config.dir = None;
let out = serde_yaml::to_string(&CacheConfig::Memory(config)).unwrap();
print!("{out}");
}
|
c9dc2deabacb99de3aaa6fb882a2b11d88c1ced4891452cab2cea3d40a695f85 | Rust | 301 | 9 | fn main() {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
// NOTE(rescrv): Default stack size overflows on request to move logs.
.thread_stack_size(16 * 1024 * 1024)
.build()
.unwrap()
.block_on(chroma_log_service::log_entrypoint());
}
|
dab473178c37f7ae758e50d85cfea00ad46c8da973de048df6a15076b99ac1d9 | Rust | 310 | 11 | use chroma_system::thread_stack_size_bytes;
fn main() {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.thread_name("chroma-heap-tender")
.thread_stack_size(thread_stack_size_bytes())
.build()
.unwrap()
.block_on(s3heap_service::entrypoint());
}
|
1db79f9d2055e2eb08b1503ceb174daba925dd1e4d918ad2ac2e216711f3fc7c | Rust | 317 | 24 | pub struct CleanupGuard<F>
where
F: FnMut(),
{
cleanup_fn: F,
}
impl<F> CleanupGuard<F>
where
F: FnMut(),
{
pub fn new(cleanup_fn: F) -> Self {
Self { cleanup_fn }
}
}
impl<F> Drop for CleanupGuard<F>
where
F: FnMut(),
{
fn drop(&mut self) {
(self.cleanup_fn)();
}
}
|
4b18100177cf3e4a7182bc073ffc15e68a271940fd9d9918a24f48d3db9c46e9 | Rust | 325 | 10 | use serde::{Deserialize, Serialize};
/// A stable message clients can use to identify conditional write conflicts.
pub const CONDITIONAL_WRITE_CONFLICT_MESSAGE: &str = "conditional write conflict";
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct ErrorResponse {
pub error: String,
pub message: Strin... |
599a1f621f26cef7307e6a1c2057b3fcfb37e84df99abcac984750b31ff105b7 | Rust | 326 | 11 | use chroma_system::thread_stack_size_bytes;
fn main() {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.thread_name("chroma-compaction-client")
.thread_stack_size(thread_stack_size_bytes())
.build()
.unwrap()
.block_on(worker::compaction_client_entrypoint(... |
fdd793e11896af47acc06baedf035aeab5eaf98a0da82f60be8ead5b1c091c1b | Rust | 329 | 9 | use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct HeartbeatResponse {
#[serde(rename = "nanosecond heartbeat")]
#[cfg_attr(feature = "utoipa", schema(rename = "nanosecond heartbeat"))]
pub nanosecond_heartbeat:... |
f152c2b002031e674a20906d1ed4979604d81a6dfdee37cadf8fe7222ec11979 | Rust | 332 | 13 | pub(crate) mod config;
pub mod server;
pub(crate) mod state;
#[cfg(test)]
pub(crate) mod tests;
pub mod types;
pub mod work_queue_client;
pub(crate) mod work_queue_manager;
pub(crate) mod work_queue_server;
pub use server::service_entrypoint;
pub(crate) const GET_WORK_RETRY_PUSHBACK_MS_METADATA: &str = "grpc-retry-pu... |
0209af4ff52508c5a740e1787c64df08506e1eb7e6142fab274a85ff8738abfa | Rust | 333 | 17 | pub mod execution;
pub mod executor;
pub mod receiver;
pub mod scheduler;
#[allow(clippy::module_inception)]
pub mod system;
pub mod types;
pub mod utils;
pub mod wrapped_message;
// Re-export types
pub use execution::*;
pub use receiver::*;
pub use system::*;
pub use types::*;
pub use utils::*;
pub(crate) use wrapped... |
541dc95059194d139f34df7b1f8d5b7d4becbe876a034d1893d72713033b8a58 | Rust | 342 | 10 | pub(super) mod data_record_value;
pub(super) mod f32_value;
pub(super) mod float32array_value;
pub(super) mod quantized_cluster_value;
pub(super) mod roaring_bitmap_value;
pub(super) mod spann_posting_list_value;
pub(super) mod sparse_posting_block_value;
pub(super) mod str_value;
pub(super) mod u32_value;
pub(super) m... |
b30e3473400ad59f4468202567c8663d7da4e53e191ac2724f04a304a72aa317 | Rust | 346 | 18 | #![deny(clippy::all)]
#[macro_use]
extern crate napi_derive;
use chroma_cli::chroma_cli;
#[napi]
pub fn cli(args: Option<Vec<String>>) -> napi::Result<()> {
let args = args.unwrap_or_else(|| std::env::args().collect());
let args = if args.is_empty() {
vec!["chroma".to_string()]
} else {
args
};
chr... |
e8f725dd5321210819d0bcbd6d9ae0dd31c9ffbe634bc45560420e6c55b4c7cd | Rust | 346 | 10 | //! Tests for the `subagent_search` route, split by type and numbered for
//! readability. The numeric filename prefixes require `#[path]` (a module name
//! can't begin with a digit); the files are plain siblings of this `mod.rs`.
#[path = "01_integration.rs"]
mod integration;
#[path = "02_live.rs"]
mod live;
#[path ... |
6079accf9c5ef0cbb54934e7c5bf67bee7ff16e1a4d89c9927cf3c7c0921257d | Rust | 362 | 16 | #![recursion_limit = "256"]
pub mod blockfile_metadata;
pub mod blockfile_record;
pub mod bloom_filter;
pub mod distributed_hnsw;
pub mod distributed_spann;
pub mod local_hnsw;
pub mod local_segment_manager;
#[cfg(feature = "usearch")]
pub mod quantized_spann;
pub mod spann_provider;
pub mod sqlite_metadata;
pub mod t... |
3d1f237e92e9ec2c221e8cd94972ec4242958155986f922f18b4720719318882 | Rust | 374 | 14 | //! Writes a disk cache config to stdout.
use clap::Parser;
use chroma_cache::{CacheConfig, FoyerCacheConfig};
fn main() {
let config = FoyerCacheConfig::parse();
if config.dir.is_none() {
panic!("Disk cache is required for disk cache config writer");
}
let out = serde_yaml::to_string(&CacheC... |
02915e3a03a897f311bd1887e931f4c3b335dae283c6c05f62714996985315dd | Rust | 396 | 14 | use chroma_system::thread_stack_size_bytes;
use rust_sysdb::sysdb_service_entrypoint;
fn main() {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.thread_name("chroma-rust-sysdb")
.thread_stack_size(thread_stack_size_bytes())
.build()
.unwrap()
.block_on(as... |
5b58910a4567423488bb73cef20487f702c1f0c7d0e08b7b5f194a0f6e2a68ee | Rust | 398 | 15 | use serde::{Deserialize, Serialize};
#[derive(Deserialize, Debug, Clone, Serialize)]
pub enum BlockfileProviderConfig {
#[serde(alias = "arrow")]
Arrow(Box<super::arrow::config::ArrowBlockfileProviderConfig>),
#[serde(alias = "memory")]
Memory,
}
impl Default for BlockfileProviderConfig {
fn defau... |
fe846963e07af0decf675cdc609ebf9b5e0d901460e1fb63101c27a7e6c6442a | Rust | 398 | 16 | pub mod apply_logs_orchestrator;
pub(crate) mod async_function_boundary;
pub mod attached_function_orchestrator;
pub(crate) mod compact;
pub(crate) mod count;
pub mod function_execution;
pub mod get;
pub mod knn;
pub mod knn_filter;
pub mod log_fetch_orchestrator;
pub mod projection;
pub mod quantized_spann_knn;
pub mo... |
2e0d28ecf3a4319845755070be03120364dbf6fe23463b8fdab363af82e6fc14 | Rust | 403 | 13 | use chroma_system::thread_stack_size_bytes;
use foundation_api::foundation_service_entrypoint;
use std::sync::Arc;
fn main() {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.thread_name("foundation-api")
.thread_stack_size(thread_stack_size_bytes())
.build()
.unw... |
e58b0601d50df90cf23948b96f390aeab53af4e8ce7bf31d79eea43a6167ebb4 | Rust | 407 | 12 | pub mod count_to_file_async;
pub mod http_currents;
pub mod http_generate;
pub mod revision_history;
mod statistics;
mod trace_headers;
pub use count_to_file_async::CountToFileAsyncExecutor;
pub use http_currents::HttpCurrentsExecutor;
pub use http_generate::HttpGenerateExecutor;
pub use revision_history::RevisionHist... |
fc70326129ca3d7f6431a8663e0694933f771c8a14df2cc9781b0dacb77c1aa3 | Rust | 455 | 18 | use serde::Serialize;
use std::time::Duration;
pub fn deserialize_duration_from_seconds<'de, D>(d: D) -> Result<Duration, D::Error>
where
D: serde::Deserializer<'de>,
{
let secs: u64 = serde::Deserialize::deserialize(d)?;
Ok(Duration::from_secs(secs))
}
pub fn serialize_duration_to_seconds<S>(duration: &D... |
f26fcbab840a0fc6a8ad841ac55c1a7eca0f4505ff428727aafd8191d7d6ba77 | Rust | 467 | 17 | use chroma_frontend::frontend_service_entrypoint;
use chroma_system::thread_stack_size_bytes;
use std::sync::Arc;
fn main() {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.thread_name("chroma-frontend")
.thread_stack_size(thread_stack_size_bytes())
.build()
.unw... |
01304cc669261e03adca6a5c04634b485c5fb2b4008326c16ca1b35df4b525a0 | Rust | 481 | 14 | pub mod compute_unused_between_versions;
pub mod compute_unused_files;
pub mod compute_versions_to_delete;
pub mod compute_versions_to_delete_from_graph;
pub mod delete_unused_files;
pub mod delete_unused_logs;
pub mod delete_versions_at_sysdb;
pub mod fetch_lineage_file;
pub mod fetch_min_attached_function_completion_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.