Skip to content

Instantly share code, notes, and snippets.

View MaodeColombia's full-sized avatar

Mauricio Martinez MaodeColombia

  • TESGlobal
  • Colombia
View GitHub Profile
@MaodeColombia
MaodeColombia / BUSCARV_(VLOOKUP).go
Last active April 29, 2022 00:10
Google Sheets - BUSCARV (VLOOKUP) + IMPORTRANGE: Búsqueda Vertical en hoja de diferente libro
//https://youtu.be/AF1VN4cLesY
=BUSCARV(B4;IMPORTRANGE("https://docs.google.com/spreadsheets/d/1ZnebV6lkk/edit?usp=sharing";"Hoja1!C:I");7;FALSO)
@MaodeColombia
MaodeColombia / bucle_function_vs._List_Comprehensions.py
Last active November 23, 2021 02:18
Combination from lowercase and digits
lowercase = 'abcdefghijklmnopqrstuvwxyz'
digits = '0123456789'
#List Comprehensions form
answer = [i+j+k+l for i in lowercase for j in lowercase for k in digits for l in digits]
#traditional form
answer2=[]
for a in lowercase:
for b in lowercase:
@MaodeColombia
MaodeColombia / Function_vs._List_Comprehensions.py
Last active November 23, 2021 02:19
Converting a function into a list comprehension
def times_tables():
lst = []
for i in range(10):
for j in range (10):
lst.append(i*j)
return lst
lst = [ i*j for i in range(10) for j in range (10)]
times_tables() ==lst
@MaodeColombia
MaodeColombia / Function_vs._lambda.py
Last active November 23, 2021 02:18
function converted into a lambda:
people = ['Dr. Christopher Brooks', 'Dr. Kevyn Collins-Thompson', 'Dr. VG Vinod Vydiswaran', 'Dr. Daniel Romero']
def split_title_and_name(person):
return person.split()[0] + ' ' + person.split()[-1]
for person in people:
#option 1
print(split_title_and_name(person) == (lambda x: x.split(' ')[0] + ' ' + x.split(' ')[-1])(person))