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
| def print_full_name(a, b): | |
| print "Hello {0} {1}! You just delved into python.".format(a, b) |
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
| def mutate_string(string, position, character): | |
| l = list(string) | |
| l[position] = c | |
| return "".join(l) |
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
| def count_substring(string, sub_string): | |
| count = 0 | |
| for i in range(len(string)-len(sub_string)+1): | |
| if(string[i:i+len(sub_string)]==sub_string): | |
| count += 1 | |
| return count |
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
| if __name__ == '__main__': | |
| s = raw_input() | |
| print any(c.isalnum() for c in s) | |
| print any(c.isalpha() for c in s) | |
| print any(c.isdigit() for c in s) | |
| print any(c.islower() for c in s) | |
| print any(c.isupper() for c in s) |
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
| #Replace all ______ with rjust, ljust or center. | |
| thickness = int(raw_input()) #This must be an odd number | |
| c = 'H' | |
| #Top Cone | |
| for i in range(thickness): | |
| print (c*i).rjust(thickness-1)+c+(c*i).ljust(thickness-1) | |
| #Top Pillars |
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
| def wrap(string, max_width): | |
| return textwrap.fill(string,max_width) |
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
| wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add - | |
| sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | |
| sudo apt-get update | |
| sudo apt-get install jenkins |
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
| sshpass -p 'nhGfJfU0' rsync -avu --exclude-from=/var/www/vhosts/IP ADRESSS/IP ADRESSS/dl-cpdpod/omit.txt -e ssh --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r -p --delete [email protected]:/var/www/vhostsIP ADRESSS/IP ADRESSS/xml-data/build-dir/1769473-1900545/ /var/www/vhosts/IP ADRESSS/IP ADRESSS/dl-cpdpod/ |
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
| sudo apt-get install software-properties-common | |
| sudo apt-add-repository ppa:ansible/ansible | |
| sudo apt-get update | |
| sudo apt-get install ansible | |
| ansible --version | |
| ansible-playbook --version | |
| ansible-galaxy --help | |
| ansible --list-hosts all | |
| sudo vi /etc/ansible/hosts | |
| ansible -i dev --list-host all |
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 | |
| FFMPEG=/usr/bin/ffmpeg | |
| HD_SUFFIX='_hd' | |
| EMBED_WIDTH='640' | |
| EMBED_HEIGHT='360' | |
| SD_RESOLUTION=$EMBED_WIDTH'x'$EMBED_HEIGHT |