This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
i=list(os.walk('.')) | |
k=i[0][2][1:] | |
k='\n'.join(k) | |
with open('files.txt','w') as file1: | |
file1.write(k) | |
print('done writing') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update the Repositories | |
sudo apt-get update | |
# Remove any old / unwanted / exisitng doncker installation | |
sudo apt-get -y remove docker docker-engine docker.io | |
# Remove any old Containers / Images | |
# sudo rm -rf /var/lib/docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File should contain URLs seprated by new lines | |
# Execute the Script by running './download.sh <File_Path>' | |
# If unable to run give executable permissions by running 'chmod +x download.sh' | |
while read p; do | |
wget -L -P $2 $p | |
done <$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class less: | |
"Print all the Numbers that are less than five" | |
def __init__(self,list,k=5): | |
self.l=list | |
self.k=k | |
def output(self): | |
print [i for i in self.l if i<self.k] | |
list=raw_input("List out Integers with single spacing") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OddEven: | |
"Detect Odd / Even" | |
def __init__(self,Number): | |
self.Num=Number | |
def Result(self,Number=None): | |
if Number==None: | |
Number=self.Num | |
if Number%2==0: | |
if Number%4==0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name=raw_input("Write your Name: ") | |
Age=input("Enter your Age: ") | |
n=input("number of repeations: ") | |
k="You shall becom 100 yrs by %d, %s" % (2016 + (100-Age),name) | |
print (k+'\n')*(n-1) |
NewerOlder