Skip to content

Instantly share code, notes, and snippets.

View kumrzz's full-sized avatar

Kumar Ghosh kumrzz

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kumrzz
kumrzz / lemaske_04nov2025.ipynb
Created November 4, 2025 12:06
signal_tests_USATECH_IDXUSD_04nov2025
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kumrzz
kumrzz / Leetcode914hasGroupsSizeX.py
Created August 11, 2023 09:02
Leetcode 914 hasGroupsSizeX
#mostly from https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjqkOKIodKAAxV3T0EAHbWTCxkQFnoECBIQAQ&url=https%3A%2F%2Fleetcode.com%2Fproblems%2Fx-of-a-kind-in-a-deck-of-cards%2Fsolutions%2F2857069%2Fpython-easy-solution-faster-than-99-22%2F&usg=AOvVaw0OEHJEjy6pL2XqRoSZTmAj&opi=89978449
#import collections
class Solution:
def hasGroupsSizeX(self, deck) -> bool:
print(deck)
#count = collections.Counter(deck)
count = dict.fromkeys(deck,0)
for card in deck:
count[card]+=1
@kumrzz
kumrzz / leetcode1190_ReverseSubstrsBtwnParentheses.py
Created August 9, 2023 13:20
leetcode1190 Reverse Substrings Between Each Pair of Parentheses, mostly from ravensmove.com/
class Solution(object):
def reverseParentheses(s):
if not s:
return ''
arr = []
for char in s:
if char == ')':
combine_str = ''
while arr and arr[-1] != '(':
@kumrzz
kumrzz / leetcode605_canplaceflowers.py
Created August 9, 2023 13:16
leetcode 605 Can Place Flowers, mostly from walkccc.me
class Solution:
def canPlaceFlowers(self, flowerbed, n) -> bool:
for i, flower in enumerate(flowerbed):
if flower == 0 and (i == 0 or flowerbed[i - 1] == 0) and (i == len(flowerbed) - 1 or flowerbed[i + 1] == 0):
flowerbed[i] = 1
n -= 1
if n <= 0:
return True
return False