Skip to content

Instantly share code, notes, and snippets.

View gabraganca's full-sized avatar
🚀
going above and beyond

Gustavo Bragança gabraganca

🚀
going above and beyond
View GitHub Profile
@gabraganca
gabraganca / data.csv
Created August 30, 2017 14:16
Recipe for fitting gaussians on `vsini` data for differente clusters.
vsini cluster
57.9878 Trumpler 14
65.384 Trumpler 14
171.073 Trumpler 14
38.8181 Trumpler 14
35.236 Trumpler 14
43.879 Trumpler 14
382.417 Trumpler 14
139.456 Trumpler 14
35.8049 Trumpler 14
@gabraganca
gabraganca / excel_arq.xlsx
Last active January 10, 2018 16:21
Ajudando o Xavier
@gabraganca
gabraganca / bootstrap_cmdline.py
Created May 8, 2018 15:11 — forked from elmotec/bootstrap_cmdline.py
Minimal python program with logging and argparse.
#!/usr/bin/env python
# encoding: utf-8
"""Minimal python commad line."""
import sys
import argparse
import logging
@gabraganca
gabraganca / get_closing_bracket.py
Created May 16, 2018 03:04
Get position of closing bracket if the poisition of the opening bracket is given.
def get_closing_index(string, index):
"""
Get position of closing bracket of a opening
bracket given by `index`.
Parameters
----------
string: str;
Input text.
@gabraganca
gabraganca / distance_average.py
Created May 17, 2018 02:19
Get the average distance of three points in the cartesian plane.
from math import sqrt
def get_distance(first_coord, second_coord):
"""
Get the distance between two points in the cartesian plane.
Parameters
----------
first_coord: tuple
@gabraganca
gabraganca / palindrome.py
Created May 17, 2018 02:20
Check if the word is or almost is a palindrome. To be almost a palindrome, we would need to change only one character.
def IsAlmostPalindrome(word):
"""
Check if the word is or almost is a palindrome.
To be almost a palindrome, we would need to change
only one character.
Parameters
----------
@gabraganca
gabraganca / frequent_number.py
Created May 17, 2018 02:20
Get the most frequent number from a list.
def MostPopularNumber(array, array_length=None):
"""
Get the most frequent number from an array.
If there arre two or more numbers that appear
the same number of times, return the lowest.
Parameters
----------
@gabraganca
gabraganca / bracket_balancing.py
Created May 18, 2018 12:01
Check if multiple brackets are balanced.
def is_balanced(s):
"""
Check if a string has balanced brackets.
Parameters
----------
s: str
String to be checked.
@gabraganca
gabraganca / salarios_dados.py
Created June 16, 2018 22:10
Salários mensais da área de dados
"""
Cria grafico de barras com os salarios para carreiras na area de dados.
Os valores forma obtidos no LoveMondays
author: Gustavo Braganca ([email protected])
"""
import matplotlib.pyplot as plt
from collections import OrderedDict
@gabraganca
gabraganca / desafio_neo4j.md
Created June 23, 2018 02:17
Desafio Neo4j

Desafio Neo4j

Comece criando o banco de dados de cinema

:play movie-graph

Em seguida, Faça: