Skip to content

Instantly share code, notes, and snippets.

View sanjivyash's full-sized avatar

Yash Sanjeev sanjivyash

  • Mumbai, India
View GitHub Profile

Python preparation

General Programming

YouTube Playlists: PythonSocratica

  1. Object Oriented Programming :
    • classes and objects
    • special functions examples and uses - __init__, __add__, __repr__, __call__
    • self keyword
from contextlib import contextmanager
from time import time, sleep
# decorators
def timer(func):
def f(*args, **kwargs):
before = time()
rv = func(*args, **kwargs)
after = time()
print(f"Time taken = {after- before}")
@sanjivyash
sanjivyash / django-steps.md
Last active September 5, 2020 10:41
Steps to start and manage a Django Project

Setup the Virtual Environment

For Windows users, use the following steps (you are free to use Conda environments if you want to) :

pip install virtualenv
cd my-django-project
virtualenv venv
venv\Scripts\activate.bat
pip install django
@sanjivyash
sanjivyash / mongoose-starter.js
Last active September 5, 2020 10:57
A starter file with various functions and properties of the mongoose library
const mongoose = require('mongoose');
const validator = require('validator');
const log = console.log;
mongoose.connect('mongodb://127.0.0.1:27017/tasty-momos', {
useNewUrlParser: true,
useCreateIndex: true
});
const User = mongoose.model('User', {
@sanjivyash
sanjivyash / EE338-Policy.md
Last active December 26, 2020 22:48
EE338 Digital Signal Processing : Voluntary Participation Policy 2020-21

DSP Participation Policy

Please keep in mind that this policy has been designed assuming honest involvement from students.

Challenges by Students

  • Students chosen for lecture presentation are requested to prepare two challenge questions (per lecture) available for all teams apart from the team of the problem creator.
  • Problems shall be reviewed and approved by the professor before publishing or presenting.
  • Every valid submission within a certain timeframe is worth 7 points, and as explained below aims at providing a fair chance to everyone to score and also improve their understanding of the subject in the process.