oriolrius.cat

Des del 2000 compartiendo sobre…

Year: 2017

Scripted Grafana dashboards

Reading time: < 1 minute A few minutes of video for explaining how to create dashboards on Grafana using Javascript code:

The code used for hello world script is available as a gist.

Python logger, quite interesting wrapper for python logging library

Reading time: < 1 minute Python logging library is really flexible and powerful but usually, you need some time for setting up the basics or just for logging in a simple script, some commands and settings have to be done. Daiquiri is a library which wrapper python logging library and offers a simple interface for start enjoying logging features in python. Next, there is a hello world example extracted from Daiquiri documentation which shows how easy it gets nice output from the console when you're programming simple scripts. daiquiri python library, hello world example

 

Google Chrome multiple profiles for productivity

Reading time: < 1 minute Hi everyone, some time ago Eloi gave a very good idea about how to use multiple profiles in Google Chrome for organizing different contents with different nature. And the most important thing, associate default Google accounts to the browser depending on those activities. Next video is a description of how I use that trick.

Three headphones until I get succeed

Reading time: 3 – 4 minutes

This is post entry is a summary of my experience with three different headphones until I found one which is compatible with Google Meet (professional version of Google Hangout). I spent a lot of hours every day working with video conference applications like Skype and others. It means stay sat for a long time, and when I don’t have to be in front of my screen I appreciate if I can walk around my room. Of course, this is only possible when the headphones that you use are wireless. A long time ago I had wired headphones and ended tired of having small incidents which damage my ears or drop off anything which was on my table.

So, I decided to read some benchmarks about high-quality headphones, I considered a tool for my job and I decided to spend my money. Having my requirements as a reference and using the benchmark readings for checking them I finally bought the Sennheiser PXC550. I’m not going to say whatever you can find in regular reviews, just some words to say this is a very good product with an excellent sound quality. But, not works with Google Meet (Hangout). What I mean is my voice it could not be understood by other peers. It’s impossible to understand anything. Using applications like Skype, or phone calls the quality was very good. Or using the headphones from my mobile phone and the Google Meet application the quality was good.

Thanks to Amazon guarantee I returned the product and I bought the Bose QuietComfort 35. Also a very good product, maybe a little bit worse than the Sennheiser one in some aspects but anyway a world-class product. Problems with Google Meet (Hangout) were even worst, in this case, sound quality was bad not only from my mic also other people of conversation had a really bad quality. Again with Skype, the quality was good. But when I connect the headphones to my mobile using Google Meet the sound quality was horrible, impossible to use.

Finally, I bought the Plantronics BackBeat PRO 2 SE. From those three that I tried this is the product with less quality IMHO. But Google Meet from my laptop works, my voice quality is not very good but it’s good enough for using them. Again I’m talking about a very good product, with a very good quality. In front of the other two, these ones are weighty, old fashion design, less comfortable, and worst sound quality. Some advantages that I found, the most important of course is it works with Google Meet (Hangout). The sound is louder at the maximum volume, and there are physical buttons for mute and on/off/pairing. Another advantage is the Bluetooth class 1 which give better coverage when I’m not next to the computer.

I didn’t say anything so far, but I’m talking always about Bluetooth connections with my laptop where I have a Windows 10 installed with Google Chrome. Laptop Bluetooth version is 4.0 HCI and LMP version: 6.1280 manufactured by Intel and driver version is 19.30.1646.853 (date: 2016-11-14).

If anybody knows a little bit more about this topic or wants to exchange any similar experience I’ll appreciate.

Raspberry PI: using read-only root partition

Reading time: 2 – 2 minutes

Two years ago I wrote an article discussing how to set up OpenWRT filesystem configuration for controlling writes in the flash card: Raspberry PI and OpenWRT flash partition proposal and rescue boot support for embedded systems.

This current article is mainly for referencing a very good article about how to work with Raspbian with a read-only filesystem and share a fast and dirty cookbook about how to play with that. First of all the reference to: Protect your Raspberry PI SD card, use Read-Only filesystem.

My cookbook about how to get the essence of that article is simple, locate in your /etc/fstab file the line:

/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1

and modify that line with:

/dev/mmcblk0p2  /               ext4    defaults,noatime,ro  0       1

After rebooting your system is going to work in read-only mode. I don’t remember if I modified anything else of the booting process but I don’t thing so.
Because sometimes I have to modify anything in the flash card, I added the next two lines in the ~/.bashrc file:

alias rw='sudo mount -o remount,rw / ; sudo mount -o remount,rw /boot'
alias ro='sudo mount -o remount,ro / ; sudo mount -o remount,ro /boot'

Now just with the command rw it’s really easy to get the root filesystem in the write mode, and when I finish my updates just typing ro it’s go back to read-only mode.

I hope it’s useful for you.

Cryptomator: create a secure vault for your files

Reading time: 2 – 2 minutes

Yesterday I found a tool called Cryptomator, this is a client-side encryption for your files. You can use it with Dropbox, or any other cloud filesystem or you can use it in your local filesystem. Anyway, this open-source piece of software is really simple to install and is compatible with Windows, Mac and Linux. Once this is installed, using the UI the only thing we have to do is create, or select, a folder where the secure vault is going to be created. It uses a symmetric password for cyphering and when the vault is unlocked a new removable drive appear in your system. So, at the end, the vault is like a pendrive and there is no complexity on add, rename, remove, create folders, etc. inside the new drive. Once the vault is locked, the removable drive is unmounted and if you go to the location where the vault is created a tree structure with cyphered files is the only thing that you can see. Cryptomator works cyphering each file, not the complete vault as a package.

So far I installed the tool on my Windows computer for securing some sensitive files that I have on my laptop. But if it works like I expect I’m going to extend the usage with the rest of my computers. As I said it’s not required any cloud filesystem, by the way, I use Cryptomator in conjunction with Resilio Sync.

Teoria clásica de la motivación

Reading time: 2 – 2 minutes

Repasando algunas notas que tengo por el escritorio he encontrado algunas definiciones interesantes sobre la definiciones clásicas de la motivación; así pues creo que siempre es bueno tenerlas a mano y la pongo en el blog.

MASLOW jerarquía de las necesidades
La motivacion se define en función del esalon en el que estmos de la pirámide que define nuestras necesidades, que son cinco ftsiológicas, seguridad, sociales, estima, autorrealizacion.

ADAMS teorema de la equidad
Para este teórico las personas comparan sus recompensas y el producto de su labor con la de los demás. A partir de esto evaluan si son justas o no, de no serlo se producira la desmotivacion y las acciones para que llegue.

VROOM teoría de las expectativas
Todo esfuerzo humano se realiza con la expectativa de un cierto éxito. El sujeto confía en que si se consigue el rendimiento esperado se sigan ciertas consecuencias para él. La expectativa de que el logro de los objetivos vaya seguida de consecuencias deseadas se denomina instrumentalidad.

McCLELLAND logro, poder y afiliación
Para este teórico lo que cada persona busca con sus actuaciones pueden ser una de estas tres cosas. El logro, el impuslso de sobresalir con el trabajo bien hecho. El poder, lograr controlar e influir para obtener reconocimiento.Y por ultimo, la afiliación la necesidad de pertenecer a un grupo.

Seguro que hay muchos otros autores relevantes que definen la motivación en base a otros criterios, así pues si los voy encontrando los iré añadiéndo.

MIT Data Science course: Data to Insights

Reading time: 3 – 4 minutes

This week I finished this course from MIT. After my previous experience on MIT professional courses, I decided to involved in a new one. I know it sounds strange after my really bad feedback in my previous course about IoT, but I decided to give a second opportunity to this kind of courses.

My general opinion about this course is by far better than the previous one, so I’m happy to be done this course. I learn a lot, and of course now is time to put knowledge in practice, so it’s not a minor thing to do. Talking about the difficulty of the course I found two initial modules especially difficult, a lot of mathematics and formulas and it was very difficult to follow explanations because of the complexity of the concepts and mathematical formulas which describe them. In my case some code in any programming language using libraries which abstract mathematical formula complexity would be ideal.

About those two initial modules: “Making sense of unstructured data” and “Regression and Prediction” perhaps the subjects sounds good especially where I want to apply the knowledge, so in IIoT, this is not easy to figure out how to apply that knowledge in time series data. Maybe the best thing that I get from there is what are the main algorithms and theoretical basis that I have to apply in real world projects.

The third module has the subject “Classification, Hypothesis and Deep Learning” and it’s very linked with the previous, by the way, I found easier to understand the related mathematics and how to apply that knowledge. I especially found easy to understand and interesting to apply in IIoT the deep learning chapter, some concepts and basic ideas about neuronal networks are described in a very easy way and graphical synoptic and animations help a lot on following the concepts.

The last two modules about “Recommendation systems” and “Networks and Graphical Models” are presented in a very useful way, very applied to real world and with a lot of examples and I appreciate it. Apart from that teachers did a very good work explaining together and being very progressive in complexity from the bottom up.

If I have to suggest any improvement would be in the practical part, I consider Python a programming language with better future in Data Scientist world than R, may be R has a very good base and history as a language for scientists but I think tools like Jupyter has a better future than legacy tools like RStudio. So get more details and references about how to play with Python based tools and libraries than focus on R would be my recommendation.

Another point to improve, in my opinion, would be add some videos dedicated to using tools and how to apply those tools in case studies. At the end of the day, screencast videos are super useful when you’re not familiar with some technologies.

Summarizing I recommend the course, but don’t expect any fast application of the knowledge is a very theoretical course to get the basics and later get practical skills from your side with case studies or other references.

Pequeña y rápida review del WikidPad

Reading time: < 1 minute

En el siguiente video os explico brevemente algunas de las ventajas de usar WikidPad como mi programa para tomar notas.

L’experiència l’entens quan la tens, avui en faig 40

Reading time: 6 – 10 minutes

Bon dia, potser aquesta és l’entrada al blog que he escrit més aviat al matí però després de quasi 17 anys de blog la veritat costa de recordar. És en detalls com aquests en els que t’adones que fer 40 anys són uns quants. Potser una de les coses que més m’impacte és recordar el que hem deia el Magí fa molts anys “et fas gran i veus el món com si encara en tinguessis molts menys” i ell afegia “a més ningú et dona un manual per dir-te què ha canviat i com ho has d’afrontar”; personalment aquest manual fa molts anys que el vaig trobar i que l’estic escrivint i millorant a diari, això si, la mirada jove costa de canviar-la. Sovint recordo moments de fa un grapat d’anys com si encara fos ahir.

En unes hores seré a un avió cap a Tampa, Forida; això si, per motius de feina. En molts moments això ho vius amb moltíssima il·lusió, aquesta vegada costa llegir-ho així. Veig l’oportunitat i segur que sabré disfrutar aquest aniversari tan llarg, entre el canvi horari i tot viuré un aniversari de més de 24h. Ara mateix em costa pensar que no podré estar al costat del Roc i l’Estefania. Així doncs, puc dir-vos una cosa, aquests són els detalls que realment hem fan sentir que els anys no passen en va.

Hi ha coses que tinc molt clares, una d’elles és que l’edat física no condiciona l’edat mental. La meva forma d’entendre l’experència tot i estar lligada a l’edat, com a fet que possibilita haver viscut moltes coses, crec que té una altre variable amb encara més pès i són les vivències que hem acumulat en els anys d’oportunitat que hem tingut. Personalment sóc de l’opinió que la vida no m’ho ha posat fàcil; evidenment no puc queixar-me perquè amb un minut que dediqui a donar un cop d’ull a les notícies és evident que he tingut molta sort d’haver nascut on he nascut, i això no es tria.

Però per altre banda, totes les vivències difícils que m’ha tocat superar en dies com el d’avui em venen el cap i agafen un pes molt emotiu. Curiosament parlo molt poc del meu pare en el dia a dia, però ús ben asseguro que costa molt passar un dia sense que algún detallet me’l fassi recordar i pensi en com hagués canviat la meva vida d’haver-lo pogut disfrutar durant més anys. Recordo una infantesa molt humil però al mateix temps plena de singularitats que m’ajudaben a acumular aquestes vivències de les que auvi ús parlo.

L’adolescència va ser una etapa molt desconcertant, suposo que igual que molta gent, en el meu cas ho va ser perquè havent descobert la meva passió se’m feia molt i molt difícil tenir-hi accés degut a l’entorn rural on he nascut. Per sort, al accedir a la universitat i la popularització d’Internet van canviar la meva vida i van permetrem acostar-me a moltíssimes persones afins als meus gustos. D’aquí varen neixer els mussols. Evidenment cada cop costa més matenir el contacte amb tots ells però una cosa la sé segura, cada cop que els veig recordo moments innoblidables al pis d’estudiants de Mataró.

Com que venia parlant dels fets durs que m’ha tocat superar, crec que podria definir el final de l’adolescència amb l’accident de cotxe que vaig patir. Sé que costa entendre que amb 26 anys algú pugui dir que acaba l’adolescència però a grans trets diria que va ser així, aproximadament per aquestes dates va ser quan me’n vaig anar a viure en parella per primer cop. Realment va ser una relació molt enriquidora la que vaig tenir amb la Dafne i estic convensut que moltíssimes de les grans ensenyanses que he anat adquirin els últims anys varen neixer amb ella.

La qüestió és que sovint quan alguna cosa acaba ens dona la sensació que és quelcom dolent perquè va acompanyada d’un dolor intens que sentim dins nostre i que no sabem com superar. Però els anys et donen prespectiva i des d’aquesta prespectiva, ara puc dir que quan algo acaba és per deixar espai a noves coses que han de venir. De fet, estic tan convensut d’això que el llibre que m’estic llegint ara mateix de l’Anthony Robins va d’això. D’acceptar el preu que hem de pagar per posar noves coses a la nostre vida, compte ningú parla de diners aquí.

Havent trobat aquest espai a part de començar a crear la que ara és la meva família també vaig posar-me a crear algo molt més important, vaig començar la creació conscient de mi mateix, per arrodonir-ho podriem dir que això va començar fa uns deu anys. Mai podré agraïr prou a l’Estefania l’espai que m’ha donat com a parella perquè això pogués començar i segueixi passant dia rera dia. Vull demanar disculpes a totes les persones que inverteixen tantes i tantes hores en buscar-se, sota el meu punt de vista la vida va de crear-se. Buscar models de persones amb conductes que per nosaltres són admirables i crear la nostre propia versió d’aquestes conductes.

You have the power to invent yourself.

Jo no sé si sóm els nostres pensaments, les nostres conductes, els nostres fets. El que si tinc clar és que la suma de totes aquestes coses ens omplen els moments de la vida. Així doncs, gràcies a la PNL he pogut apendre que canviant el llenguatge puc crear una percepció del món que m’ajuda a estar agraït a la vida en cada instant que tinc la sort de viure. Hi ha moments, com deia fa una estona, que la vida no t’ho posa fàcil. Aquests són els moments on toca creixer, toca superar-se i toca ser més agraït que mai.

Suposo que a aquestes altures ningú dubte que després d’acomiadar-me del pare i veure passar la vida per davant meu en un instant. El fet més dur que m’ha tocat viure és la perdua del Pol. Quan el recordo quasi de forma instantànea noto com les llagrimes s’apoderen dels meus ulls. Per sort, tota una colla d’anys de treball de creixement personal m’ajuden a sentir un agraïment infinit a la vida. De les coses que estic orgullós és com vaig ser capaç de sobreposar-me al costat de l’Estefania per tornar-ho a provar i acabar construint la nostre família.

Com és lògic podria tornar a repassar la meva vida centrant-me amb els fets positius que han anat passant, que no són pocs. Sincerament jo veig aquests fets com a premis o recompenses, però no pas com els fets que em fan creixer. Així doncs, tancant el cercle sobre el que anava explicant per mi l’experiència es forja a través de les vivències que ens fan creixer. Ah! i mirant la televisió no s’acumulen vivències massa intenses, almenys sota el meu punt de vista. Imagino que a aquestes altures no cal dir que el millor premi que he rebut mai me l’ha donat l’Estefania, ens ha fet patir molt però ara mateix el Roc s’ha convertit en el Sol sobre el que donem voltes.

Potser no tothom entendrà perquè m’havia d’aixecar a les cinc del matí per escriure això, però jo només puc dir que ho necessitava i que tampoc hem cal que ningú ho entengui perquè a mi m’omple tan fer aquest petit ritual que n’hi ha prou per trobar les forces per fer un salt de llit i plantar-me davant l’ordinador per escriure-ho.

MOLTÍSSIMES GRÀCIES A TOTS ELS QUE M’HEU ACOMPANYAT DURANT AQUESTS 40 ANYS QUE M’HAN PERMÈS CREAR-ME TAL I COM VULL SER.