Skip to content

Instantly share code, notes, and snippets.

@rishabhc32
rishabhc32 / india_city_to_state.json
Created August 25, 2021 09:30
India city to state map JSON
{
"ACHHNERA": "UTTAR PRADESH",
"ADALAJ": "GUJARAT",
"ADOOR": "KERALA",
"ADYAR": "KARNATAKA",
"ADRA": "WEST BENGAL",
"AFZALPUR": "KARNATAKA",
"AKOT": "MAHARASHTRA",
"ALIPURDUAR": "WEST BENGAL",
"ALIRAJPUR": "MADHYA PRADESH",
@rishabhc32
rishabhc32 / pan.py
Created December 3, 2020 14:56
Mock PAN extraction library
from random import randrange
class BackendError(Exception):
pass
def get_pan_data(pan_number):
num = randrange(10)
@rishabhc32
rishabhc32 / insert_tag.py
Last active October 4, 2020 15:30
Convert cover hugo front matter "cover_image" key to "image" key
"""
Include a safety pig in your code as a warning to other developers that hard-to-read code and crazy hacks follow.
You have been warned!
_._ _..._ .-', _.._(`))
'-. ` ' /-._.-' ',/
) \ '.
/ _ _ | \
| a a / |
\ .-. ;
LD_LIBRARY_PATH=/opt/opencv2/lib optirun ./darknet detector demo cfg/coco.data cfg/yolov2-tiny.cfg yolov3-tiny.weights

These are my solutions, YMMV

Question 1

string = input()
upper = lower = 0
for i in string:
    if(i.isupper()):
        upper += 1
    elif(i.islower()):

These are my solutions, your mileage may vary.

Remember, no solution is wrong.

Question 1

ip = int(input())
var = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
ans = [x for x in var if x < ip]
print(ans)