Skip to content

Instantly share code, notes, and snippets.

Working from home

Md Mahedi Hasan Mahedi-61

Working from home
View GitHub Profile
Mahedi-61 / even_palindrome.c
Last active Apr 8, 2018
codeforces problem solution in c
View even_palindrome.c
// my solution to problem
int main(){
int num_digit = 0, remainder = 0;
long int num_palindrome, count = 0, n = 0;
long long int palindrome = 0, mod = 0, rev_num = 0, arr_sum = 0;
num_digit = 0
num_palindrome = 0
count = 0
n = 0
palindrome = 0
mod = 0
arr_sum = 0
s = input()
num_palindrome, mod = map(int, s.split())
Mahedi-61 /
Last active Apr 8, 2018
this file contains linux command for fun. so let's install and enjoy :-)
### command: sl (Steam Locomotive) :-) :-)
sudo apt-get install sl
# This command works even when you type ‘LS‘ and not ‘ls‘.
#### CMatrix is a simple program that shows the cool matrix scrolling lines in the terminal.
sudo apt-get install cmatrix
# for running cmatrix type
Mahedi-61 /
Last active Jul 4, 2018
this gist contains necessary steps for installing research work tools like LaTeX, R and other useful library.
### install latex for writing research paper
sudo apt-get update
sudo apt-get install texlive
# for extra (language) packages type following command instead of above
sudo apt-get install texlive-full
# Other useful packages (** optional)
# don't install if you have one or less space in disk
sudo apt-get install ibus
View decimal_to_binary.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// function for concatenation
char* concat(const char *s1, const char *s2)
char *result = malloc(strlen(s1) + strlen(s2) + 1); // +1 for the null-terminator
strcpy(result, s1);
Mahedi-61 /
Last active Jul 17, 2018
installation and basic commands of ImageMagick
## This gist contains instructions about complete installation about ImageMagick,
# a powerful open-source command line image editor tool
### installation ###
sudo apt-get install build-essential checkinstall && sudo apt-get build-dep imagemagick -y
# get latest version of the imagemagic tar.gz file
Mahedi-61 /
Last active Jul 17, 2018
useful unix command for beginners to work in remote server
# This gist contains unix command useful for beginners who started working in remote server for their project.
# machine: Ubuntu 16.04
### Connection
# connecting to a remote system using SSH (Secure Shell)
ssh <remote_host>
# for different username on the remote system
ssh <user_name@remote_host>
Mahedi-61 / random_bit_generator.c
Created Aug 10, 2018
c code for random bit generator
View random_bit_generator.c
#include <stdio.h>
#include <stdint.h>
#include <string.h>
//#include <stdlib.h>
int main(int argc, char* argv[])
uint32_t lfsr = 0xACE1ACE1u;
unsigned period = 0;
Mahedi-61 /
Last active Aug 21, 2018
unix script for preprocessing and preparing Gene Ontology Consortium dataset (go annotations)
# This gist preprocess goa dataset of over 543M samples (~94 GB) to around 170M samples with selected column (~6 GB) for research
# removing first 8 lines
sed -i '1,8d' goa_uniprot_all.gaf
# putting NA to missing values
sed -i "s/\t\t/\tNA\t/g" goa_uniprot_all.gaf
# making string to one single world
sed -i 's/ /-/g' goa_uniprot_all.gaf
Mahedi-61 /
Created Sep 2, 2018
this gist contains python code for blening icon images into source image
@Author: Md Mahedi Hasan
# python modules
import re, random
import os, glob
from skimage import io, util
from scipy import ndarray, ndimage
from PIL import Image
import PIL