I hereby claim:
- I am otobrglez on github.
- I am otobrglez (https://keybase.io/otobrglez) on keybase.
- I have a public key whose fingerprint is 4FE7 0346 C546 B9C0 31D9 B91B 0441 9BCA 2621 C2E3
To claim this, I am signing this object:
| # Single line of Ruby <3. | |
| ruby -rjson -ryaml -e "puts YAML.load_file('my_file.yml').to_json" | |
| # You can also pipe it to Python to get pretty ouput | |
| ruby -rjson -ryaml -e "puts YAML.load_file('my_file.yml').to_json" | \ | |
| python -mjson.tool | |
| # Thats all. :) |
| #!/usr/bin/env bash | |
| redis-cli \ | |
| -h <host> \ | |
| -p <port> \ | |
| -a <pass> \ | |
| keys \* | sed 's/.*query=//' | sort -u |
| "use strict"; | |
| // Experimenting with ES6 on NodeJS | |
| // node --harmony --harmony_default_parameters ./little_es6.js | |
| var numbers = [1, 1, 2, 5, 3]; | |
| var littleSum = numbers.filter(x => x % 2).reduce((s, b) => s + b); | |
| console.log(`Sum is ${littleSum}.`); | |
| numbers.forEach(l => console.log(l)); |
| import scala.math.{pow} | |
| import scala.concurrent._ | |
| import scala.concurrent.ExecutionContext.Implicits.global | |
| import scala.concurrent.duration._ | |
| import scala.collection.mutable.ArrayBuffer | |
| object Regression { | |
| def linear(pairs: IndexedSeq[Seq[Double]]) = { | |
| val n = pairs.size |
| // successful jobs grouped by type maped by req/sec | |
| r.db('qm_production').table('jobs') | |
| .filter({'last_event_type': 'success'}) | |
| .map(function(doc) { | |
| return { | |
| 'ds_type': doc('ds_type'), | |
| 'last_event_type': doc('last_event_type'), | |
| 'res_sec': doc("stats_event_response_count").div(doc('stats_run_duration')), | |
| 'req_sec': doc("stats_event_request_count").div(doc('stats_run_duration')) | |
| }; |
I hereby claim:
To claim this, I am signing this object:
| run: test | |
| ./test | |
| test: | |
| clang -ansi test.c -o test | |
| clean: | |
| rm -rf test |
| #!/usr/bin/env bash | |
| docker exec -ti $(docker ps -f 'image=databox/qm' -q | head -n1) bash -lc "cd /home/app/qm; $*" | |
| # Usage: | |
| # ./in_qm uname -a |
| #!/usr/bin/env python | |
| # http://bogdan-ivanov.com/recipe-text-clustering-using-nltk-and-scikit-learn/ | |
| #!/usr/bin/env python | |
| import nltk | |
| import string | |
| import collections | |
| from data.feeds import feed | |
| from math import sqrt, ceil, floor |
| #!/usr/bin/env ruby | |
| # If you get "unknown OID 705: failed to recognize type of '<field>'. It will be treated as String." | |
| # it probably means that type of column could not be identified when retriving records | |
| # Example | |
| User.where("'something' as something") | |
| # Will results in unknown OID. However doing this: |