Skip to content

Instantly share code, notes, and snippets.

View NISH1001's full-sized avatar
💭
Staring into the abyss...

Nish NISH1001

💭
Staring into the abyss...
View GitHub Profile
[('ENSMUSG00000117786', 0.19900803),
('ENSMUSG00000093954', 0.13898243),
('ENSMUSG00000028487', 0.13298473),
('ENSMUSG00000113575', 0.08847962),
('ENSMUSG00000056999', 0.043881908),
('ENSMUSG00000117465', 0.03738362),
('ENSMUSG00000067149', 0.03303743),
('ENSMUSG00000090352', 0.027412206),
('ENSMUSG00000094320', 0.020604169),
('ENSMUSG00000090015', 0.018502489),
[[{'condition': {'labels': ['condition_FLT', 'condition_GC'],
'train_score': 1.0,
'test_score': 1.0,
'confusion_matrix': array([[696, 0],
[ 0, 671]]),
'classification_report': {'condition_FLT': {'precision': 1.0,
'recall': 1.0,
'f1-score': 1.0,
'support': 696},
'condition_GC': {'precision': 1.0,
#!/usr/bin/env python3
def fib(n):
res = [1,1]
for i in range(n):
res.append(sum(res[-2:]))
return res
@NISH1001
NISH1001 / data-task3-icdar.txt
Last active September 3, 2020 03:48
Sample trainng data for task 3 of ICDAR
('d5e1edd79d924caeafbd9f08dbfc71f9',
('COMMERCIAL INVOICE\n'
'\n'
'INVOICE NO :\n'
'1111111\n'
'DATE : 20-Sep-18\n'
'\n'
'INVOICE OF :\n'
'BAGS OF POLYETHYLENE\n'
'TENO/ 8138\n'
@NISH1001
NISH1001 / plates.py
Created May 24, 2020 13:29
Process plate images for stopmotion video
#!/usr/bin/env python3
from tqdm import tqdm
import glob
import os
import sys
import cv2
import matplotlib.pyplot as plt
import numpy as np
@NISH1001
NISH1001 / randadd.py
Last active April 29, 2020 14:28
random sum user test
#!/usr/bin/env python3
import random
def main():
mn, mx = (10, 99)
correctness = 3
correct = 0
while True:
@NISH1001
NISH1001 / randsum.py
Created April 27, 2020 08:35
generate random numbers where column sums upto something
#!/usr/bin/env python3
import numpy as np
def main():
ncols = 3
nrows = 100
arr = np.random.random((nrows, ncols))
arr = arr / arr.sum(axis=0, keepdims=1) * 100
@NISH1001
NISH1001 / Transparent drawings in OpenCV.py
Created April 26, 2020 07:22 — forked from IAmSuyogJadhav/Transparent drawings in OpenCV.py
Add transparency to rectangles, circles, polgons, text or any shape drawn in OpenCV.
import cv2
image = cv2.imread('test.jpg')
overlay = image.copy()
x, y, w, h = 10, 10, 10, 10 # Rectangle parameters
cv2.rectangle(overlay, (x, y), (x+w, y+h), (0, 200, 0), -1) # A filled rectangle
alpha = 0.4 # Transparency factor.
@NISH1001
NISH1001 / linux-not-so-noob.md
Last active March 13, 2020 10:50
linux-not-so-noob

IO Error, Bad Block / Superblock

  • first boot into live disk/usb
  • use smartmontools
  • make sure smart mode is on using smartctl
  • figure out which /dev/sdX partition has bad blocks
  • perfrom fschk -y /dev/sdX
  • see if /dev/sdX can be mounted using mount

Make sure you aren't doing fschk from initrmfs screen which is a fallback screen in case of kernel panic

@NISH1001
NISH1001 / twittermute.txt
Created January 25, 2020 02:36 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet