Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jaime Alexis Martinez Medina Alkz6

🏠
Working from home
View GitHub Profile
@Alkz6
Alkz6 / ejemplo_cfdi.py
Last active Jul 24, 2020
Ejemplo básico de como crear un cfdi usando las clases generadas con el XSD del SAT y la librería generateDS de python
View ejemplo_cfdi.py
# -*- coding: utf-8 -*-
## Importar libreria generada con generateDS
#from . import CFDI33
import CFDI33
## StringIO lo usamos para "guardar" el cfdi procesado
from io import StringIO
## Declaración del schemaLocation para un CFDI sin complementos
View findpoke.py
from guizero import App, TextBox, PushButton, Picture, Text, warn
from pokebase import pokemon
from requests import get
from PIL import Image
from io import BytesIO
def fetch_pokemon():
name = input_box.value
try:
poke = pokemon(name)
View thewhessscript.py
replacements ={
'wheels': ['horn', 'wipers', 'people'],
'round and round': ['beep, beep, beep', 'swish, swish, swish', 'go up and down']
}
original_verse = """The wheels on the bus go round and round,
round and round, round and round,
The wheels on the bus go round and round,
All day long.
"""
View orderd_students.py
list_students = '54 - Alice,35 - Bob,27 - Carol,27 - Chuck,05 - Craig,30 - Dan,27 - Erin,77 - Eve,14 - Fay,20 - Frank,48 - Grace,61 - Heidi,03 - Judy,28 - Mallory,05 - Olivia,44 - Oscar,34 - Peggy,30 - Sybil,82 - Trent,75 - Trudy,92 - Victor,37 - Walter'
while True:
try:
ordered_list = None
by_lowest = int(input('0 - sorted for the lowest. \n1 - sorted for the highest\n'))
if not by_lowest:
ordered_list = sorted(list_students.split(','))
else:
ordered_list = reversed(sorted(list_students.split(',')))
break
View dogyears.py
print('what a cute dog.')
while True:
try:
real_age_dog = int(input('What is his/her age? '))
dog_years = real_age_dog * 7
real_age_dog = str(real_age_dog)
print("Wow! I think that the dog have " + str(dog_years) + " in dog years, that are a lot of years!")
except ValueError:
print('Come on! give me a number!')
except NameError:
View prime.py
number = 12
prime = True
for i in range(2, number):
if number % i == 0:
prime = False
if prime:
print("prime.")
else:
print("Not prime.")
@Alkz6
Alkz6 / username_generator.py
Last active May 24, 2018
username_generator.py
View username_generator.py
from random import choice, randint
adjetives = ('snobby', 'snooping', 'sociable', 'soft', 'solid', 'somber', 'sophisticated', 'sore', 'soulful', 'soulless', 'sour', 'sparkling', 'spastic', 'spicy', 'spinning', 'spirited', 'splendid', 'spontaneous', 'spooky', 'spotless', 'spotty', 'square', 'squealing', 'squeamish', 'stable', 'staid', 'stained', 'stale', 'staring', 'startling', 'steadfast', 'steady', 'steep', 'stern', 'sticky', 'stimulating', 'stingy', 'stinky', 'stoic', 'stormy', 'straight', 'straightforward', 'strange', 'striking', 'striped', 'strong', 'stupid', 'sturdy', 'stylish', 'subtle', 'successful', 'succinct', 'sudden', 'sulky', 'sullen')
nouns = ('confidence', 'daughter', 'degree', 'doctor', 'dot', 'dream', 'duty', 'essay', 'father', 'fee', 'finance', 'hour', 'juice', 'limit', 'luck', 'milk', 'mouth', 'peace', 'pipe', 'seat', 'stable', 'storm', 'substance', 'team', 'trick', 'afternoon', 'pleasure', 'score', 'screw', 'sex', 'shop', 'shower', 'suit', 'tone', 'window', 'agent', 'band', 'block', 'bone',
View whois.py
import time
while input('knock, knock ') != "who's there?":
pass
while input('mikey') != "mikey who?":
pass
print("My key doesn't work. let me in!")
time.sleep(2)
You can’t perform that action at this time.