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
#include<bits/stdc++.h> | |
using namespace std; | |
int main() | |
{ | |
/* Basic Declaration */ | |
// vector<int> vec_1(5); | |
// vector<int> vec_2(4,10); | |
// vector<int> vec_3{1,2,3,4,5}; |
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
# -*- coding: utf-8 -*- | |
import os | |
import itertools | |
import codecs | |
import re | |
import datetime | |
import cairocffi as cairo | |
import editdistance | |
import numpy as np |
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
for i in range(50): | |
img=np.insert(img,0,255,axis=1) | |
for i in range(50): | |
img = np.insert(img, img.shape[1], 255, axis=1) | |
for i in range(25): | |
img = np.insert(img, 0, [255], axis=0) | |
for i in range(25): | |
img = np.insert(img, img.shape[0], 255, axis=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
imgwide = 564 | |
from PIL import Image | |
strn = "testpage/01000" + str(i) + ".bin.png" | |
# img = Image.open('test2.png') | |
# img = img.resize((imgwide, 64), Image.ANTIALIAS) | |
img = cv2.imread(strn) | |
img = cv2.resize(img, (imgwide, 64)) | |
# # |
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
#include<iostream> | |
#include<climits> /*Used for INT_MAX*/ | |
using namespace std; | |
#define vertex 7 /*It is the total no of verteices in the graph*/ | |
int minimumDist(int dist[], bool Dset[]) /*A method to find the vertex with minimum distance which is not yet included in Dset*/ | |
{ | |
int min=INT_MAX,index; /*initialize min with the maximum possible value as infinity does not exist */ | |
for(int v=0;v<vertex;v++) | |
{ | |
if(Dset[v]==false && dist[v]<=min) |
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
#include <bits/stdc++.h> | |
using namespace std; | |
typedef vector<int> vi; | |
typedef pair<int,int> pii; | |
typedef vector< pii > vii; | |
#define INF 0x3f3f3f3f | |
vii *G; // Graph |