Skip to content

Instantly share code, notes, and snippets.

View VRamazing's full-sized avatar
🏠
Working from home

Vignesh Ramesh VRamazing

🏠
Working from home
View GitHub Profile
@VRamazing
VRamazing / index.html
Created September 11, 2017 20:34
Local Weather
<div class="container" ng-app="myApp" ng-controller="myCtrl">
<div class="card" ng-style="style">
<div class="card-content white-text">
<div class= "quote-text">
<br>
<p>{{city}}<span ng-show="city">,</span>{{country}}</p>
@VRamazing
VRamazing / expense.py
Last active February 9, 2025 12:59
Expense.py
# Suspain by Vignesh Ramesh(VRamazing)
in_thread do
sleep 20
loop do
4.times do
use_synth :blade
play :Fs3, release: 0.5
sleep 0.25
play :Gs3, release: 0.5
import os
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = 'Renames a Django project'
def add_arguments(self, parser):
parser.add_argument('new_project_name', type=str,
help='The new Django project name')
@VRamazing
VRamazing / graphs.js
Created September 23, 2019 13:45
DFS, BFS algorithm
function Graph(v){
this.vertices = v;
this.edges = 0;
this.adj = []
for(var i=0; i<this.vertices; ++i){
this.adj[i]=[];
// this.adj[i].push("");
}
this.addEdge = addEdge;
this.showGraph = showGraph;
@VRamazing
VRamazing / index.html
Created October 13, 2021 13:04
ReactJS Stopwatch
<div id="container"></div>
@VRamazing
VRamazing / index.html
Created October 13, 2021 13:11
ReactJS Stopwatch
<div id="container"></div>
@VRamazing
VRamazing / Expense_tracker.py
Last active February 9, 2025 12:58
Expense_tracker.py
def add_expense(expenses, amount, category):
expenses.append({'amount': amount, 'category': category})
def print_expenses(expenses):
for expense in expenses:
print(f'Amount: {expense["amount"]}, Category: {expense["category"]}')
def total_expenses(expenses):
return sum(map(lambda expense: expense['amount'], expenses))
@VRamazing
VRamazing / BinarySearchSqRoot.py
Last active February 9, 2025 12:57
BinarySearchToFindSquareRoot
def square_root_bisection(square_target, tolerance=1e-7, max_iterations=100):
if square_target < 0:
raise ValueError('Square root of negative number is not defined in real numbers')
if square_target == 1:
root = 1
print(f'The square root of {square_target} is 1')
elif square_target == 0:
root = 0
print(f'The square root of {square_target} is 0')
else:
@VRamazing
VRamazing / passwordgenerate.py
Created February 9, 2025 12:54
Password generator
import re
import secrets
import string
def generate_password(length=16, nums=1, special_chars=1, uppercase=1, lowercase=1):
# Define the possible characters for the password
letters = string.ascii_letters
digits = string.digits
@VRamazing
VRamazing / arithmeticArranger.py
Created February 9, 2025 12:56
Arithmetic Arranger
def arithmetic_arranger(problems, show_answers=False):
n = len(problems)
ans_objects = []
if n > 5:
return "Error: Too many problems."
for i, problem in enumerate(problems):
first, oper, second = problem.split(" ")
l1, l2 = len(first), len(second)