I hereby claim:
- I am agnishom on github.
- I am agnishom (https://keybase.io/agnishom) on keybase.
- I have a public key ASBEfGCEQw4cY-VOkwSiHBWosC_4pM60jwJi5AufQzgF2wo
To claim this, I am signing this object:
use std::collections::VecDeque; | |
use std::cell::RefCell; | |
use std::rc::Rc; | |
use std::cell::Ref; | |
pub mod vllsimple; | |
use vllsimple::*; | |
struct part_man{ | |
// pools |
use std::collections::VecDeque; | |
// compute the inverse relation given a function | |
fn inverse_fn(n: usize, f: &Vec<usize>) -> Vec<Vec<usize>> { | |
let mut inverse_f = vec![vec![]; n]; | |
for i in 0..n { | |
inverse_f[f[i]].push(i); | |
} | |
inverse_f | |
} |
#include <stdio.h> | |
#include "heater.c" | |
uint8_t temperature; | |
int main(){ | |
for (int i = 0; i < 200; i++){ | |
temperature = i; | |
step(); |
module Board where | |
import Data.Map (Map, (!)) | |
import qualified Data.Map as Map | |
import Data.List (intercalate) | |
data Player = X | O | |
deriving (Eq, Ord, Show) | |
newtype Board = Board (Map (Int, Int) (Maybe Player)) |
/** The functional list type defined by IntList := EmptyIntList + ConsIntList(int, IntList) */ | |
abstract class IntList { | |
/** Visitor hook */ | |
abstract public Object visit(IntListVisitor iv); | |
/** Adds i to the front of this. */ | |
public ConsIntList cons(int i) { return new ConsIntList(i, this); } | |
/** Returns the unique empty list. */ | |
public static EmptyIntList empty() { return EmptyIntList.ONLY; } |
{-# LANGUAGE OverloadedStrings #-} | |
{-# OPTIONS_GHC -Wall #-} | |
module Regex.Glushkov where | |
import Control.Monad.State | |
import Data.Aeson.Encode.Pretty (encodePretty) | |
import qualified Data.Text as T | |
import qualified Data.ByteString.Lazy as BSL |
use std::marker::PhantomData; | |
pub trait Sink<A> { | |
fn init(&mut self); | |
fn next(&mut self, item: A); | |
fn end(&mut self); | |
} | |
pub trait Query<A,B>: { | |
fn init(&mut self, sink: &mut dyn Sink<B>); |
import data.fintype | |
structure dfa (alphabet : Type) [fintype alphabet] := | |
(qq : Type) {is_finite : fintype qq} {has_decidable_eq : decidable_eq qq} | |
(δ : qq → alphabet → qq) | |
(init : qq) | |
(fin : qq → bool) | |
def language (alphabet : Type) [fintype alphabet] := list alphabet → bool |
I hereby claim:
To claim this, I am signing this object:
import Data.List | |
{- | |
We are assumming the multiplication is happening in decimal digits. Here is the yardstick with which we are measuring the number of operations | |
1. Every single digit multiplication is 1 step | |
2. Adding two n-digit numbers is n steps. | |
Adding an m-digit and an n-digit number takes max(m, n) steps. | |
Adding two n-digit numbers produce an (n+1)-digit number. |