I hereby claim:
- I am padmick on github.
- I am padraicwade (https://keybase.io/padraicwade) on keybase.
- I have a public key whose fingerprint is A9CD 9296 92D8 B7BA 986B FD5B 7276 FE80 DFDB FBE1
To claim this, I am signing this object:
textfile = sc.textFile("C:\Users\Padraic.Wade\Desktop\dataA.csv")\ | |
header = textfile.first() | |
somethingRDD = textfile.filter(lambda line: line != header)\ | |
.map(lambda line: (line.split('\t')[0], max([float(x) for x in line.split('\t')[1:]]))) | |
print somethingRDD.collect() |
#to find the max of one row in the file | |
from pyspark import SparkContext | |
def mapMax(line): | |
line = line.split(',') | |
return line[0], max((float(x) for x in line[1:])) | |
textfile = sc.textFile("wasb://wgkspark@teststoragespark.blob.core.windows.net/dataA.csv").cache() | |
lines = textfile.takeSample(False, 50) | |
print mapMax(lines[-1]) | |
#print lines[0] was just for debugging |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby=2.6.3 | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs && | |
sudo DEBIAN_FRONTEND=noninteractive ln -sf /usr/bin/nodejs /usr/local/bin/node | |
export DEBIAN_FRONTEND=noninteractive | |
# Install our PGP key and add HTTPS support for APT | |
sudo DEBIAN_FRONTEND=noninteractive apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7 | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y apt-transport-https ca-certificates |
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "", | |
"title": "test", | |
"version": "v1.0.0" | |
}, | |
"schemes": [ | |
"http", | |
"https" |
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "", | |
"title": "test1", | |
"version": "v1.0.0" | |
}, | |
"schemes": [ | |
"http", | |
"https" |
/u/Zudegia (171 points, 94 comments) | |
/u/Mailbox538 (160 points, 67 comments) | |
/u/Koekoeksklok88 (78 points, 33 comments) | |
/u/Ploxxx69 (74 points, 37 comments) | |
/u/S_B_C_R (73 points, 29 comments) | |
/u/AriTheBlari (66 points, 21 comments) | |
/u/Konan87 (52 points, 31 comments) | |
/u/repi7971 (52 points, 13 comments) | |
/u/445323 (49 points, 27 comments) | |
/u/velvetmimosas (48 points, 28 comments) |
{ | |
"hotels": [ | |
{ | |
"HotelID": 561, | |
"HotelName": "Avanti Palms Resort and Conference Center", | |
"Phone": "407-996-0900", | |
"CustomDisplay": false, | |
"CustomDisplayText": "", | |
"Website": "", | |
"CurrencySymbol": "$", |
DDoS protection starts with DNS protection and works as follows:
Cloudflare has a lot of servers distributed throughout the world. They take the brunt of DDoS attacks, leaving your server safe. In addition to that:
Set-Variable -Name EventAgeDays -Value 1 #we will take events for the last one days, can bump later if needed | |
Set-Variable -Name CompArr -Value @("SERV1") # where it says serv1 replace with your PC name | |
Set-Variable -Name LogNames -Value @("Application", "System") # Checking app and system logs | |
Set-Variable -Name EventTypes -Value @("Error", "Warning") # Loading only Errors and Warnings | |
Set-Variable -Name ExportFolder -Value "C:\TEST\" | |
$el_c = @() #consolidated error log | |
$now=get-date | |
$startdate=$now.adddays(-$EventAgeDays) |