Skip to content

Instantly share code, notes, and snippets.

View shiyanshirani's full-sized avatar
:octocat:
Reading documentation

Shiyan Shirani shiyanshirani

:octocat:
Reading documentation
  • CrowdANALYTIX
  • Bengaluru
  • 09:11 (UTC +05:30)
View GitHub Profile
@shiyanshirani
shiyanshirani / iterm2.md
Created September 19, 2021 07:39 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@shiyanshirani
shiyanshirani / models.py
Created June 20, 2021 03:31
student->teacher model
from django.db import models
# Create your models here.
class Teacher(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField(max_length=254)
phone_number = models.BigIntegerField()
# photo = models.ImageField(upload_to = "images/") # pip3 install pillow
address = models.TextField(blank=True)
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py
import requests
from bs4 import BeautifulSoup
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko)'
}
baseurl = "https://www.flipkart.com"
productlink = []
@shiyanshirani
shiyanshirani / search_helper.py
Created October 7, 2020 09:40
search_helper for trees
def search_helper(self, start_node, find_val):
if start_node:
if start_node.value == find_val:
return True
elif start_node.value > find_val:
return self.search_helper(start_node.left, find_val)
else:
return self.search_helper(start_node.right, find_val)
else:
return False