Skip to content

Instantly share code, notes, and snippets.

View shawonis08's full-sized avatar
🏠
Working from home

Shahidul Islam shawonis08

🏠
Working from home
  • HeadBlocks, Socian Ltd.
  • Dhaka,Bangladesh
  • 07:48 (UTC +06:00)
View GitHub Profile
@shawonis08
shawonis08 / Oracle Attach_BLOCK_Volume_Instance.md
Last active April 25, 2024 09:02
This readme provides a step-by-step guide for attaching an Oracle Block Volume to an instance and creating a partition, file system, and mounting the file system. It also includes instructions for updating the /etc/fstab file to automatically mount the disk when the system boots, rebooting the instance, and checking the file system. The guide al…

Oracle Attach BLOCK Volume to Instance

  • Creating a partition with fdisk
  • Creating an ext3 file system
  • Mounting the file system
  • Updating the /etc/fstab file
  • Rebooting the instance
  • Checking the file system

Preparation

@shawonis08
shawonis08 / dockerized_postgresql_backup_restore.md
Last active February 17, 2023 15:41
This document describes how to back up and restore a PostgreSQL database within a Docker container. The manual offers instructions for exporting and importing the database, as well as a link to a related Stack Overflow thread for further information.

Backup/restore a dockerized postgresql database

  • Export Database

docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
  • Import Database

@shawonis08
shawonis08 / Google Sheets Number Translation Formula.md
Last active February 15, 2023 07:14
convert the numerical values of one language to those of another. In order to accomplish the translation, the formula makes use of the vlookup and mid functions. The formula is included in the guide, as well as a link to the primary support post where the topic was initially brought up.

Google Sheets Number Translation Formula

=arrayformula( 
  concatenate( 
    iferror( 
      vlookup( 
        mid(A1, row(A$1:A), 1), 
        { 
 mid("0123456789", row(A$1:A), 1), 
@shawonis08
shawonis08 / sender.py
Created September 2, 2021 18:06
rabbitmq remote server connection with python
from pika import PlainCredentials, ConnectionParameters, BlockingConnection
USERNAME = ''
PASSWORD = ''
IPADDRESS = ''
PORT = 5672
credentials = PlainCredentials(USERNAME, PASSWORD)
parameters = ConnectionParameters(IPADDRESS,
@shawonis08
shawonis08 / Loading model custom trained weig.pyhts using pytorch hub
Last active February 19, 2023 05:15
Loading custom trained model weights using pytorch hub
model = torch.hub.load('ultralytics/yolov5', 'custom', path='path/to/best.pt') # default
model = torch.hub.load('path/to/yolov5', 'custom', path='path/to/best.pt', source='local') # local repo
@shawonis08
shawonis08 / LinuxCUDAtoolkits.md
Last active January 12, 2022 12:28 — forked from khansun/LinuxCUDAtoolkits.md
Multiple versions of CUDA toolkit and CUDNN installation guide for Linux

Remove previous NVIDIA drivers if needed:

sudo dpkg -P $(dpkg -l | grep nvidia-driver | awk '{print $2}')

sudo apt autoremove

sudo lshw -C display

NVIDIA Apmere cards including 3070, 3080 and 3090 dos not work with CUDA 10.
@shawonis08
shawonis08 / convert_dataturks_to_spacy.py
Last active May 13, 2020 05:36 — forked from brykneval/convert_dataturks_to_spacy.py
Creates NER training data in Spacy format from JSON downloaded from Dataturks.
############################################ NOTE ########################################################
#
# Creates NER training data in Spacy format from JSON downloaded from Dataturks.
#
# Outputs the Spacy training data which can be used for Spacy training.
#
############################################################################################################
def convert_dataturks_to_spacy(dataturks_JSON_FilePath):
try:
training_data = []