Skip to content

Instantly share code, notes, and snippets.

View abhishekc-sharma's full-sized avatar

Abhishek C Sharma abhishekc-sharma

View GitHub Profile
@abhishekc-sharma
abhishekc-sharma / .config
Created September 28, 2023 17:52
kernel config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.6.0-rc3 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120300
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24000
-module(frequency).
-export([start/0, stop/0, allocate/0, deallocate/1, client/1]).
-export([init_supervisor/0, init_server/0]).
%% Server interface
% Start the supervisor and the frequency server
start() ->
register(frequency_supervisor, spawn(frequency, init_supervisor, [])).
@abhishekc-sharma
abhishekc-sharma / frequency.erl
Created April 9, 2017 04:35
Frequency server that handles timeout and calls clear appropriately
%% Based on code from
%% Erlang Programming
%% Francecso Cesarini and Simon Thompson
%% O'Reilly, 2008
%% http://oreilly.com/catalog/9780596518189/
%% http://www.erlangprogramming.org/
%% (c) Francesco Cesarini and Simon Thompson
-module(frequency).
-export([start/0,allocate/0,deallocate/1,stop/0]).
@abhishekc-sharma
abhishekc-sharma / index.erl
Created March 5, 2017 03:58
Functional Programming in Erlang MOOC: Programming Challenge - Indexing a File
-module(index).
-export([make_index/1, show_file_contents/1]).
% Used to read a file into a list of lines.
% Example files available in:
% gettysburg-address.txt (short)
% dickens-christmas.txt (long)
make_index(Name) ->
get_word_index(get_all_annotated_words(get_file_contents(Name))).