Skip to content

Instantly share code, notes, and snippets.

View NISH1001's full-sized avatar
💭
Staring into the abyss...

Nish NISH1001

💭
Staring into the abyss...
View GitHub Profile
@nadavrot
nadavrot / Matrix.md
Last active April 20, 2025 12:59
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@ashokpant
ashokpant / nepali_stopwords.txt
Last active December 23, 2024 08:05
List of Nepali stopwords
अझै
अधिक
अन्य
अन्यत्र
अन्यथा
अब
अरु
अरुलाई
अर्को
अर्थात
@scapegoat06
scapegoat06 / TopicModelZoo.md
Created February 23, 2018 08:25
Topic Model Zoo
@steven2358
steven2358 / ffmpeg.md
Last active May 5, 2025 07:54
FFmpeg cheat sheet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def conv_forward(X, W):
'''
The forward computation for a convolution function
Arguments:
X -- output activations of the previous layer, numpy array of shape (n_H_prev, n_W_prev) assuming input channels = 1
W -- Weights, numpy array of size (f, f) assuming number of filters = 1
Returns:
H -- conv output, numpy array of size (n_H, n_W)
def conv_backward(dH, cache):
'''
The backward computation for a convolution function
Arguments:
dH -- gradient of the cost with respect to output of the conv layer (H), numpy array of shape (n_H, n_W) assuming channels = 1
cache -- cache of values needed for the conv_backward(), output of conv_forward()
Returns:
dX -- gradient of the cost with respect to input of the conv layer (X), numpy array of shape (n_H_prev, n_W_prev) assuming channels = 1
@abridgland
abridgland / gaussian-processes-1.ipynb
Last active February 19, 2025 00:55
A Jupyter notebook to accompany Intro to Gaussian Processes - Part I at http://bridg.land/posts/gaussian-processes-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Zemnmez
Zemnmez / tweetdeck-limit-override-dm-rt-fix.js
Last active March 13, 2023 15:21
tweetdeck-limit-override.js
/*
This snippet is esssentially the same as being in the Twitter longer tweets test, for tweetdeck.
The Tweet length counter is fixed by tricking TweetDeck into counting up to 140 characters, twice, so you'll see 140
instead of 280 in the counter but going over 140 will give you another set of 140 charactrs.
*/
TD.services.TwitterClient.prototype.makeTwitterCall=function(b,e,f,g,c,d,h){c=c||function(){};d=d||function(){};b=this.request(b,{method:f,params:Object.assign(e,{weighted_character_count:!0}),processor:g,feedType:h});return b.addCallbacks(function(a){c(a.data)},function(a){d(a.req,"",a.msg,a.req.errors)}),b};
twttrTxt=Object.assign({},twttr.txt,{isInvalidTweet:function(){return!1},getTweetLength:function(x){return x=twttr.txt.getTweetLength.apply(this,arguments),x<140||x/140>2?x:x%140}});
@Hironsan
Hironsan / fit_vs_fit_generator.py
Created September 9, 2017 04:03
fit vs fit_generator in Keras
import numpy as np
from keras.preprocessing import sequence
from keras.models import Sequential
from keras.layers import Dense, Embedding
from keras.layers import LSTM
from keras.datasets import imdb
def batch_iter(data, labels, batch_size, shuffle=True):
num_batches_per_epoch = int((len(data) - 1) / batch_size) + 1