Skip to content

Instantly share code, notes, and snippets.

@pabloagn
Last active February 2, 2023 00:20
Show Gist options
  • Save pabloagn/29b071b8e1c6bd83d9aea39a537ec931 to your computer and use it in GitHub Desktop.
Save pabloagn/29b071b8e1c6bd83d9aea39a537ec931 to your computer and use it in GitHub Desktop.
Example gists for blog post: What are GitHub Gists and How to Use Them
"""
Created on Wed Jan 18 19:23:00 2023
@author: Pablo Aguirre
GitHub: https://github.com/pabloagn
Website: https://pabloagn.com
Contact: https://pabloagn.com/contact
Part of Blog Article: what-are-github-gists-and-how-to-use-them
"""
"""
Created on Wed Jan 18 19:23:00 2023
@author: Pablo Aguirre
GitHub: https://github.com/pabloagn
Website: https://pabloagn.com
Contact: https://pabloagn.com/contact
Part of Blog Article: what-are-github-gists-and-how-to-use-them
"""
def myFun(my_list):
'''
Parameters
----------
my_list : list
Contains a set of integer numbers.
Returns
-------
sum_of_nums : int
The sum of the numbers inside my_list.
'''
print(f'List contains {len(my_list)} numbers.')
sum_of_nums = 0
for i in my_list:
sum_of_nums += i
print(f'Sum of numbers is {sum_of_nums}.')
return sum_of_nums
my_list = [1, 2, 3, 4, 5]
myFun(my_list)
Name Surname Age Occupation
Godfrey Hazel 40 Dancer
Chloe Evan 15 Poet
Charles Dickens 210 Writer
Marcy Zak 32 Nurse
Leo Tolstoy 195 Writer
Calista Harve 25 Nurse
Sebastian Duane 32 Musician
Oscar Wilde 169 Writer
Mandalyn Gabby 12 Student
Mia Natasha 1 Toddler
"""
Created on Wed Jan 18 19:23:00 2023
@author: Pablo Aguirre
GitHub: https://github.com/pabloagn
Website: https://pabloagn.com
Contact: https://pabloagn.com/contact
Part of Blog Article: what-are-github-gists-and-how-to-use-them
"""
def myFun(my_list):
'''
Parameters
----------
my_list : list
Contains a set of integer numbers.
Returns
-------
sum_of_nums : int
The sum of the numbers inside my_list.
'''
print(f'List contains {len(my_list)} numbers.')
sum_of_nums = 0
for i in my_list:
sum_of_nums += i
print(f'Sum of numbers is {sum_of_nums}.')
return sum_of_nums
my_list = [1, 2, 3, 4, 5]
myFun(my_list)

Markdown

A brief introduction

Markdown is a lightweight markup language used for creating formatted text. It was created in 2004 by John Gruber & Aaron Swartz and has been widely adopted by various document-creation software applications. Markdown accepts basic markup syntax; depending on the application used, it also supports extended syntax for more advanced formatting.


Markdown supports multiple elements such as:

  • Headers from H1 up to H6
  • Paragraph body
  • Unordered lists
  • Ordered lists
  • Inline code
  • Code snippets
  • Many other elements

Markdown also supports more advanced formatting such as:

  1. Diagramming
  2. Topographic objects
  3. LaTeX Code

Markdown can also include images:

alt text

Markdown is amazing

We could keep on mentioning Markdown capabilities, but we would not end. Instead, we can consult the Markdown Documentation which includes all of the beforementioned, plus more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment