serpent: start site serpent tutorial
install pyethereum, the one that let us to communicate with blockchain
#create a folder to save all you're going to download
mkdir ethereum
cd ethereum
#make python 2.7 virtualenv
class testThis(SessionWizardView): | |
form_list = [ReservationStepOne, ReservationStepTwo,] | |
def done(self, form_list, **kwargs): | |
all_data = {} | |
first, second = form_list | |
saved_obj = first.instance | |
saved_obj.save() | |
print('#='*90) | |
print(saved_obj.__dict__) |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Apr 25 09:24:05 2018 | |
@author: ging | |
""" | |
#!/usr/bin/env python | |
# https://code.google.com/p/libcrafter/wiki/DNSSpoofing |
from datetime import datetime | |
DEBUG = True | |
def to_datetime(string_date): | |
return datetime.strptime(string_date,'%d-%m-%Y') | |
reservations = [ | |
['01-05-2018', '10-05-2018'], |
serpent: start site serpent tutorial
install pyethereum, the one that let us to communicate with blockchain
#create a folder to save all you're going to download
mkdir ethereum
cd ethereum
#make python 2.7 virtualenv
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Mar 26 21:39:36 2018 | |
@author: ging | |
""" | |
from tkinter import * | |
#========================================================== | |
#import cx_Oracle |
import asyncio | |
from time import sleep | |
from random import randint | |
# asincrona | |
# se ejecuta secuencialmente hasta que encuentre la palabra await | |
# despues de eso, para su ejecucion hasta que python decida | |
async def timer(seconds=None): | |
'mirar tiempo de ejecucion' |
""" | |
FUNCIONES: CODIGO PARA HACER ALGO | |
GENERADORES: CREAR ALGO | |
""" | |
def generador_pares(valores=None): | |
""" | |
genera numeros pares | |
""" | |
numero = 0 |
""" | |
decoradores: | |
- son funciones que modifican el comportamiento de otras funciones para | |
adicionarles diferentes tipos de logicas | |
- se suelen usar para validaciones y manejo de errores | |
- pueden ser modificadas con parametros | |
- ayudan a documentar el código, y a reducir su tamaño | |
""" |
#Prueba número 2 de programación en PHYTON | |
#Factura de venta sencilla con libreria datetime | |
import datetime #libreria requerida para conocer el calendario y hora | |
#data | |
products = ( | |
( | |
'manzana':500, 'pera': 650, 'mango': 1000, 'papaya':1200, | |
) |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk | |
class gameMainWindow(Gtk.Window): | |
""" | |
create a game Window | |
""" |