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
# Params: | |
# $tomcatUrl: Url of tomcat | |
# $warPath: Url of war file containing application | |
# $appVirtualPath: Virtual path of application to be deployed | |
# $user: User with permissions to deploy i.e. a user in tomcat-users.xml with manager-script role | |
# $password: Password for specified user | |
Function DeployToTomcat($tomcatUrl, $warPath, $appVirtualPath, $user, $password) | |
{ | |
# Webclient for making requests | |
$webclient = new-object System.Net.WebClient |
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
### Keybase proof | |
I hereby claim: | |
* I am 43061b4a on github. | |
* I am halite (https://keybase.io/halite) on keybase. | |
* I have a public key whose fingerprint is 47A5 A22F C2D0 917F 3C77 BB7E 3B96 E00B 29ED 0D27 | |
To claim this, I am signing this object: |
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
Verifying my Blockstack ID is secured with the address 1Gs1YhhFCLfhxsAvPCP4oWNime5HWRL8H https://explorer.blockstack.org/address/1Gs1YhhFCLfhxsAvPCP4oWNime5HWRL8H |
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
### Keybase proof | |
I hereby claim: | |
* I am arastogi19 on github. | |
* I am halite (https://keybase.io/halite) on keybase. | |
* I have a public key ASCLQWEfIXRfxPeuS6LzN6jRO5MSU-BEtV7iCp6nb09fFQo | |
To claim this, I am signing this object: |
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
# https://codility.com/demo/results/demoHUQZ5G-SSR/ | |
def solution(A): | |
if len(A) <= 0: | |
return -1 | |
result = 0 | |
multiplier = 0 | |
for i in range(len(A)): | |
if A[i] == 0: | |
multiplier += 1 | |
else: |
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
#https://codility.com/demo/results/demoRPXRJY-QA4/ | |
def solution(A, B, K): | |
result = B // K - A // K | |
if A % K == 0: # Additional one | |
result += 1 | |
return result |
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
#!/usr/bin/env python | |
def solution(N, A): | |
counters = [0] * N | |
max_counter = 0 | |
all_inc = 0 | |
N1 = N + 1 | |
for i in range(len(A)): |
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
def solution(A): | |
d = {} | |
result = 0 | |
for i in range(len(A)): | |
if A[i] not in d and A[i] >= 1: | |
d[A[i]] = 0 | |
j = 1 | |
while j <= 100010: | |
if not j in d: | |
result = j |
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
# you can use print for debugging purposes, e.g. | |
# print "this is a debug message" | |
def solution(A): | |
d = dict(zip(range(1, len(A) + 1), [0] * (len(A) + 1) )) | |
result = 0 | |
for i in A: | |
if i in d: | |
d.pop(i) | |
if not d: | |
result = 1 |
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
# you can use print for debugging purposes, e.g. | |
# print "this is a debug message" | |
def solution(X, A): | |
if len(A) <= 0 or X <= 0: | |
return -1 | |
d = dict(zip(range(1, X+1), [0] * (X+1))) |
NewerOlder