Skip to content

Instantly share code, notes, and snippets.

View ricoms's full-sized avatar
🐍

Ricardo Savii ricoms

🐍
  • São Paulo, SP - Brazil
View GitHub Profile
@mateusmaaia
mateusmaaia / dafiti-products.js
Last active November 17, 2019 15:15
Discover what products are sold and distributed by Dafiti's
javascript:(
function(){
$(".banner-text-box").css("display", "none");
$(".col-md-3").css("width","15%");
$(".col-md-9").css("width","85%");
$(".product-list-col-3 .product-box").css({"width": "30%", "margin-right": "3%"});
$(".product-box").each((i, item) => {
url = $(item).find(".quickview-link.product-box-preview").attr("data-remote");
@fuatbeser
fuatbeser / tensorboard_in_colab.py
Created August 19, 2018 10:53
Run Tensorboard in Google Colab
# You can change the directory name
LOG_DIR = 'tb_logs'
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
import os
if not os.path.exists(LOG_DIR):
os.makedirs(LOG_DIR)
@nmwalsh
nmwalsh / falcon_gateway.py
Created December 7, 2017 02:23
Falcon API gateway for a simple machine learning API
# falcon_gateway.py
import falcon
import json
from data_handler import invoke_predict
# Falcon follows the REST architectural style, meaning (among
# other things) that you think in terms of resources and state
# transitions, which map to HTTP verbs.
@cbaziotis
cbaziotis / AttentionWithContext.py
Last active April 25, 2022 14:37
Keras Layer that implements an Attention mechanism, with a context/query vector, for temporal data. Supports Masking. Follows the work of Yang et al. [https://www.cs.cmu.edu/~diyiy/docs/naacl16.pdf] "Hierarchical Attention Networks for Document Classification"
def dot_product(x, kernel):
"""
Wrapper for dot product operation, in order to be compatible with both
Theano and Tensorflow
Args:
x (): input
kernel (): weights
Returns:
"""
if K.backend() == 'tensorflow':
@BrunoGrandePhD
BrunoGrandePhD / remove-big-file.sh
Created December 15, 2016 01:16
Remove a large committed file from your Git repository.
# The commands below are a guide to remove a large file that has been
# accidentally committed to a Git repository's history. If the file is
# larger than 100 MB, GitHub will prevent you from pushing your latest
# commits. The annotated steps below should help you remove the large
# file from your commit history, even if you've made new commit since.
# Some Git users advise against rebasing. You can safely use it here
# because you haven't published your changes yet.
# So, you first need to rebase your current branch onto the point that
@marcoscastro
marcoscastro / kosaraju.cpp
Created October 25, 2015 17:35
C++ - Algoritmo de Kosaraju
/*
Implementação do algoritmo de Kosaraju
Detecta componentes fortemente conectadas
*/
#include <iostream>
#include <stack>
#include <list>
using namespace std;
@developius
developius / README.md
Last active May 20, 2025 11:20
Setup SSH keys for use with GitHub/GitLab/BitBucket etc
@pkuczynski
pkuczynski / LICENSE
Last active May 21, 2025 12:54
Read YAML file from Bash script
MIT License
Copyright (c) 2014 Piotr Kuczynski
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWAR