abh - HTMLify profile

abh's Profile Picture

abh

209 Files

17923 Views

Latest files of abh

1. Heart in Box | Owner: abh | Views: 3 | Comments: 0 | Open/ Source 54.12 KB

frames = [ """

3. Flower For You | Owner: abh | Views: 23 | Comments: 0 | Open/ Source 31.69 KB

frames = [ """ :+*+=. .::::

4. Beauty Calculator | Owner: abh | Views: 45 | Comments: 0 | Open/ Source 5.22 KB

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Calculating Your Beauty</title> <meta nam

5. LeetCode - Merge Sorted Array - Python | Owner: abh | Views: 10 | Comments: 0 | Open/ Source 277 B

class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not r

6. LeetCode - Largest Positive Integer That Exists With Its Negative - Python | Owner: abh | Views: 19 | Comments: 0 | Open/ Source 274 B

class Solution: def findMaxK(self, nums: List[int]) -> int: nums.sort() l = -1 for n in nums:

8. is_divisible_by.py | Owner: abh | Views: 39 | Comments: 0 | Open/ Source 750 B

TESTCCASES = [ { "positional": (25, 5), "keyword": {}, "return": True, "msg": "", },

9. is_perfect_square.py | Owner: abh | Views: 45 | Comments: 0 | Open/ Source 926 B

TESTCASES = [ { "positional": (2,), "keyword": {}, "return": False, "msg": "", }, {

10. is_divisible_by.py | Owner: abh | Views: 52 | Comments: 0 | Open/ Source 115 B

def is_divisible_by(num, div): return num % div != 0 def is_divisible_by(num, div): return num / div == 0

11. divisors.py | Owner: abh | Views: 51 | Comments: 0 | Open/ Source 326 B

def divisors(n: int): ds = [] for i in range(1, n+1): if not n % i: ds.append(i) return ds def

12. is_perfect_square.py | Owner: abh | Views: 60 | Comments: 0 | Open/ Source 79 B

def is_perfect_square(n): sqrt = int(n ** 0.5) return sqrt * sqrt == n

13. triangle_number.py | Owner: abh | Views: 51 | Comments: 0 | Open/ Source 245 B

def triangle_number(n): t = 0 for i in range(1, n+1): t += i return t def triangle_number(n): return su

14. is_prime.py | Owner: abh | Views: 55 | Comments: 0 | Open/ Source 460 B

def is_prime(n): if n < 2: return False devisors = 0 for i in range(1, n+1): if n % i == 0:

15. you3.png | Owner: abh | Views: 38 | Comments: 0 | Open/ Source 22.93 KB

16. you2.png | Owner: abh | Views: 40 | Comments: 0 | Open/ Source 20.51 KB

17. you1.png | Owner: abh | Views: 38 | Comments: 0 | Open/ Source 15.11 KB

18. you.png | Owner: abh | Views: 36 | Comments: 0 | Open/ Source 18.06 KB

19. The Moon | Owner: abh | Views: 193 | Comments: 0 | Open/ Source 2.1 KB

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>The MOON</title> <meta name="viewport" co

20. 720p.png | Owner: abh | Views: 38 | Comments: 0 | Open/ Source 38.63 KB

21. 480p.png | Owner: abh | Views: 31 | Comments: 0 | Open/ Source 4.08 KB

22. 360p.png | Owner: abh | Views: 29 | Comments: 0 | Open/ Source 11.77 KB

23. 240p.png | Owner: abh | Views: 36 | Comments: 0 | Open/ Source 7.19 KB

24. 144p.png | Owner: abh | Views: 111 | Comments: 0 | Open/ Source 1.66 KB

25. 1080p.png | Owner: abh | Views: 69 | Comments: 0 | Open/ Source 438.61 KB

26. Auto Update Testing | Owner: abh | Views: 83 | Comments: 0 | Open/ Source 659 B

from textual.app import App from textual.containers import ScrollableContainer from textual.widget import Widget from threadi

27. LeetCode - Squares of a Sorted Array - Python | Owner: abh | Views: 67 | Comments: 0 | Open/ Source 129 B

class Solution: def sortedSquares(self, nums: List[int]) -> List[int]: return list(sorted(map(lambda a:a*a, nums))

28. LeetCode - Maximum Odd Binary Number - Python | Owner: abh | Views: 69 | Comments: 0 | Open/ Source 217 B

class Solution: def maximumOddBinaryNumber(self, s: str) -> str: if s.count("1") == 1: return ("0" *

29. TRX Manager | Owner: abh | Views: 61 | Comments: 0 | Open/ Source 5.1 KB

from datetime import date from os import system, listdir from sys import argv class Transaction: def __init__(self,

30. BrainF#ck Interpreter | Owner: abh | Views: 95 | Comments: 0 | Open/ Source 3.29 KB

#!/usr/bin/python from sys import argv from os import system def help(): print( "Usages: ./bf <op

31. ticket.py | Owner: abh | Views: 119 | Comments: 4 | Open/ Source 1.31 KB

from requests import get, post def get_token(): r = get("https://helpdesk.agrauniv.online/Home/NewTicket") html = r

32. is_consonant.py | Owner: abh | Views: 71 | Comments: 0 | Open/ Source 1007 B

TESTCASES = [ { "positional": ("H",), "keyword": {}, "return": True, "msg": "" }, {

33. is_isogram.py | Owner: abh | Views: 49 | Comments: 0 | Open/ Source 814 B

TESTCASES = [ { "positional": ("Hello",), "keyword": {}, "return": False, "msg": "" },

34. is_even.py | Owner: abh | Views: 61 | Comments: 0 | Open/ Source 959 B

TESTCASES = [ { "positional": (2,), "keyword": {}, "return": True, "msg": "", }, {

35. TESTS.py | Owner: abh | Views: 69 | Comments: 0 | Open/ Source 1.61 KB

class Test: def __init__(self, function): self.passed = 0 self.failed = 0 self.function = function

36. are_anagrams.py | Owner: abh | Views: 55 | Comments: 0 | Open/ Source 789 B

TESTCCASES = [ { "positional": ("string", "string",), "keyword": {}, "return": True, "msg":

37. func.py | Owner: abh | Views: 56 | Comments: 0 | Open/ Source 818 B

TESTCASES = [ { # test case structure "positional": ("arguments", "in", "tuples",), # Positional arguments as Tupl

38. __init__.py | Owner: abh | Views: 63 | Comments: 0 | Open/ Source 21 B

from .TESTS import *

39. is_consonant.py | Owner: abh | Views: 60 | Comments: 0 | Open/ Source 739 B

def is_consonant(char): consonants = [ "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "

40. is_vowel.py | Owner: abh | Views: 74 | Comments: 0 | Open/ Source 265 B

def is_vowel(char): vowels = ["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"] return char in vowels def is_vowel(char

41. is_isogram.py | Owner: abh | Views: 68 | Comments: 0 | Open/ Source 190 B

def is_isogram(s): s = s.lower() for c in s: if s.count(c) > 1: return False return True def is

42. is_pangram.py | Owner: abh | Views: 68 | Comments: 0 | Open/ Source 279 B

def is_pangram(text): letters = "abcdefghijklmnopqrstuvwxyz" for char in text: if not char.lower() in letters:

43. are_anagrams.py | Owner: abh | Views: 64 | Comments: 0 | Open/ Source 345 B

def are_anagrams(s1, s2): if len(s1) != len(s2): return False for c in s1: if s1.count(c) != s2.count(c)

44. LeetCode - Insert Delete GetRandom O(1) - Duplicates allowed - Python | Owner: abh | Views: 88 | Comments: 0 | Open/ Source 686 B

from random import choice class RandomizedCollection: def __init__(self): self.values = [] def insert(se

45. LeetCode - Insert Delete GetRandom O(1) - Python | Owner: abh | Views: 95 | Comments: 0 | Open/ Source 679 B

from random import choice class RandomizedSet: def __init__(self): self.values = [] def insert(self, val

46. Asking for Going Out | Owner: abh | Views: 115 | Comments: 0 | Open/ Source 1004 B

<div id="main"> <h1>Momos khane chaloge ?</h1> <button id="yes" onclick="yes()"> Yes </button> <button id="no"

47. ankit.txt | Owner: abh | Views: 4 | Comments: 0 | Open/ Source 15 B

+91 70170 57629

48. conferm-delete.html | Owner: abh | Views: 117 | Comments: 0 | Open/ Source 466 B

<!--conferm-delete.html--> <h1>Do you really want to delete the file {{ file.name }} at {{ file.path }}?</h1> {% if file.type in

49. dashboard.html | Owner: abh | Views: 99 | Comments: 0 | Open/ Source 879 B

<!--dashboard.html--> <a href="/edit?filepathnew.html"><h4 style="display:inline-block;">Make new file</h4></a>&nbsp; <a href="/

50. user-files.html | Owner: abh | Views: 92 | Comments: 0 | Open/ Source 144 B

<!-- user-files.html --> {% for file in files %} {{ loop.index }}<a href=" {{ file.path }}">{{ file.name }}</a> {{ file.size }}<

51. media-edit.html | Owner: abh | Views: 94 | Comments: 0 | Open/ Source 1.1 KB

<!-- media-edit.html --> <form action="/action/edit-media" method="POST"> <input type="hidden" name="oldname" value="{{ path[ses

52. search-result.html | Owner: abh | Views: 88 | Comments: 0 | Open/ Source 775 B

<!-- search-result.html --> <form class="search-form" action="/search" method="GET" style="margin:20p;"> <input type="text" name

53. edit.html | Owner: abh | Views: 94 | Comments: 0 | Open/ Source 1001 B

<!-- edit.html --> <form action="/action/edit" method="POST"> <input type="text" name="path" value="{{ path }}" /> Mode: {% if

54. home.html | Owner: abh | Views: 89 | Comments: 0 | Open/ Source 629 B

<h1>HTMLify your dreams</h1> <center><p>Make your HTML files live</p> <form class="search-form" action="/search" method="GET" st

55. registration.html | Owner: abh | Views: 99 | Comments: 0 | Open/ Source 389 B

<!-- registration.html --> <form action="/action/registration" method="POST"> <input type="text" name="username" placeholder="us

56. file-upload.html | Owner: abh | Views: 96 | Comments: 0 | Open/ Source 258 B

<!-- file-uplaod.html --> <form action="/action/upload" method="POST" enctype="multipart/form-data"> <input type="file" name="fi

57. login.html | Owner: abh | Views: 106 | Comments: 0 | Open/ Source 221 B

<!-- login.html --> <form action="/action/login" method="POST"> <input type="text" name="username" placeholder="username" /><br>

58. conferm-delete.html | Owner: abh | Views: 107 | Comments: 0 | Open/ Source 530 B

<!--conferm-delete.html--> <h1>Do you really want to delete the file {{ file.name }} at {{ file.path }}?</h1> {% if file.type in

59. dashboard.html | Owner: abh | Views: 107 | Comments: 0 | Open/ Source 1.62 KB

<!DOCTYPE html> <html> <head> <title>Dashboard - {{ session["user"]["username"] }}</title> {% include "stylesheet.html"

60. nav-bar.html | Owner: abh | Views: 95 | Comments: 0 | Open/ Source 658 B

<div class="links"> <a href="/">Home</a> {% if not session.get("user") %} <a href="/login">Log in</a> <a href="/regist

61. git-clone.html | Owner: abh | Views: 102 | Comments: 0 | Open/ Source 1.51 KB

<!DOCTYPE html> <html> <head> <title>Git Clone</title> {% include 'stylesheet.html' %} <style> </style> </h

62. file-show.html | Owner: abh | Views: 95 | Comments: 0 | Open/ Source 3.91 KB

<!DOCTYPE html> <html> <head> <title>{{ file.name }}</title> {% include "stylesheet.html" %} <link rel="stylesheet"

63. locked-file.html | Owner: abh | Views: 91 | Comments: 0 | Open/ Source 505 B

<!DOCTYPE html> <html> <head> <title>File is locked</title> {% include "stylesheet.html" %} </head> <body> <h1>HTMLi

64. user-files.html | Owner: abh | Views: 101 | Comments: 0 | Open/ Source 144 B

<!-- user-files.html --> {% for file in files %} {{ loop.index }}<a href=" {{ file.path }}">{{ file.name }}</a> {{ file.size }}<

65. profile.html | Owner: abh | Views: 99 | Comments: 0 | Open/ Source 2.27 KB

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initia

66. notifications.html | Owner: abh | Views: 85 | Comments: 0 | Open/ Source 947 B

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=

67. search-bar.html | Owner: abh | Views: 93 | Comments: 0 | Open/ Source 963 B

<div class="search-form"> <form action="/search" method="GET"> <input type="text" name="q" value="{{ q }}" placehold

68. media-edit.html | Owner: abh | Views: 91 | Comments: 0 | Open/ Source 1.75 KB

<!DOCTYPE html> <html> <head> <title>Editing - {{ path }}</title> {% include "stylesheet.html" %} </head> <body> <h1

69. search-result.html | Owner: abh | Views: 90 | Comments: 0 | Open/ Source 1.53 KB

<!-- search-result.html --> <!DOCTYPE html> <html> <head> <title>HTMLify Search - {{ q }}</title> {% include "stylesheet

70. extras.html | Owner: abh | Views: 82 | Comments: 0 | Open/ Source 98 B

<!-- Extras file, containts of this file will be available in all templates just above </head> -->

71. edit.html | Owner: abh | Views: 97 | Comments: 0 | Open/ Source 2.03 KB

<!DOCTYPE html> <html> <head> <title>Editing - {{ path }}</title> {% include "stylesheet.html" %} <link rel="styleshee

72. home.html | Owner: abh | Views: 102 | Comments: 0 | Open/ Source 1.59 KB

<!DOCTYPE html> <html> <head> <title>HTMLify your dreams</title> {% include "stylesheet.html" %} </head> <body> <h1>

73. registration.html | Owner: abh | Views: 105 | Comments: 0 | Open/ Source 944 B

<!DOCTYPE html> <html> <head> <title>Registration</title> {% include "stylesheet.html" %} <style> </style> </he

74. file-upload.html | Owner: abh | Views: 89 | Comments: 0 | Open/ Source 936 B

<!DOCTYPE html> <html> <head> <title>Media Upload</title> {% include "stylesheet.html" %} <style> </style> </hea

75. login.html | Owner: abh | Views: 95 | Comments: 0 | Open/ Source 769 B

<!DOCTYPE html> <html> <head> <title>Login</title> {% include "stylesheet.html" %} <style> </style> </head> <bo

76. stylesheet.html | Owner: abh | Views: 86 | Comments: 0 | Open/ Source 11.0 KB

<meta name="viewport" content="width=device-width, initial-scale=1"> <style> /* registration page style*/ .registration-form

77. requirements.txt | Owner: abh | Views: 76 | Comments: 0 | Open/ Source 54 B

flask flask_sqlalchemy flask_migrate requests pygments

78. models.py | Owner: abh | Views: 65 | Comments: 0 | Open/ Source 5.54 KB

from flask import request from flask_sqlalchemy import * from datetime import datetime from pygments import highlight, lexers, f

79. setup.py | Owner: abh | Views: 70 | Comments: 0 | Open/ Source 1020 B

from os import system from sys import version_info as ver ver = ver.major from random import randint try: from app import a

80. README.md | Owner: abh | Views: 87 | Comments: 1 | Open/ Source 10 B

# HTMLify

81. config.py | Owner: abh | Views: 65 | Comments: 0 | Open/ Source 159 B

SECRET_KEY="REPLACE_WITH_YOUR_SECRATE_KEY_OR_RUN_SETUP.PY" SESSION_TOKENS_LIMIT=1024 MAX_FILE_UPLOAD_LIMIT=32 GIT_COMMAND_PATH =

82. utils.py | Owner: abh | Views: 67 | Comments: 0 | Open/ Source 5.88 KB

from random import randint from requests import get from models import users, files, db from os import remove, system, path from

83. app.py | Owner: abh | Views: 90 | Comments: 0 | Open/ Source 24.99 KB

#HTMLify from flask import * from flask_migrate import * from random import randint, shuffle from hashlib import md5 from os im

84. LeetCod3 - Check if Array is Good - Python | Owner: abh | Views: 79 | Comments: 0 | Open/ Source 171 B

class Solution: def isGood(self, nums: List[int]) -> bool: nums.sort() good = list(range(1, len(nums))) +

85. LeetCode - Time Needed to Rearrange a Binary String - Python | Owner: abh | Views: 88 | Comments: 0 | Open/ Source 200 B

class Solution: def secondsToRemoveOccurrences(self, s: str) -> int: secs = 0 while "01" in s:

86. LeetCode - Number of Laser Beams in a Bank - C# | Owner: abh | Views: 118 | Comments: 1 | Open/ Source 525 B

public class Solution { public int NumberOfBeams(string[] bank) { int pre_lesers = 0; int beams = 0;

87. LeetCode - Number of Laser Beams in a Bank - Python | Owner: abh | Views: 91 | Comments: 0 | Open/ Source 322 B

class Solution: def numberOfBeams(self, bank: List[str]) -> int: beams = 0 pre_lesers = 0 for fl

88. word_frequency.py | Owner: abh | Views: 71 | Comments: 0 | Open/ Source 198 B

def word_frequency(text: str) -> dict: words = text.split() word_f = {} for word in words: w = word.strip(".

89. char_frequency.py | Owner: abh | Views: 88 | Comments: 0 | Open/ Source 113 B

def char_frequency(string): freq = {} for c in string: freq[c] = freq.get(c,0)+1 return freq

90. encrypt_xor_cipher.py | Owner: abh | Views: 64 | Comments: 0 | Open/ Source 130 B

def encrypt_xor_cipher(text, key): cipher = "" for char in text: cipher += chr(ord(char) ^ key) return ciphe

91. LeetCode - Convert an Array Into a 2D Array With Conditions - Python | Owner: abh | Views: 95 | Comments: 0 | Open/ Source 380 B

class Solution: def findMatrix(self, nums: List[int]) -> List[List[int]]: mat = [] for n in nums:

92. LeetCode - Assign Cookies - Python | Owner: abh | Views: 91 | Comments: 0 | Open/ Source 311 B

class Solution: def findContentChildren(self, g: List[int], s: List[int]) -> int: g.sort() s.sort()

93. T8QoUm3.png | Owner: abh | Views: 13 | Comments: 0 | Open/ Source 855.67 KB

94. gklpkg | Owner: abh | Views: 19 | Comments: 0 | Open/ Source 1.21 MB

95. Remove All Target from array with O(n) | Owner: abh | Views: 101 | Comments: 0 | Open/ Source 286 B

def remove_target(target, array): array = array.copy() ofset = 0 for i in range(len(array)): if array[i]

96. encrypt_caesar_cipher.py | Owner: abh | Views: 95 | Comments: 0 | Open/ Source 284 B

def encrypt_caesar_cipher(text, shift): cipher = "" for char in text: if char.isalpha(): offset = 65

97. yas.html | Owner: abh | Views: 162 | Comments: 0 | Open/ Source 686 B

<!--You are star--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <center> <div id="main"> <h1

98. encrypt_rot13.py | Owner: abh | Views: 99 | Comments: 0 | Open/ Source 266 B

def encrypt_rot13(text): cipher = "" for char in text: if char.isalpha(): offset = 65 if char.isuppe

99. ncr.py | Owner: abh | Views: 108 | Comments: 0 | Open/ Source 290 B

def ncr(n, r): numerator = 1 denominator = 1 for i in range(r): numerator *= n - i denominator *= i

100. gcd.py | Owner: abh | Views: 111 | Comments: 0 | Open/ Source 138 B

def gcd(a, b): if b == 0: return a return gcd(b, a % b) def gcd(a, b): while b: a, b = b, a % b

101. npr.py | Owner: abh | Views: 110 | Comments: 0 | Open/ Source 153 B

def npr(n, r): return factorial(n) // factorial(n-r) def npr(n, r): result = 1 for i in range(r): result *=

102. LeetCode - First Letter to Appear Twice - JavaScript | Owner: abh | Views: 39 | Comments: 0 | Open/ Source 241 B

/** * @param {string} s * @return {character} */ var repeatedCharacter = function(s) { seen = []; for (let i=0;

103. LeetCode - First Letter to Appear Twice - Python | Owner: abh | Views: 108 | Comments: 0 | Open/ Source 185 B

class Solution: def repeatedCharacter(self, s: str) -> str: seen = set() for c in s: if c in

104. LeetCode - Search a 2D Matrix - Python | Owner: abh | Views: 125 | Comments: 0 | Open/ Source 200 B

class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: for row in matrix:

105. LeetCode - Reverse Only Letters - Python | Owner: abh | Views: 112 | Comments: 0 | Open/ Source 393 B

class Solution: def reverseOnlyLetters(self, s: str) -> str: s = list(s) chars = "qwertyuiopasdfghjklzxcv

106. rbott.py | Owner: abh | Views: 122 | Comments: 0 | Open/ Source 2.05 KB

from random import randint from time import sleep class Grid: def __init__(self, bots = [].copy()): self.width

107. home-template.html | Owner: abh | Views: 115 | Comments: 0 | Open/ Source 3.79 KB

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,

108. HTMLify Logo (Transparent) | Owner: abh | Views: 55 | Comments: 0 | Open/ Source 14.02 KB

109. HTMLify Logo | Owner: abh | Views: 44 | Comments: 0 | Open/ Source 10.38 KB

110. LeetCode - Patients With a Condition - MySQL | Owner: abh | Views: 148 | Comments: 4 | Open/ Source 128 B

# Write your MySQL query statement below SELECT * FROM patients WHERE conditions LIKE '% DIAB1%' or conditions LIKE 'DIAB1%' ;

111. QyPGNW9.png | Owner: abh | Views: 1 | Comments: 0 | Open/ Source 751.25 KB

112. f5s02uC.png | Owner: abh | Views: 10 | Comments: 0 | Open/ Source 871.7 KB

113. HyrZYYc.png | Owner: abh | Views: 15 | Comments: 0 | Open/ Source 1.13 MB

114. GXZIvwU.png | Owner: abh | Views: 14 | Comments: 0 | Open/ Source 962.1 KB

115. Do you notice? | Owner: abh | Views: 124 | Comments: 3 | Open/ Source 35.92 KB

116. cbrt.py | Owner: abh | Views: 120 | Comments: 0 | Open/ Source 37 B

def cbrt(n): return n ** (1/3)

117. whr.py | Owner: abh | Views: 124 | Comments: 0 | Open/ Source 56 B

def whr(waist: "cm", hip: "cm"): return waist / hip

118. bmi.py | Owner: abh | Views: 130 | Comments: 0 | Open/ Source 68 B

def bmi(weight: "kg", height: "m"): return weight / height ** 2

119. LeetCode - Find Champion I - Python | Owner: abh | Views: 126 | Comments: 1 | Open/ Source 340 B

class Solution: def findChampion(self, grid: List[List[int]]) -> int: n = len(grid) strongerthancount = [

120. preview feature | Owner: abh | Views: 124 | Comments: 0 | Open/ Source 5.59 KB

<!DOCTYPE html> <html> <head> <title>Editing - updates/preview-feature.html</title> <meta name="viewport" content="wi

121. LeetCode - How Many Numbers Are Smaller Than the Current Number - Python | Owner: abh | Views: 118 | Comments: 0 | Open/ Source 256 B

class Solution: def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]: smallercount = [] sort

122. LeetCode - Separate the Digits in an Array - Python | Owner: abh | Views: 102 | Comments: 0 | Open/ Source 483 B

class Solution: def separateDigits(self, nums: List[int]) -> List[int]: saprated = [] for num in nums:

123. LeetCode - Chunk Array - JavaScript | Owner: abh | Views: 30 | Comments: 0 | Open/ Source 391 B

/** * @param {Array} arr * @param {number} size * @return {Array} */ var chunk = function(arr, size) { const chunk

124. LeetCode - Shuffle String - Python | Owner: abh | Views: 111 | Comments: 0 | Open/ Source 206 B

class Solution: def restoreString(self, s: str, indices: List[int]) -> str: shuffeld = "" for i in range(

125. LeetCode - Create Target Array in the Given Order - Python | Owner: abh | Views: 125 | Comments: 0 | Open/ Source 223 B

class Solution: def createTargetArray(self, nums: List[int], index: List[int]) -> List[int]: target = []

126. LeetCode - Matrix Diagonal Sum - Python | Owner: abh | Views: 111 | Comments: 0 | Open/ Source 282 B

class Solution: def diagonalSum(self, mat: List[List[int]]) -> int: i = 0 s = 0 if len(mat)%2:

127. LeetCode - Fibonacci Number - JavaScript | Owner: abh | Views: 41 | Comments: 1 | Open/ Source 309 B

/** * @param {number} n * @return {number} */ var fib = function(n) { if (n == 0) return 0; if (n == 1

128. LeetCode - Fibonacci Number - Rust | Owner: abh | Views: 152 | Comments: 1 | Open/ Source 354 B

impl Solution { pub fn fib(n: i32) -> i32 { if (n == 0){ return 0; } if (n == 1){

129. LeetCode - Fibonacci Number - Python | Owner: abh | Views: 134 | Comments: 0 | Open/ Source 256 B

class Solution: def fib(self, n: int) -> int: if n == 0: return 0 if n == 1: re

130. LeetCode - Add Two Integers - Scala | Owner: abh | Views: 147 | Comments: 1 | Open/ Source 100 B

object Solution { def sum(num1: Int, num2: Int): Int = { return num1 + num2; } }

131. LeetCode - Add Two Integers - Ruby | Owner: abh | Views: 155 | Comments: 1 | Open/ Source 119 B

# @param {Integer} num1 # @param {Integer} num2 # @return {Integer} def sum(num1, num2) return num1 + num2 end

132. LeetCode - Add Two Integers - Rust | Owner: abh | Views: 137 | Comments: 0 | Open/ Source 101 B

impl Solution { pub fn sum(num1: i32, num2: i32) -> i32 { return num1 + num2; } }

133. LeetCode - Add Two Integers - JavaScript | Owner: abh | Views: 32 | Comments: 0 | Open/ Source 142 B

/** * @param {number} num1 * @param {number} num2 * @return {number} */ var sum = function(num1, num2) { return nu

134. LeetCode - Add Two Integers - Python | Owner: abh | Views: 133 | Comments: 0 | Open/ Source 92 B

class Solution: def sum(self, num1: int, num2: int) -> int: return num1 + num2

135. Page Replacment Algotithems in Python | Owner: abh | Views: 163 | Comments: 2 | Open/ Source 452 B

# Page Replacment Smulator def FIFO(string: list["anything"], frames=3): page = [None]*frames pages = [] statu

136. tr_typist_4.png | Owner: abh | Views: 91 | Comments: 0 | Open/ Source 4.37 KB

137. tr_typist_1.png | Owner: abh | Views: 77 | Comments: 0 | Open/ Source 3.64 KB

138. tr_typist_2.png | Owner: abh | Views: 76 | Comments: 0 | Open/ Source 5.14 KB

139. tr_typist_3.png | Owner: abh | Views: 76 | Comments: 0 | Open/ Source 3.42 KB

140. tr_typist_5.png | Owner: abh | Views: 88 | Comments: 0 | Open/ Source 6.92 KB

141. tr_typist_6.png | Owner: abh | Views: 82 | Comments: 0 | Open/ Source 7.22 KB

142. LeetCode - Find Followers Count - MySQL | Owner: abh | Views: 145 | Comments: 0 | Open/ Source 103 B

SELECT user_id, count(follower_id) as followers_count FROM Followers GROUP BY user_id ORDER BY user_id;

143. LeetCode - Allow One Function Call - JavaScript | Owner: abh | Views: 41 | Comments: 0 | Open/ Source 415 B

/** * @param {Function} fn * @return {Function} */ var once = function(fn) { let called = false; return function(.

144. upper.py | Owner: abh | Views: 107 | Comments: 0 | Open/ Source 673 B

def upper(s: str) -> str: u = "QWERTYUIOPASDFGHJKLZXCVBNM" l = "qwertyuiopasdfghjklzxcvbnm" for c in s: if c

145. pow.py | Owner: abh | Views: 123 | Comments: 0 | Open/ Source 120 B

def pow(x, y: int): p = 1 while y: p *= x y -= 1 return p def pow(x, y): return x ** y

146. lcm.py | Owner: abh | Views: 117 | Comments: 0 | Open/ Source 408 B

def lcm(a: int, b: int) -> int: max = a if a > b else b while True: if not (max % a and max % b): re

147. sqrt.py | Owner: abh | Views: 110 | Comments: 0 | Open/ Source 507 B

def sqrt(n): return n ** 0.5 def sqrt(n): return n ** (1/2) def sqrt(n :int): i = 0 while i*i < n: i +

148. sum.py | Owner: abh | Views: 115 | Comments: 2 | Open/ Source 314 B

def sum(*nums): s = 0 for i in nums: s += i return s def sum(*nums: int): s = 0 for n in nums:

149. factorial.py | Owner: abh | Views: 108 | Comments: 0 | Open/ Source 232 B

#Calculate the factorial of given number def factorial(n: int) -> int: if n == 0: return 1 return factorial(n-1

150. mode.py | Owner: abh | Views: 109 | Comments: 0 | Open/ Source 331 B

def mode(numbers): if not numbers: return [] mode = [] max_count = 0 for num in numbers: count =

151. is_leap_year.py | Owner: abh | Views: 107 | Comments: 0 | Open/ Source 101 B

def is_leap_year(year): if not year % 100: return not year % 400 return not year % 4

152. is_palindrome.py | Owner: abh | Views: 94 | Comments: 0 | Open/ Source 606 B

#Check the given string, number or list is palindrome or not. def is_palindrome(n: int) -> bool: r = 0 t = n while

153. is_armstrong.py | Owner: abh | Views: 115 | Comments: 0 | Open/ Source 314 B

def is_armstrong(n: int): n = str(n) p = len(n) s = 0 for d in n: s += int(d)**p return int(n) == s

154. is_valid_email.py | Owner: abh | Views: 123 | Comments: 0 | Open/ Source 220 B

def is_valid_email(email): parts = email.split("@") if len(parts) == 2: username, domain = parts if user

155. lower.py | Owner: abh | Views: 123 | Comments: 0 | Open/ Source 672 B

def lower(s: str) -> str: u = "QWERTYUIOPASDFGHJKLZXCVBNM" l = "qwertyuiopasdfghjklzxcvbnm" for c in s: if c

156. README.md | Owner: abh | Views: 136 | Comments: 0 | Open/ Source 422 B

# ABHDEF This is a series of function which I started through my instagram account [@abh.py](https://www.instagram.com/abh.py) a

157. is_happy.py | Owner: abh | Views: 94 | Comments: 0 | Open/ Source 454 B

def is_happy(n: int): n = str(n) while len(n) != 1: s = 0 for d in n: s += int(d)*int(d)

158. mean.py | Owner: abh | Views: 98 | Comments: 0 | Open/ Source 303 B

def mean(*nums): s = 0 c = 0 for n in nums: s += n c += 1 return s / c def mean(nums): s =

159. average.py | Owner: abh | Views: 110 | Comments: 0 | Open/ Source 315 B

def average(*nums): s = 0 c = 0 for n in nums: s += n c += 1 return s / c def average(*nums):

160. digital_sum.py | Owner: abh | Views: 112 | Comments: 0 | Open/ Source 255 B

def digital_sum(n: int): s = 0 while n: s += n % 10 n //= 10 return s def digital_sum(n: int):

161. is_even.py | Owner: abh | Views: 120 | Comments: 0 | Open/ Source 290 B

def is_even(n: int) -> bool: if n == 1: return False if n == 0: return True return is_even(n-2) def

162. roman_to_int.py | Owner: abh | Views: 98 | Comments: 0 | Open/ Source 339 B

def roman_to_int(s): romans = {'I': 1, 'V': 5,'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} result = 0

163. len.py | Owner: abh | Views: 122 | Comments: 0 | Open/ Source 174 B

def len(obj) -> int: c = 0 while obj: c += 1 obj = obj[1:] return c def len(obj) -> int: c = 0

164. median.py | Owner: abh | Views: 93 | Comments: 0 | Open/ Source 288 B

def median(series): s = series.copy() s.sort() n = len(s) if n % 2 == 1: return s[n // 2] return (s[

165. is_odd.py | Owner: abh | Views: 77 | Comments: 0 | Open/ Source 285 B

def is_odd(n: int) -> bool: if n == 1: return True if n == 0: return False return is_odd(n-2) def i

166. LeetCode - Return Length of Arguments Passed - JavaScript | Owner: abh | Views: 43 | Comments: 0 | Open/ Source 208 B

/** * @param {...(null|boolean|number|string|Array|Object)} args * @return {number} */ var argumentsLength = function(...

167. LeetCode - Function Composition - JavaScript | Owner: abh | Views: 31 | Comments: 0 | Open/ Source 359 B

/** * @param {Function[]} functions * @return {Function} */ var compose = function(functions) { return function(x

168. LeetCode - Counter II - JavaScript | Owner: abh | Views: 32 | Comments: 0 | Open/ Source 633 B

/** * @param {integer} init * @return { increment: Function, decrement: Function, reset: Function } */ var createCounter

169. LeetCode - Counter - JavaScript | Owner: abh | Views: 40 | Comments: 0 | Open/ Source 289 B

/** * @param {number} n * @return {Function} counter */ var createCounter = function(n) { let count = n; return

170. LeetCode - Create Hello World Function - JavaScript | Owner: abh | Views: 27 | Comments: 0 | Open/ Source 220 B

/** * @return {Function} */ var createHelloWorld = function() { return function(...args) { return "Hell

171. LeetCode - To Be Or Not To Be - JavaScript | Owner: abh | Views: 42 | Comments: 0 | Open/ Source 572 B

/** * @param {string} val * @return {Object} */ var expect = function(val) { return {"toBe": function (v

172. LeetCode - Article Views I - MySQL | Owner: abh | Views: 115 | Comments: 0 | Open/ Source 90 B

SELECT DISTINCT author_id AS id FROM Views WHERE author_id = viewer_id ORDER BY author_id;

173. LeetCode - Invalid Tweets - MySQL | Owner: abh | Views: 120 | Comments: 0 | Open/ Source 60 B

SELECT tweet_id FROM Tweets WHERE CHAR_LENGTH(content) > 15;

174. LeetCode - Recyclable and Low Fat Products - MySQL | Owner: abh | Views: 114 | Comments: 0 | Open/ Source 74 B

SELECT product_id FROM Products WHERE low_fats = 'Y' AND recyclable = 'Y';

175. LeetCode - Find Customer Referee - MySQL | Owner: abh | Views: 115 | Comments: 0 | Open/ Source 70 B

SELECT name FROM Customer WHERE referee_id != 2 OR referee_id IS NULL;

176. LeetCode - Big Countries | Owner: abh | Views: 143 | Comments: 0 | Open/ Source 89 B

SELECT name, population, area FROM world WHERE area >= 3000000 or population >= 25000000;

177. A Number After a Double Reversal | Owner: abh | Views: 32 | Comments: 0 | Open/ Source 179 B

/** * @param {number} num * @return {boolean} */ var isSameAfterReversals = function(num) { if (num) return

178. LeetCode - A Number After a Double Reversal - Rust | Owner: abh | Views: 140 | Comments: 0 | Open/ Source 203 B

impl Solution { pub fn is_same_after_reversals(num: i32) -> bool { if (num != 0){ return num % 10 !=

179. LeetCode- A Number After a Double Reversal - Python | Owner: abh | Views: 116 | Comments: 0 | Open/ Source 128 B

class Solution: def isSameAfterReversals(self, num: int) -> bool: if not num: return True return num % 10

180. jojo1.png | Owner: abh | Views: 84 | Comments: 0 | Open/ Source 0 B

181. portfolio/badges/gh_pullshark.png | Owner: abh | Views: 93 | Comments: 0 | Open/ Source 0 B

182. portfolio/badges/hr_python_level_1_stars_2.png | Owner: abh | Views: 92 | Comments: 0 | Open/ Source 0 B

183. portfolio/badges/hr_python_level_1_stars_1.png | Owner: abh | Views: 90 | Comments: 0 | Open/ Source 0 B

184. portfolio/badges/pe_award_03.png | Owner: abh | Views: 89 | Comments: 0 | Open/ Source 0 B

185. portfolio/badges/pe_award_02.png | Owner: abh | Views: 91 | Comments: 0 | Open/ Source 0 B

186. portfolio/badges/pe_award_01.png | Owner: abh | Views: 92 | Comments: 0 | Open/ Source 0 B

187. Achievements | Owner: abh | Views: 159 | Comments: 0 | Open/ Source 5.56 KB

<!DOCTYPE html> <html> <head> <title>Achievements - Aman Babu Hemant</title> <meta name="viewport" content="width=de

188. | Owner: abh | Views: 40 | Comments: 0 | Open/ Source 707 B

/* Reset some default browser styles */ body, h1, p, header, main, footer { margin: 0; padding: 0; } body {

189. [FIX] CSS ISSUE | Owner: abh | Views: 117 | Comments: 0 | Open/ Source 405 B

<!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="css-issue.css"> <title>CSS issue fixed</t

190. grklpkd.png | Owner: abh | Views: 31 | Comments: 0 | Open/ Source 0 B

191. vcbcgpt.py | Owner: abh | Views: 1 | Comments: 0 | Open/ Source 615 B

from moviepy.editor import VideoFileClip # Input video file and output compressed file input_file = 'input_video.mp4' outpu

192. Honey-Singh-2.jpg | Owner: abh | Views: 93 | Comments: 0 | Open/ Source 0 B

193. mods.txt | Owner: abh | Views: 94 | Comments: 0 | Open/ Source 1.77 KB

aiohttp aiosignal alembic android anyio argon2-cffi argon2-cffi-bindings asgiref astroid asttokens async-timeout attrs audiostre

194. Cartoonizer by Shru | Owner: abh | Views: 2 | Comments: 0 | Open/ Source 944 B

import cv2 cap = cv2.VideoCapture("dolphin.mp4") height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) width = int(cap.get(cv2.C

195. No body loves you | Owner: abh | Views: 269 | Comments: 0 | Open/ Source 282 B

<head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <title>Nobody loves you</title> <center>

196. LeetCode - Number of Good Pairs - Rust | Owner: abh | Views: 178 | Comments: 1 | Open/ Source 325 B

impl Solution { pub fn num_identical_pairs(nums: Vec<i32>) -> i32 { let mut count = 0; for i in 0..nums.l

197. qcfc.py | Owner: abh | Views: 145 | Comments: 0 | Open/ Source 2.36 KB

#quiz ans cheker for college #07/10/2023 def ans(): return open("ans.txt").read().split("\n")[:-1] def std(no):

198. lklb.png | Owner: abh | Views: 11 | Comments: 0 | Open/ Source 0 B

199. gklg.png | Owner: abh | Views: 7 | Comments: 0 | Open/ Source 0 B

200. artizote.png | Owner: abh | Views: 78 | Comments: 0 | Open/ Source 0 B

201. profile-page-template.html | Owner: abh | Views: 122 | Comments: 0 | Open/ Source 1.35 KB

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, in

202. dp-dark.png | Owner: abh | Views: 66 | Comments: 0 | Open/ Source 0 B

203. gklp.png | Owner: abh | Views: 11 | Comments: 0 | Open/ Source 0 B

204. artizote.apk | Owner: abh | Views: 78 | Comments: 0 | Open/ Source 0 B

205. Mitigate port scanning.py | Owner: abh | Views: 126 | Comments: 1 | Open/ Source 1.1 KB

import subprocess import re import collections import time # Configurações log_file = '/var/log/syslog' threshold = 4 b

206. post.html | Owner: abh | Views: 132 | Comments: 0 | Open/ Source 4.83 KB

<!-- post.html --> {% extends "base.html" %} {% block title %}{{ post.title }}{% endblock %} {% block meta %}{{ post.meta }}{

207. home.html | Owner: abh | Views: 144 | Comments: 0 | Open/ Source 881 B

b'<!DOCTYPE html>\n<html>\n<head>\n <title>HTMLify your dreams</title>\n {% include "stylesheet.html" %}\n</head>\n<body>\

208. welcome.html | Owner: abh | Views: 150 | Comments: 0 | Open/ Source 499 B

<h1>Welcome to HTMLify</h1> <p>Here you can share you codes :)<br>And HTML can be parse so you can make your static site here

209. 01sqjlpevg | Owner: abh | Views: 97 | Comments: 0 | Open/ Source 12 B