Skip to content

Instantly share code, notes, and snippets.

View qmaruf's full-sized avatar
🤖
Training robot

Quazi Marufur Rahman qmaruf

🤖
Training robot
View GitHub Profile
name: menv3.8
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=1_llvm
- abseil-cpp=20210324.2=h9c3ff4c_0
- albumentations=1.0.3=pyhd8ed1ab_0
- alsa-lib=1.2.3=h516909a_0
import matplotlib.pyplot as plt
def plotme(x, output):
plt.figure()
plt.imshow(x)
plt.savefig(output)
@qmaruf
qmaruf / headers
Last active February 18, 2021 00:44
from glob import glob
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
from tqdm import tqdm
%matplotlib inline
alabaster==0.7.11
apturl==0.5.2
astroid==2.0.1
axel-wrapper==0.0.1
Babel==2.6.0
backcall==0.1.0
beautifulsoup4==4.4.1
bleach==2.1.3
blinker==1.3
Brlapi==0.6.4
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
* delete current line
** go to the line, press esc, press dd
* undo
** `esc` + `u`
* paste python code
** `esc` + `:set paste`
* cut paste
@qmaruf
qmaruf / nvidia-docker2-deploy-ubuntu-16.04LTS.md
Created July 24, 2020 06:05 — forked from Brainiarc7/nvidia-docker2-deploy-ubuntu-16.04LTS.md
How to correctly install nvidia-docker2 on Ubuntu 16.04LTS

How to install NVIDIA Docker 2 package on Ubuntu and Debian:

If you came to this result (from Google or elsewhere) after realizing that Nvidia-docker's entry on this subject does not result in a working installation, here are the basic steps needed to install this package correctly:

For starters, ensure that you've installed the latest Docker Community edition by following the steps below:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

import matplotlib.pyplot as plt
SMALL_SIZE = 15
MEDIUM_SIZE = 15
BIGGER_SIZE = 15
plt.rc('font', size=BIGGER_SIZE) # controls default text sizes
plt.rc('axes', titlesize=SMALL_SIZE) # fontsize of the axes title
plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels
* Learning Bag-of-Features Pooling for Deep Convolutional Neural Networks
from PIL import Image, ImageDraw
import cv2
def draw_rect(img, box, img_src):
x1, y1, x2, y2 = map(int, box)
if img_src == 'pil':
draw = ImageDraw.Draw(img)
draw.rectangle(((x1, y1), (x2, y2)), width=10, outline="red")
del draw
elif img_src == 'cv2':