Postingan

Menampilkan postingan dengan label Coding

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

Training a Classifier

Gambar
As I write this post, I have been waiting for the training process to be completed. It's still the first epoch but it feels like it is taking ages. Forgive me, by the time I uploaded this image, it has reached the 4th epoch.  The first epoch is yet to be concluded. The accuracy is somehow far from my expectation. Anyway, it's still on the first epoch, so things might be about to change. At this stage, I am surprised by how much a love-hate relationship is involved in training a classifier. You get excited when your result meets your expected threshold but most of the time, you are left disappointed.  But still, I cannot find any other things quite interesting to do. I love how data can transform into valuable insight. I love how to spot patterns out of so-called trash and raw data. But really, I am just too lazy to explore further and anticipate more options of workaround to improve the classifier's performance. Not to mention how intimidated I am to see the progress made b...

How to Print Today's Date and Current Timestamp in Python

Gambar
 

Punctuation Removal using Python

Gambar
Let a string variable named s  = '!!ab#c???' Use the following lines to remove all punctuations from s The result of the code above: Clean and concise! London, January 26 2022