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
#!/usr/bin/env python3 | |
''' | |
BEWARE: Poorly tested. Use at your own risk. | |
It replaces json files content. Backup first! | |
For use with https://github.com/kazupon/vue-i18n | |
Extracts i18n keys from vue files and add them to the locale files. | |
Supports only "v-t" method keys (not "$t") and json locale files (not yaml). | |
Doesn't support dynamic keys (v-t="var"), only static (v-t="'word'"). |
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
#!/usr/bin/env python | |
from threading import Lock | |
from flask import Flask, render_template, session, request | |
from flask_socketio import SocketIO, emit, join_room, leave_room, \ | |
close_room, rooms, disconnect | |
# Set this variable to "threading", "eventlet" or "gevent" to test the | |
# different async modes, or leave it set to None for the application to choose | |
# the best option based on installed packages. | |
async_mode = 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Based on: | |
# https://docs.python.org/3/library/email-examples.html | |
import sys | |
import os | |
import tempfile | |
import mimetypes |
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
#!/usr/bin/env python | |
''' | |
---------------------------------------------------------------------- | |
Copyright (C) 2016 Andrés M. R. Martano | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or |
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
# Postgres | |
cd $OPENSHIFT_DATA_DIR | |
wget https://ftp.postgresql.org/pub/source/v9.4.7/postgresql-9.4.7.tar.gz | |
tar xf postgresql-9.4.7.tar.gz | |
mkdir $OPENSHIFT_DATA_DIR/root | |
cd postgresql-9.4.7 | |
./configure --prefix=$OPENSHIFT_DATA_DIR/root | |
make | |
make install | |
cd $OPENSHIFT_DATA_DIR |
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
var loaderUtils = require("loader-utils"); | |
var mime = require("mime"); | |
module.exports = function(content) { | |
this.cacheable && this.cacheable(); | |
var query = loaderUtils.parseQuery(this.query); | |
var limit = (this.options && this.options.url && this.options.url.dataUrlLimit) || 0; | |
if(query.limit) { | |
limit = parseInt(query.limit, 10); | |
} | |
var mimetype = query.mimetype || query.minetype || mime.lookup(this.resourcePath); |
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
{ | |
"$schema": "http://interagent.github.io/interagent-hyper-schema", | |
"definitions": { | |
"account-feature": { | |
"description": "An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.", | |
"$schema": "http://json-schema.org/draft-04/hyper-schema", | |
"stability": "production", | |
"strictProperties": true, | |
"title": "Heroku Platform API - Account Feature", | |
"type": [ |
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
(env)➜ utils python import_revenue.py | |
2015-02-06 10:17:57,664 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 | |
2015-02-06 10:17:57,664 INFO sqlalchemy.engine.base.Engine () | |
2015-02-06 10:17:57,664 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 | |
2015-02-06 10:17:57,664 INFO sqlalchemy.engine.base.Engine () | |
2015-02-06 10:17:57,665 INFO sqlalchemy.engine.base.Engine BEGIN (implicit) | |
2015-02-06 10:17:57,686 INFO sqlalchemy.engine.base.Engine INSERT INTO revenue (code, description, date, monthly_predicted, monthly_outcome, economical_category, economical_subcategory, source, rubric, paragraph, subparagraph) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, |
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
INSERT INTO "revenue_code" VALUES('1.9.2.2','Restituições'); | |
INSERT INTO "revenue_code" VALUES('1.9.2.1','Indenizações'); | |
INSERT INTO "revenue_code" VALUES('1.6.0.0.99','Outros Serviços'); | |
INSERT INTO "revenue_code" VALUES('1.2.1.0.29.17','Contribuição do Servidor Ativo Civil, oriunda do Pagamento de Sentenças Judiciais'); | |
INSERT INTO "revenue_code" VALUES('1.2.1.0.29.16','Contribuição Patronal, oriunda do Pagamento de Sentenças Judiciais'); | |
INSERT INTO "revenue_code" VALUES('1.2.1.0.29.15','Contribuição Previdenciária em Regime de Parcelamento de Débitos'); | |
INSERT INTO "revenue_code" VALUES('1.2.1.0.29.13','Contribuição Previdenciária para Amortização do Déficit Atuarial'); | |
INSERT INTO "revenue_code" VALUES('1.6.0.0.5.5','Serviços de Assistência à Saúde Suplementar do Servidor Civil'); | |
INSERT INTO "revenue_code" VALUES('1.2.2.0.6.3','Receita de Distribuição de Conteúdos Audiovisuais por Prestadores de Serviço de Acesso Condicionado'); | |
INSERT INTO "revenue_code" VALUES('1.3.1.4','Laudêmios'); |
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
{ | |
"mapping": { | |
"orgao": { | |
"description": null, | |
"label": "\u00d3rg\u00e3o", | |
"facet": true, | |
"key": true, | |
"attributes": { | |
"name": { | |
"column": "\u00d3rg\u00e3o (Cod)", |
NewerOlder