Skip to content

Instantly share code, notes, and snippets.

View mirsahib's full-sized avatar
🎯
Focusing

Mir Habib Ul Latif 🇧🇩 🇵🇸 mirsahib

🎯
Focusing
View GitHub Profile
try:
import Queue as Q
except:
import queue as Q
class node:
def __init__(self,nodeId,cost,predecessor,visited):
self.nodeId = nodeId
self.cost = cost
var Student = new Array();
$(document).ready(function(){
$.ajax({
url: "http://localhost/public_html/Final_project/student_2017.php",
method:"GET",
success:function (data) {
console.log(data);
for(i in data){
Student.push(data[i]);
#include<pthread.h>
#include<stdio.h>
#include<stdlib.h>
pthread_mutex_t x,wsem;
pthread_t tid;
int readcount;
void intialize()
function contrast()
I = imread('AtlasMercury.tiff');
J=I;
[r,c,l] = size(I);
a = 1.5;%transformed value
I = double(I);
for i=1:l
for j =1:r
for k=1:c
t = ceil(((a*I(j,k,i))-127)+127);
function brightness()
I = imread('AtlasMercury.tiff');
J=I;
%increase brightness
[r,c,l] = size(I);
g = 100;%transformed value
for i=1:l
for j =1:r
for k=1:c
if(I(j,k,i)+g<256)
@mirsahib
mirsahib / OS161_set-up.md
Created September 25, 2018 13:20 — forked from gerito1/OS161_set-up.md
A simple guide to have running the os161 kernel in Arch Linux

A simple guide to have running the os161 kernel in Arch Linux

This are some notes for the course OS 161 from ops-class.org (based on the OS 161 course from Harvard).

#Geting started

You will need some tools. A nice Text Editor or a fancy IDE for C, I usually go for gedit, or sometimes vim.

Then you will need to install all the toolchain for the course plus some other tools

@mirsahib
mirsahib / ffmpeg.md
Created May 22, 2018 07:48 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

#include <iostream>
using namespace std;
class node{
private:
int cost;
int predecessor;
bool visited;
#include <iostream>
#include <vector>
using namespace std;
vector<string> count_sort(int b[],int s,vector<string>arr,int pass){
string c[10];
for(int i=1;i<10;i++){
b[i]=b[i-1]+b[i];
}
int faulty_ball(int n){
if(n==8){
return 3;
}else{
return 1+(n-n/2);
}
}