Skip to content

Instantly share code, notes, and snippets.

View maurobaraldi's full-sized avatar

Mauro Navarro Baraldi maurobaraldi

View GitHub Profile
{"-showExternalProfile":true,"+Direct":{"bypassList":[{"conditionType":"BypassCondition","pattern":"127.0.0.1"},{"conditionType":"BypassCondition","pattern":"::1"},{"conditionType":"BypassCondition","pattern":"localhost"}],"color":"#5b5","name":"Direct","profileType":"FixedProfile","revision":"15758d47666"},"+Proxy Carrefour":{"bypassList":[{"conditionType":"BypassCondition","pattern":"127.0.0.1"},{"conditionType":"BypassCondition","pattern":"::1"},{"conditionType":"BypassCondition","pattern":"localhost"},{"conditionType":"BypassCondition","pattern":"100.68.*"}],"color":"#fe9","fallbackProxy":{"host":"10.105.160.5","port":8080,"scheme":"http"},"name":"Proxy Carrefour","profileType":"FixedProfile","revision":"1567ffa1e7d"},"+Proxy Carrefour VPN":{"bypassList":[{"conditionType":"BypassCondition","pattern":"127.0.0.1"},{"conditionType":"BypassCondition","pattern":"::1"},{"conditionType":"BypassCondition","pattern":"localhost"}],"color":"#9ce","fallbackProxy":{"host":"10.150.139.30","port":8080,"scheme":"http"},"
@maurobaraldi
maurobaraldi / keybase.md
Created February 4, 2019 09:51
keybase.md

Keybase proof

I hereby claim:

  • I am maurobaraldi on github.
  • I am maurobaraldi (https://keybase.io/maurobaraldi) on keybase.
  • I have a public key ASCP8SHoNEF3oudg9-3b46aGv941xCSCzB0jSh0N2xRbmgo

To claim this, I am signing this object:

@maurobaraldi
maurobaraldi / bovespa.md
Last active March 1, 2020 16:13
Análise de movimentação diária de ativos da Bovespa

=== Download do arquivo compatado, e descompactação ===

wget -qO- -O tmp.zip ftp://ftp.bmf.com.br/MarketData/Bovespa-Vista/"NEG_$(date '+%Y%m%d').zip" && unzip tmp.zip && rm tmp.zip

== Layout do arquivo ==

ftp://ftp.bmf.com.br/MarketData/NEG_LAYOUT_portuguese.txt

=== Limpeza do cabeçalho e rodapé ===

@maurobaraldi
maurobaraldi / function.sh
Created November 8, 2018 19:32
Simple function in shell script
show() {
if [ "$1" = "Sandbox" ]; then
echo "pip install -r /path/to/sandbox.txt"
elif [ "$1" = "Staging" ]; then
echo "pip install -r /path/to/staging.txt"
else
echo "pip install -r /path/to/local.txt"
fi;
}
@maurobaraldi
maurobaraldi / hashing.java
Last active October 11, 2018 00:15
Hashing Function Java
package hashtable;
public class HashTable {
public static int hashFunction(int value) {
return value % 10;
}
public static boolean hashInsert(int hashTable[], int value) {
int pos = hashFunction(value);
@maurobaraldi
maurobaraldi / count_sort.py
Created October 3, 2018 23:54
Count Sort Python Implementation
def count_sort(array):
# The output character array that will have sorted arr
output = [0 for i in range(256)]
# Create a count array to store count of inidividul
# characters and initialize count array as 0
count = [0 for i in range(256)]
# For storing the resulting answer since the
@maurobaraldi
maurobaraldi / count_sort.java
Created October 3, 2018 23:20
Count Sort Java Implementation
public class SortingAlgorithms {
public void count_sort(int arr[]) {
int n = arr.length;
// The output character array that will have sorted arr
int output[] = new int[n];
// Create a count array to store count of inidividul
// characters and initialize count array as 0
@maurobaraldi
maurobaraldi / bubble.py
Created September 19, 2018 23:25 — forked from jootse84/bubble.py
Bubble sort recursive implementation in Python
def bubble(l_elems, is_sorted, step):
if step is 1 or is_sorted:
# base case: l_elems is already sorted or we pass through the list len(l_elems) times
return l_elems
else:
is_swapped = False
for i in range(len(l_elems) - 1):
# compares each pair of adjacent items and swaps them if they are in the wrong order
if l_elems[i] > l_elems[i + 1]:
is_swapped = True
@maurobaraldi
maurobaraldi / product.py
Created August 13, 2018 15:48 — forked from gregglind/product.py
Recursive python "product"
"""
this has a lot of list / tuple casting, and doesn't use
native python list properties to full advantage.
It mimics Little Schemer style coding quite well though.
"""
import itertools
@maurobaraldi
maurobaraldi / mocks_for_humans.html
Created July 14, 2018 07:22
Apresentação de Mocks para seres humanospara Just Python.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="keywords" content="remark,remarkjs,markdown,slideshow,presentation" />
<meta name="description" content="A simple, in-browser, markdown-driven slideshow tool." />
<title>Remark</title>
<style>
@import url(https://fonts.googleapis.com/css?family=Droid+Serif);
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);