Skip to content

Instantly share code, notes, and snippets.

View 43061b4a's full-sized avatar
🐌

AR 43061b4a

🐌
  • Calgary, Canada
View GitHub Profile
@43061b4a
43061b4a / PowershellDeployer.ps1
Created March 27, 2020 22:49
Remote Tomcat deployment with PowerShell
# 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
### 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:
Verifying my Blockstack ID is secured with the address 1Gs1YhhFCLfhxsAvPCP4oWNime5HWRL8H https://explorer.blockstack.org/address/1Gs1YhhFCLfhxsAvPCP4oWNime5HWRL8H
### 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:
# 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:
#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
#!/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)):
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
# 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
# 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)))