This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
import tensorflow as tf | |
from tqdm import tqdm | |
# import tensorflow_io as tfio | |
import cv2 | |
from sklearn.metrics import accuracy_score, precision_score, recall_score |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import math | |
import os | |
# Source: https://stackoverflow.com/questions/37842476/image-tiling-in-loops-using-python-opencv | |
# credit: https://stackoverflow.com/users/2561733/telepinu | |
Path = "FullImage.tif"; | |
filename, file_extension = os.path.splitext(Path) | |
image = cv2.imread(Path, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table employee ( | |
fname varchar2(15), | |
mname char(2), | |
lname varchar2(15), | |
ssn char(9), | |
bdate date, | |
address varchar2(50), | |
sex char(1), | |
salary number(7), | |
superssn char(9), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ~/.bashrc | |
# | |
[[ $- != *i* ]] && return | |
colors() { | |
local fgc bgc vals seq0 | |
printf "Color escapes are %s\n" '\e[${value};...;${value}m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
class NodeHuffman { | |
int freq; | |
char character; | |
NodeHuffman left; | |
NodeHuffman right; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*;class NodeHuffman { int freq; char character; NodeHuffman left; NodeHuffman right;}class MinComparator implements Comparator<NodeHuffman> { @Override public int compare(NodeHuffman x, NodeHuffman y) { return x.freq - y.freq; }}public class Huffman { public static HashMap<Character,String> cipher= new HashMap<Character,String>(); public static void printCode(NodeHuffman root, String s) { if (root.left == null && root.right == null && Character.isLetter(root.character)) { cipher.put(root.character,s); System.out.println(root.character + ":" + s); return; } printCode(root.left, s + "0"); printCode(root.right, s + "1"); } // main function public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Enter a String that needs to be encoded to Huffman Code :"); String input = in.nextLine(); HashMap<Character,Integer> m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void displayTree(Node * root) { | |
std::vector<Node*> GlobalStack; | |
GlobalStack.push_back(root); | |
int emptyLeaf = 32; | |
bool isRowEmpty = false; | |
std::cout << "****......................................................****"; | |
while (!isRowEmpty) { | |
std::vector<Node*> LocalStack; | |
isRowEmpty = true; | |
for (int j=0; j<emptyLeaf; j++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure insertionSort( A : array of items ) | |
int holePosition | |
int valueToInsert | |
for i = 1 to length(A) inclusive do: | |
/* select value to be inserted */ | |
valueToInsert = A[i] | |
holePosition = i | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure selection sort | |
list : array of items | |
n : size of list | |
for i = 1 to n - 1 | |
/* set current element as minimum*/ | |
min = i | |
/* check the element to be minimum */ |
NewerOlder