Skip to content

Instantly share code, notes, and snippets.

View MexsonFernandes's full-sized avatar
:octocat:
Research and Development

Mexson Fernandes (RoboMex) MexsonFernandes

:octocat:
Research and Development
View GitHub Profile
@MexsonFernandes
MexsonFernandes / song.R
Created April 5, 2019 13:51
Analyzing song lyrics of two artist from their album
# credits R Bloggers
# STEP 1 - Add libraries
library(geniusR)
library(tidytext)
library(tidyverse)
# STEP 2 - Downloading lyrics of artist
@MexsonFernandes
MexsonFernandes / mindwave.cs
Created April 5, 2019 13:42
C# code for data collection from Neurosky Mindwave Mobile EEG headset
using System.IO;
using System.Net.Sockets;
using Jayrock.Json.Conversion;
using System;
using System.Text;
using System.Collections;
namespace ConsoleApp1
{
class Program
@MexsonFernandes
MexsonFernandes / eeg.m
Created April 5, 2019 13:39
Matlab code for data collection from Neurosky Mindwave Mobile EEG headset
%clear everything before loading
clc;
clear ALL;
pause on;
%loading dll library, header file and other libraries
%(libfunctionsview thinkgear to view dll)
if ~libisloaded('Thinkgear')
loadlibrary('Thinkgear.dll');
else
unloadlibrary Thinkgear
@MexsonFernandes
MexsonFernandes / mindwave.py
Created April 5, 2019 13:38
Python code for data collection from Neurosky Mindwave Mobile headset device
import numpy as np
import pandas as pd
import sys
import json
import time
from telnetlib import Telnet
# Initializing the arrays required to store the data.
attention_values = np.array([])
meditation_values = np.array([])
@MexsonFernandes
MexsonFernandes / combat.ino
Created April 3, 2019 06:52
Combat Robot using Arduino
#define m11 12 // rear motor
#define m12 11
#define m21 10 // front motor
#define m22 8
#include <Servo.h>
Servo test; // create servo object to control a servo GUN
Servo myservo2; // create servo object to control a servo TRIG
@MexsonFernandes
MexsonFernandes / floyd.c
Created April 3, 2019 06:49
C implementation of Floyd Warshall Algorithm
#include<stdio.h>
int N, M[10][10];
int min(int a,int b)
{
if(a<b)
return a;
else
return b;
}