#Semantic Search engine – NLP lab
###17/05/2016 Task
Use the above blog to scrap the following information and show in terminal (ubuntu) or in a file in windows.
#Semantic Search engine – NLP lab
###17/05/2016 Task
Use the above blog to scrap the following information and show in terminal (ubuntu) or in a file in windows.
def value(k, degree, coefficients): | |
ans = 0 | |
prev = 1 | |
for i in xrange(degree+1): | |
if i != 0: | |
prev = prev * k | |
ans += coefficients[i] * prev | |
return ans | |
degree = input() | |
coefficients = map(int,raw_input().split()) |
;Clojure is compiled language but has a eval function like lisp which allows to run compiler within execution | |
;Visit https://learnxinyminutes.com/docs/clojure/ for more gists | |
5 ; ⇒ 5 | |
"hi" ; ⇒ "hi" | |
[1 2 3] ; evaluates to the vector `[1 2 3]` | |
(+ 1 2) ; evaluates to the sum of 1 and 2 | |
(if true "yes" "no") ; evaluates to the string "yes" | |
(println "hello!") ; evaluates to nil (but also prints "hello!") |
import elasticsearch as es | |
db = es.Elasticsearch(['y-monitoring-vm2.dnspam'], port= 9200) | |
db.delete_by_query(index= 'lake_garda_hadoop-test', doc_type='stock_accuracy', body={}) |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
//passing functions as params and executing them when required | |
def if2[A](cond: Boolean, onTrue: () => A, onFalse: () => A): A ={ | |
if (cond) onTrue() else onFalse() | |
} | |
//=> using arrow syntax pass params as unevaluated but they will be | |
//evaluated once they are referenced no need to mention () to execute them | |
def if2[A](cond: Boolean, onTrue: => A, onFalse: => A): A ={ | |
if (cond) onTrue else onFalse | |
} |
val x = { println("x"); 15 } | |
//x | |
//x: Int = 15 | |
lazy val y = { println("y"); 13 } | |
//y: Int = <lazy> | |
x | |
//res2: Int = 15 | |
y | |
//y |
check host appsrv1 with address 127.0.0.1 | |
start program = "/sbin/start myapp" | |
stop program = "/sbin/stop myapp" | |
alert [email protected] on {timeout,connection} | |
if failed port 9009 protocol HTTP | |
request / | |
with timeout 3 seconds | |
then restart | |
if 10 restarts within 10 cycles then timeout | |
if 10 restarts within 10 cycles then exec "/usr/bin/monit start aws-dns-healthcheck" |
I hereby claim:
To claim this, I am signing this object:
A source schema has to be declared before extracting the data from the source. To define the source schema source.schema
property is available which takes a JSON value defining the source schema. This schema is used by Converters to perform data type or data format conversions. The java class representation of a source schema can be found here Schema.java.
In Gobblin library a Converter is an interface for classes that implement data transformations, e.g., data type conversions, schema projections, data manipulations, data filtering, etc. This interface is responsible for converting both schema and data records. Classes implementing this interface are composible and can be chained together to achieve more complex data transformations.
A converter basically needs four inputs: