This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
"""Update library's tags using MusicBrainz. | |
""" | |
from beets.plugins import BeetsPlugin | |
from beets import ui, util | |
from beets.autotag.mb import musicbrainzngs | |
from beets.autotag import hooks | |
from collections import defaultdict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Rafael Azenha Aquini <rafael@tchesoft.com> | |
* @author Marco Antonio Righi <marcorighi@tchesoft.com> | |
* @author Marcelo Belinato <mbelinato@gmail.com> | |
* | |
* @license GPL | |
*/ | |
// +----------------------------------------------------------------------+ | |
// | BoletoPhp - Versão Beta | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Estrutura da tabela `pais` | |
-- | |
CREATE TABLE IF NOT EXISTS `pais` ( | |
`paisId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, | |
`paisNome` varchar(50) NOT NULL, | |
`paisName` varchar(50) NOT NULL, | |
PRIMARY KEY (`paisId`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=253 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Antes do document | |
\usepackage{array} | |
% Colunas para left, right e middle | |
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} | |
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} | |
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}} | |
\begin{tabular}{ |p{.25\textwidth}||L{.25\textwidth}||M{.25\textwidth}||R{.25\textwidth}|} | |
\hline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.bs-callout { | |
padding: 20px; | |
margin: 20px 0; | |
border: 1px solid #eee; | |
border-left-width: 5px; | |
border-radius: 3px; | |
h4 { | |
margin-top: 0; | |
margin-bottom: 5px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global --unset http.proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function nota_final($notas, $dificuldade) | |
{ | |
sort($notas); | |
array_pop($notas); | |
array_shift($notas); | |
return array_sum($notas) * $dificuldade; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def coalesce(*args): | |
"""Returns the first not None item. Similar to ?? in C#. | |
It's different from a or b, where false values are invalid. | |
:param args: list of items for checking | |
:return the first not None item, or None | |
""" | |
return next((arg for arg in args if arg is not None)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyorient | |
import yaml | |
import os, sys, codecs | |
def cp65001(name): | |
if name.lower()=='cp65001': | |
return codecs.lookup('utf-8') | |
codecs.register(cp65001) | |
os.environ["PYTHONIOENCODING"] = "cp65001" |
NewerOlder