Skip to content

Instantly share code, notes, and snippets.

View ibrahimsha23's full-sized avatar
🙃

Ibrahim ibrahimsha23

🙃
  • bangalore
View GitHub Profile

Daily

  • Support your people
  • Unblock and de-risk
  • Administrative duties
  • Communicate updates internally
  • Provide downward feedback

Sprintly

  • Review key metrics
  • Assess team happiness

Pep-8-speaks

  • auto-linting-pr
  • how it works
    • setting up repo
    • private repo
    • adding tokens in repo
    • configure webhooks in github
  • demo
@ibrahimsha23
ibrahimsha23 / subsets.py
Created March 5, 2022 14:26
Calculate subsets of elements in an array
import copy
import string
alphabet_string = list(string.ascii_lowercase)
def subsets(arr):
"""
Calculate subsets of elements in an array ..
@ibrahimsha23
ibrahimsha23 / url_regex.py
Created February 22, 2022 10:19
Regex pattern to split the hostname from url path
import re
def url_path_to_dict(path):
pattern = (r'^'
r'((?P<schema>.+?)://)?'
r'((?P<user>.+?)(:(?P<password>.*?))?@)?'
r'(?P<host>.*?)'
r'(:(?P<port>\d+?))?'
r'(?P<path>/.*?)?'
r'(?P<query>[?].*?)?'
r'$'
from collections import deque
class Solution(object):
grid = None
boundary = None
food_path_distance = None
queue_counter = deque()
visited = {}
def getFood(self, grid):
@ibrahimsha23
ibrahimsha23 / django_pandas_integeration.md
Created May 28, 2021 07:16
Easy way to convert django model objects to csv formats

Steps to download the django model obj to csv file

Installation

pip install django-pandas

{
"listeners": {
"*:5000":{
"pass": "applications/flask"
},
"*:8080": {
"pass": "routes/wordpress"
},
"*:8081": {
"pass": "applications/api"
{
"listeners":{
"*:8080":{
"pass": "applications/flask"
}
},
"applications": {
@ibrahimsha23
ibrahimsha23 / base.py
Created October 23, 2020 18:48
BInary Tree - Level Up ordering
class Node:
def __init__(self, data):
self.left, self.right = None, None
self.data = data
self.children = 0
def ___print___(self):
print("Node--data is {}, left pointer is {} and right pointer is {} ".format(
self.data,
# load libraries

import requests
from bs4 import BeautifulSoup
import pandas as pd