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
| from os import urandom | |
| from random import choice | |
| char_set = {'small': 'abcdefghijklmnopqrstuvwxyz', | |
| 'nums': '0123456789', | |
| 'big': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', | |
| 'special': '^!\$%&/()=?{[]}+~#-_.:,;<>|\\' | |
| } | |
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/python3 | |
| import os | |
| import sys | |
| s = raw_input("String to search? ") | |
| os.system('grep -nr ' + s + ' ' + '.') | |
| #print('grep -nr ' + 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
| #!/usr/bin/python | |
| import pyautogui | |
| import time | |
| import sys | |
| import os | |
| def Flicker(): | |
| """Flicker moves the mouse around causing SKYPE for business to not turn yellow""" | |
| #pyautogui in move coordinates. The first set is left to right the second is up and down. | |
| try: |
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 itertools | |
| import json | |
| import toolz | |
| keys = ['A', 'B', 'C', 'D'] | |
| with open('lines.txt') as infile: | |
| for group in toolz.partition_all( | |
| len(keys), | |
| zip(itertools.cycle(keys), infile), | |
| ): |
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
| #!/usr/bin/python | |
| # This is a set of parameters I got for a coding test | |
| # This was written to be run one function at a time to review code. At the bottom un comment each function you wish to run. | |
| # Some are in two parts or two different ways of working. Question 4 was already saved so didn't include it. | |
| # If you do not review prior to Mon the 8th I will find time to go back through and do some list comprehension and creating classes. | |
| import sys | |
| import re | |
| import os | |
| import requests |
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/python3 | |
| #This file took lines of a file and sets them in a json format. | |
| import itertools | |
| import json | |
| import toolz | |
| appliance = [] | |
| keys = ['hostname','directory','java_ver','app_package'] | |
| with open('goodfile.txt') as infile: |
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
| #! /use/bin/python3 | |
| import os | |
| #./ails_of_the_Texas_Rangers/Texas_Rangers_1950_08_05_05_Quick_Silver.mp3 | |
| #./theSixShooter/ | |
| os.system('rm playlist.txt') | |
| george = "./letGeorgeDoIt/" | |
| ranger = "./Tails_of_the_Texas_Rangers/" | |
| six = "./theSixShooter/" |
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
| [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
| [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
| export PATH=/home/dallas/.rbenv/plugins/ruby-build/bin:/home/dallas/.rbenv/shims:/home/dallas/.rbenv/bin:/home/dallas/bin:/home/dallas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dallas/.rvm/bin:/home/dallas/.rvm/bin:/home/dallas/.vimpkg/bin | |
| # Set CLICOLOR if you want Ansi Colors in iTerm2 | |
| export CLICOLOR=1 | |
| #source /Users/dallas/.git-prompt.sh | |
| #source /Users/dallas/.bash_colors |
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 re | |
| '''Good to run on all''' | |
| with open('repofiles_raw.txt') as repofile: | |
| x=repofile.readlines() | |
| done=[] | |
| newline=''.join([str(i) for i in x]) |
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
| # Pythono3 code to rename multiple | |
| # files in a directory or folder | |
| import os | |
| # Function to rename multiple files | |
| def main(): | |
| i = 0 | |
| for filename in os.listdir("xyz"): |
OlderNewer