Skip to content

Instantly share code, notes, and snippets.

View Alkz6's full-sized avatar
🏠
Working from home

Jaime Alexis Martinez Medina Alkz6

🏠
Working from home
View GitHub Profile
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)
@Alkz6
Alkz6 / username_generator.py
Last active May 24, 2018 01:20
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',
number = 12
prime = True
for i in range(2, number):
if number % i == 0:
prime = False
if prime:
print("prime.")
else:
print("Not prime.")
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:
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
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.
"""
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)
@Alkz6
Alkz6 / GoDaddySSLHAProxy.md
Created January 25, 2021 19:36 — forked from sethwebster/GoDaddySSLHAProxy.md
Creating a PEM for HaProxy from GoDaddy SSL Certificate

GoDaddy SSL Certificates PEM Creation for HaProxy (Ubuntu 14.04)

1 Acquire your SSL Certificate

Generate your CSR This generates a unique private key, skip this if you already have one.

sudo openssl genrsa -out  etc/ssl/yourdomain.com/yourdomain.com.key 1024

Next generate your CSR (Certificate Signing Request), required by GoDaddy:

@Alkz6
Alkz6 / ejemplo_cfdi.py
Last active April 29, 2022 00:13
Ejemplo básico de como crear un cfdi usando las clases generadas con el XSD del SAT y la librería generateDS de python
# -*- 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