Skip to content

Instantly share code, notes, and snippets.

View malteos's full-sized avatar

malteos malteos

View GitHub Profile

Testing Queries for CirrusSearch extension

As produced by SimpleKeywordFeature.doApply() (boosting has no effect)

curl -XPOST localhost:9200/wiki_content/_search?pretty -d '
{
  "_source": [
    "title"
  ],
  "query": {
@malteos
malteos / auc-gammaidx.py
Last active May 23, 2016 17:17
AUC + GAMMAIDX
def auc(y_true, y_val, plot=False):
"""
Computes the AUC (area under the receiver operator curve).
For example, y val could be the output of a learning algorithm (binary logistic regression, ...).
:param y_true: true labels in {-1,+1}
:param y_val: predicted value where lower values tend to correspond to label -1 and higher values to label +1
:param plot: whether to plot the ROC curve or not
:return: returns the AUC
"""
sum_cond_pos = np.count_nonzero(y_true == 1)
@malteos
malteos / YoutubeUpload.js
Created July 24, 2015 14:27
YoutubeUploadJS - Node JS program for uploading videos to YouTube via DataAPI v3 & CmdLine
/******************************
* YoutubeUploadJS
* *****************************
* Node JS program for uploading videos to YouTube via DataAPI v3 & CmdLine
* (inspired by https://github.com/rajeshujade/nodejs-upload-youtube-video-using-google-api )
*
* Run with: nodejs ytvideoupload.js <video-file> <video-title> <video-description> [<config-json>]
*
* Requires config.json in home directory or defined as argument. Example:
* {
@malteos
malteos / football-world-cup-2014-brazil-all-players.txt
Created February 4, 2015 09:32
Football World Cup 2014 Brazil - All Players
Fabrice OLINGA
Luke SHAW
Nabil BENTALEB
Divock ORIGI
Adnan JANUZAJ
Carlos GRUEZO
Raheem STERLING
Jose GIMENEZ
Julian GREEN
Sead KOLASINAC
@malteos
malteos / mmr-wikisim.txt
Last active August 29, 2015 14:13
Mean reciprocal rank for Wiki Similarity Measures
WikiSim results
Article See Also (unsortiert) CoCit (sortiert) CPA (sortiert)
----------------------------------------------------------------------
z a, b, c, ,d 1: b, 2:c 1: d
y e, f 1: f, 2: q, 3: x 1: p, 2: q, 3: a, 4: f
x a, b 1: b, 2: a 1: a, 2: b
----------------------------------------------------------------------
@malteos
malteos / german-iso-3166.csv
Last active October 16, 2024 16:17
German ISO-3166 Country Codes CSV (deutsche Ländercodes)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
AF Afghanistan
EG Ägypten
AL Albanien
DZ Algerien
AD Andorra
AO Angola
AI Anguilla
AQ Antarktis
AG Antigua und Barbuda
GQ Äquatorial Guinea