repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/filter_and_key_and_skip.rs
venndb-usage/tests/compiles/filter_and_key_and_skip.rs
use venndb::VennDB; #[derive(Debug, VennDB)] struct Employee { id: u32, is_manager: bool, is_active: bool, #[venndb(filter, key, skip)] country: String, } fn main() {}
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_with_filter_map_any.rs
venndb-usage/tests/compiles/derive_struct_with_filter_map_any.rs
use venndb::{Any, VennDB}; #[derive(Debug, VennDB)] struct Employee { id: u32, name: String, is_manager: bool, is_admin: bool, is_active: bool, #[venndb(filter, any)] department: Department, } #[derive(Debug, PartialEq, Eq, Hash, Clone)] pub enum Department { Any, Engineering, ...
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct.rs
venndb-usage/tests/compiles/derive_struct.rs
use venndb::VennDB; #[derive(Debug, VennDB)] struct Employee { id: u32, name: String, is_manager: bool, is_admin: bool, is_active: bool, department: Department, } #[derive(Debug)] pub enum Department { Engineering, Sales, Marketing, HR, } fn main() { let _ = EmployeeDB::ne...
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_with_validator.rs
venndb-usage/tests/compiles/derive_struct_with_validator.rs
use venndb::VennDB; #[derive(Debug, VennDB)] #[venndb(validator = sealed::employee_validator)] struct Employee { pub id: u32, pub name: String, pub is_manager: bool, pub is_admin: bool, pub is_active: bool, pub department: Department, } #[derive(Debug)] pub enum Department { Engineering, ...
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_with_key.rs
venndb-usage/tests/compiles/derive_struct_with_key.rs
use venndb::VennDB; #[derive(Debug, VennDB)] struct Employee { #[venndb(key)] id: u32, name: String, is_manager: bool, is_admin: bool, is_active: bool, department: Department, } #[derive(Debug)] pub enum Department { Engineering, Sales, Marketing, HR, } fn main() { let...
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_with_filter_map.rs
venndb-usage/tests/compiles/derive_struct_with_filter_map.rs
use venndb::VennDB; #[derive(Debug, VennDB)] struct Employee { id: u32, name: String, is_manager: bool, is_admin: bool, is_active: bool, #[venndb(filter)] department: Department, } #[derive(Debug, PartialEq, Eq, Hash, Clone)] pub enum Department { Engineering, Sales, Marketing,...
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_custom_name.rs
venndb-usage/tests/compiles/derive_struct_custom_name.rs
use venndb::VennDB; #[derive(Debug, VennDB)] #[venndb(name = "Database")] struct Employee { id: u32, name: String, is_manager: bool, is_admin: bool, is_active: bool, department: Department, } #[derive(Debug)] pub enum Department { Engineering, Sales, Marketing, HR, } fn main()...
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_skip_all.rs
venndb-usage/tests/compiles/derive_struct_skip_all.rs
use venndb::VennDB; #[derive(Debug, VennDB)] struct Employee { #[venndb(skip)] id: u32, #[venndb(skip)] name: String, #[venndb(skip)] is_manager: bool, #[venndb(skip)] department: Department, } #[derive(Debug)] pub enum Department { Engineering, Sales, Marketing, HR, } ...
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_all_the_things.rs
venndb-usage/tests/compiles/derive_struct_all_the_things.rs
use venndb::{Any, VennDB}; #[derive(Debug, VennDB)] #[venndb(name = "EmployeeSheet", validator = employee_validator)] struct Employee { #[venndb(key)] id: u32, name: String, #[venndb(filter)] // explicit bool filter == regular bool is_manager: bool, is_admin: bool, is_something: Option<bool...
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
plabayo/venndb
https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_empty.rs
venndb-usage/tests/compiles/derive_struct_empty.rs
use venndb::VennDB; #[derive(Debug, VennDB)] struct Employee {} fn main() {}
rust
Apache-2.0
68c929e6a7f97f74b0b1c84facfa5b1b61369be3
2026-01-04T20:24:17.564367Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/build.rs
twistrs/build.rs
use std::io::{self, BufRead}; use std::{env, fs, path::Path}; fn main() { // The following build script converts a number of data assets // to be embedded directly into the libraries final binaries // without incurring any runtime costs. // // For more information on the internals as well as other ...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/src/tlds.rs
twistrs/src/tlds.rs
// This file is auto-generated. Do not edit manually. pub const TLDS: [&str; 6934] = [ "0.bg", "1.bg", "2.bg", "2000.hu", "3.bg", "4.bg", "5.bg", "5g.in", "6.bg", "6g.in", "7.bg", "8.bg", "9.bg", "9guacu.br", "a.bg", "a.se", "aa.no", "aaa", "aa...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
true
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/src/lib.rs
twistrs/src/lib.rs
//! Twistrs is a domain name permutation and enumeration library //! that is built on top of async Rust. //! //! The library is designed to be fast, modular and easy-to-use //! for clients. //! //! The two primary structs to look into are [Domain](./permutate/struct.Domain.html) //! and [`DomainMetadata`](./enrich/stru...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/src/filter.rs
twistrs/src/filter.rs
use crate::Domain; /// The `Filter` trait provides functions that allow filtering of permutations given a certain /// condition. This is useful when certain permutation methods (e.g., /// [`tld`](./permutate/Domain#tld)) expose permutations that you would like to dismiss. pub trait Filter { type Error; fn mat...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/src/enrich.rs
twistrs/src/enrich.rs
//! The enrichment module exposes functionality to enrich //! a given domain with interesting metadata. Currently //! including: //! //! * DNS resolution (through HTTP/80 lookup). //! * Open SMTP server (for email misdirects). //! //! Example: //! //! ``` //! use twistrs::enrich::DomainMetadata; //! //! #[tokio::main] ...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/src/error.rs
twistrs/src/error.rs
use crate::enrich::EnrichmentError; use crate::permutate::PermutationError; use std::convert::Infallible; #[derive(thiserror::Error, Debug)] pub enum Error { #[error(transparent)] PermutationError(#[from] PermutationError), #[error(transparent)] EnrichmentError(#[from] EnrichmentError), #[error(t...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/src/mod.rs
twistrs/src/mod.rs
pub mod constants;
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/src/constants.rs
twistrs/src/constants.rs
use phf::phf_map; #[cfg(feature = "whois_lookup")] use whois_rust::WhoIs; use hyper::client::Client; use hyper::client::HttpConnector; // Include further constants such as dictionaries that are // generated during compile time. include!(concat!(env!("OUT_DIR"), "/data.rs")); lazy_static! { pub static ref KEYBOA...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/src/permutate.rs
twistrs/src/permutate.rs
//! The permutation module exposes functionality around generating //! multiple valid variations of a given domain. Note that this //! module is _only_ concerned with generating possible permutations //! of a given domain. //! //! For details on how to validate whether domains are actively used, //! please see `enrich....
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
true
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/twistrs/benches/bench_permute.rs
twistrs/benches/bench_permute.rs
use criterion::{criterion_group, criterion_main, Criterion}; use twistrs::permutate::Domain; fn bitsquatting(domain: &Domain) { domain.bitsquatting().for_each(drop) } fn homoglyph(domain: &Domain) { domain.homoglyph().unwrap().for_each(drop) } fn hyphentation(domain: &Domain) { domain.hyphenation().for_...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/examples/twistrs-cli/src/main.rs
examples/twistrs-cli/src/main.rs
use clap::{App, Arg}; use colored::*; use tokio::sync::mpsc; use twistrs::enrich::DomainMetadata; use twistrs::filter::Permissive; use twistrs::permutate::{Domain, Permutation}; use anyhow::Result; use std::collections::HashSet; use std::time::Instant; #[tokio::main] async fn main() -> Result<()> { let start_tim...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/examples/twistrs-ws/src/main.rs
examples/twistrs-ws/src/main.rs
// #![deny(warnings)] use std::collections::{HashMap, HashSet}; use std::sync::{ atomic::{AtomicUsize, Ordering}, Arc, }; use futures::{FutureExt, StreamExt}; use tokio::sync::{mpsc, RwLock}; use twistrs::filter::Permissive; use warp::ws::{Message, WebSocket}; use warp::Filter; use twistrs::enrich::DomainMeta...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/examples/twistrs-grpc/build.rs
examples/twistrs-grpc/build.rs
fn main() -> Result<(), Box<dyn std::error::Error>> { tonic_build::compile_protos("proto/domain_enumeration.proto")?; Ok(()) }
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/examples/twistrs-grpc/src/domain_enumeration.rs
examples/twistrs-grpc/src/domain_enumeration.rs
tonic::include_proto!("domain_enumeration");
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/examples/twistrs-grpc/src/client.rs
examples/twistrs-grpc/src/client.rs
use domain_enumeration::domain_enumeration_client::DomainEnumerationClient; use domain_enumeration::Fqdn; mod domain_enumeration; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let channel = tonic::transport::Channel::from_static("http://127.0.0.1:8080") .connect() .awa...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
haveibeensquatted/twistrs
https://github.com/haveibeensquatted/twistrs/blob/86f45b0ceb9751979ce546234d6a6f775c036119/examples/twistrs-grpc/src/server.rs
examples/twistrs-grpc/src/server.rs
mod domain_enumeration; use tokio::sync::mpsc; use tonic::{transport::Server, Request, Response, Status}; use twistrs::enrich::DomainMetadata; use twistrs::filter::Permissive; use twistrs::permutate::Domain; use domain_enumeration::domain_enumeration_server::{DomainEnumeration, DomainEnumerationServer}; use domain_...
rust
MIT
86f45b0ceb9751979ce546234d6a6f775c036119
2026-01-04T20:23:55.253743Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/svm.rs
src/svm.rs
// Copyright (c) 2020-2025 Via Technology Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/event.rs
src/event.rs
// Copyright (c) 2020-2024 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/command_queue.rs
src/command_queue.rs
// Copyright (c) 2020-2024 Via Technology Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
true
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/lib.rs
src/lib.rs
// Copyright (c) 2020-2021 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/device.rs
src/device.rs
// Copyright (c) 2020-2024 Via Technology Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
true
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/program.rs
src/program.rs
// Copyright (c) 2020-2025 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/platform.rs
src/platform.rs
// Copyright (c) 2020-2024 Via Technology Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/memory.rs
src/memory.rs
// Copyright (c) 2020-2024 Via Technology Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/command_buffer.rs
src/command_buffer.rs
// Copyright (c) 2021-2024 Via Technology Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/kernel.rs
src/kernel.rs
// Copyright (c) 2020-2024 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/src/context.rs
src/context.rs
// Copyright (c) 2020-2025 Via Technology Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/tests/opencl2_kernel_test.rs
tests/opencl2_kernel_test.rs
// Copyright (c) 2021-2024 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/tests/integration_test.rs
tests/integration_test.rs
// Copyright (c) 2020-2021 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/examples/clinfo.rs
examples/clinfo.rs
// Copyright (c) 2021 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/examples/opencl2image.rs
examples/opencl2image.rs
// Copyright (c) 2023 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/examples/opencl2serde.rs
examples/opencl2serde.rs
// Copyright (c) 2021 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/examples/opencl2svm.rs
examples/opencl2svm.rs
// Copyright (c) 2021-2023 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
kenba/opencl3
https://github.com/kenba/opencl3/blob/27c55789c114765e8f857c8c691c863166e0f6d2/examples/basic.rs
examples/basic.rs
// Copyright (c) 2021 Via Technology Ltd. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by...
rust
Apache-2.0
27c55789c114765e8f857c8c691c863166e0f6d2
2026-01-04T20:24:28.844285Z
false
sidju/hired
https://github.com/sidju/hired/blob/1b2fc1714e913520d5defd3937499ffdff79d80f/src/config.rs
src/config.rs
use std::collections::HashMap; use std::ops::Not; use clap::Parser; use serde::{Serialize, Deserialize}; use figment::{ Figment, providers::{ Serialized, YamlExtended, Env, Format, }, }; use add_ed::macros::Macro; // Import default config const DEFAULT_CONFIG: &str = include_str!("../default_con...
rust
MIT
1b2fc1714e913520d5defd3937499ffdff79d80f
2026-01-04T20:24:27.089787Z
false
sidju/hired
https://github.com/sidju/hired/blob/1b2fc1714e913520d5defd3937499ffdff79d80f/src/macro_store.rs
src/macro_store.rs
use std::collections::HashMap; use add_ed::EdError; use add_ed::macros::{ Macro, MacroGetter, }; /// Aggregating macro getter /// /// Tries to get macros, in order, from: /// - Configuration /// - TODO: Files in specific path pub struct MacroStore<'a> { pub config_macros: &'a HashMap<String, Macro>, } impl<'a> ...
rust
MIT
1b2fc1714e913520d5defd3937499ffdff79d80f
2026-01-04T20:24:27.089787Z
false
sidju/hired
https://github.com/sidju/hired/blob/1b2fc1714e913520d5defd3937499ffdff79d80f/src/main.rs
src/main.rs
mod config; use config::construct_config; mod macro_store; // All UI abstractions mod hui; use hui::error::HighlightingUIError as HUIError; use add_ed::ui::UI; pub fn main() { // Parse CLI arguments, env and config file into a run configuration // (This will abort execution in a lot of cases, so it must be ran b...
rust
MIT
1b2fc1714e913520d5defd3937499ffdff79d80f
2026-01-04T20:24:27.089787Z
false
sidju/hired
https://github.com/sidju/hired/blob/1b2fc1714e913520d5defd3937499ffdff79d80f/src/hui/doc_print.rs
src/hui/doc_print.rs
use crossterm::{ event::{ self, Event, KeyEvent, }, terminal::{ Clear, ClearType, EnterAlternateScreen, LeaveAlternateScreen, }, cursor::{ Hide, Show, }, queue, }; use termimad::{ Area, MadView, MadSkin, Error, }; use std::io::Write; fn view_area() -> Area { ...
rust
MIT
1b2fc1714e913520d5defd3937499ffdff79d80f
2026-01-04T20:24:27.089787Z
false
sidju/hired
https://github.com/sidju/hired/blob/1b2fc1714e913520d5defd3937499ffdff79d80f/src/hui/error.rs
src/hui/error.rs
/// Error type for HighlightingUI #[derive(Debug)] pub enum HighlightingUIError { // Separate, so we can print a guide for how to recover the terminal if needed RawmodeSwitchFailed(std::io::Error), // Can't do much smarter stuff. Possibly squeeze in some filename/linenumber. TerminalIOFailed(std::io::Error), ...
rust
MIT
1b2fc1714e913520d5defd3937499ffdff79d80f
2026-01-04T20:24:27.089787Z
false
sidju/hired
https://github.com/sidju/hired/blob/1b2fc1714e913520d5defd3937499ffdff79d80f/src/hui/mod.rs
src/hui/mod.rs
use crossterm::QueueableCommand; use two_face::re_exports::syntect::parsing::SyntaxSet; use two_face::re_exports::syntect::highlighting::Theme; use std::io::stdout; // use the UI trait, to implement it use add_ed::ui::{ UI, UILock, }; use add_ed::{ Ed, error::{ Result, EdError, }, }; mod print; mod ...
rust
MIT
1b2fc1714e913520d5defd3937499ffdff79d80f
2026-01-04T20:24:27.089787Z
false
sidju/hired
https://github.com/sidju/hired/blob/1b2fc1714e913520d5defd3937499ffdff79d80f/src/hui/print.rs
src/hui/print.rs
// Get the prerequisite definitions for writing these functions use super::HighlightingUI; use crossterm::{ QueueableCommand, style::{ Print, Color, } }; use std::io::{Result, Write}; // Needs to be used in for queue and flush // Create some printing helpers fn syntect_to_crossterm_color( c: two_face:...
rust
MIT
1b2fc1714e913520d5defd3937499ffdff79d80f
2026-01-04T20:24:27.089787Z
false
sidju/hired
https://github.com/sidju/hired/blob/1b2fc1714e913520d5defd3937499ffdff79d80f/src/hui/input.rs
src/hui/input.rs
// This module takes events and handles them as text input or commands // The trait for queueing commands use crossterm::QueueableCommand; // All the event classes use crossterm::event::{KeyCode, KeyModifiers, Event}; // And the writeable trait, to be able to flush stdout use std::io::Write; // Finally the error const...
rust
MIT
1b2fc1714e913520d5defd3937499ffdff79d80f
2026-01-04T20:24:27.089787Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/benchmark/src/main.rs
benchmark/src/main.rs
extern crate jsonpath_lib as jsonpath; extern crate serde_json; use serde_json::{json, Value}; fn main() { let json: Value = json!( { "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Saying...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/benchmark/benches/bench.rs
benchmark/benches/bench.rs
#![feature(test)] extern crate bencher; extern crate jsonpath_lib as jsonpath; extern crate serde; extern crate serde_json; extern crate test; use std::io::Read; use std::rc::Rc; use jsonpath::{JsonSelector, JsonSelectorMut, PathParser}; use serde::Deserialize; use serde_json::Value; use self::test::Bencher; fn rea...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/benchmark/benches/bench_example.rs
benchmark/benches/bench_example.rs
#![feature(test)] extern crate bencher; extern crate jsonpath_lib as jsonpath; extern crate serde; extern crate serde_json; extern crate test; use std::io::Read; use serde_json::Value; use self::test::Bencher; fn read_json(path: &str) -> String { let mut f = std::fs::File::open(path).unwrap(); let mut conte...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/lib.rs
src/lib.rs
//! JsonPath implementation written in Rust. //! //! # Example //! ``` //! extern crate jsonpath_lib as jsonpath; //! #[macro_use] extern crate serde_json; //! let json_obj = json!({ //! "store": { //! "book": [ //! { //! "category": "reference", //! "author": "Ni...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/selector/selector_impl.rs
src/selector/selector_impl.rs
use std::collections::HashSet; use std::rc::Rc; use serde_json::map::Entry; use serde_json::{Number, Value}; use super::utils; use crate::paths::{tokens::*, ParserTokenHandler, PathParser, StrRange}; use crate::JsonPathError; use super::terms::*; #[derive(Debug, Default)] pub struct JsonSelector<'a> { parser: O...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/selector/terms.rs
src/selector/terms.rs
use std::collections::HashSet; use serde_json::{Number, Value}; use super::cmp::*; use super::utils; use super::value_walker::ValueWalker; #[derive(Debug, PartialEq)] pub enum ExprTerm<'a> { String(&'a str), Number(Number), Bool(bool), Json( Option<Vec<&'a Value>>, Option<FilterKey<'a...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/selector/value_walker.rs
src/selector/value_walker.rs
use std::collections::HashSet; use super::utils; use crate::selector::utils::PathKey; use serde_json::Value; pub(super) struct ValueWalker; impl<'a> ValueWalker { pub fn next_all(vec: &[&'a Value]) -> Vec<&'a Value> { vec.iter().fold(Vec::new(), |mut acc, v| { match v { Value:...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/selector/utils.rs
src/selector/utils.rs
use serde_json::Number; pub fn to_f64(n: &Number) -> f64 { if n.is_i64() { n.as_i64().unwrap() as f64 } else if n.is_f64() { n.as_f64().unwrap() } else { n.as_u64().unwrap() as f64 } } pub fn abs_index( n: isize, len: usize, ) -> usize { if n < 0_isize { (n ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/selector/mod.rs
src/selector/mod.rs
pub use self::selector_impl::{JsonSelector, JsonSelectorMut}; mod cmp; mod selector_impl; mod terms; mod utils; mod value_walker;
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/selector/cmp.rs
src/selector/cmp.rs
use serde_json::Value; pub trait Cmp { fn cmp_bool( &self, v1: bool, v2: bool, ) -> bool; fn cmp_f64( &self, v1: f64, v2: f64, ) -> bool; fn cmp_string( &self, v1: &str, v2: &str, ) -> bool; fn cmp_json<'a>( ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/paths/str_reader.rs
src/paths/str_reader.rs
use std::result::Result; use std::str::Chars; #[derive(Debug, PartialEq)] pub enum ReaderError { Eof, } #[derive(Debug, PartialEq, Clone)] pub struct StrRange { pub pos: usize, pub offset: usize, } impl StrRange { pub fn new( pos: usize, offset: usize, ) -> Self { StrRange...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/paths/parser_node_visitor.rs
src/paths/parser_node_visitor.rs
use crate::paths::path_parser::ParserNode; use crate::paths::tokens::ParseToken; use crate::paths::{ParserTokenHandler, StrRange}; pub trait ParserNodeVisitor<'a> { fn visit<F, F1>( &self, parse_node: &ParserNode, token_handler: &mut F, parse_value_reader: &F1, ) where F...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/paths/parser_token_handler.rs
src/paths/parser_token_handler.rs
use super::str_reader::StrRange; use super::tokens::ParseToken; pub trait ParserTokenHandler<'a> { fn handle<F>( &mut self, token: &ParseToken, parse_value_reader: &F, ) where F: Fn(&StrRange) -> &'a str; }
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/paths/tokens.rs
src/paths/tokens.rs
use super::str_reader::StrRange; #[derive(Debug, PartialEq, Clone)] pub enum Token { Absolute(StrRange), Dot(StrRange), At(StrRange), OpenArray(StrRange), CloseArray(StrRange), Asterisk(StrRange), Question(StrRange), Comma(StrRange), Split(StrRange), OpenParenthesis(StrRange), ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/paths/path_parser.rs
src/paths/path_parser.rs
use std::str::FromStr; use super::parser_node_visitor::ParserNodeVisitor; use super::parser_token_handler::ParserTokenHandler; use super::str_reader::StrRange; use super::tokenizer::{TokenError, TokenReader}; use super::tokens::{FilterToken, ParseToken, Token}; #[derive(Clone, Debug)] pub struct PathParser<'a> { ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
true
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/paths/mod.rs
src/paths/mod.rs
pub use self::parser_token_handler::ParserTokenHandler; pub use self::path_parser::PathParser; pub use self::str_reader::StrRange; pub use self::tokenizer::TokenError; mod parser_node_visitor; mod parser_token_handler; mod path_parser; mod str_reader; mod tokenizer; pub mod tokens;
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/paths/tokenizer.rs
src/paths/tokenizer.rs
use std::result::Result; use super::str_reader::{ReaderError, StrRange, StrReader}; use super::tokens::Token; const CH_DOLLA: char = '$'; const CH_DOT: char = '.'; const CH_ASTERISK: char = '*'; const CH_LARRAY: char = '['; const CH_RARRAY: char = ']'; const CH_LPAREN: char = '('; const CH_RPAREN: char = ')'; const C...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/ffi/mod.rs
src/ffi/mod.rs
use std::ffi::{CStr, CString}; use std::os::raw::{c_char, c_void}; use {crate::parser, crate::select, crate::select_as_str}; const INVALID_PATH: &str = "invalid path"; const INVALID_JSON: &str = "invalud json"; fn to_str( v: *const c_char, err_msg: &str, ) -> &str { unsafe { CStr::from_ptr(v) }.to_str()....
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/select/value_walker.rs
src/select/value_walker.rs
use serde_json::Value; use std::collections::HashSet; pub(super) struct ValueWalker; impl<'a> ValueWalker { pub fn all_with_num( vec: &[&'a Value], tmp: &mut Vec<&'a Value>, index: f64, ) { Self::walk(vec, tmp, &|v| { if v.is_array() { v.get(index as...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/select/mod.rs
src/select/mod.rs
use std::collections::HashSet; use std::fmt; use serde_json::map::Entry; use serde_json::{Number, Value}; use crate::parser::*; use self::expr_term::*; use self::value_walker::ValueWalker; mod cmp; mod expr_term; mod value_walker; fn to_f64(n: &Number) -> f64 { if n.is_i64() { n.as_i64().unwrap() as f6...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
true
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/select/expr_term.rs
src/select/expr_term.rs
use crate::select::cmp::*; use crate::select::{to_f64, FilterKey}; use serde_json::{Number, Value}; #[derive(Debug, PartialEq)] pub(super) enum ExprTerm<'a> { String(String), Number(Number), Bool(bool), Json(Option<Vec<&'a Value>>, Option<FilterKey>, Vec<&'a Value>), } impl<'a> ExprTerm<'a> { fn c...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/select/cmp.rs
src/select/cmp.rs
use serde_json::Value; pub(super) trait Cmp { fn cmp_bool( &self, v1: bool, v2: bool, ) -> bool; fn cmp_f64( &self, v1: f64, v2: f64, ) -> bool; fn cmp_string( &self, v1: &str, v2: &str, ) -> bool; fn cmp_json<'a>( ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/parser/path_reader.rs
src/parser/path_reader.rs
use std::result::Result; #[derive(Debug, PartialEq)] pub enum ReaderError { Eof, } pub struct PathReader<'a> { input: &'a str, pos: usize, } impl<'a> PathReader<'a> { pub fn new(input: &'a str) -> Self { PathReader { input, pos: 0 } } pub fn peek_char(&self) -> Result<(usize, char), ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/parser/mod.rs
src/parser/mod.rs
mod path_reader; mod tokenizer; use std::str::FromStr; use self::tokenizer::*; const DUMMY: usize = 0; type ParseResult<T> = Result<T, String>; mod utils { use std::str::FromStr; pub fn string_to_num<F, S: FromStr>( string: &str, msg_handler: F, ) -> Result<S, String> where ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/src/parser/tokenizer.rs
src/parser/tokenizer.rs
use std::result::Result; use super::path_reader::{PathReader, ReaderError}; const CH_DOLLA: char = '$'; const CH_DOT: char = '.'; const CH_ASTERISK: char = '*'; const CH_LARRAY: char = '['; const CH_RARRAY: char = ']'; const CH_LPAREN: char = '('; const CH_RPAREN: char = ')'; const CH_AT: char = '@'; const CH_QUESTIO...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/op.rs
tests/op.rs
#[macro_use] extern crate serde_json; use common::{read_json, select_and_then_compare, setup}; mod common; #[test] fn op_object_eq() { setup(); select_and_then_compare( "$.school[?(@.friends == @.friends)]", read_json("./benchmark/data_obj.json"), json!([{ "friends": [ ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/lib.rs
tests/lib.rs
extern crate jsonpath_lib as jsonpath; extern crate serde; #[macro_use] extern crate serde_json; use serde::Deserialize; use serde_json::Value; use common::{compare_result, read_contents, read_json, setup}; use jsonpath::JsonPathError; mod common; #[test] fn compile() { let compile_object = |path| { let...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/precompile.rs
tests/precompile.rs
#[macro_use] extern crate serde_json; extern crate jsonpath_lib; use common::setup; use jsonpath_lib::PathCompiled; use serde_json::Value; mod common; #[test] fn precompile_test() { setup(); let json = json!({ "foo": {"bar": "baz"} }); // compile once let compiled = PathCompiled::compi...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/jsonpath_examples.rs
tests/jsonpath_examples.rs
#[macro_use] extern crate serde_json; use common::{read_json, select_and_then_compare, setup}; mod common; #[test] fn example_authros_of_all_books() { setup(); select_and_then_compare( r#"$.store.book[*].author"#, read_json("./benchmark/example.json"), json!([ "Nigel Rees...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/filter.rs
tests/filter.rs
#[macro_use] extern crate serde_json; use common::{read_json, select_and_then_compare, setup}; mod common; #[test] fn quote() { setup(); select_and_then_compare( r#"$['single\'quote']"#, json!({"single'quote":"value"}), json!(["value"]), ); select_and_then_compare( r#...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/readme.rs
tests/readme.rs
extern crate jsonpath_lib as jsonpath; extern crate serde; #[macro_use] extern crate serde_json; use serde::Deserialize; use serde_json::Value; use jsonpath::{JsonSelector, JsonSelectorMut, PathParser}; mod common; #[test] fn readme() { let json_obj = json!({ "store": { "book": [ ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/array_filter.rs
tests/array_filter.rs
#[macro_use] extern crate serde_json; use common::{read_json, select_and_then_compare, setup}; mod common; #[test] fn array_range_default() { setup(); select_and_then_compare( "$.school.friends[1, 2]", read_json("./benchmark/data_obj.json"), json!([ {"id": 1, "name": "Vin...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/paths.rs
tests/paths.rs
#[macro_use] extern crate serde_json; use common::{select_and_then_compare, setup}; mod common; #[test] fn dolla_token_in_path() { setup(); select_and_then_compare( "$..$ref", json!({ "Junk1": "This is a test to illustrate use of '$' in the attr for the expression $..['$ref'] ", ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/common.rs
tests/common.rs
extern crate env_logger; extern crate jsonpath_lib as jsonpath; extern crate serde_json; use std::io::Read; use serde_json::Value; use self::jsonpath::{JsonSelector, PathParser}; #[allow(dead_code)] pub fn setup() { let _ = env_logger::try_init(); } #[allow(dead_code)] pub fn read_json(path: &str) -> Value { ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/selector.rs
tests/selector.rs
extern crate jsonpath_lib as jsonpath; #[macro_use] extern crate serde_json; use serde_json::Value; use common::{read_json, setup}; use jsonpath::{JsonSelector, JsonSelectorMut, PathParser}; mod common; #[test] fn selector_mut() { setup(); let parser = PathParser::compile("$.store..price").unwrap(); le...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/tests/return_type.rs
tests/return_type.rs
#[macro_use] extern crate serde_json; use common::{read_json, select_and_then_compare, setup}; mod common; #[test] fn return_type_for_single_object() { setup(); select_and_then_compare( "$.school", read_json("./benchmark/data_obj.json"), json!([{ "friends": [ ...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/lua/bench_lua_vs_rust/example.rs
lua/bench_lua_vs_rust/example.rs
extern crate jsonpath_lib as jsonpath; extern crate serde; extern crate serde_json; use std::io::Read; use serde_json::Value; fn read_json(path: &str) -> String { let mut f = std::fs::File::open(path).unwrap(); let mut contents = String::new(); f.read_to_string(&mut contents).unwrap(); contents } fn...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/wasm/src/lib.rs
wasm/src/lib.rs
extern crate cfg_if; extern crate js_sys; extern crate jsonpath_lib as jsonpath; extern crate serde_json; extern crate wasm_bindgen; use cfg_if::cfg_if; #[allow(deprecated)] use jsonpath::Selector as _Selector; #[allow(deprecated)] use jsonpath::SelectorMut as _SelectorMut; #[allow(deprecated)] use jsonpath::{JsonPath...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
freestrings/jsonpath
https://github.com/freestrings/jsonpath/blob/3a930bc03c3944c8374717289266ceb9cc1491c6/wasm/tests/web.rs
wasm/tests/web.rs
/** * 실행 : `wasm-pack test` * 그러나,, 잘안돼서 안씀 */ #![cfg(target_arch = "wasm32")] extern crate core; extern crate js_sys; extern crate jsonpath_wasm as jsonpath; #[macro_use] extern crate serde_json; extern crate wasm_bindgen; extern crate wasm_bindgen_test; use serde_json::Value; use wasm_bindgen::*; use wasm_bindge...
rust
MIT
3a930bc03c3944c8374717289266ceb9cc1491c6
2026-01-04T20:24:15.035874Z
false
camrbuss/pinci
https://github.com/camrbuss/pinci/blob/4956f50cf3902504b41de4bbb62cca7649930eb4/firmware/src/main.rs
firmware/src/main.rs
#![no_std] #![no_main] use panic_halt as _; #[rtic::app(device = rp_pico::hal::pac, peripherals = true, dispatchers = [PIO0_IRQ_0])] mod app { use cortex_m::prelude::_embedded_hal_watchdog_Watchdog; use cortex_m::prelude::_embedded_hal_watchdog_WatchdogEnable; use embedded_hal::digital::v2::{InputPin, Out...
rust
MIT
4956f50cf3902504b41de4bbb62cca7649930eb4
2026-01-04T20:24:12.918928Z
false
karpathy/rustbpe
https://github.com/karpathy/rustbpe/blob/ddf848f6961a0655dc8693742fc338e5682c0d3b/src/lib.rs
src/lib.rs
use std::cmp::Ordering; use std::collections::HashMap as StdHashMap; use dary_heap::OctonaryHeap; use fancy_regex::Regex; use pyo3::prelude::*; use ahash::{AHashMap, AHashSet}; use compact_str::CompactString; use rayon::prelude::*; // Default GPT-4 style regex pattern for splitting text const GPT4_PATTERN: &str = r"...
rust
MIT
ddf848f6961a0655dc8693742fc338e5682c0d3b
2026-01-04T20:24:34.962425Z
true
sjb3d/caldera
https://github.com/sjb3d/caldera/blob/42fc4b496cce21e907eca7112e6d6334d35fc41a/caldera-macro/src/lib.rs
caldera-macro/src/lib.rs
extern crate proc_macro; use proc_macro::TokenStream; use proc_macro2::TokenStream as TokenStream2; use quote::{format_ident, quote}; use syn::{ braced, bracketed, parse::{Parse, ParseStream}, parse_macro_input, punctuated::Punctuated, token, Error, Ident, LitInt, Result, Token, }; mod kw { sy...
rust
MIT
42fc4b496cce21e907eca7112e6d6334d35fc41a
2026-01-04T20:23:56.526296Z
false
sjb3d/caldera
https://github.com/sjb3d/caldera/blob/42fc4b496cce21e907eca7112e6d6334d35fc41a/caldera/src/descriptor.rs
caldera/src/descriptor.rs
use crate::{command_buffer::CommandBufferPool, context::*}; use arrayvec::ArrayVec; use spark::{vk, Builder}; use std::{ any::TypeId, cell::{Cell, RefCell}, collections::HashMap, slice, }; fn align_up(x: u32, alignment: u32) -> u32 { (x + alignment - 1) & !(alignment - 1) } pub(crate) struct Stagi...
rust
MIT
42fc4b496cce21e907eca7112e6d6334d35fc41a
2026-01-04T20:23:56.526296Z
false
sjb3d/caldera
https://github.com/sjb3d/caldera/blob/42fc4b496cce21e907eca7112e6d6334d35fc41a/caldera/src/swapchain.rs
caldera/src/swapchain.rs
use crate::{context::*, maths::*}; use spark::{vk, Builder}; use std::{cmp, slice}; pub struct Swapchain { context: SharedContext, swapchain: vk::SwapchainKHR, surface_format: vk::SurfaceFormatKHR, size: UVec2, images: Vec<UniqueImage>, } pub enum SwapchainAcquireResult { RecreateNow, Recr...
rust
MIT
42fc4b496cce21e907eca7112e6d6334d35fc41a
2026-01-04T20:23:56.526296Z
false
sjb3d/caldera
https://github.com/sjb3d/caldera/blob/42fc4b496cce21e907eca7112e6d6334d35fc41a/caldera/src/resource.rs
caldera/src/resource.rs
use crate::prelude::*; use bytemuck::Contiguous; use slotmap::{new_key_type, SlotMap}; use spark::{vk, Builder, Device}; use std::{ slice, sync::{Arc, Mutex}, }; new_key_type! { pub struct BufferId; pub struct ImageId; pub struct SamplerId; } pub(crate) enum BufferResource { Described { ...
rust
MIT
42fc4b496cce21e907eca7112e6d6334d35fc41a
2026-01-04T20:23:56.526296Z
false
sjb3d/caldera
https://github.com/sjb3d/caldera/blob/42fc4b496cce21e907eca7112e6d6334d35fc41a/caldera/src/render_graph.rs
caldera/src/render_graph.rs
use crate::prelude::*; use arrayvec::ArrayVec; use spark::{vk, Builder}; use std::{ffi::CStr, mem}; /* The goal is to manage: * Temporary resources (buffers and images, and their views) * Render passes and framebuffers * Barriers and layout transitions * Synchronisation between queues for async co...
rust
MIT
42fc4b496cce21e907eca7112e6d6334d35fc41a
2026-01-04T20:23:56.526296Z
false
sjb3d/caldera
https://github.com/sjb3d/caldera/blob/42fc4b496cce21e907eca7112e6d6334d35fc41a/caldera/src/pipeline_cache.rs
caldera/src/pipeline_cache.rs
use crate::context::*; use arrayvec::ArrayVec; use notify::{DebouncedEvent, RecommendedWatcher, RecursiveMode, Watcher}; use spark::{vk, Builder, Device}; use std::{ cell::RefCell, collections::HashMap, convert::TryInto, ffi::CStr, fs::File, io::{self, prelude::*}, mem, path::{Path, Path...
rust
MIT
42fc4b496cce21e907eca7112e6d6334d35fc41a
2026-01-04T20:23:56.526296Z
false
sjb3d/caldera
https://github.com/sjb3d/caldera/blob/42fc4b496cce21e907eca7112e6d6334d35fc41a/caldera/src/lib.rs
caldera/src/lib.rs
mod allocator; mod app_base; mod barrier; mod color_space; mod command_buffer; mod context; mod descriptor; mod heap; mod loader; mod maths; mod pipeline_cache; mod query; mod render_cache; mod render_graph; mod resource; mod swapchain; pub mod window_surface; pub mod prelude { pub use caldera_macro::*; pub u...
rust
MIT
42fc4b496cce21e907eca7112e6d6334d35fc41a
2026-01-04T20:23:56.526296Z
false