Skip to content

Instantly share code, notes, and snippets.

View glad1couldkek's full-sized avatar

glad1couldkek

View GitHub Profile
def find_next_prime(n):
prime = [x for x in range(1, n + 1) if n % x == 0]
if len(prime) == 2:
n += 1
while True:
prime = [x for x in range(1, n + 1) if n % x == 0]
if len(prime) > 2:
n += 1
continue
def find_anagrams(words, new_word):
for word in words:
first = [x for x in word]
second = [x for x in new_word]
if len(word) == len(new_word):
for i in first:
for j in second:
if i != j:
break
# couldn't do it.
NUMB = """
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
import time
import os
dirdl = '/home/Anon/Downloads/'
dirp = '/home/Anon/Pictures/'
dirv = '/home/Anon/Videos/'
dird = '/home/Anon/Documents/'
dirm = '/home/Anon/Music/'
dirs = [dirp, dirv, dird, dirdl, dirm]
while True:
time.sleep(10)
#! /usr/bin/python3
import time
import os
dir= '/home/Anon/Pictures/'
dir_pictures = '/home/Anon/Pictures/dir_pictures/'
dir_webm = '/home/Anon/Videos/'
dir_pepe = '/home/Anon/Pictures/dir_pepe/'
dir_pepe_gif = '/home/Anon/Pictures/dir_pepe_gif/'
dir_gif = '/home/Anon/Pictures/dir_pepe_gif/'
#items = os.listdir(dirp)
#! /usr/bin/python3
import time
import os
dir= '/home/Anon/Pictures/'
dir_pictures = '/home/Anon/Pictures/dir_pictures/'
dir_webm = '/home/Anon/Videos/'
dir_pepe = '/home/Anon/Pictures/dir_pepe/'
dir_pepe_gif = '/home/Anon/Pictures/dir_pepe_gif/'
dir_gif = '/home/Anon/Pictures/dir_pepe_gif/'
#items = os.listdir(dirp)