Skip to content

Instantly share code, notes, and snippets.

# Create a lambda function which find numbers divisible by 3 or 5 from a list of numbers
"""
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
"""
"""
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:
@karolosk
karolosk / find_and_stop_locks.sql
Created December 14, 2020 08:50
Find and kill locks in PostgreSQL
-- 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

Redis CLI

Basic usage of the redis-cli for the supported data structures.

Basics

Start the cli in terminal: