Skip to content

Instantly share code, notes, and snippets.

View ABD-01's full-sized avatar
💭
Why are we here?

ABD ABD-01

💭
Why are we here?
View GitHub Profile
@ABD-01
ABD-01 / Random_nos_dates.py
Created February 5, 2021 11:44
Created functions to generate list of random nos summing up to given value and between specified range
from math import floor, ceil
from random import randrange, sample, choices
from datetime import datetime, timedelta
def get_random_nos(n,Min,Max):
assert Min<n,f"WTF! How can you divide {n} in {Min} numbers all integers."
assert Max>Min,f"Careful! Your Upper Limit is smaller that Lower Limit"
# assert Min%10!=0,"Lower Limit is Not a multiple of 10"
# assert Max%10!=0,"Upper Limit is Not a multiple of 10"
no_of_terms = floor((floor(n/Min) + ceil(n/Max))/2)
@ABD-01
ABD-01 / index.html
Created January 14, 2021 16:31
UI #3 - Profile Card
<div class="card">
<div class="ds-top"></div>
<div class="avatar-holder">
<img src="https://avatars0.githubusercontent.com/u/63636498?s=460&u=e711a0f4189d9511a2b22b2749d9b09735599dcd&v=4" alt="ABD">
</div>
<div class="name">
<a href="https://github.com/ABD-01" target="_blank">ABD-01</a>
<!-- <h6 title="Followers"><i class="fas fa-users"></i> <span class="followers">18</span></h6> -->
</div>
<div class="button">
@ABD-01
ABD-01 / pollos.c
Created April 24, 2020 12:19
A program, that presents a Counter of a restaurant which take your order, review it, and finally checkout, and Many other features. (the code runs good in Ubuntu). Amazing use of Structures and pointers.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
typedef char *string ;
struct dish
{
string name;
@ABD-01
ABD-01 / reverse.c
Created April 21, 2020 11:31
Write a recursive solution to print reverse of a number.
#include <stdio.h>
#include <math.h>
int reverse(int );
int main()
{
int num;
printf("Enter a num: ");
scanf(" %i",&num);
printf("The reverse of given integer is: %i \n",reverse(num));
@ABD-01
ABD-01 / binary.c
Last active April 21, 2020 11:27
Read an integer from user and out it in binary format. Write a recursive function.
#include <stdio.h>
#include <math.h>
int binary(int );
int main()
{
int num;
printf("Enter a num: ");
scanf(" %i",&num);
printf("The output in Binary is: %i \n",binary(num));