Skip to content

Instantly share code, notes, and snippets.

View mfurquimdev's full-sized avatar
🐧

Mateus Furquim mfurquimdev

🐧
View GitHub Profile
import uvicorn
from fastapi import FastAPI
from view import router as sample_router
app = FastAPI()
app.include_router(sample_router)
if __name__ == "__main__":
@mfurquimdev
mfurquimdev / README.md
Last active December 7, 2023 21:33
Check how many commits, files, and lines of code an author has changed

Git LOC

Define the AUTHOR_NAME as an environment variable before calling the script:

$ AUTHOR_NAME="João" ./git_loc.sh

The outputs will be separated into three files:

  • João.csv: File containing insertions, deletions, and file path
  • commits.list: File containing one commit id per line
@mfurquimdev
mfurquimdev / README.md
Last active January 26, 2024 00:55
Github metrics from lowlighter/metrics
@mfurquimdev
mfurquimdev / execute.sh
Created March 9, 2023 17:29
Run unit pytests upon change on python files
#!/bin/bash
pipenv run pytest -s -vv --failed-first -x --cov-report term-missing --cov=. tests
@mfurquimdev
mfurquimdev / execute.sh
Created February 21, 2023 15:05
Automatically run Haskell unit tests inside docker upon change on ./src/* files
#!/bin/bash
pushd pangram
stack test --allow-different-user --install-ghc
@mfurquimdev
mfurquimdev / execute.sh
Last active February 20, 2023 23:20
Automatically run Elixir unit tests inside docker upon change on ./lib/* files
#!/bin/bash
mix test
#!/bin/bash
#
# Modified a few lines from:
# https://github.com/neurosnap/lists.sh/discussions/24
#
# Automatically scp files to https://prose.sh
# when $HOME/prose_sh files are changed.
#
# Setup a prose.sh account first (See https://prose.sh)
#
from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA
from sklearn.manifold import LocallyLinearEmbedding
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from gooey import Gooey
@mfurquimdev
mfurquimdev / Sentiment_RNN_script.py
Last active November 30, 2021 01:58
Sentiment RNN for Udacity course
#!/bin/env python
import matplotlib.pyplot as plt
import numpy as np
import os
import torch
from collections import Counter
from os.path import exists as file_exists
from sklearn.model_selection import train_test_split
@mfurquimdev
mfurquimdev / parametrize.py
Created November 25, 2021 18:14
Using parametrize to pass a list of parameters to a test
@pytest.mark.asyncio
@pytest.mark.parametrize(
"request_body",
[
{
"start_date": "2021-02-01 00:00:00",
"sensors": [],
},
{"start_date": "2021-02-01 00:00:00", "end_date": "2021-02-01 00:30:00"},
],