Name | Required | Type | Default | Description |
---|---|---|---|---|
name | true | [String, Number] | Name of the modal | |
delay | false | Number | 0 | Delay between showing overlay and actual modal box |
pivotY | false | Number (0 - 1.0) | 0.5 | Vertical position in %, default is 0.5 (meaning that modal box wii |
ll be in the middle (50% from top) of the window |
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
val fs = org.apache.hadoop.fs.FileSystem.get(spark.sparkContext.hadoopConfiguration) | |
if (fs.exists(new org.apache.hadoop.fs.Path(cleanedAdpFileUri))) | |
fs.delete(new Path(cleanedAdpFileUri), true) |
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 isValid(): Boolean = { | |
val lst = List( | |
isValidForEmptyDF() _, | |
isValidForFoo() _, | |
isValidForBar() _ | |
) | |
!lst.exists(!_()) // and fail asap ... |
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
if [ -z "$Emails" ]; then | |
msg="Emails to set mail to not set !!! you need to export Emails=list-of-emails-to-send-mail-to-comma-delimited" ; | |
export exit_code=1 ; | |
doExit "$msg"; | |
exit 1 ; | |
fi |
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
# set those var names ( not the values ;o) in your shell | |
# good luck trying those ... | |
export aws_profile=my-profile | |
export bucket=phub-1525928545-127 | |
export endpoint=https://es-si-s3-z2.ecloud.comm.net:1010 | |
export aws_secret_access_key=56FDD9520FF3F9DA835A6E36f783903 | |
export aws_access_point_id=49585117C01847189BC8BFE0b50D561A | |
export AWS_SECRET_ACCESS_KEY=56FDD9520ACD4D9DA835A6E36f783903 | |
export AWS_ACCESS_KEY_ID=49585217C06847189AC8BFE0b50D561A |
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
val rowsSeq: Seq[Row] = Seq() | |
val rowsRDD: RDD[Row] = spark.sparkContext.parallelize(rowsSeq) | |
spark.createDataFrame(rowsRDD, schema) |
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
# file: ~/.sbt/repositories | |
[repositories] | |
local | |
sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/,[organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] | |
sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] | |
maven-central: http://repo1.maven.org/maven2/ | |
# check also the following credentials file | |
# ~/.sbt/0.13/credentials.sbt |
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
// obs ! you need the .asInstanceOf[<<Type>>] otherwise a serialization exception will be thrown | |
// format: off | |
val mdtDs = Seq( | |
(Some(45.5806766), Some(10.4940080), null.asInstanceOf[Double], null.asInstanceOf[Double], | |
null.asInstanceOf[Double]) | |
).toDS() | |
val mdtDf = mdtDs.toDF( | |
"latitude", | |
"longitude", |
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
# modify a user | |
usermod -a -G $group $user | |
# change the password for the specified user (own password) | |
passwd $user | |
#how-to forces to change password when logging in for the first time | |
passwd -f login | |
#change user pass to expire never | |
chage -I -1 -m 0 -M 99999 -E -1 $user | |
# and check results |
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
# START === user management | |
#how-to add a linux group | |
export group=usr_name | |
export gid=10001 | |
sudo groupadd -g "$gid" "$group" | |
sudo cat /etc/group | grep --color "$group" | |
export user=grp_name | |
export uid=10001 | |
export home_dir=/home/$user |