Skip to content

Instantly share code, notes, and snippets.

View imneonizer's full-sized avatar
:octocat:
Developing for the python community!

Nitin Rai imneonizer

:octocat:
Developing for the python community!
View GitHub Profile

Find all the available mountable file drives on your system:

sudo fdisk -l

output:

Disk /dev/ram0: 8 MiB, 8388608 bytes, 16384 sectors

What is tmux

tmux is a ssh session logging/sharing tool which we can use to reconnect to a ssh session even if we lost the connection in between.

How to install

First we need to install it in the remote machine, to do so ssh into the remote machine and run this command

sudo apt-get install tmux

For Example:

1. Automatic authentication to remote machine

Note:- with this you don't need to type password every time to do the ssh connection.

Step One—Create the RSA Key Pair (your machine)

ssh-keygen -t rsa

Step Two—Store the Keys and Passphrase (your machine)

@imneonizer
imneonizer / cv2_multi_line_texts.py
Last active August 14, 2022 11:08
how to write multi line texts with opencv
import numpy as np
import cv2
import textwrap
img = np.zeros((500,500,3), dtype='uint8')
print(img.shape)
height, width, channel = img.shape
text_img = np.ones((height, width))
@imneonizer
imneonizer / clahe_correction.py
Created September 6, 2019 13:57
Short simple image processing script to automatically adjust brightness and contrast of input image
import cv2
import sys
import imutils
#-----Reading the image-----------------------------------------------------
img = cv2.imread('1.jpg')
#img = imutils.resize(img, width=400)
#cv2.imshow("img",img)
#-----Converting image to LAB Color model-----------------------------------

How To Publish Your PyPi Package

The PyPi package index is one of the properties that makes python so powerful, with just a simple command, you get access to thousands of cool libraries, ready for you to use. I am going to show you how you can upload your own package.

PyPi

Create a python package

To create a package, create a folder that is named exactly how you want your package to be named. Place all the files and classes that you want to ship into this folder.