Basic usage of the redis-cli for the supported data structures.
This file contains 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
# Create a lambda function which find numbers divisible by 3 or 5 from a list of numbers |
This file contains 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
""" | |
Write a function called is_palindrome which will check if | |
a given string is a palindrome. (Palindrome are the words/phrases that read the same both ways) | |
example : | |
kayak - kayak: Should Return True | |
lemon - nomel: Should Return False | |
""" | |
""" |
This file contains 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
a = 3 | |
b = 4 | |
c = 5 | |
if a % 2 == 0: | |
print(f'{a} is even') | |
else: | |
print(f'{a} is odd') | |
if b % 2 == 0: | |
print(f'{b} is even') | |
else: |
This file contains 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
-- Find process ids | |
select pid | |
from pg_locks l | |
join pg_class t on l.relation = t.oid | |
where t.relkind = 'r'; | |
-- Find queries that are locked | |
select pid, state, usename, query, query_start |