Skip to content

Instantly share code, notes, and snippets.

@rakaar
rakaar / hh.m
Last active May 11, 2022 05:28
Simulation of Hogkin-Huxley Neuron, Anode Break Potential
close all;
clear all;
% feed positive current and check plots of v,m,h,n
[t , r] = ode15s(@hh,[0 10],[-60 0.052932 0.596121 0.317677]);
figure
subplot(2,1,1)
plot(t,r(:,1));
title('hogkin huxley')
@rakaar
rakaar / abcflow.m
Created November 1, 2021 05:25
ABC flow 2 D
function abc
[x,y] = meshgrid(linspace(0,100), linspace(0,100));
dx_dt = cos(x);
dy_dt = 1 + sin(x);
figure(1)
quiver(x,y, dx_dt, dy_dt, 1, 'color',[0 0 0]);
grid
figure(2)
# Credits - Mukul
import os
import csv
import time
from selenium import webdriver
baseURL = "SOME URL"
driver = webdriver.Chrome()
@rakaar
rakaar / plot_a_smmoth_curve_joining_pts.py
Created May 14, 2020 18:22
Plot a smooth curve joining the points
import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import interp1d
from matplotlib.patches import Ellipse
x = np.array([0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8])
y = np.array([8,7.2,6,5.5,5,5.2,7.2,9,11.2,12])
x1 = np.array([0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.1])
y1 = np.array([9.5,9.2,9,7.5,4,2,0,2,4.2,5,7,9,10,12])
@rakaar
rakaar / random_search_on_list_of_dicts.py
Created April 19, 2020 11:51
Python code to get results on fuzzy search through an list of dictionaries
# We are going to search through this list of dictionaries
list_of_dicts = [
{
"name": "Usual Suspects",
"imdb": '7.0',
"category": "Thriller"
},
{
"name": "Hitman",
"imdb": '6.3',