Skip to content

Instantly share code, notes, and snippets.

View karimlahlou's full-sized avatar

Karim lahlou karimlahlou

View GitHub Profile
@karimlahlou
karimlahlou / prime_number.py
Created May 4, 2020 02:50
Check if the number is a prime and digits ending with 0,2,4,5,6,8 are not primes!
def is_prime(num):
if num <= 1:
return False
if num <= 3 or num < 9 and num % 2 != 0:
return True
# If the last digit contain one of the following
# or if the number is divisible by 2 or 3
@karimlahlou
karimlahlou / wifi.txt
Created May 30, 2018 09:42
Setting up Wifi with the Command Line
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-scan-ssid 1
wpa-ap-scan 1