Skip to content

Instantly share code, notes, and snippets.

View tonyskapunk's full-sized avatar
🚀

Tony Garcia tonyskapunk

🚀
View GitHub Profile
@tonyskapunk
tonyskapunk / palindrome.py
Created January 15, 2019 20:13
palindrome
#!/usr/bin/env python
# Write a method palindrome_chain_length which
# - takes a positive number and
# - returns the number of special steps needed to obtain a palindrome.
# The special step is:
# - "reverse the digits, and add to the original number".
# If the resulting number is not a palindrome,
# repeat the procedure with the sum
# until the resulting number is a palindrome.
#
@tonyskapunk
tonyskapunk / elinks.md
Last active November 7, 2018 03:10
elinks vs links
@tonyskapunk
tonyskapunk / CentOS_7.md
Created October 29, 2018 21:00
links package deps

os-release:

# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
@tonyskapunk
tonyskapunk / memory.md
Created October 5, 2018 16:28
pydoc for opsdroid
  • master:
Help on module memory:

NAME
    memory - Class for persisting information in opsdroid.

CLASSES
    builtins.object
@tonyskapunk
tonyskapunk / req.md
Created August 10, 2018 20:47
ejemplos

Kwame enterprises, un nuevo startup en el valle de la silicona desea migrar sus 2 aplicaciones a un ambiente cloud computing. Applicaciones:

  • Sitio web: Python
  • Aplicación para el clima: Python

La infrastrutura deberá ser distribuida en GCP and AWS mediante clusters Kubernetes, deberá contar con la capacidad de poder ser facilmente re-creados.

  • Terraform
  • Ansible

Los componentes utilitarios para para la infrastructura entre otros son:

#!/usr/bin/python
import pandas as pd
import numpy as np
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
from newspaper import Article
#!/usr/bin/python
from random import choice
from signal import Signals
from os import listdir, kill
def main():
while true:
# Get random a signal
lucky_signal = choice(list(Signals))
@tonyskapunk
tonyskapunk / docker.md
Created April 27, 2018 19:56
one liners

Update docker images

for i in $( docker images --format "{{.ID}}" ); do docker pull ${i}; done

Remove old images

@tonyskapunk
tonyskapunk / tortuga.py
Last active February 16, 2018 22:10
tortuga(logo)
#!/usr/bin/env python
import turtle
class Multigon():
"""Creating polygons with turtle(logo)"""
def __init__(self, bgcolor="black", fgcolor="lightgreen"):
self.screen = turtle.Screen()