Skip to content

Instantly share code, notes, and snippets.

View ashutoshkrris's full-sized avatar
🏠
Learning from home

Ashutosh Krishna ashutoshkrris

🏠
Learning from home
View GitHub Profile
@ashutoshkrris
ashutoshkrris / PY0101EN-4-1-ReadFile.ipynb
Created October 10, 2019 13:17
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ashutoshkrris
ashutoshkrris / PY0101EN-4-2-WriteFile.ipynb
Created October 10, 2019 13:24
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ashutoshkrris
ashutoshkrris / PY0101EN-5-1-Numpy1D.ipynb
Created October 10, 2019 14:15
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ashutoshkrris
ashutoshkrris / PY0101EN-5-2-Numpy2D.ipynb
Created October 10, 2019 14:30
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ashutoshkrris
ashutoshkrris / Keepass.py
Last active June 20, 2020 05:50
KeePass - Password Assistant
#Importing libraries
import sys
import time
import getpass
def deleteLine(file,st): #Function to delete password
fn = open(file+".txt")
output = []
for line in fn:
if not line.startswith(st):
@ashutoshkrris
ashutoshkrris / wisher.py
Last active July 1, 2020 07:40
Automated Birthday Wisher
import pandas as pd
import datetime
import smtplib
import time
import requests
from win10toast import ToastNotifier
#your gmail credentials here
GMAIL_ID = 'your_email_here'
GMAIL_PWD = 'your_password_here'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ashutoshkrris
ashutoshkrris / pipenv_cheatsheet.md
Last active August 31, 2024 21:06
Pipenv Cheat Sheet

Pipenv Cheat Sheet

Install pipenv

pip install pipenv

Activate pipenv

pipenv shell
@ashutoshkrris
ashutoshkrris / git.md
Last active October 4, 2020 16:14
This cheatsheet contains common Git commands we use daily.

Initialise an empty repository

git init

Add remote origin

git remote add origin <origin-url>

Stage your changes

git add . to stage all changes at once.

git add to stage specific file

@ashutoshkrris
ashutoshkrris / prime.py
Created January 31, 2021 12:57
Prime Numbers using Sieve of Eratosthenes in Python
def seive_of_eratosthenes(n):
is_prime = [True for _ in range(n+1)]
is_prime[0], is_prime[1] = False, False
for i in range(2, int(n**0.5)+1):
for j in range(2*i, n+1, i):
is_prime[j] = False
return is_prime