Skip to main content

Posts

Hermes - My Need For An Alternate Key-Value Store

Hermes
A concurrent, lightweight and fast In-Memory Key-Value Store alternative that supports sharding, LRFU Cache Removal Policy and a faster consistent non-cryptographic hashing algorithm called Позитивный Хэш (Fast Positive Hash). This was supposedly a sub-component of my pet IR system in Go, and supposed to run on a single machine instance (peering among nodes is in TODO list) only. I thought this is helpful enough and can stand on its own and can help alleviate disk I/O operations (database, file, etc.) in a quite-not-so-small-but-single-machine kind of systems. Use this in your app like so (as embedded, if your app is in Go): package main import ( "fmt" "github.com/jtejido/hermes/hermes" "github.com/jtejido/hermes/config" "github.com/BurntSushi/toml" "sync" "strconv" ) func main() { var wg sync.WaitGroup var con config.Config if _, err := toml.DecodeFile("src/github.com/jtejido/hermes/config.toml"…

GeodesyPHP - A Great-Earth Distance library

Geodesy-PHP
Geodesy-PHP is a port of some known geodesic/math functions for getting distance from a known point A to a known point B, given their coordinates (good for working out distances between different latitude/longitude data provided by Google Geolocation or any RESTful APIs).

It also supports conversion between units of length, Polar position to Cartesian coordinates, and transforming different Reference Datums.

It provides distance calculations thru:




Spherical Law of CosinesHaversine formula (Half a Versine - versed sine)Vincenty's formulaThomas' formulaHubeny's formulaAndoyer-Lambert's formulaElliptic DistanceForsythe-Andoyer-Lambert Formula

Note: This library is a collection that solves the Inverse geodetic problem.
Installation: composer require jtejido/geodesy-php
Usage Distance Calculation All classes receives and gives all values in Metre unit of length by default.

use Geodesy\Location\LatLong; use Geodesy\Distance\HaversineFormula; use Geodesy\Distan…

Basset - Information Retrieval Library in PHP

Basset Basset is a full-text  PHP Information Retrieval library. This is a collection of developments in the field of IR and ported over to PHP for research purposes.

Basset provides different ways of searching through documents in a collection (ad-hoc), by applying advanced and experimental IR algorithms and/or techniques gathered from different Research studies and Conferences, most notably:
TRECSIGIRECIRACM BasicsWarning: This is a tool that is continuously under development. Please use this as a research tool for your otherwise special Production needs. Adding Documents Basset manages adding document thru the IndexWriter Class.
It processes the documents you'll be adding in and later on commit to an external file.
It takes a directory path, and overwrite (they both default to '../index/' and true consecutively).
Setting overwrite to false means that you won't be accidentally overwriting any existing index inside the directory.

Methods:

addDocument(DocumentInterface $…