Skip to content

Instantly share code, notes, and snippets.

@erap129
erap129 / eeg_similarity.py
Last active September 13, 2024 09:57
EEG similarity exercise
from copy import deepcopy
import seaborn as sns
from functools import reduce
from tqdm import tqdm
import pandas as pd
from mne.datasets import eegbci
from argparse import ArgumentParser
import logging
from mne.io import concatenate_raws, read_raw_edf
from mne.channels import make_standard_montage
@erap129
erap129 / vehicles_mini.csv
Created January 6, 2023 08:56
vehicles_mini_dataset
We can't make this file beautiful and searchable because it's too large.
make,model,year,drive,transmission,cylinders,fuelType,miles_per_gallon
Alfa Romeo,Spider Veloce 2000,1985,Rear-Wheel Drive,Manual 5-spd,4,Regular,19
Ferrari,Testarossa,1985,Rear-Wheel Drive,Manual 5-spd,12,Regular,9
Dodge,Charger,1985,Front-Wheel Drive,Manual 5-spd,4,Regular,23
Ford,Focus Electric,2016,Front-Wheel Drive,Automatic (A1),,Electricity,110
Tesla,Model X AWD - 90D,2016,All-Wheel Drive,Automatic (A1),,Electricity,90
Dodge,B150/B250 Wagon 2WD,1985,Rear-Wheel Drive,Automatic 3-spd,8,Regular,10
Subaru,Legacy AWD Turbo,1993,4-Wheel or All-Wheel Drive,Manual 5-spd,4,Premium,17
Chevrolet,Cavalier Convertible,1987,Front-Wheel Drive,Automatic 3-spd,6,Regular,18
BMW,135i Convertible,2010,Rear-Wheel Drive,Manual 6-spd,6,Premium,17
@erap129
erap129 / vehicles_chanining_demonstration.ipynb
Last active January 6, 2023 08:58
Vehicles Chaining Demonstration
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@erap129
erap129 / html_reporter.py
Created November 24, 2022 07:08
HTML Reporter
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import io
import base64
import plotly.express as px
def generate_html_report(report_items):
html_string = '''
@erap129
erap129 / github_action.yml
Last active November 4, 2022 04:31
blog_action
name: Build and deploy Jekyll site to GitHub Pages
on:
push:
branches:
- master # or master before October 2020
schedule:
- cron: "0 0 * * *"
jobs:
@erap129
erap129 / blog.html
Created October 28, 2022 12:28
Jekyll Blog HTML layout
---
layout: page
---
<ul class="posts-list list-unstyled" role="list">
{% for e in site.medium_posts_json %}
<li class="post-preview">
<a href="{{ e.link | absolute_url }}">
<h2 class="post-title">{{ e.title | strip_html }}</h2>
</a>
require 'uri'
require 'net/http'
require 'json'
require 'nokogiri'
module Jekyll
class JekyllDisplayMediumPosts < Generator
safe true
priority :high
def generate(site)
jekyll_coll = Jekyll::Collection.new(site, 'medium_posts_json')
@erap129
erap129 / main.go
Created September 27, 2022 13:10
Snake Part 3 - main.go
package main
import (
"log"
"os"
"github.com/gdamore/tcell"
)
func main() {
@erap129
erap129 / game.go
Created September 27, 2022 13:10
Snake Part 3 - game.go
package main
import (
"math/rand"
"strconv"
"time"
"github.com/gdamore/tcell"
)
@erap129
erap129 / snake.go
Created September 27, 2022 13:08
Snake Part 3 - snake.go
package main
type Part struct {
X int
Y int
}
type SnakeBody struct {
Parts []Part
Xspeed int