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
from collections import OrderedDict | |
custom_dict = { | |
'props_videos': { | |
1: { | |
'obj': 'a', | |
'nombre': 1 | |
}, | |
2: { | |
'obj': 'c', |
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
def ordenar_extraterrestre(desordenadas, orden_alfabeto): | |
def sort_function(word): | |
key = 0 | |
for i, letter in enumerate(word): | |
key += orden_alfabeto.index(letter) / (100 ** (i + 1)) | |
return key | |
# ordenada = ['revestir', 'miel', 'extraterrestre', 'auto', 'automovil', 'al'] | |
try: | |
return sorted(desordenadas, key=sort_function) |
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
import getpass | |
import logging | |
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, BaseFilter | |
# Clase que se utiliza para filtar los mensajes y que solo sean validos los que implican | |
# que un usuario nuevo entro en el grupo (puede ser un usuario comun o un bot) | |
class FilterNewMembers(BaseFilter): | |
def filter(self, message): | |
return bool(message.new_chat_members) |
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
import QtQuick 2.9 | |
import QtQuick.Controls 2.2 | |
ApplicationWindow { | |
id: main_window | |
visible: true | |
width: 500 | |
height: 500 | |
Item { |