I hereby claim:
- I am conradludgate on github.
- I am oon (https://keybase.io/oon) on keybase.
- I have a public key ASC2TLtfnEF2ql78BKE2E1-fNoxnqiZ5tlRItwK-wBdqmQo
To claim this, I am signing this object:
fn main() { | |
let v = vec![1, 2, 3, 4, 5, 6]; | |
let r = 3; | |
for x in CombiIterator::new(v, r) { | |
println!("{:?}", x); | |
} | |
} | |
#[derive(Debug, Clone)] |
use std::{fmt::Debug, ops::Range}; | |
fn main() { | |
let mut v = vec![1, 2, 3, 4, 5, 6]; | |
let r = 3; | |
for x in CombiIterator::new(&mut v, r) { | |
println!("{:?}", x); | |
} | |
} |
// Outputs: | |
// [1, 2, 3], ([4, 5, 6]) | |
// [1, 2, 4], ([5, 6, 3]) | |
// [1, 2, 5], ([6, 3, 4]) | |
// [1, 2, 6], ([3, 4, 5]) | |
// [1, 3, 4], ([5, 6, 2]) | |
// [1, 3, 5], ([6, 4, 2]) | |
// [1, 3, 6], ([4, 5, 2]) | |
// [1, 4, 5], ([6, 3, 2]) | |
// [1, 4, 6], ([5, 3, 2]) |
fluffy = Labrador("fluffy") | |
scruffy = GoldenRetriever("scruffy") | |
cat = Cat(fluffy) | |
cat.say() # Meow, I am a cat and my enemy says: 'Bark, I am a Labrador' | |
cat.move() # I am running away from fluffy | |
scruffy.say() # Bark, I am a Golden Retriever | |
scruffy.move() # I am chasing cats |
# Imports for word2vec | |
from gensim.test.utils import common_texts, get_tmpfile | |
from gensim.models import Word2Vec, KeyedVectors | |
# imports for tensorflow | |
import tensorflow as tf | |
# Numpy | |
import numpy as np |
import sys | |
# Example usage | |
# $ python euclidian.py 1745 1485 | |
# gcd(1745, 1485) = (1 + 297n) * 1745 - (0 + 349n) * 1485 = 5 | |
# The euclidian algorithm took 6 steps | |
a = int(sys.argv[1]) # 1745 | |
b = int(sys.argv[2]) # 1485 |
package dft | |
import ( | |
"math" | |
"math/cmplx" | |
) | |
func Radix2DIT(data []complex128) []complex128 { | |
l := len(data) | |
l-- // power of two >= l |
#include <stdio.h> | |
//#include <stdint.h> | |
#include <math.h> | |
void PrintBits64(unsigned long u) | |
{ | |
char str[66]; | |
str[64] = '\n'; | |
str[65] = 0; | |
for (int i = 63; i >= 0; i--) |
I hereby claim:
To claim this, I am signing this object:
// Benchmark for https://github.com/wjh/beaver/issues/1 | |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"os" | |
"strconv" | |
"testing" | |
"text/template" |