Skip to content

Instantly share code, notes, and snippets.

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

Siladittya Manna sadimanna

🏠
Working from home
View GitHub Profile
@primus852
primus852 / cuda_11.7_installation_on_Ubuntu_22.04
Last active April 17, 2024 22:34 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.7 and cuDNN 8.5 installation on Ubuntu 22.04 for PyTorch 1.12.1
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active April 29, 2024 11:43
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.
@sadimanna
sadimanna / clahe.py
Last active January 29, 2024 03:50
Contrast Limited Adaptive Histogram Equalization in Python
'''
"Contrast Limited Adaptive Histogram Equalization"
by Karel Zuiderveld, karel@cv.ruu.nl
in "Graphics Gems IV", Academic Press, 1994
_Author_ -- Siladittya Manna
The below implementation does not assume that the
X- and Y image resolutions are an integer multiple
of the X- and Y sizes of the contextual regions.
@jayspeidell
jayspeidell / kaggle_download.py
Last active July 18, 2023 12:23
Sample script to download Kaggle files
# Info on how to get your api key (kaggle.json) here: https://github.com/Kaggle/kaggle-api#api-credentials
!pip install kaggle
api_token = {"username":"USERNAME","key":"API_KEY"}
import json
import zipfile
import os
with open('/content/.kaggle/kaggle.json', 'w') as file:
json.dump(api_token, file)
!chmod 600 /content/.kaggle/kaggle.json
!kaggle config path -p /content
@nlsandler
nlsandler / lstm.py
Created November 29, 2017 20:22
DIY LSTM in Keras
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Building an LSTM from scratch with Keras (if that's not a contradiction)"""
from keras import backend as K
from keras.engine.topology import Layer
import numpy as np
from keras.layers import RNN, Dense, Activation,LSTM
from keras.models import Model
import keras
@shellqiqi
shellqiqi / CLAHE.c
Created November 27, 2017 03:52
Contrast Limited Adaptive Histogram Equalization
/*
* ANSI C code from the article
* "Contrast Limited Adaptive Histogram Equalization"
* by Karel Zuiderveld, karel@cv.ruu.nl
* in "Graphics Gems IV", Academic Press, 1994
*
*
* These functions implement Contrast Limited Adaptive Histogram Equalization.
* The main routine (CLAHE) expects an input image that is stored contiguously in
* memory; the CLAHE output image overwrites the original input image and has the
@stared
stared / live_loss_plot_keras.ipynb
Last active February 25, 2023 10:20
Live loss plot for training models in Keras (see: https://github.com/stared/livelossplot/ for a library)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active April 30, 2024 12:39
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@roachhd
roachhd / README.md
Last active May 1, 2024 22:17
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄