From 3963691b1a5c7c1b2b51d51b59c372a796feb422 Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Sat, 12 Feb 2022 01:39:54 +0530 Subject: [PATCH] Made python library --- __pycache__/module.cpython-37.pyc | Bin 3138 -> 0 bytes easyPy/__init__.py | 1 + easyPy/__pycache__/easyPy.cpython-37.pyc | Bin 0 -> 6809 bytes module.py => easyPy/easyPy.py | 602 +++++++++++------------ setup.py | 27 + 5 files changed, 329 insertions(+), 301 deletions(-) delete mode 100644 __pycache__/module.cpython-37.pyc create mode 100644 easyPy/__init__.py create mode 100644 easyPy/__pycache__/easyPy.cpython-37.pyc rename module.py => easyPy/easyPy.py (97%) create mode 100644 setup.py diff --git a/__pycache__/module.cpython-37.pyc b/__pycache__/module.cpython-37.pyc deleted file mode 100644 index 553e12a6bdb7446a2ab6ea7ad113771805bf13cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3138 zcma)8-EI>{6rR~x$ByIt67mCSyP}c66llU#grbT-KtPc}jasD0ZCE^;WD|SWnOTF4 z*1f3Pi#|Z#fSbNRFZ&E!Z!fD}qoZDrI0qLC3A8FRLHz6fZB3Y7D01zOqM`L%^?jQb|b3g`ODIbS*wNneFH++E0##A4w-)M#^a;{!Z z?K;ZY3qu?$1RbClSUpR>f8aKo9jB?nJ>@nUI7p4+N`olPyO_FwC1x?7XYe_%{L0E! z!rKY&D0rWl{t?Jj>Q@Z;2UggO*PpVG>Z&Ud%z3Qf?52LVIJy)pK>{ zX{VY(xY6t+!j+P&Xk(wN9QgO2Wg$I_F?*I3L_1ov-V7NscH|tx8ztG1Gup z<~ch6g^{9Y4lo5q@-B}#l8?>ehxD^5dp~bH|Lg6g(cAslCtM}g(}!p5Bx4)Ob9ZXK zs@1)VWRI*fZgWL?hb(4^KCmdQ7|_TjEQ%A0$0p4PEK-gluO?|BLAsEQWa_D>{Dv2K zs&D=iNKeeq;3+ddV?55(OazbjIA_5MBm%zwIQ6}>!C#ePi$!pY6ch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3_v3%a72E1!(+j{c#Ojm6~a)n9*Y!8<~YxR-9)aV%(gh_ z&vJ~9Qp)vlb@3VLHXUTvZWUKCf5DCelgsE+LcNLk|4-ZWQ)yG*1XA?|HJo|K-9L{c z+~NEcuZKx`3-g4eNlcQ!{C!x>sJQx6ao{2W36f3_+5=QKeFG!GBNH_qARNZuq$3#4 z6jq4ZN9q?5_y}^5j%LV9sF3h>L;qN)50Ru(IP6(5j4P@O{WPGN?(sd)Qa>AJ9;Fb- zvcQlYr0pNUBT|57IEi=3KR{y&H0FR~to!yJ95?$Gp!x3EJ$onV zm{OjM(y<{fE)NE=*$xFSx=)GpAQ;qT9X|A`ZveWix7*7)jD8Ulz7Jg1x3-o|zthAa zuJ(EMg`2#8;sc*5Fuvb_L()G!6=zW0n1iQ;<5msPJC&dl!oEnrH* z5V^8}hu!%)1_S$qMaJ$NpGMdg>9BWZ>r?CY?GvF*> zj#wHviwUR&XE9;ae5{Azm2fDqU|Mhva<_rAT!(=ffW}7=I&_if=m?Px(?juZ)XEgg zA*l+v>@8#etLpTr2r)&v$1@QiOfSZ1x(8dJk_ZNE&?L zn~l=ds`P5rDqnCblAWTnnj%Rmx{BrNP`;s56x8^7jjx`RO;bAJs|9LaqK3{ATy?9< zG`dO+l?R-+ITLbP;rOj6Vk$CARw7e2#2%+wvePJYF)nm25qbVAXiz5_$=}S-KcC6s Znavb3h1{V`2IE2|ho0Ir{wFep{{r-|>-+!! literal 0 HcmV?d00001 diff --git a/module.py b/easyPy/easyPy.py similarity index 97% rename from module.py rename to easyPy/easyPy.py index f4ccad9..98a64ce 100644 --- a/module.py +++ b/easyPy/easyPy.py @@ -1,301 +1,301 @@ -""" A python module that helps you to calculate some of the most used calculations..... - usage-- - Just download the file from git and unzip in ur system. - And while using this module, just write as code- - 'from module import *' and u r good to go... - ~Happy programming""" - -def add(x, y): # For addition of 2 numbers - return x+y - -def sub(x, y): # For substraction of 2 numbers - return x-y - -def multi(x, y): # For multiplication of 2 numbers - return x*y - -def div(x, y): # For division of 2 numbers - return x/y - -def mod(x, y): # For finding the modulus of 2 numbers - return x%y - -def factorial(n): # To find the factorial of 2 numbers - # single line to find factorial - return 1 if (n == 1 or n == 0) else n * factorial(n - 1) - -def Area_circle(r): # To find the area of a circle using the radius r - PI = 3.142 - return PI * (r * r) - -def Perimeter_circle(r): # To find the perimeter of a circle using the radius r - PI = 3.142 - return 2 * PI * r - -def fibonacci(n): #To find the nth fibonacci series - if n<0: - print("Incorrect input") - # First Fibonacci number is 0 - elif n==1: - return 0 - # Second Fibonacci number is 1 - elif n==2: - return 1 - else: - return fibonacci(n-1)+fibonacci(n-2) - -def sort(list): # To bubble sort and array or list - for i in range(len(list) - 1, 0, -1): - for j in range(i): - if list[j] > list[j + 1]: - temp = list[j] - list[j] = list[j + 1] - list[j + 1] = temp - -#method to print the 1st prime number between the range -def printprime(start,end): - if start<=0: - start=1 - for i in range(start,end+1): - j=0 - for k in range(2,i): - if i%k==0: - j=1 - if j==0: - return i - -#A method to convert Hexadecimal input to binary numbers -def hex2bin(x): - x=str(x) - r='' - for i in x: - if i=='A': - r=r+'1010' - elif i=='B': - r=r+'1011' - elif i=='C': - r=r+'1100' - elif i=='D': - r=r+'1101' - elif i=='E': - r=r+'1110' - elif i=='F': - r=r+'1111' - else: - h=bin(int(i)) - n=h[2:] - for j in range(4): - if len(n)<4: - n='0'+n - - r=r+n - return r - - -#A method to convert Octal input to binary numbers -def oct2bin(x): - r='' - x=str(x) - for i in x: - h=bin(int(i)) - n=h[2:] - for i in range(3): - if len(n)<3: - n='0'+n - r=r+n - return r - -#A method to convert binary input to decimal numbers -def bin2dec(x): - x=list(str(x)) - l=len(x) - a=0 - r=0 - for i in range(l-1,-1,-1): - - r=r+(int(x[i])*(2**a)) - - a=a+1 - return r - - -def createarray(length,dtype='int'): # To create an array of entered length and entered data type(interger data type is a default data type) - import numpy as np - a=[] #empty list - for i in range(length): - # if entered dtype is an interger - if dtype=='int': - e=int(input(f"Enter {i+1} element : ")) - a.append(e) - # if entered dtype is a string - elif dtype=='str' or dtype=='string': - e=str(input("Enter {i+1} element : ")) - a.append(e) - # if entered dtype is a float - elif dtype=='float': - e=float(input("Enter {i+1} element : ")) - a.append(e) - - - b=np.array(a) - return b - -def arrayrev(array): # To reverese the array elements - import numpy as np - r=[] - for i in range(len(array)-1,-1,-1): - r.append(array[i]) - a=np.array(r) - return a - -def ispalindrome(x): # To check if the given parameter is palindrome or not - x=str(x) #explicitly convert into string data type so as to iterate through each character - r='' - for i in range(len(x)-1,-1,-1): - r=r+x[i] - if x==r: # if the parameter get matched with its reverse then returns true othewise false - return True - else: - return False - - - -def even_or_odd(data): - try : - if data%2==0: - return 'even' - else: - return 'odd' - - except: - print("\nError occured, parameter passed should be purely numeric") - - -#Linked list - -def create_node(data): - class node: - def __init__(self,data): - self.data=data - self.next=None - - a=node(data) - return a -# to link a node with another node - -def node_link(a,b): - a.next=b - b.next=None - #a=node(data1) - - -# to count number of nodes - -def count_node(head): - if head is None: - return 0 - else: - temp=head - count=0 - while(temp!=None): - count=count+1 - temp=temp.next - return count - -# to diplay a linked list whose header node is passed as an argument - -def display_nodes(head): - t=head - while t is not None: - print(t.data,"->",end="") - t=t.next - print("NULL") - - -# Matrix problems - -def matrix_add(array1,array2): - import numpy as np - - result=np.array(array1)+np.array(array2) - return result - - -def matrix_sub(array1,array2): - import numpy as np - - result=np.array(array1)-np.array(array2) - return result - - # Multiplication of two -def matrix_mul(matrix1,matrix2): - import numpy as np - matrix1=np.array(matrix1) # converting list into array - matrix2=np.array(matrix2) - a=list(matrix1.shape) # getting the shape of the array - b=list(matrix2.shape) - if len(a)==1: - k=a[0] # suppose if row is one , for eg [1,2,3] ,then shape returns (3,) instead of [1,3].. - a[1]=k - a[0]=1 # here first element becomes last element and in place of first element , 1 is appended.. - if a[1]==b[0]: # from matrix multiplication convention, number of columns of first matrix needs to be equal to number of rows of second matrix - tt=[] - for i in range(b[0]): - u=[] - for j in range(b[0]): - u.append(matrix2[j][i]) - tt.append(u) - t=np.array(tt) # arrays of coloumn of second matrix - pp=[] - - for k in range(b[0]): - ar=[] - for l in range(b[0]): - y=matrix1[k]*t[l] # multiplication of rows and columns - ar.append(list(y)) # appending the result into a list - pp.append(ar) - l=[] - for i in pp: - zz=[] - for j in i: - sum1=0 - for c in j: - sum1=sum1+c # sum all the element of each row each column - zz.append(sum1) - l.append(zz) # appending the sum of each row and column of result matrix into a list - l=np.array(l) # convert the list of result matrix into array - return l - - - -def matrix_shape(matrix1): - import numpy as np - matrix1=np.array(matrix1) - a=list(matrix1.shape) - if len(a)==1: - k=a[0] - a[1]=k - a[0]=1 - return a #returns shape of a matrix - - - - -def matrix_transpose(matrix1): - import numpy as np - matrix1=np.array(matrix1) # converting list into array - a=list(matrix1.shape) # getting the shape of the array - tt=[] - for i in range(a[0]): - u=[] - for j in range(len(a)): - u.append(matrix1[j][i]) - tt.append(u) - t=np.array(tt) # get a transpose of matrix1 - return t - - - - - - +""" A python module that helps you to calculate some of the most used calculations..... + usage-- + Just download the file from git and unzip in ur system. + And while using this module, just write as code- + 'from module import *' and u r good to go... + ~Happy programming""" + +def add(x, y): # For addition of 2 numbers + return x+y + +def sub(x, y): # For substraction of 2 numbers + return x-y + +def multi(x, y): # For multiplication of 2 numbers + return x*y + +def div(x, y): # For division of 2 numbers + return x/y + +def mod(x, y): # For finding the modulus of 2 numbers + return x%y + +def factorial(n): # To find the factorial of 2 numbers + # single line to find factorial + return 1 if (n == 1 or n == 0) else n * factorial(n - 1) + +def Area_circle(r): # To find the area of a circle using the radius r + PI = 3.142 + return PI * (r * r) + +def Perimeter_circle(r): # To find the perimeter of a circle using the radius r + PI = 3.142 + return 2 * PI * r + +def fibonacci(n): #To find the nth fibonacci series + if n<0: + print("Incorrect input") + # First Fibonacci number is 0 + elif n==1: + return 0 + # Second Fibonacci number is 1 + elif n==2: + return 1 + else: + return fibonacci(n-1)+fibonacci(n-2) + +def sort(list): # To bubble sort and array or list + for i in range(len(list) - 1, 0, -1): + for j in range(i): + if list[j] > list[j + 1]: + temp = list[j] + list[j] = list[j + 1] + list[j + 1] = temp + +#method to print the 1st prime number between the range +def printprime(start,end): + if start<=0: + start=1 + for i in range(start,end+1): + j=0 + for k in range(2,i): + if i%k==0: + j=1 + if j==0: + return i + +#A method to convert Hexadecimal input to binary numbers +def hex2bin(x): + x=str(x) + r='' + for i in x: + if i=='A': + r=r+'1010' + elif i=='B': + r=r+'1011' + elif i=='C': + r=r+'1100' + elif i=='D': + r=r+'1101' + elif i=='E': + r=r+'1110' + elif i=='F': + r=r+'1111' + else: + h=bin(int(i)) + n=h[2:] + for j in range(4): + if len(n)<4: + n='0'+n + + r=r+n + return r + + +#A method to convert Octal input to binary numbers +def oct2bin(x): + r='' + x=str(x) + for i in x: + h=bin(int(i)) + n=h[2:] + for i in range(3): + if len(n)<3: + n='0'+n + r=r+n + return r + +#A method to convert binary input to decimal numbers +def bin2dec(x): + x=list(str(x)) + l=len(x) + a=0 + r=0 + for i in range(l-1,-1,-1): + + r=r+(int(x[i])*(2**a)) + + a=a+1 + return r + + +def createarray(length,dtype='int'): # To create an array of entered length and entered data type(interger data type is a default data type) + import numpy as np + a=[] #empty list + for i in range(length): + # if entered dtype is an interger + if dtype=='int': + e=int(input(f"Enter {i+1} element : ")) + a.append(e) + # if entered dtype is a string + elif dtype=='str' or dtype=='string': + e=str(input("Enter {i+1} element : ")) + a.append(e) + # if entered dtype is a float + elif dtype=='float': + e=float(input("Enter {i+1} element : ")) + a.append(e) + + + b=np.array(a) + return b + +def arrayrev(array): # To reverese the array elements + import numpy as np + r=[] + for i in range(len(array)-1,-1,-1): + r.append(array[i]) + a=np.array(r) + return a + +def ispalindrome(x): # To check if the given parameter is palindrome or not + x=str(x) #explicitly convert into string data type so as to iterate through each character + r='' + for i in range(len(x)-1,-1,-1): + r=r+x[i] + if x==r: # if the parameter get matched with its reverse then returns true othewise false + return True + else: + return False + + + +def even_or_odd(data): + try : + if data%2==0: + return 'even' + else: + return 'odd' + + except: + print("\nError occured, parameter passed should be purely numeric") + + +#Linked list + +def create_node(data): + class node: + def __init__(self,data): + self.data=data + self.next=None + + a=node(data) + return a +# to link a node with another node + +def node_link(a,b): + a.next=b + b.next=None + #a=node(data1) + + +# to count number of nodes + +def count_node(head): + if head is None: + return 0 + else: + temp=head + count=0 + while(temp!=None): + count=count+1 + temp=temp.next + return count + +# to diplay a linked list whose header node is passed as an argument + +def display_nodes(head): + t=head + while t is not None: + print(t.data,"->",end="") + t=t.next + print("NULL") + + +# Matrix problems + +def matrix_add(array1,array2): + import numpy as np + + result=np.array(array1)+np.array(array2) + return result + + +def matrix_sub(array1,array2): + import numpy as np + + result=np.array(array1)-np.array(array2) + return result + + # Multiplication of two +def matrix_mul(matrix1,matrix2): + import numpy as np + matrix1=np.array(matrix1) # converting list into array + matrix2=np.array(matrix2) + a=list(matrix1.shape) # getting the shape of the array + b=list(matrix2.shape) + if len(a)==1: + k=a[0] # suppose if row is one , for eg [1,2,3] ,then shape returns (3,) instead of [1,3].. + a[1]=k + a[0]=1 # here first element becomes last element and in place of first element , 1 is appended.. + if a[1]==b[0]: # from matrix multiplication convention, number of columns of first matrix needs to be equal to number of rows of second matrix + tt=[] + for i in range(b[0]): + u=[] + for j in range(b[0]): + u.append(matrix2[j][i]) + tt.append(u) + t=np.array(tt) # arrays of coloumn of second matrix + pp=[] + + for k in range(b[0]): + ar=[] + for l in range(b[0]): + y=matrix1[k]*t[l] # multiplication of rows and columns + ar.append(list(y)) # appending the result into a list + pp.append(ar) + l=[] + for i in pp: + zz=[] + for j in i: + sum1=0 + for c in j: + sum1=sum1+c # sum all the element of each row each column + zz.append(sum1) + l.append(zz) # appending the sum of each row and column of result matrix into a list + l=np.array(l) # convert the list of result matrix into array + return l + + + +def matrix_shape(matrix1): + import numpy as np + matrix1=np.array(matrix1) + a=list(matrix1.shape) + if len(a)==1: + k=a[0] + a[1]=k + a[0]=1 + return a #returns shape of a matrix + + + + +def matrix_transpose(matrix1): + import numpy as np + matrix1=np.array(matrix1) # converting list into array + a=list(matrix1.shape) # getting the shape of the array + tt=[] + for i in range(a[0]): + u=[] + for j in range(len(a)): + u.append(matrix1[j][i]) + tt.append(u) + t=np.array(tt) # get a transpose of matrix1 + return t + + + + + + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d34cf87 --- /dev/null +++ b/setup.py @@ -0,0 +1,27 @@ +from setuptools import setup, find_packages +import codecs +import os + +VERSION = '0.0.1' +DESCRIPTION = 'A simple library for Python beginners' + +# Setting up +setup( + name="easyPy", + version=VERSION, + author="extinctsion (Aditya Sharma)", + author_email="", + description=DESCRIPTION, + long_description_content_type="text/markdown", + packages=find_packages(), + install_requires=[], + keywords=['python', 'sorting', 'beginners', 'sockets'], + classifiers=[ + "Development Status :: 1 - Planning", + "Intended Audience :: Beginners", + "Programming Language :: Python :: 3", + "Operating System :: Unix", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + ] +) \ No newline at end of file