Skip to content

Instantly share code, notes, and snippets.

View aashish-chaubey's full-sized avatar
💻
Furiously Coding

Aashish Chaubey aashish-chaubey

💻
Furiously Coding
View GitHub Profile
@aashish-chaubey
aashish-chaubey / prime_numbers.py
Created August 6, 2022 07:18
Find all the numbers between 1-50 and print them in a list
import math
l = 50
def is_prime(num: int) -> bool:
lim = math.floor(math.sqrt(num))
for i in range(2, lim+1):
if num % i == 0:
return False
return True
@aashish-chaubey
aashish-chaubey / vowels_name.py
Created August 6, 2022 07:31
Count all the vowels in the name and show count of each of them
from collections import Counter
name = "Aashish Chaubey"
vowels = "aeiou"
vowels_list = list(filter(lambda x: x in vowels, name.lower()))
print(f"Number of vowels in name is: {len(vowels_list)}")
print(dict(Counter(vowels_list)))
@aashish-chaubey
aashish-chaubey / main.go
Last active November 16, 2023 20:06
Creating goroutines within cron job
package main
import (
"fmt"
"http://github.com/robfig/cron/v3"
"sync"
"time"
)
func one() {