Archive for the ‘Algoritmi’ Category
Monday, April 1st, 2024
FAISS implements similarity search. Sentence Transformers encodes sentences into vectors FAISS can use. Llama can be configured to perform semantic searches in a FAISS vector store. By combining all of the above together we can build a local GenAI powered assistant capable of performing semantic queries to extract information from a local corpus of documents, let’s see how.
(more…)
Posted in Algoritmi | Comments Off on A local Q&A engine using llama and FAISS
Sunday, October 22nd, 2023
I’ve made a digital photo frame that displays random photo from my Google Photo library enriched with an Haiku generated by a LLaVa instance using the same photo as reference.
(more…)
Posted in Algoritmi | Comments Off on LLaVA, Google Photo API and a broken e-book reader: Haiku digital photo frame.
Friday, July 2nd, 2021
This experiment combines hsl.js and tensorflow.js to perform real time object detection from a browser. When the mouse hovers the canvas the entire stream is shown, with the detected object framed in a black box, otherwise only the parts of the stream corresponding to detected objects are displayed.
(more…)
Posted in Algoritmi, Interfaccie | Comments Off on In Browser Real Time Object Detection From an HTTP Live Stream
Wednesday, June 28th, 2017
Next step is determining the roots of the characteristic polynomial of a matrix. Before working on extracting the roots using Newton’s method I wanted to be able to visualize the function.
(more…)
Tags: Characteristic polynomial
Posted in Algoritmi | Comments Off on Plotting the characteristic polynomial of a matrix
Saturday, June 10th, 2017
I’m currently reading Deep Learning, from Ian Goodfellow, Yoshua Bengio and Aaron Courville. While reading I got interested in calculating the determinant of a square matrix, I know there are many existing libraries to do that but the algorithm looked simply enough to give it a try.
(more…)
Tags: determinant, matrix
Posted in Algoritmi | Comments Off on Determinant of a matrix in JS
Sunday, May 4th, 2014
A friend of mine recently asked if I can create an animation out of this nice example; the first thing I did was wrap the render function around a requestAnimationFrame and add a random speed factor to all the vertices at every iteration.
(more…)
Tags: delaunay, javascript, performances
Posted in Algoritmi | Comments Off on How to render a dynamic animated Delaunay triangulation
Saturday, March 1st, 2014
Angular.js does an excellent job on preventing a form submission when invalid but only if the action attribute is not present, otherwise we have to implement a few tricks to achieve the same behaviour.
(more…)
Tags: angular.js, submit
Posted in Algoritmi, Librerie | Comments Off on Angular.js prevent an invalid form submission
Thursday, March 14th, 2013
I spent part of the last weekend on this experiment that startet with a question: it is possible to convert a video to a stream of CSS properties ? Surprisingly the answer is yes. We can dump each video frame to a canvas and then create a special (and very long) multiple background property (one background for each video row) where each pixel is created using a 1px size gradient.
(more…)
Tags: convert, CSS, video
Posted in Algoritmi | Comments Off on Useless bu fun: Encoding video to CSS
Sunday, October 28th, 2012
Recently I had to deal with a WordPress multisite instance, the task was moving the contents of one of the sites hosted on the network to a local copy, update them and the re-move them to the production server.
(more…)
Tags: migration, network, Wordpress
Posted in Algoritmi | Comments Off on Migrating a single site of a wordpress multisite instance
Sunday, November 27th, 2011
Lately I’ve been involved into a fascinating project called PepperTweet which consist in extract and visualize streams of pics from twitter starting from some search keywords.
(more…)
Tags: canvas, lot of images, mobile safari
Posted in Algoritmi, Approfondimenti | Comments Off on Handling thousands of pics from a mobile device