Skip to content

Instantly share code, notes, and snippets.

View caiofcm's full-sized avatar
🎯
Focusing

Caio Curitiba Marcellos caiofcm

🎯
Focusing
View GitHub Profile
@caiofcm
caiofcm / README.md
Last active September 2, 2023 19:16
Change color of google flight Price graph (no tapermonkey or similars)

Change color of google flight Price graphs to highlight certain day of the week for easier lookup

  1. Make the search regularly and open the Price graph
  2. Open the console and execute:

d3.select("g[series-id='price graph']").selectAll('path').each(function (d) {var isFrid = new Date(d.domain).getDay() == 5; if (isFrid) d3.select(this).style('fill', 'black')})

@caiofcm
caiofcm / README.md
Created September 28, 2022 12:44
Add Git Bash to Windows Terminal

Add git bash to Windows Terminal

  • Install Windows Terminal
  • Install Git Bash
  • Go to Windows Terminal Settings
    • New profile
    • Command line: Search or something as "C:\Program Files\Git\bin\bash.exe"
    • Initial dir: "%USERPROFILE%"
  • Can choose a Icon (from the git-gui folder for instance)
@caiofcm
caiofcm / monte_hall_cm.ipynb
Created May 26, 2022 12:34
Monty Hall problem solved with numpy simulation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@caiofcm
caiofcm / README.md
Created April 28, 2022 18:22
Compile overleaf project locally

Compile overleaf project locally

Tested on WSL only

sudo apt install texlive-latex-extra
sudo apt install texlive-fonts-extra
sudo apt install texlive-science
@caiofcm
caiofcm / launch.json
Created April 27, 2022 13:26
Debug configuration for Python + CPP in Visual Code (msvc debugger for CPP)
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Attach",
"type": "cppvsdbg",
"request": "attach",
@caiofcm
caiofcm / wpd_to_dataset_treecolumns_fmt.js
Last active April 19, 2022 16:41
Web Plot Digiziter script to download data as (x,y,dataset-name)
// wpd_to_dataset_treecolumns_fmt.js
// WPD script to download dataset in three columns format (x, y, name)
//
// Steps:
// 1) First load the correct image
// 2) Align axes
// 3) From File->Run Script, execute this script
//
var wpdscript = (function () {
@caiofcm
caiofcm / parse_wpd_to_pandas.py
Created March 18, 2022 18:59
Web Plot Digitizer to csv and pandas
import json
import typing
from pathlib import Path
import click
import numpy as np
import pandas as pd
def get_dataset_as_dict(data_loaded: dict) -> dict:
@caiofcm
caiofcm / fractal-dimension.py
Created January 18, 2021 17:54 — forked from rougier/fractal-dimension.py
Fractal dimension computing
# -----------------------------------------------------------------------------
# From https://en.wikipedia.org/wiki/Minkowski–Bouligand_dimension:
#
# In fractal geometry, the Minkowski–Bouligand dimension, also known as
# Minkowski dimension or box-counting dimension, is a way of determining the
# fractal dimension of a set S in a Euclidean space Rn, or more generally in a
# metric space (X, d).
# -----------------------------------------------------------------------------
import cv2
@caiofcm
caiofcm / fbphrophet_dockerfile.md
Created October 12, 2020 23:40
Running Facebook Phrophet in a Docker container

Running Facebook Phrophet in a Docker container

Setup

The Dockerfile in a working folder:

FROM python:3.7
# based on: https://gist.github.com/stefanproell/89a00f3a2c18a7e9549a1de6f82cf0f8
@caiofcm
caiofcm / supervisely2coco.py
Last active June 30, 2023 23:18
Converting Supervisely output to COCO format (only detection in this version)
##
# Author: Caio Marcellos
# Email: caiocuritiba@gmail.com
##
import os
import numpy as np
import json
import glob
from datetime import datetime
from pathlib import Path