Skip to content

Instantly share code, notes, and snippets.

View aladinoster's full-sized avatar
๐Ÿข
I'm here to try and learn!

Andres Ladino aladinoster

๐Ÿข
I'm here to try and learn!
View GitHub Profile
@aladinoster
aladinoster / count_elements.py
Created August 9, 2021 05:27
Python: Simple histogram from text or iterables
from collections import Counter
if __name__ == "__main__":
txt = "This is a vast world you can't traverse world in a day"
counts = Counter(txt.split())
print("Here is a sample of counts: ", counts)
print("The most common elements are: ", counts.most_common(2))
@aladinoster
aladinoster / demo_dataclass.py
Last active August 9, 2021 09:21
Python: Dataclass initializations
from dataclasses import dataclass, field
@dataclass
class A:
x: int = 1
y: int = 2
z: int = 3
def __init__(self, **kwargs):
@aladinoster
aladinoster / demo_multipleinheritance.py
Last active August 9, 2021 09:22
Python: Multiple inheritance with different signatures
""" Different signature multiple inheritance
"""
# Explicit is better than implicit
class A:
def __init__(self, a, b):
print(
"Init {} with arguments {}".format(self.__class__.__name__, (a, b))
@aladinoster
aladinoster / iterm2-solarized.md
Created January 19, 2020 23:52 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@aladinoster
aladinoster / gist:ccda8e83768b26243cc6465844161b36
Created October 10, 2019 09:44 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue: