Skip to content

Instantly share code, notes, and snippets.

View pczarn's full-sized avatar
🇵🇱
Proland

Peter Blackson pczarn

🇵🇱
Proland
  • Poland
View GitHub Profile
@pczarn
pczarn / nom.rs
Created January 28, 2022 08:13
Nom error
use crate::Response;
use nom::IResult;
use nom::character::complete::{char, anychar};
use nom::bytes::complete::take;
use nom::bytes::complete::take_until;
use nom::bytes::complete::take_till;
use nom::multi::many_till;
use nom::combinator::eof;
use nom::sequence::pair;
@pczarn
pczarn / compile-run.sh
Created January 30, 2020 03:05
weak and strong symbols
clang -Wall -fPIC -c ctest1.c ctest2.c
clang -shared -Wl,-soname,libctest.so.1.0 -o libctest.so.1.0 *.o
clang -fPIC prog.c -Wl,-rpath,. libctest.so.1.0 -o prog1
./prog1 > result1
clang prog.c ctest*.c -o prog2
./prog2 > result2
stable-vec-0.3.2/LICENSE-APACHE: "Legal Entity" shall mean the union of the acting entity and all
paillier-0.2.0/LICENSE-APACHE: "Legal Entity" shall mean the union of the acting entity and all
contest-algorithms-0.1.2/README.md:- [Basic graph representations](src/graph/mod.rs): adjacency lists, minimum spanning tree, Euler path, disjoint set union
gdpr_consent-0.4.0/LICENSE-APACHE: "Legal Entity" shall mean the union of the acting entity and all
partitions-0.2.4/LICENSE.txt:"Legal Entity" shall mean the union of the acting entity and all
partitions-0.2.4/Cargo.toml:description = "A disjoint-sets/union-find implementation that allows for efficient iteration over elements of a set."
partitions-0.2.4/Cargo.toml:keywords = ["union-find", "disjoint-sets"]
bitarray-set-0.4.1/LICENSE-APACHE: "Legal Entity" shall mean the union of the acting entity and all
partitions-0.2.4/README.md:A [disjoint-sets/union-find] implementation of a vector partitioned in sets that
partitions-0.2.4/README.md:[`union`] metho
@pczarn
pczarn / Earley.agda
Last active May 25, 2019 17:33
Defining grammars / parse forests / BNF eventually for an Earley parser in Agda
open import Data.List
open import Data.Nat
open import Data.Nat.Properties
open import Relation.Binary.PropositionalEquality
-- open import Data.Product
module Earley where
data Terminality : Set where
T : Terminality
@pczarn
pczarn / coalesced-notes.txt
Created March 25, 2017 20:55
Mass Effect 3 Coalesced bin
/bioinput.ini/sfxgame/sfxgamemodebase/bindings
( Name="Shared_Action", Command="Exclusive Used | Exclusive PressAction | OnTap 0.3 TapAction | OnHold 0.3 HoldAction")
( Name="Shared_Aim", Command="SwapWeaponIfEmpty | TightAim | FOV 0 | OnRelease FOV 95 | OnRelease StopTightAim" )
( Name="My_Storm", Command="Exclusive TryStandingJump | OnRelease StormOff | StormOn" )
( Name="My_Melee", Command="TryHeavyMelee")
: OnTap 0.01 TryMelee | LeaveWorld | OnHold 0.01 TryHeavyMelee
( Name="F11", Command="screenshot" )
sfxgamemodedefault
inputdelaystormexit = 0.01
inputdelaytightaimexit = 0.01
@pczarn
pczarn / RobinHood.ipynb
Last active February 19, 2017 17:12
Notebook for Robin Hood hashing (using Julia)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pczarn
pczarn / panini_grammar_parser.rs
Last active August 4, 2016 15:24
Design experiments for Panini's grammar description
let mut parser = grammar! {
start ::= attrs:inner_attr* stmts:stmt* lexer:lexer => {
Stmts {
attrs: attrs,
stmts: stmts,
lexer: lexer,
}
};
inner_attr ::=
extern crate runtime;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
enum Test {
Foo,
Bar,
}
#[test]
fn test_layered_parser() {
@pczarn
pczarn / robin_hood.jl
Last active November 6, 2016 11:21
Probability distribution of hash table lookup cost in Robin Hood hashing.
LOAD_FACTOR = 0.909
PRECISION = 6000
N_LIMIT = 250
setprecision(512)
function psi(n, a::BigFloat)
p = 1 / a - 1
q = BigFloat(0)
recognizer.earleme == 0
====================================
start: • stmts (0)
stmt : • ident ty defined_as rhs action semi (0)
stmts: [ • stmt ]* (0)
------------------------------------
start: • stmts (0)
stmts: • g32 (0)
stmt : • g24 semi (0)
g24 : • g25 action (0)