Skip to content

Instantly share code, notes, and snippets.

View muhammadmuzzammil1998's full-sized avatar
📚
Focusing on studies

Mohammad Muzammil Khan muhammadmuzzammil1998

📚
Focusing on studies
View GitHub Profile
@muhammadmuzzammil1998
muhammadmuzzammil1998 / groups.js
Last active June 4, 2021 14:52
A simple script used to allocate students to random groups without biasness or discrimination.
const fs = require("fs"),
names = fs.readFileSync("./names.txt").toString().split("\r\n"),
noOfStudents = names.length,
studentsPerGroup = 6,
noOfGroups = Math.ceil(noOfStudents / studentsPerGroup)
let groups = []
for (i = 0; i < noOfGroups; i++) {
groups.push([])
@muhammadmuzzammil1998
muhammadmuzzammil1998 / CarlFriedrichGauss.c
Created September 15, 2017 14:47
Carl Friedrich Gauss's anecdote of how he summed up 1 to 100 in an interesting manner using a for loop.
/*
* I was reading about Carl Friedrich Gauss's anecdote of how he summed up 1 to 100
* in an interesting manner. So, I wanted to make it with a loop (I know, I am a
* lazy guy) and came up with this pretty quickly... so quickly that I thought I did
* it wrong but the output was same as the great mathematician. But I think that
* there is some another and easy way to do this, right?
*/
#include <stdio.h>

Keybase proof

I hereby claim:

  • I am muhammadmuzzammil1998 on github.
  • I am muzzammil1998 (https://keybase.io/muzzammil1998) on keybase.
  • I have a public key whose fingerprint is B637 3440 C6DE D7A9 9E7A F604 7942 F835 2768 82F5

To claim this, I am signing this object: