Skip to content

Instantly share code, notes, and snippets.

View anubhavshrimal's full-sized avatar
🎯
Focusing

Anubhav Shrimal anubhavshrimal

🎯
Focusing
View GitHub Profile
@anubhavshrimal
anubhavshrimal / openai_whisper-youtube-code.ipynb
Last active June 2, 2023 04:57
openai_whisper-youtube-code.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anubhavshrimal
anubhavshrimal / openai_whisper.ipynb
Last active October 6, 2023 19:03
openai_whisper_audio_transcription.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
np.random.seed(42)
def stepFunction(t):
if t >= 0:
return 1
return 0
def prediction(X, W, b):
return stepFunction((np.matmul(X,W)+b)[0])
@anubhavshrimal
anubhavshrimal / userspace.c
Last active January 12, 2019 17:40
linux kernel
#include <stdio.h>
#include <linux/kernel.h>
#include <sys/syscall.h>
#include <unistd.h>
int main()
{
long int amma = syscall(548);
printf("System call sys_hello returned %ld\n", amma);
return 0;
}
@anubhavshrimal
anubhavshrimal / hello.c
Created July 11, 2018 17:38
linux kernel hello.c
#include <linux/kernel.h>
asmlinkage long sys_hello(void)
{
printk("Hello world\n");
return 0;
}
@anubhavshrimal
anubhavshrimal / Indian_Cities_In_States_JSON
Created March 31, 2017 09:56
JSON of Indian Cities in each of the 29 Indian States
{
"Andaman and Nicobar Islands": [
"Port Blair"
],
"Haryana": [
"Faridabad",
"Gurgaon",
"Hisar",
"Rohtak",
"Panipat",
@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active May 3, 2024 10:50 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@anubhavshrimal
anubhavshrimal / CountingSort.java
Created March 23, 2016 18:50
performs sorting of an integer array using counting sort algorithm in O(n) time complexity
import java.util.Scanner;
public class CountingSort
{
//method to get the maximum element from the array
private int getMax(int a[],int size)
{
int max=a[0];
for (int i = 1; i < size; i++)
{
@anubhavshrimal
anubhavshrimal / RadixSort.java
Created March 23, 2016 14:57
performs sorting of an array using RadixSort Algorithm in O(n) time complexity
import java.util.Scanner;
public class RadixSort
{
//method returns number of digits in the maximum element of the array
private int getMaxDigits(int a[],int size)
{
int max=a[0];
for(int i=1;i<size;i++) //find the maximum element in the array
{
@anubhavshrimal
anubhavshrimal / .gitignore
Created March 8, 2016 18:57 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #