Skip to content

Instantly share code, notes, and snippets.

View fabioaraujo121's full-sized avatar
💭
Do cool things that matter

Fábio Araújo fabioaraujo121

💭
Do cool things that matter
  • Caruaru, Pernambuco, Brasil
View GitHub Profile
@philippeoz
philippeoz / file.py
Last active October 4, 2023 15:51
Função para validar número do CNS - Cartão Nacional de Saúde ou Cartão do SUS
def cns_is_valid(cns):
"""
Função para validar número do CNS - Cartão Nacional de Saúde ou Cartão do SUS
:param cns: Número de CNS que será validado
:type cns: String (Caso não seja, será transformado)
:rtype: Boolean
"""
cns = ''.join(filter(str.isdigit, str(cns)))
@syafiqfaiz
syafiqfaiz / how-to-copy-aws-rds-to-local.md
Last active February 21, 2024 06:00
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems