Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jax | |
import jax.numpy as jnp | |
jax.config.update("jax_default_device", jax.devices("cpu")[0]) | |
#runs on cpu | |
long_vector = jnp.arange(int(1e7)) | |
%timeit jnp.dot(long_vector, long_vector).block_until_ready() | |
jax.config.update("jax_default_device", jax.devices("gpu")[2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wandb | |
wandb.init(id="31cnstm6", project="test", resume="must") | |
wandb.log({"this was added later": 1241241}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in "$@" | |
do | |
/usr/local/bin/pngquant 32 --skip-if-larger --strip --ext=.png --force "$f" | |
/usr/local/bin/zopflipng -y "$f" "$f" | |
/Users/ramith/Documents/ss/impbcopy "$f" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
do shell script "open /Users/ramith/Documents/SEM4_TRONIC_ACA" | |
return input | |
end run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num=[0.9955 -1.8936 0.9955]; | |
den=[1 -1.8936 0.9911]; | |
zplane(num,den) | |
grid on; | |
%freqz(num,den,100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
close all; | |
clear all; | |
load('noisy_ECG_sig.mat') | |
y=noisy_ECG_sig; %the signal loaded | |
L=length(y) | |
sampling_freq = 1000 | |
figure; % plot the original signal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
arr=[] | |
#this is for prime | |
def isprime(k): | |
if(k==1 or k==0): | |
return 0 | |
for i in range(2,int(k**(0.5))+1): | |
if(k%i==0): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### The implementation of binary search that is tested. | |
# Return the index of an element in a sorted list. (or -1, if not present)### | |
index = (list, target) -> | |
[low, high] = [0, list.length] | |
while low < high | |
mid = (low + high) >> 1 | |
val = list[mid] | |
return mid if val is target | |
if val < target then low = mid + 1 else high = mid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.leapmotion.leap.*; //leap motion library | |
import processing.serial.*; //serial communication library | |
Controller leap; //define a controller | |
Serial port; //define a port | |
void setup(){ | |
size(250,250); //sketch size | |
leap = new Controller(); // initialize the controller | |
port = new Serial(this, Serial.list()[2], 115200);//initialize the port in my case its [2] |
NewerOlder