Skip to content

Instantly share code, notes, and snippets.


Nahiyan Alamgir nahiyan

View GitHub Profile
nahiyan /
Created Sep 2, 2019
RC Plane Planning

Controls: Elevator, Ailerons, Rudder, Flaps, and throttle (5 channels).

nahiyan /
Created Aug 28, 2019
Mount NTFS partition macOS
diskutil list

sudo mkdir /Volumes/NTFS
sudo umount /dev/disk0s3
sudo ntfs-3g /dev/disk0s3 /Volumes/NTFS -olocal -oallow_other
nahiyan /
Last active Aug 10, 2019
Car Number Plate Dataset Creation Details


If anyone is up for creating a car number plate detector based on machine learning (such as neural networks), tons of images for training is required. There is good amount of data available online for training number plate detectors. However, here's a problem - they do not work very well with Bangladeshi number plates; it's because Bangladeshi number plates are quite different from British, American, or even Indian ones. Images of Bangladeshi number plates are extremely limited on Google, and no dataset containing such images is publicly available. This calls for the need of creating a dataset containing photos of Bangladeshi number plates, which will be released publicly for free. This is intended to help everyone from beginners to machine learning to data scientists. Our work is intended to be primarily used for training neural networks.


To create a good dataset, the data needs to be diverse and distinguishable. Too similar data can be misleading to a neural network. Here ar

nahiyan /
Last active Sep 10, 2020
TIV error with JPEG image

TIV failed to work for me when I tried to use it to view a JPEG image. Giving me this error when I tried to view a JPEG image:

[CImg] *** CImgIOException *** [instance(0,0,0,0,(nil),non-shared)] CImg<unsigned char>::load(): Failed to recognize format of file 'raw_images/9.jpg'.

Here are the details of that file:

raw_images/9.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=10, height=0, manufacturer=RaspberryPi, model=RP_imx219, xresolution=156, yresolution=164, resolutionunit=2, datetime=2019:08:03 11:11:14, width=0], baseline, precision 8, 1280x720, components 3

import cv2
import imutils
import numpy as np
import pytesseract
from PIL import Image
def wait():
nahiyan /
Created Jun 30, 2019
Java References and Passing Arguments


Java supports references, but it doesn't allow pass by references. Here, we're going to play with Java to understand the concepts better.


Let's think of a simple object, such as a string:

String name = "Paul Stanley";
nahiyan / purity-haskell-freenode
Last active May 13, 2019 — forked from robstewart57/purity-haskell-freenode
Confusion about analogy's of purity in Haskell
View purity-haskell-freenode
[18:27] <trumanshow19> Would someone mind help iron out the
inconsistencies in my head with respect to purity in
Haskell. Statement 1: Haskell is a purely functional lanugage, S2:
Haskell is not impure, but... S3: f :: a -> a is a "pure" function as
opposed to a -> IO a.
[18:27] <trumanshow19> If a -> is pure, to distinguish a -> IO a, then
how do I describe the latter, is there is no impurity in Haskell ?
[18:28] <trumanshow19> The only opposite of pure I know is impure.

Verse 1

From time to time, I wonder how, how it all began, how it all prevailed

I think about you and your smile, I have embedded in my mind

From the night we first met each other, to the day we’re in today

Nights go and days come, I can't wait to live with you



  1. Our main goal is to use django to create a project.
  2. Since, django is a python framework, we need to install python to run it.
  3. However, there are 2 major versions of python available - python 2 and python 3.
  4. We're going to use python 3 since it's the latest version available and is way better than python 2.
  5. Pip is the package manager for python, we use pip to install python programs so we don't have to download, configure and install it ourselves.
  6. Managing python versions (2 and 3) is a bit tedious, so we're going to use virtualenv.
  7. Virtualenv will help us create isolated environment for our django project so we can set which python version we're going to use and not worry about anything at all. There are many other benefits of using it which you'll see later.
View heroku-log
2018-12-26T17:30:20.557758+00:00 app[web.1]: [2018-12-26 17:30:20 +0000] [10] [INFO] Worker exiting (pid: 10)
2018-12-26T17:30:20.860732+00:00 app[web.1]: [2018-12-26 17:30:20 +0000] [4] [INFO] Shutting down: Master
2018-12-26T17:30:20.861125+00:00 app[web.1]: [2018-12-26 17:30:20 +0000] [4] [INFO] Reason: Worker failed to boot.
2018-12-26T17:30:21.089174+00:00 heroku[web.1]: State changed from up to crashed
2018-12-26T17:30:21.069711+00:00 heroku[web.1]: Process exited with status 3
2018-12-26T17:30:21.000000+00:00 app[api]: Build succeeded
2018-12-26T17:30:35.331409+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" request_id=962f35a8-2378-419b-bbb4-cd8f6b6219e5 fwd="" dyno= connect= service= status=503 bytes= protocol=https
2018-12-26T17:30:36.799912+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/apple-touch-icon-precomposed.png" request_id=e4fde1f8-856a-41c3-96a2-c12bd405681c fwd="