Skip to content

Instantly share code, notes, and snippets.

View AVIPAGHADAR1729's full-sized avatar
🎯
Focusing

AVIPAGHADAR1729

🎯
Focusing
View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@AVIPAGHADAR1729
AVIPAGHADAR1729 / README.md
Created April 12, 2022 05:36 — forked from eruvanos/README.md
Simple mock server for testing using Flask

Mock server for testing using flask

License

MIT

Prepare

Install flask and requests to run this example.

@AVIPAGHADAR1729
AVIPAGHADAR1729 / react-redux-resources.md
Created March 31, 2022 11:03 — forked from azs06/react-redux-resources.md
List of resources to learn react and it's ecosystem
@AVIPAGHADAR1729
AVIPAGHADAR1729 / fibo.py
Created March 23, 2022 08:27
Fast Way to Find Fibonacci Terms List
from typing import Any, Generator
def fibo(N: int) -> Generator[int, Any, Any]:
"""Return Generator of Fibonnaci Terms
Args:
N (int): Fibonaaci Terms Upto the N'th
Raises:
@AVIPAGHADAR1729
AVIPAGHADAR1729 / pascal_rows.py
Created March 17, 2022 05:54
Pascal Rows with Clean Pythonic Code
"""
New Version of Pascal row with prettyfy the rows
"""
from functools import wraps
from math import comb
# ____________________________________________________________________________________ #
@AVIPAGHADAR1729
AVIPAGHADAR1729 / bobp-python.md
Created March 3, 2022 06:35 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens

Cheatsheet for Django QuerySets

Current Django Version: 2.2

Methods that return new QuerySets

Can be chained:

Entry.objects.filter(**kwargs).exclude(**kwargs).order_by(**kwargs)
@AVIPAGHADAR1729
AVIPAGHADAR1729 / 1.srp.py
Created February 21, 2022 05:39 — forked from dmmeteo/1.srp.py
SOLID Principles explained in Python with examples.
"""
Single Responsibility Principle
“…You had one job” — Loki to Skurge in Thor: Ragnarok
A class should have only one job.
If a class has more than one responsibility, it becomes coupled.
A change to one responsibility results to modification of the other responsibility.
"""
class Animal:
def __init__(self, name: str):