diff --git a/Chandresh singh/Data Science/Talend/Aggregate.png b/Chandresh singh/Data Science/Talend/Aggregate.png new file mode 100644 index 0000000..9ca0f13 Binary files /dev/null and b/Chandresh singh/Data Science/Talend/Aggregate.png differ diff --git a/Chandresh singh/Data Science/Talend/CSV TO XML.png b/Chandresh singh/Data Science/Talend/CSV TO XML.png new file mode 100644 index 0000000..1b536b3 Binary files /dev/null and b/Chandresh singh/Data Science/Talend/CSV TO XML.png differ diff --git a/Chandresh singh/Data Science/Talend/Filtering.png b/Chandresh singh/Data Science/Talend/Filtering.png new file mode 100644 index 0000000..b47409d Binary files /dev/null and b/Chandresh singh/Data Science/Talend/Filtering.png differ diff --git a/Chandresh singh/Data Science/Talend/Replace.png b/Chandresh singh/Data Science/Talend/Replace.png new file mode 100644 index 0000000..5556acb Binary files /dev/null and b/Chandresh singh/Data Science/Talend/Replace.png differ diff --git a/Chandresh singh/Data Science/Talend/csv data.png b/Chandresh singh/Data Science/Talend/csv data.png new file mode 100644 index 0000000..a607f73 Binary files /dev/null and b/Chandresh singh/Data Science/Talend/csv data.png differ diff --git a/Chandresh singh/Data Science/Talend/first csv.png b/Chandresh singh/Data Science/Talend/first csv.png new file mode 100644 index 0000000..ced9994 Binary files /dev/null and b/Chandresh singh/Data Science/Talend/first csv.png differ diff --git a/Chandresh singh/Linux/6 April.txt b/Chandresh singh/Linux/6 April.txt new file mode 100644 index 0000000..f436b32 --- /dev/null +++ b/Chandresh singh/Linux/6 April.txt @@ -0,0 +1,3 @@ +Diffrence between adduser and useradd +adduser command - adduser command creates user as well as set up the user's directory in home folder with account's other default settings. +useradd command - useradd olny creates the user & doesnot creates user's directory automatically if not specified with -m. \ No newline at end of file diff --git a/Chandresh singh/Linux/7 April.txt b/Chandresh singh/Linux/7 April.txt new file mode 100644 index 0000000..469a916 --- /dev/null +++ b/Chandresh singh/Linux/7 April.txt @@ -0,0 +1,25 @@ +1) To change umask value permanently +Go to /etc/profile file then change default umask value then save & exit. +Now your umask value has been changed permanently you can check it on terminal. +(vi /etc/profile. edit umask value in it. save & exit.) + +2) Add new user without using adduser & useradd command +Step 1 : add an entry for user in /etc/passwd + file\username:password:UID:GID:Comments:Home_Directory:Login Shell + # vi /etc/passwd + user:x:501:501:test user:/home/user:/bin/bash +Step 2 : add an entry for group in /etc/group file +Step 3 : create home directory for added user with mkdir command +Step 4 : set new user password using passwd command + +3)Can we change the umask value to 0888 ? +Maximum umask is 0666. + +4)To add new user with unique user id & check it +useradd [OPTIONS] USERNAME +to check uid : id -u abc + +5)Change group of any folder +chgrp [OPTIONS] GROUP FILE.. +GROUP, name of the new group or the group ID (GID). Numeric GID must be prefixed with the + symbol. +FILE.., name of one or more files. \ No newline at end of file diff --git a/Chandresh singh/Linux/8 April.txt b/Chandresh singh/Linux/8 April.txt new file mode 100644 index 0000000..1d66144 --- /dev/null +++ b/Chandresh singh/Linux/8 April.txt @@ -0,0 +1,11 @@ +1)Create new user also add it into the group that you already have +useradd -g grpname usrname + +2)To unzip bzip2 file +bzip2 -d filename.bz2 + +3)Archieve & compress bz2 file with some files with data & a folder +tar -czvf xyz.tar.bz2 /home/ubuntu/d1/ /home/ubuntu/file1.txt /home/ubuntu/file2.txt + +4)Add a user & at the same time change its shell to /bin/sh +useradd -s /bin/sh usrname \ No newline at end of file diff --git a/Chandresh singh/Python/python 1.txt b/Chandresh singh/Python/python 1.txt new file mode 100644 index 0000000..0f10c1a --- /dev/null +++ b/Chandresh singh/Python/python 1.txt @@ -0,0 +1,27 @@ +1) What is jpython & cpython ? +The default implementation of the Python programming language is Cpython. +As the name suggests Cpython is written in C language. +Cpython compiles the python source code into intermediate bytecode, which is executed by the Cpython virtual machine. +CPython is distributed with a large standard library written in a mixture of C and Python. CPython provides the highest level of compatibility with Python packages and C extension modules. +All versions of the Python language are implemented in C because CPython is the reference implementation. +Jython is an implementation of the Python programming language that can run on the Java platform. +Jython programs use Java classes instead of Python modules. +Jython compiles into Java byte code, which can then be run by Java virtual machine. +Jython enables the use of Java class library functions from the Python program +Jython is slow as compared to Cpython and lacks compatibility with CPython libraries. + + +2) Difference between python2 & python3 +Python 3 syntax is simpler and easily understandable whereas Python 2 syntax is comparatively difficult to understand. +Python 3 default storing of strings is Unicode whereas Python 2 stores need to define Unicode string value with "u." +Python 3 value of variables never changes whereas in Python 2 value of the global variable will be changed while using it inside for-loop. +Python 3 exceptions should be enclosed in parenthesis while Python 2 exceptions should be enclosed in notations. +Python 3 rules of ordering comparisons are simplified whereas Python 2 rules of ordering comparison are complex. +Python 3 offers Range() function to perform iterations whereas, In Python 2, the xrange() is used for iterations. + +3) Diffrence between ASCII & Unicode +ASCII defines 128 characters, which map to the numbers 0–127. Unicode defines (less than) 221 characters, which, similarly, map to numbers 0–221 (though not all numbers are currently assigned, and some are reserved). + +Unicode is a superset of ASCII, and the numbers 0–127 have the same meaning in ASCII as they have in Unicode. For example, the number 65 means "Latin capital 'A'". + +Because Unicode characters don't generally fit into one 8-bit byte, there are numerous ways of storing Unicode characters in byte sequences, such as UTF-32 and UTF-8. \ No newline at end of file diff --git a/Chandresh singh/Python/python 2.txt b/Chandresh singh/Python/python 2.txt new file mode 100644 index 0000000..848a32d --- /dev/null +++ b/Chandresh singh/Python/python 2.txt @@ -0,0 +1,21 @@ +4054 + +string="hello this side regex" +count=0 +for i in string + for j in ['a','e','i','o','u'] + count++; +print count + + +h=int(input("Enter the height of the triangle")) +b=int(input("Enter the base of the triangle")) +print("the area of the triangle is: ") +area=(1/2)*h*b +print(area) + +import calendar +print("Which Year ") +y = int(input()) +print("Calendar of year "+y+" is ") +print(calendar.calendar(y)) \ No newline at end of file diff --git a/Chandresh singh/Python/python 3.txt b/Chandresh singh/Python/python 3.txt new file mode 100644 index 0000000..042bb0c --- /dev/null +++ b/Chandresh singh/Python/python 3.txt @@ -0,0 +1,29 @@ +Ques 1- + +Take input from user and find the armstrong number in the range? +What is Armstrong number : 153 -> 1*1*1 + 5*5*5 + 3*3*3 + +n1 = int(input("Enter the first number")) +n2 = int(input("Enter the last number")) + +for i in range(n1, n2+1): + sum = 0 + temp = i + while temp > 0: + digit = temp % 10 + sum = sum + digit ** 3 + temp = temp // 10 + + if i == sum: + print (i) +Ques 2- + +You have a list with words - [“Apple”, “Mango”, “Banana”,”Grapes”] + + +ls = [“Apple”, “Mango”, “Banana”,”Grapes”] +sortls = sorted(ls) +print (sortls) + + + \ No newline at end of file diff --git a/Chandresh singh/Python/python 4.txt b/Chandresh singh/Python/python 4.txt new file mode 100644 index 0000000..8b00b6b --- /dev/null +++ b/Chandresh singh/Python/python 4.txt @@ -0,0 +1,49 @@ +Ques 1- + +You have to run your Program at 9:00PM on 14th April 2020. + Whatsapp Automation + + +import datetime +x = datetime.datetime.now() +a = str(x) +ls = a.split(" ") + +import time +while True: + x = time.ctime() + ls = x.split(" ") + print(ls) + if ls == ['Wed', 'Apr', '14', '21:00:00', '2020']: + print("It's 9 PM") + break + else: + continue + + +Ques 2- + +GIve a tuple: + +t=() +t = ('R','e','g','e','X') + +for i in t: + print(t[i]) + +Ques 3- + +Create a list of integers print number greater than 20 also separate the numbers greater than 10 to another list + +a=[] +b=[] + +ls=[1,2,3,4,5,6,7,8,9,10,11,13,14,15,25,26,27,28,29,30] +for i in ls: + if i>20: + print(ls[i]) + a.append(i) + elif i <= 10: + b.append(i) +print(a) +print(b) \ No newline at end of file diff --git a/Chandresh singh/Python/python 5.txt b/Chandresh singh/Python/python 5.txt new file mode 100644 index 0000000..3f03170 --- /dev/null +++ b/Chandresh singh/Python/python 5.txt @@ -0,0 +1,64 @@ +Ques 1- + +Time Module loop + Loading. + Loading.. + Loading... + Loading.... + Loading..... + +import time +print("Loading", end = "") +i = 1 +while(i < 6): + print('.', end = "") + time.sleep(1) + i += 1 + +Ques 2- +Difference between Return and Yield? +The keyword return causes the function to exit and hands back a value to its caller.The return statement is used when a function is ready to exit and return a value to its caller. +The keyword yield causes the function to hand back a generator object to its caller. yield will not cause the function to exit nor terminate the loop. A generator can be parsed into a list. + +Ques 3- + +Create a digital clock that run for 5 seconds +import time + +i=0 +while i < 5: + t = time.ctime() + print(t[11:19]) + time.sleep(1) + i = (i+1) + +Ques 4- + +Whatsapp Automation + +import webbrowser +import time +import pyautogui +send = False +number = int(input("Enter the number to send message: ")) +message = input("Enter the message") +YourTime = input("Enter time at which u want to send message as format (hh:mm:ss): ") +print(time.ctime()) +while(True): + t = time.ctime() + str(t) + a = t.split(" ") + if a[3] == YourTime: + send = True + if send == True: + print("send") + send = False + time.sleep(1) + url = 'https://wa.me/'+str(number)+'?text='+str(message) + webbrowser.open(url) + time.sleep(5) + pyautogui.moveTo(670, 315) + pyautogui.click() + time.sleep(5) + pyautogui.press('enter') + diff --git a/Chandresh singh/Python/python 6.txt b/Chandresh singh/Python/python 6.txt new file mode 100644 index 0000000..b30e262 --- /dev/null +++ b/Chandresh singh/Python/python 6.txt @@ -0,0 +1,57 @@ +Ques 1- +Reading a file line by line and storing in list + +ls=list() + +f = open("name.txt") + +for line in f: + for word in file_text: + ls.append(word) + +print(ls) + + + +Ques 2- +Reading a file line by line and storing in array + +arr = [] +f = open("name.txt") +for line in f: + for word in file_text: + arr.append(word) + +print(arr) + + + + +Ques 3- +Read a random line froma file + +import random +f = open("name.txt", 'r') +h = (f.read().splitlines()) +print(random.choice(h)) + + + + + + +Ques 4- +Combine each line from first file with the corresponding line in second file + + +f = open("name.txt", 'r') +a = f.read().splitlines() + +f2= open("name2.txt", 'r') +b = f.read().splitlines() + +ls = [] +for i,j in zip(a,b): + print(i + j) + + diff --git a/Chandresh singh/Python/python 7.txt b/Chandresh singh/Python/python 7.txt new file mode 100644 index 0000000..eaeb3f6 --- /dev/null +++ b/Chandresh singh/Python/python 7.txt @@ -0,0 +1,14 @@ +Late Night Task +Make a script to send “Hi” 5 times to a friend. +import webbrowser +import pyautogui +import time +count=0 +number=int(input("Enter the number- ")) +while count<5: + webbrowser.open('https://webbrowser.whatsapp.com/send?phone='+str(number)+'&text=Hi') + time.sleep(30) + pyautogui.press('enter') + time.sleep(3) + pyautogui.hotkey('ctrl','w') + count=count+1