Skip to content

Instantly share code, notes, and snippets.

View mh-github's full-sized avatar

Mahboob Hussain mh-github

View GitHub Profile
The world would see when my hear speaks up like a blast
My silence is not silence, it a grave desire first and last
As the wave in the river averred "my glory lies in travel eternal"
"In residing in the shell lies my dignity" said the pearl
Not a heart, which is not a house of desire, have I seen
What is this world O Lord, but a gallery of longings sharp and keen!
The heart yearns for fulfillment, the eye is longing for sight,
What is it that I am for the day and night!
If there is no aptitude, education will hardly anything mean
The shadow the tree on the river bank will never become green.
Little fly,
Thy summer's play
My thoughtless hand
Has brushed away.
Am not I
A fly like thee?
Or art not thou
A man like me?
For I dance
And drink, and sing,
O rose, thou art sick!
The invisible worm,
That flies in the night,
In the howling storm,
Has found out thy bed
Of crimson of joy,
And his dark secret love
Does thy life destroy
Poetry is an expression of imagination
The expressions happiness of a child to minor objects is the same in poetry to higher objects
A man becomes an object of pleasure for another man
Poet's language is vitally metaphorical
A poem is the very image of life expressed in its eternal truth
A story is a particular fact in a mirror which obscures and distorts that which should be beautiful; poetry is a mirror which makes beautiful that which is distorted.
A poet is a nightingale, who sits in darkness and sings to cheer its own solitude with sweet sounds; his auditors are men entranced by the melody of an unseen musician, who feel they are moved and softened, yet know not whence or why.
import PyPDF2, docx, textract, os
def getOutfileName(infile):
name_arr = infile.split('.')
str = ""
for i in range(len(name_arr)-1):
str += name_arr[i] + '.'
return str + 'txt'
@mh-github
mh-github / gist:6549d17fece34b2dee816dfaa45298e7
Last active January 23, 2019 17:39
Rails (with MySQL) environment on Windows 10
Ran the above two commands repeatedly
$ sudo apt update
$ sudo apt install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev
Install rbenv
$ cd
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ exec $SHELL
@mh-github
mh-github / ror-win10.md
Last active November 5, 2018 19:14
Installing Ruby on Rails on Windows 10

After installing Ubuntu, I had to run the following two commands repeatedly. I haven't noted the exact error messages I got.

$ sudo apt update
$ sudo apt install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

Install rbenv

$ cd
$ git clone https://github.com/rbenv/rbenv.git .rbenv
@mh-github
mh-github / prognosis.md
Last active November 3, 2017 19:18
Prognosis for 2019 Elections

The task of predicting election results is fraught with failure. When opinion polls, run on statistical methodologies, themselves get it wrong more often than not, what chance does a prognosis based on subjective analysis and anecdotal evidence fare? Not even a wild one.

Yet I attempt. Because events that alter the voting preference of an entire nation to cause a regime change are like black swan events. High impact events that cause to defeat the current incumbent are an extreme rarity. Therefore the uncertainty is reduced and we can reach a reasonable conclusion.

The null hypothesis is that Mr. Modi will win 2019. In ordinary language, this is the prevalent belief. The alternative hypothesis or the contrarian claim, is that Mr. Modi will not win.

In statistics, you would take a random population sample to calculate a test static and examine its value. If the value is in the region of rejection, the prevalent belief is rejected, thus accepting the contrarian claim. Otherwise, that is,

@mh-github
mh-github / gist:b546e1f3c50ed67d53ca12edec306191
Created November 3, 2017 14:43
Prognosis for 2019 Elections.
The task of predicting election results is fraught with failure. When opinion polls, run on statistical methodologies, themselves get it wrong more often than not, what chance does a prognosis based on subjective analysis and anecdotal evidence fare? Not even a wild one.
Yet I attempt. Because events that alter the voting preference of an entire nation to cause a regime change are like black swan events. High impact events that cause to defeat the current incumbent are an extreme rarity. Therefore the uncertainty is reduced and we can reach a reasonable conclusion.
The null hypothesis is that Mr. Modi will win 2019. In ordinary language, this is the prevalent belief. The alternative hypothesis or the contrarian claim, is that Mr. Modi will not win.
In statistics, you would take a random population sample to calculate a test static and examine its value. If the value is in the region of rejection, the prevalent belief is rejected, thus accepting the contrarian claim. Otherwise, that is, the test statistic
<div style="style="width:320px; overflow-x:auto;">
<table style="border:1px solid black;">
<tr>
<th style="border:1px solid black; background-color:#BDB76B; color:white;">Twitter Id</th>
<th style="border:1px solid black; background-color:#BDB76B; color:white;"># Tweets</th>
<th style="border:1px solid black; background-color:#BDB76B; color:white;">Avg. words</th>
<th style="border:1px solid black; background-color:#BDB76B; color:white;">LD</th>
<th style="border:1px solid black; background-color:#BDB76B; color:white;">Frequent words</th>
<th style="border:1px solid black; background-color:#BDB76B; color:white;">Popularity</th>
<th style="border:1px solid black; background-color:#BDB76B; color:white;">Sentiment</th>