First 36 rows of rust
| uuidstring | repo_namestring | relative_pathstring | contentstring | categorystring | algo_rel_scorefloat64 | quality_scorefloat64 |
|---|---|---|---|---|---|---|
| c7be9e4c-33ab-4aa4-970c-2f9f7fe29e8c | gwihlidal/svc-shader | src/lib.rs | extern crate regex; #[macro_use] extern crate lazy_static; extern crate bincode; extern crate dotenv; extern crate failure; extern crate filebuffer; extern crate futures; extern crate futures_cpupool; extern crate glob; extern crate normalize_line_endings; extern crate prost; ext… | CONFIG | 0.6371211409568787 | 5.498493671417236 |
| c5aba126-9bf7-405e-9098-c6e4aac127be |
| Graphics/orbit-generator/src/generators/absolute.rs |
| use crate::generators::OrbitGenerator; use crate::{ boundary::Boundary, function::Function, gnuplot::Plotter, intersect::intersect, orbit::OrbitFunction, point::Point, }; #[derive(Debug, Clone, Copy)] pub struct AbsoluteOrbitGeneratorConfig<'a> { pub file_name: &'a s… |
| TOOL |
| 0.7086276412010193 |
| 7.271559238433838 |
| 59be5976-ae62-4feb-b798-93ce44224d5d | vicsn/snarkvm-slim | console/types/integers/src/parse.rs | use super::*; impl<E: Environment, I: IntegerType> Parser for Integer<E, I> { /// Parses a string into a integer circuit. #[inline] fn parse(string: &str) -> ParserResult<Self> { // Parse the negative sign '-' from the string. let (string, negation) =… | TOOL | 0.9928410053253174 | 8.128266334533691 |
| a05125ac-5d77-489a-8855-daf45fcd3c99 | colorblast/graphics-3d | src/display.rs | use std::fs::File; use std::io::Write; use std::vec::Vec; use std::process::{Command, Stdio}; use std::error::Error; const XRES:i64 = 500; const YRES:i64 = 500; const MAX_COLOR:i64 = 255; const RED:usize = 0; const GREEN:usize = 1; const BLUE:usize = 2; static DEFAULT_COLOR : [… | TOOL | 0.7046939730644226 | 4.406254291534424 |
| e8f40548-eac4-4a2c-8547-23cf63151e84 | onderjan/machine-check | core/machine-check-machine/src/description/from_syn/path.rs | use syn::{Path, PathArguments}; use crate::{ description::Error, wir::{WIdent, WPath, WPathSegment, WSpan}, }; pub fn fold_path(path: Path, self_ty: Option<&WPath>) -> Result<WPath, Error> { let path_span = WSpan::from_syn(&path); let mut segments = Vec::new();… | TOOL | 0.9720325469970703 | 8.259844779968262 |
| ce8f7906-959b-420b-ba67-5195deb7457b | alexhulbert/tdx-identity | shared/src/types.rs | //! Shared types between the registry and the identity service use core::fmt; use ed25519_dalek::{PUBLIC_KEY_LENGTH, SIGNATURE_LENGTH}; use serde::{Deserialize, Serialize}; /// The data that the registry stores for each instance #[derive(Clone, Debug, Serialize, Deserialize, P… | CONFIG | 0.5027751922607422 | 8.157462120056152 |
| b9f035ca-e4af-42e3-bcdc-0200a95e0dc9 | Nugine/s3s | crates/s3s/src/error/mod.rs | mod generated; pub use self::generated::*; use crate::HttpResponse; use crate::ops; use crate::xml; use std::borrow::Cow; use std::convert::Infallible; use std::fmt; use std::io::Write; use std::str::FromStr; use hyper::HeaderMap; use hyper::StatusCode; pub type StdError = Box… | TOOL | 0.6122812628746033 | 7.687167167663574 |
| e00d99d1-0fa3-4b6a-a3b7-fc02763078c8 | verichains/revela | third_party/move/move-vm/types/src/loaded_data/runtime_types.rs | #![allow(clippy::non_canonical_partial_ord_impl)] use derivative::Derivative; use move_binary_format::{ errors::{PartialVMError, PartialVMResult}, file_format::{ AbilitySet, SignatureToken, StructHandle, StructTypeParameter, TypeParameterIndex, }, }; use move… | ALGO | 0.9916142225265503 | 6.866254806518555 |
| 409cc87f-37c9-4a79-9005-e7d41c965030 | lunasorcery/lzrwlkr-rgs | src/main.rs | use std::{ io::{Read, Seek, SeekFrom}, path::PathBuf, }; use byteorder::{LittleEndian, ReadBytesExt}; #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct FileTypeEntry { kind: u32, addr: u32, } #[derive(Clone, Debug, Eq, PartialEq)] struct FileNameEntry { i… | TOOL | 0.8565448522567749 | 5.39750862121582 |
| 2e99a9ad-7221-4d79-9805-2a9d78c82e94 | elliott-with-the-longest-name-on-github/advent_of_code_2024 | rust/src/day04/part1.rs | use crate::day04::{Input, Output}; use std::{collections::HashMap, fs::DirEntry}; use super::Direction; pub fn solve(input: &Input) -> Output { let mut xmas_count = 0; let word = vec!['X', 'M', 'A', 'S']; for y in 0..input.y_size { for x in 0..input.x_size {… | ALGO | 0.9830878376960754 | 6.731443405151367 |
| 9838942e-5e11-4778-a93d-64ae0042731c | fr33zing/caves-forever | lib/src/worldgen/layout/utility.rs | use std::{collections::HashSet, f32::consts::PI}; use avian3d::prelude::*; use bevy::prelude::*; use contact_query::contact; use pathfinding::prelude::dijkstra; use rand::Rng; use crate::worldgen::layout::consts::{DEPENETRATION_DISTANCE, SHORT_HOP}; use super::consts::{HULL_DE… | ALGO | 0.9991746544837952 | 7.4171552658081055 |
| b9f89919-6b2e-45c5-8bbc-4d1b93b44877 | 16isaac89/rustjshtmlnotesapp | src/controllers/bookscontroller.rs | use std::sync::Arc; use sqlx::{MySql, MySqlPool}; use axum::{extract::{Path, State}, http::StatusCode, response::{Html, Form, Json}}; use uuid::Uuid; use crate::models; pub async fn save_book( State(pool):State<Arc<MySqlPool>>, Form(create_book):Form<models::book::Create… | WEB | 0.9236373901367188 | 5.545068264007568 |
| 46e2f455-1609-4062-8c4b-a8324d6570d6 | Helehelehele/aoc-2024 | rust/day07/src/main.rs | use utils; #[derive(Clone, Copy)] enum Operator { Add, Multiply, Concat, } struct Equation { test_value: i64, numbers: Vec<i64>, } fn parse_input(path: &str) -> Vec<Equation> { let input = utils::read_input(path); input.lines() .map(… | ALGO | 0.9899807572364807 | 6.221765995025635 |
| b6b4393c-15ae-46af-a08a-d9c386e8271f | asv18/project_euler | p48/main.rs | fn main() { // println!("{:?}", modular_power(2, 32, 100_000)); println!("{}", final_ten_of_self_powers(1_000, 10_000_000_000)); } fn final_ten_of_self_powers(limit: i64, modulo: i64) -> i64 { let mut n = 0; for i in 1..=limit { let power = modular_power… | ALGO | 0.9998643398284912 | 5.437158107757568 |
| fac7c003-6a8f-4156-840e-39a8bd7f2757 | Sir-Thom/GameStudy | src-tauri/src/main.rs | // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] use tauri_plugin_log::TimezoneStrategy::UseLocal; use tauri_plugin_sql::{Migration, MigrationKind}; mod armor; mod enemies; mod player; … | TOOL | 0.5700557827949524 | 6.464363098144531 |
| 5a441fc7-f408-4a77-bce3-30562a8121f3 | rezaxgz/ruchess | src/board.rs | use std::str::FromStr; use chess::{BitBoard, Board, CastleRights, ChessMove, Color, Piece, Square}; use crate::data::{get_pst_value, PAWN_ZOBRIST}; #[derive(Copy, Clone, PartialEq, Eq)] pub struct Position { pub board: Board, pst_values: i16, pawn_hash: u64, } impl … | ALGO | 0.5268544554710388 | 6.1442670822143555 |
| c76b5e30-7bf5-466d-9670-97ac366a55c6 | sarvex/offensive-javascript | memN0ps/eagle-rs/driver/src/dse/mod.rs | use core::{ptr::{null_mut}, ffi::CStr}; use alloc::{string::{String, ToString}, collections::BTreeMap}; use bstr::ByteSlice; use kernel_alloc::nt::{ExAllocatePool, ExFreePool}; use winapi::{shared::{ntdef::{NT_SUCCESS}}, ctypes::c_void, um::winnt::{RtlZeroMemory, IMAGE_DOS_HEADER… | TOOL | 0.771806538105011 | 4.720975875854492 |
| b5f50acf-3ec1-4918-8222-e7e74244ec1e | hdy853134/hdy | secure/storage/github/src/lib.rs | #![forbid(unsafe_code)] use proxy::Proxy; use serde::{Deserialize, Serialize}; use serde_json::json; use thiserror::Error; /// Request timeout for github operations const ACCEPT_HEADER: &str = "Accept"; const ACCEPT_VALUE: &str = "Accept: application/vnd.github.v3+json"; const … | TOOL | 0.810588538646698 | 8.412639617919922 |
| 67757a8c-bd5a-4f1c-85cc-a10731dc4594 | cosmonic-labs/wash | crates/wash/src/cli/update.rs | //! Command for self-updating the `wash` CLI tool use anyhow::Context as _; use clap::Args; use etcetera::AppStrategy as _; use reqwest::{ Client, header::{AUTHORIZATION, HeaderMap, HeaderValue, USER_AGENT}, }; use semver::Version; use serde::Deserialize; use serde_json:… | TOOL | 0.9055519104003906 | 7.774709701538086 |
| d6ee10b2-306a-4d9f-8b7d-6cede0565320 | cool-japan/quantrs | core/src/optimization/zx_optimizer.rs | //! ZX-calculus based optimization pass //! //! This module integrates ZX-calculus optimization into the //! general optimization framework. use crate::{ error::QuantRS2Result, gate::GateOp, optimization::OptimizationPass, zx_extraction::ZXPipeline, }; /// ZX-calculus based… | ALGO | 0.910584032535553 | 8.01534652709961 |
| 46b01e8b-e275-4863-b0f1-e8c9b21020d6 | shamstabraiz29/svelte-tauri | frontend/native/plugins/tauri-plugin-editor/rust/src/models/get_resource_items_viewport_data/response.rs | use std::collections::HashMap; use serde::Serialize; use serde_json::Value as JsonValue; use specta::Type; use specta_util::Unknown; #[derive(Debug, Clone, Serialize, Type)] #[serde(rename_all = "camelCase")] pub struct GetResourceItemsViewportDataResponse { #[serde(rename … | TOOL | 0.7046217322349548 | 6.992757320404053 |
| 27d88d12-f70f-4e00-9012-cbc5a37ced7d | McAzz1337/Advent_of_code_2024 | src/day5.rs | use std::collections::HashMap; use crate::{PartFn, puzzle_result::PuzzleResult}; pub fn day5() -> PuzzleResult<PartFn, PartFn, usize, usize> { PuzzleResult::omitted(5, Some(part1), Some(part2)) } type Rule = (usize, usize); type Update = Vec<usize>; type RuleMap = HashMap<… | ALGO | 0.9992548823356628 | 5.687378883361816 |
| 218532c4-b5f6-4152-a655-05b914e03c37 | ChangeYourself0613/Solana-Arbitrage-Bot | client-pool/src/pool_utils/base.rs | //! Base curve implementation use solana_program::{ program_error::ProgramError, program_pack::{Pack, Sealed}, }; use crate::pool_utils::{ calculator::{CurveCalculator, SwapWithoutFeesResult, TradeDirection}, constant_price::ConstantPriceCurve, constant_prod… | ALGO | 0.9094924330711365 | 7.858243465423584 |
| 66b5395d-5b55-4c72-8b10-03d3e23bfe30 | EricXPalace/Enigma-rust | .cargo/registry/src/index.crates.io-6f17d22bba15001f/anstyle-1.0.4/src/style.rs | use crate::reset::RESET; /// ANSI Text styling /// /// # Examples /// /// ```rust /// let style = anstyle::Style::new().bold(); /// ``` #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Style { fg: Option<crate::Color>, bg: Option<cr… | TOOL | 0.7648958563804626 | 8.344799041748047 |
| 806320da-a3f7-446b-9be3-1cd8c5186a9d | charlie-havener/problems | furthest_building_you_can_reach.rs | use std::collections::BinaryHeap; pub fn furthest_building(heights: Vec<i32>, bricks: i32, ladders: i32) -> i32 { //println!("starting.........."); let mut heap: BinaryHeap<i32> = BinaryHeap::new(); let mut prev = i32::MAX; let mut remaining_bricks = bricks; … | ALGO | 0.9999991655349731 | 6.137467384338379 |
| 6fbeae29-ed9c-4170-b805-cecf57f0a740 | RyugaRyuzaki/BIM-CDE | rust-property/src/main.rs | use actix_cors::Cors; use actix_web::{http, web, App, HttpResponse, HttpServer, Responder}; use mongodb::{bson::doc, Client, Collection, Database}; use serde::{Deserialize, Serialize}; use std::env; use tracing::info; use tracing_subscriber::EnvFilter; #[derive(Debug, Serialize,… | WEB | 0.9615796208381653 | 6.811344623565674 |
| 86c15231-3dd5-4b3c-a41f-14122f79cb42 | 8xFF/atm0s-media-server | packages/transport_webrtc/src/media/h264.rs | use media_server_protocol::media::{H264Profile, H264Sim, MediaMeta, MediaOrientation}; const H264_NALU_TTYPE_STAP_A: u32 = 24; const H264_NALU_TTYPE_SPS: u32 = 7; const H264_NALU_TYPE_BITMASK: u32 = 0x1F; pub fn parse_rtp(payload: &[u8], profile: H264Profile, rid: Option<u8>, r… | DATA | 0.5024579763412476 | 7.157388210296631 |
| ba5d5a2f-a21e-4bc8-b838-f586274dcb3b | fruit-in/leetcode | Problemset/0069-Sqrt(x)/Binary Search.rs | impl Solution { pub fn my_sqrt(x: i32) -> i32 { if x == 0 || x == 1 { return x; } let mut left = 0; let mut right = x; let mut mid = (left + right) / 2; loop { if mid <= x / mid && (mid + 1) > x / (mid + … | ALGO | 0.9999983310699463 | 5.252819061279297 |
| f1b2d830-60f4-44fa-a3a1-c3d5729ec4d0 | Ddystopia/ra | pac/ra6m3/src/mmpu/mmpuacb.rs | ///Register `MMPUACB%s` reader pub type R = crate::R<MMPUACB_SPEC>; ///Register `MMPUACB%s` writer pub type W = crate::W<MMPUACB_SPEC>; /**Region enable Value on reset: 0*/ #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum ENABLE_A { ///0: Group m Region n unit is disabl… | TOOL | 0.6914493441581726 | 7.960993766784668 |
| 20589f34-44f9-4aef-87e4-42c50c75cf24 | microsoft/verus-proof-synthesis | generated/abalation-study/few-shot-ab-inference-without-3-1.0/intermediate-1-mbpp-task_id_457/refine-2.rs | use vstd::prelude::*; fn main() {} verus! { fn min_sublist(seq: &Vec<Vec<i32>>) -> (min_list: &Vec<i32>) requires seq.len() > 0, ensures forall|k: int| 0 <= k < seq.len() ==> min_list.len() <= # [trigger] (seq[k]).len(), exists|k: int| 0 <= k < s… | ALGO | 0.9997784495353699 | 5.920743465423584 |
| 780d259f-49b8-4ac7-8886-3ddd2cbe3d20 | alexstaringgit/telemedicine | actix-http/src/header/shared/mod.rs | //! Originally taken from `hyper::header::shared`. pub use language_tags::LanguageTag; mod charset; mod content_encoding; mod extended; mod http_date; mod quality; mod quality_item; pub use self::{ charset::Charset, content_encoding::ContentEncoding, extended::{par… | CONFIG | 0.6985851526260376 | 7.018744945526123 |
| 28f507e9-a4cf-4b59-a106-c11dbb34ba98 | atsam-rs/atsam-pac | pac/atsam4sd32c/src/dacc/chsr.rs | #[doc = "Register `CHSR` reader"] pub struct R(crate::R<CHSR_SPEC>); impl core::ops::Deref for R { type Target = crate::R<CHSR_SPEC>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl From<crate::R<CHSR_SPEC>> for R { #[inline(alway… | TOOL | 0.6218812465667725 | 7.964667320251465 |
| c9822cf1-118a-4d5e-aa8c-92100a62e8f7 | yamcs/yamcs-gateway | ygw-mil1553/src/mil1553dev.rs | use crate::BusMessage; use super::{Result, RtAddr}; use std::time::Duration; /// all messages configured on the MIL-1553 devices, are identified by a 32 bit id /// the implementors of the Mil1553BcDev trait will map that to whatever is required for the specific device pub type … | TOOL | 0.5420037508010864 | 7.90442419052124 |
| 6c91bb3b-e888-4f68-8bb9-5670703340f9 | yuxi191231/firecracker-cca | src/vmm/src/arch/x86_64/cpu_model.rs | use std::arch::x86_64::__cpuid as host_cpuid; use std::cmp::{Eq, Ordering, PartialEq, PartialOrd}; /// Structure representing x86_64 CPU model. #[derive(Debug, Eq, PartialEq)] pub struct CpuModel { /// Extended family. pub extended_family: u8, /// Extended model. … | TOOL | 0.6644410490989685 | 7.749431133270264 |
| 843bc3c2-6e11-4f66-898e-9d0c574a2de9 | domikini/AdventOfCode | 2021/src/ac2_1.rs | #![allow(dead_code)] use std::fs::File; use regex::Regex; use std::io::{BufRead, BufReader, Error, ErrorKind, Read}; pub fn ac2_1() -> Result<(), Error>{ let mut horizontal_pos:usize = 0; let mut depth:usize = 0; let v = read_a_file(File::open("input2")?)?; for … | ALGO | 0.9849377274513245 | 3.9175734519958496 |
| 2a126cb5-a607-403f-bcc0-d01dd962b367 | blm768/wio-terminal-rust-test | atsamd/pac/atsamd51j19a/src/evsys/channel/chstatus.rs | #[doc = "Reader of register CHSTATUS"] pub type R = crate::R<u8, super::CHSTATUS>; #[doc = "Reader of field `RDYUSR`"] pub type RDYUSR_R = crate::R<bool, bool>; #[doc = "Reader of field `BUSYCH`"] pub type BUSYCH_R = crate::R<bool, bool>; impl R { #[doc = "Bit 0 - Ready User"… | TOOL | 0.6594862341880798 | 7.906254291534424 |