def lembrete_func(lock): global lembrete lock.acquire() print("Executando função para criar um lembrete") # chama a função agenda para salvar o novo áudio falando os lembretes do dia agenda() # Executa o áudio com o nome X, criado em agenda lembrete = False lock.release()
def command_items(self, rest): channel, nick, params = rest myagenda = agenda.agenda() if params == "": items = myagenda.getagenda() newitems, activeitems = items self.msg(channel, 'New Agenda Items: ') for k, v in newitems.iteritems(): message = '%s: %s' % (k, v) self.msg(channel, message) self.msg(channel, 'Active Items: ') for k, v in activeitems.iteritems(): self.msg(channel, '%s: %s' % (k, v)) return 'End Agenda' else: params = params.split() cmd = params[0] if cmd == 'add': self.msg(channel, myagenda.addItem(nick, ' '.join(params[1:]))) elif cmd == 'del': item_type = params[1] item_number = params[2] self.msg(channel, myagenda.delItem(item_type, item_number)) elif cmd == 'get': item_type = params[1] item_number = params[2] self.msg(channel, myagenda.getItem(item_type, item_number))
def main(): import utils variables = ['A', 'B', 'C', 'D'] minterms = [[-1, 1, 0, 0], [1, -1, 1, -1], [1, 0, -1, -1]] the_agenda = agenda.agenda() wires, circuit = make_circuit(minterms, variables, the_agenda) print(wires, circuit) utils.probe('ckt', circuit, the_agenda) wires['B'].set_signal(1) utils.propagate(the_agenda)
from contacto import contacto from agenda import agenda miAgenda = agenda() op = 0 def separador(): print('---------------------------------------------------------------------------------------') def nuevoContacto(): #Crear nodo contacto y agregarlo a la agenda try: nombre = input('\nNombre: ') apellido = input('\nApellido: ') telefono = int(input('\nTeléfono: ')) temporal = miAgenda.buscarTelefono(telefono) if temporal == None: miAgenda.agregarContacto(contacto(nombre, apellido, telefono)) print('\nContacto almacenado exitosamente') else: print('El número de teléfono ya se encuentra registrado...') except: print('\nTeléfono no valido...') while op != 4: print('1. Ingresar nuevo contacto') print('2. Buscar contacto') print('3. Visualizar agenda') print('4. Salir') op = int(input('\nIngrese la opción que desea utilizar: ')) if op == 1: separador()
def signedOn(self): # This is called once the server has acknowledged that we sent # both NICK and USER. identify = 'identify %s' % self.nspass self.msg('NickServ', identify) self.agenda = agenda.agenda()
def main(): the_agenda = agenda.agenda() test_maxterm_function(the_agenda)
from agenda import agenda obj_agenda = agenda("Juan", "callejas", "4721990", "25") obj_agenda.setNombre("Jose") print(obj_agenda.getNombre())
awnser = "" while contador == 0: json_conv.inicializa() hoje1 = datetime.today() hoje = hoje1.strftime("%a/%d/%m/%Y %H:%M") dia_da_semana = hoje1.strftime("%a") json_conv.converte_json( {'str': f"Olá {nome}, que função você gostaria de usar?"}) hoje1 = hoje[15:] respost = json_conv.carrega_json("input") if respost != "": print(respost) if dia_da_semana in dias_da_semana: if is_in.str("agenda", respost): agenda.agenda(respost, dia_da_semana) elif is_in.str(dia_da_semana, find): print(f"{resposta} não tem aula, é fim de semana!") else: print("Dia não encontrado") if is_in.str("PIADA", respost) or is_in.str("PIADAS", respost): piada.piada() elif is_in.str("CALCULADORA", respost) or is_in.str( "CALCULAR", respost) or not is_in.str( "CALCULADORA", respost) or not is_in.str("CALCULAR", respost): conv.calc(respost) elif is_in.str("IMC", respost):
telefonoContacto = [] telefonoContacto.append(input("Telefono del nuevo contacto: ")) i = 1 while i == 1: contTelefono = input("¿Agregar mas numeros de este contacto? s/n : ") if contTelefono == "s": telefonoContacto.append( input("Otro Telefono del nuevo contacto: ")) if contTelefono == "n": i = 0 return telefonoContacto nombreAgenda = input("Ingrese el nombre del dueño de la agenda ") apellidoAgenda = input("Ingrese el apellido del dueño de la agenda ") agen = agenda.agenda(nombreAgenda, apellidoAgenda) agen.imprimir() opcion = "" while (opcion != "SALIR" and opcion != "salir"): print("MENU:") print(" Agregar amigo [Agregar]") print(" Eliminar amigo [Eliminar]") print(" Imprimir agenda [Imprimir]") print(" Salir [salir]") opcion = input("Ingrese la opcion: ") if opcion == "Agregar": agen.agregarAmigos(pedirContacto()) if opcion == "Eliminar": agen.eliminarAmigos(input("Ingrese el nombre del amigo a eliminar: ")) if opcion == "Imprimir":