Skip to content

Instantly share code, notes, and snippets.

View possatti's full-sized avatar

Lucas Possatti possatti

View GitHub Profile
@possatti
possatti / ruby-accessors.rb
Created November 17, 2013 06:46
Exemplo de como usar os 'accessors' do Ruby. Que são semelhantes aos 'getters' e 'setters' do Java e as 'propriedades' do C#.
#!/usr/bin/ruby
class Pessoa
def initialize(nome)
@nome = nome
end
# "getter"
def nome
@nome
@possatti
possatti / Makefile.config
Last active December 5, 2017 18:50
How to install Caffe GPU with Python 3 bindings on Ubuntu 16.04
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
# USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
# uncomment to disable IO dependencies and corresponding data layers
# Palette: http://colorpalettes.net/color-palette-3697/
# Brown: #4f231c rgb(79,35,28)
# Dark red: #88011d rgb(136,1,29)
# Light red: #da002b rgb(218,0,43)
# Blueish: #8ed2df rgb(142,210,223)
# Kinda white: #f2efdf rgb(242,239,223)
# Alternative pallete: http://colorpalettes.net/tag/the-color-of-cherry/
# Green 1: #7e9b0d rgb(126,155,13)
# Green 2: #baaf07 rgb(186,175,7)
@possatti
possatti / generate_mame_playlist_for_retroarch.py
Last active July 27, 2018 20:17
Use a DAT file to scan a ROM folder and create a RetroArch playlist. #MAME
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division
import xml.etree.ElementTree as ET
import argparse
import sys
import os
@possatti
possatti / gpu_names.json
Created September 23, 2019 05:09
Names of GPUs per hostname. The ID is the pci.bus from nvidia-smi.
{
"lcad55": {
1: "Titan Xp",
},
"car02": {
37: "Titan",
2: "Quadro",
},
"car03": {
37: "Titan",

Piedown

Piedown is a small python script that converts Markdown text to HTML using only regular expressions. It was much inspired by jbroadway's Slimdown.

Usage

To convert a page.md file written in Markdown to a page.html file, use: