Postingan

Menampilkan postingan dari Maret, 2022

A Reminder for Everyone: Be Sceptical!

Gambar
Mengingat perkembangan akhir-akhir ini ketika kita banyak disuguhkan data dan visualisasi yang terdistorsi, ada semacam kewajiban moral dan intelektual untuk mengingatkan kita semua untuk tidak langsung tersilaukan oleh pernyataan-pernyataan yang megklaim merupakan produk dari analisis dan pengolahan data. Penggunaan terminologi yang tidak pada tempatnya (dan bahkan cenderung abusive ) seperti big data dan machine learning harus dikritisi habis-habisan, tidak peduli siapapun yang menggunakan istilah-istilah tersebut. Seringkali saya pribadi jumpai penggunaan tidak pada tempatnya atas istilah-istilah tersebut dilakukan oleh orang-orang yang bahkan tidak mengerti apa 'big data' atau 'machine learning' itu sendiri.  Belum lagi produk yang diklaim berasal dari so-called data analysis  seringkali digunakan sebagai justifikasi pembentukan opini publik atau bahkan lebih parah lagi:  policy . Kental dengan bias dan conflict   of interest .  Trust me, I've seen enough. Sej

A Midnight Complaint

I don't really care about all these 'sandwich generation' things I am suffering financially and mentally, yet I need to put my angel face in front of everyone pretending that there is no issue, pretending that life runs as usual I put everyone's expectations on my shoulder and my head every now and then Now I'm ready to explode I am no longer aware of what I do really want I have been too busy becoming a people pleaser On a night like this, with blacked eyes and a tired look in my face, I am screaming loud inside. Breaking all the silence a Thursday night could offer. I love my beloved ones but that seems not enough And I hate people laughing at something I could not afford for And I hate how people belittling anything, anything that my wallet could scream out loud I hate it But what can I do? Seems I have been trying to live by the standard beyond mine I am just tired I am sick of people laughing and smiling at things they put price tags on I just want to live as l

Convert Epoch Time to Datetime in Python

import datetime epoch_time =  1541290680 result_datetime = datetime.datetime.fromtimestamp(epoch_time) print(result_datetime)  # prints 2018-11-04 12:18:00 or alternatively, if you're in rush, head to online epoch converter here code source:  https://www.javatpoint.com/python-epoch-to-datetime

Word Wrapping in Google Colab using textwrap

  import textwrap wrapper = textwrap.TextWrapper(width=40, initial_indent=" " * 4, subsequent_indent=" " * 4, break_long_words=False, break_on_hyphens=False) print( wrapper.fill (string)) source

Using dict.get()

dict.get()  is used to get the value of an item in a given dictionary using its key (see W3Schools for further reference). Why do we use e this method? We can access the item value just by calling its key directly, can't we? (e.g. dict[key]) I think the main advantage of this method is we can actually check whether or not a key exists in the given dictionary without having the hassle of getting an error returned if the key does not exist. How come? dict.get()  accepts two parameters: the key itself and ... the value   (optional).  The value  will return a specified value if the key we look for does not exist in the dictionary. Example: Suppose we have a dictionary, namely d, as follows: d = {'a': 1, 'b':2, 'c':3} Suppose we would like to get the value of an item with key = 'z'.  d['z'] will raise an error due to the fact that there is no item in the dictionary d whose key is 'z'.  Now, if we apply dict.get() as follows:  dict.get(