This file contains 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 | |
GITHUB_TOKEN="xxxxx" | |
GITHUB_ORG="your-org-name-here" | |
APP_CHANGES_FILE="application-changes.csv" # filename for application changes | |
INFRA_REPO_1="infra-repo-name-1" # infra repo #1 | |
INFRA_REPO_2="infra-repo-name-2" # infra repo #2 | |
INFA_FILE_1="${INFRA_REPO_1}-changes.csv" | |
INFA_FILE_2="${INFRA_REPO_2}-changes.csv" |
This file contains 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 | |
GITHUB_TOKEN="xxxxx" | |
GITHUB_ORG="your-org-name-here" | |
APP_CHANGES_FILE="application-changes.csv" # filename for application changes | |
INFRA_REPO_1="infra-repo-name-1" # infra repo #1 | |
INFRA_REPO_2="infra-repo-name-2" # infra repo #2 | |
INFA_FILE_1="${INFRA_REPO_1}-changes.csv" | |
INFA_FILE_2="${INFRA_REPO_2}-changes.csv" |
This file contains 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
---------------------------------------- | |
Running setup.py clean for uwsgi | |
Failed to build uwsgi | |
Installing collected packages: uwsgi | |
Running setup.py install for uwsgi: started | |
Running setup.py install for uwsgi: finished with status 'error' | |
Complete output from command /srv/uwsgi-python2/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-wJZ6XX/uwsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-tv1IpV/install-record.txt --single-version-externally-managed --compile --install-headers /srv/uwsgi-python2/include/site/python2.7/uwsgi: | |
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions' | |
warnings.warn(msg) | |
running install |
This file contains 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
function bubbleSort(arr) { | |
var hasSwapped = true; | |
while(hasSwapped){ | |
hasSwapped = false; // attempt to be done | |
for(var i = 0; i < arr.length - 1; i++){ | |
var tmp; | |
if(arr[i+1] < arr[i]) { //if value ahead of it is smaller |
This file contains 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
function primeChecker(n) { | |
var divisor = 2; | |
var isPrime = true; | |
while(n > divisor){ | |
if(n % divisor === 0){ | |
isPrime = false; // not a PRIME!!! | |
} else { | |
divisor++; | |
} |
This file contains 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
# The cost of a stock on each day is given in an array, find the max profit that you can make by buying and selling in those days. For example, if the given array is {100, 180, 260, 310, 40, 535, 695}, the maximum profit can earned by buying on day 0, selling on day 3. Again buy on day 4 and sell on day 6. If the given array of prices is sorted in decreasing order, then profit cannot be earned at all. | |
def sell(lowidx, highidx): | |
print("time to sell -------") | |
print("buy:", lowidx) | |
print("sell:", highidx) | |
def stock(arr): | |
low = None # keep track of lowest value | |
lowidx = None # keep track of lowest day |
This file contains 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
# The cost of a stock on each day is given in an array, find the max profit that you can make by buying and selling in those days. For example, if the given array is {100, 180, 260, 310, 40, 535, 695}, the maximum profit can earned by buying on day 0, selling on day 3. Again buy on day 4 and sell on day 6. If the given array of prices is sorted in decreasing order, then profit cannot be earned at all. | |
def sell(lowidx, highidx): | |
print("time to sell -------") | |
print("buy:", lowidx) | |
print("sell:", highidx) | |
def stock(arr): | |
low = None | |
lowidx = None |
This file contains 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
# Given an array of integers and a number x, find the smallest subarray with sum greater than the given value. | |
""" | |
arr[] = {1, 4, 45, 6, 0, 19} | |
x = 51 | |
Output: 3 | |
Minimum length subarray is {4, 45, 6} | |
""" | |
save = None |
This file contains 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
function Animal(animal, noise) { | |
this.noise = noise; | |
this.animal = animal; | |
} | |
Animal.prototype.makeNoise = function() { | |
console.log('I\'m a ' + this.animal + ' - ' + this.noise) | |
} |
This file contains 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 itertools import combinations | |
# Given an array of integers, write a function that returns true if there is a triplet (a, b, c) that satisfies a2 + b2 = c2. | |
""" | |
Input: arr[] = {3, 1, 4, 6, 5} | |
Output: True | |
There is a Pythagorean triplet (3, 4, 5). | |
""" |
NewerOlder