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 / CountryCodes.json
Last active December 5, 2024 16:20 — 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 / 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 / openai_whisper.ipynb
Last active October 6, 2023 19:03
openai_whisper_audio_transcription.ipynb
Loading
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-youtube-code.ipynb
Last active June 2, 2023 04:57
openai_whisper-youtube-code.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anubhavshrimal
anubhavshrimal / QuickSortPivotLast.c
Created March 1, 2016 20:18
quick sort an array using pivot as last element
#include <stdio.h>
#include <stdlib.h>
#define max 10001
void quickSort(int a[],int l,int r);
int partition(int a[],int l,int r);
//main function definition
int main()
{
@anubhavshrimal
anubhavshrimal / QuickSortPivotFirst.c
Created March 1, 2016 20:19
quick sort an array using pivot as first element of the array
#include <stdio.h>
#include <stdlib.h>
#define max 10001
void quickSort(int a[],int l,int r,int *count);
int partition(int a[],int l,int r);
//main function definition
int main()
{
@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 / 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++)
{
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])