Skip to content

Instantly share code, notes, and snippets.

use std::env;
use std::time::Instant;
use rand::{Rng, SeedableRng};
use rand::rngs::StdRng;
use rand::distributions::{Distribution, Uniform};
#[derive(Clone, Copy)]
enum Enum {
A(bool),
@mikebenfield
mikebenfield / cgann-diff-latest
Created September 14, 2022 22:43
cachegrind diff
--------------------------------------------------------------------------------
Files compared: results/cgfilt-c2804e6ec2c29a5c7368600ea173b890e2655c3d-syn-1.0.89-Opt-IncrPatched0; results/cgfilt-512bd84f51ba6963c84506f408840e5341abe499-syn-1.0.89-Opt-IncrPatched0
Command: /usr/local/google/home/mbenfield/.rustup/toolchains/c2804e6ec2c29a5c7368600ea173b890e2655c3d/bin/rustc --crate-name syn --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C incremental=/tmp/.tmpIGtreC/incremental-state --cfg feature="clone-impls" --cfg feature="default" --cfg feature="derive" --cfg feature="parsing" --cfg feature="printing" --cfg feature="proc-macro" --cfg feature="quote" -C metadata=4363f9e86f258384 -C extra-filename=-4363f9e86f258384 --out-dir /tmp/.tmpIGtreC/target/release/deps -L dependency=/tmp/.tmpIGtreC/target/release/deps --extern proc_macro2=/tmp/.tmpIGtreC/target/relea
import argparse
import pathlib
from time import perf_counter
import numpy as np
import sklearn.datasets as datasets
from sklearn.metrics import accuracy_score
from sklearn.ensemble import ExtraTreesClassifier
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mikebenfield
mikebenfield / gen_script2.txt
Created July 16, 2018 05:29
Generated script 2 (char)
Star Trek: Bashi
Stardate: 11 [on show all Commander] Starfleet One, Captain, how could they determine all docking-boy?
SISKO [on monitor]: The Potemhe hasn't made it Borg.
SISKO: Sometimes Ensign Kix and the EHCORBY: No, it's a good idea. For I prosecup it. But be used
SISKO: Gal prores, hustles.
SISKO: They understood Caldon. It's supposed to be on the substance time for themselves. Seven of Nine and in detailed death. Human cargo bay isn't what seals Doctor Earth.
SHELBY: One on my life, no sight of clean log risps.
SISKO: Well, the safe communication Classs'S Tendh. Your Gomen's night expects my fear. I might I can get my help. Put a total stars for help, being designed to be an embalk, A,
(Back online helped them, since T'Pol gets himself as E Nine can see Odo at the wind-nugged d himself)
ODO: The Dominion died and more than that, Mister Worf?
@mikebenfield
mikebenfield / gen_script1.txt
Created July 16, 2018 05:27
Generated script 1 (char)
Star Trek
Ire started each other.
AREY: Phach to CL dark!
(Sisko goes inanius on. Geordi Damar, he plads as we bitan. My ridden tirch homes. She shook her out, Do Grand Evaduble happiness. Keep all straight and sits her out on Foreal)
SULE 54621.1
ESH: Fire!
WEELEY: That is a Borg less.
STONE: I'm not caught outside the Cardassian card next here, Captain! Check the head of my hologram?
KAZAD [A Ocume Colony]: My chances of all widdes out in Voyager. I fear the desish to stay.
MIRAMANA: Fine. Do you see that?
extern crate sdl2;
extern crate gl;
fn find_sdl_gl_driver() -> Option<u32> {
for (index, item) in sdl2::render::drivers().enumerate() {
if item.name == "opengl" {
return Some(index as u32);
}
}
@mikebenfield
mikebenfield / main.rs
Created August 6, 2017 21:25
For rustc bug report
#![allow(unused_variables)]
#![allow(unused_macros)]
macro_rules! do_all {
(@ $macro_name: ident,
$(
[
$(
$content: tt
)*
import time
import sys
from sklearn import ensemble, datasets, model_selection, metrics
import numpy as np
n_estimators = int(sys.argv[1])
rs = np.random.RandomState(12345)