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
package com.ericsson.edosdp.pmgateway.service; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; |
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
Republican nomination | |
Eisenhower presidential campaign, Baltimore, Maryland, September 1952 | |
Dwight D. Eisenhower and Senator Robert A. Taft from Ohio were the two front-runners for the Republican Party presidential nomination going into the 1952 Republican presidential primaries. Also contending for the nomination were Governor Earl Warren of California, and former Governor Harold Stassen of Minnesota.[3] Taft led the conservative wing of the party, centered in the Midwest, that rejected many of the New Deal social welfare programs created in the 1930s, and generally held a non-interventionist foreign policy stance, believing that America should avoid alliances with foreign powers. Taft had been a candidate for the Republican nomination in 1940 and 1948, but had been defeated both times by moderate Republicans from New York: Wendell Willkie in 1940, and Thomas E. Dewey in 1948. Taft blamed these successive loses on the New York GOP's undue influence over the national party.[4] | |
Dewey, the party's presidentia |
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
public class Exercise { | |
public static void main(String[] args) { | |
// TODO Read all lines/all content of the file provided in args[0] | |
// TODO Separate it into a list of words (just separate by white space, no need to remove other characters) | |
// TODO Create a map containing: | |
// - As key: Each of the Word in the file |
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
{ | |
[ | |
[ | |
"ObjectId" : "E00707.L19447C", | |
"RecordDate" : "2019/02/10", | |
"DateInDays" : "10", | |
"DateInHours" : "00", | |
"DateInTicks": "0", | |
"Source" : "source", | |
"Target" : "target", |
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
package example | |
/** | |
* Created by Victor on 8/13/2018. | |
* Utility methods for the 10 days of statistics in Hackerrank | |
*/ | |
object StatisticsUtils | |
{ | |
/** | |
* Calculates the standard deviation of an Array of Integers |
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 df = sqlContext.read.parquet("/victor/testimport") | |
.select($"date",$"close",$"volume",$"year_p") | |
.filter("year_p = 1962") | |
df.show() | |
/* | |
+----------+--------+---------+------+ | |
| date| close| volume|year_p| | |
+----------+--------+---------+------+ | |
|1962-08-01| 0.6875|1372800.0| 1962| |
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
# Original CSV is generated as follows: | |
# Date,Open,High,Low,Close,Adj Close,Volume | |
# 1962-01-02,0.781250,0.794271,0.773438,0.778646,0.002326,2073600 | |
# 1962-01-03,0.774740,0.774740,0.768229,0.770833,0.002303,1420800 | |
# Ignore the header, extract the year and month from the first column, | |
# create two additional columns at the end of the file and add quotes to the | |
# first colum: |
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
# Create the partitions from the "date" column | |
kite-dataset partition-config date:year date:month date:day -s my_schema.txt \ | |
-o partitions.txt |
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
[ { | |
"name" : "year_p", | |
"source" : "year", | |
"type" : "identity" | |
}, { | |
"name" : "month_p", | |
"source" : "month", | |
"type" : "identity" | |
} ] |
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
{ | |
"type" : "record", | |
"name" : "ge_stock_data", | |
"namespace" : "victor.ferrer.stock.data", | |
"doc" : "GE", | |
"fields" : [ | |
{ "name" : "date", "type" : "string" }, | |
{ "name" : "open", "type" : "float"}, | |
{ "name" : "high", "type" : "float" }, | |
{ "name" : "low", "type" : "float" }, |
NewerOlder