This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
OlderNewer