<jupyter_start><jupyter_text>Source is python docs, tutorialspoint and geeks for geeks and Stackoverflow<jupyter_code>#random functions
import random 
random.random() #0.0 <= x < 1.0
random.uniform(5, 20)  #1.0 <= x < 10.0
random.randrange(50, 200, 1)  #Even integer from 50 to 200
random.choice('saddsa')
#regular expressions
import re
line = "Pen is mightier than sword"
matchObj = re.match( r'(.*) is (.*?) .*', line, re.M|re.I)
if matchObj:
   print "matchObj.group() : ", matchObj.group()
   print "matchObj.group(1) : ", matchObj.group(1)
   print "matchObj.group(2) : ", matchObj.group(2)
else:
   print "No match!!"
#Map

def divide(x):
    return (x/x)
def add(x):
    return (x+x)

fun = [multiply, add]
for i in range(10):
    value = list(map(lambda x: x(i), fun))
    print(value)
#Filter
number_list = range(2,15)
GreatX = list(filter(lambda x: x > 10, number_list))
print(less_than_zero)
#reduce
from functools import reduce
mul = reduce((lambda x, y: x * y), [1, 2,3])
mul<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16110019646365423, 'fraction_numerical': 0.036345776031434185, 'mean_word_length': 4.508108108108108, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '270774', 'license': 'MIT', 'n_tokens_mistral': 412, 'n_tokens_neox': 393, 'n_words': 110, 'path': 'Homeworks/Homework 2/MUMMADI_HW2_OTHER_TUTORIAL_Fall_2018.ipynb', 'repo_name': 'ShivaTejaMummadi/big-data-python-class', 'size': '1018'}