Skip to content

Instantly share code, notes, and snippets.

Mohamed Akram mohd-akram

Block or report user

Report or block mohd-akram

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mohd-akram / schotter.c
Created Sep 13, 2018
Standalone version of LOLWUT from Redis 5.
View schotter.c
* Copyright (c) 2018, Salvatore Sanfilippo <antirez at gmail dot com>
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
mohd-akram / matrix.c
Created Jan 27, 2014
Matrix digital rain in C.
View matrix.c
#include <stdlib.h>
#include <time.h>
#include <windows.h>
#define WIDTH 80
#define HEIGHT 40
#define idx(x, y) ((x)+WIDTH*(y))
mohd-akram /
Created Jan 3, 2013
An intuitive method to sort results in a few lines (Python)
"""This module sorts a list of results based on a query.
If there is an intersection between words in the query and a result, it
is placed near the beginning of the list (based on length of intersection).
If there is no intersection, the position of the query (substring) in the
result (string) is used for sorting. These results are placed toward the end
of the list.
mohd-akram /
Last active Aug 5, 2019
A command line version of Minesweeper in Python
"""A command line version of Minesweeper"""
import random
import re
import time
from string import ascii_lowercase
def setupgrid(gridsize, start, numberofmines):
emptygrid = [['0' for i in range(gridsize)] for i in range(gridsize)]
You can’t perform that action at this time.