Skip to content

Instantly share code, notes, and snippets.

Mathieu Poumeyrol kali

Block or report user

Report or block kali

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View parse.rs
pub fn integer<'a>(bin: bool) -> impl Fn(&'a [u8]) -> IResult<&'a [u8], i32> {
map(pair(
cond(bin, be_i32),
cond(!bin,
map_res(
map_res(
recognize(pair(opt(tag("-")), take_while(nom::character::is_digit))),
std::str::from_utf8,
),
|s| s.parse::<i32>(),
View geal.rs
use std::arch::x86_64::*;
fn main() {
unsafe { run() }
}
#[target_feature(enable = "avx")]
unsafe fn run() {
let mut data:Vec<u8> = Vec::new();
for i in 0..32 {
View gist:dad3c1b4b6fa69782f3edab9d0a22b28
// should recognize:
// input-node name=foo dim=12
// i want to assume both are here, but not necessarily in this order
// i have similar case with more numrous foo=bar cases
fn parse_input_node_line(i: &str) -> IResult<&str, (String, usize)> {
use crate::parser::spaced;
use std::cell::Cell;
let name: Cell<Option<String>> = Cell::new(None);
let dim: Cell<Option<usize>> = Cell::new(None);
View gist:962e26250a19a1067b4b6a3cf31e0214
pub fn spaced<I, O, E: nom::error::ParseError<I>, F>(
it: F,
) -> impl Fn(I) -> IResult<I, O, E> where
I: nom::InputTakeAtPosition,
<I as nom::InputTakeAtPosition>::Item: nom::AsChar + Clone,
F: Fn(I) -> IResult<I, O, E> {
delimited(space0, it, space0)
}
pub fn multispaced<I, O, E: nom::error::ParseError<I>, F>(
View gist:861965ae39c45497c3a7954115d2c3ab
extern crate flate2;
extern crate image;
extern crate ndarray;
extern crate protobuf;
extern crate tar;
#[allow(unused_imports)]
#[macro_use]
extern crate tract_core;
use std::{fs, io, path};
View dog.rs
extern crate flate2;
extern crate image;
extern crate ndarray;
extern crate protobuf;
extern crate tar;
#[allow(unused_imports)]
#[macro_use]
extern crate tract_core;
use std::{fs, io, path};
View linker.sh
#!/bin/sh
/Users/kali/dev/toolchains/raspbian/stretch/rpi-linaro/armv7-unknown-linux-gnueabihf/bin/armv7-unknown-linux-gnueabihf-gcc --sysroot /Users/kali/dev/toolchains/raspbian/stretch/rpi-linaro/armv7-unknown-linux-gnueabihf/armv7-unknown-linux-gnueabihf/sysroot "$@"
View gist:2c7792f9d30c62692c4467efe1ae41cf
impl<I> ModularArithmetic for I
where
I: Clone + Sized,
I: Zero + One + Neg<Output=I> + NumberTests,
for<'a> &'a I: Mul<I, Output=I>,
for<'a,'b> &'a I: Mul<&'b I, Output=I>,
for<'a,'b> &'a I: Div<&'b I, Output=I>,
for<'a> I: Rem<&'a I, Output=I>,
for<'a,'b> &'a I: Rem<&'b I, Output=I>,
for<'a,'b> &'a I: Add<&'b I, Output=I>,
View gist:5026f0d3281d80c38f3543b41ef31ad4
error: failed to run custom build command for `libc-test v0.1.0 (file:///home/kali/libc/libc-test)`
process didn't exit successfully: `/home/kali/libc/libc-test/target/debug/build/libc-test-bad5caa69cfa4e7d/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=../src/lib.rs
cargo:rerun-if-changed=../src/dox.rs
cargo:rerun-if-changed=../src/unix/mod.rs
cargo:rerun-if-changed=../src/macros.rs
cargo:rerun-if-changed=../src/unix/notbsd/mod.rs
cargo:rerun-if-changed=../src/unix/notbsd/linux/mod.rs
cargo:rerun-if-changed=../src/unix/notbsd/linux/other/mod.rs
View gist:2e531eccdd81d196c21376fe61772460
error[E0046]: not all trait items implemented, missing: `clerks_info`
--> src/lib.rs:367:1
|
367 | impl<I, C, S, M> sda_transport::TransportInterface for SummerServer<I, C, S, M>
| ^ missing `clerks_info` in implementation
error: aborting due to previous error
You can’t perform that action at this time.