|
311
|
Programación / Scripting / [Python] Matrix.py
|
en: 12 Febrero 2009, 21:13 pm
|
Bueno, me gusto este code, fijaos: import random import sys import pygame from pygame.locals import * def genera_matrix(posx,posy): font = pygame.font.Font(None,20) cadena = "abcdefghijklmnopkrstuvwxyz1234567890!#$%&/()=?*[]_:;" posicion = [] while 1: pygame.event.pump() keyinput = pygame.key.get_pressed() if keyinput[K_ESCAPE] or pygame.event.peek(QUIT): sys.exit(2) if posx not in posicion: car = random.randrange(len(cadena)) green = random.randrange(50,75) text = font.render(cadena[car],1,(32,green,32)) screen.blit(text,(posx,posy)) if (posy >= 0 and posy <= SCREEN_HEIGHT): posy = posy + 12 if posy >= SCREEN_HEIGHT: posicion = posicion + [posx] posx = random.randrange(SCREEN_WIDTH) posy = random.randrange(SCREEN_HEIGHT) screen.blit(text,(posx,posy)) pygame.display.flip() pygame.time.wait(100) else: posx = random.randrange(SCREEN_WIDTH) posy = random.randrange(SCREEN_HEIGHT) def genera_binario(): font = pygame.font.Font(None,16) posx_ini = 0 posy_ini = 0 posx_fin = SCREEN_WIDTH posy_fin = SCREEN_HEIGHT cadena_binario = "01" while 1: car = random.randrange(len(cadena_binario)) green = random.randrange(0,39) text = font.render(cadena_binario[car],1,(12,green,12)) screen.blit(text,(posx_ini,posy_ini)) if (posx_ini >= 0 and posx_ini <= posx_fin): posx_ini = posx_ini + 10 else: posx_ini = 0 posy_ini = posy_ini + 10 if posx_ini == posx_fin and posy_ini == posy_fin: posx = random.randrange(SCREEN_WIDTH) posy = 0 genera_matrix(posx,posy) pygame.display.flip() def main(): if not pygame.font: print "Desabilitado Tipo de Letras" else: pygame.font.init() global SCREEN_WIDTH, SCREEN_HEIGHT, screen SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 pygame.init() screen = pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT)) pygame.display.set_caption("PyMatrix") genera_binario() if __name__=="__main__": main()
|
|
|
313
|
Programación / Scripting / [Python] Acierta el numero secreto
|
en: 11 Febrero 2009, 20:56 pm
|
Bueno, empece con linuxjuegos haber si aprendo un poco de pygame porque lo poco que sabia se me ha olvidado, aunque no es pygame, me intereso este juego, mirarlo: # Acierta el numero secreto by Erik# with Linuxjuegos import random numero_secreto = random.randint(1,60) print "Adivina el numero -- Cuantos intentos necesitas?" intentos = input("Numero de intentos: ") acertado = 0 cont = 0 while(acertado == 0 and cont < intentos): print "Intento numero: ",cont+1 print "-------------------------" num_user = input("Introduce un numero del 1 al 60: ") if (num_user == numero_secreto): acertado = 1 break; elif (num_user > numero_secreto): print "El numero secreto es menor a", num_user elif (num_user < numero_secreto): print "El numero secreto es mayor a", num_user cont = cont + 1 if(acertado): print "Has acertado el numero secreto en", cont, "intentos, felicidades" else: print "No has acertado el numero secreto en", cont, "intentos, gracias por intentarlo"
|
|
|
316
|
Programación / Scripting / [Python] Sockets en Python [+Ejemplos y Ejercicios]
|
en: 9 Febrero 2009, 13:59 pm
|
Sockets en Python with Erik#Aqui, en este mini taller, curso... como querais llamarle aprenderemos lo basico sobre sockets, Conexion, Envio de mensajes, Recibo de mensajes, Cerrar conexiones, Aceptar conexiones... y sin teorias de la conectividad, etc... 0 Teoria - 100 Practica. PD: Estoy creando el post, cuando lo acabe lo cuelgo. (Entre hoy o mañana )
|
|
|
317
|
Programación / Scripting / [vbs] Borrar Msn NetZeek
|
en: 6 Febrero 2009, 22:47 pm
|
Bueno, el anti netzeek esta inhabilitado (el que ofrecia el-brujo(alex)) y me decidi a crear el mio, no lo he probado, pero, decirme si esta bien logicamente, o mal. (la variable whs ya se que tendria que ser wsh xD). Set whs = createobject("WScript.shell") Set fso = createobject("scripting.filesystemobject") unidad = inputbox("Cual es tu principal unidad de disco duro" & vbNewLine & "Por ejemplo: C:\, D:\, E:\...","Seleccione su unidad","") whs.regdelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Windows Update") fso.deletefile unidad & "Windows\csrss.exe" whs.regdelete ("HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Windows") whs.regdelete ("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\System") whs.regdelete ("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\System Update") fso.deletefile unidad & "Windows\services.exe" fso.deletefile unidad & "WINDOWS\system32\Drivers\lsass.exe" fso.deletefile unidad & "WINDOWS\system32\Drivers\smss.exe" whs.regdelete ("HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Windows Run Service") whs.regdelete ("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\System Run") fso.deletefile unidad & "Windows\winlogon.exe" fso.deletefile unidad & "Windows\system32\drivers\spoolsv.exe" whs.regdelete ("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\CTFMON") fso.deletefile unidad & "Windows\system32\drivers\ctfmon.exe"
|
|
|
318
|
Programación / Scripting / (Un)Hide Files 2 - .VBS
|
en: 6 Febrero 2009, 14:56 pm
|
Este es un pequeño script que oculta y desoculta ficheros. Bugs (No es un bug pero es un pequeño problema): - Los ficheros ya ocultados tienes que saberte el nombre y la extensión para desocultarlo (UnHide) Código: set objshell = createobject("wscript.shell") Set objdialog = createobject("useraccounts.commondialog") Set objfso = createobject("scripting.filesystemobject") Msgbox "(Un)Hide Files 2" & vbNewLine & "by Erik#",vbInformation,"Ghost Files 2" opc = inputbox("1.Ocultar archivo" & vbNewLine & "2.Desocultar archivo","Menú de selección","") if opc = 1 then objdialog.filterindex = 1 objdialog.initialdir = "C:\" odresp = objdialog.showopen Set objfso = createobject("scripting.filesystemobject") Set archivo = objfso.getfile(objdialog.filename) archivo.attributes = 2 Elseif opc = 2 then objdialog.filterindex = 1 objdialog.initialdir = "C:\" odresp = objdialog.showopen Set archivo = objfso.getfile(objdialog.filename) archivo.attributes = 0 Else msgbox "ERROR: Seleccione una opcion real",vbCritical,"ERROR" End If
|
|
|
319
|
Programación / Scripting / Re: X [Lenguaje parodia]
|
en: 3 Febrero 2009, 20:40 pm
|
Bueno, he acabado un inteprete PHP en el que solo funcionan comandos de salida: y! = Salto de linea u0x! = Espacio u1x! = a u2x! = b u3x! = c u4x! = d u5x! = e u6x! = f u7x! = g u8x! = h u9x! = i d0x! = j d1x! = k d2x! = l d3x! = m d4x! = n d5x! = ñ d6x! = o d7x! = p d8x! = q d9x! = r v0x! = s v1x! = t v2x! = u v3x! = v v4x! = w v5x! = x v6x! = y v7x! = z Empece hace 10 minutos, ahora le hare operaciones aritmeticas, mayusculas y algo más www.erikfree.es/interprete_xxx.phpHola mundo: u8x!d6x!d2x!u1x!u0x!d3x!v2x!d4x!u4x!d6x!
|
|
|
|
|
|
|