Skip to content

Instantly share code, notes, and snippets.

View senthil090's full-sized avatar
💻
Building a Nocode Tool

SENTHILKUMAR S senthil090

💻
Building a Nocode Tool
  • Chennai, India
View GitHub Profile
#!/usr/bin/env python
'''Crop an image to just the portions containing text.
Usage:
./crop_morphology.py path/to/image.jpg
This will place the cropped image in path/to/image.crop.png.
For details on the methodology, see
t = int(input())
while (t != 0):
n = int(input())
print(int((n*(n-3))/2))
t -= 1
t = int(input())
for i in range(1,t+1):
st = input()
upper = int(0)
low = int(0)
digit = int(0)
special = int(0)
for j in range(0,len(st)):
if st[j].isupper():
upper += 1