This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS G:\ProgrammingProjects\Rust\biofast> hyperfine --warmup=3 ".\target\release\fqcnt.exe .\M_abscessus_HiSeq.fq" ".\target\release\fqcnt.exe .\M_abscessus_HiSeq.fq.gz" | |
Benchmark #1: .\target\release\fqcnt.exe .\M_abscessus_HiSeq.fq | |
Time (mean ± σ): 2.148 s ± 0.011 s [User: 0.0 ms, System: 3.4 ms] | |
Range (min … max): 2.134 s … 2.165 s | |
Benchmark #2: .\target\release\fqcnt.exe .\M_abscessus_HiSeq.fq.gz | |
Time (mean ± σ): 6.538 s ± 0.043 s [User: 2.8 ms, System: 2.3 ms] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::env; | |
use std::io; | |
use std::io::{BufRead, BufReader, BufWriter, Write}; | |
use std::fs::File; | |
#[derive(Debug)] | |
enum Error { | |
Io(io::Error), | |
Program(&'static str), | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate num; | |
use num::complex::Complex64; | |
extern crate image; | |
use image::Rgba; | |
extern crate rayon; | |
use rayon::prelude::*; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(test)] | |
extern crate test; | |
#[cfg(test)] | |
mod tests { | |
use super::*; | |
use std::fs::{File}; | |
use std::io::{BufWriter, Write, BufRead, BufReader}; | |
#[bench] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
namespace WordGenerator | |
{ | |
public class MarkovWordGenerator | |
{ | |
const int MAX_TRIES = 200; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io; | |
use std::io::BufRead; | |
use std::time::SystemTime; | |
fn main() { | |
let start_time = SystemTime::now(); | |
let mut count = 0; | |
let mut num_words = 0; | |
let mut num_chars = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "List iteration:" | |
"first", "second", "I'll do it!" | foreach {"The $_ item"} | |
echo "" | |
echo "Reading values from a command:" | |
cat ".\myfile.txt" | foreach {$_} | |
echo "" | |
echo "Field separator:" | |
cat ".\myOtherFile.txt" -Delimiter ":" | foreach {$_.TrimEnd(':')} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*----------------------------------------------------------- | |
* Title : Memory Allocator | |
* Written by : Stuart Haidon | |
* Date : 2015-06-11 | |
*----------------------------------------------------------- | |
MEM_NULL_PTR equ -1 | |
MEM_MAGIC_NUMBER equ $6D61 | |
MEM_HEADER_SIZE equ 14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C-CPU Assembler Listing | |
Created on 09/11/2016 00:39:18 | |
0000 1 ; Test C-CPU Assembly | |
0000 2 | |
0000 9380 3 seti r3, outLoc ; Output location. | |
0001 4 | |
0001 9205 5 seti r2, 5 ; Counter. | |
0002 9900 00A0 6 seti.l r1, hA0 | |
0004 9001 7 seti r0, 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*----------------------------------------------------------- | |
* Title : Brainfuck Assembler | |
* Written by : Stuart Haidon | |
* Date : 2015-06-16 | |
* Versions: | |
* 1.0: Release | |
* 1.1: Changed JMP instruction in assembled program to RTS. | |
* 1.2: Now handles mis-matched brackets. | |
*----------------------------------------------------------- |