Skip to content

Instantly share code, notes, and snippets.

Avatar
🧬
Focusing

Vijini Mallawaarachchi Vini2

🧬
Focusing
View GitHub Profile
@Vini2
Vini2 / Label_Propagation_Demo.ipynb
Created March 6, 2020 04:03
Label propagation demo for a simple graph
View Label_Propagation_Demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Vini2
Vini2 / SimpleDemoGA.java
Last active February 1, 2023 03:12
A simple implementation of a genetic algorithm
View SimpleDemoGA.java
import java.util.Random;
/**
*
* @author Vijini
*/
//Main class
public class SimpleDemoGA {
View Clustering using convex hulls.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Vini2
Vini2 / Python-igraph Example.ipynb
Created April 7, 2020 14:53
Python-igraph Example
View Python-igraph Example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Vini2
Vini2 / DBSCAN blog.ipynb
Created March 25, 2020 12:15
DBSCAN eps detection - blog article
View DBSCAN blog.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Translating_DNA_into_Protein.py
# Read the file and get the DNA string
file = open('sample_dna.txt', 'r')
dna = file.read()
print "DNA Sequence: ", dna
# DNA codon table
protein = {"TTT" : "F", "CTT" : "L", "ATT" : "I", "GTT" : "V",
"TTC" : "F", "CTC" : "L", "ATC" : "I", "GTC" : "V",
"TTA" : "L", "CTA" : "L", "ATA" : "I", "GTA" : "V",
@Vini2
Vini2 / Visualise_Graph_Demo.ipynb
Last active September 23, 2021 07:47
Visualising Graph Data with python-igraph
View Visualise_Graph_Demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Clustering using convex hulls - High Dim.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View evaluate.py
import argparse
import scipy.special
import csv
parser = argparse.ArgumentParser(description="""Evaluate clustering results. This scripts will return the
precision, recall, F1-score and ARI of the provided clustering result""")
parser.add_argument("--clustered",
required=True,
type=str,
View Translating_RNA_into_Protein.py
# Read the file and get the RNA string
file = open('sample_rna.txt', 'r')
rna = file.read()
print "RNA String: ", rna
# RNA codon table
rna_codon = {"UUU" : "F", "CUU" : "L", "AUU" : "I", "GUU" : "V",
"UUC" : "F", "CUC" : "L", "AUC" : "I", "GUC" : "V",
"UUA" : "L", "CUA" : "L", "AUA" : "I", "GUA" : "V",