One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
def create_yearmonth_list(start_year:int, end_year: int): | |
start_at = start_year * 100 | |
end_at = end_year - start_year | |
for year in range(0,end_at+1): | |
year_acc = year*100 | |
start = start_at + year_acc | |
for month in range(1,13): | |
yyyymm = start+month |
settings { | |
logfile = "/tmp/lsyncd.log", | |
statusFile = "/tmp/lsyncd.status", | |
nodaemon = true | |
} | |
sync { | |
default.rsyncssh, | |
source="/path/to/source", | |
host="target-ip-address", | |
targetdir = "/path/to/target", |
subland_dict = { | |
'hi':['hi1','hi2','hi3'], | |
'hello': ['hello1', 'hello2', 'hello3'] | |
} | |
res = [[(y,k) for y in v] for k, v in subland_dict.items()] | |
# [[('hi1', 'hi'), ('hi2', 'hi'), ('hi3', 'hi')], [('hello1', 'hello'), ('hello2', 'hello'), ('hello3', 'hello')]] | |
merged = dict(list(itertools.chain.from_iterable(res))) | |
# {'hi1': 'hi', 'hi2': 'hi', 'hi3': 'hi', 'hello1': 'hello', 'hello2': 'hello', 'hello3': 'hello'} |
object Solution { | |
// Complete the climbingLeaderboard function below. | |
def climbingLeaderboard(scores: Array[Int], alice: Array[Int]) = { | |
val score2 = scores.distinct | |
val length = score2.length-1 | |
var j = length | |
for(i:Int <- alice) yield { | |
val cond = score2.search[Int](i)(Ordering[Int].reverse) match { |
object Solution { | |
// Complete the climbingLeaderboard function below. | |
def climbingLeaderboard(scores: Array[Int], alice: Array[Int]) = { | |
val score2 = scores.distinct | |
val length = score2.length-1 | |
var j = length | |
for(i:Int <- alice) yield { | |
val cond = score2.search[Int](i)(Ordering[Int].reverse) match { |
def main2() { | |
// def reader = new Scanner(System.in) | |
// String str1 = reader.next() | |
// String str2 = reader.next() | |
// | |
// println(str1, str2) | |
def characters = 'FRANCE'.trim().toCharArray() | |
def characters2 = 'french'.trim().toCharArray() |
task submitLivy(type: Exec, dependsOn: shadowJar ) { | |
def targetUrl = 'http://localhost:8998/batches' | |
def sparkOption = file("livy.json").getText("utf-8") | |
def curlComm = ['curl', '-X', 'POST', '-H', 'Content-Type: application/json', targetUrl, '-d', sparkOption] | |
doLast { | |
ProcessBuilder builder = new ProcessBuilder(curlComm) | |
println builder.command() | |
Process process = builder.start() |
def main() { | |
def reader = new Scanner(System.in) | |
int a = reader.nextInt() | |
BigInteger count = (2 ** a) -1 | |
println(count) | |
boolean canPrint = a <= 20 | |
def hanoiTower | |
hanoiTower = { int num, int from, int to, int aux -> |
def main() { | |
def input = 192 | |
def gcd | |
gcd = { int val, int remainder -> | |
if(remainder ==0){ | |
return val | |
} |