Cogear.js blog works for GitHub Pages too, but with many obstacles.

July 2, 2019
Cogear.js blog works for GitHub Pages too, but with many obstacles.

You can try to follow this post (https://itnext.io/how-to-build-a-blog-with-cogear-js-fd45a6cfbde1), but it isn't enough to make it a customized blog.

Hosting MongoDB version 4 server on DigitalOcean

July 1, 2019
Hosting MongoDB version 4 server on DigitalOcean

My gripe comes from the limitation with free tier and lower tiers of MongoDB Atlas. (Where can I host MongoDB with allowDiskUse=true?) So, I have decided to host my own MongoDB on DigitalOcean.

An Analysis on Password Strength vs. Memorability

March 2, 2018
An Analysis on Password Strength vs. Memorability

As I am creating memorable-password project, I am challenged on whether diceware-type passwords / memorable passwords are really strong.

I learnt about Entropy and created (actually updated an old project) passwordstrength.

I formularized the concept on memorability based on pronounceability with NLTK and double metaphone -- pronounceable.

Here is the result.

Sharing Python project that works in another computer!

February 27, 2018
Sharing Python project that works in another computer!

I find that the issue may includes:-

  • Module dependencies

    • This can be solved by using virtualenv since the very beginning of the project
  • Different python version

    • This can be managed very beautifully with tox

[Python-web.py] Turning website into a desktop app

February 14, 2018
[Python-web.py] Turning website into a desktop app

This is what I have got:

from ui.mainWindow import MainWindow
from webview.controller import initServer

from PyQt5.QtWidgets import *
import sys
import httplib2
from time import sleep

if __name__ == '__main__':
    initServer().start()

    h = httplib2.Http()
    while True:
        try:
            resp = h.request("http://0.0.0.0:8080/", 'HEAD')
            break
        except ConnectionRefusedError:
            sleep(1)
            continue

    app = QApplication(sys.argv)
    window = MainWindow()
    window.showUI()
    window.setBaseSize(1000, 600)
    window.move(QDesktopWidget().rect().center().x()-window.rect().center().x(), window.rect().y())
    sys.exit(app.exec_())