Skip to content

Instantly share code, notes, and snippets.

Fabien Arcellier FabienArcellier

  • Octo Technology
  • Paris
Block or report user

Report or block FabienArcellier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View SymSpell.cs
// SymSpell: 1000x faster through Symmetric Delete spelling correction algorithm
//
// The Symmetric Delete spelling correction algorithm reduces the complexity of edit candidate generation and dictionary lookup
// for a given Damerau-Levenshtein distance. It is three orders of magnitude faster and language independent.
// Opposite to other algorithms only deletes are required, no transposes + replaces + inserts.
// Transposes + replaces + inserts of the input term are transformed into deletes of the dictionary term.
// Replaces and inserts are expensive and language dependent: e.g. Chinese has 70,000 Unicode Han characters!
//
// Copyright (C) 2012 Wolf Garbe, FAROO Limited
// Version: 1.6
@FabienArcellier
FabienArcellier / program.cs
Created Jan 11, 2014
get the DotNetFramework path using ToolLocationHelper
View program.cs
using Microsoft.Build.Utilities;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DotNetPaths
{
@FabienArcellier
FabienArcellier / CaptureGestureIntelSDK.cs
Created Dec 15, 2013
Capture gesture with Intel Perceptual Computing SDK
View CaptureGestureIntelSDK.cs
namespace CaptureGestureIntelSDK
{
using System;
using System.Threading;
class Program
{
public static bool EndRequested = false;
static void Main(string[] args)
@FabienArcellier
FabienArcellier / HelloWorld.cs
Created Dec 8, 2013
Helloworld avec Intel Perceptual Computing SDK 2013. Cet exemple est compatible avec une simple webcam.
View HelloWorld.cs
namespace HelloWorldSDK
{
using System;
using System.Drawing;
using System.Threading;
class Program
{
static void Main(string[] args)
{
@FabienArcellier
FabienArcellier / haversine.sql
Last active Dec 20, 2015
Algorithm of Haversine to calculate distance between two gps coord for MySQL
View haversine.sql
DELIMITER //
CREATE FUNCTION `distance` (p1_latitude DOUBLE, p1_longitude DOUBLE, p2_latitude DOUBLE, p2_longitude DOUBLE) RETURNS DOUBLE
BEGIN
DECLARE deg2rad DOUBLE DEFAULT 0.0174; -- 3.14/180 or 2PI/360
DECLARE distance_latitude, distance_longitude, a DOUBLE;
SET distance_latitude = ( p2_latitude - p1_latitude ) * deg2rad;
SET distance_longitude = ( p2_longitude - p1_longitude ) * deg2rad;
SET a = sin( distance_latitude * .5 ) * sin( distance_latitude * .5 ) + cos( p1_latitude * deg2rad ) * cos( p2_latitude * deg2rad ) * sin( distance_longitude / 2 ) * sin( distance_longitude / 2 );
RETURN round( ( 2 * atan2( sqrt(a) , sqrt(1-a) ) ) * 6371000 , 3 ); -- 6371000 : curve rayon of earth ;
END
@FabienArcellier
FabienArcellier / php.md
Last active Dec 19, 2015
List of PHP library
View php.md
View OverrideBackboneCollectionFetch.js
var MyCollection = Backbone.Collection.extend({
//custom methods
fetch: function(options) {
//do specific pre-processing
//Call Backbone's fetch
return Backbone.Collection.prototype.fetch.call(this, options);
@FabienArcellier
FabienArcellier / svn2git.bash
Last active Dec 15, 2015
This bash snippet is a script to migrate svn repository with a structure (trunk, branches and tags) to a new git repository. It take care of doing authors matching and remove the adress of old svn
View svn2git.bash
#!/bin/bash
# This snippet suppose the file authors_list exists
# take a look at http://www.yterium.net/Migrer-un-projet-SVN-vers-GIT
if [[ "$1" == "" && "$2" == "" ]] ; then
echo "$1"
echo "$2"
echo "Arguments are invalid"
exit
fi
@FabienArcellier
FabienArcellier / matrix.html
Created Mar 17, 2013
This snippet generate matrix falling code. I got it by unobfuscate those code. Look at it it's impressive : http://timelessname.com/sandbox/matrix.html
View matrix.html
<html>
<head>
<script language="javascript">
function matrix_on_load()
{
s=window.screen,w=q.width=s.width,h=q.height=s.height,m=Math.random;
// Initialize the number of columns
for(p=[],i=0;i<256;p[i++]=0);
You can’t perform that action at this time.