Skip to content

Instantly share code, notes, and snippets.

View DDimitris's full-sized avatar
😉
Come on down, come on in. Let the magic begin!

DDimitris DDimitris

😉
Come on down, come on in. Let the magic begin!
View GitHub Profile
@DDimitris
DDimitris / Cosine.rb
Created June 9, 2017 11:02
Cosine Similarity Ruby
class Cosine
def initialize vecA, vecB
@vecA = vecA
@vecB = vecB
end
def calculate_similarity
return nil unless @vecA.is_a? Array
return nil unless @vecB.is_a? Array
return nil if @vecA.size != @vecB.size

Keybase proof

I hereby claim:

  • I am ddimitris on github.
  • I am ddimitris (https://keybase.io/ddimitris) on keybase.
  • I have a public key whose fingerprint is 93FE 2716 5516 F739 81B7 2B93 DE14 84DD A09B 4BC9

To claim this, I am signing this object:

@DDimitris
DDimitris / MainStatements.java
Last active April 1, 2019 04:44
Vradines anisixies se Java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Main;
import connectivity.DbController;
import connectivity.MySqlDriver;
import java.sql.SQLException;
@DDimitris
DDimitris / DecreasingSubsequence.java
Last active August 29, 2015 14:10
AUEB_Java_Various
import java.util.Arrays;
/**
*
* @author Dedousis Dimitris <dimitris.dedousis@gmail.com>
*/
public class Ask2 {
public static void main(String[] args) {