Skip to content

Instantly share code, notes, and snippets.

View adharshkamath's full-sized avatar

Adharsh Kamath adharshkamath

View GitHub Profile
TODO: add steps
@adharshkamath
adharshkamath / private_fork.md
Created February 21, 2025 00:14 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@adharshkamath
adharshkamath / check_service.sh
Last active May 16, 2021 16:05
A script to check if a URL is working or not
#!/bin/bash
# make the file executable
# run the script as ./check_service.sh <URL> <any text here>
# make sure curl is installed
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" $1)
CODE_TYPE=${HTTP_CODE:0:1}
if [[ $CODE_TYPE == "4" || $CODE_TYPE == "5" || $CODE_TYPE == "0" ]]
function [ codeword ] = huffman_encode( p )
n=length(p);
codeword=cell(1,n);
X=zeros(n,n);
temp=p;
%%
%Building the relationship matrix X.This matrix has all elements zero
%except for few entries which are substituted with 10 or 11.Number 10 denotes this
%entry is the minimum in the column and 11 indicates this is the second
clear global;
close all;
digits(7);
%%%%%%%%%%%%%%%%%%%%%%% Encode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
inputString = input('Enter the string to be compressed:', 's');
inputLength = strlength(inputString);
symbols = [];
probability = [];
i = 1;